/* Reserve is constant for a given viewport, including denial, failure and close. */
:root{--ad-reserve:calc(82px + env(safe-area-inset-bottom,0px))}
.site-shell,body[data-screen='home'] .site-shell{grid-template-rows:calc(var(--header-height) + env(safe-area-inset-top,0px)) minmax(0,1fr);padding-bottom:calc(var(--ad-reserve) + 8px)}
#app{container:game / size}
#announcer{top:0;left:0}
/* Reserve more room for the two touch targets; the card takes the remainder. */
.playing-surface .swipe-stage{container:card / size}
.playing-surface .word-card h1{font-size:clamp(1.35rem,min(13cqw,23cqh),3.25rem);line-height:1.05}
.playing-surface .game-actions{grid-template-columns:1fr 1.2fr;flex-shrink:0;gap:10px}
.playing-surface .game-actions .button{min-height:66px;padding:10px 8px;gap:6px;flex-wrap:nowrap}
.playing-surface .pass-button{font-family:var(--display);font-weight:400;font-size:clamp(1.15rem,5vw,1.4rem)}
.playing-surface .guessed-button{font-size:clamp(1.35rem,5.6vw,1.6rem)}
.playing-surface .game-actions .icon{width:24px;height:24px;flex-shrink:0}
@container game (max-height:450px){.playing-surface .game-actions .button{min-height:56px;padding:8px 6px}.playing-surface .game-actions .icon{width:20px;height:20px}}
.home-rounds{grid-template-columns:repeat(3,minmax(0,1fr))}
.round-sticker{min-width:0;width:100%}
.handoff-heading{display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:8px;min-width:0}
.handoff-heading>div:last-child{min-width:0}
.handoff-surface .handoff-heading .round-symbol{display:grid;flex:0 0 auto;margin:5px;width:44px;height:44px}
.handoff-heading .eyebrow{margin-bottom:7px}
#advertising-slot{position:fixed;inset:auto 0 0;width:100%;height:var(--ad-reserve);margin:0;padding:4px 0 calc(8px + env(safe-area-inset-bottom,0px));box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:3px;background:var(--purple,#7042e8);border:0;z-index:40}
#advertising-slot .ad-label{font-size:10px;line-height:14px;color:#fff;opacity:.8}
#advertising-slot ins.adsbygoogle{width:320px;height:50px;flex:0 0 50px;max-width:none}
#privacy-status{position:fixed;top:72px;left:16px;right:16px;z-index:100;background:var(--ink);color:#fff;padding:12px;border-radius:12px;font-size:.875rem}
#privacy-status:empty{display:none}
.fullscreen-control{order:3}
@media(max-width:319px){#advertising-slot ins.adsbygoogle{display:none!important}}
/* Compact layouts respond to actual game space, after header and ad reservation. */
@container game (max-height:760px){
  .home-screen{justify-content:space-evenly;padding:2px 0}
  .home-screen .wordmark{width:min(100%,300px)}
  .home-rounds{width:220px;margin:8px auto}
  .home-instruction{font-size:.8rem;margin:4px 0}
  .home-footnote{display:none}
  .home-screen .quick-summary{font-size:.8rem;margin:8px 0}
  .home-screen .play-button{min-height:56px;padding:8px 14px}
  .home-screen .cards-button{min-height:46px;padding:8px 12px}
  .home-options{gap:4px}
  .options-button{min-height:36px;padding:4px 12px}
  .game-top,.scoreboard{margin-bottom:7px}
  .score-team{padding:6px 10px}
  .play-surface{padding:12px 14px}
  .round-symbol{width:44px;height:44px;margin-bottom:8px}
  .round-symbol .icon{width:24px;height:24px}
  .handoff-surface h1{font-size:1.9rem}
  .handoff-copy{font-size:.9rem;line-height:1.3;margin:8px 0}
  .rule-note{padding:8px;font-size:.9rem;margin:8px 0}
  .large-button{min-height:48px;margin-bottom:8px;padding:8px 12px}
  .timer-track{margin:8px 0}
  .live-meta{margin:7px 0}
  .game-actions .button{min-height:48px;padding:8px}
  .passing-note{display:none}
  .swipe-stage .word-card{padding:32px 12px 27px}
  .word-card h1{font-size:clamp(1.5rem,5.5vw,2.4rem)}
  .card-category{top:8px;left:10px}
  .card-instruction{bottom:6px;font-size:.7rem}
  .result-surface .eyebrow{margin-bottom:3px}
  .result-surface{display:grid;grid-template-columns:1fr 1fr;grid-template-areas:'eyebrow eyebrow' 'points team' 'copy copy' 'review review' 'continue continue' 'meta meta';gap:5px 8px;align-content:center;align-items:center}
  .result-surface>.eyebrow{grid-area:eyebrow}
  .result-surface>.points-earned{grid-area:points}
  .result-surface>h1{grid-area:team}
  .result-surface>.result-copy{grid-area:copy}
  .result-surface>.found-cards{grid-area:review}
  .result-surface>.large-button{grid-area:continue}
  .result-surface>.small-meta{grid-area:meta}
  .result-surface .found-cards summary>span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .result-surface .points-earned{font-size:2.6rem;margin:0}
  .result-surface .points-earned span{font-size:.875rem}
  .result-surface h1{font-size:1.6rem}
  .result-surface .result-copy{font-size:.85rem;line-height:1.3;margin:6px 0}
  .result-surface .found-cards{margin:3px 0;padding:3px 0}
  .result-surface .undo-hint{font-size:.7rem;line-height:1.2;margin:4px 0 0}
  .found-card-chip{padding:5px 8px;min-height:36px}
  .pause-surface>p{margin:8px 0}
  .pause-time{font-size:3rem;margin:12px 0}
  .final-surface .trophy-symbol{width:38px;height:38px;margin-bottom:2px}
  .final-surface .victory-title{font-size:1.8rem}
  .final-surface .winner-line strong{font-size:1.5rem}
  .final-surface .final-score{margin:8px 0}
  .final-surface .final-score>div{padding:6px}
  .final-surface .final-score>div>strong{font-size:2rem}
  .final-surface .round-table{margin-bottom:7px}
  .final-surface .round-table th,.final-surface .round-table td{padding:4px;line-height:1.2}
  .final-surface .large-button{min-height:46px;margin-bottom:4px}
  .final-surface>.small-meta{font-size:.75rem}
}
@container game (max-height:450px){
  .home-screen .wordmark{width:220px;max-width:100%}
  .game-tag{font-size:.65rem;margin-bottom:3px}
  .home-rounds{width:185px;margin:5px auto}
  .round-sticker{padding:7px 4px;gap:3px;border-radius:12px}
  .round-sticker>.icon{width:22px;height:22px}
  .round-sticker strong{font-size:.9rem}
  .home-instruction{display:none}
  .home-screen .play-button{min-height:46px;font-size:1.8rem}
  .home-screen .quick-summary{margin:5px 0}
  .home-screen .cards-button{min-height:42px;font-size:.9rem}
  .game-top{margin-bottom:4px}
  .scoreboard{margin-bottom:5px}
  .score-team{padding:4px 8px;font-size:.75rem;line-height:1.2;gap:6px}
  .score-team strong{font-size:1.35rem}
  .play-surface{padding:8px 10px}
  .handoff-surface .round-symbol,.pause-surface .round-symbol{display:none}
  .handoff-surface h1{font-size:1.5rem}
  .handoff-copy{margin:4px 0}
  .rule-note{margin:5px 0;padding:6px}
  .timer-row .icon-button{width:32px;height:32px}
  .timer{font-size:1.7rem}
  .timer-track{margin:5px 0}
  .live-meta{font-size:.7rem;margin:5px 0}
  .game-actions .button{min-height:42px}
  .card-instruction{display:none}
  .swipe-stage .word-card{padding:28px 9px 6px}
  .result-surface .points-earned{font-size:2.3rem}
  .result-surface{gap:3px 6px;grid-template-columns:82px minmax(0,1fr)}
  .result-surface .points-earned>span{display:inline;margin:0 0 0 4px;font-size:.75rem}
  .result-surface .result-copy{margin:3px 0;font-size:.75rem}
  .result-surface>.result-copy{display:block}
  .result-surface h1{font-size:1.125rem}
  .result-surface .found-cards{margin:4px 0;padding:3px 0}
  .found-cards summary{font-size:.75rem}
  .found-cards .undo-hint{font-size:.65rem;margin-top:3px}
  .found-card-chip{font-size:.75rem;min-height:32px}
  .large-button{min-height:42px;margin-bottom:4px;font-size:1.1rem}
  .final-surface .trophy-symbol{width:30px;height:30px}
  .final-surface .victory-title{font-size:1.5rem}
  .final-surface .winner-line strong{font-size:1.25rem}
  .final-surface .final-score{margin:4px 0}
  .final-surface .final-score>div{padding:3px}
  .final-surface .final-score>div>strong{font-size:1.75rem}
  .final-surface .round-table th,.final-surface .round-table td{padding:3px;font-size:.75rem}
  .final-surface>.small-meta{display:none}
  .final-surface>.text-button{min-height:30px}
  .pause-surface h1{font-size:1.6rem}
  .pause-surface .pause-time{font-size:2.4rem;margin:6px 0}
  .final-heading{display:grid;grid-template-columns:34px minmax(0,1fr);grid-template-areas:'trophy title' 'trophy winner';gap:3px 8px;justify-content:center}
  .final-heading .trophy-symbol{grid-area:trophy}
  .final-heading .victory-title{grid-area:title}
  .final-heading .winner-line{grid-area:winner}
  .final-surface .round-table table{table-layout:fixed;width:100%}
  .handoff-heading{gap:6px;margin-bottom:3px}
  .handoff-surface .handoff-heading .round-symbol{width:30px;height:30px;margin:3px}
  .handoff-heading .eyebrow{font-size:.65rem;margin-bottom:4px}
}
/* Short landscape: put information next to controls rather than clip it vertically. */
@media(orientation:landscape) and (max-height:540px){
  .site-shell{--header-height:42px;padding-inline:12px}
  .site-header .brand-slot{width:82px}
  .site-header .brand{display:block;width:82px}
  body[data-screen='home'] .site-header .brand{display:none}
  .site-header .audio-button{min-height:30px;min-width:32px;padding:4px}
  body[data-screen='handoff'] #app,body[data-screen='playing'] #app,body[data-screen='paused'] #app,body[data-screen='turn-end'] #app{grid-template-columns:1fr 1fr;grid-template-rows:32px minmax(0,1fr);gap:4px 16px}
  .game-top,.scoreboard{width:100%;margin:0;align-self:start;gap:8px}
  .round-track b{display:none}
  .score-team{font-size:.7rem;padding:3px 8px;gap:6px}
  .score-team strong{font-size:1.1rem}
  .play-surface{grid-column:1/-1;width:100%;padding:6px 10px;margin-bottom:4px}
  .home-screen{width:100%;display:grid;grid-template-columns:1fr 1fr;grid-template-areas:'brand controls' 'rounds controls';gap:8px 24px;align-content:center}
  .home-brand{grid-area:brand}
  .home-controls{grid-area:controls}
  .home-rounds{grid-area:rounds;width:190px}
  .home-screen .wordmark{width:235px;max-width:100%}
  .home-screen .game-tag{transform:none;line-height:1.2;font-size:.6rem}
  .home-instruction,.home-footnote{display:none}
  .playing-surface{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:36px minmax(0,1fr);grid-template-areas:'card timer' 'card actions';gap:5px 14px}
  .swipe-stage{grid-area:card;height:100%}
  .timer-row{grid-area:timer}
  .game-actions{grid-area:actions;align-self:end;margin-bottom:4px}
  .playing-surface .timer-track,.playing-surface .live-meta,.playing-surface .passing-note{display:none}
  .word-card h1{font-size:clamp(1.2rem,3vw,1.75rem)}
  .handoff-surface{display:grid;grid-template-columns:1fr 1fr;grid-template-areas:'title rule' 'copy meta' 'start start';gap:4px 16px;align-items:center}
  .handoff-surface>.round-symbol,.handoff-surface>.eyebrow,.handoff-surface>.handoff-copy{display:none}
  .handoff-surface h1{grid-area:title;font-size:1.4rem}
  .handoff-heading{grid-area:title;margin:0;gap:6px}
  .handoff-heading .eyebrow{font-size:.65rem;margin-bottom:3px}
  .handoff-surface .handoff-heading .round-symbol{width:28px;height:28px;margin:3px}
  .handoff-surface>.handoff-copy{display:block;grid-area:copy;font-size:.7rem;margin:0;line-height:1.2}
  .handoff-surface .rule-note{grid-area:rule;margin:0;font-size:.8rem}
  .handoff-surface .large-button{grid-area:start;margin:0;min-height:40px}
  .handoff-surface .small-meta{grid-area:meta}
  .pause-surface{display:grid;grid-template-columns:1fr 1fr;gap:3px 14px;align-content:center}
  .pause-surface .round-symbol,.pause-surface>p{display:none}
  .pause-surface h1{font-size:1.5rem}
  .pause-time{font-size:1.8rem;margin:0}
  .pause-time span{font-size:.7rem;margin-top:0}
  .pause-surface .large-button{margin:0;min-height:40px}
  .result-surface{display:grid;grid-template-columns:1fr 1.4fr;grid-template-rows:auto auto auto;gap:3px 14px;align-content:center;align-items:center}
  .result-surface>.eyebrow,.result-surface>.result-copy,.result-surface>.small-meta{display:none}
  .result-surface .points-earned{grid-area:1/1;font-size:1.8rem;line-height:1;margin:0}
  .result-surface .points-earned span{display:inline;margin-left:5px}
  .result-surface h1{grid-area:2/1;font-size:1.2rem}
  .result-surface .found-cards{grid-area:1/2/3/3;margin:0;min-width:0}
  .result-surface .large-button{grid-area:3/1/4/3;min-height:38px;margin:0}
  .result-surface .found-cards-row{padding:3px 0;margin-top:3px}
  .result-surface .undo-hint{display:none}
  .final-surface{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto auto auto;gap:4px 16px;align-content:center;align-items:center}
  .final-surface .final-heading{grid-area:1/1/3/2;gap:2px}
  .final-surface .trophy-symbol{width:28px;height:28px;margin:0}
  .final-surface .victory-title{font-size:1.3rem}
  .final-surface .winner-line strong{font-size:1.1rem}
  .final-surface .final-score{grid-area:1/2;margin:0}
  .final-surface .final-score>div{padding:2px 4px;gap:0}
  .final-surface .final-score>div>strong{font-size:1.4rem}
  .final-surface .final-score>div>span{font-size:.7rem}
  .final-surface .round-table{grid-area:2/2;margin:0}
  .final-surface .round-table th,.final-surface .round-table td{font-size:.65rem;padding:1px 3px}
  .final-surface .large-button{grid-area:3/1;min-height:38px;margin:0;font-size:1rem}
  .final-surface>.text-button{grid-area:3/2;min-height:32px;margin:0}
  .final-surface>.small-meta{display:none}
}
