/* 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 below 1600px wide 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. */
.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(100vh * 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; }
.btn.primary.big.client-play { flex: none; width: 200px; height: 56px; padding: 0; font-size: var(--t-l); letter-spacing: 3px; }
.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; }
.client-nav .kit-tab { display: flex; align-items: center; flex: none; padding: 0 18px; }
.client-nav .kit-tab:is(.on, [aria-current="page"])::after { bottom: 10px; }
/* 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-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(100vw - 24px)); max-height: calc(100vh - var(--bar-h) - 24px); padding: 16px; z-index: 7; }

/* 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; }
/* The search and admission status covers no page and moves none (client UI council round 0): laid over the foot of
   the party column, so the party and friends keep their places when it shows (Tyler, 2026-10-29: "Never let something
   that changes readjust to where things align"); while the column is folded, at the page's top right. The room's
   party invitations lie over the column's foot the same way. */
.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; }
@media (max-width: 1599px) {
  .client-shell { grid-template-columns: minmax(0, 1fr) var(--rail-w); }
  .client-topbar { gap: 18px; padding-left: 16px; }
  .btn.primary.big.client-play { width: 150px; height: 52px; }
  .client-bar-rule { display: none; }
  .client-nav .kit-tab { padding: 0 12px; }
  .client-bar-end { width: auto; gap: 10px; padding: 0 12px; }
  .client-account { flex: none; } .client-account-who { display: none; }
  .client-content { padding: 16px 24px 22px; }
  .shell-state[data-place="column"] { display: none; }
  .shell-state[data-place="page"]:has(> *) { display: flex; position: absolute; top: 8px; right: 16px; z-index: 4; align-items: flex-end; max-width: min(560px, calc(100% - 32px)); }
  .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: var(--column-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: 1279px) {
  .client-logo img { width: 162px; height: 63px; margin-top: 0; }
  .btn.primary.big.client-play { width: 120px; }
}
.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. */
.social-head { display: flex; align-items: center; gap: 12px; min-height: 42px; } .social-head .kit-label { flex: 1; }
.social-head .faint { 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); }
/* 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; }
.party-actions { flex: none; display: flex; align-items: center; gap: 8px 16px; height: 36px; }
.party-actions .party-leave { margin-left: auto; }
.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); }
.friends-group { margin: 4px 0 0; font: 700 var(--t-s)/1 var(--font-body); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.02em; }
.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; }
.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(260px, 1fr)); grid-auto-rows: 304px; 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: 20px; }
.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-picks { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.home-picks figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.home-picks figcaption { font-size: var(--t-s); color: var(--text-dim); }
.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; }
@media (max-width: 1599px) {
  .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-height: 900px) { .home { grid-template-rows: minmax(260px, 1fr) 296px; } }

