/* The signed-in client's frame (ui/front/shell.rs, frame.rs, social.rs and home.rs; layout A, Tyler 2026-10-28: "A is
   best"). Tokens only. A grid: the top bar across, the page under it, and the party and friends column on the right,
   which folds into a rail in the narrow layouts and opens over the page from it. Each page has its own darkened arena
   backdrop; the title scene is the signed-out title's alone. */
/* One layout on every monitor (Tyler, 11 November 2026: "the client looks radically different on other monitors. We
   gotta try to normalize that somehow"). From 1100 wide the frame is laid out in a virtual window at least 1920x900
   and zoomed by --client-scale (kit/scale.rs `client_scale`) to fit the real one, down and up, so a laptop, a 1080p,
   a 1440p and a 4K screen show the same composition; an ultrawide gets more width at the same height. Zoom lays text
   out again at its final size, so it stays sharp, and clicks land on what is drawn. Below 1100 wide the scale is 1 and
   the narrow rules (max-width: 1099.98px, here and in the pages) apply; no rule may switch on a desktop window's size,
   since every desktop window is the one layout. A viewport unit inside the frame is a real-window unit zoomed again,
   so the frame's own are --vw and --vh. */
.client-shell { zoom: var(--client-scale, 1); --vw: calc(1vw / var(--client-scale, 1)); --vh: calc(1vh / var(--client-scale, 1)); }
.client-shell { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) var(--column-w); grid-template-rows: var(--bar-h) minmax(0, 1fr); overflow: hidden; background: var(--bg-0); color: var(--text); }
.client-backdrop { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: var(--bg-0) left top / max(1920px, 100%, calc(100 * var(--vh, 1vh) * 16 / 9)) auto no-repeat; image-rendering: pixelated; }
.client-backdrop::after { content: ''; position: absolute; inset: 0; background: var(--page-shade); }
.client-shell[data-backdrop="base"] .client-backdrop { background-image: url('/c/5aa2f22d2986814d0d25fe080ac7652af54421d2cff61be99de4011f6ae72036.png'); }
.client-shell[data-backdrop="forest"] .client-backdrop { background-image: url('/c/36df47e96c1ecad9f5f9744c26333f62cc384f9b702cf3afe076950a09200605.png'); }
.client-shell[data-backdrop="lane"] .client-backdrop { background-image: url('/c/0b0d40915017e79fabc63dae02826b34473d2a3bd0dbe2b584878ea4c11cea17.png'); }

/* The top bar: the match HUD's steel with a gold bottom edge. Logo, gold Play, a rule, the tabs, then the account
   chip, the bell and the gear over the column's width. */
.client-topbar { grid-column: 1 / -1; grid-row: 1; position: relative; z-index: 6; display: flex; align-items: center; gap: 28px; min-width: 0; padding-left: 20px; background: var(--steel); border-bottom: 2px solid var(--trim); box-shadow: 0 2px 0 var(--steel-dark), 0 8px 20px var(--shadow); }
.client-logo { flex: none; margin: 0; line-height: 0; } .client-logo img { display: block; width: 216px; height: 84px; margin-top: 2px; image-rendering: pixelated; }
/* The bar's Play is the kit's gold system at 24px, its letter spacing the system's (kit.css). */
.btn.primary.big.client-play { flex: none; width: 200px; height: 56px; padding: 0; font-size: var(--t-l); }
.btn.primary.big.client-play { position: relative; }
.client-play[aria-current="page"]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -10px; height: 3px; background: var(--you); }
.client-bar-rule { flex: none; width: 2px; height: 48px; background: var(--steel-line); }
.client-nav { flex: 1 1 auto; align-self: stretch; display: flex; align-items: stretch; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
/* The tabs are functional labels, so they wear the body face in bold capitals at 17px: Silkscreen at 16px read slowly
   (client council round 13). It is no wider than the pixel face was, so the bar still fits at 1280 wide. */
.client-nav .kit-tab { display: flex; align-items: center; flex: none; padding: 0 10px; font: 700 var(--t-name)/1 var(--font-body); letter-spacing: 1px; }
.client-nav .kit-tab:is(.on, [aria-current="page"])::after { bottom: 10px; left: 6px; right: 6px; }
/* The music, inbox and Settings buttons sit left of the party column's edge; the account chip has the column's width. */
.client-bar-tools { position: relative; flex: none; align-self: stretch; display: flex; align-items: center; gap: 8px; margin-left: auto; padding-right: 16px; }
.client-bar-end { position: relative; flex: none; align-self: stretch; display: flex; align-items: center; gap: 8px; width: var(--column-w); padding: 0 12px 0 16px; border-left: 2px solid var(--column-edge); }
.client-account { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 0; color: var(--text); background: none; border: 0; text-align: left; font: inherit; cursor: pointer; }
.client-account-who { display: flex; flex-direction: column; min-width: 0; }
.client-avatar { width: 60px; height: 60px; }
.client-avatar img { object-fit: cover; }
.client-silver { color: var(--silver-light); font: 700 var(--t-s)/1.2 var(--font-body); white-space: nowrap; }
.client-silver-retry { padding: 0; color: inherit; background: none; border: 0; font: inherit; cursor: pointer; }
.client-silver-retry:focus-visible { outline: 2px solid var(--silver-light); }
.client-account-name { display: flex; gap: 5px; font: 700 var(--t-name)/1.2 var(--font-body); white-space: nowrap; }
.client-account-name > :first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; } .client-account-name .faint { flex: none; font-weight: 400; }
.client-account:is(:hover, .virtual-hover) .client-account-name { color: var(--you-light); }
.client-account:focus-visible { outline: 3px solid var(--you-light); outline-offset: 2px; }
.client-topbar .inbox-panel { position: absolute; top: calc(100% + 8px); right: 16px; width: min(400px, calc(100 * var(--vw, 1vw) - 24px)); max-height: calc(100 * var(--vh, 1vh) - var(--bar-h) - 24px); padding: 16px; z-index: 7; }
@media (min-width: 1100px) {
  /* The notification drawer occupies the social column, leaving the page and its seats visible. */
  .client-topbar .inbox-panel { position: fixed; top: var(--bar-h); right: 0; bottom: 0; width: var(--column-w); max-height: none; }
  /* Reserve the column's foot for live search, admission or room-invitation status. */
  .client-shell:has(.inbox-panel):is(:has(.shell-state[data-place="column"] > :not(p[role="alert"])), :has(.room-party-status span)) .client-topbar .inbox-panel { bottom: 160px; }
  .client-shell:has(.inbox-panel) .social-column :is(.social-scroll, .social-pane) { visibility: hidden; }
  .client-shell:has(.inbox-panel) .social-column :is(.shell-state[data-place="column"], .room-party-status) { position: fixed; top: auto; right: 12px; bottom: 12px; left: auto; width: calc(var(--column-w) - 24px); max-height: 136px; overflow: auto; visibility: visible; }
  /* The drawer already announces the same admission error. */
  .client-shell:has(.inbox-panel) .shell-state[data-place="column"] > p[role="alert"] { display: none; }
}

