/* Game screens: setup card, ready / countdown, play and results. */
.setup { max-width: 560px; margin: 0 auto; }
.g-head { display: flex; align-items: center; gap: 14px; }
.g-head .gi { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.g-head .gi svg { width: 24px; height: 24px; }
.g-head h1 { font-size: 24px; font-weight: 800; }
.g-head p { margin: 0; color: var(--muted); font-size: 14.5px; }
.g-head .x { margin-inline-start: auto; }
.howbtn { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 7px 14px; border: 0; border-radius: 999px; background: var(--soft); color: var(--accent); font-weight: 700; cursor: pointer; }
.howbtn svg { width: 17px; height: 17px; }
.rows { margin-top: 22px; display: grid; gap: 22px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: var(--tint); border: 1px solid var(--border); }
.tabs2 button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border: 0; border-radius: 999px; background: none; color: var(--muted); font-weight: 700; cursor: pointer; }
.tabs2 button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px -3px rgba(0,0,0,.2); }
.tabs2 svg { width: 18px; height: 18px; }
.row-head { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 700; }
.row-head svg { width: 19px; height: 19px; color: var(--accent); }
.row-head > span:not(.val) { white-space: nowrap; }
.row-head .val { margin-inline-start: auto; padding: 3px 12px; border-radius: 999px; background: var(--soft); color: var(--accent); font-size: 14px; font-weight: 700; }
.help { margin: 2px 0 0; color: var(--muted); font-size: 13.5px; }
input[type=range] { width: 100%; margin: 10px 0 0; accent-color: var(--primary); height: 28px; }
.toggle { display: flex; align-items: center; gap: 14px; }
.toggle > div { flex: 1; }
.toggle b { display: block; color: var(--ink); }
.switch { position: relative; width: 52px; height: 30px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--border); transition: background .2s; pointer-events: none; }
.switch span::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(22px); }
:root[dir="rtl"] .switch input:checked + span::after { transform: translateX(-22px); }
.sel { width: 100%; height: 48px; margin-top: 8px; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--field); color: var(--ink); font: inherit; }
.players { display: grid; gap: 8px; margin-top: 10px; }
.players div { display: flex; gap: 8px; }
.players input { flex: 1; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--field); color: var(--ink); font: inherit; font-size: 16px; }
.players button { width: 46px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--muted); cursor: pointer; }
.add-player { justify-self: start; background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 6px 0; }
.start { width: 100%; min-height: 56px; margin-top: 26px; font-size: 17px; letter-spacing: .04em; text-transform: uppercase; }
.start svg { width: 20px; height: 20px; }

/* Play screens */
.stage { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--page); color: var(--ink); }
.stage.dark { background: #1B1410; color: #fff; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(env(safe-area-inset-top) + 10px) 12px 6px; }
.topbar button { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: color-mix(in srgb, currentColor 8%, transparent); color: inherit; font-weight: 600; cursor: pointer; }
.topbar svg { width: 20px; height: 20px; }
.center-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8px 22px 22px; overflow: auto; }
.cue { font-family: var(--head); font-weight: 800; font-size: clamp(44px, 14vw, 88px); color: var(--accent); line-height: 1.05; }
.topic-label { font-size: 12.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.topic { font-family: var(--head); font-weight: 800; font-size: clamp(26px, 7.5vw, 44px); line-height: 1.15; margin: 8px 0 0; color: var(--ink); max-width: 760px; }
.hint { max-width: 460px; margin: 18px auto 0; color: var(--muted); font-size: 15.5px; }
.ready-btn { margin-top: 28px; min-height: 60px; padding: 0 40px; font-size: 18px; letter-spacing: .05em; }
.pie { position: relative; width: 168px; height: 168px; margin: 0 auto; }
.pie svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pie circle { fill: none; stroke-width: 12; }
.pie .track { stroke: var(--border); }
.pie .bar { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .12s linear; }
.clock { font-family: "Montserrat", sans-serif; font-weight: 800; font-variant-numeric: tabular-nums; font-size: 38px; color: var(--muted); margin-top: 10px; direction: ltr; }
.controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 22px; }
.controls .btn { min-width: 140px; }
.controls svg { width: 20px; height: 20px; }
.center-col { justify-content: safe center; }
@media (max-height: 720px) { .center-col { padding-top: 0; } .topic { font-size: clamp(22px, 6.2vw, 32px); } .pie { width: 120px; height: 120px; } .clock { font-size: 32px; margin-top: 6px; } .controls { margin-top: 16px; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--tint); border: 1px solid var(--border); font-size: 14px; font-weight: 700; color: var(--ink); }
.chip.strong { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }

/* End card */
.end { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 16px; background: rgba(10,7,5,.55); animation: fade .18s ease; }
.end .card { width: 100%; max-width: 420px; text-align: center; }
.end h2 { font-size: 28px; font-weight: 800; }
.end p { color: var(--muted); margin: 8px 0 0; }
.end .party { font-size: 44px; line-height: 1; }
.end .btn-primary { width: 100%; margin-top: 22px; }
.end .more { display: flex; justify-content: center; gap: 18px; margin-top: 12px; }
.end .more button { background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 6px; }
