* { margin:0; padding:0; box-sizing:border-box; -webkit-tap-highlight-color:transparent; }
body { font-family:"Hiragino Maru Gothic ProN","Hiragino Sans","Noto Sans JP",sans-serif; color:#333;
  background:linear-gradient(180deg,#1d3a2a 0%,#2e7d4f 40%,#66bb6a 75%,#ffd54f 130%); min-height:100vh; overflow-x:hidden; }
#app { max-width:860px; margin:0 auto; padding:10px; position:relative; z-index:1; }
.hidden { display:none !important; }
.screen { animation:fadein .3s; }
@keyframes fadein { from{opacity:0} to{opacity:1} }
.title-video-wrap { position:relative; border-radius:18px; overflow:hidden; box-shadow:0 10px 30px rgba(0,0,0,.4); }
.title-video { width:100%; height:290px; object-fit:cover; display:block; }
.game-title { position:absolute; inset:auto 0 12px 0; text-align:center; font-size:37px; color:#fff;
  text-shadow:0 2px 0 #1b5e20, 0 4px 14px rgba(0,0,0,.55); letter-spacing:1px; }
.game-title .title-sub { display:block; font-size:19px; color:#ffe082; letter-spacing:6px; margin-top:2px; }
.game-title.small { position:static; font-size:26px; margin:8px 0 6px; text-shadow:0 2px 0 #1b5e20, 0 3px 8px rgba(0,0,0,.4); }
.panel { background:rgba(255,253,247,.96); border-radius:18px; padding:16px; margin-top:12px; box-shadow:0 8px 24px rgba(0,0,0,.3); }
.panel.center { text-align:center; }
.host-img { width:118px; animation:bob 2.4s ease-in-out infinite; }
@keyframes bob { 0%,100%{ transform:translateY(0) } 50%{ transform:translateY(-6px) } }
.host-line { font-size:15px; font-weight:bold; color:#2e5b1e; margin:4px 0 8px; }
.progress-summary { font-size:13.5px; color:#4a6b21; margin-bottom:10px; }
.progress-summary b { color:#e65100; font-size:16px; }
.big-btn { display:block; width:100%; margin:12px 0 6px; padding:16px; font-size:20px; font-weight:bold; color:#fff;
  background:linear-gradient(180deg,#ff7043,#e53935); border:none; border-radius:999px; cursor:pointer; box-shadow:0 5px 0 #b71c1c; }
.big-btn:active { transform:translateY(3px); box-shadow:0 1px 0 #b71c1c; }
.sub-btn { display:block; width:100%; padding:11px; font-size:15px; font-weight:bold; color:#2e5b1e; background:#f1f8e9; border:2px solid #9ccc65; border-radius:999px; cursor:pointer; margin-top:6px; }
.mini-btn { padding:7px 13px; border-radius:999px; border:2px solid #ccc; background:#fff; cursor:pointer; font-size:13px; }
.title-footer { display:flex; gap:8px; justify-content:center; margin-top:10px; }
/* scene grid */
.scene-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; margin:10px 0 14px; }
.scard { background:rgba(255,253,247,.97); border-radius:14px; overflow:hidden; cursor:pointer; box-shadow:0 4px 10px rgba(0,0,0,.3); border:3px solid transparent; }
.scard:hover { border-color:#ffb300; }
.scard img { width:100%; aspect-ratio:4/3; object-fit:cover; display:block; }
.scard .sinfo { padding:7px 9px 9px; }
.scard .stitle { font-weight:bold; font-size:14px; color:#2e4a12; }
.scard .stheme { font-size:11px; color:#8a9a5b; }
.scard .sstars { font-size:13px; color:#ddd; letter-spacing:2px; }
.scard .sstars .on { color:#ffb300; }
/* play */
.play-head { display:flex; align-items:center; gap:9px; color:#fff; font-weight:bold; margin:4px 2px 6px; }
.badge { background:linear-gradient(180deg,#ffb300,#fb8c00); padding:5px 12px; border-radius:999px; font-size:14px; box-shadow:0 2px 0 #d35400; }
#play-count { background:rgba(0,0,0,.35); padding:4px 11px; border-radius:999px; font-size:13px; }
.timer { margin-left:auto; background:rgba(0,0,0,.35); padding:4px 11px; border-radius:999px; font-size:13px; font-variant-numeric:tabular-nums; }
.diff-row { display:flex; gap:7px; flex-wrap:wrap; justify-content:center; margin:6px 0 10px; }
.diff-btn { padding:8px 14px; border-radius:999px; border:2.5px solid #aed581; background:#fff; font-weight:bold; font-size:13.5px; cursor:pointer; color:#33691e; }
.diff-btn.sel { background:linear-gradient(180deg,#9ccc65,#689f38); color:#fff; border-color:#689f38; box-shadow:0 3px 0 #33691e; }
.panels { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media (max-width:640px) { .panels { grid-template-columns:1fr; } }
.img-panel { position:relative; }
.img-tag { position:absolute; z-index:4; top:8px; left:8px; background:rgba(0,0,0,.55); color:#fff; font-size:12px; font-weight:bold; padding:3px 10px; border-radius:999px; }
.imgwrap { position:relative; border-radius:14px; overflow:hidden; box-shadow:0 8px 22px rgba(0,0,0,.35); cursor:pointer; line-height:0; background:#fff; }
.imgwrap img { width:100%; height:auto; display:block; user-select:none; -webkit-user-select:none; }
.markers { position:absolute; inset:0; pointer-events:none; }
.marker { position:absolute; transform:translate(-50%,-50%); border:4px solid #ff1744; border-radius:50%;
  box-shadow:0 0 0 2.5px #fff, 0 0 14px rgba(255,23,68,.8); animation:pop .35s ease-out; }
.marker.answer { border-color:#2979ff; box-shadow:0 0 0 2.5px #fff, 0 0 14px rgba(41,121,255,.8); }
@keyframes pop { 0%{ scale:1.8; opacity:0 } 100%{ scale:1; opacity:1 } }
.miss { position:absolute; transform:translate(-50%,-50%); color:#ff1744; font-size:26px; font-weight:bold; text-shadow:0 0 6px #fff; animation:missfade .7s forwards; pointer-events:none; }
@keyframes missfade { to { opacity:0; transform:translate(-50%,-90%); } }
.play-msg { text-align:center; font-size:15px; font-weight:bold; color:#fff; min-height:24px; margin-top:10px; text-shadow:0 1px 4px rgba(0,0,0,.45); }
.play-msg.good { color:#c5ff9e; }
.host-row { display:flex; align-items:center; gap:10px; margin-top:8px; }
.host-row img { width:70px; flex:none; animation:bob 2.4s ease-in-out infinite; }
.host-row img.excited { animation:happyjump .5s ease-in-out 3; }
@keyframes happyjump { 0%,100%{ transform:translateY(0) } 40%{ transform:translateY(-13px) } }
.speech { flex:1; background:#fffdf7; border:2.5px solid #aed581; border-radius:13px; padding:9px 12px; font-size:14px; line-height:1.45; min-height:44px; }
.play-btns { display:flex; gap:7px; flex-wrap:wrap; margin-top:12px; }
.act-btn { flex:1; padding:12px 6px; font-size:14px; font-weight:bold; border-radius:999px; border:none; cursor:pointer; background:#7a9e43; color:#fff; box-shadow:0 3px 0 #4e6b24; white-space:nowrap; }
.act-btn.alt { background:#fff; color:#33691e; border:2px solid #aed581; box-shadow:none; }
.act-btn:disabled { opacity:.45; }
.clear-actions { margin-top:6px; }
#confetti { position:fixed; inset:0; pointer-events:none; z-index:80; }
@media (max-width:560px) { .title-video { height:220px; } .game-title { font-size:29px; } }