/* The page, under the top bar and left of the column. */
.client-main { grid-column: 1; grid-row: 2; position: relative; z-index: 1; display: flex; min-width: 0; min-height: 0; }
.client-content { flex: 1; min-width: 0; overflow: auto; padding: 28px 32px 32px; container-type: size; }
/* Search, admission and room invitations sit over the column's foot, or beside an open Notifications drawer, without
   moving the page (Tyler, 2026-10-29: "Never let something that changes readjust to where things align"). While the
   column is folded, search and admission are a band above the page (below). */
.shell-state { display: flex; flex-direction: column; gap: 8px; }
.social-column :is(.shell-state[data-place="column"], .room-party-status) { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 4; box-shadow: 0 8px 20px var(--shadow); }
.shell-state:not(:has(> *)), .shell-state[data-place="page"] { display: none; }
.shell-state > :not(.btn) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; padding: 8px 12px; background: var(--panel-flat); border: 2px solid var(--trim-dark); font-size: var(--t-s); }
.shell-state > .btn { align-self: flex-start; }

/* The party and friends column: the full height under the top bar, always on the right. A pane (party chat, a
   conversation, a profile) covers it while open. */
.social-column { grid-column: 2; grid-row: 2; position: relative; z-index: 3; display: flex; flex-direction: column; min-height: 0; background: var(--column-cloth); border-left: 2px solid var(--column-edge); box-shadow: inset 2px 0 0 var(--steel-dark); }
.social-scroll { flex: 1; min-height: 0; overflow: hidden auto; display: flex; flex-direction: column; gap: 22px; padding: 20px 18px; }
.social-pane { position: absolute; inset: 8px; z-index: 2; overflow: hidden auto; padding: 8px; }
.social-rail, .social-scrim { display: none; }
.phone-nav, .phone-party { display: none; }
/* The narrow layouts (coordinator, 31 October: no tab may scroll out of sight): the bar tightens (no rule, a narrower
   Play, 6px tab padding, no letter spacing), the party column folds into its rail, the logo shrinks and the tabs take a
   row of their own. These rules once switched at 1900, 1600, 1400 and 1280 wide; the scaled frame is 1920 wide on
   every desktop window, so they now apply together below 1100. Measured by apps/game/tests/browser_topbar_fit.cjs. */
