/* Hub (client/js/ui/hub; docs/superpowers/specs/2026-09-30-social-hub-design.md
   section 11b): a pixel-kit window (client/css/social-ui.css) in the Guild
   window's family, laid out like the previews (hub-v2/preview: h8 PLAY, h11
   "How Hub works", p4 a phone, p6 a phone on its side; v1's social.css
   values; h6 INBOX; h9 SETTINGS). The window picks its layout from the room
   #windows gives it (index.js): .desk (the header, the tabs under it, the
   panel), .phone (full screen, the tabs wrap to a second row when the
   phone is too narrow for the five, one column) and
   .side (a 640 px panel on the left, the tabs a rail beside the header and
   the panel). Who scrolls: on .desk a tab's own list (overflow-y: auto;
   min-height: 0, as .hub-play, .hub-ilist, .hub-settings and the Guild's
   own lists); on .phone and
   .side .hub-main, the whole panel
   (a tab never bounds its height there). Each tab's task adds its own part
   below. */

/* ------------------------------------------------------------------ the window */
.pxui.hub { width: min(1340px, calc(100% - 24px)); height: min(842px, calc(100% - 16px)); display: flex; flex-direction: column; padding: 12px 14px 14px; overflow: hidden; }
:where(.hub, .hub-how) :where(h1, h2, h3, h4, p) { margin: 0; }
.hub-grow { flex: 1; }
.hub-kick, .hub-tabnote, .hub-notekick { color: var(--ink-3); font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.hub-pix, .hub-art, .hub-lock { line-height: 0; }
.hub-pix svg, .hub-art svg, .hub-lock svg { display: block; }

/* the header: the hub icon, HUB, the kicker, ? and ✕ */
.hub-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 2px 2px 10px; min-width: 0; }
.hub-head h1 { font-size: 22px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.hub-head .hub-kick { min-width: 0; margin-left: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hub-mark { flex: none; }
.hub-x { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0; border: 3px solid var(--frame); border-radius: 8px; background: #fff; font-size: 18px; font-weight: 700; }
@media (hover: hover) { .hub-x:hover { border-color: var(--sel-line); } }

/* the tabs, and the tab's own kick on their right */
.hub-tabs { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-bottom: 10px; border-bottom: 2px dashed var(--rule); }
.hub-tabs .px-pocket { font-size: 16px; }
.hub-n { color: var(--ink-3); font-size: 13px; letter-spacing: 0; }
.px-pocket[aria-selected=true] .hub-n { color: var(--ink-2); }
.hub-tabnote { margin-left: auto; font-size: 12px; text-align: right; }
.hub-main { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 12px; }
.hub-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hub-notice { margin: 0 0 10px; padding: 7px 12px; border: 2px solid #c98a2a; border-radius: 8px; background: var(--announce); color: var(--ink); font-size: 14px; font-weight: 600; }

/* ------------------------------------------------------------------ INBOX (h6) */
/* the rows (Right now, Guild, For <guild>, Ended) and, on a computer, a side
   column: how long things wait, what isn't here, the cards on screen. The
   list and the side column each scroll; below 1200 px the side column goes
   under the rows and the two scroll as one. */
.hub-inbox { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 372px; gap: 14px; }
.hub-ilist, .hub-iside { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; }
/* (4 px round the rows: the focus ring, 3 px and 1 px off the row, isn't
   cut by the scrolling; carried from Task 4's re-review, N1) */
.hub-ilist { display: flex; flex-direction: column; padding: 4px 6px 4px 4px; }
.hub-iside { display: flex; flex-direction: column; gap: 10px; padding: 2px; }
.hub-sec { flex: none; display: flex; flex-direction: column; }
.hub-sec + .hub-sec { margin-top: 6px; }
.hub-grp { display: flex; align-items: center; gap: 8px; min-height: 26px; margin: 0 4px 5px; color: var(--ink-3); font-size: 13px; letter-spacing: .07em; text-transform: uppercase; white-space: nowrap; }
.hub-grp b { color: var(--ink-2); }
.hub-grp-r { text-transform: none; letter-spacing: 0; }
.hub-rule2 { flex: 1; min-width: 12px; height: 0; border-top: 2px dashed var(--rule); }
.hub-clearall { flex: none; height: 26px; padding: 0 8px; font-size: 12px; }
/* a row: the face, the words, the time left, the answers */
.hub-row { flex: none; display: grid; grid-template-columns: 44px minmax(0, 1fr) 118px 232px; align-items: center; column-gap: 12px; min-height: 56px; margin-bottom: 6px; padding: 4px 10px 4px 8px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); }
.hub-row.now { border-color: var(--red-edge); background: #fdf1ee; box-shadow: inset 0 0 0 2px #f6d3cc; }
.hub-row.ended { border-style: dashed; border-color: var(--plain-line); background: var(--plain); color: var(--ink-3); }
/* the row itself has the focus after an answer (nothing there to press) */
.hub-row:focus { outline: none; }
.hub-row:focus-visible, .hub-empty-h:focus-visible { outline: 3px solid var(--sel-line); outline-offset: 1px; }
.hub-ic { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.hub-ic .px-face { width: 42px; height: 42px; }
.hub-ic canvas { display: block; image-rendering: pixelated; }
/* a Pokémon coming home: its icon (the first frame of its 32 × 64 sheet) in a white box */
.hub-ic.hub-mon { border: 2px solid var(--frame); border-radius: 8px; background-color: #fff; background-size: 100% 200%; background-repeat: no-repeat; image-rendering: pixelated; }
/* ("waits until there's room" where a row's time left would be; its title
   whole on two lines, board t7: the spot and the BP are the news) */
.hub-wait { white-space: normal; text-align: right; line-height: 1.3; }
.hub-row.k-return .hub-title, .hub-row.k-return .hub-rsub, .hub-row.k-raid .hub-title, .hub-row.k-raid .hub-rsub { white-space: normal; }
/* (a phone: that line in two short lines, the title the room) */
.hub.phone .hub-row.k-return .hub-left, .hub.phone .hub-row.k-raid .hub-left { max-width: 88px; }
.hub-row.ended .hub-ic { filter: grayscale(1); opacity: .7; }
.hub-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.hub-title { font-size: 16px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-row.ended .hub-title { color: var(--ink-3); }
.hub-who { color: var(--ink); }
.hub-title .gd-tag { height: 18px; padding: 0 4px; font-size: 11px; vertical-align: 1px; }
.hub-gname { color: var(--t, #2a5ea8); font-weight: 700; }
/* the kind: a small outlined label */
.hub-chip { display: inline-flex; align-items: center; height: 19px; margin-right: 8px; padding: 0 5px; border: 2px solid currentColor; border-radius: 4px; background: #fff; font-size: 11px; font-weight: 600; letter-spacing: .06em; line-height: 1; text-transform: uppercase; vertical-align: 2px; }
.hub-chip.k-trade { color: #1e7a3c; }
.hub-chip.k-battle { color: var(--danger); }
.hub-chip.k-guild { color: #6b3fa0; }
.hub-chip.k-charter { color: #8a5200; }
.hub-chip.k-application { color: #2a5ea8; }
.hub-chip.k-return { color: #7a3a08; }
.hub-chip.k-raid { color: #8a5200; }
.hub-chip.k-ended { color: var(--ink-3); }
/* the reason Accept can't work now, in the server's words */
.hub-why { margin-top: 2px; color: var(--red-dk); font-size: 13px; line-height: 1.3; }
.hub-rsub { margin-top: 2px; color: var(--ink-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-left { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; color: var(--ink-2); font-size: 13px; white-space: nowrap; }
.hub-t { color: var(--ink); font-variant-numeric: tabular-nums; }
.hub-meter { display: block; width: 100%; height: 8px; border: 2px solid var(--frame); border-radius: 3px; background: #fff; overflow: hidden; }
.hub-meter i { display: block; height: 100%; background: #48c060; }
.hub-acts { display: flex; gap: 6px; }
.hub-acts .px-btn { flex: 1; min-width: 0; height: 36px; padding: 0 8px; }
/* greyed: it can be focused and says why when pressed, but sends nothing */
.hub-row .px-btn[aria-disabled=true] { border-color: var(--plain-line); background: var(--plain); color: #8a92a0; box-shadow: none; cursor: default; }
/* nothing waiting */
.hub-empty { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 8px; padding: 18px 14px 16px; border: 3px dashed var(--rule); border-radius: 12px; background: #fff; text-align: center; }
.hub-empty b { font-size: 18px; }
.hub-empty p { max-width: 380px; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.hub-emptygo { display: flex; gap: 8px; margin-top: 6px; }
/* the side column */
.hub-card { flex: none; display: flex; flex-direction: column; border: 3px solid var(--frame); border-radius: 12px; background: #fff; overflow: hidden; }
.hub-card-h { display: flex; align-items: center; gap: 8px; padding: 8px 12px 7px; border-bottom: 3px solid var(--rule); background: linear-gradient(#cfe6fa, #eef6fd); }
.hub-card-h h3 { font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.hub-waitlist { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; margin: 0; padding: 10px 12px; font-size: 14px; }
.hub-waitlist dt, .hub-waitlist dd { margin: 0; }
.hub-waitlist dd { font-weight: 700; text-align: right; }
.hub-elsewhere { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 8px 10px; border: 2px solid var(--rule); border-radius: 10px; background: #f7fbff; color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.hub-elsewhere .hub-kick { color: var(--ink); font-size: 12px; }
.hub-elsewhere p { display: flex; align-items: center; gap: 8px; }
.hub-elsewhere b { color: var(--ink); }
.hub-guide { flex: none; padding: 7px 10px; border: 2px dashed #c98a2a; border-radius: 8px; background: var(--announce); color: #8a5200; font-size: 13px; line-height: 1.4; }
.hub-guide b { color: var(--ink); }
/* a guild's colour: its tag chip and its name (guild.css's, for Hub) */
.hub-inbox .c-red { --c: #e0523f; --o: #7c2216; --l: #f38775; --t: #b0362a; }
.hub-inbox .c-orange { --c: #f08a2c; --o: #7a3a08; --l: #f7b268; --t: #b0560e; }
.hub-inbox .c-yellow { --c: #e8c23a; --o: #6e5608; --l: #f5dc78; --t: #8a6a00; }
.hub-inbox .c-green { --c: #4caf50; --o: #22602a; --l: #80d080; --t: #2e7d32; }
.hub-inbox .c-teal { --c: #2ba8a0; --o: #0f4e4a; --l: #62cbc3; --t: #18766f; }
.hub-inbox .c-blue { --c: #3f7fd0; --o: #1e467e; --l: #74a8ec; --t: #2a5ea8; }
.hub-inbox .c-purple { --c: #8a5cc7; --o: #452a70; --l: #ad89e2; --t: #6b3fa0; }
.hub-inbox .c-pink { --c: #e0609a; --o: #7a1f4a; --l: #f08fbb; --t: #b0366e; }
/* a smaller computer: the side column under the rows, both in one scroller */
@media (max-width: 1199px) {
  .hub.desk .hub-inbox { display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; }
  .hub.desk .hub-ilist, .hub.desk .hub-iside { flex: none; min-height: auto; overflow: visible; }
  .hub.desk .hub-iside { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; }
  .hub.desk .hub-row { grid-template-columns: 44px minmax(0, 1fr) 96px 200px; }
}

/* ------------------------------------------------------------------ GUILD (h7) */
/* The Guild window inside Hub's panel (./guild.js): its header, its small
   tabs and its tabs are guild.css's own (.gd.embedded). On a computer it
   fills the panel's column (a tab's own lists scroll); on a phone and on
   its side it is as tall as it is, and .hub-main scrolls it. */
.hub-body.guild { min-width: 0; }

/* ------------------------------------------------------------------ PLAY (h8) */
/* Ranked | Territories, then the Battle Frontier (f1) across the row, then
   the way back told (the GTL is MARKET's since the owner's 2026-10-05 call;
   three tiles, so the Frontier's, with its six facilities, takes the row's
   width rather than leave an empty cell beside it; a phone and a phone on
   its side are one column, where it changes nothing). Every row is
   as tall as its tiles' content (h8), from the top: a short window scrolls
   the tiles, never squeezes them (a tile's content never spills out of it,
   nor under the next row). On a computer the grid is the tab's scroller. */
.hub-play { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; align-content: start; gap: 12px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; }
.hub-tile { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; padding: 14px 16px 16px; border: 3px solid var(--blue); border-radius: 14px; background: var(--slot); }
.hub-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.hub-name { min-width: 0; }
.hub-art { flex: none; display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; border: 3px solid var(--frame); border-radius: 12px; background: #fff; }
.hub-tile h2 { font-size: 26px; letter-spacing: .04em; text-transform: uppercase; }
.hub-sub { color: var(--ink-2); font-size: 14px; }
.hub-desc { font-size: 15px; line-height: 1.4; }
.hub-go { margin-top: auto; display: flex; gap: 8px; }
.hub-go .px-btn { flex: 1; min-width: 0; height: 44px; font-size: 16px; }
/* Ranked while a search runs (or is paused): the clock, and why */
.hub-tile.busy { border-color: var(--sel-line); background: var(--sel); }
.hub-live { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 7px 10px; border: 2px solid #e8b070; border-radius: 8px; background: #fff8ec; font-size: 14px; }
.hub-search { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 3px solid var(--sel-line); border-radius: 8px; background: #fff; font-size: 15px; font-weight: 700; white-space: nowrap; }
.hub-search.paused { border-color: var(--plain-line); }
.hub-clock { font-variant-numeric: tabular-nums; }
.hub-spin { flex: none; display: inline-block; width: 12px; height: 12px; margin-right: 2px; border: 3px solid var(--sel-line); border-right-color: transparent; border-radius: 50%; animation: hub-spin 1s steps(8) infinite; }
@keyframes hub-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .hub-spin { animation: none; } }
.hub-livenote { color: var(--ink-2); }
.hub-rk-tier { font-size: 15px; line-height: 1.5; }
.hub-rk-tier.locked { color: var(--ink-2); }
.hub-ball { width: 24px; height: 24px; margin-right: 3px; image-rendering: pixelated; vertical-align: -6px; }
/* the Battle Frontier (f1): a navy frame, the row's width on a computer; NEW
   top right until its first visit's card is read; your best place, or where
   to start; the six facilities' icons and their names */
.hub-tile.t-frontier { grid-column: 1 / -1; border-color: var(--frame); background: #eaf3fc; box-shadow: inset 0 0 0 3px #fff; }
.hub-new { flex: none; align-self: flex-start; display: inline-flex; align-items: center; margin-left: auto; min-height: 22px; padding: 0 7px; border: 2px solid #1e5a2c; border-radius: 5px; background: #2f9e4a; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.hub-fr-best { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 7px 10px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; font-size: 14px; line-height: 1.35; }
.hub-fr-best .hub-pix { flex: none; }
.hub-fr-what { flex: 1 1 260px; min-width: 0; }
.hub-fr-place { flex: none; margin-left: auto; color: var(--ink-2); white-space: nowrap; }
.hub-fr-six { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 5px 8px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; color: var(--ink-2); font-size: 13px; }
.hub-fr-ib { flex: none; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 2px solid var(--rule); border-radius: 7px; background: #f7fbff; }
.hub-fr-names { flex: 1 1 140px; min-width: 0; margin-left: 6px; line-height: 1.3; }
.hub-fr-names span { display: block; }
/* opened from here, Ranked, Territories and the Frontier get a way back */
.hub-backnote { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 8px 14px; border: 3px dashed #c98a2a; border-radius: 12px; background: #fff6e4; }
.hub-backnote .hub-notekick { flex: none; color: #8a5200; }
.hub-backnote p { color: var(--ink-2); font-size: 14px; }
.hub-backnote b { color: var(--ink); }
/* Territories: the Pokémon waiting to come home (the Inbox's rows) and a way there */
.hub-tr-wait { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; border: 2px solid #e8b070; border-radius: 8px; background: #fff8ec; color: #7a3a08; font-size: 14px; }
/* party raids (client/js/ui/hub/play.js raidsTile; the raids spec §7): the
   row's width on a computer, in the den's pinks; today's 8 bosses (each a
   44 px button to its den on the World Map), your wins today, the open raids
   you may join (Join), your lobby, Open on the map */
.hub-tile.t-raids { grid-column: 1 / -1; border-color: #c0306e; background: #fdf0f6; box-shadow: inset 0 0 0 3px #fff; }
.hub-tile.t-raids .hub-art { border-color: #6a1240; background: #2a1430; }
.hub-rd-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.hub-rd-head h3 { margin: 0; color: var(--ink-3); font-size: 13px; letter-spacing: .07em; text-transform: uppercase; }
.hub-rd-wins { font-size: 14px; font-weight: 700; }
.hub-rd-wait { margin: 0; color: var(--ink-2); font-size: 14px; }
.hub-rd-done { margin: 0; color: #8a2418; font-size: 13px; font-weight: 700; }
.hub-rd-dens { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.hub-rd-den { display: flex; align-items: center; gap: 6px; width: 100%; min-width: 0; min-height: 44px; padding: 2px 8px 2px 2px; border: 2px solid #e8b2cc; border-radius: 8px; background: #fff; color: var(--ink); text-align: left; }
@media (hover: hover) { .hub-rd-den:hover { border-color: var(--sel-line); background: var(--sel); } }
.hub-rd-ic { flex: none; width: 40px; height: 40px; background-repeat: no-repeat; background-size: 40px 80px; image-rendering: pixelated; }
.hub-rd-t { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 6px; line-height: 1.2; }
.hub-rd-st { color: #c88a00; font-size: 13px; white-space: nowrap; }
.hub-rd-t b { min-width: 0; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.hub-rd-t small { flex-basis: 100%; color: var(--ink-2); font-size: 12px; }
/* a boss with two moves a turn (★★★★, ★★★★★) */
.hub-rd-two { flex-basis: 100%; color: #8a2418; font-size: 12px; font-weight: 700; }
.hub-rd-open { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.hub-rd-orow { display: flex; align-items: center; gap: 8px; padding: 2px 2px 2px 10px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; font-size: 14px; line-height: 1.3; }
.hub-rd-orow span { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.hub-rd-orow .px-btn { flex: none; min-height: 44px; padding: 0 16px; }
.hub-rd-orow .px-btn.off { opacity: .55; }
.hub-rd-lobby { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; border: 2px solid var(--sel-line); border-radius: 8px; background: var(--sel); font-size: 14px; font-weight: 600; }
.hub-rd-lobby .px-btn { min-height: 44px; }
.hub-tr-wait .px-btn { height: 32px; padding: 0 10px; font-size: 13px; }

/* ------------------------------------------------------------------ MARKET */
/* The GTL window inside Hub's panel (./market.js; the owner's 2026-10-05
   call): its header, its pockets (the kit's small tabs) and its pockets'
   insides are gtl.css's own (.gtl.embedded), as GUILD's are guild.css's. On
   a computer it fills the panel's column (a pocket's own lists scroll); on a
   phone and on its side it is as tall as it is, and .hub-main scrolls it. */

/* ------------------------------------------------------------------ SETTINGS (h9) */
/* three columns of boxes on a computer (the grid is the tab's scroller), one
   on a phone and on its side: Status and message, Hidden, Blocked | Who
   can…, Alerts | Chat, Names on the map, the foot */
.hub-settings { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; align-content: start; gap: 12px; padding: 4px 6px 4px 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; }
.hub-setcol { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.hub-set { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 10px 12px 12px; border: 3px solid var(--blue); border-radius: 12px; background: #eef5fc; }
.hub-set-h { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.hub-set-h h3 { font-size: 16px; letter-spacing: .06em; text-transform: uppercase; }
.hub-set-h > :last-child:not(h3) { margin-left: auto; }
.hub-set-h .hub-kick { font-size: 12px; }
.hub-set-n { font-size: 15px; font-weight: 700; }
.hub-set-p { color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.hub-set-foot { flex: none; }
/* the four statuses (the You menu's), the message */
.hub-spick { display: flex; gap: 4px; }
.hub-st { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 5px; height: 34px; padding: 0 4px; border: 2px solid var(--plain-line); border-radius: 6px; background: var(--plain); color: var(--ink); font-size: 14px; font-weight: 500; text-transform: uppercase; white-space: nowrap; }
.hub-st[aria-checked=true] { border-color: var(--sel-line); background: var(--sel); }
.hub-st .px-pres { flex: none; }
.hub-msg { width: 100%; }
/* an ON / OFF switch (the kit's toggle, as a button: role switch) */
.hub-sw { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 66px; height: 32px; padding: 0; border: 3px solid var(--plain-line); border-radius: 6px; background: var(--plain); color: var(--ink-3); font-size: 15px; font-weight: 600; }
.hub-sw[aria-checked=true] { border-color: var(--frame); background: var(--blue); color: #fff; }
.hub-sw[aria-disabled=true] { border-style: dashed; background: var(--plain); color: #8a92a0; cursor: default; }
/* Hidden: the eye and what it does */
.hub-hid { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 2px dashed var(--rule); border-radius: 10px; background: #fff; }
.hub-hid p { flex: 1; min-width: 0; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.hub-hid b { color: var(--ink); font-size: 14px; }
.hub-hid-eye { flex: none; }
/* Blocked: a row each (its face grey), when, Unblock */
.hub-blk { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 2px 6px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; }
.hub-blk:focus { outline: none; }
.hub-blk:focus-visible, .hub-set-empty:focus-visible { outline: 3px solid var(--sel-line); outline-offset: 1px; }
.hub-blk .px-face { flex: none; width: 32px; height: 32px; filter: grayscale(1); opacity: .7; }
.hub-blk-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.hub-blk-t b { overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.hub-blk-t small { color: var(--ink-3); font-size: 12px; }
.hub-unblock[aria-disabled=true] { border-color: var(--plain-line); background: var(--plain); color: #8a92a0; cursor: default; }
.hub-set-empty { padding: 8px 10px; border: 2px dashed var(--rule); border-radius: 8px; background: #fff; color: var(--ink-2); font-size: 14px; line-height: 1.4; }
.hub-set-empty:focus { outline: none; }
/* Who can…: a row of four choices each; a greyed one says why beside the row's name */
.hub-can { display: flex; flex-direction: column; gap: 4px; }
.hub-can-l { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 8px; font-size: 15px; font-weight: 600; }
.hub-can-why { color: var(--ink-3); font-size: 12px; font-weight: 400; }
.hub-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 3px solid var(--blue); border-radius: 8px; background: var(--sky); overflow: hidden; }
.hub-aud { min-width: 0; height: 32px; padding: 0 2px; border: 0; border-radius: 0; background: none; color: var(--ink); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hub-aud + .hub-aud { border-left: 3px solid var(--blue); }
.hub-aud[aria-checked=true] { background: var(--ink); color: #fff; }
.hub-aud[aria-disabled=true] { background: var(--plain); color: #a0a6ae; cursor: default; }
.hub-aud[aria-checked=true][aria-disabled=true] { background: #8a92a0; color: #fff; }
/* (the ring inside the row: its box clips what's outside) */
.hub-seg .hub-aud:focus-visible { outline: 3px solid var(--sel-line); outline-offset: -4px; }
@media (hover: hover) { .hub-aud:not([aria-disabled=true]):not([aria-checked=true]):hover { background: var(--sel); } }
/* a setting's row: its name and what it is, its switch */
.hub-orow { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 3px 4px 3px 6px; }
.hub-orow-l { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.hub-orow-l b { font-size: 15px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.hub-orow-l small { color: var(--ink-3); font-size: 13px; }
.hub-orow-l .hub-why { color: var(--red-dk); font-size: 12px; }
/* what always pops a card: a locked "Always" */
.hub-always { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 2px dashed var(--plain-line); border-radius: 8px; background: var(--plain); color: var(--ink-2); font-size: 13px; line-height: 1.35; }
.hub-lockchip { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px; border: 3px solid var(--plain-line); border-radius: 6px; background: #fff; color: var(--ink-3); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.hub-lockchip .hub-pix { flex: none; }
/* the name tag as others see it (field.js: the tag's dark label, the ball, [TAG] in its colour) */
.hub-tagrow { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.hub-tagpv { flex: none; position: relative; display: flex; align-items: center; justify-content: center; width: 150px; height: 44px; border: 3px solid var(--frame); border-radius: 8px; background: linear-gradient(#5f9c50, #4c8641); overflow: hidden; }
.hub-ntag { display: inline-block; max-width: 140px; height: 18px; padding: 0 5px; background: rgba(16, 20, 32, .6); color: #fff; font: 16px/18px 'PokemonGBA', monospace; white-space: pre; overflow: hidden; text-overflow: ellipsis; }
.hub-ntag-ball { width: 16px; height: 16px; margin: 1px 3px 0 -3px; vertical-align: top; image-rendering: pixelated; }
/* a smaller computer: two columns (the third goes under the first) */
@media (max-width: 1199px) {
  .hub.desk .hub-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ------------------------------------------------------------------ SETTINGS → Game (g1, g3) */
/* The sub-tabs Social · Game (the kit's small tabs) under Hub's tabs, the
   line saying where they're saved beside them (under them on a phone and on
   its side); Game (./game.js): three columns on a computer, as Social's
   (Sound, Battery saver | Screen, Phone controls | Keyboard keys, the foot),
   one on a phone. A volume is its name, a slider (a navy-framed track, the
   blue fill to the value, a cream thumb with the pads' pressed-down edge)
   and the number in a box. */
.hub-subrow { flex: none; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; min-width: 0; }
.hub-subtabs { flex: none; display: flex; gap: 6px; }
.hub-subtabs .px-tab { padding: 0 14px; font-weight: 600; }
.hub-subnote { min-width: 0; margin-left: auto; color: var(--ink-3); font-size: 12px; letter-spacing: .07em; text-align: right; text-transform: uppercase; }
.hub-subnote.under { flex: none; margin: -4px 0 10px; font-size: 11px; letter-spacing: .03em; text-align: left; }
.hub-vol { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr) 44px; align-items: center; gap: 12px; min-height: 44px; padding: 0 4px 0 6px; }
.hub-vol-l { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.hub-vol-l b { font-size: 15px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.hub-vol-l small { color: var(--ink-3); font-size: 12px; }
/* (no frame of its own: the page's input frame, style.css, is for fields) */
.hub-range { -webkit-appearance: none; appearance: none; display: block; width: 100%; min-width: 0; height: 30px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer; touch-action: pan-y; }
.hub-range:focus { outline: none; border: 0; }
.hub-range:focus-visible { outline: 3px solid var(--sel-line); outline-offset: 2px; border-radius: 8px; }
.hub-range::-webkit-slider-runnable-track { box-sizing: border-box; height: 14px; border: 3px solid var(--frame); border-radius: 7px; background: linear-gradient(to right, var(--blue) var(--v, 0%), #fff var(--v, 0%)); }
.hub-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 24px; height: 26px; margin-top: -9px; border: 3px solid var(--frame); border-radius: 6px; background: var(--cream); box-shadow: inset 0 -4px 0 #c9cfd8; }
.hub-range::-moz-range-track { box-sizing: border-box; height: 14px; border: 3px solid var(--frame); border-radius: 7px; background: #fff; }
.hub-range::-moz-range-progress { box-sizing: border-box; height: 14px; border: 3px solid var(--frame); border-right: 0; border-radius: 7px 0 0 7px; background: var(--blue); }
.hub-range::-moz-range-thumb { box-sizing: border-box; width: 24px; height: 26px; border: 3px solid var(--frame); border-radius: 6px; background: var(--cream); box-shadow: inset 0 -4px 0 #c9cfd8; }
.hub-volv { display: inline-flex; align-items: center; justify-content: center; height: 30px; border: 2px solid var(--rule); border-radius: 6px; background: #fff; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* a name over its row of choices (Screen size) */
.hub-field { display: flex; flex-direction: column; gap: 5px; padding: 2px 4px 2px 6px; }
.hub-field-l { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0 8px; }
.hub-field-l b { font-size: 15px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.hub-field-l small { color: var(--ink-3); font-size: 12px; }
.hub-seg.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Fullscreen: the button; where the browser can't, the iPhone line in its place */
.hub-fsbtn { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; font-size: 14px; }
.hub-fsicon { line-height: 0; }
.hub-fsicon svg { display: block; }
.hub-fsnote { flex: none; max-width: 52%; padding: 4px 8px; border: 2px dashed var(--plain-line); border-radius: 6px; background: #fff; color: var(--ink-2); font-size: 13px; line-height: 1.3; text-align: center; }
.hub-sizehelp b { color: var(--ink); }
.hub-gearnote { margin: 2px 0 0; }
/* Phone controls on a computer: greyed, the chip where a switch would sit;
   its controls shown as they are, in the plain grey, and not usable (g1) */
.hub-set.off { border-color: var(--plain-line); background: var(--plain); }
.hub-set.off .hub-set-h h3 { color: #8a92a0; }
.hub-devchip { display: inline-flex; align-items: center; height: 28px; padding: 0 9px; border: 2px solid var(--plain-line); border-radius: 6px; background: #fff; color: var(--ink-3); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.hub-set.off .hub-orow-l b, .hub-set.off .hub-vol-l b, .hub-set.off .hub-field-l b, .hub-set.off .hub-volv { color: #8a92a0; }
.hub-set.off .hub-seg { border-color: #b8bcb4; background: #f2f2ea; }
.hub-set.off .hub-aud { color: #8a92a0; cursor: default; }
.hub-set.off .hub-aud + .hub-aud { border-left-color: #b8bcb4; }
.hub-set.off .hub-aud[aria-checked=true] { background: #b8bcc4; color: #fff; }
.hub-set.off .hub-sw { border-color: #c4c8c0; background: #f2f2ea; color: #a0a6ae; cursor: default; }
.hub-set.off .hub-sw[aria-checked=true] { border-color: #a4a8a0; background: #b8bcc4; color: #fff; }
.hub-set.off .hub-range { cursor: default; }
.hub-set.off .hub-range::-webkit-slider-runnable-track { border-color: #a4a8a0; background: linear-gradient(to right, #b8bcc4 var(--v, 0%), #f2f2ea var(--v, 0%)); }
.hub-set.off .hub-range::-webkit-slider-thumb { border-color: #a4a8a0; background: #f2f2ea; }
.hub-set.off .hub-range::-moz-range-track { border-color: #a4a8a0; background: #f2f2ea; }
.hub-set.off .hub-range::-moz-range-progress { border-color: #a4a8a0; background: #b8bcc4; }
.hub-set.off .hub-range::-moz-range-thumb { border-color: #a4a8a0; background: #f2f2ea; }
/* a three-way choice (Pad size); on a phone its name beside it (g3b) */
.hub-seg.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hub-field.inline { flex-direction: row; align-items: center; gap: 10px; }
.hub-field.inline .hub-field-l { flex: none; flex-direction: column; align-items: flex-start; max-width: 40%; }
.hub-field.inline .hub-seg { flex: 1; min-width: 0; }

/* Keyboard keys (g1, g2): two columns of rows, each the button's glyph (the
   pads' look, small), its name and its key's cap in the game's font; L's
   "none" dashed. Waiting for a key: the row and the line orange, the cap
   "…" dashed; a key changed: both rows flash blue and the line is blue with
   Undo. */
.hub-keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.hub-key { display: flex; align-items: center; gap: 8px; min-width: 0; height: 42px; padding: 0 6px; border: 2px solid var(--rule); border-radius: 8px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.hub-key:focus { outline: none; }
.hub-key:focus-visible { outline: 3px solid var(--sel-line); outline-offset: 1px; }
@media (hover: hover) { .hub-key:not(.cur):not(.flash):hover { background: var(--sel); } }
.hub-kname { flex: 1; min-width: 0; overflow: hidden; font-size: 15px; font-weight: 600; letter-spacing: .02em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
/* Shortcuts (ui/hub/game.js): their names are longer, two lines at most */
.hub-keyshead { margin: 12px 0 2px; font-size: 15px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hub-keyscline { margin: 0 0 6px; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.hub-key.sc { padding-left: 10px; }
.hub-key.sc .hub-kname { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 13px; line-height: 1.15; white-space: normal; overflow-wrap: anywhere; }
.hub-kc { flex: none; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; max-width: 58%; height: 30px; padding: 0 8px; overflow: hidden; border: 3px solid var(--frame); border-radius: 6px; background: #fff; box-shadow: inset 0 -3px 0 #c9cfd8; font: 24px/1 "PokemonGBA", var(--font); white-space: nowrap; }
.hub-kc.long { font-size: 18px; }
.hub-kc .px-tri { width: 10px; height: 10px; background: var(--ink); }
.hub-kc.up .px-tri, .hub-kglyph.up .px-tri { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.hub-kc.down .px-tri, .hub-kglyph.down .px-tri { clip-path: polygon(0 0, 100% 0, 50% 100%); }
.hub-kc.left .px-tri, .hub-kglyph.left .px-tri { clip-path: polygon(100% 0, 100% 100%, 0 50%); }
.hub-kc.right .px-tri, .hub-kglyph.right .px-tri { clip-path: polygon(0 0, 100% 50%, 0 100%); }
.hub-kc.none { border-style: dashed; border-color: var(--plain-line); box-shadow: none; color: #8a92a0; font: 14px/1 var(--font); }
.hub-kc.wait { border-style: dashed; border-color: var(--sel-line); background: #fff6e4; box-shadow: none; color: #a0561a; }
.hub-key.cur { border-color: var(--sel-line); background: var(--sel); box-shadow: inset 0 0 0 1px var(--sel-line); }
.hub-key.flash { border-color: var(--blue); background: var(--slot); }
.hub-key.flash .hub-kc { border-color: var(--blue-dk); }
.hub-kglyph { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 2px solid #1b2230; border-radius: 5px; background: var(--cream); box-shadow: inset 0 -2px 0 #c9cfd8; color: var(--ink); font-size: 13px; font-weight: 700; }
.hub-kglyph.A { border-color: var(--red-dk); border-radius: 50%; background: var(--red); box-shadow: inset 0 -2px 0 var(--red-edge); color: #fff; }
.hub-kglyph.B { border-color: #1f3f6a; border-radius: 50%; background: var(--blue); box-shadow: inset 0 -2px 0 var(--blue-dk); color: #fff; }
.hub-kglyph.sh { border-radius: 9px 9px 4px 4px; }
.hub-kglyph.pill { border-radius: 13px; }
.hub-kglyph.pill::before { content: ""; width: 12px; height: 4px; border-radius: 2px; background: var(--ink); }
.hub-kglyph .px-tri { width: 10px; height: 10px; background: var(--ink); }
.hub-kglyph.run::before { content: ""; width: 12px; height: 10px; background: var(--ink); clip-path: polygon(0 0, 50% 50%, 0 100%, 0 0, 50% 0, 100% 50%, 50% 100%, 50% 50%); }
.hub-keymsg { display: flex; align-items: center; gap: 10px; min-height: 36px; color: var(--ink-2); font-size: 13px; line-height: 1.4; }
.hub-keymsg .hub-keytext { flex: 1; min-width: 0; }
.hub-keymsg b { color: var(--ink); }
.hub-keymsg.guide, .hub-keymsg.done { padding: 0 2px; }
.hub-keymsg.wait { padding: 5px 10px; border: 2px solid var(--sel-line); border-radius: 8px; background: #fff6e4; color: #6a4200; font-size: 14px; }
.hub-keymsg.swap { padding: 5px 6px 5px 10px; border: 2px solid var(--blue); border-radius: 8px; background: var(--slot); color: var(--ink); font-size: 14px; }
.hub-keyundo { flex: none; }
.hub-keyreset-row { display: flex; align-items: center; gap: 10px; }
.hub-keyreset { flex: none; }
.hub-keyreset-l { flex: 1; min-width: 0; color: var(--ink-3); font-size: 13px; }

/* ------------------------------------------------------------------ the way back */
/* "◀ Hub" first in the Ranked lobby's head when it was opened from PLAY (h8;
   the GTL has none: it is MARKET's, inside Hub) */
.rk-head .rk-back { flex: none; height: 32px; padding: 0 10px; border-color: var(--sel-line); background: var(--sel); font-size: 14px; }

/* ------------------------------------------------------------------ "How … works" (h11) */
/* a card over its place (howto.js): its icon, title and kicker, the rows (a
   white tile with a pixel icon, a small kit tab label or a red count), the
   refusals in the server's words, the foot */
.window.hub-cardscrim { inset: 0; max-width: none; max-height: none; padding: 8px; display: flex; align-items: center; justify-content: center; background: #0b122280; }
.pxui.hub-how { flex: none; width: min(780px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; display: flex; flex-direction: column; padding: 14px 16px 16px; }
.hub-how-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 2px dashed var(--rule); }
.hub-how-head h2 { font-size: 22px; letter-spacing: .04em; text-transform: uppercase; }
.hub-how-head .hub-kick { min-width: 0; margin-left: 6px; }
.hub-how-head .hub-x { margin-left: auto; }
.hub-how-list { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.hub-how-row { display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 5px 12px 5px 6px; border: 3px solid var(--blue); border-radius: 12px; background: var(--slot); font-size: 15px; line-height: 1.3; }
.hub-how-row b { color: var(--ink); }
.hub-how-tile { flex: none; display: flex; align-items: center; justify-content: center; width: 96px; height: 48px; border: 3px solid var(--frame); border-radius: 8px; background: #fff; color: var(--ink); }
/* a small kit tab label (INBOX, GUILD, PLAY, MARKET, SETTINGS) */
.hub-how-tile.chip { padding: 0 4px; }
.hub-how-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 6px; border: 2px solid var(--frame); border-radius: 5px; background: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; line-height: 1; text-transform: uppercase; white-space: nowrap; }
/* a red count (the badge on Hub) */
.hub-how-tile.badge .px-badge { min-width: 22px; height: 22px; border-radius: 11px; font-size: 13px; }
/* "How the Battle Frontier works" (f4): wider tiles; three facilities' icons,
   two levels' chips stacked, a streak in the game's font, BP's coin, a
   Pokémon's icon (the first frame of its 32 × 64 sheet) */
.how-frontier .hub-how-tile { width: 112px; }
.hub-how-tile.arts, .hub-how-tile.bp { gap: 2px; }
.hub-how-tile.chips { flex-direction: column; gap: 3px; }
.hub-how-tile.chips .hub-how-chip { height: 18px; font-size: 11px; }
.hub-how-num { font: 24px/1 "PokemonGBA", monospace; }
.hub-how-tile.bp b { font-size: 13px; }
.hub-how-mon { display: block; width: 32px; height: 32px; background-size: 32px 64px; background-repeat: no-repeat; image-rendering: pixelated; }
.hub-how-more { margin-top: 10px; padding: 7px 10px; border: 2px dashed #c98a2a; border-radius: 8px; background: var(--announce); color: #8a5200; font-size: 13px; line-height: 1.45; }
.hub-how-more b { color: var(--ink); }
/* (the foot stays in view at the card's bottom however short the screen:
   1280 × 600, 1366 × 657, a phone on its side; carried from Task 3's review,
   M2) */
.hub-how-foot { position: sticky; bottom: -16px; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin: 12px -16px -16px; padding: 10px 16px 16px; background: var(--cream); box-shadow: 0 -8px 10px -8px #0b122255; }
.hub-how-foot .hub-kick { font-size: 12px; }
.hub-how-ok { min-width: 170px; height: 46px; font-size: 18px; }

/* ------------------------------------------------------------------ phone */
/* full screen; the tabs in one row, wrapping to a second when the phone is
   too narrow for the five (never a sideways strip); one column that scrolls */
.pxui.hub.phone { width: calc(100% - 12px); height: calc(100% - 16px); padding: 10px 10px 0; }
.hub.phone .hub-head { gap: 8px; padding: 0 0 8px; }
.hub.phone .hub-head h1 { font-size: 19px; }
.hub.phone .hub-x { width: 44px; height: 44px; }
/* the five tabs in one row where they fit (tighter under 375 px), and a
   second row below that: never a hidden-scroll strip (Task 7's re-review P3) */
.hub.phone .hub-tabs { flex-wrap: wrap; gap: 5px; margin: -4px -10px 0; padding: 4px 10px 8px; }
.hub.phone .hub-tabs .px-pocket { flex: none; height: 44px; padding: 0 11px; font-size: 14px; }
@media (max-width: 375px) {
  .hub.phone .hub-tabs .px-pocket { padding: 0 7px; }
}
/* (4 px each side: a focus ring on the first tab or row isn't cut: Task 7's re-review P2) */
.hub.phone .hub-main { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding: 8px 4px 10px; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; }
.hub.phone .hub-body { flex: none; }
.hub.phone .hub-play { flex: none; min-height: auto; display: flex; flex-direction: column; gap: 10px; overflow: visible; }
.hub.phone .hub-tile { gap: 8px; padding: 10px 12px 12px; }
.hub.phone .hub-art { width: 60px; height: 60px; }
.hub.phone .hub-tile h2 { font-size: 21px; }
.hub.phone .hub-go { margin-top: 2px; }
.hub.phone .hub-backnote { padding: 8px 10px; }
/* INBOX on a phone (p4): one column (the side column under the rows); a
   row is the face, the words and the time, its answers under them, each
   half the row and 44 px tall */
.hub.phone .hub-inbox, .hub.side .hub-inbox { flex: none; display: flex; flex-direction: column; gap: 10px; }
.hub.phone .hub-ilist, .hub.phone .hub-iside, .hub.side .hub-ilist, .hub.side .hub-iside { flex: none; min-height: auto; overflow: visible; }
.hub.phone .hub-row { grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: 8px; row-gap: 6px; padding: 6px 8px 8px; }
.hub.phone .hub-ic { width: 40px; height: 40px; }
.hub.phone .hub-ic .px-face { width: 38px; height: 38px; }
.hub.phone .hub-chip { display: flex; width: max-content; height: 17px; margin: 0 0 2px; padding: 0 4px; font-size: 10px; }
/* (the chip above the title, which wraps onto as many lines as it needs: the
   longest names a trainer and a guild can have, 11 and [4] + 20 letters,
   show whole at 375 px, a 20-letter word broken inside the row; carried from
   Task 4's re-review, S2: a clamp at two lines cut them) */
.hub.phone .hub-title { display: block; white-space: normal; overflow: visible; overflow-wrap: anywhere; font-size: 15px; line-height: 1.25; }
.hub.phone .hub-rsub, .hub.phone .hub-why { font-size: 12px; }
.hub.phone .hub-left { align-self: start; min-width: 64px; font-size: 12px; }
.hub.phone .hub-ends { display: flex; flex-direction: column; align-items: flex-end; }
.hub.phone .hub-t { font-size: 14px; }
.hub.phone .hub-acts { grid-column: 1 / -1; }
.hub.phone .hub-acts .px-btn { flex: 1; height: 44px; }
.hub.phone .hub-grp { font-size: 12px; }
/* SETTINGS on a phone and on its side: one column, the boxes in their order
   (.hub-main scrolls) */
.hub.phone .hub-settings, .hub.side .hub-settings { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 10px; padding: 4px; overflow: visible; }
.hub.phone .hub-set, .hub.side .hub-set { padding: 8px 10px 10px; }
.hub.phone .hub-aud { font-size: 12px; letter-spacing: 0; }
.hub.phone .hub-st { font-size: 13px; }
/* SETTINGS' sub-tabs on a phone (g3): two wide 44 px tabs, the line under them;
   a volume's name narrower beside its slider */
.hub.phone .hub-subtabs { flex: 1; }
.hub.phone .hub-subtabs .px-tab { flex: 1 1 0; max-width: 160px; height: 44px; font-size: 14px; }
.hub.phone .hub-vol, .hub.side .hub-vol { grid-template-columns: minmax(0, 130px) minmax(0, 1fr) 44px; gap: 10px; }
.hub.phone .hub-subrow, .hub.side .hub-subrow { margin-bottom: 8px; }
.pxui.hub-how { scroll-padding-bottom: 70px; }
@media (max-width: 560px) {
  .window.hub-cardscrim { padding: 6px; align-items: stretch; }
  .pxui.hub-how { width: 100%; padding: 10px 10px 12px; }
  /* (a long title, "How the Battle Frontier works", wraps instead of pushing
     the ✕ off a narrow phone; the ✕ never shrinks) */
  .hub-how-head h2 { min-width: 0; font-size: 19px; white-space: normal; overflow-wrap: anywhere; }
  .how-frontier .hub-how-head h2 { font-size: 17px; }
  /* (no room for the kicker beside the title, as Hub's own header) */
  .hub-how-head .hub-kick { display: none; }
  .hub-how-head .hub-x { flex: none; width: 44px; height: 44px; }
  .hub-how-row { align-items: flex-start; gap: 10px; padding: 6px 8px 6px 6px; font-size: 14px; }
  .hub-how-tile, .how-frontier .hub-how-tile { width: 78px; height: 40px; }
  .hub-how-tile.arts svg { width: 22px; height: 22px; }
  .hub-how-chip { height: 20px; padding: 0 4px; font-size: 11px; letter-spacing: .02em; }
  .hub-how-foot { bottom: -12px; margin: 12px -10px -12px; padding: 8px 10px 10px; }
  .hub-how-ok { flex: 1 1 100%; }
}

/* ------------------------------------------------------------------ side */
/* a phone on its side (p6): a 640 px panel on the left, the tabs a 44 px rail,
   the header and the panel beside it; the rest of the game stays in view */
.pxui.hub.side { top: 6px; left: 6px; width: min(640px, calc(100% - 12px)); height: calc(100% - 12px); max-height: calc(100% - 12px); flex-direction: row; gap: 8px; padding: 8px; }
/* (4 px round the tabs: the focus ring isn't cut by the scrolling) */
.hub-rail { flex: none; display: flex; flex-direction: column; gap: 4px; width: 144px; margin: -4px; padding: 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; }
.hub.side .hub-rail .px-pocket { flex: none; justify-content: space-between; height: 44px; padding: 0 10px; font-size: 14px; }
.hub-col { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.hub.side .hub-head { gap: 8px; margin-bottom: 6px; padding: 0 0 6px; border-bottom: 2px dashed var(--rule); }
.hub.side .hub-head h1 { font-size: 18px; }
.hub.side .hub-head .hub-kick { font-size: 12px; }
.hub.side .hub-x { width: 44px; height: 44px; }
.hub.side .hub-main { overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; padding-top: 0; scrollbar-width: thin; scrollbar-color: var(--ring) transparent; }
.hub.side .hub-body { flex: none; }
.hub.side .hub-play { flex: none; min-height: auto; display: flex; flex-direction: column; gap: 8px; overflow: visible; }
.hub.side .hub-tile { gap: 6px; padding: 8px 10px 10px; }
.hub.side .hub-art { width: 52px; height: 52px; }
.hub.side .hub-tile h2 { font-size: 19px; }
.hub.side .hub-desc { font-size: 14px; }
.hub.side .hub-go { margin-top: 2px; }
/* INBOX on its side (p6): a slim row, the time in the line under the title,
   the answers two 44 px squares (✓ / ✕, their words on hover and to screen
   readers) */
.hub.side .hub-row { grid-template-columns: 36px minmax(0, 1fr) auto; column-gap: 8px; min-height: 52px; margin-bottom: 5px; padding: 3px 5px 3px 6px; border-radius: 10px; }
.hub.side .hub-ic { width: 36px; height: 36px; }
.hub.side .hub-ic .px-face { width: 34px; height: 34px; }
.hub.side .hub-title { font-size: 14px; }
.hub.side .hub-chip { height: 16px; margin-right: 5px; padding: 0 4px; font-size: 10px; }
.hub.side .hub-rsub, .hub.side .hub-why { font-size: 12px; }
.hub.side .hub-acts { gap: 5px; }
.hub.side .hub-acts .px-btn { flex: none; width: 44px; height: 44px; padding: 0; font-size: 20px; }

/* ------------------------------------------------------------------ touch */
/* the kit's 44 px targets (social-ui.css gives them only inside .pxui.touch,
   the social layer; this window lives in #windows) */
@media (pointer: coarse) {
  .hub .px-btn, .hub .px-pocket, .hub .px-field, .hub .px-tab, .hub-x, .hub-tile .px-btn, .hub-row .px-btn, .hub-clearall, .hub-emptygo .px-btn, .hub-how .px-btn, .rk-head .rk-back { min-height: 44px; }
  .hub-x, .rk-head .rk-back { min-width: 44px; }
  /* SETTINGS: the statuses, the choices, the switches and Unblock */
  .hub-st, .hub-aud, .hub-sw, .hub-unblock { min-height: 44px; }
  /* SETTINGS → Game: the sliders (the Fullscreen button and the sub-tabs: .px-btn, .px-tab above) */
  .hub-range { height: 44px; }
}
