*{box-sizing:border-box}body{margin:0;background:#edf3fc;color:#0a1d43;font-family:system-ui,-apple-system,Segoe UI,sans-serif}button,input,textarea{font:inherit}button{border:0;border-radius:12px;background:#1254a5;color:white;padding:12px 20px;font-weight:750;cursor:pointer;min-height:44px}button:disabled{opacity:.5;cursor:not-allowed}[hidden]{display:none!important}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #ff9800;outline-offset:3px}a{color:#165ea6}.primary{background:#078355}.orange{background:#e86521}.secondary{background:#fff;color:#164f94;border:1px solid #9ebde4}.quiet{background:transparent;border:1px solid #819ac3}.small,small{font-size:13px;color:#536780}.site-footer{background:#05244d;color:white;padding:16px 3vw;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.site-footer strong{font-size:22px;white-space:nowrap}.site-footer strong span{color:#ff741c}.site-footer em{color:#1385ff;font-style:normal}.site-footer nav{display:flex;flex-wrap:wrap;justify-content:center;gap:8px 16px}.site-footer a{color:#fff;font-size:13px}.site-footer .recommend{color:#ffbe61;font-weight:800}.site-footer small{width:100%;text-align:center;color:#cde2fa}.shell{max-width:1100px;margin:24px auto;padding:0 20px;min-height:calc(100svh - 210px)}.panel{background:white;border-radius:20px;padding:28px;box-shadow:0 8px 28px #183f7911;margin-bottom:20px}.panel h1,.panel h2{margin-top:0}.panel p{line-height:1.5}.actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px}.actions button{flex:1}.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin:35px 0}.mode-grid button{font-size:25px;min-height:100px}#siteHeader{min-height:72px;background:#071b49;color:#fff;display:flex;align-items:center;gap:16px;padding:10px 3vw}#siteHeader .brand{padding:0;background:none;font-size:clamp(16px,1.9vw,26px);white-space:nowrap}.brand span{color:#ff3d49}.brand em{color:#33b8ff;font-style:normal}#headerStatus{flex:1;display:flex;align-items:center;justify-content:space-between;gap:10px}#headerStatus small{display:block;color:#bed7f3}.timer{font-size:27px;font-weight:850;font-variant-numeric:tabular-nums}.timer.urgent{color:#ffb957}#backBtn{white-space:nowrap}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.field{display:flex;flex-direction:column;gap:8px;font-weight:650;margin-bottom:16px}input,textarea{border:1px solid #aabbd3;border-radius:10px;padding:13px;background:#fff;color:#10274c;min-width:0}textarea{resize:vertical}.segment-field{border:0;padding:0;margin:20px 0}.segment-field legend{font-weight:800;margin-bottom:9px}.segments{display:flex;background:#dfe9f6;padding:4px;border-radius:30px;gap:4px;max-width:700px}.segments button{flex:1;background:transparent;color:#274467;border-radius:25px;padding:10px 13px}.segments button[aria-pressed=true]{background:#078355;color:#fff;box-shadow:0 3px 10px #08335633}.categories{border:1px solid #9ebde4;border-radius:14px;padding:16px}.categories legend{font-weight:800}.category-list{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}.category-list label{display:flex;gap:10px;align-items:center}.category-list input{width:22px;height:22px;accent-color:#078355}.category-list small{margin-left:auto}.players{list-style:none;padding:0}.players li{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dbe5f0;padding:12px}.join-code{text-align:center;font-size:42px;letter-spacing:6px;font-weight:850}.leaderboard{border-collapse:collapse;width:100%;margin:20px 0}.leaderboard th,.leaderboard td{padding:12px;border-bottom:1px solid #dbe5f0;text-align:left}.leaderboard th{background:#eaf2ff}.review-item{border:1px solid #c6d9ef;border-radius:12px;padding:16px;margin:12px 0}.review-item summary{font-weight:750;cursor:pointer}.review-item summary span{float:right;color:#667c96}.review-item li{padding:7px 0;line-height:1.4}.score-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.score-grid>div{background:#edf4ff;border-radius:12px;padding:18px}.score-grid>div+div{background:#f3edfc}.big-score{display:block;font-size:44px;margin-top:10px}.round-tabs{display:flex;gap:10px}.trap{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}.feedback-panel{max-width:900px;margin:auto}.recommend-copy{font-weight:650;color:#164f94}dialog{border:0;border-radius:20px;padding:26px;color:#10274c;width:min(720px,94vw);max-height:88svh;overflow:auto}dialog::backdrop{background:#071b49bb}.dialog-nav{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}dialog p{line-height:1.5}#toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#071b49;color:#fff;padding:14px 20px;border-radius:12px;max-width:90vw;z-index:10}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
/* The supplied artwork is retained. Live text and controls cover the corrected UI regions. */
body.home-page{background:#e6f6ff}body.home-page #app{min-height:100svh;display:flex;align-items:center;justify-content:center}.home-art{width:100%;position:relative;margin:auto}.home-art picture,.home-art img{display:block;width:100%;height:auto}.hotspot{position:absolute;background:transparent;border:0;padding:0;color:transparent;min-height:0;min-width:0;font-size:0;z-index:2;border-radius:9px}.hotspot:focus-visible{outline-offset:-4px;outline-width:4px}.home-art #artPlay{left:14.3%;top:31%;width:19%;height:7%}.home-art #artPractice{left:33.8%;top:31%;width:15%;height:7%}.home-art #artHelp{left:74.4%;top:2.2%;width:11.6%;height:6%}.home-art #artLogin{left:86.7%;top:2.1%;width:7.9%;height:6.1%;background:#05244d;color:white;font-size:clamp(12px,1.6vw,27px);border:2px solid #12c9ed;border-radius:99px}.home-art #solo{left:19.3%;top:85.8%;width:20.4%;height:7.3%}.home-art #create{left:40.2%;top:85.8%;width:20.1%;height:7.3%}.home-art #join{left:60.8%;top:85.8%;width:20%;height:7.3%}.home-art #sceneBullying{left:1.6%;top:39.4%;width:32.2%;height:22.4%}.home-art #sceneCustody{left:34.7%;top:39.4%;width:27.8%;height:22.4%}.home-art #sceneStreet{left:1.6%;top:62.3%;width:32.2%;height:22.6%}.home-art #sceneSpouse{left:34.7%;top:62.3%;width:27.8%;height:22.6%}.home-art #sceneCrash{left:63.4%;top:62.3%;width:35.5%;height:22.6%}.home-caption{position:absolute;background:#fff;color:#071b31;font-weight:850;line-height:1.05;display:flex;align-items:center;overflow:hidden;padding:0 .9%;pointer-events:none;font-size:clamp(12px,1.85vw,31px);height:4%;z-index:1}.bullying-caption{left:1.8%;top:57.6%;width:28.3%}.custody-caption{left:34.9%;top:57.6%;width:24.1%;font-size:clamp(10px,1.54vw,26px)}.crash-caption{left:63.6%;top:80.8%;width:31.7%}.home-pole-caption{position:absolute;left:69.7%;top:55.5%;height:5.2%;width:28%;background:#79d5f5;color:#132cb8;font-size:clamp(9px,1.35vw,23px);font-weight:750;display:flex;align-items:center;pointer-events:none}.home-footer{position:absolute;top:93.7%;left:0;width:100%;min-height:6.3%;background:#05244d;z-index:3}.home-footer .site-footer{padding:.5% 2.5%;gap:4px 10px}.home-footer .site-footer strong{font-size:clamp(16px,2vw,31px)}.home-footer .site-footer nav{gap:6px 13px}.home-footer .site-footer a{font-size:clamp(10px,.95vw,15px)}.home-footer small{display:none}@media(orientation:landscape){.home-art{width:min(100%,calc(100svh * 1672 / 941))}}
@media(orientation:portrait){body.home-page #app{display:block}.home-art #artPlay{left:10.8%;top:18.5%;width:36.8%;height:4%}.home-art #artPractice{left:11.5%;top:22.9%;width:35.4%;height:4%}.home-art #artHelp{left:66.5%;top:1.6%;width:18%;height:3.2%}.home-art #artLogin{left:84.8%;top:1.5%;width:13.8%;height:3.3%;font-size:clamp(12px,3vw,27px)}.home-art #solo{left:2%;top:89.9%;width:31.7%;height:4.6%}.home-art #create{left:34.8%;top:89.9%;width:30.6%;height:4.6%}.home-art #join{left:66.4%;top:89.9%;width:31.6%;height:4.6%}.home-art #sceneBullying{left:2%;top:27.6%;width:47.2%;height:14.6%}.home-art #sceneCustody{left:50.8%;top:27.6%;width:47.2%;height:14.6%}.home-art #sceneStreet{left:2%;top:42.6%;width:47.2%;height:15.1%}.home-art #sceneSpouse{left:50.8%;top:42.6%;width:47.2%;height:15.1%}.home-art #sceneCrash{left:2%;top:58.2%;width:96%;height:17.1%}.home-caption{height:2.7%;font-size:clamp(11px,3.6vw,35px)}.bullying-caption{left:2.3%;top:39.5%;width:40.2%}.custody-caption{left:51.2%;top:39.5%;width:41%;font-size:clamp(9px,2.8vw,29px)}.crash-caption{left:2.3%;top:72.5%;width:87.5%}.home-pole-caption{left:18.5%;top:85.8%;height:3%;width:77%;font-size:clamp(11px,3.15vw,31px)}.home-footer{top:95.1%;min-height:5%;position:absolute}.home-footer .site-footer{flex-direction:column;align-items:center;padding:8px 10px}.home-footer .site-footer strong{font-size:clamp(17px,4.2vw,31px)}.home-footer .site-footer nav{gap:5px 12px}.home-footer .site-footer a{font-size:clamp(11px,2.5vw,15px)}}
/* Gameplay keeps one centered panel and merges the round status into the brand bar. */
body.gameplay #app{height:calc(100svh - 72px);padding:16px 3vw;display:flex;align-items:stretch;justify-content:center}.play-panel{width:100%;max-width:1440px;background:white;border-radius:20px;box-shadow:0 7px 28px #183f7915;min-height:0;padding:18px}.game-grid{display:grid;grid-template-columns:1.05fr 1fr;gap:24px;height:100%;min-height:0}.situation-panel{display:flex;flex-direction:column;min-height:0}.scene{width:100%;max-height:40%;object-fit:contain;aspect-ratio:16/9;background:#e2edf9;border-radius:13px;display:block}.sprite{background-repeat:no-repeat;flex:none;height:min(26svh,230px);max-height:40%}.situation-copy{padding:14px 4px 0}.question-meta{font-size:12px;font-weight:750;color:#466184}.situation-copy h1{font-size:clamp(20px,1.7vw,28px);margin:8px 0 10px;line-height:1.12}.situation-copy p{font-size:clamp(13px,1.03vw,17px);line-height:1.4;margin:9px 0}.context{background:#edf4ff;border-left:3px solid #2494e9;border-radius:7px;padding:10px;font-size:.9em}.read-button{font-size:12px;padding:7px 12px;min-height:32px}.answer-panel{display:flex;flex-direction:column;min-height:0}.answer-panel h2{margin:0 0 12px;font-size:22px}.choices{border:0;margin:0;padding:0;display:grid;grid-template-rows:repeat(5,1fr);gap:9px;flex:1;min-height:0}.choice{display:flex;gap:10px;align-items:center;text-align:left;background:#f4f8fe;border:2px solid #c6d9f0;border-radius:12px;color:#10274c;font-size:clamp(13px,1.05vw,17px);line-height:1.3;padding:10px 14px;min-height:0;font-weight:500}.choice.selected{border-color:#0876d8;background:#d9efff;box-shadow:inset 5px 0 #0876d8}.choice .letter{font-weight:850}.choice:disabled{opacity:1;cursor:default}.choice.eliminated{opacity:.45;background:#eef1f6;text-decoration:line-through}.answer-state{font-size:12px;line-height:1.25;margin-top:7px}.submit-actions{margin-top:8px}.submit-actions button{min-height:39px;padding:8px 15px}.lifelines{margin-top:10px;padding-top:8px;border-top:1px solid #d5e2f2}.lifelines strong{font-size:13px}.lifelines small{margin-left:9px;font-size:11px}.lifeline-buttons{display:flex;gap:7px;margin-top:7px}.lifeline-buttons button{flex:1;font-size:12px;padding:7px 5px;min-height:34px}.lifelines p{font-size:12px;margin:8px 0}
@media(max-width:900px){#siteHeader{gap:10px;padding:8px 12px}#siteHeader .brand{font-size:17px}#headerStatus{font-size:12px}.quiet{padding:8px 10px;font-size:12px;min-height:36px}.game-grid{gap:16px}.play-panel{padding:14px}.situation-copy p{font-size:13px}.choice{font-size:13px;padding:8px}.lifeline-buttons button{font-size:11px}.lifelines small{display:block;margin-left:0}.category-list{grid-template-columns:1fr}}
@media(max-width:600px){#siteHeader{min-height:58px;flex-wrap:wrap}.gameplay #siteHeader{height:68px;flex-wrap:nowrap}.gameplay #siteHeader .brand{font-size:13px;max-width:38%;white-space:normal}.gameplay #helpBtn{display:none}#headerStatus{font-size:10px}.timer{font-size:20px}.shell{margin:14px auto;padding:0 12px}.panel{padding:20px;border-radius:15px}.formgrid{grid-template-columns:1fr;gap:0}.segments button{padding:9px 7px;font-size:12px}.mode-grid{gap:12px}.mode-grid button{font-size:19px}.site-footer nav{gap:10px}.site-footer strong{font-size:21px}.leaderboard th,.leaderboard td{padding:9px 5px;font-size:11px}.score-grid{gap:8px}.score-grid>div{padding:12px}.review-item{padding:12px}.review-item summary{font-size:13px}.review-item summary span{float:none;margin-left:6px}body.gameplay #app{height:calc(100svh - 68px);padding:6px}.play-panel{padding:10px;border-radius:12px}.game-grid{display:flex;flex-direction:column;gap:9px}.situation-panel{flex:none;display:grid;grid-template-columns:90px 1fr;gap:9px}.scene,.sprite{width:90px;max-height:90px;height:90px;aspect-ratio:1;object-fit:cover}.situation-copy{padding:0}.situation-copy h1{font-size:15px;margin:4px 0}.question-meta{font-size:10px}.situation-copy p{font-size:11.5px;line-height:1.28;margin:5px 0}.situation-copy .context{padding:6px}.read-button{font-size:10px;padding:4px 8px;min-height:25px}.answer-panel{flex:1;min-height:0}.answer-panel h2{font-size:16px;margin:0 0 6px}.choices{gap:5px}.choice{font-size:11.5px;line-height:1.2;padding:5px 8px;border-radius:8px;gap:6px}.answer-state{font-size:10px;margin-top:4px}.submit-actions{margin-top:5px}.submit-actions button{min-height:30px;padding:5px 12px;font-size:12px}.lifelines{margin-top:5px;padding-top:5px}.lifelines strong{font-size:11px}.lifelines small{display:inline;margin-left:6px;font-size:9px}.lifeline-buttons{gap:5px;margin-top:4px}.lifeline-buttons button{font-size:10px;min-height:28px;padding:4px}.big-score{font-size:32px}}
@media(max-height:680px) and (min-width:601px){#siteHeader{min-height:58px}body.gameplay #app{height:calc(100svh - 58px);padding:7px 2vw}.play-panel{padding:12px}.scene{max-height:28%}.situation-copy{padding-top:7px}.situation-copy h1{font-size:19px;margin:5px 0}.situation-copy p{font-size:11.5px;line-height:1.25;margin:6px 0}.context{padding:7px}.answer-panel h2{font-size:18px;margin-bottom:7px}.choice{font-size:11.5px;padding:5px 8px}.choices{gap:5px}.lifelines{margin-top:5px;padding-top:5px}.lifeline-buttons button{font-size:10px;min-height:28px;padding:4px}.lifeline-buttons{margin-top:4px}.submit-actions button{min-height:30px;font-size:12px;padding:5px}.timer{font-size:22px}}
/* Preserve legibility at unusually short heights or large text/zoom. */
@media(max-height:530px){body.gameplay #app{height:auto;min-height:calc(100svh - 58px)}.game-grid{min-height:430px}}
@media(prefers-reduced-motion:no-preference){button{transition:background .12s,border-color .12s}}

.scene-number{position:absolute;z-index:1;background:#05244dee;color:#fff;padding:3px 7px;border-radius:6px;font-size:clamp(9px,1vw,15px);font-weight:750;pointer-events:none}.num-bullying{left:29.1%;top:40.1%}.num-custody{left:57.7%;top:40.1%}.num-street{left:29.1%;top:63%}.num-spouse{left:57.7%;top:63%}.num-crash{left:94.2%;top:63%}@media(orientation:portrait){.scene-number{font-size:clamp(9px,2.5vw,16px);padding:2px 5px}.num-bullying{left:42%;top:28.3%}.num-custody{left:90.8%;top:28.3%}.num-street{left:42%;top:43.3%}.num-spouse{left:90.8%;top:43.3%}.num-crash{left:90.8%;top:59%}}
/* Keep revised captions on one line and leave the speech bubble unobstructed. */
.home-caption{white-space:nowrap}.custody-caption{font-size:clamp(10px,1.3vw,22px)}
.num-bullying{left:2.2%;top:54.1%}.num-custody{left:35.3%;top:54.1%}.num-street{left:2.2%;top:76.8%}.num-spouse{left:35.3%;top:76.8%}.num-crash{left:64.1%;top:76.8%}
@media(orientation:portrait){.home-caption{font-size:clamp(10px,2.75vw,30px)}.custody-caption{font-size:clamp(9px,2.3vw,25px)}.crash-caption{font-size:clamp(11px,3.6vw,35px)}.num-bullying{left:3%;top:36.5%}.num-custody{left:52%;top:36.5%}.num-street{left:3%;top:51.8%}.num-spouse{left:52%;top:51.8%}.num-crash{left:3%;top:68.6%}}
@media(max-width:600px){.sprite{height:auto;align-self:start}.gameplay #siteHeader .brand{font-size:10px;max-width:none;width:135px;flex:0 0 135px;white-space:nowrap}#headerStatus{min-width:0}.gameplay #siteHeader{gap:10px}.gameplay #headerStatus>div{min-width:0}}
.custody-caption{font-size:clamp(9px,1.15vw,21px)}
@media(orientation:portrait){.custody-caption{font-size:clamp(8px,2.1vw,23px)}}
@media(min-width:601px) and (max-width:1100px){.choice{font-size:12px;padding:7px 10px}}
.home-footer .site-footer small{display:block;font-size:10px;line-height:1.2;color:#cde2fa}
/* October 16: one attached frame, consistent captions, compact controls. */
html,body{max-width:100%;overflow-x:hidden}#siteFrame{width:min(1100px,calc(100% - 24px));margin:12px auto;border:1px solid #a4cadc;border-radius:18px;overflow:hidden;box-shadow:0 8px 30px #153f7614;background:#fff}#siteHeader{position:relative;min-height:58px;padding:9px 20px;gap:12px}#siteHeader .brand{font-size:21px}#pageTitle{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;font-size:24px;color:white;white-space:nowrap}#app>.shell{min-height:0;width:100%;padding:0;margin:0;max-width:none}#app>.shell>.panel{box-shadow:none;margin:0;border-radius:0;padding:24px}.site-footer{padding:10px 20px;gap:5px 12px}.site-footer strong{font-size:21px}.site-footer nav{gap:5px 12px}.site-footer small{font-size:10px}.site-footer a{font-size:12px}.field{margin-bottom:0}.ui-icon{width:24px;height:24px;flex-shrink:0;vertical-align:middle}
body[data-view=setup] #app>.shell>.panel{padding:18px 24px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 22px}body[data-view=setup] .setup-panel>h1{display:none}.setup-panel>.formgrid{grid-column:1/-1;gap:18px}.setup-panel>.formgrid .field{max-width:100%}.setup-panel>.formgrid:has(.field:only-child){grid-template-columns:1fr 1fr}.setup-panel .segment-field{padding:0;margin:0}.setup-panel .segment-field legend{font-size:13px;margin-bottom:6px}.setup-panel .segments{max-width:none}.setup-panel .segments button{font-size:12px;min-height:35px;padding:7px 9px}.setup-panel .mic-option{grid-column:1/-1;justify-self:end}.mic-option button{min-height:30px;padding:5px 12px;font-size:12px}.setup-panel .categories{grid-column:1/-1;position:relative;padding:12px 14px}.setup-panel .categories legend{font-size:13px}.setup-panel #selectAll{position:absolute;right:12px;top:-23px;min-height:27px;font-size:11px;padding:4px 10px}.setup-panel .category-list{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:3px;gap:8px 12px}.setup-panel .category-list label{font-size:12px;gap:6px;line-height:1.2}.setup-panel .category-list input{width:17px;height:17px;margin:0}.setup-panel .category-list small{font-size:10px;white-space:nowrap}.setup-panel #poolCount{font-size:11px;margin:9px 0 0}.setup-panel>p,.setup-panel>.actions{grid-column:1/-1;margin:0}.setup-panel>p{font-size:11px}.setup-panel>.actions button{min-height:36px;padding:8px}.setup-panel input{padding:9px 11px}.setup-panel .field{gap:5px;font-size:13px}
body.home-page #siteFrame{width:100%;max-width:none;margin:0;border:0;border-radius:0;box-shadow:none;background:#e6f6ff}body.home-page #app{height:100svh;min-height:0;display:flex;align-items:center;justify-content:center;overflow:hidden}.home-art{container-type:inline-size;border:1px solid #91c6dd;box-sizing:border-box;flex:none}.home-art picture{display:block}.home-art picture img{width:100%;height:auto}.home-art .home-caption{font-family:Arial,Helvetica,sans-serif;white-space:nowrap;display:flex;align-items:center;font-weight:800;font-size:clamp(9px,1.21cqw,23px);line-height:1;letter-spacing:-.025em;height:4.1%;padding:0 .8%;margin:0;border-radius:0;background:#fff}.home-art .bullying-caption{left:1.8%;top:57.6%;width:28.3%}.home-art .custody-caption{left:34.9%;top:57.6%;width:24.1%}.home-art .street-caption{left:1.8%;top:80.8%;width:28.3%}.home-art .spouse-caption{left:34.9%;top:80.8%;width:24.1%}.home-art .crash-caption{left:63.6%;top:80.8%;width:31.7%}.home-art .home-spouse-art{position:absolute;left:34.8%;top:62.3%;width:27.7%;height:18.5%;object-fit:cover;display:block;border-radius:10px 10px 0 0}.home-art .home-pole-caption{font-family:'Arial Narrow',Arial,sans-serif;font-size:clamp(9px,1.2cqw,22px);font-weight:500;white-space:nowrap;color:#132cb8;line-height:1;letter-spacing:-.03em;text-shadow:1px 1px #fff;left:69.7%;top:55.8%;height:4.6%;width:28%;overflow:hidden}.home-art .home-footer{top:auto;bottom:0;height:6.3%;min-height:0}.home-art .home-footer .site-footer{height:100%;padding:.25% 2%;gap:2px 8px;align-content:center}.home-art .home-footer .site-footer strong{font-size:clamp(11px,1.9cqw,29px)}.home-art .home-footer .site-footer nav{gap:4px 10px}.home-art .home-footer .site-footer a{font-size:clamp(7px,.93cqw,15px)}.home-art .home-footer small{font-size:clamp(7px,.7cqw,11px);line-height:1;display:block}
@media(orientation:landscape){.home-art{width:min(calc(100vw - 8px),calc((100svh - 8px)*1672/941))}}
@media(orientation:portrait){.home-art{width:min(calc(100vw - 8px),calc((100svh - 8px)*941/1672))}.home-art .home-caption{height:2.7%;font-size:clamp(8px,2.12cqw,23px);letter-spacing:-.035em;padding:0 .6%}.home-art .bullying-caption{left:2.3%;top:39.5%;width:40.2%}.home-art .custody-caption{left:51.2%;top:39.5%;width:41%}.home-art .street-caption{left:2.3%;top:55.1%;width:40.2%}.home-art .spouse-caption{left:51.2%;top:55.1%;width:41%}.home-art .crash-caption{left:2.3%;top:72.5%;width:87.5%}.home-art .home-spouse-art{left:50.8%;top:42.6%;width:47.2%;height:12.5%;border-radius:9px 9px 0 0}.home-art .home-pole-caption{left:18.5%;top:85.9%;height:2.7%;width:77%;font-size:clamp(9px,3.1cqw,30px)}.home-art .home-footer{height:5%;bottom:0}.home-art .home-footer .site-footer{padding:.4% 1%;flex-direction:row;gap:2px 6px;justify-content:center;align-content:center}.home-art .home-footer .site-footer strong{font-size:clamp(10px,2.25cqw,23px)}.home-art .home-footer .site-footer nav{gap:2px 7px}.home-art .home-footer .site-footer a{font-size:clamp(6px,1.7cqw,14px)}.home-art .home-footer small{font-size:clamp(6px,1.5cqw,12px)}}
body.gameplay #siteFrame{width:min(1440px,calc(100% - 16px));height:calc(100svh - 16px);margin:8px auto;display:flex;flex-direction:column;border-radius:15px}body.gameplay #siteHeader{flex:none;min-height:56px;height:56px}body.gameplay #app{height:auto;min-height:0;flex:1;display:flex;padding:12px;overflow:hidden}.play-panel{border-radius:12px;box-shadow:none;border:1px solid #d8e6f3;padding:15px;min-height:0;max-width:none}.game-grid{height:100%;min-height:0;gap:22px}.situation-panel,.answer-panel{min-width:0}.situation-copy p{font-size:clamp(12px,1.05vw,16px);line-height:1.35}.situation-copy h1{font-size:clamp(18px,1.8vw,26px)}.scene{max-height:37%;object-fit:contain}.sprite{height:min(25svh,225px);max-height:37%}.situation-actions{display:flex;gap:8px;margin-top:8px}.situation-actions button{min-height:32px;font-size:12px;padding:6px 11px}.audio-disclosure{font-size:10px!important;color:#5d718b;margin:5px 0!important}.choices{flex:0 1 auto;grid-template-rows:none;grid-auto-rows:auto;gap:7px}.choice{min-height:47px;font-size:clamp(12px,1vw,16px);padding:9px 12px;line-height:1.25;flex:none}.answer-panel h2{font-size:21px;margin-bottom:10px}.answer-state{font-size:11px}.submit-actions{margin-top:8px}.lifelines{background:linear-gradient(135deg,#063d57,#0e5b78);border:1px solid #4aa0b8;color:#fff;border-radius:16px;padding:12px;margin-top:14px;box-shadow:0 5px 16px #063d5719}.lifeline-title{display:flex;align-items:center;gap:8px}.lifeline-title>.ui-icon{color:#ffc96a;width:27px;height:27px}.lifeline-title strong{font-size:18px}.lifeline-title>span{margin-left:auto;background:#ffffff20;border-radius:20px;padding:4px 10px;font-size:11px}.lifelines>small{display:block;color:#ffdc9f;font-size:12px;margin:7px 0 9px}.lifeline-buttons{gap:8px}.lifeline-buttons button{background:#fff7e7;border-color:#d9bd85;color:#123957;border-radius:12px;display:flex;align-items:center;justify-content:center;gap:6px;font-size:12px;min-height:47px;padding:7px}.lifeline-buttons .ui-icon{width:22px;height:22px;color:#c57b12}.lifeline-buttons button:disabled{opacity:.42}.lifelines p{margin:0;color:#fff}.lifeline-buttons button span{line-height:1.2}.comment-button{border-color:#0d6f8f;color:#075775}.answer-panel .timer{flex:none}#commentDialog{width:min(680px,94vw)}#commentDialog textarea{width:100%}#micDialog{width:min(650px,94vw)}#micDialog meter{display:block;width:100%;height:28px}#micPlayback{width:100%;margin-top:12px}
@media(max-width:1050px){#siteHeader .brand{font-size:16px}#pageTitle{font-size:21px}body[data-view=setup] #app>.shell>.panel{padding:16px 20px;gap:10px 14px}.setup-panel .category-list{grid-template-columns:1fr 1fr}.setup-panel .category-list label{font-size:11px}.game-grid{gap:15px}.choice{font-size:12px;min-height:39px;padding:7px 9px}.lifelines{padding:10px}.lifeline-buttons button{font-size:10.5px;padding:6px;gap:4px}.lifeline-title strong{font-size:16px}.lifeline-buttons .ui-icon{width:18px;height:18px}}
@media(max-width:600px){#siteFrame{width:calc(100% - 12px);margin:6px auto;border-radius:12px}#siteHeader{height:54px;min-height:54px;padding:7px 10px;gap:7px;flex-wrap:nowrap}#siteHeader .brand{font-size:12px;white-space:nowrap}#siteHeader #helpBtn{font-size:10px;padding:5px 7px;min-height:30px;margin-left:auto}#siteHeader #backBtn{font-size:10px;padding:5px 7px;min-height:30px}body[data-view=setup] #siteHeader .brand{display:none}body[data-view=setup] #helpBtn{margin-left:auto}#pageTitle{font-size:19px}#app>.shell>.panel{padding:16px}.site-footer{padding:8px 10px;justify-content:center;gap:4px}.site-footer strong{font-size:17px}.site-footer nav{gap:4px 8px}.site-footer a{font-size:10px}.site-footer small{font-size:9px}body[data-view=setup] #app>.shell>.panel{padding:13px;gap:9px 10px}.setup-panel .segment-field:has(#difficulty){grid-column:1/-1}.setup-panel .segment-field legend{font-size:11px;margin-bottom:5px;min-height:13px}.setup-panel .segments{padding:3px;gap:1px}.setup-panel .segments button{font-size:10px;min-height:29px;padding:5px 3px}.setup-panel .mic-option{grid-column:2;align-self:end;justify-self:stretch}.mic-option button{width:100%;min-height:35px;font-size:11px}.setup-panel .category-list{grid-template-columns:1fr 1fr;gap:9px}.setup-panel .category-list small{display:none}.setup-panel .category-list label{font-size:10.5px;gap:5px}.setup-panel .category-list input{width:16px;height:16px;flex-shrink:0}.setup-panel .categories{padding:9px}.setup-panel #poolCount{font-size:9px;line-height:1.25;margin-top:8px}.setup-panel>.formgrid:has(.field:only-child){grid-template-columns:1fr}.setup-panel .field{font-size:12px}.setup-panel .field input{padding:8px}.setup-panel>p{font-size:9px;line-height:1.3}.setup-panel>.actions button{min-height:32px;font-size:12px}.setup-panel #selectAll{min-height:24px;padding:3px 8px;font-size:10px;top:-21px}.setup-panel .categories legend{font-size:11px}body.gameplay #siteFrame{width:calc(100% - 8px);height:calc(100svh - 8px);margin:4px auto}body.gameplay #siteHeader{height:52px;min-height:52px}body.gameplay #app{padding:5px}body.gameplay #siteHeader .brand{font-size:9px;flex:0 0 121px;width:121px;max-width:none}.gameplay #headerStatus{font-size:9px;gap:5px}.gameplay #headerStatus small{font-size:9px}.gameplay .timer{font-size:21px}.play-panel{padding:9px}.game-grid{gap:7px}.situation-copy h1{font-size:15px;margin:4px 0}.situation-copy p{font-size:11.5px;line-height:1.25;margin:5px 0}.situation-copy .context{padding:6px}.situation-actions{gap:5px;margin-top:5px}.situation-actions button{font-size:9.5px;padding:4px 6px;min-height:26px}.audio-disclosure{font-size:8px!important;margin:4px 0!important}.answer-panel h2{font-size:16px;margin-bottom:6px}.choices{gap:5px}.choice{font-size:11.5px;min-height:31px;padding:6px 7px;line-height:1.2}.submit-actions button{min-height:29px;font-size:12px}.lifelines{padding:8px;margin-top:8px;border-radius:12px}.lifeline-title{gap:5px}.lifeline-title>.ui-icon{width:22px;height:22px}.lifeline-title strong{font-size:15px}.lifeline-title>span{font-size:9px;padding:3px 6px}.lifelines>small{font-size:10px;margin:5px 0}.lifeline-buttons{gap:5px}.lifeline-buttons button{flex-direction:column;font-size:9px;min-height:45px;padding:4px;gap:3px}.lifeline-buttons .ui-icon{width:17px;height:17px}.scene,.sprite{width:82px;max-height:82px}.sprite{height:auto}.situation-panel{grid-template-columns:82px 1fr;gap:8px}.answer-state{font-size:10px;margin-top:5px}.lifelines p{font-size:10px}}
@media(max-height:700px) and (min-width:601px){body[data-view=setup] #app>.shell>.panel{padding:12px 20px;gap:8px 16px}.setup-panel .segments button{min-height:29px;padding:5px 7px}.setup-panel .category-list{gap:7px;grid-template-columns:repeat(3,minmax(0,1fr))}.setup-panel .category-list label{font-size:10.5px}.setup-panel .categories{padding:9px 12px}.setup-panel .category-list small{font-size:9px}.setup-panel input{padding:7px 10px}.setup-panel>.actions button{min-height:31px;padding:6px}.setup-panel>p{font-size:10px}.setup-panel .segment-field legend{font-size:11px}.site-footer{padding:7px 16px}.site-footer a{font-size:11px}.site-footer strong{font-size:18px}.site-footer small{font-size:9px}body.gameplay #siteHeader{height:48px;min-height:48px}body.gameplay #app{padding:6px}.play-panel{padding:10px}.scene,.sprite{max-height:29%}.situation-copy h1{font-size:18px}.situation-copy p{font-size:11px;line-height:1.23}.situation-actions button{font-size:10px;min-height:26px;padding:4px 7px}.choice{font-size:11px;min-height:32px;padding:5px 8px}.answer-panel h2{font-size:17px;margin-bottom:6px}.choices{gap:5px}.lifelines{margin-top:7px;padding:8px}.lifeline-title strong{font-size:15px}.lifelines>small{font-size:10px;margin:4px 0 6px}.lifeline-buttons button{min-height:34px;font-size:10px;padding:4px}.lifeline-buttons .ui-icon{width:17px;height:17px}.submit-actions button{min-height:28px;font-size:11px;padding:5px}.answer-state{font-size:10px}}
@media(max-height:480px) and (orientation:landscape){body.gameplay #siteFrame{height:calc(100svh - 6px);margin:3px auto}body.gameplay #siteHeader{height:39px;min-height:39px}.game-grid{min-height:0!important}.situation-copy p{font-size:9px;line-height:1.18;margin:4px 0}.situation-copy h1{font-size:14px;margin:4px 0}.question-meta{font-size:9px}.scene,.sprite{max-height:23%}.situation-copy{padding-top:4px}.situation-actions button{font-size:8px;min-height:21px;padding:3px 5px}.audio-disclosure{font-size:7px!important}.answer-panel h2{font-size:13px}.choice{font-size:9px;padding:3px 5px;min-height:23px}.choices{gap:3px}.lifelines{padding:5px;margin-top:5px}.lifeline-title>.ui-icon{width:18px;height:18px}.lifeline-title strong{font-size:12px}.lifeline-title>span{font-size:8px}.lifelines>small{font-size:8px;margin:3px 0}.lifeline-buttons button{min-height:26px;font-size:8px}.lifeline-buttons .ui-icon{width:13px;height:13px}.submit-actions{margin-top:4px}.submit-actions button{min-height:22px;font-size:9px}.answer-state{font-size:8px}.play-panel{padding:7px}}
.home-window{aspect-ratio:1672/882;width:100%;overflow:hidden}.home-canvas{position:relative;width:100%;aspect-ratio:1672/941}.home-art .home-footer{position:static;height:60px;min-height:60px}.home-art .home-footer .site-footer{height:100%;padding:6px 20px;gap:3px 10px;justify-content:space-between;align-content:center}.home-art .home-footer .site-footer strong{font-size:clamp(15px,1.9cqw,28px)}.home-art .home-footer .site-footer a{font-size:clamp(9px,.92cqw,14px)}.home-art .home-footer small{font-size:clamp(8px,.72cqw,11px)}.home-art .answer-first{top:45.3%;height:4.8%}.home-art .answer-second{top:50.5%;height:4.9%}.home-art .answer-third{top:55.8%;height:4.6%}
@media(orientation:landscape){.home-art{width:min(calc(100vw - 8px),calc((100svh - 72px)*1672/882))}}
@media(orientation:portrait){.home-window{aspect-ratio:941/1590}.home-canvas{aspect-ratio:941/1672}.home-art{width:min(calc(100vw - 8px),calc((100svh - 88px)*941/1590))}.home-art .home-footer{position:static;height:76px;min-height:76px}.home-art .home-footer .site-footer{padding:6px 10px;gap:4px 8px;justify-content:center;align-content:center}.home-art .home-footer .site-footer strong{font-size:clamp(14px,4.5cqw,23px)}.home-art .home-footer .site-footer a{font-size:clamp(9px,2.45cqw,13px)}.home-art .home-footer .site-footer nav{gap:4px 8px}.home-art .home-footer small{font-size:clamp(8px,2.1cqw,11px);line-height:1.1}.home-art .answer-first{top:79.7%;height:2.7%}.home-art .answer-second{top:82.8%;height:2.7%}.home-art .answer-third{top:85.9%;height:2.7%}}
.home-art .home-caption{font-size:clamp(6px,1.21cqw,23px)}
@media(orientation:portrait){.home-art .home-caption{font-size:clamp(7px,2.12cqw,23px)}}
@media(max-width:600px) and (max-height:720px){.situation-panel{grid-template-columns:70px 1fr;gap:7px}.scene,.sprite{width:70px;max-height:70px}.situation-copy h1{font-size:13.5px}.situation-copy p{font-size:10.5px;line-height:1.19;margin:4px 0}.situation-copy .context{padding:5px}.situation-actions{margin-top:4px}.situation-actions button{font-size:9px;min-height:23px;padding:3px 5px}.audio-disclosure{font-size:7px!important;margin:3px 0!important}.answer-panel h2{font-size:14px;margin-bottom:4px}.choice{font-size:10.5px;line-height:1.18;padding:5px 6px;min-height:29px}.choices{flex:0 0 auto;gap:4px}.lifelines{padding:6px;margin-top:6px}.lifeline-title{gap:4px}.lifeline-title>.ui-icon{width:18px;height:18px}.lifeline-title strong{font-size:13px}.lifeline-title>span{font-size:8px;padding:3px 5px}.lifelines>small{font-size:9px;margin:4px 0}.lifeline-buttons button{flex-direction:row;gap:3px;min-height:30px;font-size:8px;padding:3px}.lifeline-buttons .ui-icon{width:14px;height:14px}.submit-actions button{min-height:26px;font-size:11px}.answer-state{font-size:9px;margin-top:4px}}
@media(max-width:600px){.situation-panel{display:block}.situation-panel::after{content:'';display:block;clear:both}.situation-panel>.scene{float:left;margin:0 8px 5px 0}.situation-copy .context,.situation-actions{clear:both}.situation-copy{display:block}}
@media(max-width:600px) and (max-height:720px){.question-meta{display:none}.situation-copy p{font-size:10px;line-height:1.18}.lifelines{margin-top:5px}.game-grid{gap:5px}}
.answer-panel:has(.answer-state:not(:empty))>h2{display:none}
@media(max-width:600px) and (max-height:720px){.choices{gap:3px}.lifelines{padding:4px}.lifeline-buttons button{min-height:27px}.answer-panel:has(.answer-state:not(:empty))>h2{display:none}}

/* Build 1016.5: attached image, readable type, proportional art, natural scrolling. */
body.gameplay #siteFrame{width:min(1672px,calc(100% - 16px));height:auto;min-height:calc(100svh - 16px);margin:8px auto;display:flex;flex-direction:column;border-radius:12px;overflow:hidden}
body.gameplay #siteHeader{height:auto;min-height:70px;padding:10px 24px;gap:20px;flex-wrap:nowrap}
body.gameplay #siteHeader .brand{font-size:clamp(18px,2.7vw,40px);flex:0 1 auto;width:auto;max-width:none}
body.gameplay #headerStatus{font-size:clamp(14px,1.5vw,24px);min-width:0}
body.gameplay #headerStatus small{font-size:clamp(12px,1.2vw,19px)}
body.gameplay #helpBtn{font-size:clamp(13px,1.4vw,22px);padding:10px 15px;min-height:44px}
body.gameplay .timer{font-size:clamp(24px,2.6vw,40px);color:#ffc52e;min-width:2ch}
body.gameplay #app{display:block;flex:1;padding:0;overflow:visible;height:auto;min-height:0}
body.gameplay .play-panel{display:block;margin:0;padding:0;max-width:none;width:100%;border:0;border-radius:0;overflow:visible}
.scene-banner{width:100%;background:#071b49;display:flex;justify-content:center;align-items:center;overflow:hidden}
.scene-art{display:block;width:100%;height:auto;max-height:340px;object-fit:contain;object-position:center center;image-rendering:auto;flex:0 1 auto}
.scene-crop{aspect-ratio:var(--scene-ratio,3.1);height:auto}
body.gameplay .game-grid{height:auto;min-height:0!important;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:0;padding:20px 24px 12px;background:#fff}
body.gameplay .situation-panel{display:block;overflow:visible;padding:0 24px 0 0;border-right:1px solid #c8d7eb;min-width:0}
body.gameplay .situation-copy{padding:0;display:flex;flex-direction:column;height:100%;overflow:visible}
body.gameplay .situation-copy h1,body.gameplay .answer-panel>h2{display:block!important;font-size:clamp(24px,2.75vw,44px);line-height:1.15;margin:0 0 14px;color:#071b49}
body.gameplay .situation-copy p{font-size:clamp(18px,1.9vw,30px);line-height:1.38;margin:0 0 16px}
body.gameplay .situation-copy .context{clear:both;background:#edf4ff;border-left:5px solid #78b8ff;padding:16px 20px;border-radius:9px;margin:0 0 12px;overflow-wrap:anywhere}
body.gameplay .context h2{font-size:clamp(20px,2vw,32px);line-height:1.2;margin:0 0 8px}
body.gameplay .context p{margin:0}
body.gameplay .situation-actions{display:flex;gap:14px;margin-top:auto;padding-top:8px;clear:both;flex-wrap:wrap}
body.gameplay .situation-actions button{font-size:clamp(16px,1.8vw,28px);min-height:52px;padding:10px 20px}
body.gameplay .answer-panel{padding:0 0 0 24px;display:flex;flex-direction:column;min-width:0;overflow:visible}
body.gameplay .choices{display:grid;grid-template-rows:none;grid-auto-rows:auto;gap:7px;flex:none;min-height:0;padding:0;margin:0;border:0}
body.gameplay .choice{display:flex;text-align:left;align-items:flex-start;gap:16px;min-height:48px;font-size:clamp(17px,1.65vw,27px);line-height:1.28;padding:8px 14px;background:#f0f6ff;color:#091f4a;border:1px solid #b5cdea;border-radius:12px;overflow-wrap:anywhere}
body.gameplay .choice .letter{flex:0 0 1.3em;font-weight:800}
body.gameplay .choice.selected{background:#cde5ff;border:2px solid #1266c5;box-shadow:0 0 0 2px #1266c526}
body.gameplay .choice:disabled{opacity:.72}
body.gameplay .choice.eliminated{opacity:.45;text-decoration:line-through}
body.gameplay .answer-state{font-size:16px;min-height:0;margin:5px 0}
body.gameplay .answer-state:empty{display:none}
body.gameplay .submit-actions{margin-top:10px}
body.gameplay .submit-actions button{min-height:48px;font-size:clamp(18px,1.8vw,28px);padding:9px 16px}
body.gameplay .lifelines{background:linear-gradient(110deg,#eaf7ff,#fff5da);border:2px solid #4caed6;border-radius:18px;color:#104474;padding:10px 12px;margin-top:10px;box-shadow:0 2px 4px #143c6d16}
body.gameplay .lifeline-title{gap:10px;flex-wrap:wrap}
body.gameplay .lifeline-title>.ui-icon{color:#ee6e99;width:30px;height:30px}
body.gameplay .lifeline-title strong{font-size:clamp(20px,2vw,30px)}
body.gameplay .lifelines>small{color:#526d91;font-size:clamp(15px,1.3vw,21px);margin:4px 0 8px;line-height:1.25}
body.gameplay .lifeline-buttons{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
body.gameplay .lifeline-buttons button{position:relative;display:flex;flex-direction:row;justify-content:center;gap:7px;background:#fff;color:#125aa3;border:2px solid #8bb6df;border-radius:14px;min-height:60px;font-size:clamp(14px,1.35vw,22px);padding:8px;line-height:1.18}
body.gameplay #easier{color:#7938a1}body.gameplay #skipReplace{color:#a84809}
body.gameplay .lifeline-buttons .ui-icon{width:25px;height:25px;color:currentColor;flex-shrink:0}
body.gameplay .lifeline-buttons button:disabled{opacity:.55}
body.gameplay .lifeline-buttons .lifeline-used{opacity:1!important}
.lifeline-used::after{content:'';position:absolute;left:6%;top:48%;width:88%;height:3px;background:#e21c2b;transform:rotate(11deg);pointer-events:none;box-shadow:0 0 1px #fff}
body.gameplay .lifelines p{color:#104474;font-size:16px}
body.gameplay #app>.site-footer{margin:0;border-radius:0;padding:10px 24px;min-height:58px}
body.gameplay .site-footer strong{font-size:clamp(20px,2vw,30px)}
body.gameplay .site-footer a{font-size:clamp(13px,1.1vw,18px)}
body.gameplay .site-footer small{font-size:12px}
@media(max-width:900px){
 body.gameplay #siteHeader{padding:10px 14px;gap:12px;flex-wrap:wrap}
 body.gameplay #siteHeader .brand{font-size:22px}
 body.gameplay #headerStatus{font-size:15px;order:3;flex:1 0 100%}
 body.gameplay #headerStatus small{font-size:13px}
 body.gameplay #helpBtn{margin-left:auto;font-size:14px}
 body.gameplay .game-grid{padding:16px}
 body.gameplay .situation-panel{padding-right:16px}
 body.gameplay .answer-panel{padding-left:16px}
 body.gameplay .lifeline-buttons{gap:5px}
 body.gameplay .lifeline-buttons button{flex-direction:column;font-size:14px}
}
@media(max-width:700px),(orientation:portrait){
 body.gameplay #siteFrame{width:calc(100% - 8px);min-height:calc(100svh - 8px);height:auto;margin:4px auto}
 body.gameplay .game-grid{grid-template-columns:minmax(0,1fr);padding:16px;gap:20px}
 body.gameplay .situation-panel{border:0;padding:0}
 body.gameplay .answer-panel{border-top:1px solid #c8d7eb;padding:18px 0 0}
 body.gameplay .scene-art{max-height:none;height:auto;width:100%}
 body.gameplay .situation-copy h1,body.gameplay .answer-panel>h2{font-size:28px;margin-bottom:12px}
 body.gameplay .situation-copy p{font-size:19px;line-height:1.4;margin-bottom:14px}
 body.gameplay .situation-copy .context{padding:14px}
 body.gameplay .context p{margin:0}
 body.gameplay .context h2{font-size:23px}
 body.gameplay .situation-actions{margin-top:0;gap:10px}
 body.gameplay .situation-actions button{font-size:17px;min-height:46px;padding:10px 14px}
 body.gameplay .choice{font-size:18px;line-height:1.35;min-height:48px;padding:11px 12px;gap:8px}
 body.gameplay .submit-actions button{font-size:20px;min-height:48px}
 body.gameplay .lifeline-title strong{font-size:22px}
 body.gameplay .lifelines>small{font-size:16px}
 body.gameplay .lifeline-buttons button{font-size:15px;min-height:75px;flex-direction:column;padding:8px 4px}
 body.gameplay #app>.site-footer{padding:12px;gap:8px}
 body.gameplay .site-footer a{font-size:14px}
 body.gameplay .site-footer strong{font-size:22px}
}

/* This panoramic source has sky above the full head; crop only the lower scene. */
body.gameplay .scene-banner:has(img[src*="scene-163-v1016-5"]) .scene-art{height:clamp(220px,22vw,340px);max-height:none;object-fit:cover;object-position:center top}
@media(max-width:700px),(orientation:portrait){body.gameplay .scene-banner:has(img[src*="scene-163-v1016-5"]) .scene-art{height:auto;max-height:none;object-fit:contain}}

/* Build 1017.6: prominent proportional artwork, Details/Hint, footer, microphone. */
body.gameplay .situation-panel{display:flex;flex-direction:column;gap:14px}
body.gameplay .situation-panel>.scene-banner{background:transparent;flex:none;overflow:hidden;border-radius:10px}
body.gameplay .situation-panel .scene-art{width:100%;height:auto;max-height:none;object-fit:contain;object-position:center top}
body.gameplay .situation-panel .scene-crop{aspect-ratio:auto;max-height:none}
body.gameplay .situation-panel .situation-copy{height:auto;flex:1}
body.gameplay .situation-panel .scene-banner:has(img[src*="scene-163-v1016-5"]) .scene-art{height:auto;max-height:none;object-fit:contain}
body.gameplay .situation-copy .context{padding:12px 16px}
body.gameplay .context.hint-active,body.gameplay #easier.hint-active{background:#f0e6ff;color:#653098;border-color:#a772d5}
body.gameplay .context.hint-active h2{color:#653098}
body.gameplay #easier{color:#653098;background:#fbf7ff}
body.gameplay .context.details-box{background:#edf4ff;color:#0a1d43}
.site-footer{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 28px;align-items:center}
.site-footer nav{display:flex;justify-content:space-evenly;gap:12px 20px;align-items:center;width:100%;flex-wrap:wrap}
.site-footer a{font-size:clamp(14px,1.2vw,19px);white-space:nowrap}
.site-footer small{grid-column:1/-1;text-align:center;width:100%}
body.gameplay #app>.site-footer a{font-size:clamp(14px,1.2vw,19px)}
.home-art .home-footer{height:auto;min-height:76px}
.home-art .home-footer .site-footer{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 26px;padding:10px 20px;min-height:76px;height:auto}
.home-art .home-footer .site-footer nav{gap:10px 20px;justify-content:space-evenly}
.home-art .home-footer .site-footer a{font-size:clamp(12px,1.12cqw,19px)}
.home-art .home-footer small{font-size:clamp(10px,.8cqw,13px);line-height:1.2}
#micDialog{position:fixed;inset:4svh auto auto 50%;transform:translateX(-50%);margin:0;width:min(680px,calc(100vw - 24px));max-height:92svh;overflow-y:auto;padding:22px;border:0;border-radius:20px}
#micDialog .dialog-nav{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}
#micDialog h2{font-size:26px;margin:0}
#micDialog>p{font-size:18px;line-height:1.4;margin:12px 0}
#micDialog .mic-transcript-label{margin:12px 0;font-size:18px}
#micTranscript{width:100%;min-height:110px;font-size:18px;line-height:1.4;resize:vertical;background:#f7faff}
#micDialog meter{width:100%;height:22px;margin:8px 0}
#micPlayback{width:100%;margin:8px 0}
#micDialog .mic-actions{display:flex;gap:10px;margin-top:12px;flex-wrap:wrap}
#micDialog .mic-actions button{min-width:110px;min-height:46px;flex:1;font-size:17px;padding:10px}
@media(orientation:landscape){.home-art{width:min(calc(100vw - 8px),calc((100svh - 88px)*1672/882))}}
@media(max-width:900px){.site-footer,.home-art .home-footer .site-footer{grid-template-columns:1fr;justify-items:center;gap:10px}.site-footer nav{gap:12px 18px}.site-footer a{font-size:15px}}
@media(orientation:portrait){.home-art{width:min(calc(100vw - 8px),calc((100svh - 132px)*941/1590))}.home-art .home-footer{height:auto;min-height:120px}.home-art .home-footer .site-footer{min-height:120px;padding:10px 12px}.home-art .home-footer .site-footer a{font-size:14px}.home-art .home-footer small{font-size:11px}.home-art .home-footer .site-footer nav{gap:10px 16px}}
@media(max-width:700px),(orientation:portrait){body.gameplay .situation-panel{gap:14px}.site-footer nav{justify-content:space-evenly;gap:12px 16px}#micDialog{top:12px;max-height:calc(100svh - 24px);padding:16px}#micDialog h2{font-size:23px}#micDialog>p{font-size:17px}#micTranscript{min-height:100px;font-size:17px}}

body.gameplay .lifelines .scoring-note{font-size:15px;line-height:1.35;margin:9px 0 0;text-align:center;color:#18496e}

/* Build 1017.7: above-the-fold fit, stronger homepage text, larger Settings labels. */
.home-art .home-pole-caption{font-family:Arial,Helvetica,sans-serif;font-weight:850;color:#062b55;text-shadow:none;font-size:clamp(11px,1.42cqw,26px);letter-spacing:-.025em}
body[data-view=setup] .setup-panel .category-list label{font-size:clamp(15px,1.3vw,19px);line-height:1.3;font-weight:600;gap:9px}
body[data-view=setup] .setup-panel .category-list small{font-size:clamp(13px,1.05vw,16px);font-weight:500;color:#2c5276}
body[data-view=setup] .setup-panel .category-list input{width:22px;height:22px}
body[data-view=setup] .setup-panel .categories legend{font-size:clamp(17px,1.4vw,21px)}
body[data-view=setup] .setup-panel #poolCount{font-size:clamp(14px,1.15vw,17px);line-height:1.35;margin-top:10px;color:#284c72}
body[data-view=setup] .setup-panel>p{font-size:clamp(13px,1.05vw,16px);line-height:1.35}
body[data-view=setup] .setup-panel .segment-field legend{font-size:clamp(14px,1.1vw,18px);margin-bottom:8px}
body[data-view=setup] .setup-panel .segments button{font-size:clamp(14px,1.1vw,18px);padding:8px 10px;min-height:39px}
body[data-view=setup] .setup-panel .field{font-size:16px}
body[data-view=setup] .setup-panel input{font-size:17px}
body[data-view=setup] .setup-panel #selectAll{font-size:14px;min-height:31px;padding:5px 12px;top:-27px}
body[data-view=setup] .setup-panel>.actions button{font-size:20px;min-height:44px}
body[data-view=setup] .mic-option button{font-size:15px;min-height:38px}
body.fit-screen{height:100svh;overflow:hidden}
body.fit-screen #siteFrame{position:absolute;left:50%;top:4px;margin:0;height:auto!important;min-height:0!important;max-width:none;transform:translateX(-50%) scale(var(--fit-scale,1));transform-origin:top center}
body.fit-screen #app{flex:none;height:auto;min-height:0;overflow:visible}
@media(orientation:portrait){.home-art .home-pole-caption{font-size:clamp(12px,3.15cqw,31px);font-weight:850;color:#062b55}}
@media(max-width:700px),(orientation:portrait){
 body.gameplay #siteHeader{min-height:48px;padding:8px 10px;gap:6px 10px}
 body.gameplay #siteHeader .brand{font-size:18px}
 body.gameplay #helpBtn{font-size:12px;padding:6px 8px;min-height:32px}
 body.gameplay #headerStatus{font-size:12px;gap:8px}
 body.gameplay #headerStatus small{font-size:11px}
 body.gameplay .timer{font-size:23px}
 body.gameplay .game-grid{padding:10px;gap:10px;grid-template-columns:minmax(0,1fr)}
 body.gameplay .situation-panel{display:grid;grid-template-columns:minmax(0,.47fr) minmax(0,.53fr);grid-template-rows:auto auto auto auto;gap:7px 10px;align-items:start}
 body.gameplay .situation-panel>.scene-banner{grid-column:1;grid-row:1/3;align-self:start;border-radius:7px}
 body.gameplay .situation-panel .situation-copy{display:contents}
 body.gameplay .situation-copy h1{grid-column:2;grid-row:1;font-size:21px;line-height:1.15;margin:0}
 body.gameplay .situation-text{grid-column:2;grid-row:2}
 body.gameplay .situation-copy p{font-size:16px;line-height:1.28;margin:0}
 body.gameplay .situation-copy .context{grid-column:1/-1;grid-row:3;margin:0;padding:9px 12px}
 body.gameplay .context h2{font-size:19px;margin:0 0 4px}
 body.gameplay .context p{font-size:15px;line-height:1.25}
 body.gameplay .situation-actions{grid-column:1/-1;grid-row:4;gap:8px;padding-top:0;margin:0}
 body.gameplay .situation-actions button{font-size:14px;min-height:34px;padding:6px 11px}
 body.gameplay .answer-panel{padding-top:10px}
 body.gameplay .answer-panel>h2{font-size:22px;margin:0 0 7px}
 body.gameplay .choices{gap:5px}
 body.gameplay .choice{font-size:15.5px;line-height:1.25;min-height:35px;padding:7px 9px;gap:7px}
 body.gameplay .submit-actions{margin-top:7px}
 body.gameplay .submit-actions button{font-size:17px;min-height:37px;padding:7px 12px}
 body.gameplay .lifelines{margin-top:7px;padding:8px;border-radius:13px}
 body.gameplay .lifeline-title strong{font-size:19px}
 body.gameplay .lifeline-title>.ui-icon{width:23px;height:23px}
 body.gameplay .lifelines>small{font-size:12.5px;margin:3px 0 6px}
 body.gameplay .lifeline-buttons{gap:6px}
 body.gameplay .lifeline-buttons button{font-size:12.5px;min-height:46px;padding:6px 4px;gap:4px;flex-direction:row}
 body.gameplay .lifeline-buttons .ui-icon{width:17px;height:17px}
 body.gameplay .lifelines .scoring-note{font-size:11px;margin:6px 0 0}
 body.gameplay #app>.site-footer{padding:8px;gap:6px}
 body.gameplay .site-footer strong{font-size:18px}
 body.gameplay .site-footer nav{gap:6px 12px}
 body.gameplay .site-footer a{font-size:12px}
 body.gameplay .site-footer small{font-size:10px}
 body[data-view=setup] .setup-panel .category-list label{font-size:14.5px;gap:6px}
 body[data-view=setup] .setup-panel .category-list small{display:inline;font-size:11.5px}
 body[data-view=setup] .setup-panel .category-list input{width:20px;height:20px}
 body[data-view=setup] .setup-panel .category-list{gap:9px;grid-template-columns:repeat(2,minmax(0,1fr))}
 body[data-view=setup] .setup-panel #poolCount{font-size:13px;line-height:1.3}
 body[data-view=setup] .setup-panel>p{font-size:12.5px;line-height:1.3}
 body[data-view=setup] .setup-panel .segment-field legend{font-size:13px}
 body[data-view=setup] .setup-panel .segments button{font-size:12px;padding:7px 4px;min-height:34px}
}

#micDialog{top:12px;max-height:none;overflow:visible;transform:translateX(-50%) scale(var(--mic-fit,1));transform-origin:top center}

body.fit-screen{position:relative;width:100%}

/* Narration remains unavailable until natural voice files are installed. */
.audio-toggle{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:4px;white-space:nowrap;min-height:38px;padding:7px 14px;font-size:16px;overflow:hidden}
.audio-other{font-size:.9em;font-weight:500;color:#78889e}
.audio-crossed{position:relative;overflow:hidden}
.audio-crossed::after{content:'';position:absolute;left:5%;top:48%;width:90%;height:3px;background:#e22732;transform:rotate(-12deg);pointer-events:none;border-radius:2px}
.audio-unavailable:disabled{opacity:1;cursor:not-allowed;background:#edf0f5;color:#53647b;border-color:#bdc7d6}
.audio-setting .audio-toggle{width:100%;min-height:39px}
.audio-setting small{display:block;font-size:13px;margin-top:5px;color:#53647b}
body.gameplay #headerStatus .audio-toggle{flex:none;font-size:clamp(12px,1.1vw,17px);min-height:36px;padding:6px 10px}
body.gameplay .situation-actions .audio-unavailable:disabled{opacity:1;background:#edf0f5;color:#53647b}
@media(max-width:700px),(orientation:portrait){body.gameplay #headerStatus .audio-toggle{font-size:10.5px;min-height:27px;padding:4px 6px;gap:2px}.audio-setting small{font-size:11.5px}.audio-setting .audio-toggle{font-size:13px;min-height:34px}}

/* Family and friends review section: native checkboxes save immediately. */
.review-checks{margin:10px 0 0;padding:8px 10px;border:1px solid #a9bed8;border-radius:10px;background:#f3f8fe;min-width:0}
.review-checks legend{font-size:18px;font-weight:800;color:#071b49;padding:0 6px}
.review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px 12px}
.review-grid label{display:flex;align-items:center;gap:7px;font-size:17px;line-height:1.25;cursor:pointer;color:#071b49}
.review-grid input{width:21px;height:21px;flex:0 0 21px;margin:0;accent-color:#087f52}
.review-grid input:focus-visible{outline:3px solid #006bdb;outline-offset:3px}
.review-status{font-size:14px!important;line-height:1.3!important;margin:7px 0 0!important;color:#354c69}
@media(max-width:700px){.review-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.review-grid label{font-size:16px}}

/* Build 1017.10: landscape 5 / portrait 7, without shrinking the whole page. */
body.gameplay{height:auto;min-height:100svh;overflow-y:auto}
body.gameplay #siteFrame{position:static;transform:none;width:calc(100% - 16px);max-width:1920px;height:auto;min-height:calc(100svh - 16px);margin:8px auto;overflow:visible}
body.gameplay #siteHeader{height:auto;min-height:68px;padding:10px 18px;gap:16px;border-radius:11px 11px 0 0}
body.gameplay #siteHeader .brand{font-size:clamp(20px,2.3vw,38px);flex:0 1 auto;width:auto;white-space:nowrap}
body.gameplay #headerStatus{font-size:clamp(14px,1.15vw,21px);gap:12px}
body.gameplay #headerStatus small{font-size:clamp(13px,1vw,18px)}
body.gameplay #helpBtn{display:block;min-height:44px;font-size:15px;padding:8px 12px}
body.gameplay #app{display:flex;flex-direction:column;flex:1;height:auto;min-height:0;padding:0;overflow:visible}
body.gameplay .play-panel{display:flex;flex-direction:column;flex:1;min-height:0;padding:0;border:0;border-radius:0}
body.gameplay .game-grid{display:grid;grid-template-columns:minmax(0,.46fr) minmax(0,.54fr);align-items:start;gap:20px;height:auto;min-height:0!important;padding:18px 18px 10px;flex:1}
body.gameplay .visual-panel{display:flex;flex-direction:column;gap:14px;min-width:0}
body.gameplay .scene-banner{border-radius:12px;overflow:hidden;background:#edf4ff}
body.gameplay .scene-banner .scene-art,
body.gameplay .scene-banner:has(img[src*="scene-163-v1016-5"]) .scene-art{width:100%;height:auto;max-height:none;object-fit:contain;object-position:center top}
body.gameplay .scene-crop{aspect-ratio:auto}
body.gameplay .facts-block{margin:0;border:1px solid #b9d8f5;border-left:4px solid #78b8ff;padding:14px 16px;border-radius:12px;min-width:0}
body.gameplay .facts-block h2{font-size:clamp(22px,1.7vw,30px);line-height:1.15;margin:0 0 6px}
body.gameplay .facts-block p{font-size:clamp(18px,1.4vw,25px);line-height:1.35;margin:0;overflow-wrap:break-word}
body.gameplay .situation-actions{margin:10px 0 0;padding:0;display:flex}
body.gameplay .situation-actions button{font-size:15px;min-height:44px;padding:7px 12px}
body.gameplay .answer-panel{display:flex;flex-direction:column;padding:0;min-width:0;gap:12px}
body.gameplay .story-block{background:#edf4ff;border-radius:12px;padding:14px 16px;min-width:0}
body.gameplay .story-block h1{font-size:clamp(26px,2vw,38px);line-height:1.15;margin:0 0 8px}
body.gameplay .story-block p{font-size:clamp(19px,1.55vw,28px);line-height:1.35;margin:0}
body.gameplay .answer-panel>.answer-heading{display:block!important;font-size:clamp(25px,2vw,36px);line-height:1.15;margin:0}
body.gameplay .choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;grid-auto-rows:1fr;gap:10px;padding:0;flex:none}
body.gameplay .choice{font-size:clamp(18px,1.3vw,24px);line-height:1.3;min-height:76px;padding:12px;gap:10px;align-items:flex-start;overflow-wrap:break-word}
body.gameplay .choice .letter{font-size:1.12em;flex:0 0 1.65em;background:#d4eafb;border-radius:8px;padding:3px;text-align:center}
body.gameplay .submit-actions{display:flex;align-items:stretch;justify-content:center;margin:0;padding:0;min-width:0}
body.gameplay .submit-actions button{width:100%;height:100%;min-height:76px;font-size:clamp(21px,1.8vw,32px);padding:12px;line-height:1.2}
body.gameplay .submit-actions p{align-self:center;margin:0;font-size:18px}
body.gameplay .answer-state{font-size:16px;line-height:1.35;margin:0}
body.gameplay .game-utilities{padding:0 18px 12px}
body.gameplay .game-utilities:empty{display:none}
body.gameplay .lifelines{display:grid;grid-template-columns:max-content minmax(0,1fr);align-items:center;column-gap:18px;margin:0;padding:10px 14px;background:#fff;border:1px solid #b9d8f5;border-radius:12px;box-shadow:none}
body.gameplay .lifeline-title{grid-column:1;grid-row:1}
body.gameplay .lifeline-title strong{font-size:clamp(20px,1.5vw,28px)}
body.gameplay .lifelines>small{grid-column:1;grid-row:2;font-size:13px;margin:3px 0 0;max-width:260px}
body.gameplay .lifeline-buttons{grid-column:2;grid-row:1/3;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:0}
body.gameplay .lifeline-buttons button{min-height:58px;font-size:clamp(16px,1.15vw,21px);padding:8px;flex-direction:row}
body.gameplay .lifelines .scoring-note{grid-column:1/-1;font-size:14px;margin:7px 0 0;line-height:1.3}
body.gameplay #app>.site-footer{margin-top:auto;display:block;min-height:48px;padding:8px 16px;border-radius:0 0 11px 11px}
body.gameplay .site-footer>strong,body.gameplay .site-footer>small{display:none}
body.gameplay #app>.site-footer a{display:inline-flex;align-items:center;min-height:32px;font-size:15px}
body.gameplay .site-footer nav{gap:4px 16px;justify-content:space-evenly}
/* Temporary UAT is outside the complete game frame, after its footer. */
.uat-area{width:calc(100% - 16px);max-width:1920px;margin:20px auto 28px;padding:18px;background:#edf6ff;border:1px solid #b5d8f8;border-radius:14px}
.uat-area>h2{font-size:clamp(25px,2vw,34px);line-height:1.2;margin:0 0 6px}
.uat-intro{font-size:17px;line-height:1.4;margin:0 0 14px}
.uat-area .review-checks{padding:14px;margin:14px 0 0;border:1px solid #b5d8f8;border-radius:12px;background:#fff}
.uat-area .review-checks legend{font-size:18px;line-height:1.35;font-weight:700;max-width:100%;padding:0 8px}
.uat-area .review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.uat-area .review-grid label{display:flex;align-items:center;gap:14px;min-height:72px;padding:12px 14px;border:1px solid #a8cff5;border-radius:12px;background:#edf6ff;font-size:20px;line-height:1.25;touch-action:manipulation;cursor:pointer}
.uat-area .review-grid input{width:30px;height:30px;flex:0 0 30px;padding:0;margin:0;accent-color:#087f52}
.uat-area .review-grid label:has(input:checked){background:#dcf5e8;border:2px solid #087f52;padding:11px 13px}
.uat-area .review-status{font-size:16px!important;line-height:1.4!important;margin-top:12px!important}
@media(max-width:1000px),(orientation:portrait){
 body.gameplay #siteFrame{width:100%;margin:0;border:0;border-radius:0;min-height:100svh}
 body.gameplay #siteHeader{display:flex;flex-wrap:wrap;min-height:0;padding:10px 12px;gap:8px 12px;border-radius:0}
 body.gameplay #siteHeader .brand{font-size:clamp(19px,4vw,36px);flex:1 1 auto;width:auto;max-width:none}
 body.gameplay #helpBtn{font-size:13px;min-height:44px;padding:7px 10px}
 body.gameplay #headerStatus{order:3;flex:1 0 100%;font-size:15px;gap:12px}
 body.gameplay #headerStatus small{font-size:14px}
 body.gameplay #headerStatus .audio-toggle{font-size:13px;min-height:44px;padding:6px 10px}
 body.gameplay .timer{font-size:27px}
 body.gameplay .game-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-areas:'scene scene' 'story facts' 'question question' 'answers answers' 'status status';gap:12px;padding:10px 12px 12px;align-items:stretch;flex:none}
 body.gameplay .visual-panel,body.gameplay .answer-panel{display:contents}
 body.gameplay .scene-banner{grid-area:scene;align-self:start;border-radius:10px}
 body.gameplay .facts-block{grid-area:facts;padding:12px;border-width:1px}
 body.gameplay .story-block{grid-area:story;padding:12px}
 body.gameplay .story-block h1,body.gameplay .facts-block h2{font-size:clamp(23px,3.5vw,34px);line-height:1.15;margin:0 0 6px}
 body.gameplay .story-block p,body.gameplay .facts-block p{font-size:clamp(18px,2.7vw,26px);line-height:1.35;margin:0}
 body.gameplay .answer-panel>.answer-heading{grid-area:question;font-size:clamp(25px,3.6vw,36px);margin:0}
 body.gameplay .choices{grid-area:answers;grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:1fr;gap:8px}
 body.gameplay .choice{font-size:clamp(17px,2.5vw,24px);line-height:1.3;min-height:76px;padding:10px;gap:8px}
 body.gameplay .choice .letter{flex-basis:1.5em}
 body.gameplay .submit-actions{margin:0}
 body.gameplay .submit-actions button{font-size:clamp(21px,3vw,30px);min-height:76px;padding:10px}
 body.gameplay .answer-state{grid-area:status;font-size:16px}
 body.gameplay .situation-actions{margin-top:10px;padding:0}
 body.gameplay .situation-actions button{font-size:13px;min-height:44px;padding:6px 10px}
 body.gameplay .game-utilities{padding:0 12px 12px}
 body.gameplay .lifelines{grid-template-columns:1fr;padding:10px;gap:6px}
 body.gameplay .lifeline-title,body.gameplay .lifelines>small,body.gameplay .lifeline-buttons,body.gameplay .lifelines .scoring-note{grid-column:1;grid-row:auto}
 body.gameplay .lifeline-title strong{font-size:22px}
 body.gameplay .lifelines>small{font-size:14px;margin:0;max-width:none}
 body.gameplay .lifeline-buttons{gap:7px;margin:0}
 body.gameplay .lifeline-buttons button{min-height:58px;font-size:15px;line-height:1.25;padding:8px 5px;gap:5px}
 body.gameplay .lifeline-buttons .ui-icon{width:20px;height:20px}
 body.gameplay .lifelines .scoring-note{font-size:13px;margin:0}
 body.gameplay #app>.site-footer{border-radius:0;padding:8px 12px}
 body.gameplay #app>.site-footer a{font-size:14px;min-height:44px}
 .uat-area{width:calc(100% - 16px);padding:12px;margin-top:18px}
 .uat-area .review-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .uat-area .review-grid label{font-size:18px;min-height:80px;padding:10px;gap:10px}
 .uat-area .review-grid label:has(input:checked){padding:9px}
 .uat-area .review-checks{padding:12px 10px}
}
@media(max-width:380px){
 body.gameplay .game-grid{grid-template-columns:minmax(0,1fr);grid-template-areas:'scene' 'story' 'facts' 'question' 'answers' 'status';padding:8px}
 body.gameplay .choices{grid-template-columns:minmax(0,1fr)}
 body.gameplay .choice{font-size:18px;min-height:64px}
 body.gameplay #siteHeader .brand{font-size:18px}
 body.gameplay #headerStatus{flex-wrap:wrap;font-size:14px}
 .uat-area .review-grid{grid-template-columns:minmax(0,1fr)}
}

/* Build 1018.11: fitted base game + inline UAT that adds height at fixed width. */
body.gameplay{height:100dvh;overflow:hidden;background:#edf3fc}
body.gameplay.uat-open{height:auto;min-height:100dvh;overflow-y:auto}
body.gameplay #siteFrame{--game-width:calc(100vw - 8px);--game-base-height:calc(100dvh - 8px);--uat-height:0px;--text-fit:1;--header-height:calc(var(--game-width)*.05);--footer-height:calc(var(--game-width)*.04);width:calc(100% - 8px);max-width:none;height:var(--game-base-height);min-height:0;margin:4px auto;border:0;border-radius:10px;display:flex;flex-direction:column;overflow:visible;transform:none;position:static;box-shadow:0 5px 20px #153f7614}
body.gameplay #siteHeader{height:var(--header-height);min-height:0;flex:0 0 var(--header-height);display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) auto auto;grid-template-rows:1fr;align-items:center;gap:calc(var(--game-width)*.009);padding:calc(var(--game-width)*.006) calc(var(--game-width)*.012);border-radius:10px 10px 0 0}
body.gameplay #siteHeader .brand{grid-column:1;grid-row:1;width:auto;min-width:0;max-width:none;font-size:calc(var(--game-width)*.023);line-height:1.1;white-space:nowrap;padding:0;min-height:0;font-weight:800}
body.gameplay #headerStatus{grid-column:2;grid-row:1;display:flex;min-width:0;gap:calc(var(--game-width)*.007);font-size:calc(var(--game-width)*.012);line-height:1.2;flex:initial;order:initial}
body.gameplay #headerStatus>div{flex:1;min-width:0}
body.gameplay #headerStatus small{font-size:calc(var(--game-width)*.011);line-height:1.2}
body.gameplay #headerStatus .audio-toggle{font-size:calc(var(--game-width)*.011);padding:calc(var(--game-width)*.004) calc(var(--game-width)*.005);min-height:calc(var(--game-width)*.025);flex:none}
body.gameplay .timer{font-size:calc(var(--game-width)*.022);line-height:1;font-weight:800;color:#ffbd35;min-width:2ch}
body.gameplay #helpBtn,body.gameplay #userAcceptanceBtn{display:block;grid-row:1;font-size:calc(var(--game-width)*.012);line-height:1.1;min-height:calc(var(--game-width)*.03);height:auto;padding:calc(var(--game-width)*.006);white-space:nowrap}
body.gameplay #helpBtn{grid-column:3}
body.gameplay #userAcceptanceBtn{grid-column:4;border:2px solid #08b9f3;background:#0877b8;color:#fff}
body.gameplay #userAcceptanceBtn[aria-expanded=true]{background:#07588c}
body.gameplay #app{display:flex;flex-direction:column;flex:none;width:100%;height:auto;min-height:0;padding:0;overflow:visible}
body.gameplay .play-panel{display:flex;flex-direction:column;flex:none;height:calc(var(--game-base-height) - var(--header-height) - var(--footer-height) + var(--uat-height));min-height:0;width:100%;padding:0;overflow:visible}
body.gameplay .game-grid{display:grid;grid-template-columns:minmax(0,.46fr) minmax(0,.54fr);grid-template-rows:minmax(0,1fr);grid-template-areas:none;flex:1;min-height:0!important;height:auto;gap:calc(var(--game-width)*.01);padding:calc(var(--game-width)*.008);align-items:stretch;overflow:visible}
body.gameplay .visual-panel{display:flex;flex-direction:column;min-width:0;min-height:0;gap:calc(var(--game-width)*.006)}
body.gameplay .scene-banner{grid-area:auto;flex:1;min-height:0;width:100%;display:flex;align-items:center;justify-content:center;border-radius:calc(var(--game-width)*.007);background:#f2f7fc;overflow:hidden}
body.gameplay .scene-banner .scene-art,body.gameplay .scene-banner:has(img[src*="scene-163-v1016-5"]) .scene-art{width:100%;height:100%;max-height:none;object-fit:contain;object-position:center top;flex:initial}
body.gameplay .scene-crop{height:100%;width:100%;aspect-ratio:auto}
body.gameplay .facts-block{grid-area:auto;flex:none;min-width:0;margin:0;padding:calc(var(--game-width)*.008);border:1px solid #efd7bb;border-radius:calc(var(--game-width)*.007)}
body.gameplay .context.details-box{background:#fff3e4;color:#0a1d43;border-color:#efd7bb}
body.gameplay .context.hint-active,body.gameplay #easier.hint-active{background:#f1e7fa;border-color:#a772d5;color:#653098}
body.gameplay .story-block{grid-area:auto;background:#edf4ff;border-radius:calc(var(--game-width)*.007);padding:calc(var(--game-width)*.008)}
body.gameplay .story-block h1,body.gameplay .facts-block h2{font-size:calc(var(--game-width)*.024*var(--text-fit));line-height:1.1;margin:0 0 calc(var(--game-width)*.004);font-weight:800}
body.gameplay .story-block p,body.gameplay .facts-block p{font-size:calc(var(--game-width)*.0165*var(--text-fit));line-height:1.25;margin:0;font-weight:400;overflow-wrap:break-word}
body.gameplay .situation-actions{display:none}
body.gameplay .answer-panel{display:flex;flex-direction:column;min-width:0;min-height:0;gap:calc(var(--game-width)*.006);padding:0}
body.gameplay .answer-panel>.answer-heading{grid-area:auto;display:block!important;font-size:calc(var(--game-width)*.024*var(--text-fit));line-height:1.1;margin:0}
body.gameplay .choices{grid-area:auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr));grid-auto-rows:auto;gap:calc(var(--game-width)*.005);flex:1;min-width:0;min-height:0;margin:0;padding:0}
body.gameplay .choice{font-size:calc(var(--game-width)*.0145*var(--text-fit));line-height:1.22;min-height:0;min-width:0;padding:calc(var(--game-width)*.006);gap:calc(var(--game-width)*.006);align-items:center;overflow-wrap:break-word;border-radius:calc(var(--game-width)*.007)}
body.gameplay .choice .letter{font-size:1.1em;flex:0 0 1.4em;padding:.1em;text-align:center;border-radius:.25em}
body.gameplay .submit-actions{grid-area:auto;display:flex;min-height:0;margin:0;padding:0}
body.gameplay .submit-actions button{font-size:calc(var(--game-width)*.021*var(--text-fit));line-height:1.15;min-height:0;min-width:0;width:100%;height:100%;padding:calc(var(--game-width)*.006)}
body.gameplay .answer-state{grid-area:auto;flex:none;font-size:calc(var(--game-width)*.011);line-height:1.15;margin:0}
body.gameplay .game-utilities{flex:none;padding:calc(var(--game-width)*.004) calc(var(--game-width)*.008);height:calc(var(--game-width)*.052);min-height:0}
body.gameplay .game-utilities:empty{display:none;height:0;padding:0}
body.gameplay .lifelines{display:grid;grid-template-columns:max-content minmax(0,1fr);grid-template-rows:1fr auto;align-items:center;height:100%;margin:0;padding:0;border:0;border-radius:0;column-gap:calc(var(--game-width)*.012);row-gap:0;background:#fff;box-shadow:none}
body.gameplay .lifeline-title{grid-column:1;grid-row:1;gap:calc(var(--game-width)*.006);flex-wrap:nowrap}
body.gameplay .lifeline-title strong{font-size:calc(var(--game-width)*.021);line-height:1.1;white-space:nowrap}
body.gameplay .lifeline-title>.ui-icon{width:calc(var(--game-width)*.028);height:calc(var(--game-width)*.028)}
body.gameplay .lifelines>small{display:none}
body.gameplay .lifeline-buttons{grid-column:2;grid-row:1;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:calc(var(--game-width)*.006);height:100%;margin:0}
body.gameplay .lifeline-buttons button{font-size:calc(var(--game-width)*.014);line-height:1.15;min-height:0;height:100%;padding:calc(var(--game-width)*.003);gap:calc(var(--game-width)*.004);flex-direction:row;border-radius:calc(var(--game-width)*.007)}
body.gameplay .lifeline-buttons .ui-icon{width:calc(var(--game-width)*.024);height:calc(var(--game-width)*.024)}
body.gameplay .lifelines .scoring-note{grid-column:1/-1;grid-row:2;font-size:calc(var(--game-width)*.009);line-height:1.1;margin:calc(var(--game-width)*.002) 0 0}
/* Same footer dimensions, larger links distributed edge to edge, vertically centered. */
body.gameplay #app>.site-footer{flex:0 0 var(--footer-height);height:var(--footer-height);min-height:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0 calc(var(--game-width)*.008);border-radius:0 0 10px 10px}
body.gameplay .site-footer>strong,body.gameplay .site-footer>small{display:none}
body.gameplay .site-footer nav{height:100%;display:flex;align-items:center;justify-content:space-between;align-content:center;gap:0 calc(var(--game-width)*.005);flex-wrap:nowrap}
body.gameplay #app>.site-footer a{display:flex;align-items:center;justify-content:center;font-size:calc(var(--game-width)*.016);line-height:1.15;min-height:0;white-space:nowrap;font-weight:400}
/* UAT is in page flow above lifelines. It never overlays or narrows gameplay. */
.uat-area{position:static;transform:none;width:100%;max-width:none;margin:0;padding:0 14px 14px;background:#f0f7ff;border:1px solid #b5d8f8;border-radius:10px;box-shadow:none;flex:none;overflow:visible}
.uat-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#071b49;color:#fff;margin:0 -14px 10px;padding:10px 14px;border-radius:9px 9px 0 0}
.uat-heading h2{font-size:25px;line-height:1.15;margin:0}
.uat-heading button{min-height:44px;font-size:18px;padding:5px 10px}
.uat-area .review-checks{margin:10px 0 0;padding:10px;border:1px solid #b5d8f8;background:#fff;border-radius:10px;min-width:0}
.uat-area .review-checks legend{font-size:18px;line-height:1.3;font-weight:600;max-width:100%}
.review-body{display:grid;grid-template-columns:minmax(0,1.8fr) minmax(0,1fr);gap:16px}
.uat-area .review-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.uat-area .review-grid label{display:flex;align-items:center;gap:10px;padding:10px;min-height:64px;border:1px solid #b5d8f8;border-radius:10px;background:#edf6ff;font-size:18px;line-height:1.25;font-weight:400;touch-action:manipulation;cursor:pointer}
.uat-area .review-grid label b,.uat-area .review-grid label span{font-weight:400}
.uat-area .review-grid input{width:28px;height:28px;flex:0 0 28px;margin:0;padding:0;accent-color:#087f52}
.uat-area .review-grid label:has(input:checked){background:#dcf5e8;border:2px solid #087f52;padding:9px}
.review-comment-label{display:flex;flex-direction:column;gap:7px;font-size:18px;font-weight:700;line-height:1.3}
.review-comment-label textarea{width:100%;min-height:100px;flex:1;padding:10px;font-size:18px;line-height:1.35;font-weight:400;resize:vertical}
.uat-area .review-status{font-size:14px!important;line-height:1.3!important;margin:7px 0 0!important;min-height:0}
.uat-area .review-status:empty{display:none}
.uat-actions{display:flex;justify-content:flex-end;margin-top:10px}
.uat-actions button{min-height:44px;min-width:110px;font-size:18px;padding:8px 20px}
body.gameplay .uat-area{width:100%;margin:0;flex:none}
body.portrait-game #siteFrame{--header-height:calc(var(--game-width)*.15);--footer-height:calc(var(--game-width)*.09)}
body.portrait-game #siteHeader{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:1fr 1fr;gap:calc(var(--game-width)*.007);padding:calc(var(--game-width)*.006) calc(var(--game-width)*.01);height:var(--header-height);min-height:0}
body.portrait-game #siteHeader .brand{grid-column:1;grid-row:1;font-size:calc(var(--game-width)*.047)}
body.portrait-game #userAcceptanceBtn{grid-column:2;grid-row:1;font-size:calc(var(--game-width)*.032);min-height:0;height:100%;padding:calc(var(--game-width)*.006);border-radius:calc(var(--game-width)*.012)}
body.portrait-game #helpBtn{grid-column:2;grid-row:2;font-size:calc(var(--game-width)*.027);min-height:0;height:100%;padding:calc(var(--game-width)*.006)}
body.portrait-game #headerStatus{grid-column:1;grid-row:2;font-size:calc(var(--game-width)*.027);gap:calc(var(--game-width)*.007);line-height:1.1}
body.portrait-game #headerStatus small{font-size:calc(var(--game-width)*.024);line-height:1.1}
body.portrait-game #headerStatus .audio-toggle{font-size:calc(var(--game-width)*.025);min-height:0;padding:calc(var(--game-width)*.004);gap:1px}
body.portrait-game .timer{font-size:calc(var(--game-width)*.043)}
body.portrait-game .game-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto auto auto;grid-template-areas:'story' 'scene' 'facts' 'answers' 'status';gap:calc(var(--game-width)*.009);padding:calc(var(--game-width)*.009);flex:1;min-height:0!important}
body.portrait-game .visual-panel,body.portrait-game .answer-panel{display:contents}
body.portrait-game .story-block{grid-area:story;padding:calc(var(--game-width)*.008)}
body.portrait-game .scene-banner{grid-area:scene;align-self:stretch;min-height:0;height:100%;width:100%;border-radius:calc(var(--game-width)*.012)}
body.portrait-game .facts-block{grid-area:facts;padding:calc(var(--game-width)*.008)}
body.portrait-game .story-block h1,body.portrait-game .facts-block h2{font-size:calc(var(--game-width)*.046*var(--text-fit));line-height:1.05;margin:0 0 calc(var(--game-width)*.004)}
body.portrait-game .story-block p,body.portrait-game .facts-block p{font-size:calc(var(--game-width)*.036*var(--text-fit));line-height:1.16;font-weight:400}
body.portrait-game .answer-panel>.answer-heading{display:none!important}
body.portrait-game .choices{grid-area:answers;grid-template-columns:minmax(0,1fr);grid-template-rows:none;grid-auto-rows:auto;gap:calc(var(--game-width)*.006);flex:none}
body.portrait-game .choice{font-size:calc(var(--game-width)*.035*var(--text-fit));line-height:1.13;min-height:calc(var(--game-width)*.064);padding:calc(var(--game-width)*.005);gap:calc(var(--game-width)*.008);border-radius:calc(var(--game-width)*.011)}
body.portrait-game .choice .letter{font-size:1.15em;flex-basis:1.5em;padding:.1em}
body.portrait-game .submit-actions{min-height:calc(var(--game-width)*.062);margin:0}
body.portrait-game .submit-actions button{font-size:calc(var(--game-width)*.045*var(--text-fit));min-height:0;padding:calc(var(--game-width)*.005)}
body.portrait-game .answer-state{grid-area:status;font-size:calc(var(--game-width)*.025);line-height:1.1}
body.portrait-game .game-utilities{height:calc(var(--game-width)*.09);padding:calc(var(--game-width)*.005) calc(var(--game-width)*.008)}
body.portrait-game .lifelines{grid-template-columns:max-content minmax(0,1fr);grid-template-rows:1fr;gap:calc(var(--game-width)*.009);height:100%;padding:0}
body.portrait-game .lifeline-title{grid-column:1;grid-row:1;gap:calc(var(--game-width)*.005)}
body.portrait-game .lifeline-title strong{font-size:calc(var(--game-width)*.032)}
body.portrait-game .lifeline-title>.ui-icon{width:calc(var(--game-width)*.044);height:calc(var(--game-width)*.044)}
body.portrait-game .lifeline-buttons{grid-column:2;grid-row:1;gap:calc(var(--game-width)*.006);height:100%;margin:0}
body.portrait-game .lifeline-buttons button{font-size:calc(var(--game-width)*.027);line-height:1.1;min-height:0;height:100%;padding:calc(var(--game-width)*.003);gap:calc(var(--game-width)*.003);border-radius:calc(var(--game-width)*.012)}
body.portrait-game .lifeline-buttons .ui-icon{width:calc(var(--game-width)*.029);height:calc(var(--game-width)*.029)}
body.portrait-game .lifelines .scoring-note{display:none}
body.portrait-game #app>.site-footer{height:var(--footer-height);min-height:0;flex:0 0 var(--footer-height);display:flex;align-items:center;padding:0 calc(var(--game-width)*.01)}
body.portrait-game .site-footer nav{display:flex;flex-wrap:wrap;justify-content:space-evenly;align-content:center;align-items:center;height:100%;gap:calc(var(--game-width)*.006) calc(var(--game-width)*.018)}
body.portrait-game #app>.site-footer a{font-size:calc(var(--game-width)*.029);line-height:1.1;min-height:0;display:flex;align-items:center}
@media(max-width:1000px){
 .review-body{grid-template-columns:minmax(0,1fr)}
 .uat-area .review-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .uat-heading{gap:8px;padding:8px 12px}
 .uat-heading h2{font-size:21px}
 .uat-area{padding:0 10px 10px}
 .uat-heading{margin:0 -10px 8px}
 .uat-heading button{font-size:16px;padding:5px 8px}
 .uat-area .review-grid label{font-size:16px;min-height:60px;padding:8px;gap:8px}
 .uat-area .review-grid label:has(input:checked){padding:7px}
 .uat-area .review-grid input{width:26px;height:26px;flex-basis:26px}
 .uat-area .review-checks legend{font-size:16px}
 .review-comment-label,.review-comment-label textarea{font-size:17px}
}

/* 1018.11a: use the document as the only scroll container while UAT is open.
   The body's normal gameplay overflow lock must not trap the expanded page. */
html.uat-scroll-open{height:auto;max-height:none;overflow-x:hidden;overflow-y:auto;scroll-behavior:auto}
html.uat-scroll-open body.uat-open{height:auto;max-height:none;min-height:100dvh;overflow:visible}
html.uat-scroll-open body.gameplay.uat-open #siteFrame{position:static;overflow:visible;max-height:none;transform:none}
html.uat-scroll-open body.gameplay.uat-open #app{overflow:visible;max-height:none}

/* 1019.11c: restore the landscape home header and use a single-row footer. */
body.home-page #siteHeader{display:none}
@media(orientation:landscape){
 body.home-page #siteFrame{--home-width:min(calc(100vw - 8px),calc((100svh - 8px)*16/9));--home-height:calc(var(--home-width)*9/16);--home-header:calc(var(--home-width)*.045);--home-footer:calc(var(--home-width)*.04);width:var(--home-width);height:var(--home-height);margin:4px auto;display:flex;flex-direction:column;overflow:hidden;border:0;border-radius:10px}
 body.home-page #siteHeader{display:flex;flex:0 0 var(--home-header);height:var(--home-header);min-height:0;align-items:center;justify-content:space-between;padding:0 calc(var(--home-width)*.012);gap:calc(var(--home-width)*.01)}
 body.home-page #siteHeader .brand{font-size:calc(var(--home-width)*.023);min-height:0;padding:0;line-height:1.1;white-space:nowrap}
 body.home-page #siteHeader #helpBtn{font-size:calc(var(--home-width)*.014);min-height:0;padding:calc(var(--home-width)*.005) calc(var(--home-width)*.01);line-height:1.2}
 body.home-page #siteHeader #headerStatus{display:none}
 body.home-page #app{display:block;width:100%;height:calc(var(--home-height) - var(--home-header));min-height:0;padding:0;flex:none;overflow:hidden}
 body.home-page .home-art{width:100%;height:100%;margin:0;display:flex;flex-direction:column;border:0}
 body.home-page .home-window{flex:none;height:calc(var(--home-height) - var(--home-header) - var(--home-footer));width:calc((var(--home-height) - var(--home-header) - var(--home-footer))*1672/882);max-width:100%;margin:0 auto;aspect-ratio:1672/882}
 body.home-page .home-canvas{container-type:inline-size}
 body.home-page .home-art .home-footer{position:static;flex:0 0 var(--home-footer);height:var(--home-footer);min-height:0;width:100%;margin:0}
 body.home-page .home-art .home-footer .site-footer{display:flex;align-items:center;justify-content:center;min-height:0;height:100%;padding:0 calc(var(--home-width)*.012);gap:0}
 body.home-page .home-footer .site-footer>strong{display:none}
 body.home-page .home-art .home-footer .site-footer nav{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:calc(var(--home-width)*.008);width:100%;height:100%;margin:0}
 body.home-page .home-art .home-footer .site-footer a{display:flex;align-items:center;justify-content:center;font-size:calc(var(--home-width)*.016);line-height:1.15;min-height:0;white-space:nowrap;font-weight:400}
}

/* Automatic answer progression and timed group lobby. */
.selection-status{display:flex;align-items:center;justify-content:center;width:100%;height:100%;padding:.4em;border-radius:.5em;background:#e4f1ff;color:#10274c;font-size:inherit;text-align:center;line-height:1.2}
body.gameplay .selection-status{font-size:calc(var(--game-width)*.019*var(--text-fit))}
body.portrait-game .selection-status{font-size:calc(var(--game-width)*.036*var(--text-fit))}
.lobby-clock{background:#fff3e4;border-radius:10px;padding:12px;font-size:22px}
.lobby-clock strong{font-variant-numeric:tabular-nums;font-size:30px}
.lobby-count{font-size:20px}

/* 1019.15 document corrections. */
.site-footer a,.home-art .home-footer .site-footer a{color:#fff!important;text-decoration:none!important;font-weight:400}
.site-footer a:focus-visible{outline:2px solid #fff;outline-offset:3px}
.home-art #artLogin{border:0!important;box-shadow:none!important;outline:none;border-radius:10px;background:#05244d}
.home-art #artLogin:focus-visible{outline:2px solid white;outline-offset:-3px}
#siteFrame,body.gameplay #siteFrame,body.home-page #siteFrame{border:1px solid #071b49}
.home-art #heroOption1{left:63.4%;top:45.3%;width:35.5%;height:4.8%}
.home-art #heroOption2{left:63.4%;top:50.5%;width:35.5%;height:4.9%}
.home-art #heroOption3{left:63.4%;top:55.8%;width:35.5%;height:4.6%}
@media(orientation:portrait){
 .home-art #heroOption1{left:2%;top:79.7%;width:96%;height:2.7%}
 .home-art #heroOption2{left:2%;top:82.8%;width:96%;height:2.7%}
 .home-art #heroOption3{left:2%;top:85.9%;width:96%;height:2.7%}
}
@media(min-width:900px){body[data-view=setup] .setup-panel>.formgrid:has(#playerCount){grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,.8fr)}}
body:not(.home-page) #accountBtn{display:none}
body.home-page #accountBtn{font-size:calc(var(--home-width,100vw)*.012);min-height:0;padding:.5em .7em;white-space:nowrap}
body.home-page #helpBtn{margin-left:auto}
.account-panel{max-width:820px;margin:auto}
.account-panel .field input{width:100%}
.account-tabs{display:flex;gap:10px;margin:14px 0}
.form-error{color:#a21b25;min-height:1.3em}
.group-list{display:grid;gap:14px;margin:18px 0}
.saved-group-card{border:1px solid #a4c9e6;border-radius:12px;padding:16px}
.saved-group-card h2{margin:0 0 8px}
.member-admin-list{display:grid;gap:12px;padding:0;list-style:none}
.member-admin-list li{display:grid;grid-template-columns:minmax(120px,1fr) minmax(150px,1.4fr) auto auto;gap:10px;align-items:center;padding:10px;border-bottom:1px solid #d4e1ee}
.member-admin-list input{width:100%;min-width:0}
@media(max-width:650px){.member-admin-list li{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.member-admin-list li>input{grid-column:2}.member-admin-list button{min-height:44px}}
/* Header order: Admin, How It Works, Log In. Access remains account-controlled. */
#adminBtn[hidden]{display:none!important}
body:not(.home-page) #adminBtn{display:none}
body.home-page #adminBtn{margin-left:auto;min-height:0;padding:.5em .7em;font-size:calc(var(--home-width,100vw)*.012);white-space:nowrap}
body.home-page #siteHeader #helpBtn{margin-left:0}
body.home-page #adminBtn[hidden]+#helpBtn{margin-left:auto}
/* Full-width native homepage: shared grid edges, proportional scene crops, readable captions. */
body.home-page{height:100svh;overflow:hidden}
body.home-page #siteFrame{--home-width:min(calc(100vw - 4px),calc((100svh - 4px)*16/9));--home-height:calc(var(--home-width)*9/16);--home-header:calc(var(--home-width)*.04);--home-footer:calc(var(--home-width)*.034);width:var(--home-width);height:var(--home-height);margin:2px auto;display:flex;flex-direction:column;border:1px solid #1764a3;border-radius:0;overflow:hidden}
body.home-page #siteHeader{display:flex;flex:0 0 var(--home-header);height:var(--home-header);min-height:0;gap:calc(var(--home-width)*.01);padding:0 calc(var(--home-width)*.012);border-radius:0;align-items:center}
body.home-page #siteHeader .brand{font-size:calc(var(--home-width)*.023);min-height:0;padding:0;line-height:1.1;white-space:nowrap}
body.home-page #siteHeader #helpBtn,body.home-page #siteHeader #adminBtn,body.home-page #siteHeader #accountBtn{display:block;font-size:calc(var(--home-width)*.014);min-height:0;padding:.35em .5em;white-space:nowrap}
body.home-page #siteHeader #accountBtn{order:4;border:0;outline:none;box-shadow:none}
body.home-page #siteHeader #adminBtn{order:2;margin-left:auto}
body.home-page #siteHeader #helpBtn{order:3}
body.home-page #adminBtn[hidden]+#helpBtn{margin-left:auto}
body.home-page #headerStatus{display:none}
body.home-page #app{display:flex;flex:1;flex-direction:column;height:auto;min-height:0;width:100%;padding:0;overflow:hidden}
.home-content{display:flex;flex:1;min-height:0;flex-direction:column;gap:calc(var(--home-width)*.004);width:100%;background:#fff}
.home-hero{flex:0 0 calc(var(--home-width)*.16);position:relative;min-height:0;overflow:hidden}
.home-crop-wrap{position:relative;display:block;width:100%;height:100%;min-height:0;overflow:hidden;flex:1}
.home-crop{display:block;width:100%;height:100%}
.portrait-home{display:none}
.hero-hotspot{position:absolute;z-index:1;background:transparent;color:transparent;border:0;min-height:0;padding:0;font-size:0;border-radius:12px}
.hero-hotspot:focus-visible{outline:3px solid #071b49;outline-offset:-3px}
.hero-play{left:16.8%;top:73.5%;width:17%;height:23%}
.hero-practice{left:33.9%;top:73.5%;width:16.3%;height:23%}
.home-grid{display:grid;flex:1;min-height:0;grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));grid-template-areas:'bully custody choices' 'street spouse crash';gap:calc(var(--home-width)*.004);width:100%}
.home-bully{grid-area:bully}.home-custody{grid-area:custody}.home-street{grid-area:street}.home-spouse{grid-area:spouse}.home-crash{grid-area:crash}
.home-scenario{display:flex;min-width:0;min-height:0;flex-direction:column;gap:0;padding:0;border:0;border-radius:0;background:#fff;color:#071b49;overflow:hidden;text-align:left}
.home-scenario-caption{display:flex;align-items:center;gap:.25em;flex:0 0 calc(var(--home-width)*.027);height:calc(var(--home-width)*.027);width:100%;padding:0 calc(var(--home-width)*.006);font-family:'Arial Narrow',Arial,sans-serif;font-size:calc(var(--home-width)*.019);font-weight:800;line-height:1.06;letter-spacing:-.035em}
.home-scenario-caption>span:first-child{flex:1;min-width:0;white-space:nowrap}
.home-arrow{display:flex;align-items:center;justify-content:center;flex:0 0 1.15em;width:1.15em;height:1.15em;border-radius:50%;background:#071b49;color:#fff;font-weight:400}
.home-hit-run{grid-area:choices;display:flex;flex-direction:column;min-height:0;gap:calc(var(--home-width)*.003);padding:0;background:white}
.home-hit-run h2{margin:0;flex:none;padding:.35em .2em;background:#071b49;color:white;font-size:calc(var(--home-width)*.016);line-height:1.05;text-align:center;white-space:nowrap}
.home-hit-run button{display:flex;align-items:center;flex:1;min-height:0;margin:0;border:0;border-radius:calc(var(--home-width)*.01);padding:.1em .6em;background:#91dff7;color:#071b49;font-family:'Arial Narrow',Arial,sans-serif;font-size:calc(var(--home-width)*.0145);font-weight:800;text-align:left;line-height:1.05;letter-spacing:-.025em}
.home-play-actions{display:grid;flex:0 0 calc(var(--home-width)*.045);height:calc(var(--home-width)*.045);grid-template-columns:repeat(3,minmax(0,1fr));gap:calc(var(--home-width)*.014);padding:0 0 calc(var(--home-width)*.003)}
.home-play-actions button{display:flex;align-items:center;justify-content:center;gap:.35em;min-width:0;min-height:0;padding:.15em;border-radius:clamp(5px,.7vw,12px);font-size:calc(var(--home-width)*.022);font-weight:750;color:white;line-height:1.1}
.home-solo{background:#ef0030}.home-create{background:#071b49}.home-join{background:#ff7000}
body.home-page #app>.site-footer{flex:0 0 var(--home-footer);height:var(--home-footer);min-height:0;display:flex;align-items:center;padding:0 calc(var(--home-width)*.012);gap:0;border-radius:0}
body.home-page #app>.site-footer>strong{display:none}
body.home-page .site-footer nav{display:flex;align-items:center;justify-content:space-between;flex-wrap:nowrap;width:100%;height:100%;gap:0}
body.home-page .site-footer a{font-size:calc(var(--home-width)*.014);white-space:nowrap;line-height:1.1;display:flex;align-items:center;min-height:0}
.site-footer strong span,.site-footer strong em{color:#ff781c!important;font-style:normal}
@media(orientation:portrait){
 body.home-page #siteFrame{--home-width:min(calc(100vw - 4px),calc((100svh - 4px)*9/16));--home-height:calc(var(--home-width)*16/9);--home-header:calc(var(--home-width)*.085);--home-footer:calc(var(--home-width)*.16)}
 body.home-page #siteHeader{gap:calc(var(--home-width)*.006);padding:0 calc(var(--home-width)*.008);flex-wrap:nowrap}
 body.home-page #siteHeader .brand{font-size:calc(var(--home-width)*.041);flex:0 1 auto;width:auto;max-width:none;white-space:nowrap}
 body.home-page #siteHeader #helpBtn,body.home-page #siteHeader #adminBtn,body.home-page #siteHeader #accountBtn{font-size:calc(var(--home-width)*.026);padding:.4em .3em}
 .landscape-home{display:none}.portrait-home{display:block}
 .home-hero{flex-basis:calc(var(--home-width)*.287)}
 .hero-play{left:4.4%;top:72%;width:27.3%;height:25%}.hero-practice{left:32.3%;top:72%;width:24%;height:25%}
 .home-content{gap:calc(var(--home-width)*.006)}
 .home-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:minmax(0,1fr) minmax(0,1fr) minmax(0,.95fr) calc(var(--home-width)*.23);grid-template-areas:'bully custody' 'street spouse' 'crash crash' 'choices choices';gap:calc(var(--home-width)*.006)}
 .home-scenario-caption{height:calc(var(--home-width)*.10);flex-basis:calc(var(--home-width)*.10);padding:0 calc(var(--home-width)*.008);font-size:calc(var(--home-width)*.042);line-height:1.05;letter-spacing:-.03em}
 .home-scenario-caption>span:first-child{white-space:normal}
 .home-arrow{display:none}
 .home-crash .home-scenario-caption{height:calc(var(--home-width)*.06);flex-basis:calc(var(--home-width)*.06);font-size:calc(var(--home-width)*.042)}
 .home-hit-run{gap:calc(var(--home-width)*.003)}
 .home-hit-run h2{font-size:calc(var(--home-width)*.036);padding:.25em .2em}
 .home-hit-run button{font-size:calc(var(--home-width)*.035);padding:.05em .7em;border-radius:16px}
 .home-play-actions{height:calc(var(--home-width)*.09);flex-basis:calc(var(--home-width)*.09);gap:calc(var(--home-width)*.012);padding:0 0 calc(var(--home-width)*.004)}
 .home-play-actions button{font-size:calc(var(--home-width)*.035);gap:.25em}
 .site-footer{display:flex;flex-direction:column;align-items:stretch;gap:3px;padding:5px 7px;min-height:60px}
 .site-footer>strong{display:block;text-align:left;align-self:flex-start;font-size:clamp(14px,3.8vw,18px);line-height:1.1;margin:0}
 .site-footer nav{display:flex;flex-wrap:wrap;align-content:center;align-items:center;justify-content:space-between;gap:0;width:100%}
 .site-footer nav a{flex:0 0 25%;justify-content:center;white-space:nowrap;line-height:1.25;font-size:clamp(10px,3vw,14px);min-height:0;padding:2px 0}
 .site-footer nav a:nth-child(n+5){flex-basis:33.333%}
 body.home-page #app>.site-footer,body.portrait-game #app>.site-footer{display:flex;flex-direction:column;align-items:stretch;justify-content:center;padding:calc(var(--home-width,var(--game-width))*.008);gap:calc(var(--home-width,var(--game-width))*.005)}
 body.home-page #app>.site-footer>strong,body.portrait-game #app>.site-footer>strong{display:block;align-self:flex-start;font-size:calc(var(--home-width,var(--game-width))*.037);line-height:1.1}
 body.home-page .site-footer nav,body.portrait-game .site-footer nav{height:auto;flex:1;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0}
 body.home-page .site-footer nav a,body.portrait-game #app>.site-footer nav a{flex:0 0 25%;font-size:calc(var(--home-width,var(--game-width))*.031);line-height:1.1;padding:0;justify-content:center;min-height:0}
 body.home-page .site-footer nav a:nth-child(n+5),body.portrait-game #app>.site-footer nav a:nth-child(n+5){flex-basis:33.333%}
 body.portrait-game #siteFrame{--footer-height:calc(var(--game-width)*.17)}
}

.owner-table-wrap{overflow-x:auto}.owner-users-table{width:100%;border-collapse:collapse;text-align:left}.owner-users-table th,.owner-users-table td{padding:12px;border-bottom:1px solid #ccd7e4}.owner-users-table button{min-height:44px}

/* Keep Log In readable while clearly unavailable in both orientations. */
#accountBtn.login-unavailable{opacity:1;cursor:not-allowed;color:#fff;display:flex;align-items:center;gap:.35em}
.login-cross{color:#ff3535;font-size:1.15em;font-weight:900;line-height:1;text-shadow:0 1px 1px #000}
#accountBtn:disabled:hover{transform:none}
.submission-message{white-space:pre-wrap;overflow-wrap:anywhere}
/* Version 3: one quiet diagonal line, rather than a separate X. */
#accountBtn.login-unavailable{position:relative;display:inline-flex;align-items:center;justify-content:center;opacity:.75;overflow:visible}
#accountBtn.login-unavailable::after{content:'';position:absolute;left:8%;right:8%;top:48%;height:2px;background:#ef243b;transform:rotate(-18deg);pointer-events:none}
.login-cross{display:none!important}
.home-play-actions .ui-icon{color:white;stroke:white;width:1.2em;height:1.2em;flex:none}
/* Every unusable lifeline has both visual cues, including when all uses are gone. */
body.gameplay .lifeline-buttons button:disabled,body.gameplay .lifeline-buttons .lifeline-used,body.gameplay .lifeline-buttons .lifeline-unavailable{position:relative;opacity:.48!important;filter:saturate(.4);cursor:not-allowed}
body.gameplay .lifeline-buttons .lifeline-used::after,body.gameplay .lifeline-buttons .lifeline-unavailable::after{content:'';position:absolute;left:6%;top:48%;width:88%;height:3px;background:#e51d30;transform:rotate(-10deg);pointer-events:none;filter:none}
/* Counts stay directly beside their category names in all orientations. */
.setup-panel .category-list label{display:flex;align-items:center;justify-content:flex-start;gap:.45em;min-width:0}
.setup-panel .category-list label>span{min-width:0;overflow-wrap:anywhere}
.setup-panel .category-list label small{display:inline!important;flex:none;margin:0;font-size:.85em;white-space:nowrap}
.setup-top-row{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,.7fr);gap:18px;align-items:end}
.setup-top-row .audio-setting{margin:0;min-width:0}.setup-top-row .mic-option{grid-column:auto;justify-self:stretch;align-self:end}.setup-top-row .mic-option button{width:100%}
@media(orientation:landscape){
 body:not(.home-page):not(.gameplay) #siteFrame{width:min(calc(100vw - 8px),calc((100svh - 8px)*16/9));min-height:calc(min(calc(100vw - 8px),calc((100svh - 8px)*16/9))*9/16);margin:4px auto;display:flex;flex-direction:column}
 body:not(.home-page):not(.gameplay) #app{display:flex;flex:1;flex-direction:column;min-height:0}
 body:not(.home-page):not(.gameplay) #app>.shell{flex:1;min-height:0}
 body[data-view=setup] #siteFrame{height:calc(var(--setup-width,100vw)*9/16);min-height:0;overflow:hidden;transform:none}
 body[data-view=setup] #siteHeader{height:calc(var(--setup-width,100vw)*.048);min-height:0;flex:none}
 body[data-view=setup] #app>.shell>.setup-panel{height:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:auto auto auto minmax(0,1fr) auto;align-content:stretch;align-items:start;padding:calc(var(--setup-width)*.010) calc(var(--setup-width)*.016);gap:calc(var(--setup-width)*.009) calc(var(--setup-width)*.014);overflow:auto}
 body[data-view=setup] .setup-top-row{gap:calc(var(--setup-width)*.014)}
 body[data-view=setup] .setup-panel .field,body[data-view=setup] .setup-panel .segment-field legend{font-size:clamp(10px,calc(var(--setup-width)*.012),20px)}
 body[data-view=setup] .setup-panel .field input{font-size:clamp(12px,calc(var(--setup-width)*.014),22px);padding:.4em .65em;min-height:0}
 body[data-view=setup] .setup-panel .segments button,body[data-view=setup] .setup-top-row button{min-height:0;font-size:clamp(11px,calc(var(--setup-width)*.012),20px);padding:.55em .5em}
 body[data-view=setup] .setup-panel .segment-field:has(#rounds){grid-column:1/-1}
 body[data-view=setup] .setup-panel .categories{padding:.4em .6em;align-self:stretch;min-height:0}
 body[data-view=setup] .setup-panel .category-list{grid-template-columns:repeat(4,minmax(0,1fr));gap:calc(var(--setup-width)*.008);margin:0}
 body[data-view=setup] .setup-panel .category-list label{font-size:clamp(10px,calc(var(--setup-width)*.0115),19px);line-height:1.15}
 body[data-view=setup] .setup-panel .category-list input{width:1.1em;height:1.1em;flex:none}
 body[data-view=setup] .setup-panel>.actions{align-self:end}
 body[data-view=setup] .setup-panel>.actions button{min-height:0;padding:.55em;font-size:clamp(12px,calc(var(--setup-width)*.014),22px)}
 body[data-view=setup] .setup-panel:has(.group-fields){grid-template-rows:auto auto auto auto minmax(0,1fr) auto}
 body[data-view=setup] .setup-panel>.group-fields{grid-template-columns:1fr 1fr;gap:18px}
 /* Same footer structure, full width and vertically centered on every page. */
 body .site-footer,body.home-page #app>.site-footer,body.gameplay #app>.site-footer{box-sizing:border-box;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:clamp(8px,1.3vw,24px);padding:6px clamp(8px,1vw,18px);background:#071b49;flex:none;min-height:38px;height:auto;border-radius:0}
 body.home-page #app>.site-footer{height:var(--home-footer);min-height:0}
 body .site-footer>strong,body.home-page #app>.site-footer>strong,body.gameplay #app>.site-footer>strong{display:block!important;flex:0 0 auto;align-self:center;white-space:nowrap;line-height:1;font-size:clamp(12px,1.25vw,21px);margin:0}
 body .site-footer nav,body.home-page .site-footer nav,body.gameplay .site-footer nav{display:flex;flex:1;min-width:0;align-items:center;justify-content:space-between;flex-wrap:nowrap;gap:clamp(6px,.8vw,16px);width:auto;height:auto}
 body .site-footer nav a,body.home-page .site-footer nav a,body.gameplay .site-footer nav a{flex:0 1 auto;display:block;margin:0;padding:0;white-space:nowrap;text-decoration:none;font-weight:400;line-height:1.15;color:white;font-size:clamp(10px,1.05vw,18px)}
 body.home-page .home-hit-run button{font-size:calc(var(--home-width)*.016)}
}
@media(orientation:portrait){
 .setup-top-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:9px}.setup-top-row .field{grid-column:1/-1}.setup-top-row .mic-option{grid-column:auto}
 .setup-panel .category-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.setup-panel .category-list label{font-size:12px;line-height:1.15}.setup-panel .category-list input{width:20px;height:20px;flex:none}
}

/* Version 4 corrections: keep setup centered when fit-screen is active. */
body.fit-screen[data-view=setup] #siteFrame{position:relative;left:auto;top:auto;transform:none;margin:4px auto;max-width:calc(100vw - 8px)}
body.gameplay .situation-number{font-size:.58em;white-space:nowrap;font-weight:600}
body.gameplay .scene-crop{overflow:hidden}
@media(orientation:portrait){
 body[data-view=setup] .setup-panel>.segment-field{grid-column:1/-1}
}

/* Version 5: fill the picture area and order choices down each column. */
body.gameplay .scene-banner .scene-art,body.gameplay .scene-banner:has(img[src*="scene-163-v1016-5"]) .scene-art{object-fit:cover;object-position:center;display:block}
body.gameplay .choices>[data-slot="0"]{grid-column:1;grid-row:1}
body.gameplay .choices>[data-slot="1"]{grid-column:1;grid-row:2}
body.gameplay .choices>[data-slot="2"]{grid-column:1;grid-row:3}
body.gameplay .choices>[data-slot="3"]{grid-column:2;grid-row:1}
body.gameplay .choices>[data-slot="4"]{grid-column:2;grid-row:2}
body.gameplay .choices>.submit-actions{grid-column:2;grid-row:3}
body.portrait-game .choices>[data-slot],body.portrait-game .choices>.submit-actions{grid-column:1;grid-row:auto}
.practice-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:6px 0;font-size:14px}
.practice-actions button{min-height:36px;padding:6px 14px}
#practiceFeedback{width:min(900px,calc(100vw - 24px));max-height:90dvh;overflow:auto;border:1px solid #aabbd3;border-radius:14px;padding:20px;color:#0a1d43}
#practiceFeedback::backdrop{background:#071b4980}
#practiceFeedback .review-item{margin:12px 0}
#practiceFeedback .actions{position:sticky;bottom:-20px;background:white;padding:12px 0;margin-bottom:0}
body.portrait-game .practice-actions{font-size:10px;gap:5px}
body.portrait-game .practice-actions button{font-size:12px;min-height:30px;padding:5px 10px}

/* Build 19 uses full-resolution standalone gameplay art for homepage scenes. */
body.gameplay .scene-banner:has(.gameplay-dedicated){background:transparent}
body.gameplay .scene-banner .gameplay-dedicated{width:100%;height:100%;object-fit:cover;object-position:center;image-rendering:auto}

body.portrait-game:has(.gameplay-dedicated) .game-utilities{height:calc(var(--game-width)*.12)}

/* Build 20: preserve all six fields and group the legal calculation. */
.score-table-wrap{width:100%;max-width:100%;overflow-x:auto;border:1px solid #c8d6e8;border-radius:10px;margin:22px 0 14px}
.organized-scores{min-width:650px;width:100%;margin:0;table-layout:fixed;border-collapse:collapse;font-variant-numeric:tabular-nums}
.organized-scores th,.organized-scores td{text-align:center;padding:14px 12px;border-bottom:1px solid #d9e2ee;vertical-align:middle;overflow-wrap:anywhere}
.organized-scores .score-groups th:first-child,.organized-scores tbody td:first-child{width:22%;text-align:left;font-weight:700}
.organized-scores thead th{background:#eaf1fc;color:#0a1d43;line-height:1.3;font-size:14px}
.organized-scores .score-groups th{background:#071b49;color:white;font-size:16px}
.organized-scores .total-score{background:#e1edfc;font-weight:800;border-left:2px solid #b2c9e5;border-right:2px solid #b2c9e5}
.organized-scores tbody tr:nth-child(even){background:#f7f9fd}
.organized-scores .moral-score{border-left:2px solid #c8d6e8}
.organized-scores tbody td.moral-score{background:#fff4e6}
.organized-scores tbody tr:last-child td{border-bottom:0}
.score-scroll-note{display:none}
@media(max-width:700px){.score-scroll-note{display:block;font-size:12px;color:#52647d;margin:0 0 18px}.organized-scores{min-width:620px}.organized-scores th,.organized-scores td{padding:12px 10px}.score-table-wrap{margin-top:16px}}
@media(max-width:700px){
 #siteFrame:has(.organized-scores) #siteHeader{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));height:auto;gap:7px;padding:8px 10px}
 #siteFrame:has(.organized-scores) #backBtn{grid-column:1;grid-row:1;justify-self:start}
 #siteFrame:has(.organized-scores) #homeBtn{grid-column:2;grid-row:1;min-width:0;font-size:12px;justify-self:end}
 #siteFrame:has(.organized-scores) #headerStatus:empty{display:none}
 #siteFrame:has(.organized-scores) #helpBtn{grid-column:1;grid-row:2;width:100%;margin:0}
 #siteFrame:has(.organized-scores) #userAcceptanceBtn{grid-column:2;grid-row:2;width:100%;font-size:11px}
}

/* Build 23: persistent Hint tile. Concealed placeholder contains no actual clue. */
body.gameplay .hint-tile{background:#f1e7fa;border-color:#a772d5;color:#653098}
body.gameplay .hint-tile .hint-copy{min-height:2.5em}
body.gameplay .hint-tile.hint-locked{background:#eeedf1;border-color:#d2cdd8;color:#77717d}
body.gameplay .hint-tile.hint-locked h2{opacity:.58}
body.gameplay .hint-tile.hint-locked .hint-copy{filter:blur(6px);opacity:.38;user-select:none;pointer-events:none}
body.gameplay .hint-tile.hint-active .hint-copy{filter:none;opacity:1}

/* Advanced Details uses a separate scrollable gallery. */
body.gallery-open{overflow:hidden}
.uat-gallery{box-sizing:border-box;width:calc(100vw - 32px);max-width:1700px;height:calc(100dvh - 32px);max-height:none;padding:20px;background:#edf4fc;color:#102343;border:2px solid #17386b;border-radius:12px;overflow:auto}
.uat-gallery::backdrop,.reviewer-name-dialog::backdrop{background:rgb(3 14 37 / .72)}
.gallery-header{position:sticky;top:-20px;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#edf4fc;padding:14px 0;border-bottom:1px solid #c1cfe2}
.gallery-header h1{font-size:1.6rem;margin:0}.gallery-intro{line-height:1.5}.uat-gallery-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;align-items:start}
.gallery-card{min-width:0;background:white;border:1px solid #c1cfe2;border-radius:10px;overflow:hidden}.gallery-image{position:relative;outline-offset:-4px;background:#dce7f3;aspect-ratio:3/2;overflow:hidden}.gallery-image img{display:block;width:100%;height:100%;object-fit:contain}
.gallery-hover{position:absolute;inset:0;padding:16px;background:rgb(4 20 48 / .94);color:white;overflow:auto;opacity:0;pointer-events:none;line-height:1.45;transition:opacity .12s}.gallery-image:hover .gallery-hover,.gallery-image:focus .gallery-hover,.gallery-image:focus-within .gallery-hover{opacity:1;pointer-events:auto}.gallery-hover p{margin-top:8px}
.gallery-situation{padding:12px;border-bottom:1px solid #d6dfeb}.gallery-situation summary{cursor:pointer;font-weight:700}.gallery-situation p{line-height:1.5}.gallery-card .review-checks{margin:0;padding:12px;border:0;min-width:0}.gallery-card legend{font-size:.9rem;line-height:1.4;padding-top:10px}.gallery-card .review-body{display:block}.gallery-card .review-grid{display:grid;grid-template-columns:1fr;gap:7px}.gallery-card .review-grid label{display:flex;align-items:center;gap:8px;font-size:.9rem}.gallery-card input[type=checkbox]{width:18px;height:18px;flex:0 0 18px}.gallery-card textarea{box-sizing:border-box;width:100%;min-height:90px;resize:vertical;font-size:1rem}.gallery-card .review-comment-label{display:block;margin-top:12px}.gallery-image-error{padding:16px}.reviewer-name-dialog{max-width:430px;width:calc(100vw - 40px);padding:24px;border:2px solid #17386b;border-radius:12px}.reviewer-name-dialog input{width:100%;box-sizing:border-box}
@media(max-width:1000px){.uat-gallery-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.uat-gallery{width:calc(100vw - 12px);height:calc(100dvh - 12px);padding:12px}.gallery-header{top:-12px;flex-wrap:wrap}.gallery-header h1{font-size:1.25rem}.uat-gallery-grid{grid-template-columns:1fr}.gallery-header button{font-size:.85rem}}

.gallery-hover,.gallery-hover p,.gallery-hover strong{color:#fff}

/* Diagnostic numbers follow the current Situation ID on every render. */
.scene-banner{position:relative}
.photo-number{position:absolute;top:8px;right:8px;z-index:3;display:inline-block;padding:5px 9px;border:1px solid white;border-radius:6px;background:#071b49;color:#fff;box-shadow:0 1px 4px rgb(0 0 0 / .4);font-family:Arial,sans-serif;font-size:clamp(12px,1.15vw,17px);font-weight:700;line-height:1.25;white-space:nowrap;pointer-events:none}
.story-block .numbered-situation-heading{text-align:left;justify-content:flex-start}
.situation-number-label{font-weight:800;text-align:left}
.gallery-situation .situation-number-label{display:inline}
.gallery-image .photo-number{font-size:14px}
.image-assignment-note{margin:0;padding:8px 12px;background:#fff1d6;color:#553700;font-size:.8rem;line-height:1.4;border-bottom:1px solid #e8d5ac}

/* Build27: portrait-only Advanced Details changes. */
.portrait-photo-label{display:none}
@media (orientation:portrait){
 .scene-banner .photo-number,.story-block .numbered-situation-heading{display:none}
 .gallery-image .photo-number{top:auto;right:auto;bottom:8px;left:8px}
 .uat-gallery .gallery-hover{display:none}
 .uat-gallery .landscape-photo-label{display:none}
 .uat-gallery .portrait-photo-label{display:inline}
}

/* Document corrections, portrait only. */
.portrait-home-link,.portrait-uat-label,.portrait-hint-copy{display:none!important}
@media (orientation:portrait){
 .site-footer>strong{display:none!important}
 .site-footer nav{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-flow:row;width:100%;column-gap:8px!important;row-gap:14px!important;text-align:left;justify-items:start;align-items:start}
 .site-footer nav a{margin:0!important;text-align:left;font-size:clamp(10px,2.6vw,14px)!important;white-space:normal}
 .site-footer .portrait-home-link{display:block!important}
 .site-footer{padding:10px!important}
 body[data-view=setup] .setup-panel{padding:12px}
 body[data-view=setup] .setup-top-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:6px;align-items:start}
 body[data-view=setup] .setup-top-row .field{grid-column:1;margin:0}
 body[data-view=setup] .setup-top-row .audio-setting{grid-column:2;margin:0}
 body[data-view=setup] .setup-top-row .mic-option{grid-column:1/-1;justify-self:start}
 body[data-view=setup] #testMic{background:none;border:0;border-radius:0;text-decoration:underline;color:#165ea6;padding:2px 0;min-height:24px;width:auto}
 body[data-view=setup] button{padding:6px 9px;min-height:34px}
 body[data-view=setup] input,body[data-view=setup] textarea{padding:7px}
 body[data-view=setup] .field{gap:4px;margin-bottom:8px}
 body[data-view=setup] .segment-field{margin:9px 0}
 body[data-view=setup] .categories{padding:8px}
 body[data-view=setup] .category-list{gap:6px;margin-top:8px}
 body[data-view=setup] .formgrid{gap:8px}
 .home-hero .hero-practice{font-size:clamp(13px,3.7vw,22px)!important;line-height:1.05;width:28%;left:31%;white-space:normal;padding:2px 4px}
 .home-hero .hero-play{left:3%;width:27%}
 .landscape-uat-label{display:none}
 .portrait-uat-label{display:inline!important}
 .landscape-hint-copy{display:none}
 .portrait-hint-copy{display:inline!important}
 body.gameplay .hint-tile.hint-locked .hint-copy{filter:blur(3px);opacity:.7}
 body.portrait-game #siteFrame{--header-height:calc(var(--game-width)*.12);--footer-height:calc(var(--game-width)*.15)}
 body.portrait-game #portraitScoreSlot #headerStatus{display:flex;flex-wrap:wrap;width:100%;font-size:calc(var(--game-width)*.03);color:#071b49;margin:0 0 5px;gap:4px}
 body.portrait-game #portraitScoreSlot #headerStatus>div{width:100%}
 body.portrait-game #portraitScoreSlot #headerStatus small{color:#164f94;font-size:inherit}
 body.portrait-game #portraitScoreSlot #headerStatus .audio-toggle{display:none}
}

@media (orientation:portrait){.home-hero .hero-practice{background:#1254a5;color:white;border:1px solid #b2d9ff;border-radius:8px}.home-hero .hero-play{background:#078355;color:white;font-size:clamp(13px,3.7vw,22px);border-radius:8px}}

.portrait-situation-heading{display:none}
/* Build27 Rev3: four portrait layout repairs; landscape rules are unchanged. */
@media (orientation:portrait){
 /* The Home footer fills the frame instead of retaining its old width cap. */
 body.home-page #app>.site-footer{width:100%;max-width:none;align-self:stretch;margin-left:0;margin-right:0}
 /* Two explicit rows keep the complete brand and both controls inside navy. */
 body.portrait-game #siteFrame{--header-height:calc(var(--game-width)*.12)}
 body.portrait-game #siteHeader{grid-template-columns:minmax(0,1fr) calc(var(--game-width)*.23);grid-template-rows:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:calc(var(--game-width)*.006);padding:calc(var(--game-width)*.008) calc(var(--game-width)*.01)}
 body.portrait-game #siteHeader .brand{grid-column:1;grid-row:1 / 3;align-self:center;display:flex;align-items:center;justify-content:flex-start;font-size:calc(var(--game-width)*.040);line-height:1.3;min-height:0;height:auto;max-width:100%;padding:0;margin:0;white-space:nowrap}
 body.portrait-game #siteHeader #userAcceptanceBtn,
 body.portrait-game #siteHeader #helpBtn{display:flex;align-items:center;justify-content:center;grid-column:2;min-height:0;height:100%;max-height:100%;width:100%;line-height:1.1;font-size:calc(var(--game-width)*.026);padding:0 calc(var(--game-width)*.004);margin:0}
 body.portrait-game #siteHeader #userAcceptanceBtn{grid-row:1}
 body.portrait-game #siteHeader #helpBtn{grid-row:2}
 /* Keep the status/timer in their own row above the restored heading. */
 body.portrait-game #portraitScoreSlot #headerStatus{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto;align-items:start;gap:calc(var(--game-width)*.01);margin:0 0 calc(var(--game-width)*.01)}
 body.portrait-game #portraitScoreSlot #headerStatus>div{grid-column:1;grid-row:1;width:auto}
 body.portrait-game #portraitScoreSlot #headerStatus .timer{grid-column:2;grid-row:1;align-self:center}
 body.portrait-game .story-block .portrait-situation-heading{display:block;margin:0 0 calc(var(--game-width)*.004);font-size:calc(var(--game-width)*.046*var(--text-fit));line-height:1.1;font-weight:800}
}
