/* Pre-launch-only panel: dashed amber border marks it as a temporary dev tool,
   distinct from the surrounding permanent admin design. Delete this rule along
   with the panel and its route once the campaign goes live. */
.testing-tools{margin-top:22px;border:1px dashed #e0a33a;background:#fffaf0;}
.testing-tools .panel-head{border-bottom:1px dashed #e0a33a;}
.testing-tools .digest-row{display:flex;align-items:center;justify-content:space-between;gap:16px;}

/* ---------- dashboard ---------- */
.dashboard-intro{display:flex;align-items:center;gap:20px;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:24px;margin-bottom:24px;flex-wrap:wrap;}
.dashboard-intro .meta{flex:1;min-width:180px;}
.dashboard-intro .meta strong{display:block;font-size:1.2rem;}
.dashboard-intro .meta span{font-size:.8rem;color:var(--muted);}
.upload-label{position:relative;display:inline-block;font-size:.75rem;font-weight:650;color:var(--theme-text);cursor:pointer;margin-top:4px;}
.upload-label input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;}
.rank-badge{background:var(--theme-soft);color:var(--theme-text);border-radius:var(--radius);padding:10px 18px;text-align:center;font-weight:650;}
.rank-badge b{font-size:1.4rem;display:block;}
.rank-badge span{font-size:.7rem;text-transform:uppercase;letter-spacing:.06em;}
.dashboard-grid{display:grid;grid-template-columns:1.4fr 1fr;gap:22px;margin-bottom:22px;}
.plan-row{display:flex;align-items:center;gap:14px;padding:16px 18px;border-bottom:1px solid var(--border);}
.plan-row:last-child{border-bottom:none;}
.plan-mid{flex:1;min-width:0;}
.plan-mid strong{display:block;font-size:.85rem;margin-bottom:6px;}
.plan-bar{height:6px;background:#eef0f4;border-radius:4px;overflow:hidden;}
.plan-bar > i{display:block;height:100%;background:var(--primary);}
.plan-earn{font-size:.75rem;color:var(--muted);margin-top:5px;}
.mix-total{text-align:center;padding:34px 18px 30px;}
.mix-total .fig{display:flex;align-items:center;justify-content:center;gap:14px;}
.mix-total .fig .anchor-mark{color:#536b2f;}
.mix-total .fig b{font-size:3.2rem;font-weight:500;color:#2b3a52;letter-spacing:-.03em;line-height:1;}
.mix-total > span{display:block;margin-top:14px;font-size:.85rem;color:var(--muted);}
.mix-row{display:flex;align-items:center;gap:13px;margin:0 22px;padding:14px 0;font-size:.95rem;color:#5b6b86;border-bottom:1px solid var(--border);}
.mix-row:last-child{border-bottom:none;}
.mix-row svg{flex:none;color:var(--mint-ink);}
.mix-row b{margin-left:auto;font-weight:700;color:#22304a;}
.badge-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding:18px;}
.achievement{border:1px dashed var(--border);border-radius:var(--radius);text-align:center;padding:25px 12px;background:#fafbfc;color:#8a95a5;position:relative;}
.achievement .ic{display:flex;justify-content:center;line-height:0;}
.achievement strong{display:block;font-size:.85rem;margin-top:14px;font-weight:650;color:#43516a;}
.achievement p{margin:10px 0 0;font-size:.8rem;color:var(--muted);line-height:1.4;}
.achievement.earned{border:1px solid var(--theme-border);background:var(--theme-soft);}
.achievement.earned .ic{color:var(--theme-text);}
.achievement.earned strong{color:var(--mint-ink);}
.achievement .chk{position:absolute;top:10px;right:10px;color:var(--mint-ink);line-height:0;}
.digest-row{display:flex;align-items:center;justify-content:space-between;padding:12px 18px;border-bottom:1px solid var(--border);font-size:.85rem;gap:10px;}
.digest-row:last-child{border-bottom:none;}
/* Amber dot: neither delivery nor the scheduler is wired up yet, so the rows read
   as "needs attention" rather than as a hard failure. */
.digest-status{display:inline-flex;align-items:center;gap:9px;}
.digest-status::before{content:"";width:6px;height:6px;border-radius:50%;background:#e0a33a;flex:none;}
.digest-actions{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px;}
.digest-actions .button-ghost{justify-content:center;border:1px solid var(--border);border-radius:var(--radius);padding:11px 12px;color:var(--muted);font-weight:600;}
.switch{position:relative;width:38px;height:22px;background:#dfe4ec;border-radius:12px;border:none;flex:none;}
.switch.on{background:var(--primary);}
.switch i{position:absolute;top:2px;left:2px;width:18px;height:18px;background:#fff;border-radius:50%;transition:left .15s;}
.switch.on i{left:18px;}

/* ---------- hunt ---------- */
.hunt-layout{display:grid;grid-template-columns:1fr 1.1fr;gap:24px;}
.hunt-start{background:var(--forest);color:#fff;border-radius:var(--radius);border:1px solid #283b54;padding:42px;display:flex;flex-direction:column;align-items:flex-start;}
.hunt-cta{margin-top:auto;width:100%;padding-top:32px;}
.hunt-cta .button{gap:10px;min-height:52px;font-size:.95rem;}
.hunt-cta .cta-arrow{display:inline-flex;margin-left:4px;}
.hunt-cta .hint{margin:12px 0 0;text-align:center;}
.hunt-mark{width:114px;height:114px;border-radius:var(--radius);background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.22);color:var(--lime);display:flex;align-items:center;justify-content:center;margin-bottom:33px;}
.hunt-start .tag{display:inline-flex;align-items:center;color:var(--lime);background:rgba(255,255,255,.07);font-size:.78rem;font-weight:700;letter-spacing:.05em;border-radius:var(--radius);padding:5px 12px;margin-bottom:27px;}
.hunt-start h2{color:#f6f8fc;font-weight:700;letter-spacing:-.035em;font-size:2.6rem;line-height:1.22;margin:0 0 24px;}
.hunt-start h2 em{font-style:normal;color:var(--lime);}
.hunt-start p{color:var(--dark-soft);font-size:.95rem;line-height:1.85;margin:0;max-width:54ch;}
.hunt-details{display:flex;flex-direction:column;gap:20px;}
.hunt-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:4px 0 24px;}
.hunt-stats b{display:block;font-size:2.1rem;font-weight:650;line-height:1.1;color:var(--ink);margin-bottom:8px;}
.hunt-stats span{font-size:.85rem;color:var(--muted);}
.hunt-progress-bar{height:7px;background:rgba(190,216,69,.22);border-radius:4px;overflow:hidden;}
.hunt-progress-bar > i{display:block;height:100%;background:var(--primary);}
.rules-list{display:flex;flex-direction:column;gap:20px;padding:20px 18px;}
.rules-list .r{display:flex;gap:14px;font-size:.85rem;}
.rules-list .r span.no{color:var(--theme-text);background:var(--theme-soft);border-radius:var(--radius);padding:5px 8px;font-size:.75rem;font-weight:700;flex:none;align-self:flex-start;}
.rules-list .r strong{display:block;font-size:.95rem;font-weight:650;color:var(--ink);margin-bottom:6px;}
.rules-list .r p{margin:0;color:var(--muted);font-size:.875rem;line-height:1.5;}
.paste-row{display:flex;gap:8px;}
.camera-preview{background:#10231b;border-radius:var(--radius);aspect-ratio:1.25;position:relative;overflow:hidden;display:flex;align-items:center;justify-content:center;}
.camera-preview video{height:100%;width:100%;object-fit:cover;}
.scan-frame{position:absolute;height:68%;width:68%;border:2px solid var(--lime);border-radius:var(--radius);pointer-events:none;}
.scan-line{position:absolute;left:6%;right:6%;height:2px;background:var(--lime);top:16%;animation:scanline 1.4s ease-in-out infinite;}
@keyframes scanline{0%,100%{top:16%;}50%{top:80%;}}

@media (max-width: 900px){
  .hunt-layout,.dashboard-grid{grid-template-columns:1fr;}
}

/* ---------- people ---------- */
.people-controls{display:flex;gap:12px;margin-bottom:22px;max-width:640px;flex-wrap:wrap;}
.people-controls input{flex:2;min-width:160px;}
.people-controls select{flex:1;min-width:140px;}
.people-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
.people-card{position:relative;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:26px 18px 0;text-align:center;overflow:hidden;}
.people-rank{position:absolute;left:13px;top:12px;font-size:.7rem;color:#8a96a6;}
.people-card h3{margin:14px 0 8px;font-size:.9rem;}
/* Long department names get a second line here rather than the usual
   single-line pill, since a cut-off title is worse than a taller card. */
.people-card .tag{white-space:normal;text-align:center;line-height:1.3;}
.people-card > div.foot{display:flex;justify-content:space-between;margin:14px -18px 0;padding:14px 18px;border-top:1px solid var(--border);font-size:.75rem;color:var(--muted);background:#fafbfd;}
.people-card > div.foot b{color:var(--theme-text);}
@media (max-width: 900px){ .people-grid{grid-template-columns:repeat(2,1fr);} }

/* ---------- rules ---------- */
.rules-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:20px;margin-bottom:22px;}
.rule-points{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:28px 20px;text-align:center;}
.rule-points .ic{display:flex;justify-content:center;color:var(--primary);line-height:0;margin-bottom:16px;}
.rule-points h2{font-size:1.05rem;font-weight:700;color:#22304a;margin:0 0 18px;}
.rule-points b{display:flex;align-items:center;justify-content:center;gap:10px;font-size:2.6rem;font-weight:600;color:var(--primary);letter-spacing:-.03em;line-height:1;}
.rule-points p{margin:16px 0 0;color:var(--muted);font-size:.95rem;}
.rule-points .secs{display:block;margin-top:10px;font-size:.8rem;color:var(--muted);}
.rules-content{display:grid;grid-template-columns:1.5fr 1fr;gap:20px;align-items:start;}
.rules-panel{padding:26px;}
.rules-panel > h2{font-size:1.3rem;font-weight:700;color:#22304a;letter-spacing:-.02em;margin:0 0 20px;}
.score-formula{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;background:var(--theme-soft);color:var(--theme-text);border-radius:var(--radius);padding:19px 22px;margin:0 0 24px;font-size:.95rem;font-weight:600;}
.score-formula .op{font-style:normal;opacity:.45;font-weight:400;}
.info-note{display:flex;align-items:flex-start;gap:12px;background:var(--theme-soft);color:var(--theme-text);border-radius:var(--radius);padding:16px 20px;margin-bottom:22px;font-size:.85rem;line-height:1.45;}
.info-note svg{flex:none;margin-top:2px;}

.email-mock{margin:18px;border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;}
.email-mock-head{background:var(--forest);color:#fff;padding:16px 20px;display:flex;align-items:center;gap:10px;font-weight:700;letter-spacing:.02em;}
.email-mock-head .divider{opacity:.4;font-weight:400;}
.email-mock-body{padding:22px 20px;}
.email-mock-body .eyebrow{color:var(--primary);font-size:.7rem;font-weight:700;letter-spacing:.05em;margin-bottom:8px;}
.email-mock-body h2{font-size:1.3rem;margin:0 0 12px;letter-spacing:-.02em;}
.email-mock-body p{color:var(--muted);font-size:.85rem;margin:0 0 18px;line-height:1.5;}
.email-mock-body h4{font-size:.85rem;margin:0 0 4px;}
.email-leader-row{display:flex;align-items:center;gap:10px;padding:8px 0;border-top:1px solid var(--border);font-size:.85rem;}
.email-leader-row .email-rank{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:6px;background:#eef1f6;color:var(--muted);font-size:.75rem;font-weight:600;flex:none;}
.email-leader-row strong{flex:1;color:var(--primary);font-weight:600;}
.email-cta{margin-top:18px;justify-content:center;gap:8px;text-decoration:none;color:#fff;}
.email-foot{color:var(--muted);font-size:.75rem;margin:14px 0 0;line-height:1.5;}
.rules-content h3{margin:28px 0 10px;color:#22304a;font-size:1rem;font-weight:700;}
.rules-content p{color:var(--muted);font-size:.95rem;line-height:1.75;margin:0;}
.fair-play-item{display:flex;gap:14px;margin-bottom:24px;}
.fair-play-item .ic{flex:none;color:var(--mint-ink);line-height:0;margin-top:1px;}
.fair-play-item strong{display:block;font-size:1rem;font-weight:700;color:#22304a;margin-bottom:8px;}
.rules-panel .button{margin-top:8px;min-height:52px;font-size:.95rem;font-weight:650;}
@media (max-width: 900px){ .rules-content{grid-template-columns:1fr;} }

/* ---------- settings ---------- */
/* Ported from the reference project's /settings: the theme picker and its
   aside, then full-width admin panels for the logo, banner and awards. */
.appearance-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:24px;align-items:start;}
.appearance-panel{padding:28px;}
.appearance-panel .section-heading{align-items:center;margin-bottom:14px;}
.appearance-panel .section-heading h2{display:flex;align-items:center;gap:9px;}
.appearance-panel .section-heading h2>svg{color:var(--primary);}
.appearance-description{font-size:1rem;line-height:1.7;color:var(--muted);max-width:630px;margin-bottom:24px;}
.theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.theme-option{display:flex;flex-direction:column;gap:9px;padding:12px 12px 14px;border:1px solid var(--border);border-radius:var(--radius);background:#fff;cursor:pointer;transition:border-color .15s,box-shadow .15s;}
.theme-option:hover{border-color:var(--primary);}
.theme-option.selected{border-color:var(--primary);box-shadow:0 0 0 1px var(--primary);}
.theme-preview{border:1px solid #e1e6ee;border-radius:var(--radius);overflow:hidden;display:flex;flex-direction:column;background:#f3f5f9;}
.theme-sample-header{display:flex;align-items:center;gap:7px;height:27px;padding:0 11px;}
.theme-sample-header>i{width:30px;height:4px;background:#ffffff55;border-radius:5px;}
.theme-sample-header>i:first-child{width:41px;}
.theme-sample-body{display:grid;grid-template-columns:1fr 36%;gap:10px;padding:11px;height:77px;}
.theme-sample-body>span{display:flex;flex-direction:column;gap:7px;background:#fff;padding:9px;border-radius:5px;}
.theme-sample-body>span i{display:block;height:5px;background:#e4e9f1;border-radius:5px;}
.theme-sample-body>span i:first-child{width:65%;}
.theme-sample-body>b{display:flex;flex-direction:column;gap:8px;padding:10px;border-radius:5px;}
.theme-sample-body>b i{height:6px;width:48%;border-radius:5px;}
.theme-sample-body>b i:last-child{width:90%;background:#ffffff75;height:4px;}
.theme-colour-bar{display:flex;height:18px;}
.theme-colour-bar i{flex:1;}
.theme-option-title{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-top:3px;}
.theme-option-title strong{font-size:1rem;font-weight:650;}
.theme-option-description{color:var(--muted);font-size:.875rem;line-height:1.5;}
.theme-option-status{display:flex;gap:4px;align-items:center;min-height:19px;font-size:.75rem;color:var(--muted);}
.theme-option.selected .theme-option-status{color:var(--theme-text);}
/* A styled stand-in for a radio input, so the picker keeps its look without
   a real control whose native style differs per browser. */
.radio-dot{width:17px;height:17px;flex:none;border-radius:50%;border:1px solid var(--border);background:#fff;position:relative;}
.radio-dot.on{border-color:var(--primary);}
.radio-dot.on:after{content:"";position:absolute;inset:3px;border-radius:50%;background:var(--primary);}
.check-box{width:17px;height:17px;flex:none;border-radius:4px;border:1px solid var(--border);background:#fff;display:inline-flex;align-items:center;justify-content:center;color:#fff;}
.check-box.on{background:var(--primary);border-color:var(--primary);}
.appearance-save{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;padding-top:24px;margin-top:24px;border-top:1px solid var(--border);}
.appearance-save>span{display:flex;align-items:center;gap:6px;color:var(--muted);font-size:.875rem;}
.appearance-save>span svg{color:var(--theme-text);}
.appearance-aside{display:flex;flex-direction:column;gap:20px;}
.appearance-aside .panel{padding:24px;}
.appearance-aside h2{margin-bottom:12px;font-size:1.15rem;}
.appearance-aside p{color:var(--muted);font-size:.875rem;line-height:1.7;margin-bottom:20px;}
.appearance-aside .panel>svg{color:var(--primary);margin-bottom:12px;}
.appearance-aside .panel:first-child{background:var(--theme-soft);border-color:var(--theme-border);}
.appearance-aside .button{width:100%;justify-content:center;}
#brand-settings,#award-settings,#banner-title,#appearance-title{scroll-margin-top:175px;}

.brand-settings,.banner-settings,.award-settings{padding:28px;margin-top:28px;}
.brand-settings>p,.award-settings>p,.banner-settings>p{color:var(--muted);font-size:1rem;line-height:1.7;margin:16px 0 24px;max-width:960px;}
.brand-editor{display:flex;gap:28px;align-items:center;}
.logo-preview{width:132px;height:132px;display:flex;align-items:center;justify-content:center;background:#fff;border:1px solid var(--border);border-radius:var(--radius);flex-shrink:0;}
.logo-preview img{width:112px;height:112px;object-fit:contain;}
.brand-editor-fields{max-width:720px;flex:1;}
.brand-editor-fields .survey-field{margin:8px 0 18px;}
/* The file inputs are hidden behind their label buttons, the reference's
   pattern -- a native file input can't be styled to match. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}

.banner-controls{display:flex;align-items:center;flex-wrap:wrap;gap:20px;margin:20px 0;}
.banner-controls>label:not(.button){display:flex;align-items:center;gap:12px;font-size:.875rem;}
.banner-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:20px;margin:24px 0;}
.banner-fields label{display:flex;flex-direction:column;gap:12px;font-size:.875rem;}
.banner-fields small{font-size:.8rem;color:var(--muted);font-weight:400;}

.award-settings-toolbar{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border);margin-bottom:24px;}
.award-settings-toolbar>div:first-child{display:flex;flex-direction:column;gap:5px;}
.award-settings-toolbar span{font-size:.875rem;color:var(--muted);}
.award-editor-layout{display:grid;grid-template-columns:280px minmax(0,1fr);gap:26px;align-items:start;}
.award-catalog-list{min-width:0;}
.award-catalog-list nav{max-height:740px;overflow:auto;margin-top:14px;display:flex;flex-direction:column;gap:6px;}
.award-catalog-list nav>button{display:flex;align-items:flex-start;text-align:left;gap:12px;padding:13px 12px;border:1px solid transparent;border-radius:var(--radius);background:none;cursor:pointer;color:inherit;}
.award-catalog-list nav>button:hover{background:var(--paper);}
.award-catalog-list nav>button.selected{background:var(--theme-soft);border-color:var(--theme-border);color:var(--theme-text);}
.award-catalog-list nav>button.archived{opacity:.6;}
.award-catalog-list nav>button>span:first-child{margin-top:3px;flex:none;}
.award-catalog-list strong{display:block;font-size:.875rem;font-weight:600;}
.award-catalog-list small{display:block;font-size:.75rem;color:var(--muted);margin-top:5px;}
.award-category-editor{border-left:1px solid var(--border);padding-left:26px;min-width:0;}
.award-editor-title{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;}
.award-editor-title h3{font-size:1.4rem;margin-top:8px;}
.award-editor-title .button{font-size:.75rem!important;padding:7px 10px;}
.award-category-editor .survey-field{font-size:.875rem;margin:24px 0;}
.award-editor-note{padding:14px 16px;background:var(--theme-soft);color:var(--theme-text);border-radius:var(--radius);margin:20px 0;font-size:.875rem;line-height:1.65;}
.eligible-nominees,.custom-award-options{margin-top:28px;padding-top:24px;border-top:1px solid var(--border);}
.eligible-nominees h3,.custom-award-options h3{font-size:1rem;margin:0;}
.nominee-mode{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:18px 0 25px;}
.nominee-mode label{display:flex;gap:10px;padding:15px;border:1px solid var(--border);border-radius:var(--radius);align-items:flex-start;cursor:pointer;}
.nominee-mode .radio-dot{margin-top:3px;}
.nominee-mode strong{font-size:.875rem;display:block;}
.nominee-mode small{font-size:.8rem;line-height:1.5;display:block;color:var(--muted);margin-top:6px;}
.nominee-selection-heading{display:flex;align-items:center;gap:18px;justify-content:space-between;}
.nominee-selection-heading>strong{font-size:.875rem;white-space:nowrap;}
.nominee-selection-heading .award-search{flex:1;max-width:470px;}
.nominee-bulk-actions{margin:14px 0;gap:22px;}
.staff-eligibility-list{max-height:410px;overflow:auto;display:grid;grid-template-columns:1fr 1fr;gap:8px;border:1px solid var(--border);padding:9px;border-radius:var(--radius);}
.staff-eligibility-list label{display:flex;align-items:flex-start;gap:10px;padding:12px;border:1px solid transparent;border-radius:var(--radius);cursor:pointer;min-width:0;}
.staff-eligibility-list label.selected{background:var(--theme-soft);border-color:var(--theme-border);}
.staff-eligibility-list .check-box{margin-top:2px;}
.staff-eligibility-list strong{font-size:.875rem;font-weight:600;display:block;}
.staff-eligibility-list small{display:block;font-size:.75rem;line-height:1.5;color:var(--muted);margin-top:5px;}
.custom-award-options .section-heading{gap:16px;flex-wrap:wrap;margin-bottom:20px;}
.custom-option-row{display:flex;align-items:center;gap:12px;margin:12px 0;}
.custom-option-row>span{color:var(--muted);font-size:.875rem;}
.custom-option-row input{flex:1;}
.custom-option-row.archived input{background:var(--paper);color:var(--muted);}
.custom-option-row .button{font-size:.75rem!important;}
.statement-editor-row{align-items:flex-start;}
.statement-editor-row textarea{flex:1;font-size:.85rem!important;resize:vertical;}
.reason-required-toggle{display:flex;align-items:center;gap:6px;font-size:.75rem;color:var(--muted);white-space:nowrap;flex:none;padding-top:8px;}
@media (max-width:640px){
  .statement-editor-row{flex-wrap:wrap;}
  .statement-editor-row textarea{flex-basis:100%;order:1;}
  .reason-required-toggle{order:2;}
}
.award-settings-footer{display:flex;justify-content:space-between;gap:22px;align-items:center;border-top:1px solid var(--border);margin-top:25px;padding-top:20px;}
.award-settings-footer p{font-size:.875rem;line-height:1.7;max-width:780px;color:var(--muted);}
.award-settings-footer a{white-space:nowrap;}

@media (max-width: 1100px){
  .award-editor-layout{grid-template-columns:220px minmax(0,1fr);gap:20px;}
  .award-category-editor{padding-left:20px;}
  .staff-eligibility-list,.nominee-mode{grid-template-columns:1fr;}
  .award-settings-footer{align-items:flex-start;flex-direction:column;}
}
@media (max-width: 900px){
  .appearance-layout{grid-template-columns:1fr;}
  .appearance-aside{display:grid;grid-template-columns:1fr 1fr;}
}
@media (max-width: 760px){
  .appearance-panel,.brand-settings,.banner-settings,.award-settings{padding:20px;}
  .appearance-aside,.theme-options{grid-template-columns:1fr;}
  .brand-editor{align-items:flex-start;flex-direction:column;gap:16px;}
  .brand-editor-fields{width:100%;}
  .award-settings-toolbar{align-items:flex-start;flex-direction:column;}
  .award-editor-layout{grid-template-columns:1fr;}
  .award-catalog-list nav{max-height:240px;}
  .award-category-editor{border-left:0;border-top:1px solid var(--border);padding:24px 0 0;}
  .nominee-selection-heading{align-items:flex-start;flex-direction:column;}
  .nominee-selection-heading .award-search{width:100%;max-width:100%;}
  .custom-option-row>span{display:none;}
}

/* ---------- login ---------- */
.login-shell{min-height:100svh;display:flex;align-items:center;justify-content:center;padding:20px;}
.login-card{width:100%;max-width:400px;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:32px;text-align:center;}
/* The real brand mark, same masked PNG as everywhere else in the app -- block
   rather than the class's default inline-block so margin:auto centres it, and
   the baseline nudge that suits it mid-sentence is cancelled here. */
.login-card .anchor-mark{display:block;width:44px;height:44px;color:var(--forest);margin:0 auto 14px;vertical-align:0;}
.login-card h1{font-size:1.6rem;margin-bottom:8px;}
.login-card p{color:var(--muted);font-size:.85rem;margin-bottom:20px;}
.login-foot{margin-top:18px;font-size:.75rem;}
.login-error{background:#fdeceb;color:var(--danger);border-radius:var(--radius);padding:10px 14px;font-size:.8rem;margin-top:12px;text-align:left;}

/* ---------- admin ---------- */
.question-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:18px 0 4px;}
.question-head h3{margin:0;font-size:.85rem;}
.question-row{border-top:1px solid var(--border);padding:12px 0;display:flex;gap:12px;align-items:flex-start;}
/* Hidden questions stay listed so they can be brought back, but read as inactive. */
.question-row.is-hidden{opacity:.55;}
.question-actions{display:flex;align-items:center;gap:8px;flex:none;}
.admin-tabs{display:flex;gap:4px;background:#eef1f6;border-radius:var(--radius);padding:8px;margin-bottom:22px;overflow-x:auto;}
.admin-tabs button{border:none;background:none;padding:11px 20px;border-radius:calc(var(--radius) - 1px);font-size:.95rem;color:var(--muted);white-space:nowrap;}
.admin-tabs button.active{background:#fff;color:#22304a;font-weight:650;box-shadow:0 1px 3px rgba(0,0,0,.08);}
.admin-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:22px;}
.admin-summary .card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:24px;}
.admin-summary .card .top{display:flex;align-items:center;gap:14px;}
.admin-summary .card svg{flex:none;color:var(--mint-ink);}
.admin-summary .card b{font-size:2rem;font-weight:600;color:#22304a;line-height:1;}
.admin-summary .card span{display:block;margin-top:18px;font-size:.95rem;color:var(--muted);}
.checklist-item{display:flex;align-items:flex-start;gap:14px;width:100%;text-align:left;background:none;border:none;margin:0 18px;width:calc(100% - 36px);padding:18px 0;border-bottom:1px solid var(--border);}
.checklist-item:last-of-type{border-bottom:none;}
.checklist-circle{width:26px;height:26px;border:1px solid var(--theme-border);background:var(--theme-soft);border-radius:50%;display:flex;align-items:center;justify-content:center;flex:none;color:var(--theme-text);margin-top:1px;}
.checklist-item .txt{flex:1;min-width:0;}
.checklist-item .txt strong{display:block;font-size:1rem;font-weight:650;color:#22304a;margin-bottom:6px;}
.checklist-item .txt > span{font-size:.95rem;color:var(--muted);line-height:1.5;}
.checklist-item .go{flex:none;color:#9aa6b8;line-height:0;margin-top:4px;}
.roster-panel{padding:26px;}
.roster-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;flex-wrap:wrap;margin-bottom:24px;}
.roster-intro h2{font-size:1.3rem;font-weight:700;color:#22304a;letter-spacing:-.02em;margin:0 0 8px;}
.roster-intro p{font-size:.95rem;color:var(--muted);line-height:1.5;margin:0;max-width:64ch;}
.roster-actions{display:flex;gap:10px;flex-wrap:wrap;min-width:0;}
.roster-actions .button{min-height:46px;font-size:.9rem;}
/* The file input covers its label so the whole button is the drop target. */
.import-label{position:relative;overflow:hidden;}
.import-label input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;font-size:0;}
.roster-search{position:relative;max-width:420px;margin-bottom:22px;}
.roster-search svg{position:absolute;left:14px;top:50%;transform:translateY(-50%);color:#9aa6b8;pointer-events:none;}
/* [type=search] is needed to out-rank base.css's
   input:not([type=radio]):not([type=checkbox]) (0-2-1) -- a bare
   `.roster-search input` (0-1-1) loses, and the icon lands on the text. */
.roster-search input[type=search]{width:100%;padding:13px 14px 13px 44px;font-size:.95rem;}
.table-scroll{overflow-x:auto;}
.roster-table{font-size:.95rem;}
.roster-table td{height:84px;}
.roster-table tbody tr:hover{background:#fbfcfe;cursor:default;}
.roster-person{display:flex;align-items:center;gap:14px;}
.roster-person .avatar{border-radius:8px;width:40px;height:40px;font-size:.8rem;}
.roster-person strong{font-weight:650;color:#22304a;}
.roster-muted{color:var(--muted);}
.row-actions{display:flex;align-items:center;gap:6px;}
.icon-action{position:relative;display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border:none;background:none;border-radius:var(--radius);color:#9aa6b8;cursor:pointer;}
.icon-action:hover{background:var(--theme-soft);color:var(--theme-text);}
.icon-action input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer;font-size:0;}
.campaign-switch{border-top:1px solid var(--border);margin-top:22px;padding-top:22px;}
.campaign-switch h3{font-size:1.1rem;font-weight:700;color:#22304a;margin:0 0 10px;}
.campaign-switch p{font-size:.95rem;color:var(--muted);line-height:1.7;margin:0 0 18px;}
.campaign-switch .button,.panel-body > .button.secondary{min-height:50px;font-size:.95rem;font-weight:650;}
.qr-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;}
.qr-card{border:1px solid var(--border);border-radius:var(--radius);padding:16px;text-align:center;background:#fff;}
.qr-card img{width:100%;max-width:180px;}
.qr-card strong{display:block;margin-top:8px;font-size:.95rem;color:var(--primary);}
.qr-card span{font-size:.8rem;color:var(--muted);}
.qr-accepted{margin:12px 0 0;font-size:.75rem;color:var(--muted);line-height:1.45;}
.qr-clue{margin:10px 0 0;font-size:.78rem;line-height:1.5;color:var(--ink);}
/* A code with no clue still works -- it just shows less -- so this reads as
   unfinished, not broken. */
.qr-clue.missing{color:var(--muted);font-style:italic;}
.qr-actions{margin-top:14px;display:flex;gap:8px;justify-content:center;align-items:center;}
@media (max-width: 900px){ .admin-summary{grid-template-columns:repeat(2,1fr);} .qr-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width: 560px){ .admin-summary{grid-template-columns:1fr;} }

/* ---------- modal / game dialog (shared) ---------- */
/* Frosted rather than simply dimmed -- the veil is kept light so the blur is what
   separates the dialog from the page, instead of being swamped by darkness. */
.overlay{position:fixed;inset:0;background:rgba(15,20,32,.3);-webkit-backdrop-filter:blur(7px);backdrop-filter:blur(7px);display:flex;align-items:center;justify-content:center;z-index:100;padding:20px;}
.dialog{background:#fff;border:1px solid #dae3ef;border-radius:var(--radius);box-shadow:0 24px 80px rgba(14,33,60,.22);width:100%;max-width:480px;max-height:88vh;overflow-y:auto;padding:28px;position:relative;}
.dialog.wide{max-width:680px;}
.dialog.scanner{max-width:540px;}
.dialog .close-x{position:absolute;top:14px;right:14px;border:none;background:none;font-size:20px;color:var(--muted);cursor:pointer;}
.overlay.drawer-overlay{justify-content:flex-end;align-items:stretch;padding:0;background:rgba(15,20,32,.22);}
.dialog.drawer{max-width:420px;width:100%;height:100%;max-height:100%;border-radius:0;box-shadow:-12px 0 40px rgba(14,33,60,.18);padding:28px 26px;}
.notice-list{margin-top:20px;display:flex;flex-direction:column;gap:2px;}
.notice-item{display:flex;gap:14px;padding:16px 4px;border-radius:var(--radius);}
.notice-item.unread{background:var(--theme-soft);}
.notice-item .bell-ic{flex:none;color:var(--theme-text);margin-top:2px;}
.notice-item strong{display:block;font-size:.9rem;margin-bottom:4px;}
.notice-item p{font-size:.85rem;color:var(--muted);margin:0 0 6px;line-height:1.4;}
.notice-item time{font-size:.72rem;color:var(--muted);}
.mark-read-link{display:inline-flex;align-items:center;gap:6px;color:var(--theme-text);font-weight:650;font-size:.85rem;background:none;border:none;cursor:pointer;padding:0;}
.dialog h2{font-size:1.25rem;color:#2c4560;margin-bottom:6px;}
.dialog-desc{color:#607188;font-size:.85rem;margin-bottom:14px;}

#toast-root{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:200;display:flex;flex-direction:column;gap:8px;align-items:center;pointer-events:none;}
.toast{background:#22304a;color:#fff;padding:12px 20px;border-radius:999px;font-size:.88rem;font-weight:600;box-shadow:0 12px 32px rgba(14,33,60,.28);opacity:0;transform:translateY(8px);transition:opacity .2s ease,transform .2s ease;max-width:90vw;text-align:center;}
.toast.in{opacity:1;transform:translateY(0);}
.toast-error{background:#b3261e;}
.stat-trio{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:18px 0;background:var(--theme-soft);border-radius:var(--radius);padding:16px 6px;}
.stat-trio .t{text-align:center;}
.stat-trio .t b{display:block;font-size:1.3rem;font-weight:650;color:var(--theme-text);}
.stat-trio .t span{font-size:.7rem;color:var(--muted);}
.q-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;font-size:.75rem;font-weight:700;text-transform:uppercase;color:var(--muted);letter-spacing:.03em;}
.timer-chip{display:inline-flex;align-items:center;gap:6px;background:var(--theme-soft);color:var(--theme-text);border-radius:var(--radius);padding:5px 11px;font-weight:700;}
.timer-chip.urgent{animation:pulse 1s infinite;}
.q-progress{height:5px;background:#eef0f4;border-radius:3px;overflow:hidden;margin-bottom:18px;}
.q-progress > i{display:block;height:100%;background:var(--primary);transition:width .2s linear;}
.question-prompt{font-size:1.5rem;color:#2d4864;letter-spacing:-.02em;margin-bottom:16px;font-weight:600;}
.answer-option{display:flex;align-items:center;gap:12px;border:1px solid #dde6f0;border-radius:var(--radius);padding:16px;margin-bottom:8px;font-size:1rem;color:#607188;cursor:pointer;}
.answer-option:hover{background:#f7faee;}
.answer-option.selected{background:var(--theme-soft);border-color:var(--theme-border);color:var(--theme-text);}
.option-letter{width:26px;height:26px;border-radius:var(--radius);background:#f0f4f9;border:1px solid #e2eaf4;color:#607188;display:flex;align-items:center;justify-content:center;font-size:.75rem;flex:none;}
.hint{font-size:.7rem;color:var(--muted);text-align:center;margin-top:12px;}
/* Taller, and the whole photo is shown. A fixed 220px box with object-fit:cover
   cropped every portrait -- usually straight through the top of the head, which
   is the part you recognise someone by. `contain` never cuts; the box is capped
   against the viewport so the name field and Submit stay on screen without
   scrolling, which matters when a 30-second timer is running. */
.mystery-photo{aspect-ratio:4/5;max-height:min(46svh,420px);border-radius:var(--radius);background:var(--theme-soft);display:flex;align-items:center;justify-content:center;margin-bottom:10px;font-size:2.5rem;color:var(--theme-text);overflow:hidden;}
.mystery-photo img{width:100%;height:100%;object-fit:contain;object-position:center;}
.clue-box{background:#f7f8fb;border-radius:var(--radius);padding:12px 14px;font-size:.85rem;margin-bottom:14px;}
.result-box{text-align:center;padding:10px 0;}
.result-box .result-icon{font-size:2.4rem;margin-bottom:8px;}
.result-box h2{color:#324f67;font-weight:550;}
.result-earned{font-size:1.9rem;font-weight:650;color:var(--theme-text);margin:10px 0;}
.sheet-cover{background:var(--forest);color:#fff;border-radius:var(--radius) var(--radius) 0 0;padding:24px;margin:-28px -28px 16px;text-align:center;}
.notice-row{display:flex;gap:10px;padding:12px 0;border-bottom:1px solid var(--border);font-size:.85rem;text-align:left;}
.notice-row:last-child{border-bottom:none;}
.form-error{background:#fdf1e9;border:1px solid #f0d9c4;border-radius:var(--radius);padding:12px;color:#ac7755;font-size:.85rem;margin-bottom:14px;}

/* ==========================================================================
   Responsive layout -- breakpoints and behaviour matched to the MB-Anchor-Games
   reference build. The top navigation turns into a grid of rows rather than a
   hidden burger menu, and the masthead drops its secondary items as space runs
   out. Loaded last so these win over the per-section rules above.
   ========================================================================== */

@media (max-width: 1350px){
  .header-countdown{display:none;}
  .header-anchors{display:none;}
  .header-event{margin-left:auto;}
  .navigation-inner{gap:0;}
  .support-nav{padding-left:6px;}
  .stat-card{padding:20px;}
  .leaderboard-layout{grid-template-columns:minmax(0,1fr) 308px;gap:20px;}
  /* The Department column goes first -- but the department itself moves under the
     name rather than being lost. */
  .data-table th:nth-child(3),.data-table td:nth-child(3){display:none;}
  .employee-mobile-dept{display:block;font-size:.75rem;font-weight:400;color:var(--muted);margin-top:2px;}
}

@media (max-width: 1060px){
  /* An unsticky header buys back vertical space once the nav is collapsed. */
  .app-header{position:relative;}
  /* The nav folds behind the menu button rather than taking permanent rows. */
  .nav-toggle{display:inline-flex;}
  .navigation-bar{display:none;}
  .app-header.nav-open .navigation-bar{display:block;}
  .navigation-inner{padding-block:8px;overflow-x:visible;}
  /* display:contents lifts the support links out of their wrapper so they join the
     same single column as the main ones instead of sitting in one crowded row. */
  .primary-nav{display:flex;flex-direction:column;align-items:stretch;gap:2px;}
  .support-nav{display:contents;}
  .top-nav-link{white-space:normal;justify-content:flex-start;padding:12px 14px;}
  .top-nav-link.is-current::after{display:none;}
  .top-nav-link > svg{width:18px;}
  .arena-count{margin-left:auto;}
  .header-event{display:none;}
  .header-tools{margin-left:auto;}
  .stat-card{padding:18px 16px;min-height:130px;}
  .stat-value{font-size:2rem;}
  .page-actions .button{padding-inline:12px;}
  .game-grid{grid-template-columns:repeat(2,1fr);}
  .people-grid{grid-template-columns:repeat(3,1fr);}
  .dashboard-grid,.hunt-layout,.rules-content,.appearance-layout{grid-template-columns:1fr;}
  .data-table th:nth-child(5),.data-table td:nth-child(5){display:none;}
  .leaderboard-layout{grid-template-columns:minmax(0,1fr) 290px;gap:18px;}
}

@media (max-width: 840px){
  .masthead{min-height:78px;gap:20px;}
  .top-nav-link,.support-nav .top-nav-link{padding:12px 12px;min-height:44px;font-size:.875rem;justify-content:flex-start;}
  .stat-card{padding:17px 14px;min-height:126px;}
  .data-table th,.data-table td{padding-inline:8px;}
  .employee-cell .avatar{width:29px;height:29px;}
  .table-footer{padding-inline:15px;}
  .admin-summary,.qr-grid{grid-template-columns:repeat(2,1fr);}
  .badge-grid{grid-template-columns:repeat(3,1fr);}
  .leaderboard-layout{grid-template-columns:minmax(0,1fr) 270px;gap:16px;}
}

@media (max-width: 720px){
  .page-width{padding-inline:20px;}
  .workspace{padding-block:26px 30px;}
  /* flex-shrink is reset from the base rule so the lockup can ellipsis instead of
     forcing a minimum width on the whole page. */
  .masthead-brand{gap:15px;min-width:0;flex-shrink:1;}
  .mb-wordmark{height:36px;}
  .brand-lockup{min-width:0;}
  .brand-lockup strong{font-size:1rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  /* The tagline gives up its space to the menu button rather than pushing the
     header tools off the right edge. */
  .brand-lockup span{display:none;}
  .header-tools{gap:5px;flex:none;}
  .tool-divider{display:none;}
  .header-profile{padding-left:4px;}
  /* Keep the avatar as the tap target; the name, role and chevron are noise here. */
  .header-profile > span:not(.avatar){display:none;}
  .demo-strip{padding:9px 20px;gap:9px;}
  .page-title{flex-direction:column;align-items:flex-start;gap:18px;margin-bottom:22px;}
  .page-title h1{font-size:2rem;letter-spacing:-.04em;}
  .page-title p{font-size:.875rem;margin-top:8px;}
  .page-title .eyebrow{font-size:.75rem;}
  .page-actions{width:100%;justify-content:flex-start;gap:9px;}
  .page-actions .button{flex:1;min-height:44px;font-size:.875rem;padding:11px 12px;}
  .stats-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin-bottom:22px;}
  .stat-card{min-height:129px;padding:18px;}
  /* The rail stops being a sidebar and stacks full width under the table -- the
     countdown and standing cards need the room for their oversized figures. */
  .leaderboard-layout{grid-template-columns:1fr;gap:22px;}
  /* Search gets its own row; the two pickers share the one below it. */
  .table-controls{display:grid;grid-template-columns:1fr 1fr;gap:9px;padding:15px 17px;}
  .table-controls > input{grid-column:1/-1;}
  .table-controls > select{min-width:0;}
  /* The horizon reads as a two-up calendar once the rail is full width, so the
     connecting spine between entries no longer applies. */
  .roadmap{display:grid;grid-template-columns:1fr 1fr;gap:20px 18px;}
  .roadmap .panel-head{grid-column:1/-1;}
  .roadmap .timeline-item{padding-bottom:0;gap:10px;}
  .roadmap .timeline-item:not(:last-child)::before{display:none;}
  .roadmap .timeline-item strong{font-size:.875rem;}
  .data-table td{font-size:.875rem;height:73px;padding:13px 8px;}
  .employee-cell{gap:9px;font-size:.875rem;}
  .employee-cell .avatar{width:33px;height:33px;}
  .table-footer{padding:14px 17px;gap:12px;}
  .game-grid{grid-template-columns:1fr;}
  .game-card{padding:26px;}
  .game-card h2{font-size:1.625rem;}
  .arena-callout{gap:12px;}
  .filter-tabs{max-width:100%;overflow-x:auto;width:auto;}
  .hunt-start{padding:30px;}
  .hunt-mark{width:80px;height:80px;margin-bottom:22px;}
  .hunt-start h2{font-size:2.25rem;letter-spacing:-.04em;}
  .people-grid{grid-template-columns:repeat(2,1fr);gap:13px;}
  .people-card{padding:28px 15px 0;}
  .people-controls{flex-wrap:wrap;}
  .department-row{gap:10px;flex-wrap:wrap;}
  .department-info{min-width:145px;}
  .department-score{margin-left:auto;}
  .badge-grid{grid-template-columns:repeat(3,1fr);}
  .achievement{padding:18px 10px;}
  .rules-grid{gap:10px;}
  .rule-points{padding:22px 10px;}
  /* Reserve two lines so a wrapping title doesn't push its card's figure out of
     line with the other two. */
  .rule-points h2{font-size:.875rem;min-height:2.6em;}
  .rule-points b{font-size:2rem;gap:6px;}
  .rule-points p,.rule-points .secs{font-size:.75rem;}
  .admin-summary{gap:12px;}
  .admin-tabs{gap:3px;}
  .admin-tabs button{padding:10px 13px;}
  .qr-grid{grid-template-columns:repeat(2,1fr);}
  .overlay{padding:14px;}
  .dialog{padding:24px;max-height:92svh;}
  .app-footer{flex-direction:column;align-items:flex-start;gap:10px;padding:22px 20px;}
}

@media (max-width: 410px){
  .page-width{padding-inline:15px;}
  .masthead{gap:8px;}
  .masthead-brand{gap:10px;}
  /* The secondary anchor mark steps aside and the wordmark eases off so
     "Anchor Games" stays whole rather than truncating next to the menu button. */
  .masthead-brand .mb-mark{display:none;}
  .mb-wordmark{height:32px;}
  .header-tools{gap:0;}
  .header-profile .avatar{width:32px;height:32px;}
  .top-nav-link,.support-nav .top-nav-link{padding-inline:12px;font-size:.875rem;min-width:0;}
  .stat-card{padding:17px 14px;}
  .table-controls{padding-inline:13px;}
  .employee-cell .avatar{display:none;}
  .table-footer{flex-direction:column;align-items:flex-start;}
  .pagination button{min-width:34px;height:36px;}
  .badge-grid{grid-template-columns:repeat(2,1fr);}
  .people-grid,.qr-grid,.admin-summary{grid-template-columns:1fr;}
  .roadmap{grid-template-columns:1fr;gap:18px;}
}

/* Escape Room -- Level 6 reveal. A full-screen dramatic transition shown
   exactly once, the moment a team's answer advances them into the hidden
   surprise level. Nothing else in the app does a full-viewport blackout
   moment, so this gets its own small block rather than being forced into an
   unrelated existing class. Three beats, each just a class toggle away from
   its own transition below: the screen goes dark, then a door appears, then
   the reveal text/digit/continue button -- see renderLevel6Reveal in
   js/escape.js for the timing. */
.escape-reveal-overlay{position:fixed;inset:0;z-index:200;background:#0a0d12;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:24px;opacity:0;transition:opacity .6s ease;}
.escape-reveal-overlay.in{opacity:1;}
.escape-reveal-door{color:#fff;opacity:0;transform:scale(.7);transition:opacity .6s ease,transform .6s cubic-bezier(.34,1.56,.64,1);}
.escape-reveal-door.in{opacity:1;transform:scale(1);}
.escape-reveal-text{opacity:0;transform:translateY(12px);transition:opacity .5s ease,transform .5s ease;margin-top:26px;max-width:420px;pointer-events:none;}
.escape-reveal-text.in{opacity:1;transform:translateY(0);pointer-events:auto;}
.escape-reveal-text .eyebrow{color:#8be3b9;letter-spacing:.12em;font-size:.75rem;font-weight:700;margin-bottom:10px;}
.escape-reveal-text h1{color:#fff;margin:0 0 8px;}
.escape-reveal-text p{color:rgba(255,255,255,.72);margin:0 0 22px;}

/* Escape Room -- spot_intruder's tile grid. Deliberately not the vertical
   .answer-option list multiple_choice/speed use -- "find the odd one out"
   reads better as a grid you scan than a list you read top to bottom -- but
   reuses the exact same hover/selected colours so it still feels like one
   design system, just a different layout for a different kind of question. */
.intruder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:10px;margin-bottom:16px;}
.intruder-tile{border:1px solid #dde6f0;border-radius:var(--radius);padding:22px 12px;text-align:center;font-weight:600;color:#607188;cursor:pointer;}
.intruder-tile:hover{background:#f7faee;}
.intruder-tile.selected{background:var(--theme-soft);border-color:var(--theme-border);color:var(--theme-text);}

/* Escape Room -- the always-visible live-scores sidebar on escape.html.
   Fixed, small, out of the way of actual gameplay; z-index sits below the
   Level 6 reveal's 200 so the reveal still fully covers it during that
   moment rather than a stray score update poking through mid-animation. */
.escape-sidebar{position:fixed;right:16px;bottom:16px;width:220px;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:14px;box-shadow:0 4px 18px rgba(0,0,0,.12);font-size:.8rem;z-index:150;}
.escape-sidebar h4{margin:0 0 8px;font-size:.7rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);}
.escape-sidebar-row{display:flex;justify-content:space-between;gap:10px;padding:4px 0;}

/* Escape Room -- the standalone big-screen/projector scoreboard
   (escape-scoreboard.html). Large, legible from across a room; a full
   re-render every poll like every other live-updating view in this app,
   not a diffed update -- the row count is small and fixed (one per team). */
.escape-scoreboard-grid{display:flex;flex-direction:column;gap:12px;margin-top:24px;}
.escape-scoreboard-row{display:flex;align-items:center;gap:28px;background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:22px 30px;}
.escape-scoreboard-rank{font-size:2rem;font-weight:800;color:var(--muted);width:76px;flex:none;}
.escape-scoreboard-name{flex:1;font-size:1.8rem;font-weight:700;}
.escape-scoreboard-score{font-size:2.2rem;font-weight:800;color:var(--primary);}

/* Escape Room -- two small-screen problems, both from sharing styles written
   for other pages:
   1. The leaderboard tables reuse .data-table, whose responsive rules above
      hide the 3rd column (and the 5th below 1060px) for the MAIN leaderboard's
      Department/Accuracy columns. Here those columns are Time -- the very thing
      the page ranks by -- and Accuracy, so they must always show. .table-scroll
      already lets the table scroll sideways on a phone. The extra selector
      weight beats the nth-child rules whatever the source order.
   2. The live-scores box is pinned bottom-right at every screen size; on a phone
      it sits on top of the answer options and the Submit button. Below 900px it
      drops into normal page flow (the end of the page) instead. */
table.data-table.escape-results th,
table.data-table.escape-results td{display:table-cell;}
@media (max-width: 900px){
  .escape-sidebar{position:static;width:auto;margin:20px 16px 16px;box-shadow:none;}
}