@media (max-width: 1099.98px) {
  .client-topbar { gap: 12px; }
  .btn.primary.big.client-play { width: 130px; }
  .client-bar-rule { display: none; }
  .client-nav { gap: 2px; }
  .client-nav .kit-tab { padding: 0 6px; letter-spacing: 0; }
  .client-nav .kit-tab:is(.on, [aria-current="page"])::after { left: 2px; right: 2px; }
}
@media (max-width: 1099.98px) {
  .client-shell { grid-template-columns: minmax(0, 1fr) var(--rail-w); }
  .client-topbar { padding-left: 16px; }
  .btn.primary.big.client-play { height: 52px; }
  .client-bar-end { width: auto; gap: 10px; padding: 0 12px; }
  .client-account { flex: none; } .client-account-who { display: none; }
  /* Launch integration: the name hides here, but a guest still says it is one ("Guest", its note in the tooltip) and a
     member keeps the badge, so both read at 1366 x 768. */
  .client-account-who:has(.guest-chip, .member-badge) { display: flex; justify-content: center; }
  .client-account-who:has(.guest-chip, .member-badge) .client-account-name > :not(.member-badge),
  .client-account-who:has(.member-badge) .pres, .client-account-who .guest-chip small { display: none; }
  .client-content { padding: 16px 24px 22px; }
  .shell-state[data-place="column"] { display: none; }
  /* Folded column: the status is a band over the page, in its flow, so it covers no control (browser_quickplay at
     800x900, 11 November 2026: at the page's top right it lay over the Champions search and Profile's section tabs). */
  .client-main { flex-direction: column; }
  .shell-state[data-place="page"]:has(> *) { display: flex; flex: none; align-items: stretch; margin: 8px 24px 0; }
  .shell-state[data-place="page"] > :not(.btn) { box-shadow: 0 8px 20px var(--shadow); }
  .client-shell .social-rail { grid-column: 2; grid-row: 2; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 12px; min-height: 0; overflow: hidden auto; padding: 14px 0; background: var(--column-cloth); border-left: 2px solid var(--column-edge); }
  .client-shell .social-column { display: none; }
  .client-shell.social-open .social-column { display: flex; grid-area: auto; position: absolute; top: var(--bar-h); bottom: 0; right: var(--rail-w); width: min(var(--column-w), calc(100% - var(--rail-w))); z-index: 5; box-shadow: -12px 0 30px var(--shadow); }
  .client-shell.social-open .social-scrim { display: block; position: absolute; top: var(--bar-h); bottom: 0; left: 0; right: var(--rail-w); z-index: 4; background: var(--scrim); }
}
@media (max-width: 1099.98px) {
  .client-logo img { width: 162px; height: 63px; margin-top: 0; }
  .btn.primary.big.client-play { width: 120px; }
  .client-topbar { gap: 8px; }
  .client-nav .kit-tab { padding-inline: 4px; }
  .client-bar-tools { gap: 6px; padding-right: 8px; }
  .client-bar-end { gap: 6px; padding-inline: 8px; }
}
/* Put the navigation on its own row before the account and tools can crowd it out. */
@media (max-width: 1099.98px) {
  .client-shell { --bar-h: 128px; }
  .client-topbar { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-rows: 72px minmax(0, 1fr); gap: 0 10px; padding: 0 12px; }
  .client-logo { grid-area: 1 / 1; }
  .client-play { grid-area: 1 / 2; }
  .client-bar-tools { grid-area: 1 / 3; align-self: center; justify-self: end; margin: 0; padding: 0; }
  .client-bar-end { grid-area: 1 / 4; align-self: center; }
  .client-nav { grid-area: 2 / 1 / 3 / -1; align-self: stretch; width: 100%; overflow: visible; }
  .client-nav .kit-tab { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 750px) {
  .client-logo img { width: 110px; height: auto; }
  .btn.primary.big.client-play { width: 85px; height: 48px; }
  .client-bar-tools { gap: 4px; }
  .client-bar-tools .btn.icon { padding: 6px; }
  .client-bar-end { gap: 6px; padding: 0 6px; }
  .client-account .socket { width: 44px !important; height: 44px !important; }
  .client-account .socket > img { width: 32px !important; height: 32px !important; }
  .client-silver { max-width: 90px; white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 600px) {
  .client-shell { --bar-h: 150px; }
  .client-topbar { grid-template-rows: 60px minmax(0, 1fr); }
  .client-topbar .inbox-panel { position: fixed; top: calc(var(--bar-h) + 8px); left: 12px; right: 12px; width: auto; }
  .client-content { padding: 12px 12px 20px; }
  .client-nav { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 0 2px; }
  .client-nav .kit-tab { min-width: 0; padding: 0 3px; }
  .client-nav .kit-tab:is(.on, [aria-current="page"])::after { bottom: 4px; }
}
@media (max-width: 480px) {
  .client-topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 0 4px; padding: 0 8px; }
  .client-logo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .client-play { grid-area: 1 / 1; }
  .btn.primary.big.client-play { width: 60px; font-size: var(--t-s); letter-spacing: 1px; }
  .client-bar-tools { grid-area: 1 / 2; }
  .client-bar-tools .btn.icon { padding: 3px; }
  .client-bar-end { grid-area: 1 / 3; gap: 4px; padding: 0 4px; }
  .client-account .socket { width: 38px !important; height: 38px !important; }
  .client-silver { max-width: 80px; }
}
@media (max-width: 400px) {
  .client-shell { --bar-h: 210px; }
  .client-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 300px) {
  .client-shell { --bar-h: 250px; }
  .client-topbar { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: 60px 40px minmax(0, 1fr); }
  .client-play { grid-area: 1 / 1; justify-self: start; }
  .client-bar-end { grid-area: 1 / 2; }
  .client-bar-tools { grid-area: 2 / 1 / 3 / -1; }
  .client-nav { grid-area: 3 / 1 / 4 / -1; }
}
/* The slots, wherever they stand: steel words on the bar, the page shown lit gold with a soft gold fill. */
html.touch .phone-nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; padding: 4px 2px 0;
  color: var(--text-dim); background: none; border: 0; font: 700 var(--t-xs)/1 var(--font-body); white-space: nowrap; cursor: pointer; }
html.touch .phone-nav-item[hidden] { display: none; }
html.touch .phone-nav-item:is([aria-current="page"], [data-lit]) { color: var(--you-light); background: var(--you-soft); }
html.touch .phone-nav-item:is([aria-current="page"], [data-lit])::before { content: ''; position: absolute; height: 3px; background: var(--you); box-shadow: 0 0 8px var(--you-glow); }
html.touch .phone-nav-item:disabled { color: var(--text-faint); opacity: .5; cursor: not-allowed; }
html.touch .phone-nav-item:focus-visible { outline: 3px solid var(--you-light); outline-offset: -3px; }
/* A phone (Tyler, 2026-11-17: "a lot of the menus are kind of squished and they're not optimized for mobile"; measured
   by tests/browser_phone_menus.cjs). Play is a steel tab first among the pages (frame.rs `play_class`), so the only
   gold Play on a phone is the one that starts a match (phone council round 1: two gold PLAYs with different jobs).
   Upright, up to 600 wide (mobile council round 2, both judges' first fix): the top bar is one short row, the portrait
   and its Silver on the left, the party, Feedback, the bell and the gear on the right; the pages are a bar of five
   under the thumb (phone_nav.rs), and the party rail is the top bar's party button (social.rs `PartyButton`), whose
   column opens over the page between the two bars. */
