:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif;color:#182c2a;background:#f5f6f2;--ink:#182c2a;--green:#24564a;--accent:#da7052;--muted:#72817e;--line:#d7dfd9;color-scheme:light}
*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button,a,input,textarea,select{-webkit-tap-highlight-color:transparent}button{cursor:pointer}button:disabled{cursor:default;opacity:.42}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:3px solid #da7052;outline-offset:3px}a{color:var(--green)}[hidden]{display:none!important}.app{max-width:600px;margin:0 auto;padding:24px 22px 36px;min-height:100dvh}.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:38px}.brand{font-size:27px;font-weight:800;letter-spacing:.05em}.text-btn{border:0;background:none;color:var(--ink);padding:8px 0;font-size:14px}.intro h1{font-size:34px;line-height:1.25;letter-spacing:-.055em;margin:0 0 14px;font-weight:800}.intro p{font-size:16px;line-height:1.75;margin:0 0 28px}.button{border:1px solid var(--green);background:transparent;color:var(--ink);border-radius:7px;min-height:48px;padding:12px 18px;font-weight:700;font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:7px;text-decoration:none}.button.primary{background:var(--green);color:#fff}.button.full{width:100%;font-size:18px;min-height:52px}.button.compact{min-height:40px;padding:8px 14px;font-size:14px}.button.danger{border-color:var(--accent);color:#963e27}.actions{display:grid;gap:10px}.network-note{text-align:center;font-size:13px;color:var(--muted);margin:14px 0 30px}.section-title{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:19px 0 14px;border-top:1px solid var(--line)}h2{font-size:19px;margin:0;font-weight:750}h3{font-size:17px;margin:0 0 8px}.games{list-style:none;padding:0;margin:0}.game-row{padding:14px 0;display:flex;align-items:center;gap:14px;border-top:1px solid var(--line)}.game-row img,.game-cover{width:66px;height:81px;flex-shrink:0;object-fit:cover;border-radius:5px;background:#dfe6e1}.game-cover{display:grid;place-items:center;font-size:28px;color:#8c9e94;font-weight:800}.game-copy{flex:1;min-width:0}.game-name{font-size:20px;font-weight:750}.game-meta{font-size:13px;color:var(--muted);margin-top:7px;line-height:1.5}.game-state{font-size:12px;margin-top:6px;color:var(--green)}.game-row.unavailable{opacity:.6}.solo{border-top:1px solid var(--line);padding-top:20px;margin-top:15px}.solo p,.muted{color:var(--muted);font-size:13px;line-height:1.7}.footer-links{margin-top:26px;display:flex;gap:20px;justify-content:center;flex-wrap:wrap}.footnote{color:var(--muted);font-size:11px;text-align:center;line-height:1.6;margin:18px 0}.resume{background:#e6ece5;padding:14px;border-radius:7px;margin-bottom:20px;display:flex;justify-content:space-between;gap:12px;align-items:center}.resume p{margin:0;font-size:13px;line-height:1.7}.table-top{margin-bottom:20px}.table-title{text-align:center;flex:1}.table-title h1{font-size:22px;margin:0}.table-title p{margin:5px 0 0;font-size:11px;color:var(--muted)}.turn-banner{background:#e3ebe2;border-radius:7px;padding:17px 14px;text-align:center;margin:12px 0}.turn-banner h2{font-size:22px;margin:0 0 7px}.turn-banner p{font-size:13px;margin:0;line-height:1.6}.stats{display:flex;justify-content:space-between;gap:8px;padding:18px 0;font-size:12px}.stats strong{font-size:22px;padding-left:6px}.stats .clues{color:var(--green)}.stats .lives{color:var(--accent)}.piles{display:flex;gap:9px;margin:0 0 22px}.pile{flex:1;min-width:0;border:1px solid #d1d8d2;border-radius:5px;overflow:hidden;text-align:center;background:#fafbf8}.pile span{display:block;background:var(--card-color);color:white;font-size:13px;padding:6px 0}.pile.white span{color:var(--ink)}.pile strong{display:block;font-size:25px;padding:12px 0;color:var(--ink)}.hand-section{padding:17px 0;border-top:1px solid var(--line)}.hand-label{display:flex;align-items:baseline;justify-content:space-between;gap:8px;margin-bottom:12px}.hand-label h3{margin:0}.hand-label span{font-size:11px;color:var(--muted)}.cards{display:flex;gap:8px}.card{position:relative;min-width:0;flex:1;aspect-ratio:.72;max-width:90px;border:1px solid #adb7ac;border-radius:7px;background:#f2efe4;color:var(--face-color,#52635b);padding:6px 0;display:flex;align-items:center;flex-direction:column;justify-content:space-between;transition:transform .12s,border-color .12s}.card strong{font-family:Georgia,"Times New Roman",serif;font-size:56px;font-style:italic;font-weight:900;line-height:1;letter-spacing:-.035em;display:grid;place-items:center;flex:1;width:100%;min-height:0;font-variant-numeric:lining-nums}.card.back{color:#52635b}.card.back strong{max-width:100%;overflow:hidden}.card.selected{outline:3px solid var(--accent);outline-offset:2px;transform:translateY(-3px)}.knowledge{display:block;font-size:10px;line-height:1.35;color:inherit;margin-top:5px;min-height:13px}.play-actions{display:grid;grid-template-columns:1fr 1fr 1.2fr;gap:9px;margin:8px 0 20px}.play-actions .button{padding:11px 4px;font-size:15px}.history{border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:15px 0}.history summary{font-size:15px;font-weight:700;cursor:pointer}.history ol{padding:0 0 0 19px;font-size:12px;line-height:1.85;color:var(--muted);max-height:220px;overflow:auto}.rule-link{display:block;text-align:center;margin:15px auto}.lobby-list{padding:0;list-style:none;margin:18px 0 25px}.lobby-list li{padding:15px 0;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:10px}.lobby-list small{color:var(--muted)}.connection{font-size:12px;color:var(--muted);line-height:1.65;margin:15px 0}.connection.problem{color:#a44d31}.result{background:#e3ebe2;text-align:center;border-radius:7px;padding:24px;margin:20px 0}.result strong{font-size:32px}.row{display:flex;gap:10px;flex-wrap:wrap}.row .button{flex:1}.hint-options{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 20px}.hint-options button{min-width:48px;min-height:44px;border-radius:5px;background:#fff;border:1px solid var(--line);font-weight:700}.hint-options button[data-color]{border-bottom:4px solid var(--card-color)}.hint-options button.active{outline:2px solid var(--green)}dialog{border:0;border-radius:10px;background:#f5f6f2;color:var(--ink);padding:26px 22px;width:calc(100% - 32px);max-width:510px;max-height:calc(100dvh - 42px);overflow:auto;box-shadow:0 18px 90px #122c2a40}dialog::backdrop{background:#162b2855}.dialog-close{position:absolute;top:8px;right:12px;border:0;background:transparent;font-size:27px;line-height:1;color:var(--muted);padding:5px}dialog h2{padding-right:20px;font-size:22px;margin-bottom:13px}dialog p{font-size:14px;line-height:1.75;margin:10px 0 17px}dialog label{display:block;font-size:13px;font-weight:650;margin:15px 0 8px}input,textarea,select{border:1px solid #bdcec1;border-radius:5px;background:#fff;color:var(--ink);padding:12px;width:100%;font-size:16px}textarea{min-height:90px;resize:vertical;font-size:12px;word-break:break-all}dialog .button{margin-top:12px}.qr{width:min(100%,290px);height:auto;display:block;margin:18px auto;background:#fff;padding:0;border:0}.step{font-size:12px;color:var(--green);margin-bottom:12px}.scanner{width:100%;max-height:300px;background:#172b27;border-radius:7px}.notice{background:#e8ece5;padding:12px;border-radius:5px;font-size:12px;line-height:1.7}.install-progress{height:4px;background:#ccd9d0;margin:16px 0;overflow:hidden}.install-progress span{display:block;height:100%;background:var(--green);width:50%;animation:loading 1s infinite alternate}@keyframes loading{from{transform:translateX(-50%)}to{transform:translateX(100%)}}#toast{position:fixed;bottom:max(22px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);background:#182c2a;color:#fff;border-radius:7px;padding:12px 18px;font-size:13px;max-width:calc(100% - 32px);z-index:10;box-shadow:0 4px 20px #182c2a20}.instructions ol{font-size:14px;line-height:1.9;padding-left:21px}.inline-status{font-size:12px;color:var(--green)}.danger-note{color:#a04d34!important} .discard-list{font-size:12px;line-height:1.8}.download-label{font-size:11px;line-height:1.5;color:var(--muted)}
@media(min-width:760px){.app{padding-top:36px;max-width:680px}.intro h1{font-size:43px}.topbar{margin-bottom:48px}.intro p{font-size:18px}.card{max-width:104px}.card strong{font-size:68px}.game-row{gap:20px}.game-row img,.game-cover{width:78px;height:96px}}
@media(max-width:360px){.app{padding:20px 16px 28px}.intro h1{font-size:30px}.cards{gap:6px}.card{padding:6px 0}.card strong{font-size:48px}.game-name{font-size:18px}.game-row{gap:10px}.button.compact{padding:8px 10px}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* 花火牌桌：统一浅色牌底，艺术数字颜色表示花色；自己的牌只显示已获提示。 */
.card-slot{flex:1;min-width:0;max-width:90px;display:flex;flex-direction:column;align-items:stretch}
.card-slot .card{width:100%;max-width:none;min-height:82px;flex:none}
.card-slot .card.back strong{font-size:56px}
.card-slot .card .knowledge{font-size:11px;color:#52635b;font-weight:750}


.card.white strong{-webkit-text-stroke:1.4px #52635b;text-shadow:0 1px 1px #52635b}
.pile.white{border-color:#798b80}.pile.white span{background:#e1e6e2;color:#394d43;border-bottom:1px solid #798b80}
.hint-marker{display:flex;align-items:center;justify-content:center;gap:4px;text-align:center;font-size:11px;line-height:1.4;margin-top:5px;font-weight:650;overflow-wrap:anywhere;flex-wrap:wrap}.hint-color{display:inline-block;flex:none;width:10px;height:10px;background:var(--face-color);border-radius:50%}.hint-color.white{border:1px solid #52635b}
.hint-marker.known{color:#24564a}.hint-marker.unknown{color:#72817e;font-weight:400}
.hint-exclusions{display:block;text-align:center;font-size:10px;line-height:1.4;color:#63736b;margin-top:2px;overflow-wrap:anywhere}
.card:disabled{opacity:1}.card[data-hint-player]:not(:disabled){cursor:pointer}.card[data-hint-player]:not(:disabled):active{transform:translateY(-2px)}
.turn-history{flex:1;min-width:0}
.latest-record{width:100%;min-height:44px;padding:6px 0 6px 6px;display:flex;align-items:center;justify-content:flex-end;gap:5px;border:0;background:transparent;color:#344f43;text-align:right}
.latest-record>span:first-child{font-size:11px;line-height:1.5;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.record-chevron{font-size:19px;line-height:1;flex:none}
.latest-record-panel{position:absolute;right:0;left:0;top:calc(100% + 6px);z-index:7;max-height:min(290px,45dvh);overflow:auto;padding:12px 14px;background:#f5f6f2;border-radius:7px;box-shadow:0 8px 26px #182c2a30}
.latest-record-panel ol{margin:0;padding-left:26px;font-size:13px;line-height:1.8;color:#344f43}.latest-record-panel li{padding:3px 0}
.hanabi-table .table-top{margin-bottom:9px}
.hanabi-table .table-top .text-btn{min-height:44px;min-width:44px}
.hanabi-table .turn-banner{position:relative;padding:0 8px 0 12px;margin:6px 0;text-align:left;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:44px}
.hanabi-table .turn-banner h2{font-size:17px;margin:0;line-height:1.45;min-width:0;max-width:46%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex-shrink:0}
.hanabi-table .turn-banner p{font-size:11px;line-height:1.5;margin:0;text-align:right}
.hanabi-table .stats{padding:10px 0 12px}.hanabi-table .stats strong{font-size:21px}
.hanabi-table .piles{gap:7px;margin-bottom:10px}.hanabi-table .pile span{padding:4px 0;font-size:12px}.hanabi-table .pile strong{padding:6px 0;font-size:22px}
.hanabi-table .hand-section{padding:12px 0}.hanabi-table .hand-label{margin-bottom:8px}
.hanabi-table .hand-label h3{font-size:16px;overflow-wrap:anywhere}.hanabi-table .hand-label span{font-size:10px}
.hanabi-table .history{padding:12px 0}.hanabi-table .rule-link{margin:10px auto;min-height:44px}
.hanabi-table .action-selection{grid-column:1/-1;margin:0;font-size:11px;line-height:1.35;color:#52645b;text-align:center}
@media(max-width:759px){
  .app:has(.hanabi-table){padding-top:12px}
  .app:has(.hanabi-table.has-play-actions){padding-bottom:calc(116px + env(safe-area-inset-bottom,0px))}
  .hanabi-table .card-slot .card{min-height:112px;padding:6px 0}
  .hanabi-table .card strong{line-height:1;font-size:clamp(48px,14vw,64px)}
  .hanabi-table .play-actions{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:600px;margin:0;padding:8px 22px calc(9px + env(safe-area-inset-bottom,0px));gap:6px 8px;background:#f5f6f2;border-top:1px solid #c7d2c9;box-shadow:0 -4px 18px #182c2a0c;z-index:5}
  .hanabi-table .play-actions .button{min-height:46px;padding:10px 4px}
  body:has(.hanabi-table.has-play-actions) #toast{bottom:calc(103px + env(safe-area-inset-bottom,0px))}
}
@media(min-width:760px){.card-slot{max-width:104px}}
/* 通用房间语音：独立浮层，不挤动任何游戏牌桌。 */
.voice-dock{position:fixed;right:12px;bottom:calc(18px + env(safe-area-inset-bottom,0px));z-index:6;display:flex;flex-direction:column;align-items:flex-end;gap:7px}
body:has(.hanabi-table.has-play-actions) .voice-dock{bottom:calc(116px + env(safe-area-inset-bottom,0px))}
.voice-toggle{background:#f5f6f2;box-shadow:0 3px 14px #182c2a20;min-height:44px;font-size:13px}
.voice-talk{touch-action:none;user-select:none;-webkit-user-select:none;min-height:48px;min-width:114px;max-width:160px;padding:10px 16px}
.voice-speaking .voice-talk{background:#a34d32;border-color:#a34d32}
.voice-panel{width:min(326px,calc(100vw - 24px));max-height:calc(100dvh - 190px);overflow:auto;background:#f5f6f2;border-radius:10px;padding:16px;box-shadow:0 6px 28px #182c2a33}
.voice-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.voice-heading h2{font-size:19px}.voice-heading .text-btn{min-height:44px;padding:8px}
.voice-modes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}.voice-modes .button{padding:8px 4px;min-height:44px;font-size:13px}.voice-modes [aria-pressed=true]{background:var(--green);color:#fff}
.voice-status{font-size:13px;line-height:1.65;color:#344f43;min-height:42px;margin:12px 0}
.voice-panel label{display:flex;justify-content:space-between;gap:10px;font-size:13px;font-weight:650;margin:14px 0 4px}.voice-panel input[type=range]{height:44px;padding:0;background:transparent;border:0;accent-color:var(--green)}
.voice-help{color:#52645b;font-size:12px;line-height:1.65;margin:9px 0 0}.voice-panel .text-btn{min-height:44px;color:var(--green)}
@media(min-width:760px){.voice-dock{right:max(18px,calc((100vw - 700px)/2));bottom:20px}body:has(.hanabi-table.has-play-actions) .voice-dock{bottom:20px}}
@media(max-width:360px){.hanabi-table .play-actions{padding-left:16px;padding-right:16px}.hanabi-table .card-slot .card.back strong{font-size:48px}}

