/* Stamina Bar Tycoon: the HUD over the pixel world. Built for 1280x800 (Steam Deck) and up. */
body.game {
  margin: 0; padding: 0; overflow: hidden; height: 100vh; background: #22272d; color: #eef1ee;
  font: 16px/1.4 var(--body); user-select: none; -webkit-user-select: none;
}
#screen { position: fixed; inset: 0; width: 100vw; height: 100vh; image-rendering: pixelated; touch-action: none; }
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud > * { pointer-events: auto; }
#hud button { font: inherit; }

/* Top bar: an oak rail with a steel plate. */
.g-top {
  position: absolute; left: 0; right: 0; top: 0; height: 46px; display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: repeating-linear-gradient(90deg, #a86e43 0 22px, #7d4f2c 22px 23px, #c98f5e 23px 46px, #7d4f2c 46px 47px);
  box-shadow: 0 2px 0 rgba(0,0,0,.35);
}
.g-plate {
  display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 6px; color: #252b31;
  background: linear-gradient(180deg, #eef1f3, #b9c0c5 55%, #d9dee1); box-shadow: 0 1px 0 #fff inset, 0 2px 0 rgba(0,0,0,.3);
  font-weight: 700; white-space: nowrap;
}
.g-plate .px-icon { flex: none; }
.g-brand { font-family: var(--hud); font-size: 15px; letter-spacing: .5px; }
.g-brand em { font-style: normal; color: #4f8a45; }
.g-money.neg { color: #b3261e; }
.g-spacer { flex: 1; }
.g-goal { font-weight: 500; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.g-speed b { font-family: var(--hud); font-size: 14px; }
.g-stars { letter-spacing: 1px; color: #4f8a45; }
.keycap {
  display: inline-grid; place-items: center; min-width: 24px; height: 22px; padding: 0 5px; border-radius: 5px;
  font: 700 12px var(--body); color: #eef1ee; background: #252b31; box-shadow: 0 2px 0 #000; margin: 0 2px;
}

/* Goals card, top left. */
.g-goals {
  position: absolute; left: 12px; top: 56px; width: 250px; padding: 10px 12px; border-radius: 8px;
  background: rgba(34,39,45,.86); border: 1px solid #4b545d; font-size: 14px;
}
.g-goals h4 { margin: 0 0 6px; font: 13px var(--hud); color: #b8e6a4; }
.g-goals li { list-style: none; display: flex; gap: 6px; align-items: center; padding: 2px 0; }
.g-goals ul { margin: 0; padding: 0; }
.g-goals .done { color: #8fd5a3; text-decoration: line-through; }

/* Bottom hint bar. */
.g-hints {
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 10px; display: flex; gap: 14px; align-items: center;
  padding: 8px 14px; border-radius: 10px; background: rgba(34,39,45,.88); border: 1px solid #4b545d; font-size: 15px; white-space: nowrap;
}
.g-hints span { display: inline-flex; align-items: center; }

/* Toasts. */
.g-toasts { position: absolute; left: 12px; top: 56px; display: grid; justify-items: start; gap: 4px; max-width: min(420px, calc(100vw - 24px)); pointer-events: none !important; }
/* News and notes: small and quiet in the corner, fading out (a new one slides in once). */
.g-toast {
  padding: 4px 10px; border-radius: 6px; background: rgba(34,39,45,.78); border-left: 3px solid #6f7a80; font-weight: 500; font-size: 13px;
  color: #dfe4e0; text-align: left; transition: opacity .4s;
}
.g-toast.fresh { animation: toast-in .25s ease-out; }
.g-toast.good { border-left-color: #8fc77f; } .g-toast.goal { border-left-color: #b8e6a4; color: #d3f2c4; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }

/* Panels share a look: dark concrete, steel edge. */
.g-panel {
  background: #2c3238; border: 1px solid #5d666c; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5);
  color: #eef1ee;
}
.g-panel h2 { font: 18px var(--hud); color: #b8e6a4; margin: 0; }
.g-panel .muted { color: #a9b3ad; }

/* Build drawer. */
.g-build { position: absolute; left: 12px; right: 12px; bottom: 60px; padding: 12px; }
.g-build-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.g-tabs { display: flex; gap: 6px; }
.g-tab { padding: 6px 14px; border-radius: 99px; border: 1px solid #5d666c; background: #383f47; color: #eef1ee; cursor: pointer; }
.g-tab.on { background: #b8e6a4; color: #252b31; border-color: #b8e6a4; font-weight: 700; }
.g-cards { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.g-card {
  flex: none; width: 150px; padding: 8px; border-radius: 10px; border: 2px solid #4b545d; background: #353c43; color: #eef1ee;
  text-align: left; cursor: pointer; display: grid; gap: 4px;
}
.g-card canvas { display: block; margin: 0 auto; image-rendering: pixelated; }
.g-card b { font-size: 14px; } .g-card .cost { font-family: var(--hud); font-size: 13px; color: #b8e6a4; }
.g-card.poor .cost { color: #e07a6a; }
.g-card .blurb { font-size: 12px; color: #a9b3ad; line-height: 1.3; }

/* Focus ring for pad/keyboard navigation (and mouse hover). */
.navfocus, .g-card:hover, .g-tab:hover, .g-btn:hover { outline: 3px solid #b8e6a4; outline-offset: 2px; }

/* Inspect panel: the member's phone, or an item card. */
.g-inspect { position: absolute; right: 12px; top: 56px; bottom: 64px; width: 380px; display: flex; flex-direction: column; overflow: hidden; }
.g-inspect-head { padding: 12px 14px 8px; border-bottom: 1px solid #4b545d; }
.g-inspect-head .thought { margin-top: 6px; font-style: italic; color: #b8e6a4; }
.g-inspect-head .status { font-size: 14px; color: #a9b3ad; }
.g-phone { flex: 1; overflow-y: auto; margin: 10px; border-radius: 22px; border: 6px solid #111; background: var(--concrete); color: var(--ink); }
.g-phone .phone-bar { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 8px 12px;
  background: repeating-linear-gradient(90deg, #a86e43 0 22px, #7d4f2c 22px 23px, #c98f5e 23px 46px, #7d4f2c 46px 47px); }
.g-phone .phone-bar .wordmark { font-size: 12px; padding: 3px 8px; white-space: nowrap; }
.g-phone .phone-tabs { display: flex; gap: 4px; }
.g-phone .phone-tabs button { border: 0; border-radius: 6px; padding: 3px 8px; background: rgba(0,0,0,.25); color: #fff8ee; font-size: 12px; cursor: pointer; }
.g-phone .phone-tabs button.on { background: #252b31; color: #b8e6a4; }
.g-phone .screen { padding: 10px; }
.g-phone .screen > * + * { margin-top: 10px; }
.g-phone .hero-name { font-size: 18px; }
.g-item-body { padding: 14px; display: grid; gap: 10px; }
.g-item-body canvas { image-rendering: pixelated; margin: 0 auto; display: block; }
.g-meter { height: 10px; border-radius: 3px; background: #4a525b; overflow: hidden; }
.g-meter i { display: block; height: 100%; background: #b8e6a4; }
.g-meter.dirt i { background: #8fb04a; }

.g-btn {
  padding: 8px 14px; border-radius: 8px; border: 1px solid #6f7a80; background: linear-gradient(180deg, #3d454d, #30363c);
  color: #eef1ee; cursor: pointer; font-weight: 700;
}
.g-btn.primary-btn { background: linear-gradient(180deg, #b8e6a4, #8fc77f); color: #252b31; border-color: #4f7f46; }
.g-btn.danger { border-color: #c0412f; color: #ffb3a6; }

/* Manage: a big centered panel with tabs. */
.g-manage { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(1040px, calc(100vw - 32px)); height: min(640px, calc(100vh - 120px)); display: flex; flex-direction: column; }
.g-manage-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #4b545d; }
.g-manage-body { flex: 1; overflow-y: auto; padding: 16px; }
.g-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.g-box { background: #343b42; border: 1px solid #4b545d; border-radius: 10px; padding: 12px 14px; }
.g-box h3 { margin: 0 0 8px; font-size: 16px; }
.g-kv { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 15px; }
.g-kv .pos { color: #8fd5a3; } .g-kv .neg { color: #f0a090; }
.g-big { font: 26px var(--hud); color: #b8e6a4; }
.g-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
table.g-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.g-table th { text-align: left; color: #a9b3ad; font-weight: 500; padding: 4px 6px; border-bottom: 1px solid #4b545d; }
.g-table td { padding: 4px 6px; border-bottom: 1px solid #3a4148; vertical-align: middle; }
.g-table tr.member-row { cursor: pointer; }
.g-table canvas { image-rendering: pixelated; vertical-align: middle; }
.insight { padding: 10px 12px; border-left: 4px solid #b8e6a4; background: #343b42; border-radius: 6px; margin-bottom: 8px; font-size: 15px; }
.insight.warn { border-color: #e07a6a; } .insight.good { border-color: #5fae7b; }
.news li { padding: 6px 0; border-bottom: 1px solid #3a4148; list-style: none; font-size: 15px; }
.news { padding: 0; margin: 0; }
.news .d { color: #a9b3ad; font-size: 13px; margin-right: 8px; }

/* Title and pause. */
.g-title {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 40%, rgba(184,230,164,.18), transparent 60%), rgba(22,26,30,.78);
}
.g-title-card { width: min(560px, calc(100vw - 32px)); padding: 26px; text-align: center; }
.g-title-card .wordmark { font-size: 26px; padding: 8px 16px; }
.g-title-card .sub { font: 14px var(--hud); color: #b8e6a4; margin: 10px 0 4px; letter-spacing: 2px; }
.g-title-card p { color: #cdd5d0; }
.g-menu { display: grid; gap: 10px; margin-top: 16px; }
.g-menu .g-btn { padding: 12px; font-size: 17px; }
.g-help { text-align: left; font-size: 15px; }
.g-help td { padding: 4px 8px; }

/* ---------- buttons in the HUD ---------- */
.g-hint {
  display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; min-height: 36px; border-radius: 8px;
  border: 1px solid transparent; background: none; color: #eef1ee; cursor: pointer; font: inherit;
}
.g-hint:hover { border-color: #6f7a80; }
.g-hint-text { color: #b8e6a4; }
.g-speedbtn { display: inline-flex; align-items: center; border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; }
.touch-only, .g-menubtn { display: none !important; }
body.touch .touch-only { display: inline !important; }
body.touch .g-menubtn { display: flex !important; cursor: pointer; border: 0; font-size: 18px; }
body.touch .keycap { display: none; }
.keycap:empty { display: none; }
body.touch .g-speedbtn { min-width: 32px; min-height: 32px; justify-content: center; font: 700 20px var(--body); }
.g-labstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 12px 0; }
body.game { height: 100dvh; touch-action: manipulation; }
.g-phone, .g-manage-body, .g-cards, .g-title { touch-action: pan-x pan-y; -webkit-overflow-scrolling: touch; }
.g-title { overflow-y: auto; padding: 16px; box-sizing: border-box; }

/* ---------- small screens: phones, sideways or upright ---------- */
body.compact .g-top {
  height: auto; min-height: 40px; gap: 6px; padding: calc(4px + env(safe-area-inset-top, 0px)) calc(8px + env(safe-area-inset-right, 0px)) 4px calc(8px + env(safe-area-inset-left, 0px));
  flex-wrap: wrap;
}
body.compact .g-plate { height: 30px; padding: 0 8px; font-size: 14px; gap: 5px; }
body.compact .g-brand, body.compact .g-goal, body.compact .g-date { display: none; }
body.compact .g-spacer { display: none; }
body.compact .g-hints {
  bottom: calc(6px + env(safe-area-inset-bottom, 0px)); gap: 4px; padding: 4px 6px; font-size: 14px;
  max-width: calc(100vw - 16px); flex-wrap: wrap; justify-content: center; white-space: normal;
}
body.compact .g-hint { min-height: 40px; padding: 4px 10px; background: #383f47; }
body.compact .g-toasts { top: 52px; }
body.compact .g-toast { font-size: 13px; }

body.compact .g-inspect {
  left: 8px; right: 8px; width: auto; top: auto; bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  height: min(62vh, 520px); max-height: calc(100dvh - 120px);
}
body.compact .g-inspect-head { padding: 8px 12px 6px; }
body.compact .g-inspect-head h2 { font-size: 15px; }
body.compact .g-phone { margin: 6px; border-width: 4px; }
body.compact .g-item-body canvas { max-height: 30vh; width: auto !important; }

body.compact .g-build { left: 6px; right: 6px; bottom: calc(56px + env(safe-area-inset-bottom, 0px)); padding: 8px; }
body.compact .g-build-head { flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
body.compact .g-build-head .muted { display: none; }
body.compact .g-card { width: 128px; }
body.compact .g-card .blurb { display: none; }
body.compact .g-tab { padding: 6px 12px; min-height: 36px; }

body.compact .g-manage { width: calc(100vw - 12px); height: calc(100dvh - 60px); top: auto; bottom: 6px; transform: translateX(-50%); }
body.compact .g-manage-head { flex-wrap: wrap; padding: 8px 10px; gap: 6px; }
body.compact .g-manage-body { padding: 10px; overflow-x: auto; }
body.compact .g-grid2 { grid-template-columns: 1fr; }
body.compact .g-labstats { grid-template-columns: repeat(2, 1fr); }
body.compact .g-big { font-size: 20px; }
body.compact table.g-table { font-size: 13px; }

body.compact .g-title-card { padding: 16px; margin: auto; }
body.compact .g-title-card .wordmark { font-size: 20px; }
body.compact .g-title-card p { font-size: 15px; }
body.compact .g-menu { margin-top: 10px; gap: 8px; }
body.compact .g-menu .g-btn { padding: 10px; }
@media (max-height: 460px) { body.compact .g-title-card p { display: none; } }

/* Upright phones: the gym sits in the middle; a tip suggests turning sideways. */
body.portrait.compact .g-inspect { height: 58vh; }
/* Sideways phones: the member's phone opens as a side panel, so the gym stays in view. */
body.compact:not(.portrait) .g-inspect {
  left: auto; right: calc(8px + env(safe-area-inset-right, 0px)); width: min(360px, 50vw);
  top: 48px; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); height: auto; max-height: none;
}
body.compact .g-inspect-head .status, body.compact .g-inspect-head .muted { font-size: 13px; }
body.compact .g-inspect-head .thought { margin-top: 2px; font-size: 14px; }
body.portrait.compact .g-toasts { top: 96px; }

/* ---------- chapters, research, thoughts, overlays, events ---------- */
.g-event { background: linear-gradient(180deg, #d6f2c8, #8fc77f 60%, #b8e6a4); color: #1f2a1c; max-width: 260px; overflow: hidden; }
.g-event span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.compact .g-event span:last-child { display: none; }
.g-legend {
  position: absolute; left: 12px; bottom: 64px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; max-width: calc(100vw - 24px);
  padding: 8px 12px; border-radius: 8px; background: rgba(34,39,45,.9); border: 1px solid #4b545d; font-size: 14px;
}
.g-legend b { color: #b8e6a4; font: 13px var(--hud); }
.g-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }
body.compact .g-legend { bottom: calc(60px + env(safe-area-inset-bottom, 0px)); left: 8px; font-size: 12px; }
.g-card.locked { opacity: .62; }
.g-card .cost.lock { display: inline-flex; gap: 4px; align-items: center; color: #a9b3ad; font: 600 12px var(--body); }
.g-goal-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.g-goal-list li { display: flex; gap: 6px; align-items: center; }
.g-goal-list li.done { color: #8fd5a3; text-decoration: line-through; }
.g-techs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 14px; }
.g-tech {
  display: grid; gap: 6px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 2px solid #4b545d;
  background: #343b42; color: #eef1ee; cursor: pointer; font: inherit;
}
.g-tech .blurb { font-size: 13px; color: #a9b3ad; line-height: 1.35; }
.g-tech.done { border-color: #5f9a52; }
.g-tech.current { border-color: #b8e6a4; box-shadow: 0 0 0 2px rgba(184,230,164,.25); }
.g-tech.locked { opacity: .55; cursor: default; }
.g-tech:disabled { color: #eef1ee; }
.g-thought { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; }
.g-thought > span:first-child { flex: 0 0 46%; }
.g-sound { justify-content: center; }
.g-sound .g-btn { flex: 1; }
.g-chapter { display: grid; gap: 2px; text-align: left; }
.g-chapter span { font-weight: 400; font-size: 14px; opacity: .85; }
.g-chapter:disabled { opacity: .45; cursor: default; }
body.compact .g-techs { grid-template-columns: 1fr; }
body.compact .g-thought > span:first-child { flex-basis: 50%; }

.g-gametitle { font: 26px/1.15 var(--hud); color: #b8e6a4; margin: 14px 0 4px; letter-spacing: 1px; text-shadow: 0 0 18px rgba(184,230,164,.35); }
body.compact .g-gametitle { font-size: 20px; margin-top: 10px; }

/* ---------- choosing a location ---------- */
.g-locations { width: min(1100px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; text-align: left; }
.g-locations h2, .g-locations .sub, .g-locations > p { text-align: center; }
.g-loc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin: 14px 0; }
.g-loc { display: grid; gap: 10px; align-content: start; padding: 12px; border-radius: 12px; background: #343b42; border: 1px solid #4b545d; }
.g-loc-pic { width: 100%; height: auto; max-height: 220px; object-fit: contain; image-rendering: pixelated; border-radius: 8px; background: #22272d; }
.g-loc-text { display: grid; gap: 6px; }
.g-loc-text b { font-size: 18px; }
.g-loc-meta { font: 13px var(--hud); color: #b8e6a4; }
.g-loc-text p { margin: 0; font-size: 14px; color: #cdd5d0; }
.g-loc-text ul { margin: 0; padding-left: 18px; font-size: 14px; color: #a9b3ad; }
body.compact .g-loc-list { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
body.compact .g-loc { padding: 8px; gap: 6px; }
body.compact .g-loc-pic { max-height: 110px; }
body.compact .g-locations > p { display: none; }
@media (max-height: 460px) { body.compact .g-loc-text ul, body.compact .g-loc-text p { display: none; } }

/* Account (the shared account screen, in the game's colours) */
.g-account { text-align: left; max-height: calc(100dvh - 32px); overflow-y: auto; }
.g-account h2 { text-align: center; margin-bottom: 10px; }
.g-account .acct { display: grid; gap: 12px; }
.g-account .acct-tabs { display: flex; gap: 6px; }
.g-account .acct-tab { flex: 1; padding: 10px; border-radius: 8px; border: 1px solid #4b545d; background: #343b42; color: #eef1ee; font-weight: 700; cursor: pointer; }
.g-account .acct-tab.on { background: #8fc77f; color: #1f2a1c; border-color: #8fc77f; }
.g-account .acct-body { display: grid; gap: 10px; }
.g-account .acct-body h4 { margin: 8px 0 0; color: #b8e6a4; }
.g-account .acct-field { display: grid; gap: 4px; }
.g-account .acct-field label { font-weight: 700; font-size: 14px; }
.g-account input { font: inherit; padding: 10px 12px; border-radius: 8px; border: 1px solid #4b545d; background: #22272d; color: #eef1ee; user-select: text; -webkit-user-select: text; }
.g-account .acct-hint { font-size: 13px; color: #a9b3ad; margin: 0; }
.g-account .acct-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.g-account .acct-end { justify-content: flex-end; }
.g-account .acct-btn { padding: 10px 16px; border-radius: 8px; border: 0; font-weight: 700; color: #1f2a1c; background: linear-gradient(180deg, #b8e6a4, #8fc77f); cursor: pointer; }
.g-account .acct-btn.ghost { background: none; border: 1px solid #6f7a80; color: #eef1ee; }
.g-account .acct-link { background: none; border: 0; color: #a9b3ad; text-decoration: underline; cursor: pointer; }
.g-account .acct-msg { margin: 0; padding: 10px 12px; border-radius: 8px; font-size: 14px; background: #343b42; }
.g-account .acct-msg.error { border-left: 4px solid #ef7a66; }
.g-account .acct-msg.good { border-left: 4px solid #8fd5a3; }
.g-account .acct-msg.info { border-left: 4px solid #8fc77f; }

/* Marketing */
.ad-tier { margin: 18px 0 0; font: 15px var(--hud); color: #b8e6a4; letter-spacing: 1px; }
.g-tech.ad .ad-terms { font-size: 13px; color: #eef1ee; }
.g-tech.ad .ad-aud { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: #262b31; color: #b8e6a4; border: 1px solid #4b545d; white-space: nowrap; }
.g-tech.ad .ad-go { font-weight: 700; color: #b8e6a4; }
.g-tech.ad .ad-on { font-weight: 700; color: #f6c75a; }
.ad-list { display: grid; gap: 6px; }
.ad-list .g-row { gap: 8px; }

/* Ad designs */
.ad-scene, .ad-thumb, .ad-grid { image-rendering: pixelated; display: block; }
.ad-design { display: grid; gap: 8px; align-content: start; }
.ad-design .ad-scene { max-width: 100%; border-radius: 6px; }
.g-design { width: min(900px, calc(100vw - 32px)); text-align: left; }
.g-design h3 { margin: 14px 0 6px; font-size: 15px; }
.ad-media { margin: 6px 0 4px; flex-wrap: wrap; }
.ad-designer { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.ad-preview { background: #1b1f23; border-radius: 8px; padding: 10px; display: grid; place-items: center; overflow: hidden; }
.ad-preview .ad-scene { max-width: 100%; }
.ad-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.ad-preset { display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border-radius: 8px; border: 1px solid #4b545d; background: #2e343a; color: #eef1ee; font: 12px var(--body); cursor: pointer; }
.ad-preset:hover, .ad-preset.navfocus { border-color: #b8e6a4; }
.ad-thumb { width: 48px; height: 48px; }
.ad-text { flex: 1; font: 16px var(--hud); text-transform: uppercase; color: #eef1ee; background: #262b31; border: 1px solid #4b545d; border-radius: 8px; padding: 10px 12px; min-width: 0; }
.ad-hint { font-size: 12px; margin: 6px 0 0; }
.ad-grid { width: 240px; height: 240px; border-radius: 6px; cursor: crosshair; touch-action: none; border: 1px solid #4b545d; }
.ad-swatches { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; max-width: 280px; }
.ad-swatch { width: 26px; height: 26px; border-radius: 6px; border: 2px solid #262b31; cursor: pointer; padding: 0; color: #eef1ee; background: #3b4247; font-size: 13px; }
.ad-swatch.on { border-color: #ffffff; box-shadow: 0 0 0 2px #8fc77f; }
.ad-tools { margin-top: 10px; flex-wrap: wrap; gap: 8px; }
body.compact .ad-designer { grid-template-columns: 1fr; }
.ad-kit { display: grid; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid #4b545d; }
.ad-kit .g-btn { justify-self: start; }

/* Feedback */
.g-feedback { width: min(620px, calc(100vw - 32px)); text-align: left; }
.g-feedback h2 { margin: 0; }
.fb-label { margin: 14px 0 6px; font: 12px var(--hud); letter-spacing: 1px; color: #a9b3ad; text-transform: uppercase; }
.fb-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-chip { font: 14px var(--body); color: #eef1ee; background: #2e343a; border: 1px solid #4b545d; border-radius: 99px; padding: 7px 12px; cursor: pointer; }
.fb-chip.on { background: #8fc77f; color: #14200f; border-color: #8fc77f; font-weight: 700; }
.fb-text { width: 100%; font: 15px/1.4 var(--body); color: #eef1ee; background: #262b31; border: 1px solid #4b545d; border-radius: 10px; padding: 10px 12px; resize: vertical; }
.fb-err { color: #ef7a66; min-height: 1em; margin: 6px 0 0; }
.g-fbbtn { cursor: pointer; border: 0; font-size: 16px; }


/* The plan (game/plan.js): blueprints, the plan list and its buttons. */
.g-btn.on { background: #3d5a40; border-color: #8fc77f; color: #e3f6d9; }
.g-planbtn { cursor: pointer; color: #b8d8ff; font: inherit; border: 1px solid #5a7fa8; }
.g-plan-actions { flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.g-plan-list { display: grid; gap: 6px; }
.g-plan-row { display: grid; grid-template-columns: 72px 1fr auto auto auto auto auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; background: #2a3036; border: 1px solid #3a434b; }
.g-plan-row.ok { border-color: #5f9a52; }
.g-plan-pic { display: grid; place-items: center; height: 48px; }
.g-plan-name { display: grid; min-width: 0; }
.g-plan-name .muted { font-size: 13px; }
.g-plan-cost { white-space: nowrap; }
.g-plan-row .g-btn { padding: 6px 10px; }
@media (max-width: 720px) {
  .g-plan-row { display: flex; flex-wrap: wrap; }
  .g-plan-name { flex: 1; }
}

/* The keys card, bottom left: every shortcut for what you're doing (keyboard and mouse only). */
.g-keys { position: absolute; left: 12px; bottom: 64px; width: 250px; border-radius: 10px; background: rgba(34,39,45,.9); border: 1px solid #4b545d; font-size: 13px; overflow: hidden; }
.g-keys.shut { width: auto; }
.g-keys-head { display: flex; justify-content: space-between; gap: 10px; width: 100%; padding: 7px 10px; border: 0; background: #2b3137; color: #b8e6a4; font: 11px var(--hud); cursor: pointer; }
.g-keys-list { display: grid; padding: 4px; max-height: min(52vh, 420px); overflow-y: auto; }
.g-key-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 6px; padding: 3px 4px; border: 0; border-radius: 6px; background: none; color: #eef1ee; font: inherit; text-align: left; }
button.g-key-row { cursor: pointer; }
button.g-key-row:hover { background: #343b42; }
.g-key-row .keycap { justify-self: start; margin: 0; font-size: 11px; white-space: nowrap; }
body.touch .g-keys, body.compact .g-keys { display: none; }
.g-btn:disabled { opacity: .45; cursor: default; filter: grayscale(.6); }
/* Staff: the team, and the training tree. */
.g-swatches { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.g-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #22272d; box-shadow: 0 0 0 1px #6f7a80; cursor: pointer; }
.g-swatch.on { box-shadow: 0 0 0 3px #eef1ee; }
.g-look-preview { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; padding: 10px; background: #cbc6bd; border-radius: 8px; }
.g-look-preview canvas, .g-look-staff canvas { image-rendering: pixelated; }
.g-look-staff { display: flex; gap: 18px; margin: 8px 0 12px; }
.g-look-staff > div { display: grid; justify-items: center; gap: 4px; font: 11px var(--hud); }
.g-credit { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #e05a4a, #f2d24e, #8fc77f); position: relative; margin: 6px 0; }
.g-credit i { position: absolute; top: -3px; width: 3px; height: 14px; background: #eef1ee; margin-left: -1px; display: block; }
.g-loan { display: grid; gap: 4px; padding: 8px 0; border-top: 1px solid #3a434b; font-size: 14px; }
.g-loan .warn, .g-lender .warn { color: #f2a07a; }
.g-lenders { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.g-lender { display: grid; gap: 8px; padding: 12px; border-radius: 10px; background: #2a3036; border: 1px solid #3a434b; align-content: start; }
.g-lender.closed { opacity: .6; }
.g-lender-head { display: grid; gap: 2px; }
.g-twist { margin: 0; font-size: 13px; color: #d3dcd6; }
.g-loan-amt { min-width: 80px; text-align: center; font-size: 18px; }
.g-loan-quote { font-size: 13px; color: #b8e6a4; }
.g-expand, .g-franchise { display: grid; gap: 4px; padding: 8px 0; border-top: 1px solid #3a434b; font-size: 14px; }
.g-merch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 12px; }
.g-merch-card { display: grid; justify-items: center; gap: 6px; text-align: center; }
.g-merch-card canvas, .g-merch-preview canvas { image-rendering: pixelated; border-radius: 8px; }
.g-merch-card .muted { font-size: 12px; }
.g-merch-price { min-width: 54px; font-size: 18px; }
.g-merch-preview { display: grid; place-items: center; margin-bottom: 8px; }
.g-lib { margin-top: 10px; }
.g-lib-item { position: relative; }
.g-lib-x { position: absolute; top: -4px; right: -4px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #6f7a80; background: #22272d; color: #eef1ee; font-size: 12px; line-height: 1; cursor: pointer; }
.g-arttools { margin: 8px 0; }
/* Notifications: a button with a count; no pop-ups. A quiet status line in the bottom bar for what you just did. */
.g-inboxbtn { cursor: pointer; border: 0; font: 700 14px var(--body); color: #252b31; gap: 6px; position: relative; }
.g-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #e05a4a; color: #fff; font-size: 11px; display: inline-grid; place-items: center; }
.g-inbox { width: min(640px, calc(100vw - 24px)); }
.g-inbox-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.g-inbox-list li { display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: baseline; padding: 7px 4px; border-bottom: 1px solid #3a434b; font-size: 14px; }
.g-inbox-list li i { width: 8px; height: 8px; border-radius: 50%; display: block; transform: translateY(-1px); }
.g-inbox-list li .muted { font-size: 12px; white-space: nowrap; }
.g-status { font-size: 13px; color: #dfe4e0; padding: 0 8px; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 0 1 auto; }
.g-status.bad { color: #f2a07a; } .g-status.good { color: #b8e6a4; }
body.compact .g-status { position: fixed; left: 8px; right: 8px; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); max-width: none; text-align: center; background: rgba(34,39,45,.85); border-radius: 6px; padding: 3px 8px; pointer-events: none; }
.g-paint-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.g-paint.locked, .g-box.locked { opacity: .8; border-style: dashed; }
.g-pattern-list { display: grid; gap: 6px; margin: 6px 0 10px; }
.g-pattern-item { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; }
.g-pattern-preview { display: grid; place-items: center; margin-bottom: 8px; }
.g-pattern-preview canvas { border-radius: 6px; }
.g-card-new { place-items: center; text-align: center; border-style: dashed; }
.g-card-plus { font: 40px var(--hud); color: #8fc77f; height: 96px; display: grid; place-items: center; }
.g-jobdot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.g-team { display: grid; gap: 4px; margin-top: 8px; }
.g-teammate { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; font-size: 13px; padding: 4px 6px; background: #2a3036; border-radius: 6px; }
.g-train-title { margin: 18px 0 4px; }
.g-train { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.g-train-col { display: grid; gap: 8px; align-content: start; }
.g-train-col h4 { margin: 0; font: 13px var(--hud); }
.g-course { display: grid; gap: 4px; padding: 8px 10px; border-radius: 8px; background: #2a3036; border: 1px solid #3a434b; font-size: 13px; }
.g-course.done { border-color: #5f9a52; background: #2a3a2c; }
.g-course.now { border-color: #f2c14e; }
.g-course.locked { opacity: .55; }
@media (max-width: 760px) { .g-train { grid-template-columns: 1fr; } }
/* Sound panel designs, in the inspect panel. */
.g-panelart { display: grid; gap: 6px; }
.g-panelart-row { display: flex; flex-wrap: wrap; gap: 6px; }
.g-panelart-pick { display: grid; justify-items: center; gap: 2px; padding: 4px; border-radius: 8px; border: 2px solid transparent; background: #2a3036; color: #eef1ee; font: inherit; font-size: 11px; cursor: pointer; }
.g-panelart-pick canvas { image-rendering: pixelated; }
.g-panelart-pick.on { border-color: #8fc77f; }
.g-planbtn { color: #1f3d66; font-weight: 700; }
/* Time controls in the top bar: pause / play, slower, faster. */
.g-speed { gap: 4px; padding: 3px 6px; }
.g-timebtn { min-width: 30px; height: 28px; display: inline-grid; place-items: center; border-radius: 6px; border: 1px solid #6f7a80; background: #f1f3f4; color: #252b31; font: 700 15px var(--body); cursor: pointer; padding: 0 6px; }
.g-timebtn:hover:not(:disabled) { background: #ffffff; border-color: #4f8a45; }
.g-timebtn:disabled { opacity: .4; cursor: default; }
.g-playpause { min-width: 36px; font-size: 13px; letter-spacing: -1px; }
.g-playpause.paused { background: #8fc77f; border-color: #4f8a45; color: #14200f; font-size: 15px; letter-spacing: 0; }
.g-speedval { min-width: 54px; text-align: center; }
body.touch .g-timebtn { min-width: 38px; height: 36px; }
/* Mid-size windows: the top bar drops the extras so the time controls always fit; Manage's tabs wrap. */
@media (max-width: 1360px) { .g-brand { display: none; } .g-event span:last-child { display: none; } }
@media (max-width: 1180px) { .g-date { display: none; } .g-goal { max-width: 220px; } }
@media (max-width: 1020px) { .g-goal { display: none; } }
.g-manage-head { flex-wrap: wrap; }
.g-manage-head .g-tabs { flex-wrap: wrap; flex: 1 1 400px; }
.g-manage-head .g-tab { padding: 5px 11px; font-size: 14px; }

/* ---------- UI pass (2026-10-07): clearer, brighter, better organised ---------- */
.g-panel { background: #262c32; border: 1px solid #6f7a80; box-shadow: 0 12px 44px rgba(0,0,0,.6); }
.g-panel .muted, .muted { color: #bcc5bf; }
.g-box { background: #303740; border-color: #56606a; }
.g-box h3 { font-size: 17px; }

/* Manage: a grouped sidebar. */
.g-manage { width: min(1120px, calc(100vw - 32px)); height: min(700px, calc(100vh - 110px)); }
.g-manage-head { flex-wrap: nowrap; }
.g-manage-title { font-size: 18px; font-weight: 700; }
.g-manage-keys { display: inline-flex; align-items: center; gap: 4px; }
.g-manage-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 190px 1fr; }
.g-manage-nav { overflow-y: auto; padding: 10px 8px; border-right: 1px solid #4b545d; background: #22272d; display: grid; align-content: start; gap: 10px; }
.g-nav-group { display: grid; gap: 2px; }
.g-nav-head { font: 11px var(--hud); color: #8fc77f; letter-spacing: .06em; padding: 2px 8px 4px; text-transform: uppercase; }
.g-nav { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: #dfe5e1; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; }
.g-nav:hover { background: #303740; }
.g-nav.on { background: #b8e6a4; color: #1e2a19; }
.g-nav .px-icon { flex: none; }
.g-bank .g-big { font-size: 30px; }
.g-net { font-weight: 700; margin: 2px 0 8px; } .g-net.pos { color: #8fd5a3; } .g-net.neg { color: #f2a07a; }
.g-progress { height: 8px; border-radius: 4px; background: #22272d; overflow: hidden; margin: 2px 0 4px; }
.g-progress i { display: block; height: 100%; background: #8fc77f; }
body.compact .g-manage-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
body.compact .g-manage-nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid #4b545d; padding: 6px; }
body.compact .g-nav-group { display: flex; } body.compact .g-nav-head { display: none; }
body.compact .g-nav { white-space: nowrap; padding: 6px 10px; }

/* Build: header, then one row of category tabs, then a tip. */
.g-build-head { margin-bottom: 8px; }
.g-build.planning { border-color: #7fb4f0; box-shadow: 0 0 0 2px rgba(127,180,240,.35), 0 12px 44px rgba(0,0,0,.6); }
.g-build.planning h2 { color: #b8d8ff; }
.g-build-tabs { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.g-build-tabs .g-tabs { overflow-x: auto; flex: 1; padding: 2px; }
.g-tab { flex: none; white-space: nowrap; font-size: 15px; font-weight: 600; padding: 7px 14px; }
.g-build-tip { font-size: 14px; color: #bcc5bf; margin: 2px 2px 10px; }
.g-card { width: 160px; } .g-card b { font-size: 15px; } .g-card .blurb { font-size: 13px; color: #c3cbc6; }

/* The bottom bar: real buttons. */
.g-hints { gap: 8px; padding: 6px 8px; background: rgba(34,39,45,.94); border-color: #6f7a80; }
.g-hint { background: #343b42; border: 1px solid #5d666c; padding: 4px 10px 4px 6px; font-weight: 600; }
.g-hint:hover { background: #3d454d; border-color: #8fc77f; }
.g-hint-text { font-size: 14px; padding: 0 6px; }

/* The keys card: folded to a small button until opened; two short columns when open. */
.g-keys { width: auto; max-width: min(520px, calc(100vw - 24px)); }
.g-keys-head { padding: 7px 12px; }
.g-keys-body { display: grid; gap: 6px; padding: 6px 8px 8px; max-height: min(46vh, 360px); overflow-y: auto; }
.g-keys-sub { font: 10px var(--hud); color: #8fc77f; letter-spacing: .06em; text-transform: uppercase; padding: 2px 4px; }
.g-keys-list { grid-template-columns: 1fr 1fr; column-gap: 10px; padding: 0; max-height: none; overflow: visible; }
.g-key-row { grid-template-columns: auto 1fr; }
.g-key-row .keycap { min-width: 34px; }
.g-manage-main { grid-template-columns: 200px 1fr; }
.g-manage-nav { gap: 6px; padding: 8px 8px; }
.g-nav { padding: 6px 10px; font-size: 14px; }
.g-nav-head { padding: 2px 8px 2px; }
.g-fbbtn { font: 700 14px var(--body); color: #252b31; gap: 6px; }
@media (max-width: 1180px) { .g-fblabel { display: none; } }
.g-undobtn { font-weight: 700; flex-shrink: 0; white-space: nowrap; gap: 4px; }
.g-undoicon { font-size: 19px; line-height: 1; }
@media (max-width: 1500px) { .g-fblabel { display: none; } }
.g-undobtn:disabled { opacity: .45; cursor: default; }
.g-undobtn:not(:disabled) { border-color: #8fc77f; }

/* ---------- Phones and small windows (2026-10-07 audit) ---------- */
/* The bottom bar: one row that scrolls sideways, never a pile. */
body.compact .g-hints {
  left: 8px; right: 8px; transform: none; max-width: none; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
  scrollbar-width: none;
}
body.compact .g-hints::-webkit-scrollbar { display: none; }
body.compact .g-hint { flex: 1 0 auto; justify-content: center; white-space: nowrap; }
body.compact .g-hint-text { display: none; }
/* Info cards: a sheet above the bottom bar (the desktop's inline position is overridden), actions first. */
body.compact .g-inspect { bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important; }
body.portrait.compact .g-inspect { top: auto; height: auto; max-height: min(58vh, calc(100dvh - 190px)); overflow-y: auto; }
body.compact .g-item-body { display: flex; flex-direction: column; }
body.compact .g-item-body > .g-actions { order: -1; position: sticky; top: 0; z-index: 1; background: #262c32; padding: 4px 0 8px; }
body.compact .g-item-body canvas { max-height: 22vh; }
/* Keyboard-only bits stay hidden on touch; bigger targets for fingers. */
body.touch .g-manage-keys { display: none; }
body.touch .g-swatch { width: 36px; height: 36px; }
body.touch .g-nav { min-height: 40px; }
body.touch .g-btn { min-height: 40px; }
.g-tabs, .g-manage-nav { scrollbar-width: thin; }
/* Phones: one tidy top bar. Feedback lives in the menu; labels shorten. */
body.compact .g-fbbtn { display: none !important; }
body.compact .g-wide-only { display: none; }
body.compact .g-inboxbtn { padding: 0 8px; }
body.portrait.compact .g-top { gap: 6px; padding: 4px 6px; }
body.portrait.compact .g-speed b { display: none; }
.g-cards, .g-build-tabs .g-tabs, .g-manage-nav { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scroll-behavior: auto; }

/* Netlify's floating "Powered by Netlify" badge covers our buttons on phones. (It can also be turned off in the
   Netlify dashboard: Project configuration > General > Powered by Netlify badge.) */
#nl-badge-frame { display: none !important; }

/* ---------- UI pass 2026-10-09: button tones, icons, the details card, condensed lists ---------- */
.g-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-ic { display: inline-flex; line-height: 0; }
.btn-ic svg { image-rendering: pixelated; }
/* Tones. A plain button is tinted; the menu's main action (primary-btn) is filled. */
.g-btn.tone-spend { border-color: #c99a2e; color: #ffe08a; background: linear-gradient(180deg, #4a4330, #393325); }
.g-btn.tone-spend.primary-btn { background: linear-gradient(180deg, #ffd978, #e8b440); color: #2c2414; border-color: #a77a16; }
.g-btn.tone-danger { border-color: #c0412f; color: #ffb3a6; background: linear-gradient(180deg, #4a3331, #3a2827); }
.g-btn.tone-danger.primary-btn { background: linear-gradient(180deg, #f08a7a, #d4553a); color: #2c1714; }
.g-btn.tone-make { border-color: #4f8fc9; color: #bfe0ff; background: linear-gradient(180deg, #2f4252, #263644); }
.g-btn.tone-make.primary-btn { background: linear-gradient(180deg, #9fd0ff, #6fb0e8); color: #14263a; border-color: #3a6fb0; }
.g-btn.tone-ok { border-color: #4f7f46; color: #d6f2c8; background: linear-gradient(180deg, #34493a, #2b3c2f); }
.g-btn.tone-ok.primary-btn { background: linear-gradient(180deg, #b8e6a4, #8fc77f); color: #252b31; }
.g-btn.tone-nav { color: #dfe4e6; }
.g-btn[class*="tone-"]:hover:not(:disabled) { filter: brightness(1.12); }
.g-btn.primary-btn .btn-ic svg rect[fill="#ffffff"] { fill: #2c2414; }

/* The ⓘ chip: the long explanation lives in the details card. */
.g-info { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-left: 6px; border-radius: 50%; border: 1px solid #6f7a80; background: #262b31; color: #b8e6a4; font: italic 700 12px Georgia, serif; cursor: help; vertical-align: middle; padding: 0; }
.g-info:hover { border-color: #b8e6a4; }
body.touch .g-info { width: 24px; height: 24px; }

/* The details card. */
.g-peek { position: fixed; z-index: 1000; max-width: 300px; padding: 10px 12px; border-radius: 10px; background: rgba(28, 32, 37, .96); border: 1px solid #6f7a80; box-shadow: 0 8px 24px rgba(0,0,0,.45); color: #eef1ee; pointer-events: none; opacity: 0; transform: translateY(4px); transition: opacity .14s ease, transform .14s ease; font-size: 13px; line-height: 1.4; }
.g-peek.on { opacity: 1; transform: none; }
.g-peek-head { display: flex; gap: 6px; align-items: center; font-size: 14px; }
.g-peek-sub { margin-top: 3px; font-family: var(--hud); font-size: 12px; color: #b8e6a4; }
.g-peek-body { margin-top: 6px; color: #c9ced2; }
.g-peek.placing { left: 16px; top: 56px; max-width: 280px; }
.g-tech.ad .ad-go { color: #ffd978; }
body.touch .g-peek.placing, body.compact .g-peek.placing { top: 52px; left: 8px; max-width: 240px; font-size: 12px; }

/* Condensed menus: the descriptions moved into the details card. */
.g-card { min-height: 0; }
.g-card .blurb { display: none; }
.g-techs.compact { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.g-techs.compact .g-tech { padding: 8px 10px; gap: 4px; min-height: 0; }
.g-done-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.g-done-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; border: 1px solid #5f9a52; background: #2b3c2f; color: #d6f2c8; font-size: 12px; cursor: default; }
.g-course .g-course-text { display: none; }
.g-lender .g-lender-blurb { display: none; }

/* ---------- Issues, the basics checklist, and the inbox's levels (2026-10-14) ---------- */
.g-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.g-check li { display: flex; align-items: center; gap: 8px; min-height: 30px; }
.g-check li .g-btn { margin-left: auto; padding: 4px 10px; }
.g-check-mark { width: 18px; text-align: center; font-weight: 700; }
.g-check li.ok .g-check-mark { color: #8fc77f; }
.g-check li.miss { color: #ffd0c8; } .g-check li.miss .g-check-mark { color: #ef7a66; }
.g-check li.later { opacity: .55; }
.g-issue-list { display: grid; gap: 6px; }
.g-issue { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; border: 1px solid #4b545d; background: #2b3137; }
.g-issue.sev-alert { border-color: #a8473a; background: #35292a; }
.g-issue.sev-warn { border-color: #8a7433; }
.g-sev { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.g-issue-text { display: grid; gap: 2px; flex: 1; min-width: 0; }
.g-issue-text .muted { font-size: 12px; }
.g-issue-n { font-family: var(--hud); font-size: 12px; color: #c9ced2; }
.g-issuesbtn { font-weight: 700; color: #ffe08a; border-color: #c99a2e !important; cursor: pointer; }
.g-issuesbtn.alert { color: #ffd0c8; border-color: #c0412f !important; background: linear-gradient(180deg, #4a3331, #3a2827) !important; }
.g-inbox-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 16px; border-bottom: 1px solid #4b545d; }
.g-chip { padding: 4px 10px; border-radius: 99px; border: 1px solid #6f7a80; background: #262b31; color: #dfe4e6; font-size: 12px; cursor: pointer; }
.g-chip.on { background: #4a3331; border-color: #c0412f; color: #ffd0c8; }
.g-chip.muted { opacity: .55; text-decoration: line-through; }
.g-inbox-list li .g-btn { padding: 3px 9px; font-size: 12px; }
.g-inbox-list li.tier-alert span:first-of-type { color: #ffd0c8; }
.g-stack { color: #f6c75a; }
.g-spotbar { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); padding: 6px 12px; border-radius: 8px; background: rgba(28,32,37,.94); border: 1px solid #f6c75a; color: #ffe08a; font-weight: 700; pointer-events: none; z-index: 5; }
.g-peek-why { margin-top: 5px; color: #ffb3a6; font-weight: 700; }
.g-inbox-list li { display: flex; align-items: center; gap: 8px; }
.g-inbox-list li > span:first-of-type { flex: 1; min-width: 0; }
.g-inbox-list li > i { flex: none; }
.g-peek.placing.right { left: auto; right: 16px; }
body.touch .g-peek.placing.right, body.compact .g-peek.placing.right { left: auto; right: 8px; }

/* Controls list (2026-10-15) */
.g-controls { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 80px); overflow: auto; }
.g-controls-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; margin-top: 8px; }
.g-control { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; border: 1px solid #4b545d; background: #2b3137; color: #eef1ee; text-align: left; font: inherit; cursor: pointer; }
.g-control.still { cursor: default; background: transparent; }
.g-control:hover:not(.still), .g-control.navfocus { border-color: #b8e6a4; }
.keycap.wide { min-width: 0; padding: 0 6px; white-space: nowrap; }
.keycap.none { opacity: .35; }

/* Earlier saves (2026-10-15) */
.g-saves { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 80px); overflow: auto; }
.g-save-list { display: grid; gap: 6px; margin-top: 8px; }
.g-save-row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid #4b545d; border-radius: 8px; background: #2b3137; }
.g-save-row > div { display: grid; gap: 2px; }
@media (max-width: 560px) { .g-save-row { grid-template-columns: 1fr auto; } .g-save-row > span { grid-column: 1; } }

/* Colour Light Bar picker (2026-10-15) */
.g-lightpick { display: grid; gap: 4px; margin: 6px 0; }
.g-swatch-any { position: relative; display: inline-grid; place-items: center; background: conic-gradient(red, yellow, lime, cyan, blue, magenta, red) !important; color: #fff; font-weight: 700; text-shadow: 0 1px 2px #000; cursor: pointer; overflow: hidden; }
.g-swatch-any .g-colorpick { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.g-savenote { margin: 10px 0 0; font-size: 12px; text-align: center; }

/* Build menu: search and Recent (both layouts) */
.g-build-find { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.g-build-search { flex: 0 1 240px; min-width: 140px; height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid #4b545d; background: #1e2226; color: #eef1ee; font: 14px var(--body); }
.g-build-search:focus { outline: none; border-color: #8fc77f; }
.g-recent { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

/* =====================================================================================================
   PHONE LAYOUT (body.lay-phone, 2026-10-17): thumb bar, slim top, bottom sheets, one thing at a time.
   ===================================================================================================== */
body.lay-phone .g-top.p-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 6px; padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 8px; background: #2e343a; border-bottom: 1px solid #4b545d; z-index: 6; }
.p-top-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.p-top-name { font: 12px var(--hud); color: #8fc77f; letter-spacing: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-top-nums { font-size: 13px; color: #dfe4e6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-top-btn { height: 40px; min-width: 44px; padding: 0 8px; border-radius: 12px; border: 1px solid #6f7a80; background: #262b31; color: #eef1ee; font: 700 14px var(--body); }
.p-top-btn.p-issues { border-color: #c99a2e; color: #ffe08a; background: #3a3325; }
.p-top-btn.p-issues.alert { border-color: #c0412f; color: #ffd0c8; background: #4a3331; }

.p-thumb { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end; gap: 2px;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px)); background: #22272d; border-top: 1px solid #4b545d; }
.p-tab { height: 56px; border: 0; border-radius: 12px; background: none; color: #c9ced2; font: 700 11px var(--body); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; }
.p-tab:active { background: #2e343a; }
.p-tab.alert { color: #ffd0c8; }
.p-glyph { font-size: 19px; line-height: 1; }
.p-build { height: 70px; margin-top: -22px; border: 3px solid #22272d; border-radius: 35px; background: linear-gradient(180deg, #b8e6a4, #8fc77f); color: #14200f; font: 700 13px var(--body);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.p-build .p-glyph { font-size: 24px; }
body.lay-phone .p-status { position: absolute; left: 10px; right: 10px; bottom: calc(156px + env(safe-area-inset-bottom, 0px)); padding: 8px 12px; border-radius: 12px; background: rgba(28,32,37,.94); border: 1px solid #4b545d; text-align: center; font-size: 13px; z-index: 6; pointer-events: none; }

/* Sheets: More, details, build, Manage */
.p-sheet-bg { position: absolute; inset: 0; z-index: 8; background: rgba(10,12,14,.45); display: flex; align-items: flex-end; }
.p-sheet { background: #2e343a; border: 1px solid #4b545d; border-bottom: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,.45); }
.p-more { width: 100%; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; gap: 10px; }
.p-more h3 { margin: 0; font: 15px var(--hud); color: #8fc77f; }
.p-handle { display: block; width: 44px; height: 5px; border-radius: 3px; background: #6f7a80; margin: 0 auto; }
.p-more-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.p-more-item { min-height: 60px; border-radius: 14px; border: 1px solid #4b545d; background: #262b31; color: #eef1ee; text-align: left; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; font: inherit; }
.p-more-item b { font-size: 15px; } .p-more-item span { font-size: 12px; color: #a9b3ad; }
.p-close { height: 48px; border-radius: 14px; border: 1px solid #6f7a80; background: #262b31; color: #eef1ee; font: 700 15px var(--body); }

body.lay-phone .g-inspect.p-sheet { position: absolute !important; left: 0 !important; right: 0 !important; top: auto !important; width: auto !important; height: auto !important;
  bottom: calc(72px + env(safe-area-inset-bottom, 0px)) !important; max-height: 70dvh !important; overflow-y: auto; z-index: 7; border-radius: 18px 18px 0 0; }
body.lay-phone .g-inspect.p-sheet.peek { max-height: 190px !important; overflow: hidden; }
.p-handle-btn { position: sticky; top: 0; z-index: 2; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 0 6px; border: 0; background: #2e343a; color: #a9b3ad; font: 12px var(--body); }

body.lay-phone .g-build { left: 0 !important; right: 0 !important; bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important; padding: 10px 12px !important; border-radius: 18px 18px 0 0; max-height: 64dvh; display: flex; flex-direction: column; }
body.lay-phone .g-build .g-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; padding-bottom: 6px; }
body.lay-phone .g-build .g-card { width: auto !important; min-height: 128px; }
body.lay-phone .g-build-search { flex: 1 1 100%; height: 42px; font-size: 16px; }
body.lay-phone .g-build-head .g-btn { min-height: 40px; }

body.lay-phone .g-manage { left: 0 !important; right: 0 !important; width: auto !important; top: calc(70px + env(safe-area-inset-top, 0px)) !important; bottom: 0 !important; height: auto !important; transform: none !important; border-radius: 18px 18px 0 0; }
body.lay-phone .g-manage-main { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
body.lay-phone .g-manage-nav { display: flex; overflow-x: auto; border-right: 0; border-bottom: 1px solid #4b545d; padding: 6px; gap: 4px; }
body.lay-phone .g-nav-group { display: flex; gap: 4px; } body.lay-phone .g-nav-head { display: none; }
body.lay-phone .g-nav { white-space: nowrap; min-height: 44px; padding: 6px 12px; }
body.lay-phone .g-manage-body { padding: 12px; }
body.lay-phone .g-manage-body::after { content: 'Swipe left or right for the next page'; display: block; text-align: center; font-size: 12px; color: #6f7a80; margin: 18px 0 8px; }
body.lay-phone .g-grid2 { grid-template-columns: 1fr; }
body.lay-phone .g-keys { display: none; }

/* Turn / Place / Cancel beside the piece */
.p-place { position: absolute; z-index: 6; transform: translateX(-50%); display: flex; gap: 8px; }
.p-place-btn { width: 52px; height: 52px; border-radius: 26px; border: 1px solid #4f8fc9; background: #2f4252; color: #bfe0ff; font: 700 20px var(--body); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
.p-place-btn.ok { width: 62px; border-color: #a77a16; background: linear-gradient(180deg, #ffd978, #e8b440); color: #2c2414; }
.p-place-btn:last-child:not(.ok) { border-color: #6f7a80; background: #262b31; color: #eef1ee; }

/* =====================================================================================================
   COMPUTER LAYOUT (body.lay-desk.desk-docked, 2026-10-17): tool rail, docked panel, status bar, palette.
   ===================================================================================================== */
:root { --d-top: 46px; --d-rail: 78px; --d-dock: 340px; --d-status: 32px; }
.d-rail { position: absolute; left: 0; top: var(--d-top); bottom: var(--d-status); width: var(--d-rail); box-sizing: border-box; z-index: 5; display: flex; flex-direction: column; gap: 6px; padding: 10px 8px; background: #22272d; border-right: 1px solid #4b545d; }
.d-tool { height: 54px; border-radius: 10px; border: 1px solid #4b545d; background: #262b31; color: #eef1ee; font: 700 12px var(--body); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.d-tool:hover { border-color: #8fc77f; }
.d-tool.on { border-color: #8fc77f; background: #34493a; color: #d6f2c8; }
.d-tool-key { font-size: 11px; color: #a9b3ad; }
.d-rail-gap { flex: 1; }

.d-dock { position: absolute; right: 0; top: var(--d-top); bottom: var(--d-status); width: var(--d-dock); box-sizing: border-box; z-index: 5; display: flex; flex-direction: column; background: #2e343a; border-left: 1px solid #4b545d; }
.d-dock.collapsed { width: 34px; }
.d-dock-open { height: 100%; border: 0; background: #262b31; color: #a9b3ad; font: 700 12px var(--body); writing-mode: vertical-rl; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.d-dock-tabs { display: flex; gap: 4px; padding: 8px; border-bottom: 1px solid #4b545d; }
.d-dock-tab { padding: 7px 11px; border-radius: 8px; border: 1px solid transparent; background: #262b31; color: #dfe4e6; font: 700 13px var(--body); cursor: pointer; }
.d-dock-tab.on { background: #b8e6a4; color: #14200f; }
.d-dock-close { margin-left: auto; width: 30px; border-radius: 8px; border: 1px solid #4b545d; background: #262b31; color: #a9b3ad; cursor: pointer; }
.d-dock-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.d-dock-body .g-inspect { position: static !important; width: auto !important; height: auto !important; max-height: none !important; border: 0; box-shadow: none; background: none; overflow: visible; }
.d-summary h3 { margin: 0 0 8px; font: 15px var(--hud); color: #8fc77f; }
.d-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.d-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 10px; background: #262b31; }
.d-stats b.pos { color: #8fc77f; } .d-stats b.neg { color: #ef7a66; }
.d-issues, .d-news { display: flex; flex-direction: column; gap: 8px; }
.d-issue { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid #4b545d; background: #262b31; }
.d-issue > div { flex: 1; display: grid; gap: 2px; } .d-issue .muted { font-size: 12px; }
.d-issue.sev-alert { border-color: #a8473a; background: #35292a; } .d-issue.sev-warn { border-color: #8a7433; }
.d-news-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 6px 8px; border-radius: 8px; background: #262b31; font-size: 13px; }
.d-news-row .muted { grid-column: 1 / -1; font-size: 11px; }
.d-news-row.tier-alert > span:first-child { color: #ffd0c8; }

.d-status { position: absolute; left: 0; right: 0; bottom: 0; height: var(--d-status); z-index: 5; display: flex; align-items: center; gap: 16px; padding: 0 14px; background: #22272d; border-top: 1px solid #4b545d; font-size: 13px; color: #c9ced2; }
.d-status-last, .d-status-now { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-status-now.good { color: #b8e6a4; } .d-status-now.bad { color: #ffd0c8; }
.d-status-tips { color: #8a959a; white-space: nowrap; }
body.desk-docked .g-hints { bottom: calc(var(--d-status) + 8px); left: calc(var(--d-rail) + 12px); right: calc(var(--d-dock) + 12px); width: auto; transform: none; justify-content: center; }
body.desk-docked .g-legend { left: calc(var(--d-rail) + 12px); bottom: calc(var(--d-status) + 8px); }
body.desk-docked .g-peek.placing { left: calc(var(--d-rail) + 12px); }
body.desk-docked .g-peek.placing.right { left: auto; right: calc(var(--d-dock) + 12px); }

body.desk-docked .g-build.d-palette { left: var(--d-rail) !important; right: auto !important; top: var(--d-top) !important; bottom: var(--d-status) !important; width: 360px; max-height: none; border-radius: 0; display: flex; flex-direction: column; padding: 12px !important; box-sizing: border-box; z-index: 5; }
body.desk-docked .g-build.d-palette .g-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; }
body.desk-docked .g-build.d-palette .g-card { width: auto !important; min-height: 0; padding: 6px; }
body.desk-docked .g-build.d-palette .g-card canvas { max-width: 100%; height: auto !important; }
body.desk-docked .g-build.d-palette .g-card b { font-size: 12px; }
body.desk-docked .g-build.d-palette .g-build-tabs .g-tabs { flex-wrap: wrap; overflow: visible; }
body.desk-docked .g-build.d-palette .g-build-head { flex-wrap: wrap; }
.g-card.fav { box-shadow: inset 0 0 0 2px #f6c75a; }
.g-chip.fav { border-color: #c99a2e; color: #ffe08a; }

.d-menu-bg { position: fixed; inset: 0; z-index: 30; }
.d-menu { position: absolute; min-width: 220px; padding: 6px; border-radius: 10px; background: #2e343a; border: 1px solid #6f7a80; box-shadow: 0 10px 28px rgba(0,0,0,.45); display: flex; flex-direction: column; }
.d-menu-title { padding: 4px 10px 6px; font-size: 12px; color: #a9b3ad; }
.d-menu-item { display: flex; justify-content: space-between; gap: 18px; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: #eef1ee; font: 14px var(--body); text-align: left; cursor: pointer; }
.d-menu-item:hover, .d-menu-item:focus { background: #3a4148; outline: none; }
.d-menu-item.spend { color: #ffe08a; } .d-menu-item.danger { color: #ffb3a6; }
.d-menu-hint { color: #a9b3ad; font-size: 12px; }
.d-menu-line { height: 1px; background: #4b545d; margin: 4px 6px; }

.d-search-bg { position: fixed; inset: 0; z-index: 30; background: rgba(10,12,14,.4); display: flex; justify-content: center; align-items: flex-start; padding-top: 12vh; }
.d-search { width: min(640px, calc(100vw - 40px)); border-radius: 14px; background: #2e343a; border: 1px solid #6f7a80; box-shadow: 0 20px 50px rgba(0,0,0,.5); overflow: hidden; }
.d-search-input { width: 100%; box-sizing: border-box; height: 56px; padding: 0 18px; border: 0; border-bottom: 1px solid #4b545d; background: #262b31; color: #eef1ee; font: 18px var(--body); }
.d-search-input:focus { outline: none; }
.d-search-list { max-height: 60vh; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; }
.d-search-list > p { padding: 12px; margin: 0; }
.d-search-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 0; border-radius: 8px; background: none; color: #eef1ee; font: 15px var(--body); text-align: left; cursor: pointer; }
.d-search-row:hover, .d-search-row.first { background: #3a4148; }
.d-search-kind { width: 64px; font-size: 11px; color: #8fc77f; text-transform: uppercase; letter-spacing: .5px; }
.d-search-enter { margin-left: auto; font-size: 11px; color: #a9b3ad; border: 1px solid #4b545d; border-radius: 4px; padding: 1px 6px; }

.g-manage-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.g-manage-split > section { min-width: 0; }
.g-manage-split > section + section { border-left: 1px solid #4b545d; padding-left: 16px; }
.g-split-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.g-nav.side { box-shadow: inset 0 0 0 2px #6fb0e8; }
body.desk-docked .g-manage { width: min(1400px, calc(100vw - var(--d-rail) - var(--d-dock) - 32px)); left: calc(var(--d-rail) + (100vw - var(--d-rail) - var(--d-dock)) / 2); height: calc(100vh - var(--d-top) - var(--d-status) - 24px); top: calc(var(--d-top) + 12px); transform: translateX(-50%); }
body.desk-docked .g-build.d-palette { width: 380px; }
body.desk-docked .g-build.d-palette .g-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
body.desk-docked .g-build.d-palette .g-build-tabs { gap: 4px; }
body.desk-docked .g-build.d-palette .g-tab { padding: 4px 10px; min-height: 0; font-size: 13px; }
body.desk-docked .g-build.d-palette .g-build-tabs .keycap { display: none; }
body.desk-docked .g-build.d-palette .g-build-tip { font-size: 12px; margin: 0 0 6px; }
body.desk-docked .g-build.d-palette .g-build-search { flex: 1 1 100%; }

.g-merch-card.own { border-color: #c99a2e; }
.g-own-art { align-self: center; padding: 2px 10px; border-radius: 99px; background: #4a4330; border: 1px solid #c99a2e; color: #ffe08a; font-size: 12px; font-weight: 700; }
.g-own-hint { font-size: 12px; text-align: center; }

.g-fr-how ol { margin: 6px 0 8px 18px; padding: 0; display: grid; gap: 6px; font-size: 14px; line-height: 1.45; }
.g-fr-why { font-size: 12px; color: #c9ced2; }
.g-fr-est { font-size: 13px; color: #8fc77f; } .g-fr-est.neg { color: #ef7a66; }

/* RCT-inspired (2026-10-17): readouts you can click, Inspector tabs + live view, the Stations list. */
button.g-readout { cursor: pointer; font: inherit; font-weight: 700; color: #252b31; border: 0; }
button.g-readout.g-money.neg { color: #b3261e; }
button.g-readout:hover, button.g-readout:focus-visible { filter: brightness(1.15); outline: 2px solid #8fc77f; outline-offset: -2px; }
.p-num { border: 0; background: none; color: inherit; font: inherit; padding: 0; cursor: pointer; text-decoration: underline dotted rgba(255,255,255,.35); text-underline-offset: 3px; }
.g-miniview { display: block; width: 100%; aspect-ratio: 2 / 1; height: auto; image-rendering: pixelated; border-radius: 10px; border: 1px solid #4b545d; background: #22272d; }
.g-mini-wrap { display: grid; gap: 6px; margin: 8px 0; }
.g-follow.on { box-shadow: inset 0 0 0 2px #8fc77f; }
.g-insp-tabs { display: flex; gap: 4px; padding: 0 0 8px; }
.g-insp-tab { flex: 1; padding: 7px 10px; border-radius: 8px; border: 1px solid #4b545d; background: #262b31; color: #dfe4e6; font: 700 13px var(--body); cursor: pointer; }
.g-insp-tab.on { background: #b8e6a4; color: #14200f; border-color: #b8e6a4; }
.g-stations { display: flex; flex-direction: column; gap: 10px; }
.g-station-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.g-station-bar .g-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.g-station-search { flex: 1 1 200px; min-width: 0; }
.g-station-list { display: flex; flex-direction: column; gap: 6px; }
.g-station { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: #262b31; border: 1px solid #4b545d; }
.g-station.broken { border-color: #a8473a; background: #35292a; }
.g-station-name { display: grid; gap: 2px; min-width: 0; } .g-station-name .muted { font-size: 12px; }
.g-station-val { display: flex; align-items: center; gap: 8px; } .g-station-val .neg { color: #ef7a66; }
body.lay-phone .g-station { grid-template-columns: minmax(0, 1fr) auto; } body.lay-phone .g-station-val { grid-column: 1 / -1; grid-row: 2; }

/* Tooltips in tooltips and "why this number" lists (2026-10-17). */
.g-peek { max-width: 320px; }
.g-peek.locked { pointer-events: auto; box-shadow: 0 0 0 2px #8fc77f, 0 8px 24px rgba(0,0,0,.45); }
.g-peek-kid { z-index: 1001; border-color: #8fc77f; }
.g-term { text-decoration: underline dotted #b8e6a4; text-underline-offset: 3px; cursor: help; color: #e3f5d8; }
.g-peek-rows { margin-top: 8px; display: grid; gap: 2px; }
.g-peek-row { display: flex; justify-content: space-between; gap: 12px; font-size: 12.5px; color: #c9ced2; }
.g-peek-row b { white-space: nowrap; font-family: var(--hud); font-size: 12px; }
.g-peek-row.pos b { color: #8fc77f; } .g-peek-row.neg b { color: #ef7a66; }
.g-peek-row.head { margin-top: 6px; color: #eef1ee; font-weight: 700; }
.g-peek-row.sum { margin-top: 4px; padding-top: 4px; border-top: 1px solid #4b545d; color: #eef1ee; font-weight: 700; }
.g-peek-hint { margin-top: 8px; font-size: 11px; color: #8a959a; }
.g-peek-back { margin-bottom: 6px; border: 1px solid #4b545d; border-radius: 6px; background: #262b31; color: #dfe4e6; font: 700 12px var(--body); padding: 4px 8px; }
.g-why { grid-column: 1 / -1; }
.g-why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.g-why-part h4 { margin: 0; font-size: 15px; } .g-why-sub { font-family: var(--hud); font-size: 12px; color: #b8e6a4; margin: 2px 0 4px; }
.g-why-part p { margin: 4px 0 6px; font-size: 13px; } .g-why-part .g-peek-row { font-size: 13px; }
.g-why .g-term { color: inherit; }

/* Pinned pages: windows over the gym (Computer layout). */
.d-win { position: absolute; z-index: 6; display: flex; flex-direction: column; min-width: 300px; border-radius: 12px; background: #2e343a; border: 1px solid #6f7a80; box-shadow: 0 12px 30px rgba(0,0,0,.45); overflow: hidden; }
.d-win.front { border-color: #8fc77f; z-index: 7; }
.d-win.flash { animation: d-win-flash .3s steps(1) 2; }
@keyframes d-win-flash { 0% { border-color: #f6c75a; box-shadow: 0 0 0 3px #f6c75a, 0 12px 30px rgba(0,0,0,.45); } 50% { border-color: #8fc77f; } }
.d-win.shaded .d-win-head { border-bottom: 0; }
.d-win-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px 6px 12px; background: #22272d; border-bottom: 1px solid #4b545d; cursor: move; user-select: none; }
.d-win-head b { flex: 1; font: 14px var(--hud); color: #b8e6a4; letter-spacing: .5px; }
.d-win-btn { width: 28px; height: 26px; border-radius: 6px; border: 1px solid #4b545d; background: #262b31; color: #dfe4e6; cursor: pointer; font-size: 15px; line-height: 1; }
.d-win-btn:hover { border-color: #8fc77f; }
.d-win-body { flex: 1; overflow: auto; padding: 10px 12px; min-height: 0; }
.d-win-body .g-grid2 { grid-template-columns: 1fr; }
.d-win-grip { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, #6f7a80 50%, #6f7a80 60%, transparent 60%, transparent 70%, #6f7a80 70%, #6f7a80 80%, transparent 80%); }

/* Price tags in the gym (RCT Touch), the phone's "why" sheet, and 44px tap targets (2026-10-17). */
.g-pricetag { display: grid; gap: 8px; padding: 10px; border-radius: 12px; background: #262b31; border: 1px solid #4b545d; }
.g-pricetag-head { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.g-pricetag-row { display: grid; gap: 6px; }
.g-pricetag-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-pricetag-word { margin-left: auto; font: 12px var(--hud); padding: 2px 8px; border-radius: 999px; background: #3a4148; color: #dfe4e6; }
.g-pricetag-word.pos { background: #34493a; color: #b8e6a4; } .g-pricetag-word.warn { background: #4a4128; color: #ffe08a; } .g-pricetag-word.neg { background: #4a3331; color: #ffb3a6; }
.g-pricetag-scale { position: relative; height: 8px; border-radius: 4px; background: linear-gradient(90deg, #4f8a45 0%, #8fc77f 40%, #c9ced2 50%, #f2d24e 65%, #e05a6a 100%); }
.g-pricetag-scale i { position: absolute; top: -4px; width: 4px; height: 16px; margin-left: -2px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px #14200f; }
.g-pricetag-price { min-width: 48px; text-align: center; font: 16px var(--hud); }
.p-why { max-height: 82vh; overflow-y: auto; }
.p-why h3 { margin-bottom: 0; }
.p-why .g-why-rows { display: grid; gap: 4px; margin: 6px 0 10px; }
.p-why .g-peek-row { font-size: 14px; }
.p-why-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.p-why-tab { flex: 1; min-height: 44px; border-radius: 12px; border: 1px solid #4b545d; background: #262b31; color: #dfe4e6; font: 700 13px var(--body); }
.p-why-tab.on { background: #b8e6a4; color: #14200f; border-color: #b8e6a4; }
.p-why-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
/* Phones: every control at least 44px to tap (Apple's and Google's minimum); small ones get an invisible margin. */
body.lay-phone .g-btn, body.lay-phone .g-chip, body.lay-phone .g-insp-tab, body.lay-phone .g-tab, body.lay-phone .g-nav, body.lay-phone .g-panelart-pick, body.lay-phone .g-follow { min-height: 44px; }
body.lay-phone .g-swatch { min-width: 40px; min-height: 40px; }
body.lay-phone .p-top-btn { height: 44px; }
.p-num { position: relative; }
.p-num::after { content: ''; position: absolute; inset: -14px -4px; }
body.lay-phone .g-info { position: relative; } body.lay-phone .g-info::after { content: ''; position: absolute; inset: -12px; }

/* Phone touch pack (2026-10-17, docs/research_touch_sims.md): time in thumb reach, the undo chip, the loupe, "1 of 3 here". */
.p-time-wrap { position: absolute; left: 12px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 6; display: flex; align-items: center; gap: 8px; }
.p-time { width: 56px; height: 56px; border-radius: 50%; border: 1px solid #6f7a80; background: rgba(38,43,49,.94); color: #eef1ee; font: 700 18px var(--body); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; box-shadow: 0 4px 14px rgba(0,0,0,.4); touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.p-time.paused { border-color: #8fc77f; color: #b8e6a4; }
.p-time-speed { font: 10px var(--hud); color: #a9b3ad; }
.p-speeds { display: flex; gap: 6px; padding: 6px; border-radius: 14px; background: rgba(38,43,49,.96); border: 1px solid #6f7a80; }
.p-speed { min-width: 48px; height: 44px; border-radius: 10px; border: 1px solid #4b545d; background: #262b31; color: #eef1ee; font: 700 15px var(--body); }
.p-speed.on { background: #b8e6a4; color: #14200f; border-color: #b8e6a4; }
.p-undo { position: absolute; right: 12px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); z-index: 6; max-width: calc(100vw - 100px); min-height: 44px; padding: 0 14px; border-radius: 22px; border: 1px solid #6f7a80; background: rgba(38,43,49,.96); color: #eef1ee; font: 700 14px var(--body); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 4px 14px rgba(0,0,0,.4); animation: p-undo-in .18s ease-out; }
@keyframes p-undo-in { from { transform: translateY(8px); opacity: 0; } }
.p-top-btn.slowed { border-color: #6fb0e8; color: #cfe4ff; }
.p-loupe { position: fixed; z-index: 40; width: 132px; height: 132px; border-radius: 50%; border: 3px solid #eef1ee; box-shadow: 0 0 0 2px #14200f, 0 10px 30px rgba(0,0,0,.5); pointer-events: none; image-rendering: pixelated; display: none; background: #22272d; }
.p-loupe.on { display: block; }
.g-cycle { float: right; margin: 0 0 4px 8px; min-height: 36px; padding: 0 12px; border-radius: 18px; border: 1px solid #6fb0e8; background: #26323d; color: #cfe4ff; font: 700 13px var(--body); cursor: pointer; }
body.lay-phone .g-cycle { min-height: 44px; }