@media (max-width: 600px) and (orientation: portrait) {
  html.touch .client-shell { --bar-h: 60px; --nav-h: calc(64px + env(safe-area-inset-bottom, 0px)); grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--bar-h) minmax(0, 1fr) var(--nav-h); }
  html.touch .client-topbar { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 0 8px; }
  html.touch .client-logo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  html.touch :is(.client-nav, .client-music), html.touch .client-shell .social-rail { display: none; }
  html.touch .client-bar-end { order: -1; flex: 0 1 auto; min-width: 0; height: 100%; flex-direction: row; align-items: center; gap: 6px; padding: 0; border-left: 0; }
  html.touch .client-bar-tools { flex: none; height: 100%; gap: 4px; margin-left: auto; padding: 0; }
  html.touch .client-bar-tools .btn.icon { padding: 6px; min-width: 44px; min-height: 44px; }
  html.touch .client-bar-tools .client-feedback { min-height: 44px; padding-inline: 10px; font-size: var(--t-xs); }
  html.touch .client-account-who:not(:has(.member-badge)) { display: none; }
  html.touch .client-account { min-width: 44px; min-height: 44px; }
  html.touch .client-account .socket { width: 44px !important; height: 44px !important; }
  html.touch .client-account .socket > img { width: 32px !important; height: 32px !important; }
  /* The balance beside the portrait, on two lines on a narrow phone rather than pushing the tools off the edge. */
  html.touch .client-bar-end .client-silver { min-width: 0; max-width: none; font-size: var(--t-xs); line-height: 1.15; white-space: normal; overflow-wrap: normal; }
  html.touch .client-topbar .inbox-panel { top: calc(var(--bar-h) + 8px); bottom: calc(var(--nav-h) + 8px); max-height: none; }
  html.touch .client-shell.social-open .social-column { top: var(--bar-h); bottom: var(--nav-h); left: 0; right: 0; width: auto; }
  /* The column drops from the top bar only as far as what it holds, over the dimmed page, with the top bar's gold
     edge at its foot (round 3, Opus: under a short list its lower half was empty cloth); a long list scrolls in it as
     before. Party chat, a conversation or a profile laid over it takes the full height, as their boxes need. */
  html.touch .client-shell.social-open .social-column:not(:has(> .social-pane)) { bottom: auto; max-height: calc(100% - var(--bar-h) - var(--nav-h));
    border-bottom: 2px solid var(--trim); box-shadow: 0 2px 0 var(--steel-dark), 0 12px 30px var(--shadow); }
  html.touch .client-shell.social-open .social-column:not(:has(> .social-pane)) .social-scroll { flex: 0 1 auto; padding-bottom: 22px; }
  html.touch .client-shell.social-open .social-scrim { right: 0; bottom: var(--nav-h); }
  /* The page bar: the top bar's steel with its gold edge turned to face the page, five slots a thumb wide, each a
     pixel icon over its word; the page shown is lit gold, as the tabs were, with a gold rule at its top. */
  html.touch .phone-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
    height: var(--nav-h); padding: 0 4px env(safe-area-inset-bottom, 0px); background: var(--steel); border-top: 2px solid var(--trim);
    box-shadow: 0 -2px 0 var(--steel-dark), 0 -8px 20px var(--shadow); }
  html.touch .phone-nav-item { gap: 5px; height: 62px; font-size: clamp(12px, 3.2vw, 13px); }
  html.touch .phone-nav-item .pico { width: 24px; height: 24px; }
  html.touch .phone-nav-item:is([aria-current="page"], [data-lit])::before { left: 18%; right: 18%; top: 0; }
  /* The party button says "Party" over its count in the body face (round 3, Opus: a bare "1/3" over a green "0" at 11
     px said nothing of what they counted); who is online is in the column it opens. The requests sit on its corner,
     clear of the words, and stacked the words leave the bar one row with the Silver beside the portrait. */
  html.touch .phone-party { position: relative; display: inline-flex; align-items: center; gap: 6px; min-width: 44px; min-height: 44px; padding: 0 20px 0 8px; white-space: nowrap; }
  html.touch .phone-party .pico { flex: none; width: 18px; height: 18px; }
  html.touch .phone-party-text { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font: 700 var(--t-xs)/1.05 var(--font-body); }
  html.touch .phone-party-word { color: var(--text); }
  html.touch .phone-party-count { color: var(--you-light); }
}
/* A narrow phone (360 wide): the balance stands under the portrait, so the tools keep their room. */
@media (max-width: 380px) and (orientation: portrait) {
  html.touch .client-bar-end { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
  html.touch .client-bar-end .client-silver { font-size: var(--t-badge); line-height: 1; white-space: nowrap; }
  /* "Party · 1/3" on one line beside Invite and Close, where it broke after the dot. */
  html.touch .social-column .social-head { gap: 8px; }
  html.touch .social-column .social-head .kit-label { font-size: var(--t-xs); letter-spacing: 1px; white-space: nowrap; }
}
/* On its side, at every phone width (round 3, both judges: the eight words read as a desktop header, and the bar
   upright was a second map): the same five slots stand in the top bar in place of the tabs, each the bar's height and
   at most a thumb and a half wide, and the menu music goes into More. The words are 14 px (11.2 on the glass at 0.8),
   each under its icon in the bar's 56 px; where the bar has the room the icon stands beside a 16 px word (phone
   council round 4, Sol: icon over word was what kept the bar 76 px tall). */
@media (orientation: landscape) and (max-width: 1099.98px) {
  html.touch :is(.client-nav, .client-music) { display: none; }
  html.touch .phone-nav { flex: 1 1 auto; align-self: stretch; display: flex; min-width: 0; }
  html.touch .phone-nav-item { flex: 1 1 0; min-width: 56px; max-width: 136px; gap: 3px; padding-top: 0; font-size: var(--t-xs); }
  html.touch .phone-nav-item .pico { width: 22px; height: 22px; }
  html.touch .phone-nav-item:is([aria-current="page"], [data-lit])::before { left: 14%; right: 14%; bottom: 3px; }
}
@media (orientation: landscape) and (min-width: 800px) and (max-width: 1099.98px) {
  html.touch .phone-nav-item { flex-direction: row; gap: 8px; font-size: var(--t-s); }
  html.touch .phone-nav-item .pico { flex: none; }
}
/* The safe area. Run from the Home Screen (index.html: viewport-fit=cover, a translucent status bar), an iPhone draws the
   page under its Dynamic Island, its clock and its home bar; a Safari tab keeps the page out of them by itself. So the
   client keeps its controls and words inside the safe area: on its side the island takes about 59 px at the left or
   right and the home bar 21 at the foot; upright, the island and clock take the top and the home bar the foot (which
   the page bar already clears). env() is 0 wherever nothing needs clearing (a computer, a browser tab), so those are
   unchanged. The shell is drawn at --client-scale, so the insets are divided by it to measure the same on the glass.
   The top bar takes the top inset into its own height (--bar-h), so the boxes placed under it move with it. */
html.touch .client-shell { --safe-top: calc(env(safe-area-inset-top, 0px) / var(--client-scale, 1));
  padding: 0 calc(env(safe-area-inset-right, 0px) / var(--client-scale, 1)) 0 calc(env(safe-area-inset-left, 0px) / var(--client-scale, 1)); }
@media (orientation: landscape) {
  html.touch .client-shell { padding-bottom: calc(env(safe-area-inset-bottom, 0px) / var(--client-scale, 1)); }
}
@media (max-width: 600px) and (orientation: portrait) {
  html.touch .client-shell { --bar-h: calc(60px + var(--safe-top)); }
  html.touch .client-topbar { padding-top: var(--safe-top); }
}
/* More's sheet (phone_nav.rs `MoreSheet`): a modal dialog the screen's size with the page dimmed under it and the
   panel at its foot, as the Items and Store sheets are; a heading and Close in the panel's own top row, then the pages
   as rows a thumb tall, the one shown lit, and the menu music as a switch that says On or Off. */
html.touch dialog.phone-more[open] { position: fixed; inset: 0; box-sizing: border-box; display: flex; flex-direction: column; justify-content: flex-end;
  width: calc(100 * var(--vw, 1vw)); max-width: none; height: calc(100 * var(--vh, 1vh)); max-height: none; margin: 0; overflow: hidden;
  padding: max(12px, env(safe-area-inset-top, 0px)) env(safe-area-inset-right, 0px) 0 env(safe-area-inset-left, 0px); /* The safe area, above. */
  color: var(--text); background: transparent; border: 0; overscroll-behavior: contain; }
html.touch dialog.phone-more::backdrop { background: rgb(3 7 15 / 66%); }
html.touch .phone-more-panel { display: flex; flex-direction: column; gap: 10px; min-height: 0; overflow: hidden auto; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -12px 28px var(--shadow); }
html.touch .phone-more-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--trim-dark); }
html.touch .phone-more-head .kit-label { margin: 0; font: 400 var(--t-m)/1.2 var(--font-head); letter-spacing: 2px; color: var(--you-light); }
html.touch .phone-more-close { min-width: 88px; min-height: 44px; padding: 0 16px; }
html.touch .phone-more-note { margin: 0; color: var(--text-dim); font-size: var(--t-s); }
html.touch .phone-more-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
html.touch .phone-more-row { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 0 14px; color: var(--text);
  background: var(--plate); border: 2px solid var(--plate-edge); font: 700 var(--t-m)/1.2 var(--font-body); text-align: left; cursor: pointer; }
