/* Shared observatory palette; portal pages add space while the game keeps its compact geometry. */
:root {
  --void: #080f14; --navy-900: #080f14; --navy-800: #101b22; --navy-700: #192a33;
  --navy-600: #253d45; --glass: rgba(19, 33, 40, .84); --glass-hi: #192a33;
  --gold: #a4f8d8; --gold-hi: #f3efe5; --gold-dim: #689f92;
  --gold-line: rgba(164, 248, 216, .15); --gold-line-hi: rgba(164, 248, 216, .4);
  --ink: #f3efe5; --ink-soft: #b8c9c8; --ink-mute: #92aaa9; --copper: #cf9d72;
  --font-display: 'Optima', 'Candara', 'Trebuchet MS', sans-serif;
  --font-ui: 'Avenir Next', 'Avenir', 'Segoe UI', sans-serif;
  --font-num: var(--font-ui);
}
body:not(.table-mode) { font-size: 15px; background: var(--void); }
body.table-mode .btn.primary { background: var(--gold); border-color: var(--gold); color: #102b25; }
body:not(.table-mode)::before {
  background: radial-gradient(ellipse at 5% 35%, #193f3b44, transparent 48%), radial-gradient(ellipse at 94% 95%, #62432e25, transparent 46%), #080f14;
}
.shell { grid-template-rows: 84px minmax(0, 1fr); }
.shell-top { padding: 0 clamp(20px, 4vw, 64px); gap: 40px; background: #080f14d9; border-color: #a4f8d81a; backdrop-filter: blur(20px); }
.shell-top .brand { gap: 12px; flex-shrink: 0; }
.shell-top .brand-name { display: inline; font-size: 19px; font-weight: 600; letter-spacing: -.6px; text-transform: none; }
.observatory-mark { display: inline-flex; width: 38px; height: 38px; color: var(--gold); flex-shrink: 0; }
.observatory-mark svg { width: 100%; height: 100%; }
.nav-links { gap: 8px; justify-content: center; }
.nav-link { font-size: 14px; padding: 12px 15px; font-weight: 500; letter-spacing: 0; border-radius: 0; }
.nav-link.on { color: var(--gold); background: transparent; box-shadow: inset 0 -1px 0 var(--gold); }
.nav-user { font-size: 14px; max-width: 180px; }
.nav-avatar { width: 34px; height: 34px; }
.nav-right { gap: 12px; }
.nav-right > .chip { display: none; }
.page-content { padding: 44px clamp(20px, 4vw, 64px) 70px; scroll-behavior: smooth; }
.page-content .page, .page-content.wide .page { max-width: 1320px; }
.page-content .page.narrow { max-width: 650px; }
.page-head { margin-bottom: 32px; }
.page-head h1 { font-size: clamp(34px, 4vw, 56px); font-weight: 500; letter-spacing: -1.6px; text-transform: none; }
.page-sub { font-size: 15px; line-height: 1.65; margin-top: 10px; }
.shell .panel { box-shadow: none; background: var(--glass); border-radius: 16px; }
.shell .panel-title { padding: 17px 22px; font: 600 16px var(--font-ui); letter-spacing: 0; text-transform: none; color: var(--ink); }
.shell .modal-body { padding: 22px; }
body:not(.table-mode) .btn { min-height: 44px; padding: 10px 18px; border-radius: 8px; font-size: 14px; letter-spacing: 0; background: #192a33; box-shadow: none; justify-content: center; }
body:not(.table-mode) .btn.primary { background: var(--gold); border-color: var(--gold); color: #102b25; font-weight: 700; }
body:not(.table-mode) .btn.primary:hover { background: #c3ffe8; box-shadow: 0 0 24px #a4f8d818; }
body:not(.table-mode) .btn.ghost { background: transparent; }
body:not(.table-mode) .btn.xs { padding: 8px 12px; font-size: 13px; }
body:not(.table-mode) input, body:not(.table-mode) select, body:not(.table-mode) textarea { font-size: 16px; min-height: 48px; border-radius: 8px; background: #080f1499; border-color: #b8c9c82e; padding: 12px 14px; }
body:not(.table-mode) textarea { min-height: 130px; resize: vertical; }
body:not(.table-mode) .field { gap: 8px; margin-bottom: 20px; }
body:not(.table-mode) .field > label { font-size: 14px; letter-spacing: 0; text-transform: none; color: var(--ink-soft); }
body:not(.table-mode) :focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.field-hint { color: var(--ink-mute); font-size: 12px; line-height: 1.5; }
.shell .tiny { font-size: 13px; }
.shell .form-error { padding: 12px; border: 1px solid #ff9d9255; border-radius: 8px; background: #ff9d920c; font-size: 14px; }
.shell .form-error[hidden] { display: none; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; padding: 14px 20px; color: #080f14; background: #a4f8d8; transform: translateY(-160%); border-radius: 6px; }
.skip-link:focus { transform: translateY(0); }

/* A physical spread of real cards, held inside an orbital instrument. */
.card-constellation { position: relative; height: 395px; perspective: 1000px; isolation: isolate; }
.constellation-cards { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform .3s ease-out; }
.orbit { position: absolute; border: 1px solid #cf9d724d; width: 430px; height: 430px; border-radius: 50%; top: -12px; left: calc(50% - 215px); pointer-events: none; }
.orbit-a { transform: rotateX(63deg) rotateZ(-24deg); top: 120px; border-color: #a4f8d853; }
.orbit-b { width: 390px; height: 390px; left: calc(50% - 195px); transform: rotateY(53deg) rotateZ(25deg); border-style: dashed; opacity: .45; }
.orbit-c { width: 475px; height: 475px; left: calc(50% - 237px); top: -30px; transform: rotateY(-44deg) rotateZ(-32deg); opacity: .4; }
.orbit-light { position: absolute; width: 70%; height: 50%; left: 15%; top: 35%; background: #70d6b32a; filter: blur(65px); border-radius: 50%; }
.orbit-card { position: absolute; width: 173px; aspect-ratio: 744/1039; border: 1px solid #cf9d728c; border-radius: 11px; background: #192a33; padding: 4px; box-shadow: 0 24px 34px #0008, 3px 2px 0 #4f6158, 6px 4px 0 #0d181b; overflow: hidden; transform-style: preserve-3d; }
.orbit-card img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 7px; }
.orbit-card-0 { left: calc(50% - 227px); top: 101px; transform: rotate(-18deg) rotateY(18deg) translateZ(-45px); }
.orbit-card-1 { left: calc(50% - 88px); top: 34px; transform: rotate(-2deg) translateZ(45px); z-index: 3; width: 184px; }
.orbit-card-2 { left: calc(50% + 70px); top: 112px; transform: rotate(18deg) rotateY(-18deg) translateZ(-25px); }
.card-sheen { position: absolute; inset: 0; background: linear-gradient(126deg, #fff0 30%, #fff2 48%, #fff0 66%); pointer-events: none; }
.orbit-card-name { display: none; }
.art-unavailable .orbit-card-name { display: grid; place-items: center; height: 100%; padding: 20px; font: 24px var(--font-display); text-align: center; }
.orbit-star { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 15px var(--gold); }
.star-a { left: 14%; top: 22%; } .star-b { right: 11%; top: 67%; background: var(--copper); }
@keyframes observatory-arrive { from { opacity: 0; transform: translateY(24px) rotateX(8deg); } to { opacity: 1; transform: translateY(0) rotateX(0); } }
.card-constellation { animation: observatory-arrive 1.2s cubic-bezier(.2,.65,.2,1) both; }

/* Account gateway: spectacle on the left, calm and legible form on the right. */
.page-content .page.auth-page { max-width: 1220px; display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(36px, 6vw, 96px); align-items: center; min-height: calc(100dvh - 200px); }
.auth-world { min-width: 0; padding: 10px 0; }
.world-intro { color: var(--copper); font-size: 15px; margin-bottom: 20px; }
.auth-world h1 { font-size: clamp(52px, 5.8vw, 82px); font-weight: 500; letter-spacing: -3px; line-height: 1.04; max-width: 9ch; color: var(--ink); margin: 0; }
.auth-world > p { max-width: 37ch; font-size: 16px; margin-top: 20px; }
.world-foot { display: flex; align-items: center; gap: 12px; color: var(--ink-mute); font-size: 13px; margin-top: -5px; }
.world-foot::before { content: ''; width: 28px; height: 1px; background: var(--copper); }
.auth-panel { padding: clamp(26px, 3vw, 44px); border: 1px solid #a4f8d82b; border-radius: 22px; background: linear-gradient(140deg, #1a2e36ba, #101b22c9); box-shadow: 0 30px 100px #0004, inset 0 1px 0 #ffffff0d; position: relative; }
.auth-panel::before { content: ''; position: absolute; height: 1px; width: 40%; top: -1px; left: 30%; background: linear-gradient(90deg, #a4f8d800, #a4f8d8, #a4f8d800); }
.auth-panel h2 { font-size: 35px; line-height: 1.2; font-weight: 500; letter-spacing: -1px; margin: 26px 0 10px; }
.auth-panel > p { font-size: 14px; margin-bottom: 28px; }
.auth-panel form .btn.primary { min-height: 50px; margin-top: 4px; }
.auth-links { text-align: center; font-size: 13px; line-height: 1.8; margin-top: 22px; }
.auth-links a { color: var(--gold); }
.guest-link { display: block; margin: 18px auto 0; text-align: center; color: var(--ink-soft); font-size: 13px; padding: 10px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 74px !important; }
.password-toggle { position: absolute; right: 5px; top: 3px; min-width: 62px; min-height: 42px; color: var(--ink-soft); background: none; border: 0; font: inherit; font-size: 12px; cursor: pointer; }

/* Player identity is a card in the collection, with the record kept factual. */
.profile-page .profile-layout { display: grid; grid-template-columns: 330px 1fr; gap: 44px; align-items: start; }
.identity-card { position: relative; padding: 30px; border-radius: 18px; background: linear-gradient(155deg,#274a4555,#142128); border: 1px solid #cf9d7255; text-align: center; perspective: 900px; }
.identity-card::before { content: ''; position: absolute; inset: 16px; border: 1px solid #cf9d7222; border-radius: 10px; pointer-events: none; }
.identity-card .avatar-big { width: 100%; height: 250px; border-radius: 110px 110px 14px 14px; background-size: cover; border: 1px solid #a4f8d844; display: grid; place-items: center; }
.avatar-blank .observatory-mark { width: 85px; height: 85px; }
.identity-name { font: 30px var(--font-display); letter-spacing: -.8px; color: var(--ink); margin: 24px 0 6px; overflow-wrap: anywhere; }
.identity-handle { margin-bottom: 22px; color: var(--copper); font-size: 13px; overflow-wrap: anywhere; }
.profile-editor { padding: 30px; }
.profile-editor h2 { font-size: 24px; font-weight: 500; margin: 0 0 24px; }
.profile-save-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.save-status { font-size: 14px; color: var(--gold); }
.profile-record { padding: 28px 0 0; margin-top: 30px; border-top: 1px solid var(--gold-line); }
.profile-record h2 { font-size: 17px; color: var(--ink-soft); margin-bottom: 20px; }
.profile-record .record-row { padding: 0; gap: 50px; justify-content: start; }
.profile-record .record-cell { align-items: flex-start; }
.profile-record .record-cell b { font-size: 37px; font-weight: 400; color: var(--ink); }
.profile-record .record-cell span { font-size: 13px; text-transform: none; letter-spacing: 0; }
.profile-record > p { font-size: 13px; margin: 20px 0 0; }

/* Deck discovery: real list art, generous tiles, compact filter instrument. */
.browse-masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 32px; border-bottom: 1px solid var(--gold-line); padding: 0 0 24px; }
.browse-masthead h1 { font-size: clamp(44px, 5vw, 68px); font-weight: 500; letter-spacing: -2.3px; margin-bottom: 12px; }
.browse-masthead p { max-width: 42ch; font-size: 16px; }
.browse-masthead .card-constellation { width: 350px; height: 200px; flex: 0 0 350px; overflow: hidden; }
.compact .constellation-cards { scale: .52; transform-origin: 50% 10%; }
.compact .orbit { scale: .55; transform-origin: 50% 10%; }
.compact .orbit-a { top: 75px; }
.compact .orbit-light { filter: blur(40px); }
.browse-page .hub-tabs { margin-top: 18px; margin-bottom: 24px; }
.browse-controls { display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--gold-line); margin-bottom: 24px; }
.browse-page .browse-controls .hub-tabs { margin: 0; border: 0; }
.browse-controls > .row { padding-bottom: 8px; }
.hub-tab { font-size: 14px; letter-spacing: 0; text-transform: none; padding: 13px 20px; }
.hub-grid { grid-template-columns: 260px minmax(0,1fr); gap: 28px; }
.hub-deck-grid { grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 22px; }
.hub-rail { max-height: calc(100dvh - 135px); top: 0; border-radius: 12px !important; }
.hub-rail-top { padding: 16px; gap: 12px; }
.hub-rail-body { padding: 20px 16px; gap: 25px; }
.hub-facet-title { font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--ink-soft); margin-bottom: 12px; }
.facet-chip { min-height: 36px; padding: 7px 10px; font-size: 12px; }
.facet-chip.on { background: var(--gold); border-color: var(--gold); }
.seg-btn { min-height: 42px; font-size: 12px; }
.legend-pick { min-height: 44px; }
.hub-count { margin-bottom: 15px; }
.hub-card { background: #122027; border-color: #a4f8d821; border-radius: 13px; box-shadow: none; transform-style: preserve-3d; transform: perspective(1100px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)); transition: transform .22s ease-out, border-color .22s; }
.hub-card:hover { border-color: #a4f8d877; box-shadow: 0 16px 25px #0003; }
.hub-card-art { height: 200px; background-position: center 22%; }
.hub-card-body { padding: 20px; }
.hub-card-name { font-size: 18px; font-weight: 500; font-family: var(--font-display); }
.hub-card-legend-name { margin-top: 8px; color: var(--copper); }
.hub-card-foot { margin-top: 18px; gap: 8px; }
.hub-card-actions { margin-top: 16px; padding-top: 14px; }
.hub-card-badge, .hub-card-tourney { font-size: 11px; }
.filter-toggle { display: none !important; }
.shell .empty-note { color: var(--ink-soft); font-size: 15px; padding: 45px 20px; }
.shell .empty-note .spin { margin-right: 12px; }

/* Lobby: champion art first, then a deliberate split between practice and social play. */
.lobby-page { --lobby-cut: 22px; }
.lobby-hero { position: relative; height: clamp(480px, 50vw, 640px); margin-bottom: 28px; overflow: hidden; isolation: isolate; border: 1px solid #cf9d7240; border-radius: 4px 32px 4px 32px; background: #102027; box-shadow: 0 42px 100px #0008; }
.lobby-hero::before { content: ''; position: absolute; z-index: 2; inset: 0; pointer-events: none; background: linear-gradient(90deg,#071015 0%,#071015ee 28%,#07101599 49%,#07101518 73%),linear-gradient(0deg,#071015e8 0%,transparent 38%); }
.lobby-hero::after { content: ''; position: absolute; z-index: 3; width: 160px; height: 1px; top: 33px; right: 34px; background: linear-gradient(90deg,transparent,var(--copper)); box-shadow: 0 8px 0 -3px var(--copper); opacity: .8; }
.lobby-hero .hero-art { position: absolute; inset: 0; opacity: .92; background-position: 68% 18%; background-size: cover; filter: saturate(.9) contrast(1.08); transform: scale(1.025); animation: lobby-art-arrive 1.1s cubic-bezier(.2,.7,.2,1) both; }
.hero-text { position: absolute; z-index: 4; left: clamp(32px,5vw,74px); top: clamp(54px,8vw,105px); max-width: min(570px,49%); transform: none; }
.hero-kicker { display: block; margin-bottom: 20px; color: var(--copper); font: 500 13px/1.2 var(--font-ui); letter-spacing: .055em; }
.hero-text h1 { max-width: 10ch; margin: 0; color: var(--ink); font: 500 clamp(48px,6vw,82px)/.98 var(--font-display); letter-spacing: -.055em; text-wrap: balance; }
.hero-intro { max-width: 48ch; margin: 24px 0 0; color: #c0d0cd; font-size: 16px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-actions .btn { min-width: 128px; backdrop-filter: blur(12px); }
.hero-actions .btn:not(.primary) { border-color: #d8e8e338; background: #0814199c; color: #e8eee9; }
.hero-actions .btn.ghost { min-width: auto; border-color: transparent; background: transparent; color: var(--ink-soft); }
.hero-deck-plate { position: absolute; z-index: 5; left: clamp(32px,5vw,74px); right: 34px; bottom: 28px; display: grid; grid-template-columns: 145px minmax(0,1fr) auto; align-items: center; gap: 20px; min-height: 72px; padding: 15px 20px; border-left: 2px solid var(--gold); background: linear-gradient(90deg,#0c191feb,#0c191fb8 72%,#0c191f4d); backdrop-filter: blur(16px); }
.hero-deck-plate > span { color: var(--ink-mute); font-size: 12px; }
.hero-deck-plate .hero-deck { color: var(--ink); font: 500 clamp(17px,2vw,24px)/1.15 var(--font-display); }
.hero-deck-plate .hero-legend { max-width: 260px; margin: 0; color: var(--copper); font: 500 12px/1.4 var(--font-ui); text-transform: none; letter-spacing: 0; }
@keyframes lobby-art-arrive { from { opacity: .5; transform: scale(1.08); } to { opacity: .92; transform: scale(1.025); } }

.lobby-match-stage { margin: 0 0 28px; scroll-margin-top: 22px; }
.lobby-match-stage .matchmaking { border-radius: var(--lobby-cut) 4px var(--lobby-cut) 4px; }
.lobby-grid { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(330px,.82fr); align-items: start; gap: 28px; }
.shell .lobby-practice { overflow: hidden; align-items: stretch; gap: 0; border-color: #a4f8d838; border-radius: 4px var(--lobby-cut) 4px var(--lobby-cut); background: linear-gradient(145deg,#14262ed9,#0d191f); box-shadow: 0 28px 70px #0004; scroll-margin-top: 22px; }
.practice-head { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 178px; padding: 34px 38px; border-bottom: 1px solid #a4f8d820; background: radial-gradient(circle at 90% 20%,#a4f8d812,transparent 34%),linear-gradient(120deg,#19322f55,transparent); }
.practice-kicker { color: var(--copper); font-size: 12px; }
.practice-head h2 { margin: 9px 0 8px; color: var(--ink); font: 500 clamp(30px,3vw,44px)/1.05 var(--font-display); letter-spacing: -.035em; }
.practice-head p { margin: 0; color: var(--ink-mute); line-height: 1.6; }
.practice-sigil { display: grid; place-items: center; width: 82px; height: 82px; flex: 0 0 82px; border: 1px solid #cf9d7280; border-radius: 50%; color: var(--copper); font: 500 18px var(--font-display); box-shadow: inset 0 0 0 8px #0f1b21,inset 0 0 0 9px #a4f8d829; }
.shell .lobby-practice > .modal-body { padding: 34px 38px 38px; }
.practice-player-fields { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(160px,.65fr); gap: 16px; }
.practice-opponent { margin: 4px 0 24px; padding: 25px 0 28px; border-block: 1px solid #a4f8d81c; }
.practice-opponent-head { display: flex; justify-content: space-between; gap: 18px; margin-bottom: 14px; color: var(--ink-soft); font-size: 14px; }
.practice-opponent-head small { color: var(--ink-mute); font-size: 11px; }
.bot-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.lobby-practice .bot-picker { max-height: none; overflow: visible; }
.bot-row { min-height: 66px; padding: 8px 10px; border: 1px solid transparent; border-radius: 7px; background: #0b171d99; }
.bot-row:hover { border-color: #a4f8d83d; background: #182a31; }
.bot-row.on { border-color: var(--gold); background: linear-gradient(130deg,#1d3935,#172b30); box-shadow: inset 3px 0 0 var(--gold); }
.bot-face { width: 38px; height: 38px; }
.bot-title { font-size: 10px !important; }
.bot-rating { color: var(--ink-mute); font-size: 11px; }
.practice-start { min-height: 54px !important; margin-top: 4px !important; font-size: 15px !important; }

.lobby-side { display: grid; gap: 22px; }
.lobby-side .play-card { overflow: hidden; border: 1px solid #a4f8d824; }
.friend-card { border-radius: var(--lobby-cut) 4px 4px 4px; background: #13242b; }
.side-card-head { display: flex; align-items: center; gap: 16px; padding: 28px 28px 22px; }
.side-card-icon { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid #cf9d7273; border-radius: 50%; color: var(--copper); font-size: 22px; }
.side-card-head h2,.library-copy h2 { margin: 0; color: var(--ink); font: 500 26px/1.1 var(--font-display); letter-spacing: -.025em; }
.side-card-head p,.library-copy p { margin: 7px 0 0; color: var(--ink-mute); font-size: 12px; line-height: 1.55; }
.side-card-body { padding: 0 28px 28px; }
.friend-create { margin: 0 0 10px !important; border-color: #cf9d7280 !important; background: #cf9d7212 !important; color: #f1dcc9 !important; }
.join-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.join-row input { min-width: 0; }
.friend-list-link { display: inline-block; margin-top: 18px; color: var(--gold); font-size: 12px; text-underline-offset: 4px; }
.library-card { padding: 30px 28px; border-radius: 4px 4px var(--lobby-cut) 4px; background: linear-gradient(145deg,#16272d,#0d181e); }
.library-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 25px -28px; border-block: 1px solid #a4f8d81a; background: #a4f8d81a; }
.library-stats > div { display: grid; gap: 3px; padding: 20px 28px; background: #101e24; }
.library-stats strong { color: var(--ink); font: 500 26px var(--font-display); }
.library-stats span { color: var(--ink-mute); font-size: 10px; }
.library-links { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; }
.library-links a { min-height: 40px; padding: 10px 0; color: var(--ink-soft); border-bottom: 1px solid #a4f8d823; font-size: 12px; text-decoration: none; }
.library-links a:hover { color: var(--gold); border-color: var(--gold); }
.lobby-page > .panel:not(.lobby-practice) { margin-top: 24px !important; }

@media (min-width: 1450px) { .auth-world .card-constellation { height: 420px; } }
@media (max-width: 1100px) {
  .shell-top { gap: 20px; padding: 0 24px; } .nav-link { padding: 12px 9px; }
  .shell-top .brand-name { font-size: 17px; } .nav-user { max-width: 135px; }
  .page-content .page.auth-page { gap: 35px; } .auth-world h1 { font-size: 64px; }
  .auth-world .card-constellation { scale: .85; margin: -15px -35px -25px; }
  .profile-page .profile-layout { grid-template-columns: 280px 1fr; gap: 28px; }
  .lobby-grid { grid-template-columns: minmax(0,1.4fr) minmax(300px,.8fr); }
  .bot-picker { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 800px) {
  .shell { grid-template-rows: 124px minmax(0,1fr); }
  .shell-top { flex-wrap: wrap; column-gap: 12px; row-gap: 0; padding: 10px 20px 0; align-content: start; }
  .shell-top .brand { height: 48px; } .nav-right { margin-left: auto; height: 48px; }
  .nav-links { order: 3; width: 100%; flex: 0 0 100%; justify-content: flex-start; overflow-x: auto; white-space: nowrap; gap: 12px; height: 56px; align-items: center; }
  .nav-link { min-height: 44px; display: flex; align-items: center; }
  .nav-user .ellipsis { max-width: 110px; } .nav-right .btn.xs { font-size: 12px; padding: 8px; }
  .page-content { padding: 28px 20px 55px; }
  .page-content .page.auth-page { grid-template-columns: 1fr; max-width: 560px; gap: 25px; }
  .auth-world { position: relative; min-height: 160px; padding: 12px 0; overflow: clip; }
  .auth-world h1 { font-size: 45px; max-width: 9ch; letter-spacing: -1.6px; position: relative; z-index: 2; }
  .auth-world > p, .world-foot { display: none; }
  .world-intro { font-size: 13px; margin-bottom: 14px; }
  .auth-world .card-constellation { position: absolute; width: 300px; height: 300px; right: -75px; top: -40px; scale: .5; margin: 0; transform-origin: 50% 50%; pointer-events: none; }
  .auth-panel { padding: 28px; } .auth-panel > .observatory-mark { display: none; } .auth-panel h2 { margin-top: 0; font-size: 30px; }
  .profile-page .profile-layout { grid-template-columns: 1fr; } .identity-card { max-width: 340px; width: 100%; margin: auto; }
  .profile-editor { padding: 25px; }
  .browse-masthead { min-height: 150px; position: relative; overflow: hidden; }
  .browse-masthead h1 { font-size: 48px; } .browse-masthead p { max-width: 34ch; font-size: 14px; }
  .browse-masthead .card-constellation { display: none; }
  .hub-grid { grid-template-columns: 1fr; gap: 24px; } .hub-rail { position: static; max-height: none; }
  .hub-rail-top { grid-template-columns: minmax(0,1fr) 125px; }
  .hub-rail-body { display: none; } .hub-rail.filters-open .hub-rail-body { display: flex; }
  .filter-toggle { display: inline-flex !important; }
  .hub-deck-grid { grid-template-columns: repeat(auto-fill,minmax(260px,1fr)); }
  .facet-chip { min-height: 44px; }
  .lobby-page { --lobby-cut: 18px; }
  .lobby-hero { height: 560px; margin-inline: -20px; border-inline: 0; border-radius: 0; }
  .lobby-hero::before { background: linear-gradient(90deg,#071015ed 0%,#071015a8 62%,#07101520),linear-gradient(0deg,#071015 0%,transparent 50%); }
  .lobby-hero .hero-art { background-position: 62% 15%; }
  .hero-text { left: 24px; right: 24px; top: 45px; max-width: 540px; }
  .hero-text h1 { font-size: clamp(44px,12vw,64px); }
  .hero-intro { max-width: 37ch; font-size: 14px; }
  .hero-actions { margin-top: 22px; }
  .hero-deck-plate { left: 20px; right: 20px; bottom: 20px; grid-template-columns: 1fr; gap: 5px; min-height: 0; padding: 15px 17px; }
  .hero-deck-plate > span { display: none; }
  .hero-deck-plate .hero-legend { max-width: 100%; }
  .lobby-grid { grid-template-columns: 1fr; }
  .practice-head { min-height: 0; padding: 28px 24px; }
  .practice-sigil { width: 66px; height: 66px; flex-basis: 66px; }
  .shell .lobby-practice > .modal-body { padding: 28px 24px; }
  .practice-player-fields { grid-template-columns: 1fr; gap: 0; }
  .lobby-side { grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 420px) {
  .shell-top .brand-name { font-size: 16px; } .shell-top .observatory-mark { width: 28px; height: 28px; }
  .nav-user .ellipsis { display: none; } .nav-right { gap: 7px; }
  .auth-world .card-constellation { right: -50px; scale: .42; opacity: .82; }
  .auth-world h1 { font-size: 42px; } .auth-panel { padding: 24px; }
  .profile-record .record-row { gap: 30px; } .hub-rail-top { grid-template-columns: 1fr; }
  .lobby-hero { height: 620px; }
  .hero-kicker { margin-bottom: 14px; }
  .hero-text h1 { font-size: 44px; }
  .hero-actions .btn { flex: 1 1 calc(50% - 5px); min-width: 0; padding-inline: 10px; }
  .hero-actions .btn.ghost { flex-basis: 100%; }
  .practice-head { align-items: flex-start; }
  .practice-sigil { width: 52px; height: 52px; flex-basis: 52px; box-shadow: inset 0 0 0 5px #0f1b21,inset 0 0 0 6px #a4f8d829; font-size: 14px; }
  .practice-head h2 { font-size: 31px; }
  .practice-opponent-head { display: grid; gap: 5px; }
  .bot-picker { grid-template-columns: 1fr; }
  .lobby-side { grid-template-columns: 1fr; }
  .side-card-head,.library-card { padding-inline: 22px; }
  .side-card-body { padding-inline: 22px; }
  .library-stats { margin-inline: -22px; }
  .library-stats > div { padding-inline: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .page-content { scroll-behavior: auto; }
  .card-constellation, .constellation-cards, .hub-card, .lobby-hero .hero-art { animation: none !important; transition: none !important; }
  .constellation-cards, .hub-card { transform: none !important; }
}
body.no-motion .card-constellation { animation: none; }
body.no-motion .constellation-cards, body.no-motion .hub-card { transform: none !important; transition: none; }

.brand-name { display:grid; gap:5px; }
.brand-name small { font:500 8px/1 var(--font-ui); letter-spacing:.24em; color:#cf9d72; }
.brand-name strong { font:500 19px/1 var(--font-display); letter-spacing:.13em; }
