/* A single broad sheet keeps the live field and the logical key rows together. */
.name-keyboard-dock {box-sizing:border-box;width:min(1080px,calc(100vw - 24px));max-width:none;max-height:calc(100dvh - 24px);padding:16px 22px;border:1px solid #a7b6af88;border-radius:18px;background:#0c202b;color:#ffedc5;box-shadow:0 18px 100px #000a;overflow:auto;}
.name-keyboard-dock::backdrop {background:#030a13bb;}
.name-keyboard-dock .local-name-keyboard {padding:0;background:none;border:0;}
.name-key-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;font:600 21px/1.3 system-ui;margin-bottom:10px;}
.name-keyboard-dock button {touch-action:manipulation;cursor:pointer;}
.name-key-heading button {width:44px;height:44px;flex:none;border:1px solid #859b9c;border-radius:9px;background:#203c49;color:#fff0cd;font:24px system-ui;}
.name-key-active {display:block;box-sizing:border-box;width:100%;min-height:52px;margin:0 0 14px;padding:10px 16px;border:2px solid #e6c58a;border-radius:9px;background:#172f3d;color:#fff0cb;font:500 26px/1.2 system-ui;resize:none;}
.name-key-row {display:grid;grid-template-columns:repeat(var(--keys),minmax(0,1fr));gap:7px;width:calc(100% * var(--keys)/11);margin:7px auto;}
.name-key-row button {min-width:0;min-height:58px;padding:5px 0;border:1px solid #93a6a788;border-radius:9px;background:#284550;color:#fff0ce;font:600 clamp(18px,3vw,30px)/1 system-ui;white-space:nowrap;}
.name-key-tools,.name-key-actions {display:flex;justify-content:center;gap:9px;margin-top:12px;}
.name-key-tools button,.name-key-actions button {min-height:48px;padding:9px 15px;border:1px solid #94a7a777;border-radius:9px;background:#2b4a53;color:#ffefc8;font:600 17px system-ui;flex:1;}
.name-key-actions button:last-child {background:#dfbf82;color:#142932;border-color:#e9d5a3;}
.name-keyboard-dock button:focus-visible {outline:3px solid #f5d697;outline-offset:3px;}
@media(max-height:780px){.name-key-row button{min-height:47px}.name-key-active{min-height:46px;margin-bottom:10px}.name-key-row{margin:5px auto}.name-key-heading{font-size:18px;margin-bottom:6px}}
@media(max-width:700px){.name-keyboard-dock{padding:12px}.name-key-row{gap:4px}.name-key-tools button,.name-key-actions button{font-size:14px;padding:9px 7px}}
/* One competition, two houses, their permanent squads. */
#setupForm:is([data-hub='class'],[data-hub='teams'],[data-hub='goal'],[data-hub='finale']) {grid-template-columns:1fr;width:calc(100vw - 32px);height:calc(100dvh - 32px);max-width:none;max-height:none;}
#setupForm:is([data-hub='class'],[data-hub='teams'],[data-hub='goal'],[data-hub='finale']) #campJourney {display:none;}
#hub[data-view='teams'] .hub-teams {display:flex;}
#hub:is([data-view='class'],[data-view='teams'],[data-view='goal']) {background:linear-gradient(90deg,#071d2eee,#131e29dc 50%,#341e18e6),url('../media/race-v2/grove-clean.png') center/cover;}
#hub .hub-class,#hub .hub-teams,#hub .hub-goal {padding:22px 4vw;gap:16px;}
.competition-head,.team-edit-head {display:flex;align-items:center;gap:20px;flex:none;padding-right:52px;}
.competition-head .hub-eyebrow,.team-edit-head .hub-eyebrow {margin:0 0 5px;}
#hub .competition-head .hub-title {font-size:clamp(25px,3vw,42px);}
.competition-head .year-badge {margin-left:6px;}
#hub .teams-link {margin-left:auto;min-height:48px;padding:10px 22px;background:#192d35;border:1px solid #a3b3a966;border-radius:8px;color:#f5dfad;font:600 16px system-ui;cursor:pointer;}
.competition-houses {display:grid;grid-template-columns:1fr 1fr;gap:5vw;min-height:0;flex:1;}
.competition-house {--house:#83c9e4;min-width:0;display:flex;flex-direction:column;}
.competition-house[data-team='B'] {--house:#e6b381;}
.competition-house-head {display:flex;align-items:center;justify-content:center;gap:20px;margin:0 0 10px;min-height:100px;}
.competition-house-head img {width:clamp(100px,12vh,150px);height:clamp(100px,13vh,160px);object-fit:contain;filter:drop-shadow(0 0 24px color-mix(in srgb,var(--house) 30%,transparent));}
.competition-house-head h3 {color:var(--house);font:500 clamp(28px,3vw,48px)/1 Georgia,serif;margin:0;}
.squad-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;flex:1;align-content:start;}
#hub .squad-card {box-sizing:border-box;position:relative;min-width:0;min-height:160px;display:flex;flex-direction:column;align-items:center;gap:4px;padding:14px 10px;border:1px solid color-mix(in srgb,var(--house) 35%,transparent);border-radius:12px;background:linear-gradient(145deg,#29445455,#0a1823aa);color:#f6e8c6;cursor:pointer;}
#hub .squad-card[aria-pressed='true'] {border:2px solid var(--house);padding:13px 9px;background:radial-gradient(ellipse at 50% 0%,color-mix(in srgb,var(--house) 20%,transparent),#0c1d2a);box-shadow:0 0 22px color-mix(in srgb,var(--house) 14%,transparent);}
#hub .squad-card[data-suspended='true'] {background:#24303a;border-color:#7e8a9466;cursor:default;}
#hub .squad-card[data-suspended='true'] .squad-badge {filter:grayscale(1);opacity:.55;}
.squad-badge {display:block;position:relative;width:94px;height:100px;flex:none;}
.squad-badge img,.intro-badge img {width:100%;height:100%;object-fit:contain;}
.squad-card strong {font:500 clamp(18px,1.6vw,25px)/1.1 Georgia,serif;text-align:center;}
.squad-card-members {color:#b9c9c9;font:400 13px/1.3 system-ui;text-align:center;}
#hub .squad-empty {align-self:center;grid-column:1/-1;margin:24px auto;padding:16px 26px;min-height:52px;border:1px solid #b4bcaa66;border-radius:9px;background:#152f3a;color:#f1dab0;font:600 18px system-ui;cursor:pointer;}
.competition-controls {display:flex;justify-content:center;gap:14px;align-items:center;flex:none;}
#hub .competition-controls button {min-height:48px;margin:0;padding:12px 25px;font:600 16px system-ui;}
#hub .competition-controls button:not(.hub-primary) {border:1px solid #a9b19c66;border-radius:24px;background:#152b32;color:#e8d9b8;cursor:pointer;}
#hub .competition-standing {height:32px;min-height:32px;border:0;background:none;padding:0;margin:0;flex:none;}
#hub .competition-standing .rv-side,#hub .competition-standing .rv-caption {display:none;}
#hub .competition-standing .rv-track {height:24px;flex:1;box-shadow:0 0 25px #bed6e733;mask-image:linear-gradient(90deg,transparent,#000 15% 85%,transparent);}
#hub .competition-standing .rv-fill-a,#hub .competition-standing .rv-fill-b {filter:blur(1px);}
.competition-trails {flex:none;}
#hub .competition-trails .timeline {margin:0;}
.competition-route {color:#c0c9c5;font:14px/1.4 system-ui;margin-top:8px;}
.competition-route>summary,.squad-history>summary,#classArchive>summary {cursor:pointer;min-height:28px;}
.squad-history {font:14px/1.4 system-ui;color:#c1ccc9;flex:none;}
.squad-history table {border-collapse:collapse;width:100%;}
.squad-history td,.squad-history th {padding:9px 12px;text-align:left;border-bottom:1px solid #9badb044;}
.squad-edit-columns {display:grid;grid-template-columns:1fr 1fr;gap:28px;}
#teamListEditor {min-height:0;overflow:auto;flex:1;}
.squad-edit-house {--house:#85ccec;min-width:0;}
.squad-edit-house[data-team='B'] {--house:#edbc8b;}
.squad-edit-house>header {display:flex;gap:14px;align-items:center;margin-bottom:12px;}
.squad-edit-house>header img {width:75px;height:80px;object-fit:contain;}
.squad-edit-house h3 {margin:0;color:var(--house);font:500 30px Georgia,serif;}
.squad-edit-house>header label {margin-left:auto;display:flex;align-items:center;gap:9px;font:15px system-ui;}
.squad-edit-house>header input {width:65px;min-height:42px;padding:5px 8px;box-sizing:border-box;color:#f7e4bc;background:#18323d;border:1px solid #9aabac66;border-radius:7px;font:600 21px system-ui;}
.squad-edit-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.squad-edit-card {min-width:0;position:relative;border:1px solid color-mix(in srgb,var(--house) 30%,transparent);border-radius:12px;padding:12px;background:#0c1d2ac9;display:flex;flex-direction:column;align-items:center;gap:9px;}
.squad-edit-card .squad-badge {width:76px;height:80px;}
.squad-edit-name {display:flex;gap:5px;width:100%;}
.squad-edit-card input[type='text'],.squad-edit-card textarea,.squad-edit-card select {box-sizing:border-box;min-width:0;min-height:42px;width:100%;padding:8px 10px;border:1px solid #94ada766;border-radius:7px;background:#203742;color:#f4e7c7;font:400 17px/1.25 system-ui;}
.squad-edit-card input[type='text'] {font-weight:600;}
.squad-edit-card textarea {resize:vertical;}
.squad-edit-card select {font-size:14px;}
#hub .name-key-launch {width:42px;min-height:42px;flex:none;background:#2b414a;border:1px solid #9aafac77;border-radius:7px;color:#e7d3aa;font:20px system-ui;cursor:pointer;}
#hub .squad-member-key {display:none;}
.squad-edit-tools {display:grid;grid-template-columns:44px 1fr 44px;align-items:center;width:100%;}
#hub .squad-crest-change {grid-column:2;justify-self:center;position:relative;margin:0;padding:0;border:0;background:none;cursor:pointer;}
.squad-crest-mark {position:absolute;right:0;bottom:0;display:grid;place-items:center;width:24px;height:24px;border:1px solid #d4ba7e88;border-radius:50%;background:#172e39;color:#e8d3a1;font:20px/1 system-ui;}
.squad-available {display:grid;place-items:center;width:44px;height:44px;cursor:pointer;}
.squad-available input {width:36px;height:36px;margin:0;accent-color:#d4ba7e;cursor:pointer;}
.squad-edit-card[data-suspended='true'] {background:#17232cc9;border-color:#7e8a9466;}
.squad-edit-card[data-suspended='true'] .squad-badge {filter:grayscale(1);opacity:.55;}
.squad-edit-card[data-suspended='true'] input[type='text'],.squad-edit-card[data-suspended='true'] textarea {color:#b4bdc3;background:#29343c;}
.squad-crest-picker {position:absolute;z-index:5;top:85px;left:8px;right:8px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:8px;border:1px solid var(--house);border-radius:10px;background:#132b38;box-shadow:0 8px 24px #000b;}
.squad-crest-picker[hidden] {display:none;}
#hub .squad-crest-choice {display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;min-height:86px;margin:0;padding:6px 2px;border:1px solid #9fb9c344;border-radius:7px;background:#1d3542;color:#f4e7c7;font:12px/1.15 system-ui;cursor:pointer;}
#hub .squad-crest-choice[aria-pressed='true'] {border-color:var(--house);background:#344a53;}
#hub .squad-crest-choice .squad-badge {width:52px;height:54px;}
.squad-crest-change:focus-visible,.squad-crest-choice:focus-visible,.squad-available:focus-within {outline:3px solid #f0dba3;outline-offset:3px;border-radius:7px;}
.team-edit-actions {display:flex;justify-content:flex-end;gap:18px;flex:none;}
#hub .team-edit-actions button {margin:0;min-height:48px;padding:10px 26px;}
#teamNamesSkip {color:#bccbc6;background:none;border:0;font:600 15px system-ui;cursor:pointer;}
#teamEditStatus {color:#ffe2a8;margin:0;font:15px system-ui;}
.squad-archived {margin-top:16px;font:14px system-ui;color:#b7c7c5;}
.squad-archived button {min-height:42px;margin:8px;padding:8px 16px;}
#hub .hub-goal {justify-content:center;gap:20px;}
#hub .hub-goal>.hub-back {position:absolute;top:22px;left:26px;}
#hub .hub-goal>.hub-title,#goalEyebrow {text-align:center;}
#hub .goal-cards {display:flex;gap:10px;justify-content:center;flex:none;}
#hub .goal-card {flex:1;max-width:250px;min-width:0;min-height:56px;padding:12px;}
#hub .goal-card .gap-row {display:none;}
#hub .goal-card>strong {font:600 17px system-ui;}
#hub #groupChoice {background:none;border:0;padding:0;}
.group-toolbar,.group-secondary {display:flex;justify-content:center;gap:14px;margin:14px 0;}
#hub .group-toolbar button {min-height:44px;border:1px solid #a7ac9277;border-radius:24px;background:#1a333c;color:#efdfba;font:600 16px system-ui;padding:9px 28px;cursor:pointer;}
#hub .group-secondary button {min-height:42px;background:none;border:0;color:#c2cfcb;font:500 15px system-ui;cursor:pointer;}
.runner-cards {display:grid;grid-template-columns:1fr 1fr;gap:30px;max-width:1040px;margin:auto;}
.runner-card {position:relative;text-align:center;border:1px solid #79a3b96b;border-radius:14px;padding:18px;background:#0d2331c9;}
.runner-card[data-team='B'] {border-color:#d0a07a66;background:#30221fc9;}
.runner-card header {display:flex;justify-content:center;align-items:center;gap:12px;}
.runner-card header img {width:55px;height:60px;object-fit:contain;}
.runner-card h3 {color:#d7e5de;font:500 25px Georgia,serif;margin:0;}
.runner-card>.squad-badge {margin:auto;width:115px;height:125px;}
.runner-name {margin:6px 0;color:#fce9ba;font:500 35px/1.1 Georgia,serif;}
.runner-members,.manual-runners {color:#c2d0cb;font:18px/1.4 system-ui;}
.runner-card select {min-height:44px;width:100%;max-width:330px;padding:7px 12px;color:#e8dfc3;background:#1b3541;border:1px solid #849e9e77;border-radius:8px;font:17px system-ui;}
#hub #beginGameButton {margin:0 auto;flex:none;}
.teacher-controls .teacher-race-actions {border-top:1px solid #7e919555;margin-top:7px;padding-top:7px;}
.teacher-controls .teacher-race-actions summary {padding:10px;cursor:pointer;color:#b8c6c7;font:500 14px system-ui;}
.teacher-controls #currentClassGroup {font:14px/1.4 system-ui;}
#hub .settings-actions {display:flex;flex-wrap:wrap;gap:8px;}
#hub .settings-actions button {min-height:44px;padding:9px 14px;background:#1b3541;color:#f4e5bf;border:1px solid #81949466;border-radius:8px;font:500 15px system-ui;}
#phaseOverlay[data-phase='paused'] #phaseEyebrow {display:none;}
.class-size-field {display:flex;align-items:center;gap:12px;font:500 15px system-ui;color:#c3ceca;}
#classSizeInput {min-height:40px;width:100px;padding:5px 10px;background:#152e3a;color:#f4e4bd;border:1px solid #8c9d9d;border-radius:8px;font:18px system-ui;}
/* The introduction is a presentation, never a race clock or a draw. */
.squad-intro {box-sizing:border-box;position:fixed;inset:0;width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:26px 5vw 96px;border:0;overflow:auto;color:#f7e8c6;background:linear-gradient(90deg,#061a2be6,#0b171fdd 50%,#2f1812df),url('../media/race-v2/grove-clean.png') center/cover;}
.squad-intro[hidden] {display:none;}
.squad-intro h2 {text-align:center;letter-spacing:.17em;font:500 clamp(28px,3vw,52px) Georgia,serif;margin:8px 0 24px;}
.squad-intro-teams {display:grid;grid-template-columns:1fr 1fr;gap:5vw;max-width:1500px;margin:auto;}
.intro-house {--house:#8cd4f3;text-align:center;min-width:0;}
.intro-house[data-team='B'] {--house:#efb977;}
.intro-parent {font:600 16px/1.2 system-ui;letter-spacing:.12em;color:var(--house);margin:0 0 8px;}
.intro-badge {display:block;width:min(31vh,36vw);height:min(32vh,38vw);margin:0 auto;filter:drop-shadow(0 0 28px color-mix(in srgb,var(--house) 38%,transparent));}
.intro-house h3 {margin:12px 0 18px;color:#ffecc1;font:500 clamp(28px,3.6vw,58px)/1.1 Georgia,serif;text-wrap:balance;}
.intro-members {display:grid;gap:10px;}
.intro-member {margin:0;color:#e2ece6;font:500 clamp(21px,2.5vw,38px)/1.15 Georgia,serif;opacity:0;transform:translateY(18px);transition:opacity .5s,transform .5s;}
.intro-member[data-visible='true'] {opacity:1;transform:none;text-shadow:0 0 22px color-mix(in srgb,var(--house) 40%,transparent);}
.squad-intro footer {position:fixed;bottom:24px;left:20px;right:20px;display:flex;gap:18px;justify-content:center;}
.squad-intro button {min-height:50px;padding:10px 30px;border:1px solid #c6b37e77;border-radius:26px;background:#183440;color:#f4e4bf;font:600 18px system-ui;cursor:pointer;}
#squadIntroBegin {background:#ddc284;color:#142630;border-color:#f1dfac;}
#squadIntroBegin:disabled {opacity:.25;cursor:default;}
.squad-intro[data-motion='reduced'] .intro-member {transition:none;}
.squad-final-honours {display:flex;gap:16px;justify-content:center;flex-wrap:wrap;}
.squad-award {text-align:center;max-width:320px;}
.squad-award .squad-badge {margin:auto;}
@media(max-height:800px){#hub .hub-class,#hub .hub-teams,#hub .hub-goal{padding:14px 3vw;gap:10px}.competition-house-head{min-height:75px;margin-bottom:8px;gap:15px}.competition-house-head img{width:80px;height:86px}.competition-house-head h3{font-size:32px}#hub .squad-card{min-height:124px;padding:8px}#hub .squad-card[aria-pressed='true']{padding:7px}.squad-card .squad-badge{width:62px;height:66px}.squad-card strong{font-size:21px}.squad-grid{gap:9px}.squad-edit-card{gap:6px;padding:9px}.squad-edit-card .squad-badge{width:52px;height:55px}.squad-edit-card input[type='text'],.squad-edit-card textarea,.squad-edit-card select{min-height:36px;font-size:15px;padding:6px 8px}.squad-edit-house>header img{width:58px;height:62px}.squad-edit-house h3{font-size:27px}.competition-head .hub-eyebrow{font-size:10px}.runner-card{padding:12px}.runner-card>.squad-badge{width:85px;height:90px}.runner-name{font-size:30px}.intro-badge{width:25vh;height:27vh}.intro-house h3{margin:6px 0 12px}.squad-intro h2{margin:0 0 16px}.intro-members{gap:7px}}
@media(max-width:850px){.competition-houses{gap:24px}.competition-house-head{gap:10px}.competition-house-head h3{font-size:26px}.squad-card-members{font-size:12px}.squad-grid{gap:8px}.squad-edit-columns{gap:14px}.squad-edit-grid{grid-template-columns:1fr}.squad-edit-card .squad-badge{width:65px;height:70px}.squad-edit-house>header{gap:7px;flex-wrap:wrap}.squad-edit-house>header img{width:50px;height:54px}.squad-edit-house h3{font-size:24px}.competition-head{gap:10px}.competition-head .year-badge{display:none}.runner-cards{gap:16px}.intro-member{font-size:23px}.intro-house h3{font-size:30px}}
@media(prefers-reduced-motion:reduce){.intro-member{transition:none}}
#hub .competition-houses {flex:none;}
#hub .competition-head .teams-link {margin-right:42px;}
@media(max-height:800px){#hub .competition-house-head{min-height:82px;margin-bottom:6px}#hub .competition-trails .timeline{padding-top:0;margin:0}#hub .competition-trails .node-orb{width:44px;height:44px;font-size:23px}#hub .competition-trails .timeline::before,#hub .competition-trails .timeline::after{top:22px}#hub .competition-trails .node-label{margin-top:3px}#hub .competition-trails .node-sub{font-size:11px;min-height:15px}#hub .squad-edit-card{padding:8px;gap:5px}#hub .squad-edit-identity .squad-badge{width:60px;height:64px}#hub .squad-edit-card .name-key-launch{min-height:36px;height:36px}#hub .squad-edit-card textarea{height:34px;min-height:34px}.squad-edit-house>header{margin-bottom:8px}}
.hub-home-crests {display:flex;justify-content:center;align-items:center;gap:28px;}
.hub-home-crests img {width:clamp(80px,12vh,140px);height:clamp(88px,14vh,155px);object-fit:contain;filter:drop-shadow(0 0 18px #b8dfec55);}
.hub-home-crests span {color:#dfc48b;font:32px Georgia,serif;}
@keyframes rift-crest-arrive {from{opacity:0;transform:translateY(16px) scale(.85);filter:drop-shadow(0 0 55px #c0e5ff)}to{opacity:1;transform:none}}
.competition-house-head img {animation:rift-crest-arrive 1.1s ease-out both;}
#phaseOverlay[data-phase='ready'] .opening-emblems {gap:7vw;min-height:150px;}
#phaseOverlay[data-phase='ready'] .opening-emblems img {width:min(22vh,220px);height:min(24vh,245px);}
#phaseOverlay[data-phase='ready'] .phase-card {background:radial-gradient(ellipse,#091e2bee,#091e2b66 55%,transparent 80%);border:0;box-shadow:none;}
#hub .hub-finale[data-state='winner'],#hub .hub-finale[data-state='draw'] {background:linear-gradient(#06132688,#06132644),url('../media/victory-art-v5/rift-moonward-sanctuary-v5.webp') center/cover;}
#hub .hub-finale[data-winner='B'] {background-image:linear-gradient(#27130f77,#20141955),url('../media/victory-art-v5/rift-dawnfire-sanctuary-v5.webp');}
#hub .hub-finale .finale-crests {height:min(26vh,260px);}
#hub .hub-finale .finale-crests img {width:min(23vh,230px);height:min(26vh,260px);}
#hub .hub-finale .hub-title {font-size:clamp(38px,4.2vw,72px);}
@media(prefers-reduced-motion:reduce){.competition-house-head img{animation:none}}
.squad-badge,.intro-badge,.award-badge {display:grid;place-items:center;}
.squad-badge-art {display:block;width:100%;aspect-ratio:1;height:auto;background-repeat:no-repeat;}
@media(max-height:800px){.squad-card .squad-badge{width:80px;height:84px}#hub .squad-card{min-height:142px}}
.class-operation-error {position:fixed;z-index:250;left:50%;bottom:16px;translate:-50% 0;box-sizing:border-box;width:min(760px,calc(100vw - 32px));margin:0;padding:14px 20px;border:1px solid #e5bf77;border-radius:9px;background:#172a32f5;color:#ffe1aa;font:600 17px/1.4 system-ui;box-shadow:0 5px 25px #0008;}
.class-operation-error[hidden] {display:none;}
/* The standing is a collision of house light, with the seam at the real ratio. */
#hub .competition-standing .rv-track {height:34px;mask-image:radial-gradient(ellipse,#000 20%,#000b 45%,transparent 72%);border:0;background:none;box-shadow:none;}
#hub .competition-standing .rv-fill-a {background:radial-gradient(ellipse at 100% 50%,#edfaff 0%,#a2dcff 8%,#4892e9c9 34%,#1b5db87a 64%,transparent 88%);clip-path:polygon(0 40%,15% 20%,29% 35%,48% 8%,61% 21%,77% 4%,88% 18%,100% 0,100% 100%,87% 83%,72% 98%,58% 78%,42% 92%,22% 67%,0 76%);}
#hub .competition-standing .rv-fill-b {background:radial-gradient(ellipse at 0% 50%,#fff3d7 0%,#ffd39d 8%,#e99052d9 34%,#b34c2a7a 64%,transparent 88%);clip-path:polygon(0 0,13% 18%,28% 4%,44% 24%,60% 10%,77% 32%,100% 43%,100% 77%,80% 67%,62% 90%,40% 78%,25% 98%,12% 83%,0 100%);}
#hub .competition-standing .rv-seam {box-shadow:0 0 17px 5px #fff0cbaa;}
/* The approved Dawnfire cells have wider transparent margins. Scale the full
   square cell uniformly so the actual motifs match Moonward's optical height. */
[data-badge^='rift-dawnfire-']>.squad-badge-art {transform:scale(1.35);}

/* Emblems lead the composition. Sizes include the approved cells' transparent
   margins: about 110/155px of painted squad art at 720p/1080p. */
#hub .hub-class {padding:12px 3vw;gap:6px;--main-crest:clamp(164px,22vh,234px);--squad-crest:clamp(124px,16vh,176px);}
#hub .competition-head .hub-title {font-size:clamp(28px,2.3vw,40px);}
#hub .competition-head .hub-eyebrow {font-size:10px;margin-bottom:3px;}
/* Distribute the spare hub height around the house crests and squad cards. */
#hub .competition-houses {gap:3vw;flex:1 0 auto;}
#hub .competition-house {justify-content:space-evenly;}
#hub .competition-house-head {height:calc(var(--main-crest)*.87);min-height:0;margin:0 0 clamp(16px,2.3vh,26px);gap:8px;}
#hub .competition-house-head img {width:var(--main-crest);height:var(--main-crest);flex:none;}
#hub .competition-house[data-team='B'] .competition-house-head img {scale:.89;}
#hub .competition-house-head h3 {font-size:clamp(29px,2.6vw,48px);}
#hub .squad-grid {grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;flex:none;}
#hub .squad-card,#hub .squad-card[aria-pressed='true'] {min-height:0;padding:4px 3px 7px;gap:2px;border-width:1px;border-radius:9px;background:linear-gradient(#172c3833,#091c2877);box-shadow:none;}
#hub .squad-card[aria-pressed='true'] {border-color:var(--house);background:radial-gradient(ellipse at 50% 38%,color-mix(in srgb,var(--house) 22%,transparent),#0a1c28aa);box-shadow:inset 0 0 12px color-mix(in srgb,var(--house) 12%,transparent);}
#hub .squad-card .squad-badge {width:var(--squad-crest);max-width:100%;height:auto;aspect-ratio:1;filter:drop-shadow(0 3px 9px #0008);}
#hub .squad-card strong {min-height:2.2em;display:grid;place-items:center;font-size:clamp(17px,1.35vw,25px);line-height:1.1;}
#hub .squad-card-members {display:flex;flex-direction:column;align-items:center;gap:0;box-sizing:border-box;width:100%;padding:2px 3px 3px;color:#d5e1dc;font:400 clamp(18px,1.2vw,24px)/1.2 system-ui;text-align:center;}
#hub .squad-card-member {display:block;max-width:100%;overflow-wrap:anywhere;}
#hub .competition-standing {height:18px;min-height:18px;}
#hub .competition-standing .rv-track {height:24px;}
#hub .competition-controls button {min-height:44px;padding:9px 22px;}
#hub .competition-trails .timeline {padding-top:0;}
#hub .competition-trails .node-orb {width:42px;height:42px;font-size:23px;}
#hub .competition-trails .timeline::before,#hub .competition-trails .timeline::after {top:21px;}
#hub .competition-trails .node-label {margin-top:3px;font-size:11px;}
#hub .competition-trails .node-sub {font-size:11px;min-height:14px;}
#hub .competition-route {margin-top:2px;}
#hub .competition-route>summary {min-height:24px;font-size:12px;}
#hub .competition-route .squad-history,#hub .competition-route #classArchive {margin-top:14px;}
/* The editor retains the compact controls; more of each crest is now visible. */
#hub .squad-edit-identity .squad-badge {width:clamp(88px,13vh,144px);height:auto;aspect-ratio:1;}
#hub .squad-crest-choice .squad-badge {width:52px;height:54px;}
#hub .squad-edit-house>header img {width:clamp(80px,12vh,130px);height:clamp(80px,12vh,130px);}
/* Team identity is a paired template; only the member list stays in view. */
#hub .hub-teams,#hub .hub-teams :is(input,textarea,select) {color-scheme:dark;}
.squad-edit-identity {width:100%;display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:12px;}
.squad-edit-title {margin:0;color:#f6e6bd;font:500 clamp(20px,1.5vw,28px)/1.15 Georgia,serif;text-align:left;overflow-wrap:anywhere;text-wrap:balance;}
.squad-edit-members {display:flex;align-items:stretch;gap:6px;width:100%;}
#hub .squad-edit-members textarea {flex:1;width:0;box-sizing:border-box;min-height:62px;height:62px;padding:9px 10px;resize:vertical;background:#142f3b;color:#f2e6ca;border:1px solid #7f9a9b88;font:400 17px/1.25 system-ui;}
#hub .squad-edit-members textarea::placeholder {color:#adbfbd;opacity:1;}
#hub .squad-member-key {display:block;flex:none;width:44px;min-height:44px;margin:0;padding:4px;border:1px solid #7f9a9b88;border-radius:7px;background:#203d47;color:#f2dfad;font:24px system-ui;cursor:pointer;}
.squad-team-options {width:100%;color:#c0d0cb;font:14px/1.3 system-ui;}
.squad-team-options>summary {width:max-content;max-width:100%;min-height:32px;padding:4px 0;box-sizing:border-box;cursor:pointer;}
.squad-team-options>summary::marker {color:var(--house);}
#hub .squad-team-change {min-height:42px;padding:7px 13px;margin:5px 0;border:1px solid #8ba29b66;border-radius:7px;background:#1a3541;color:#ecddb8;font:500 15px system-ui;cursor:pointer;}
#hub .squad-team-options .squad-crest-picker {position:static;box-sizing:border-box;left:auto;right:auto;top:auto;margin:6px 0;width:100%;box-shadow:none;}
#hub .squad-team-options .squad-available {display:flex;align-items:center;gap:9px;width:auto;min-height:44px;margin-top:5px;}
#hub .squad-team-options .squad-available input {width:26px;height:26px;}
.squad-team-options>summary:focus-visible,.squad-team-change:focus-visible,.squad-member-key:focus-visible,.squad-edit-members textarea:focus-visible {outline:3px solid #f0dba3;outline-offset:3px;}
/* A single short arrival, then a calm moonlit / ember-lit presentation. */
.squad-intro {padding:18px 4vw 88px;}
.squad-intro h2 {margin:0 0 8px;font-size:clamp(30px,3vw,52px);}
.squad-intro-teams {gap:4vw;max-width:1800px;}
.squad-intro .intro-parent {margin-bottom:0;font-size:clamp(13px,1.25vw,21px);}
.squad-intro .intro-badge {position:relative;isolation:isolate;width:min(46vh,38vw,500px);height:auto;aspect-ratio:1;}
.squad-intro .intro-house[data-revealed='false'] {visibility:hidden;}
.squad-intro[data-phase='revealing'] .intro-house[data-revealed='true'] :is(.intro-parent,.intro-badge,h3) {animation:squad-crest-enter .7s cubic-bezier(.2,.8,.2,1) both;}
.squad-intro[data-phase='complete'] .intro-member {transition:none;}
.squad-intro .intro-badge::before {content:'';position:absolute;inset:5%;z-index:-1;background:radial-gradient(ellipse,color-mix(in srgb,var(--house) 25%,transparent),transparent 68%);filter:blur(10px);}
.squad-intro .intro-house h3 {margin:4px 0 10px;font-size:clamp(30px,3.3vw,58px);}
.squad-intro .intro-members {gap:6px;}
.squad-intro .intro-member {font-size:clamp(23px,2.2vw,38px);}
.squad-intro footer {bottom:18px;}
@keyframes squad-crest-enter {from{opacity:0;transform:translateY(24px) scale(.8)}to{opacity:1;transform:none}}
.squad-intro[data-motion='reduced'] .intro-badge {animation:none;}
#hub .squad-award .squad-badge {width:clamp(170px,26vh,280px);height:auto;aspect-ratio:1;}
#hub .squad-award h3 {font:500 21px/1.2 Georgia,serif;}
#hub .squad-award p {font:500 24px/1.2 Georgia,serif;margin:5px 0 12px;}
@media(max-width:1050px){#hub .squad-grid{grid-template-columns:repeat(2,minmax(0,1fr))}#hub .competition-house-head{height:auto;flex-direction:column;gap:0;padding:8px 0 14px}#hub .competition-house-head h3{font-size:30px}}
@media(max-height:650px){.squad-intro{padding-top:10px}.squad-intro .intro-badge{width:min(42vh,35vw)}.squad-intro .intro-house h3{font-size:28px;margin:2px 0 5px}.squad-intro .intro-member{font-size:20px}}
@media(prefers-reduced-motion:reduce){.squad-intro[data-phase='revealing'] .intro-house[data-revealed='true'] :is(.intro-parent,.intro-badge,h3){animation:none}}
