/* Runtime-only equivalents of approved inline presentation and hidden state. */
.phone .question-head .progress { margin-top: 12px; }
[hidden] { display: none !important; }

/* Fit the operator grid below its actual header, including wrapped branding. */
.screen.operator { display:flex; flex-direction:column; }
.screen.operator > .brand-row { flex:none; }
.screen.operator > .ops-layout { flex:1; min-height:0; height:auto; }

/* Failed entry stays readable without exposing the protected stage. */
.access-failure { min-height:100svh; display:grid; place-items:center; padding:32px; color:#eef5ff; }
.access-failure section { width:min(100%, 680px); }
.access-failure h1 { font-size:clamp(26px, 4vw, 40px); line-height:1.2; margin:16px 0; }
.access-failure p { line-height:1.6; }
.access-failure .access-failure-code { font-size:14px; opacity:.8; margin:20px 0; }
.access-failure .action { margin-top:12px; }

/* C45 keeps the approved material cycle, with four cycles over two seconds. */
.m4-main.suspense .selected::before,
.m5-championship.suspense .selected::before {
  animation-iteration-count:4;
  animation-delay:var(--main-suspense-offset, 0ms);
  animation-play-state:paused;
}
.main-icon-definitions { position:absolute; overflow:hidden; }

/* Reuse approved compact density when public poll history shares the stage. */
.m4-main:has(.poll-history) .question-plaque {
  min-height:130px;
  padding-block:18px;
  margin-bottom:17px;
}
.m4-main:has(.poll-history) .answer-grid {
  margin-bottom:10px;
  gap:16px 26px;
}
.m4-main:has(.poll-history) .answer { min-height:100px; }
.m4-main:has(.poll-history) .stage-bottom { min-height:40px; }
@media (max-width:1599px) {
  .m4-main:has(.poll-history) .question-plaque { padding-block:10px; }
  .m4-main:has(.poll-history) .poll-history { padding-block:4px; margin-bottom:0; }
  .m4-main:has(.poll-history) .poll-results { margin-bottom:0; }
}

/* Owner-authorized pre-Start stage, sharing the existing projected identity. */
.stage-registration {
  min-width:0;
  width:100%;
  display:flex;
  flex-direction:column;
}
.stage-registration-content {
  flex:1;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(280px, 360px);
  gap:clamp(32px, 6vw, 100px);
  align-items:center;
  width:100%;
  max-width:1280px;
  margin:auto;
  text-align:left;
  padding:20px 24px 64px;
}
.stage-registration-qr { background:#fff; padding:8px; }
.stage-registration-qr svg { display:block; width:100%; height:auto; }
.stage-registration-access { text-align:center; }
.stage-registration-access p { color:#fff; font-size:22px; margin:20px 0 0; }
.stage-registration-content .kicker { margin:0 0 16px; }
.stage-registration-content h1 {
  margin:0;
  max-width:1100px;
  font-size:clamp(36px,4.1vw,72px);
  line-height:1.15;
  color:#fff;
}
.stage-registration-instruction {
  margin:26px 0 0;
  font-size:clamp(22px,2vw,32px);
  line-height:1.4;
  color:#bad6eb;
}
.stage-registration-note {
  margin:24px 0 0;
  font-size:clamp(18px,1.5vw,24px);
  line-height:1.5;
  color:#fff;
}
@media (max-width:700px) {
  .stage-registration { padding:20px; }
  .stage-registration .brand-row { gap:12px; }
  .stage-registration .brand-name { font-size:12px; }
  .stage-registration .clinic { width:70px; height:auto; }
  .stage-registration .seal { width:46px; height:46px; }
  .stage-registration { height:auto; min-height:100vh; }
  .stage-registration-content { grid-template-columns:1fr; gap:28px; text-align:center; padding:32px 0; }
  .stage-registration-access { width:min(100%, 280px); margin:auto; }
  .stage-registration-note { font-size:16px; }
}

/* Contextual controls for the owner-authorized presenter-led encounter. */
.presenter-lifecycle { display:flex; flex-wrap:wrap; align-items:center; justify-content:center; gap:12px; margin-top:18px; }
.stage-registration-copy .presenter-lifecycle { justify-content:flex-start; }
.presenter-lifecycle .action { min-height:48px; }
.presenter-lifecycle-status { color:#bad6eb; font-size:16px; }
.presenter-lifecycle-dialog { max-width:min(640px, calc(100vw - 32px)); }
.presenter-lifecycle-dialog input { width:100%; }
.m4-main .presenter-lifecycle, .m5-championship .presenter-lifecycle { justify-content:flex-end; margin-top:8px; }

/* MAIN must fit the actual header and keep controls reachable in short windows. */
.m4-main { display:flex; flex-direction:column; min-height:0; overflow-y:auto; }
.m4-main > .brand-row { flex:none; }
.m4-main > .stage-main { flex:1; height:auto; }
@media (max-height:900px) {
  .m4-main { padding-block:16px; }
  .m4-main > .stage-main { margin-top:16px; }
  .m4-main .question-plaque { min-height:130px; padding-block:18px; margin-bottom:17px; }
  .m4-main h1.question { font-size:32px; }
  .m4-main .answer { min-height:100px; padding-block:15px; font-size:24px; }
  .m4-main .answer .letter { font-size:26px; }
  .m4-main .answer-grid { gap:16px 26px; margin-bottom:10px; }
  .m4-main .stage-topline { margin-bottom:14px; }
  .m4-main .status-line { font-size:17px; }
  .m4-main .ladder { gap:5px; margin-top:21px; }
  .m4-main .ladder li { min-height:36px; font-size:17px; }
  .m4-main .ladder li b { font-size:19px; }
}

.closed-replay-status { max-width:700px; margin:18px auto 0; font-size:18px; line-height:1.5; color:#bad6eb; }

/* Owner-approved academic credit, kept outside registration controls. */
.stage-registration-organizer { margin:0 auto 20px; padding:0 24px; text-align:center; color:#bad6eb; font-size:clamp(14px,1.1vw,20px); line-height:1.5; }
.stage-registration-organizer strong { color:#fff; }
.stage-registration-organizer span::before { content:" | "; }
@media (max-width:700px) { .stage-registration-organizer span { display:block; } .stage-registration-organizer span::before { content:""; } }

/* C58 academic recognition and the exclusive championship plaque. */
.grand-winner { overflow:auto; background:radial-gradient(ellipse at 50% 45%,#254354,#01142d 75%); }
.gold-award { overflow:hidden; position:relative; isolation:isolate; width:min(100%,1100px); margin:18px auto; padding:36px clamp(20px,4vw,70px); border:2px solid #e7bd69; border-radius:18px; background:linear-gradient(120deg,#2f1c05 0%,#a67a30 1%,#f5dda1 2%,#60431a 3%,#1d2632 5%,#071b30 45%,#2f2b24 85%,#bd9349 98%,#f5dda1); box-shadow:0 0 0 5px #382a13,0 0 0 6px #9d783c,0 24px 80px #0009,inset 0 0 70px #b98c3525; }
.gold-award::before { content:""; position:absolute; z-index:-1; inset:12px; border:1px solid #e5be6b66; border-radius:8px; pointer-events:none; }
.gold-award .winner-seal { width:clamp(90px,12vh,160px); height:auto; margin:0 auto 16px; }
.gold-award h1 { font-size:clamp(30px,3.7vw,64px); color:#fff0c9; text-shadow:0 2px 20px #ecc37140; overflow-wrap:anywhere; }
.gold-award .kicker { color:#f6ca67; font-size:clamp(18px,2vw,30px); }
.award-eyebrow,.award-signature { color:#d6bb83; font-size:clamp(12px,1vw,17px); letter-spacing:.12em; }
.gold-award .winner-score { color:#ffe4a2; margin:20px 0; }
.grand-winner .presenter-lifecycle { margin:16px auto; }
@media(prefers-reduced-motion:no-preference) { .gold-award { animation:award-enter 1000ms cubic-bezier(.2,.7,.2,1) both; } @keyframes award-enter { from { opacity:0; transform:translateY(20px) scale(.97); } to { opacity:1; transform:none; } } }
.closing-arrow { position:fixed; right:32px; top:50%; z-index:30; width:64px; height:64px; border:1px solid #fce4a1; border-radius:50%; background:linear-gradient(#ffe3a1,#ad7919); color:#052346; font-size:38px; cursor:pointer; box-shadow:0 0 30px #efbd5340; }
.institutional-finale { position:fixed; inset:0; z-index:100; width:100dvw; height:100dvh; overflow:hidden; background:#010e22; display:grid; place-items:center; outline:none; }
.institutional-finale video { position:absolute; inset:0; display:block; width:100%; height:100%; min-width:0; min-height:0; max-width:100%; max-height:100%; object-fit:cover; }
.finale-identity,.finale-brand { position:relative; z-index:1; opacity:0; transition:opacity 700ms ease; pointer-events:none; grid-area:1 / 1; }
.finale-identity { width:100%; padding:clamp(24px,5vh,60px) clamp(20px,4vw,80px); text-align:center; background:linear-gradient(90deg,transparent,#010e22b8 15%,#010e22b8 85%,transparent); }
.finale-identity p { color:#e0f2ff; font-weight:700; font-size:clamp(19px,3vw,44px); letter-spacing:.12em; line-height:1.5; }
.finale-identity h1 { color:#f5cd7e; font-size:clamp(26px,3.8vw,58px); line-height:1.25; margin:clamp(18px,3vh,38px) 0; letter-spacing:.05em; }
.finale-identity p:last-child { font-size:clamp(17px,2.6vw,36px); }
.finale-brand { width:min(650px,75vw); max-height:60dvh; object-fit:contain; }
.institutional-finale[data-chapter=identity] .finale-identity,.institutional-finale[data-chapter=brand] .finale-brand { opacity:1; }
.finale-play { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); padding:10px 18px; color:#ffe5a3; background:#05192ee6; border:1px solid #ac8952; border-radius:6px; }
.finale-status { position:absolute; bottom:24px; color:#ffe5a3; text-align:center; }
.grand-winner,.participation-result { min-width:0; width:100%; padding-inline:clamp(20px,3vw,60px); }
.grand-winner .gold-award { box-sizing:border-box; }
/* Fit recognition and its controls in the actual browser viewport at 100% zoom. */
.participation-result,.grand-winner { height:auto; min-height:100dvh; padding-block:clamp(16px,3vh,32px); gap:clamp(8px,1.4vh,16px); }
.participation-result .brand-row,.grand-winner .brand-row { flex:none; margin-bottom:0; }
.participation-result .winner-seal { flex:none; width:clamp(88px,16vh,164px); height:auto; margin:clamp(8px,2vh,24px) 0 0; }
.participation-result .kicker { font-size:clamp(17px,2.6vh,26px); margin:0; }
.participation-result h1 { font-size:clamp(28px,5.6vh,58px); max-width:min(100%,1200px); overflow-wrap:anywhere; margin:0; }
.participation-result .winner-score { font-size:clamp(32px,6vh,58px); margin:0; }
.participation-result .winner-correct { font-size:clamp(18px,2.7vh,26px); margin-top:4px; }
.participation-result .thanks { font-size:clamp(16px,2.5vh,24px); margin:0; }
.participation-result .presenter-lifecycle { flex:none; margin:8px 0 0; }
.grand-winner .gold-award { flex:none; padding-block:clamp(14px,2.5vh,28px); margin:8px auto; }
.grand-winner .gold-award .winner-seal { width:clamp(72px,10vh,110px); height:auto; margin:0 auto 8px; }
.grand-winner .gold-award h1 { font-size:clamp(26px,4.8vh,52px); }
.grand-winner .gold-award .kicker { font-size:clamp(17px,2.8vh,28px); margin-bottom:10px; }
.grand-winner .gold-award .winner-score { font-size:clamp(32px,5.4vh,56px); margin:10px 0; }
.grand-winner .winner-correct { font-size:clamp(18px,2.5vh,26px); margin-top:4px; }
.grand-winner .presenter-lifecycle { flex:none; margin:4px auto; }
@media(max-width:700px) {
  .grand-winner .brand-row,.participation-result .brand-row { gap:8px; }
  .grand-winner .brand-name,.participation-result .brand-name { font-size:11px; }
  .grand-winner .seal,.participation-result .seal { width:42px; height:42px; }
  .grand-winner .clinic,.participation-result .clinic { width:65px; height:auto; }
  .grand-winner .gold-award { padding:28px 20px; }
  .grand-winner .gold-award h1 { font-size:30px; }
  .grand-winner .gold-award .winner-score { font-size:40px; }
  .closing-arrow { width:48px; height:48px; right:12px; font-size:30px; }
}
.gold-award::after { content:""; position:absolute; inset:0; pointer-events:none; background:linear-gradient(110deg,transparent 44%,#fff4c51a 49%,#fff4c536 50%,transparent 56%); background-size:250% 100%; background-position:150% 0; }
@media(prefers-reduced-motion:no-preference) { .gold-award::after { animation:award-reflection 2400ms 600ms ease-out both; } @keyframes award-reflection { to { background-position:-150% 0; } } }
@media(max-width:700px) {
  .grand-winner .brand-row,.participation-result .brand-row { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .grand-winner .brand-row .event,.participation-result .brand-row .event { position:static; grid-column:1 / -1; grid-row:2; justify-content:center; margin:8px 0; }
  .grand-winner .brand-row .clinic,.participation-result .brand-row .clinic { grid-column:2; grid-row:1; }
}
