/* ==========================================================================
   rooms.css — round 39, owned by the rooms agent.
   --------------------------------------------------------------------------
   The rooms that open as glass panels over the world (views/locker.js:
   Locker, Rewards, Ranks, Points, Shop, Friends, Missions; plus Classroom,
   Hall, Ideas, Help and the Garage). One language with the Vault and the
   Map: glass tiles with the dock's icons, a blue meter, glass cards, the
   same type scale. Loaded last, so rules here override app.css/game.css.
   Spacing is on the 4/8 scale; hit targets are 44px or more (Apple HIG).
   ========================================================================== */

/* ---- Shared: stat strip ---- */
.rstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.rstat { display: grid; grid-template-columns: 44px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 14px; border-radius: 14px; background: rgba(9, 22, 52, 0.72); border: 1px solid rgba(144, 195, 255, 0.26); color: #fff; text-decoration: none; transition: transform 160ms var(--ease-out), border-color 160ms, box-shadow 160ms; }
a.rstat:hover { transform: translateY(-2px); border-color: rgba(56, 165, 255, 0.9); box-shadow: 0 0 28px -8px rgba(56, 165, 255, 0.8); color: #fff; text-decoration: none; }
.rstat img { grid-row: 1 / 3; width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); }
.rstat b { font-size: clamp(1.05rem, 1.5vw, 1.35rem); line-height: 1.15; font-weight: 800; min-width: 0; text-wrap: balance; }
.rstat span { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(234, 245, 255, 0.72); }

/* ---- Shared: the meter ---- */
.rmeter { height: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); overflow: hidden; }
.rmeter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--hu-blue-600, #1467ef), var(--hu-blue-400, #38a5ff)); box-shadow: 0 0 12px rgba(56, 165, 255, 0.7); transition: width 600ms var(--ease-out); }

/* ---- Shared: blocks, cards, counts, tags, rows ---- */
.room-card .card__head h3, .rblock__h { margin: 0; font-size: 1.25rem; line-height: 1.2; }
.room-card .card__head { flex-wrap: wrap; }
.rcount { font-weight: 800; font-size: 0.95rem; white-space: nowrap; color: rgba(234, 245, 255, 0.85); }
.rblock { display: grid; gap: var(--s-3); }
.rblock__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.rnote { font-size: var(--t-sm); }
.rrow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.rdeck { align-items: start; }
.rtag { display: inline-flex; align-items: center; flex: none; white-space: nowrap; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; color: rgba(234, 245, 255, 0.72); border: 1px solid rgba(144, 195, 255, 0.35); }
.rtag--on { color: #fff; background: var(--hu-blue-600, #1467ef); border-color: var(--hu-blue-400, #38a5ff); box-shadow: 0 0 12px -2px rgba(56, 165, 255, 0.8); }
.rpill { flex: none; white-space: nowrap; font-weight: 800; font-size: 0.85rem; padding: 4px 10px; border-radius: 999px; background: rgba(56, 165, 255, 0.16); border: 1px solid rgba(56, 165, 255, 0.45); color: #fff; }

/* The rank you hold, with the meter to the next. */
.rrank { display: grid; grid-template-columns: 44px minmax(0, 1fr) minmax(200px, 300px); gap: 14px 16px; align-items: center; padding: 14px 18px; border-radius: 16px; background: radial-gradient(circle at 100% 0, rgba(56, 165, 255, 0.22), transparent 50%), rgba(9, 22, 52, 0.72); border: 1px solid rgba(144, 195, 255, 0.3); }
.rrank .medal { width: 44px; height: 44px; font-size: 1.1rem; }
.rrank__text { display: grid; gap: 2px; min-width: 0; }
.rrank__text b { font-size: 1.2rem; line-height: 1.2; }
.rrank__text .dim { font-size: var(--t-sm); line-height: 1.4; }
.rrank__meter { display: grid; gap: 6px; }
.rrank__to { font-size: var(--t-xs); color: var(--volt-hot); font-weight: 700; }

/* A highlighted block: the next rank, the next mission, the balance. */
.rhero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 24px; align-items: center; padding: 22px 24px; border-radius: 18px; background: radial-gradient(circle at 100% 0, rgba(56, 165, 255, 0.32), transparent 45%), linear-gradient(180deg, rgba(20, 103, 239, 0.3), rgba(9, 22, 52, 0.88)); border: 1px solid rgba(56, 165, 255, 0.55); box-shadow: 0 0 40px -16px rgba(56, 165, 255, 0.8); }
.rhero__text { display: grid; gap: 8px; min-width: 0; }
.rhero__text h2 { margin: 0; font-size: clamp(1.35rem, 2.3vw, 1.9rem); line-height: 1.15; text-wrap: balance; }
.rhero__text p { margin: 0; line-height: 1.5; max-width: 62ch; }
.rhero__go { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }
.rhero--balance { grid-template-columns: minmax(0, 1fr); }
.rhero--balance h2 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -0.02em; }
.rhero--balance h2 small { font-size: 1rem; font-weight: 600; letter-spacing: 0; color: rgba(234, 245, 255, 0.72); }
.rhero--balance .rrank { background: rgba(4, 10, 26, 0.45); }

