* { 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:#263238;
  background:radial-gradient(ellipse at 50% 30%, #2e7d32 0%, #1b5e20 55%, #0d3311 100%); min-height:100vh; overflow-x:hidden; }
#app { max-width:680px; 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} }
.video-banner-wrap { position:relative; border-radius:18px; overflow:hidden; box-shadow:0 10px 30px rgba(0,0,0,.45); }
.video-banner { width:100%; height:200px; object-fit:cover; display:block; }
.game-title { position:absolute; inset:auto 0 10px 0; text-align:center; font-size:40px; color:#fff; text-shadow:0 2px 0 #1b5e20, 0 4px 16px rgba(0,0,0,.6); letter-spacing:8px; }
.panel { background:rgba(255,253,247,.97); border-radius:18px; padding:16px; margin-top:12px; box-shadow:0 8px 24px rgba(0,0,0,.35); }
.panel.center { text-align:center; }
.host-img { width:104px; 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:#37474f; margin:4px 0 10px; min-height:22px; }
.setup-group { margin:10px 0; }
.setup-label { font-size:13px; font-weight:bold; color:#78909c; margin-bottom:5px; }
.seg-row { display:flex; gap:6px; flex-wrap:wrap; justify-content:center; }
.seg-btn { padding:9px 13px; border-radius:999px; border:2.5px solid #b0bec5; background:#fff; font-weight:bold; font-size:13.5px; cursor:pointer; color:#37474f; font-family:inherit; }
.seg-btn.sel { background:linear-gradient(180deg,#ffb300,#fb8c00); color:#fff; border-color:#fb8c00; box-shadow:0 3px 0 #d35400; }
.seg-btn.off { opacity:.55; }
.rule-note { font-size:12px; color:#90a4ae; margin-top:6px; }
.big-btn { display:block; width:100%; margin:12px 0 6px; padding:15px; font-size:19px; font-weight:bold; color:#fff; font-family:inherit;
  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:#37474f; background:#eceff1; border:2px solid #b0bec5; border-radius:999px; cursor:pointer; margin-top:6px; font-family:inherit; }
.mini-btn { padding:7px 13px; border-radius:999px; border:2px solid #b0bec5; background:#fff; cursor:pointer; font-size:13px; font-family:inherit; }
.title-footer { display:flex; gap:8px; justify-content:center; margin-top:10px; }
/* game */
.game-head { display:flex; align-items:center; gap:8px; color:#fff; font-weight:bold; margin:2px 2px 8px; flex-wrap:wrap; font-size:13.5px; }
.badge { background:linear-gradient(180deg,#ffb300,#fb8c00); padding:4px 11px; border-radius:999px; font-size:13px; box-shadow:0 2px 0 #d35400; }
#game-points { background:rgba(0,0,0,.35); padding:4px 11px; border-radius:999px; }
#field-badges { margin-left:auto; display:flex; gap:5px; }
.fbadge { background:#e53935; color:#fff; padding:4px 10px; border-radius:999px; font-size:12px; box-shadow:0 2px 0 #7f0000; }
.fbadge.back { background:#3949ab; box-shadow:0 2px 0 #1a237e; }
#cp-row { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.cp-box { background:rgba(255,253,247,.95); border-radius:13px; padding:7px 6px; text-align:center; border:3px solid transparent; min-height:104px; }
.cp-box.turn { border-color:#ffca28; box-shadow:0 0 0 3px rgba(255,202,40,.45), 0 6px 16px rgba(0,0,0,.3); }
.cp-box img { width:52px; height:52px; object-fit:contain; }
.cp-box .cp-name { font-size:12.5px; font-weight:bold; color:#37474f; }
.cp-box .cp-count { font-size:12px; color:#78909c; }
.cp-box .cp-rank { font-size:12.5px; font-weight:bold; color:#e65100; min-height:16px; }
.cp-box .cp-speech { font-size:11.5px; color:#546e7a; min-height:15px; line-height:1.25; }
.cp-box.finished { opacity:.75; }
#field-area { margin-top:10px; background:rgba(0,0,0,.28); border:2.5px dashed rgba(255,255,255,.35); border-radius:16px; min-height:118px; display:flex; flex-direction:column; align-items:center; justify-content:center; padding:10px 6px; }
#field-cards { display:flex; gap:0; min-height:76px; align-items:center; justify-content:center; flex-wrap:wrap; }
#field-info { color:#e8f5e9; font-size:13px; margin-top:5px; min-height:17px; text-align:center; }
.speech { margin-top:9px; background:#fffdf7; border:2.5px solid #a5d6a7; border-radius:12px; padding:8px 13px; font-size:14px; min-height:42px; display:flex; align-items:center; }
.speech.warn { border-color:#ef9a9a; background:#ffebee; }
#hand-area { margin-top:12px; background:rgba(255,253,247,.1); border-radius:14px; padding:12px 4px 8px; }
#hand-cards { display:flex; justify-content:center; flex-wrap:wrap; row-gap:8px; padding:0 6px; }
.tcard { position:relative; width:52px; height:74px; background:linear-gradient(180deg,#ffffff,#f5f5f5); border-radius:8px; border:1.5px solid #b0bec5;
  box-shadow:0 3px 7px rgba(0,0,0,.35); margin-left:-14px; cursor:pointer; user-select:none; flex:none; transition:transform .12s; }
.tcard:first-child { margin-left:0; }
.tcard .corner { position:absolute; top:3px; left:5px; font-weight:bold; font-size:15px; line-height:1.05; text-align:center; }
.tcard .big-suit { position:absolute; inset:auto 0 6px 0; text-align:center; font-size:24px; }
.tcard.red { color:#d32f2f; }
.tcard.black { color:#263238; }
.tcard.joker { background:linear-gradient(160deg,#fff8e1,#ffe0f2,#e1f5fe); color:#7b1fa2; }
.tcard.joker .corner { font-size:11px; }
.tcard.joker .big-suit { font-size:20px; }
.tcard.sel { transform:translateY(-13px); border-color:#fb8c00; box-shadow:0 0 0 2.5px #fb8c00, 0 8px 14px rgba(0,0,0,.4); }
.tcard.small { width:42px; height:60px; margin-left:-8px; cursor:default; }
.tcard.small .corner { font-size:12.5px; }
.tcard.small .big-suit { font-size:19px; bottom:4px; }
.tcard.dim { opacity:.45; }
.action-row { display:flex; gap:8px; margin-top:12px; }
.act-btn { flex:1; padding:14px; font-size:16px; font-weight:bold; border-radius:999px; cursor:pointer; font-family:inherit; border:none; }
.act-btn.main { background:linear-gradient(180deg,#ff7043,#e53935); color:#fff; box-shadow:0 4px 0 #b71c1c; }
.act-btn.main:disabled { background:#b0bec5; box-shadow:0 4px 0 #78909c; cursor:default; }
.act-btn.alt { background:#fff; color:#37474f; border:2px solid #b0bec5; }
.act-btn.alt:disabled { opacity:.45; cursor:default; }
.sub-row { display:flex; justify-content:center; margin-top:10px; }
.sub-row .mini-btn { background:rgba(255,255,255,.85); }
/* overlay */
.overlay { position:fixed; inset:0; background:rgba(0,0,0,.62); display:flex; align-items:center; justify-content:center; z-index:50; padding:14px; }
.overlay-card { background:#fffdf7; border-radius:18px; padding:18px; max-width:520px; width:100%; max-height:92vh; overflow-y:auto; text-align:center; box-shadow:0 18px 50px rgba(0,0,0,.5); }
.overlay-card h2 { font-size:21px; color:#263238; margin-bottom:8px; }
.overlay-video { width:100%; height:170px; object-fit:cover; border-radius:12px; margin-bottom:10px; }
.standings { width:100%; border-collapse:collapse; margin:8px 0; font-size:14px; }
.standings th, .standings td { padding:6px 5px; border-bottom:1.5px solid #eceff1; }
.standings th { color:#78909c; font-size:12px; }
.standings .me { background:#fff3c4; font-weight:bold; }
.rank-name { font-weight:bold; color:#e65100; }
#overlay-hand { margin:8px 0; }
#overlay-hand .tcard { cursor:pointer; }
.tribute-note { font-size:13.5px; color:#37474f; line-height:1.6; margin:6px 0; }
#confetti { position:fixed; inset:0; pointer-events:none; z-index:80; }
@media (max-width:380px) { .tcard { width:46px; height:66px; margin-left:-13px; } .tcard .big-suit { font-size:21px; } }
