/* In-flow footer: one 320 × 50 placement, no overlay or iframe cropping. */
:root{--ad-reserve:calc(66px + env(safe-area-inset-bottom,0px))}
html,body{height:100%;overflow:hidden}
body{height:100dvh;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) var(--ad-reserve);padding-bottom:0}
#app{min-height:0;min-width:0}
#advertising-slot{height:var(--ad-reserve);min-width:0;display:flex;justify-content:center;align-items:center;flex-direction:column;background:transparent;border:0;position:relative;z-index:90}
#ad-card{position:relative;width:320px;max-width:100%;height:50px;flex:0 0 50px;padding-top:0;box-sizing:border-box;background:transparent}
#casabianco-ad{background:transparent}
.ad-label{font:9px/12px var(--sans);letter-spacing:.08em;color:#e6d8b9;height:12px;flex:0 0 12px}
#advertising-slot{padding-bottom:env(safe-area-inset-bottom,0px);box-sizing:border-box}
#advertising-slot:not([data-ad-state="filled"]) .ad-label{visibility:hidden}
#casabianco-ad[hidden],#casabianco-ad[data-ad-status="unfilled"],#casabianco-ad[data-ad-status="unfill-optimized"]{display:none!important}
.home,.shell{height:100%;min-height:0;box-sizing:border-box;padding-bottom:0}
.home{overflow:visible;background:transparent}
.home-art{height:calc(100% + var(--ad-reserve))}
.home:before{bottom:calc(-1 * var(--ad-reserve))}
.home header,.shell header{flex-shrink:0}
.home-main{align-items:flex-start;min-height:0;overflow:auto;overscroll-behavior:contain}
.home-content{margin-block:auto}
.home footer{flex-shrink:0;justify-content:flex-end;padding-top:6px;padding-bottom:8px}
.shell .workbench{align-items:start;align-content:start;min-height:0;overflow:auto;overscroll-behavior:contain;margin:0 auto;padding-bottom:18px}
.shell .scene{min-height:0;max-height:none;align-self:stretch;margin-block:0}
@media(max-height:600px){.home-main{padding-block:12px}.home-content .intro{display:none}.home-content .deco{margin-block:5px}.home footer{display:none}}

/* Compact screens: the artwork and the fixed ad reserve keep their full height.
   Main actions never enter the scrolling region. No scale/zoom on touch controls. */
.shell .workbench{grid-template-rows:minmax(0,1fr);align-items:stretch;align-content:stretch;overflow:hidden;padding-block:8px}
.stage{display:flex;flex-direction:column;justify-content:center;min-height:0;height:100%}
.stage>.score{flex-shrink:0}
.stage>.panel{display:flex;flex-direction:column;flex:0 1 auto;min-height:0;max-height:100%}
.panel-content{min-height:0;overflow:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:3px;margin:-3px}
.panel>.actions{flex-shrink:0;margin-top:12px;gap:8px}
.panel>.actions .btn{min-height:46px;padding:10px 14px}
.finished-panel>.actions{grid-template-columns:1fr 1fr}
.finished-panel .roles{display:grid;grid-template-columns:1fr 1fr;gap:0 16px;margin-top:12px}
.finished-panel .roles>div{align-items:start;flex-direction:column;gap:1px;padding:6px 0}
.finished-panel details{margin:12px 0 0}
.result-panel .answer-word{padding:10px 0;margin:10px 0}
.result-panel .picks{margin:10px 0 4px;gap:7px}
.result-panel .picks>.pick{padding:7px;gap:2px 6px}
.setup-panel .stepper{margin-bottom:10px}
.setup-panel .options-button{margin-top:10px}
.setup-panel .setup-summary{margin:8px 0 0}
.setup-panel .names{gap:8px}
.pass .seal{width:56px;height:56px;margin:10px auto}
.panel .brief{margin-top:12px;padding-top:10px}
@media(min-width:801px){
 .shell .scene-copy{padding:24px}
 .shell .scene-copy h2{font-size:1.6rem;margin-block:8px}
}
@media(max-height:850px){
 .home header,.shell header{padding-block:calc(8px + env(safe-area-inset-top,0px)) 8px}
 .home-main{padding-block:10px}
 .home .title{font-size:clamp(3.5rem,10dvh,5.4rem);margin-top:12px}
 .home .intro,.home .deco{display:none}
 .home .tagline{font-size:1.4rem;margin-top:16px}
 .home-actions{margin-top:18px;gap:10px}
 .home-actions .btn{min-height:48px;padding:10px 16px}
 .home .meta{margin-top:14px;gap:12px}
 .home footer{padding-block:0}
 .panel,.setup-panel{padding:14px}
 .panel h1,.panel h1.role{font-size:1.65rem;margin:4px 0 8px}
 .panel h1.player-name{font-size:2rem;margin:6px 0 8px}
 .shell .score{margin-bottom:8px}
 .score strong{font-size:1.45rem}
 .private .category,.guess-panel .category{margin:6px 0}
 .private .secret-word+.category{margin:6px 0}
 .private .word,.guess-panel .word{margin:6px 0 8px;gap:4px}
 .private .secret-word{padding:6px 10px}
 .private .secret-word strong{font-size:1.35rem;margin-top:0}
 .private .alphabet,.guess-panel .alphabet{gap:4px}
 .answer-help{margin:0 0 8px;font-size:.8rem}
 .panel .muted{line-height:1.4}
 .decision-panel .suspects{margin-top:10px;gap:7px}
 .decision-panel .suspect{min-height:44px;padding:7px}
 .panel>.actions{margin-top:10px}
 .setup-panel input:not([type=radio]){min-height:44px;padding:8px 10px}
 .dialog-head,.dialog-body{padding:16px}
 .dialog .actions{margin-top:14px;gap:8px}
}
@media(max-height:720px){
 .home .eyebrow{margin-top:0}
 .home .title{font-size:clamp(3.25rem,9dvh,4.4rem)}
 .home .tagline{font-size:1.25rem;margin-top:12px}
 .home-actions{margin-top:14px;gap:8px}
 .shell .workbench{padding-block:4px}
 .shell .score{margin-bottom:6px;padding-inline:2px}
 .score>div:first-child,.score>div:last-child{display:flex;align-items:baseline;gap:5px}
 .score div>span{font-size:.65rem;letter-spacing:.03em}
 .score strong{font-size:1.2rem;white-space:nowrap}
 .score-round{font-size:.75rem;line-height:1.2}
 .score-round small{display:none}
 .panel,.setup-panel{padding:10px}
 .panel h1,.panel h1.role,.panel.guess-panel h1{font-size:1.5rem;margin:0 0 5px}
 .guess-panel .panel-content>.eyebrow,.guess-panel .answer-help{display:none}
 .private .category,.guess-panel .category{margin:3px 0}
 .private .word,.guess-panel .word{margin:4px 0 6px}
 .private .alphabet,.guess-panel .alphabet{gap:3px}
 .panel>.actions{margin-top:8px}
 .panel>.actions .btn{min-height:44px;padding:8px 12px}
 .pass .seal{width:44px;height:44px;margin:8px auto}
 .pass .seal .icon{width:24px;height:24px}
 .pass .muted{font-size:.875rem}
 .result-panel .answer-word{padding:6px 0;margin:6px 0}
 .result-panel .picks>.pick{padding:5px 6px}
 .result-panel .picks{gap:5px}
 .setup-panel .stepper{margin-bottom:6px}
 .setup-panel .options-button{margin-top:8px;padding:8px 12px}
 .setup-panel .setup-summary{font-size:.8rem;line-height:1.35}
}
/* Landscape uses the width for the keyboard, instead of shrinking its keys. */
@media(orientation:landscape) and (max-height:600px) and (min-width:650px){
 .shell .scene{display:none}
 .shell .workbench{grid-template-columns:minmax(0,1fr);max-width:1000px;padding-inline:12px}
 .home-content{display:grid;grid-template-columns:1fr 1fr;gap:8px 28px;width:100%;max-width:none}
 .home .title{grid-column:1;grid-row:1/3;margin:0;font-size:clamp(2.5rem,12dvh,4rem)}
 .home .eyebrow,.home .tagline{display:none}
 .home-actions{grid-column:2;grid-row:1/3;align-self:center;margin:0;max-width:none}
 .home .meta{grid-column:1/-1;justify-content:center;margin:0}
 .home-main{padding:8px 24px}
 .private .panel-content,.guess-panel .panel-content{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr);column-gap:16px;align-content:start;align-items:start}
 .private .panel-content>*:not(.alphabet),.guess-panel .panel-content>*:not(.alphabet){grid-column:1}
 .private .alphabet,.guess-panel .alphabet{grid-column:2;grid-row:1/7;grid-template-columns:repeat(10,minmax(0,1fr));align-self:center}
 .private .word,.guess-panel .word{gap:3px}
 .private .private-head .eyebrow{letter-spacing:.03em}
 .result-panel .picks,.decision-panel .suspects,.finished-panel .roles{grid-template-columns:repeat(3,minmax(0,1fr))}
 .setup-panel .names{grid-template-columns:repeat(3,minmax(0,1fr))}
}


/* Difficulty note stays within the existing category block. */
.vowel-rule{display:block;font-size:.75rem;line-height:1.3;font-weight:400;color:#526a5e;margin-top:3px}
.duplicate-toggle input[type="checkbox"]{min-height:21px;padding:0}
.vowel-toggle{margin-top:12px}

/* Timer uses the existing title row; no ticking animation or panel redraw. */
.guess-heading{display:flex;align-items:center;justify-content:space-between;gap:10px}
.guess-heading h1{min-width:0;flex:1}
.guess-clock{flex-shrink:0;font:700 1.15rem/1.2 var(--sans);font-variant-numeric:tabular-nums;color:#254f41;border:1px solid #557760;border-radius:6px;padding:6px 8px;background:#f8eedb;white-space:nowrap}
.guess-clock.urgent{color:#9f3028;border-color:#9f3028;background:#f9e0d4}

.home footer{gap:6px 18px;flex-wrap:wrap;align-items:center}
.home footer .text-btn{font-size:.7rem;line-height:1.3}
@media(max-height:600px){.home footer{display:flex;padding:0 12px;font-size:.7rem;min-height:28px}}