/* "Up next" doors. */
.rnexts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rnext { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 16px; background: rgba(9, 22, 52, 0.72); border: 1px solid rgba(144, 195, 255, 0.26); color: #fff; text-decoration: none; transition: transform 160ms var(--ease-out), border-color 160ms, box-shadow 160ms; }
.rnext:hover { transform: translateY(-2px); border-color: rgba(56, 165, 255, 0.9); box-shadow: 0 0 28px -8px rgba(56, 165, 255, 0.8); color: #fff; text-decoration: none; }
.rnext img { width: 48px; height: 48px; object-fit: contain; }
.rnext__text { display: grid; gap: 2px; min-width: 0; }
.rnext__text b { line-height: 1.25; }
.rnext__text .dim { font-size: var(--t-xs); line-height: 1.4; }
.rnext__go { font-size: 0.75rem; font-weight: 800; padding: 6px 12px; border-radius: 999px; background: rgba(56, 165, 255, 0.18); border: 1px solid rgba(56, 165, 255, 0.5); }

/* Numbered steps (the 90 days, how inviting works). */
.rsteps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: rstep; }
.rsteps--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rsteps li { counter-increment: rstep; position: relative; display: grid; align-content: start; gap: 4px; padding: 16px 16px 16px 58px; border-radius: 14px; background: rgba(255, 255, 255, 0.035); border: 1px solid rgba(144, 195, 255, 0.18); min-width: 0; }
.rsteps li::before { content: counter(rstep); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 0.9rem; color: #fff; background: linear-gradient(180deg, var(--hu-blue-400, #38a5ff), var(--hu-blue-600, #1467ef)); box-shadow: 0 0 14px rgba(56, 165, 255, 0.6); }
.rsteps__when { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--volt-hot); }
.rsteps b { line-height: 1.25; }
.rsteps .dim { font-size: var(--t-sm); line-height: 1.45; }

/* Label-and-value lists (points). */
.rlist { list-style: none; margin: 0; padding: 0; display: grid; }
.rlist li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid rgba(144, 195, 255, 0.14); }
.rlist li:first-child { border-top: 0; padding-top: 0; }
.rlist li > a, .rlist li > span:first-child { display: grid; gap: 2px; min-width: 0; color: #fff; text-decoration: none; }
.rlist li > a:hover b { color: var(--volt-hot); }
.rlist .dim { font-size: var(--t-xs); }
.rlist li.is-done .rpill { background: var(--hu-blue-600, #1467ef); border-color: var(--hu-blue-400, #38a5ff); }

/* The rules every points room states. */
.rrules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.rrules li { display: grid; gap: 2px; padding: 12px 14px 12px 40px; position: relative; border-radius: 12px; background: rgba(9, 22, 52, 0.5); border: 1px solid rgba(144, 195, 255, 0.16); font-size: var(--t-sm); }
.rrules li::before { content: "✓"; position: absolute; left: 14px; top: 12px; font-weight: 900; color: var(--hu-blue-400, #38a5ff); }
.rrules span { color: rgba(234, 245, 255, 0.7); line-height: 1.45; }

/* Empty states: an icon, a sentence that says what will be here, and the way forward. */
.rempty { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px 18px; align-items: center; padding: 18px 20px; border-radius: 16px; background: rgba(9, 22, 52, 0.45); border: 1px dashed rgba(144, 195, 255, 0.32); }
.rempty img { width: 64px; height: 64px; object-fit: contain; opacity: 0.9; }
.rempty b { font-size: 1.05rem; }
.rempty p { margin: 4px 0 0; line-height: 1.5; font-size: var(--t-sm); }
.rempty--sm { padding: 14px 16px; gap: 12px 14px; }
.rempty--sm img { width: 48px; height: 48px; }
.card.rempty { background: rgba(9, 22, 52, 0.45); box-shadow: none; }

/* Keyboard focus is a visible ring everywhere in the rooms. */
.rstat:focus-visible, .rnext:focus-visible, .rshelf__item:focus-visible, a.patchrow:focus-visible, .mrow__hit:focus-visible, .mrow__door:focus-visible, .rchip:focus-visible, .inv__slot:focus-visible { outline: var(--focus-ring, 2px solid #9ccaff); outline-offset: 2px; }

/* ---- Avatar ---- */
.inv__grid--room { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; }
button.inv__slot { border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; transition: transform 140ms var(--ease-out), box-shadow 140ms; }
button.inv__slot.is-on:hover { transform: translateY(-2px); }
.inv__slot.is-locked { cursor: default; }
.inv__slot .inv__at { font-weight: 700; }
.inv__detail { display: grid; gap: 2px; margin: var(--s-4) 0 0; min-height: 4.4em; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); font-size: var(--t-sm); color: rgba(234, 245, 255, 0.75); line-height: 1.45; }
.inv__detail b { color: #fff; }
.inv__state { justify-self: start; margin-top: 4px; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(234, 245, 255, 0.65); }
.inv__state.is-on { color: var(--volt-hot); }
.studio--room { grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); }
.studio--room .tier { min-height: 52px; }
.tier .medal { font-size: 0.95rem; }
/* Wide screens: the operator stands in the studio behind the panel (game.css), so the panel doesn't show her twice. */
@media (min-width: 1101px) {
  body.is-studio .studio--room { grid-template-columns: minmax(0, 1fr); }
  body.is-studio .studio--room .studio__figure { display: none; }
}

/* ---- Rewards ---- */
.patches--room { grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.patchrow { grid-template-columns: auto minmax(0, 1fr) auto; color: #fff; text-decoration: none; min-height: 72px; transition: border-color 160ms, background 160ms; }
a.patchrow:hover { opacity: 1; background: rgba(20, 103, 239, 0.18); text-decoration: none; color: #fff; }
.patchrow .patch__name { display: none; }
.patchrow .patch__ring { width: 48px; height: 48px; }
.patchrow .patch__mark { width: 20px; height: 20px; }
.patchrow__text { display: grid; gap: 2px; min-width: 0; }
.patchrow__text .dim { font-size: var(--t-xs); line-height: 1.4; }

/* ---- Path: the track ---- */
.rpath { padding: 6px 0 0; }
.rtrack { --f: 0; list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.rtrack::before, .rtrack::after { content: ""; position: absolute; top: 21px; left: 10%; height: 3px; border-radius: 3px; }
.rtrack::before { right: 10%; background: rgba(255, 255, 255, 0.12); }
.rtrack::after { width: calc(80% * var(--f)); background: linear-gradient(90deg, var(--money, #3ddc84), var(--hu-blue-400, #38a5ff)); box-shadow: 0 0 12px rgba(56, 165, 255, 0.8); }
.rtrack__stop { position: relative; z-index: 1; display: grid; justify-items: center; align-content: start; gap: 4px; text-align: center; min-width: 0; padding: 0 4px; }
.rtrack .medal { width: 44px; height: 44px; font-size: 1rem; margin-bottom: 4px; }
.rtrack .medal--locked { background: #101d3d; }
.rtrack .medal--done { background: #0e3a2e; }
.rtrack__stop b { font-size: 1rem; line-height: 1.2; text-wrap: balance; }
.rtrack__pts { font-size: var(--t-xs); font-weight: 700; color: rgba(234, 245, 255, 0.8); }
.rtrack__line { font-size: var(--t-xs); line-height: 1.4; color: rgba(234, 245, 255, 0.6); max-width: 24ch; text-wrap: pretty; }
.rtrack__stop:not(.is-done):not(.is-now) b { color: rgba(234, 245, 255, 0.75); }
.rtrack__here { margin-top: 4px; font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--hu-blue-600, #1467ef); color: #fff; box-shadow: 0 0 14px rgba(56, 165, 255, 0.8); }

/* ---- Shop ---- */
.rwindow { position: relative; isolation: isolate; overflow: hidden; border-radius: 18px; min-height: 300px; display: grid; align-content: end; padding: 28px; border: 1px solid rgba(144, 195, 255, 0.3); }
.rwindow__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; z-index: -2; }
.rwindow__veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5, 15, 37, 0.94) 0%, rgba(5, 15, 37, 0.7) 50%, rgba(5, 15, 37, 0.15) 100%), linear-gradient(0deg, rgba(5, 15, 37, 0.7), transparent 50%); }
.rwindow__text { display: grid; gap: var(--s-4); max-width: 620px; }
.rwindow__text .view-head { margin: 0; }
.rwindow__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 8px; border-radius: 999px; background: rgba(5, 15, 37, 0.7); border: 1px solid rgba(144, 195, 255, 0.4); color: rgba(234, 245, 255, 0.8); font-size: var(--t-sm); text-decoration: none; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.rchip b { color: #fff; font-size: 1rem; }
.rchip:hover { border-color: var(--hu-blue-400, #38a5ff); color: #fff; text-decoration: none; }
.rchip img { width: 28px; height: 28px; object-fit: contain; }
.rshelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.rshelf__item { display: grid; justify-items: center; align-content: start; gap: 8px; padding: 14px 12px 12px; border-radius: 16px; text-align: center; background: rgba(9, 22, 52, 0.62); border: 1px solid rgba(144, 195, 255, 0.18); color: #fff; text-decoration: none; transition: transform 160ms var(--ease-out), border-color 160ms, box-shadow 160ms; }
.rshelf__item.is-owned { border-color: rgba(56, 165, 255, 0.6); box-shadow: 0 0 24px -10px rgba(56, 165, 255, 0.9); }
a.rshelf__item:hover { transform: translateY(-3px); border-color: var(--hu-blue-400, #38a5ff); color: #fff; text-decoration: none; }
.rshelf__art { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; background: radial-gradient(circle at 50% 60%, rgba(56, 165, 255, 0.2), transparent 65%); }
.rshelf__art img { position: absolute; inset: 10% 18%; width: 64%; height: 80%; object-fit: contain; filter: grayscale(1) brightness(0.5); }
.rshelf__item.is-owned .rshelf__art img { filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.6)); }
.rshelf__item b { font-size: 0.9rem; line-height: 1.25; text-wrap: balance; }

/* ---- Friends ---- */
.rinvite { display: grid; gap: 10px; }
.rinvite__row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; }
.rinvite__row .input { min-height: 46px; font-family: var(--font-mono); font-size: var(--t-sm); text-overflow: ellipsis; }
.rinvite__row .btn { min-height: 46px; white-space: nowrap; }

/* ---- Missions: the board ---- */
.mboard { display: grid; gap: var(--s-5); }
.mboard__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: calc(-1 * var(--s-2)); }
.mboard__filter button { min-height: 36px; padding-inline: 16px; }
.mboard__levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 12px; align-items: start; }
.mnext { grid-template-columns: 64px minmax(0, 1fr) auto; }
.mnext__icon { width: 64px; height: 64px; object-fit: contain; align-self: start; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55)); }
.mlevel { border-radius: 16px; background: rgba(9, 22, 52, 0.66); border: 1px solid rgba(144, 195, 255, 0.22); overflow: hidden; }
.mlevel.is-clear { border-color: rgba(56, 165, 255, 0.7); box-shadow: 0 0 30px -12px rgba(56, 165, 255, 0.9); }
.mlevel__head { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 16px; border-bottom: 1px solid rgba(144, 195, 255, 0.14); background: rgba(255, 255, 255, 0.025); }
.mlevel__num { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; font-weight: 900; font-size: 1.05rem; color: #fff; background: linear-gradient(180deg, rgba(56, 165, 255, 0.55), rgba(20, 103, 239, 0.35)); border: 1px solid rgba(56, 165, 255, 0.6); }
.mlevel.is-clear .mlevel__num { background: linear-gradient(180deg, var(--hu-blue-400, #38a5ff), var(--hu-blue-600, #1467ef)); box-shadow: 0 0 14px rgba(56, 165, 255, 0.7); }
.mlevel__title { display: grid; gap: 2px; min-width: 0; }
.mlevel__title .label { font-size: 0.62rem; }
.mlevel__title h3 { margin: 0; font-size: 1.05rem; line-height: 1.25; text-wrap: balance; }
.mlevel__count { display: grid; gap: 6px; justify-items: end; width: 84px; }
.mlevel__count > span { font-weight: 800; font-size: 0.85rem; white-space: nowrap; }
.mlevel__count .rmeter { width: 100%; height: 6px; }
.mlevel__list { list-style: none; margin: 0; padding: 6px; display: grid; gap: 2px; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; border-radius: 12px; transition: background 140ms; }
.mrow:hover { background: rgba(56, 165, 255, 0.08); }
.mrow__hit { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: center; width: 100%; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 12px; background: none; color: #fff; font: inherit; text-align: left; cursor: pointer; }
.mrow__check { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(234, 245, 255, 0.35); font-size: 0.8rem; font-weight: 900; transition: background 160ms, border-color 160ms, transform 160ms var(--ease-out); }
.mrow__hit:hover .mrow__check { border-color: var(--hu-blue-400, #38a5ff); }
.mrow__hit:active .mrow__check { transform: scale(0.9); }
.mrow__text { font-size: 0.93rem; line-height: 1.4; font-weight: 500; min-width: 0; overflow-wrap: break-word; }
.mrow.is-done .mrow__check { background: linear-gradient(180deg, var(--hu-blue-400, #38a5ff), var(--hu-blue-600, #1467ef)); border-color: var(--hu-blue-400, #38a5ff); color: #fff; box-shadow: 0 0 12px rgba(56, 165, 255, 0.7); }
.mrow.is-done .mrow__text { color: rgba(234, 245, 255, 0.6); }
.mrow__meta { display: flex; align-items: center; gap: 10px; padding-right: 10px; white-space: nowrap; }
.mrow__door { font-size: 0.78rem; font-weight: 700; color: var(--volt-hot); text-decoration: none; padding: 6px 2px; }
.mrow__door:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.mrow__pts { font-size: 0.75rem; font-weight: 800; color: rgba(234, 245, 255, 0.6); min-width: 3.2ch; text-align: right; }
.mrow.is-done .mrow__pts { color: var(--volt-hot); }

/* ---- Classroom: polish only ---- */
.hub__change { white-space: nowrap; }
.hub__none { font-size: var(--t-xs); }
.hub__sched li { gap: 3px; padding: 12px 0; border-top: 1px solid rgba(144, 195, 255, 0.14); }
.hub__sched li:first-child { border-top: 0; padding-top: 0; }
.hub__when { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--volt-hot); }
.hub__sched .dim { font-size: var(--t-sm); line-height: 1.45; }

/* ---- Ideas Desk ---- */
.ideas__shipped { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ideas__shipped li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 12px; align-items: start; }
.ideas__shipped li > span:last-child { display: grid; gap: 2px; }
.ideas__shipped .dim { font-size: var(--t-xs); }
.ideas__tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 0.7rem; font-weight: 900; color: #fff; background: var(--hu-blue-600, #1467ef); box-shadow: 0 0 10px rgba(56, 165, 255, 0.6); }
.ideas__hint { font-size: var(--t-xs); color: #ffb3ba; }

/* ---- Help: a real disclosure row, not the browser's triangle ---- */
.help__q { padding: 0; transition: border-color 160ms; }
.help__q summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 16px; list-style: none; border-radius: 12px; }
.help__q summary::-webkit-details-marker { display: none; }
.help__q summary::after { content: ""; flex: none; width: 9px; height: 9px; border-right: 2px solid var(--volt-hot); border-bottom: 2px solid var(--volt-hot); transform: rotate(45deg) translateY(-3px); transition: transform 200ms var(--ease-out); }
.help__q[open] summary::after { transform: rotate(-135deg) translate(-2px, -1px); }
.help__q[open] { border-color: rgba(56, 165, 255, 0.5); }
.help__q summary:hover { background: rgba(56, 165, 255, 0.08); }
.help__q summary:focus-visible { outline: var(--focus-ring, 2px solid #9ccaff); outline-offset: 2px; }
.help__q p { margin: 0; padding: 0 16px 14px; }
.help__end { margin-top: var(--s-2); }

/* ---- The Garage: the price sits under the title, so headings never stack one word per line ---- */
.extras__top { flex-direction: column; align-items: stretch; gap: 6px; }
.extras__top h2 { text-wrap: balance; }
.extras__top .label { line-height: 1.5; }
.extras__price { font-size: var(--t-lg); }

/* ---- The Hall: polish only ---- */
.hall__chat .chat__row .input { min-width: 0; }
.bar__btn[aria-pressed="true"]:not(.bar__btn--hand) { border-color: rgba(56, 165, 255, 0.6); }
.bar__btn:focus-visible, .bar__react button:focus-visible, .pew:focus-visible { outline: var(--focus-ring, 2px solid #9ccaff); outline-offset: 2px; }

/* ---- Tablet ---- */
@media (max-width: 1000px) {
  .rnexts { grid-template-columns: minmax(0, 1fr); }
  .rsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrules { grid-template-columns: minmax(0, 1fr); }
}

/* ---- Phone ---- */
@media (max-width: 760px) {
  .rstats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rstat { grid-template-columns: 32px minmax(0, 1fr); column-gap: 10px; padding: 10px 12px; }
  .rstat img { width: 32px; height: 32px; }
  .rstat b { font-size: 1.05rem; }
  .rstat span { font-size: 0.58rem; letter-spacing: 0.1em; }
  .rrank { grid-template-columns: 44px minmax(0, 1fr); padding: 14px; }
  .rrank__meter { grid-column: 1 / -1; }
  .rhero, .mnext { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .mnext__icon { display: none; }
  .rhero__go { justify-content: stretch; }
  .rhero__go > * { flex: 1 1 140px; justify-content: center; }
  .rsteps, .rsteps--3 { grid-template-columns: minmax(0, 1fr); }
  .rempty { grid-template-columns: auto minmax(0, 1fr); }
  .rempty > .btn { grid-column: 1 / -1; justify-content: center; }
  .rempty img { width: 48px; height: 48px; }
  .inv__grid--room { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .studio--room { grid-template-columns: minmax(0, 1fr); }
  .studio--room .studio__figure { max-height: 280px; }
  .patches--room { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .patchrow { min-height: 64px; }
  /* The track turns vertical: a rail down the left, each rank a row. */
  .rtrack { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .rtrack::before { top: 22px; bottom: 22px; left: 21px; right: auto; width: 3px; height: auto; }
  .rtrack::after { display: none; }
  .rtrack__stop { grid-template-columns: 44px minmax(0, 1fr); justify-items: start; text-align: left; column-gap: 14px; row-gap: 2px; padding: 0; }
  .rtrack__stop .medal { grid-row: 1 / 5; margin: 0; }
  .rtrack__line { max-width: none; }
  .rtrack__here { margin-top: 2px; }
  .rwindow { min-height: 0; padding: 20px 16px; }
  .rwindow__veil { background: linear-gradient(180deg, rgba(5, 15, 37, 0.55), rgba(5, 15, 37, 0.94) 60%); }
  .rshelf { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rinvite__row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rinvite__row .input { grid-column: 1 / -1; }
  .rinvite__row .btn:only-of-type { grid-column: 1 / -1; }
  .rinvite__row .btn { justify-content: center; }
  .mlevel__head { grid-template-columns: 40px minmax(0, 1fr) auto; padding: 12px; gap: 10px; }
  .mlevel__num { width: 40px; height: 40px; font-size: 0.95rem; }
  .mlevel__count { width: 64px; }
  .mrow { grid-template-columns: minmax(0, 1fr); }
  .mrow__meta { padding: 0 10px 8px 50px; flex-wrap: wrap; }
  .mrow__pts { margin-left: auto; }
  .help__end { grid-template-columns: auto minmax(0, 1fr); }
}

/* The prose rule in base.css spaces list items apart (li + li); the rooms' lists are grids and keep their own gaps. */
.rtrack > li, .rsteps > li, .rlist > li, .rrules > li, .mlevel__list > li, .ideas__shipped > li, .tiers > li { margin: 0; }

/* Rewards: sixteen pieces of gear sit as two even rows of eight (four rows of four on a phone), never 13 + 3. */
.inv__grid--eight { grid-template-columns: repeat(8, minmax(0, 1fr)); }
@media (max-width: 760px) { .inv__grid--eight { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Sealed patches are doors to the work: readable, not ghosted. */
.patchrow:not(.is-on) { opacity: 0.85; }
/* The Avatar panel is narrow (640px): the rank block stacks its meter under the name. */
body.is-studio .rrank { grid-template-columns: 44px minmax(0, 1fr); }
body.is-studio .rrank__meter { grid-column: 1 / -1; }
/* Classroom on a phone: the hall photograph's own signage sits behind the headline; a deeper veil keeps the words clean. */
@media (max-width: 760px) { .hub__veil { background: linear-gradient(180deg, rgba(4, 6, 13, 0.86), rgba(4, 6, 13, 0.62) 45%, rgba(4, 6, 13, 0.92)); } }

/* =====================================================================
   Round 39b (UX and flow): heading order and targets.
   Card heads are h2 now (h1 → h2, never h1 → h3, WCAG 1.3.1 / axe
   heading-order); `.h3` keeps the size they had as h3s.
   ===================================================================== */
h2.h3, .help__block > h2, .hub__next > h2 { margin: 0; font-size: var(--t-xl); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.room-card .card__head h2, h2.rblock__h { margin: 0; font-size: 1.25rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; }
.hub__next > h2 { font-size: 1.4rem; }
/* An empty state's own next step sits under its sentence. */
.rempty .link { display: inline-block; margin-top: 6px; font-weight: 700; }

/* The lobby's feature dots are 6px tall; each gets a 24px hit area around it without changing the look (WCAG 2.5.8). */
body.game .feature__dots { gap: 8px; }
body.game .feature__dots button { position: relative; }
body.game .feature__dots button::before { content: ""; position: absolute; inset: -9px -4px; }
body.game .feature__dots button:focus-visible { outline: var(--focus-ring, 2px solid #9ccaff); outline-offset: 4px; }

/* The unissued Operator Card on the paywall (views/unlock.js): four figures in a card ~360px wide. Number over caption,
   so "70 LESSONS" never runs into "11 TOOLS" (the card's own side-by-side layout needs a wider card). */
.unlock__card .opcard__stats li { grid-template-columns: minmax(0, 1fr); justify-items: start; }
.unlock__card .opcard__stats b { font-size: 1.6rem; }
.unlock__card .opcard__stats span { font-size: 0.62rem; letter-spacing: 0.08em; }

/* ---------- Vault fleet readout (r40 M15, L10): names wrap, weekdays shorten, the window never breaks ---------- */
.fleet__label span, .fleet__label small { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.fleet__day-short { display: none; }
.fleet__section .card__head > .label { white-space: nowrap; }
@media (max-width: 1100px) { .fleet__day-long { display: none; } .fleet__day-short { display: inline; } }

/* ---------- The Hall (r40 H7, H8, L12) ---------- */
/* The lesson plan: titles wrap to two lines instead of cutting at "The Whole Busine…"; a long level scrolls. */
.hall .screen { grid-template-columns: minmax(0, 1fr) 300px; }
.screen__plan { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(144, 195, 255, 0.35) transparent; padding-right: 2px; }
.screen__plan a { align-items: center; line-height: 1.25; }
.screen__plan a span { white-space: normal; overflow: hidden; text-overflow: clip; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-wrap: pretty; }
/* The poster has the crest and "HOTBOX" lettering in it: push it right and lay a deep scrim under the copy
   column, so the level label and title read on navy, never on top of the poster's own letters. */
.screen__art { object-position: 78% 40%; }
.screen__copy { background:
  linear-gradient(90deg, rgba(5, 9, 20, 0.97) 0%, rgba(5, 9, 20, 0.92) 38%, rgba(5, 9, 20, 0.55) 62%, rgba(5, 9, 20, 0.1) 88%),
  linear-gradient(0deg, rgba(5, 9, 20, 0.9), transparent 60%); }
/* Glyphs in the bar, the chat and the seats (hall.js G): one stroke icon set, no emoji. */
.hall__glyph { display: inline-grid; place-items: center; line-height: 0; flex: none; }
.hall__glyph svg { width: 18px; height: 18px; max-width: none; }
/* Immersive means nothing on a phone (the stacked hall has no panels to hide). */
.hall.is-stacked .hall__bar .bar__btn--immersive { display: none; }
.bar__btn { display: inline-flex; align-items: center; gap: 7px; }
.bar__react button { display: inline-grid; place-items: center; color: #dbeaff; }
.bar__react button:hover { color: #fff; }
.bar__react .hall__glyph svg { width: 20px; height: 20px; }
.chat__send .hall__glyph svg { width: 16px; height: 16px; }
.pew__hand, .pew__react { color: #fff; line-height: 0; filter: drop-shadow(0 0 8px rgba(56, 165, 255, 0.85)); }
.pew__hand svg { width: 26px; height: 26px; }
.pew__react svg { width: 30px; height: 30px; }
.pew__hand svg, .pew__react svg, .bar__react .hall__glyph svg, .chat__send .hall__glyph svg { max-width: none; }
/* Stacked (phone): the screen grows with its copy instead of clipping the level label off the top
   (the copy is bottom-aligned, so a fixed 16:9 box pushed its first line out of view). */
.hall.is-stacked .hall__screen { aspect-ratio: auto; }
.hall.is-stacked .screen { position: relative; inset: auto; min-height: calc((100vw - 24px) * 0.5625); }
.hall.is-stacked .screen__copy { position: relative; inset: auto; min-height: 100%; }

/* ---------- Classroom door (r40 M4): the next-session line shortens on a phone instead of running out ---------- */
.door__when--short { display: none; }
.door__sub { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 560px) { .door__when--long { display: none; } .door__when--short { display: inline; } }

/* ---------- Vault catalog (r40 L18): every cabinet door on one grid; one- and two-line names share a box, counts share a baseline ---------- */
.catalog__cabinets { align-items: stretch; }
.cabinet-door { grid-template-rows: 72px minmax(2.5em, auto) auto; align-content: start; }
.cabinet-door b { align-self: center; text-align: center; }
.cabinet-door__count { align-self: end; }
/* Machine tiles: number, a two-line name box, lesson count; a one-line name sits in the same box as a two-line one. */
.machine__face { grid-template-rows: auto minmax(2.6em, auto) auto; align-content: start; }
.machine__name { align-self: center; }

/* ---------- Map (r40 L19): on a phone 6.5% of the photo is ~22px, so "You" sat on pin 1; step it further left ---------- */
@media (max-width: 900px) { .map__you { transform: translate(calc(-50% - 16px), -50%); } }