html.touch .phone-more-row .pico { width: 24px; height: 24px; color: var(--text-dim); }
html.touch .phone-more-row[aria-current="page"] { color: var(--you-light); background: var(--you-soft); border-color: var(--trim-dark); box-shadow: inset 3px 0 0 var(--you); }
html.touch .phone-more-row[aria-current="page"] .pico { color: var(--you); }
html.touch .phone-more-row:disabled { color: var(--text-faint); opacity: .6; cursor: not-allowed; }
html.touch .phone-more-row:focus-visible { outline: 3px solid var(--you-light); outline-offset: -3px; }
html.touch .phone-more-state { margin-left: auto; min-width: 52px; padding: 4px 8px; color: var(--text-dim); border: 2px solid var(--steel-line); font-size: var(--t-s); text-align: center; }
html.touch .phone-more-music[aria-checked="true"] .phone-more-state { color: var(--you-light); border-color: var(--trim); }
@media (prefers-reduced-motion: no-preference) {
  html.touch dialog.phone-more[open] > .phone-more-panel { animation: phone-more-rise 180ms cubic-bezier(.2, .8, .3, 1); }
}
@keyframes phone-more-rise { from { transform: translateY(32%); opacity: .4; } }
/* On its side the sheet is zoomed with the menus: its rows are 56 px, so 44 on the glass, and its three pages stand in
   one row, so the pages, the music and Feedback fit 320 px tall. */
@media (orientation: landscape) and (max-width: 1099.98px) {
  html.touch .phone-more-panel { width: min(640px, calc(100 * var(--vw, 1vw) - 24px)); margin: 0 auto; }
  html.touch .phone-more-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.touch :is(.phone-more-row, .phone-more-close) { min-height: 56px; }
}
/* A member's badge (the gold diamond after the name) rides the portrait's corner as a small crest on a phone, where
   the name is hidden and a thumb has no hover to name a lone diamond beside it (mobile council round 2, Opus 16). */
html.touch .client-account { position: relative; }
html.touch .client-account-who:has(.member-badge) { position: absolute !important; top: 2px; right: 2px; display: flex !important; pointer-events: none; }
html.touch .client-account-who .member-badge { width: 12px; height: 12px; margin: 0; box-shadow: 0 0 0 2px var(--steel-dark), 0 0 0 3px #6b4a10; }
/* A phone on its side, the menus zoomed to 0.8 to 0.86 (kit/scale.rs `touch_client_scale`): one row of bar, since two
   would take a third of the height, and the logo gives the five slots its room. What a thumb presses in the bar and
   the rail is 56 px here, so at least 44 on the glass (phone council round 1: 44 drew at 35 to 38). The bar is no
   taller than that: 58 px with its gold edge, 46 on the glass (round 4, Sol: at 76 it took 61 px of a 340 px window
   before any heading), so the tools stand its full height. */
@media (orientation: landscape) and (max-width: 1099.98px) {
  html.touch .client-shell { --bar-h: 58px; }
  html.touch .client-topbar { display: flex; gap: 8px; padding: 0 10px; }
  html.touch .client-logo { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  html.touch .client-bar-tools { align-items: stretch; gap: 4px; margin-left: 0; padding: 0; }
  html.touch .client-bar-tools .btn.icon { min-width: 56px; min-height: 56px; }
  html.touch .client-bar-tools .client-feedback { min-height: 56px; padding-inline: 12px; font-size: var(--t-xs); }
  /* The portrait's button is the bar's height, its Silver along its foot, so the two stand in the bar's 56 px. */
  html.touch .client-bar-end { flex-direction: column; justify-content: center; gap: 0; min-width: 78px; padding: 0 0 0 6px; }
  html.touch .client-account { align-items: flex-start; justify-content: center; align-self: stretch; min-width: 56px; min-height: 56px; padding-top: 2px; }
  html.touch .client-account .socket { width: 38px !important; height: 38px !important; }
  html.touch .client-account .socket > img { width: 28px !important; height: 28px !important; }
  html.touch .client-bar-end .client-silver { position: absolute; left: 6px; right: 0; bottom: 1px; font-size: var(--t-xs); line-height: 1; text-align: center; white-space: nowrap; pointer-events: none; }
  html.touch .client-bar-end .client-silver-retry { pointer-events: auto; }
  html.touch .client-shell .social-rail { gap: 6px; padding: 8px 0; }
  html.touch .client-shell .social-rail .btn.icon, html.touch .social-rail-invite { min-width: 56px; min-height: 56px; }
  html.touch .client-shell .social-rail .socket { width: 52px !important; height: 52px !important; }
  html.touch .social-rail-open { width: 52px; height: 52px; }
  /* The online count says "2 online" under Friends (social.rs `rail_online`), so its mark stands closer to fit the rail. */
  html.touch .social-rail-friends .pres { gap: 4px; white-space: nowrap; }
}
/* Home's doorway with the player's one champion in it (home.rs `hero_figures`): the champion stands in the middle of
   the scene, not at the right where the three's front figure stood (phone council round 4, Opus). */
html.touch .home-hero-champion:has(> .home-hero-trio > .home-hero-trio-figure:only-child) { justify-content: center; }
html.touch .home-hero-trio:has(> .home-hero-trio-figure:only-child) { transform-origin: 50% 100%; }
/* Too short for every seat and both buttons: the open seat goes (the count above says the party's seats), so Friends
   stays on the screen (round 1 on an iPhone with Safari's bars: it was cut at the foot). */
@media (orientation: landscape) and (max-width: 1099.98px) and (max-height: 380px) {
  html.touch .social-rail-open { display: none; }
}
/* In a match's room the pages wait, faded (room.css), but Play is where the player is: it stays lit, as the gold one
   does on a desktop. */
html.touch .client-nav .client-nav-play:disabled[aria-current="page"] { color: var(--you-light); opacity: 1; cursor: default; }
.social-rail-rule { width: 44px; height: 2px; flex: none; background: var(--trim-dark); }
.social-rail-friends { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.social-rail-friends .pres { font-size: var(--t-xs); }
.social-rail-seat { line-height: 0; }
.social-rail-invite { width: 52px; height: 52px; font-size: var(--t-m); }
.social-rail-open { flex: none; width: 52px; height: 52px; border: 2px dashed var(--trim-dark); }
.social-rail-count { width: 52px; text-align: center; }

/* Column sections: a Silkscreen heading over a gold rule. */
/* The section labels and the groups under them are body-face capitals, readable at a glance; Silkscreen stays for page
   titles and big actions (client council round 13). */
.social-head { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.social-head .kit-label { flex: 1; font: 700 var(--t-name)/1.2 var(--font-body); letter-spacing: 1px; }
.social-head .faint { color: var(--text-dim); font-size: var(--t-s); }
.social-party, .social-friends { position: relative; display: flex; flex-direction: column; gap: 14px; }
/* The party keeps one size as members come and go (Tyler, 2026-10-29): three seats, the latest lines and its two
   buttons always stand; a notice and the invite list lie over what is under them. */
.social-party { min-height: calc(42px + 2px + 220px + 96px + 36px + 4 * 14px); }
.social-notice:empty { display: none; }
.social-notice, .social-party p, .social-friends p { margin: 0; font-size: var(--t-s); }
.social-party > .social-notice, .social-friends > .social-notice { position: absolute; left: 0; right: 0; z-index: 3; padding: 6px 10px; background: var(--panel-flat); border: 2px solid var(--trim-dark); box-shadow: 0 8px 20px var(--shadow); }
.social-party > .social-notice { top: calc(100% + 2px); }
.social-friends > .social-notice { top: 58px; }
.party-seats { position: relative; flex: none; display: flex; flex-direction: column; gap: 14px; height: 220px; }
.party-members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.party-member { display: flex; align-items: center; gap: 12px; height: 64px; }
.party-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: var(--t-s); }
.party-picks { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.party-who > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-name { font-size: var(--t-m); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.party-lead { color: var(--you-light); font-size: var(--t-s); font-weight: 700; }
.party-invite { flex: none; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0; color: var(--text-dim); background: none; border: 0; font: inherit; text-align: left; cursor: pointer; }
.party-invite .socket.empty { width: 60px; height: 60px; }
.party-invite:is(:hover, .virtual-hover) { color: var(--you-light); } .party-invite:is(:hover, .virtual-hover) .socket.empty { border-color: var(--trim); }
.party-invite:focus-visible { outline: 3px solid var(--you-light); outline-offset: 2px; }
.party-invite[aria-expanded="true"] { color: var(--you-light); } .party-invite[aria-expanded="true"] .socket.empty { border-color: var(--trim); }
/* A seat still open, under the Invite seat: the seat's place, quieter than Invite, so the party's three seats always
   stand (party.rs `open_seats`; client council round 18: an empty band under a solo player's Invite seat). */
.party-open { flex: none; display: flex; align-items: center; gap: 12px; height: 64px; color: var(--text-faint); opacity: .7; }
.party-open .socket.empty { width: 60px; height: 60px; }
/* Invite a friend's list, laid over what lies under the party's seats. */
.party-seats > .party-picker { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 5; display: grid; gap: 8px; max-height: 360px; overflow: hidden auto; padding: 10px 12px; background: var(--panel-steel) padding-box; box-shadow: 0 12px 30px var(--shadow); }
.party-picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.party-picker .social-notice:empty { display: none; }
.party-picker [data-invite] { min-width: 84px; }
/* The latest party lines in a box of one height, the newest at the bottom, and only whole lines (Ibara check, 29
   October 2026: a lone "u" from a line cut at the top). The lines stack up from the bottom, newest first; one that no
   longer fits wraps into a second column, out of view, and a line longer than three rows ends in an ellipsis. */
.party-latest { flex: none; display: flex; flex-direction: column; justify-content: flex-end; height: 96px; overflow: hidden; padding: 8px 12px; }
/* Alone: the slot keeps its height, but its one line is a caption over Party chat, not an empty plate (party.rs). */
.party-latest.party-latest-empty { padding: 0 2px 4px; }
.party-actions { flex: none; display: flex; align-items: center; gap: 8px 16px; height: 36px; }
.party-actions .party-leave { margin-left: auto; }
/* Alone, Party chat and Leave party wait in their places (Tyler, 2026-10-29) on the kit's disabled steel, with no face
   and their words and icon dimmed, so they read as unavailable (client council round 18: they looked live). */
.social-party .party-actions .btn:disabled { opacity: .6; background: transparent; color: var(--text-faint); }
.social-party .party-actions .btn:disabled .pico { opacity: .55; }
@media (max-width: 600px) {
  .social-party { flex: none; }
  .party-actions { flex-wrap: wrap; height: auto; }
  .party-actions .party-leave { margin-left: 0; }
}
/* The column opened over the page on a phone (phone council round 0: body-face headings over two rules, a band of
   nothing held for messages that cannot come yet, and two buttons that looked broken). The pixel face over one gold
   rule, as every other panel's heading; the party only as tall as what it holds, since the column is laid over the
   page and moves nothing under it; Party chat and Leave party keep their places (Tyler, 2026-10-29); and a Close
   beside the heading (party.rs `CloseColumn`). */
.social-close { display: none; }
html.touch .client-shell.social-open .social-close { display: inline-flex; min-height: 44px; padding-inline: 14px; }
html.touch .social-column .social-head { min-height: 44px; border-bottom: 0; }
html.touch .social-column .social-head .kit-label { font: 400 var(--t-s)/1.2 var(--font-head); letter-spacing: 2px; color: var(--you-light); }
html.touch .social-column .social-head .btn.icon { min-width: 44px; min-height: 44px; }
html.touch :is(.social-party, .social-friends) { flex: none; min-height: 0; }
html.touch .social-party .party-latest-empty { height: auto; }
/* The party as short as what it holds (mobile council round 2, both judges: a solo party's seats took the height an
   incoming request needed): the members, then the heading's Invite alone, since the Invite seat did the same job and
   the heading's count says how many seats are open. Party chat and Leave party keep their places (Tyler, 2026-10-29).
   A friend request comes straight under the party, before the Friends heading and the list. */
html.touch .client-shell .social-scroll { gap: 18px; }
html.touch .social-party { gap: 10px; }
html.touch .social-party .party-seats { display: grid; gap: 8px; height: auto; }
html.touch .social-party .party-members { gap: 8px; }
html.touch .social-party .party-member { height: 60px; }
html.touch .social-party :is(.party-invite, .party-open) { display: none; }
html.touch .social-friends > .friends-list:has(> .friends-request) { order: -1; }
/* A word beside each + (party.rs, friends.rs): Invite and Add friend do different things, and a thumb has no hover
   to show their tooltips (phone council round 1). A desktop keeps the bare icon. */
.icon-word { display: none; }
html.touch .social-head .btn.icon:has(> .icon-word):not([hidden]) { display: inline-flex; align-items: center; gap: 8px; padding-inline: 12px; }
html.touch .social-head .icon-word { display: inline; }
/* A group under Friends wears the column headings' pixel face, dimmer than they are (round 1: Offline was the only
   heading in the body face). */
html.touch .social-column .friends-group { margin: 6px 0 0; color: var(--text-dim); font: 400 var(--t-s)/1.2 var(--font-head); letter-spacing: 2px; }
/* On its side the column is wide enough for each heading and its buttons on one line, and they are 56 px (0.8 zoom). */
@media (orientation: landscape) and (max-width: 1099.98px) {
  html.touch .client-shell.social-open .social-column { width: min(420px, calc(100% - var(--rail-w))); }
  html.touch .client-shell.social-open .social-column .social-head :is(.btn.icon, .social-close) { min-height: 56px; }
}
.social-latest { flex: 1; min-height: 0; list-style: none; display: flex; flex-flow: column-reverse wrap; align-content: flex-start; gap: 2px; overflow: hidden; margin: 0; padding: 0; font-size: var(--t-s); }
.social-latest li { width: 100%; margin: 0; padding: 0; border: 0; background: none; line-height: 1.35; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.social-latest li:nth-last-child(1) { order: -2; } .social-latest li:nth-last-child(2) { order: -1; }
.social-latest .social-chat-meta { display: inline-flex; gap: 6px; margin-right: 6px; white-space: nowrap; }
.social-latest b { color: var(--you-light); }
.social-latest li.own b { color: var(--ally); }
/* A group's heading: the section labels' capitals, smaller and dim (friends.rs `group_heading`). */
.friends-group { margin: 4px 0 0; color: var(--text-dim); font: 700 var(--t-s)/1.2 var(--font-body); letter-spacing: 1px; text-transform: uppercase; }
.friends-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.friends-row { position: relative; display: flex; align-items: center; gap: 12px; padding: 6px 4px; }
.friends-row.faded > :not(.friends-actions) { opacity: 0.55; }
.friends-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.friends-who b { font-size: var(--t-name); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friends-actions { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.friends-request { display: grid; gap: 8px; padding: 10px 12px; border-left: 3px solid var(--trim); background: var(--plate); }
.friends-add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.friends-add label { width: 100%; font-size: var(--t-s); color: var(--text-dim); }
.friends-add input { flex: 1; min-width: 0; padding: 8px 10px; color: var(--text); background: var(--field); border: 2px solid var(--steel-line); font: inherit; }
.btn.icon.small { padding: 6px 8px; } .btn.icon.small .pico { width: 16px; height: 16px; }
/* More: a menu under the button, over the rows below. */
.social-more { position: relative; }
.social-more > summary { list-style: none; } .social-more > summary::-webkit-details-marker { display: none; }
.social-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 6; display: grid; gap: 6px; min-width: 190px; padding: 10px; }
.social-more[data-up] > .social-menu { top: auto; bottom: calc(100% + 4px); }
.social-menu .btn { justify-content: flex-start; }
.client-shell :is(button, input, select, summary):focus-visible { outline: 3px solid var(--you-light); outline-offset: 2px; }
.social-column :is(button, input, summary):focus-visible { outline-offset: -3px; }

/* Panels on every page: the kit's moonsteel panel (kit.css .ms) under the shared class. */
.shell-panel { border: 8px solid transparent; border-image: url('/c/7e3b3375da5f0c9761558b21d39d7874f8906318c7da420ce073476b3cac8fc5.png') 7 / 14px stretch; background: var(--panel-steel) padding-box; image-rendering: pixelated; padding: 20px 24px; color: var(--text); }
.shell-panel h2, .shell-panel h3, .shell-panel h4 { margin: 0 0 12px; font-family: var(--font-head); font-weight: 400; letter-spacing: 1px; color: var(--you-light); }
.shell-panel h2 { font-size: var(--t-xl-sm); text-transform: uppercase; }
.shell-panel h3 { font-size: var(--t-l); }
.shell-panel p { margin: 8px 0 14px; }

/* Home: the latest patch's banner over the last match, Quick play choices and news (layout A). */
/* The cards keep their height when they wrap onto a second row in a narrow window, and the page scrolls (code review). */
.home { display: grid; grid-template-rows: minmax(300px, 1fr) auto; gap: 24px; min-height: 100%; }
.home-hero { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 0; background: var(--bg-1) padding-box; }
.home-hero-art { position: absolute; right: -60px; top: -180px; width: 1424px; height: 1096px; max-width: none; image-rendering: pixelated; pointer-events: none; }
.home-hero::after { content: ''; position: absolute; inset: 0; background: var(--hero-shade); pointer-events: none; }
.home-hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 18px; max-width: 620px; padding: 0 56px; }
.home-hero-copy p { margin: 0; }
.home-hero-title { margin: 0; font: 400 var(--t-banner)/1.1 var(--font-head); letter-spacing: 2px; text-transform: uppercase; color: var(--you-light); }
.home-hero-lead { font: 700 var(--t-l)/1.25 var(--font-body); }
.home-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); grid-auto-rows: minmax(304px, auto); gap: 24px; min-height: 0; }
.home-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; overflow: hidden; padding: 12px 16px; }
.home-card p { margin: 0; }
.home-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.home-card-head .btn.quiet { padding: 2px 4px; color: var(--you-light); }
.home-card-title { font: 700 var(--t-l)/1.2 var(--font-body); }
.home-card-foot { display: flex; gap: 10px; margin-top: auto; }
.home-last { display: flex; align-items: center; gap: 12px; min-width: 0; }
.home-last .socket { flex: none; width: 76px !important; height: 76px !important; }
.home-last .socket > img { width: 64px !important; height: 64px !important; }
.home-last-text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.home-result { font: 400 var(--t-xl-sm)/1.1 var(--font-head); letter-spacing: 2px; text-transform: uppercase; color: var(--you-light); }
.home-headlines { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.home-headlines li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 2px solid var(--plate-edge); font-size: var(--t-s); }
.home-headlines .kit-chip { padding: 4px 8px; font-size: var(--t-xs); }
.home-state { justify-content: center; }
.home-goal-item { display: block; flex: none; height: 96px; background-color: #101d30; background-position: center; background-size: cover; image-rendering: pixelated; }
.home-goal progress { width: 100%; }
.home-goal .btn.primary, .profile-goal .btn.primary { align-self: flex-start; }
.goal-line { font-weight: 700; }
.goal-gain { color: var(--you-light); }
.profile-goal { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 1099.98px) {
  .home { gap: 16px; }
  .home-hero-art { right: -40px; top: -60px; width: 712px; height: 548px; }
  .home-hero-copy { gap: 14px; max-width: 480px; padding: 0 40px; }
  .home-hero-title { font-size: var(--t-xl); }
  .home-hero-lead { font-size: var(--t-m); }
  .home-cards { gap: 16px; }
  .home-result { font-size: var(--t-l); }
  .home-last .socket { width: 76px !important; height: 76px !important; } .home-last .socket > img { width: 64px !important; height: 64px !important; }
}
@media (max-width: 1099.98px) and (max-height: 900px) { .home { grid-template-rows: minmax(260px, 1fr) auto; } }
@media (max-width: 600px) {
  .home { grid-template-rows: auto auto; }
  .home-hero-copy { width: 100%; min-width: 0; max-width: none; gap: 10px; padding: 20px 14px; overflow-wrap: anywhere; }
  .home-hero-title { font-size: var(--t-l); line-height: 1.15; letter-spacing: 1px; }
  .home-hero-lead { font-size: var(--t-s); line-height: 1.3; }
  .home-hero-actions { max-width: 100%; }
  .home-hero-actions .btn { max-width: 100%; white-space: normal; text-align: center; }
}

