/* gate/css/gate-hub-page.css - THE READABLE GATEHOUSE (gate/js/gate-hub-page.js; the usability reports of 2026-10-10,
 * UI-04; docs/READABILITY.md). The room kit's floor (js/room-ui.css): no word under 16 CSS px, every button 44 x 44
 * (48 on a touch screen). Nothing here is ever written smaller; the sizes come from the kit's own tokens, which the
 * text size (Normal, Larger, Largest) scales. The header, the card, the tour's card and Places are the Village map's
 * (js/village-map.js .rvm-*); this sheet adds the foot, the pins and the Gate's colours. */

/* THE CHALLENGES tab (gate-standing.js) stands at the middle of the left edge while the gatehouse's header and foot are
   up, between them, as it does under FRIENDS when that tab shows */
html[data-ghp]:not([data-friends-tab]) .gsd-tab { top: 50%; }
/* the header starts under the corner's row (gate/index.html #gate-corner, z 45 over this layer's 36), never behind its buttons */
.ghp[data-under] .rvm-head { background: linear-gradient(180deg, rgba(5, 8, 10, 0.9), rgba(11, 8, 20, 0.78)); }
.ghp .rvm-title { letter-spacing: 0.06em; text-transform: uppercase; }
.ghp[data-side="herd"] .rvm-title { color: var(--rui-gold); }
.ghp[data-side="horde"] .rvm-title { color: #6BE04A; }
/* Play People stays on a PC's header; a phone finds it in Places and on the lantern */
.ghp[data-mode="compact"] .ghp-tool--people { display: none; }
.ghp .rvm-tool.rui-btn--primary .rui-btn__label { white-space: nowrap; }

/* ---- THE FOOT: the meters as page text, Badges and Board ---- */
.ghp-foot {
  position: absolute; left: 0; right: 0; bottom: 0; pointer-events: auto;
  display: flex; align-items: stretch; justify-content: center; flex-wrap: nowrap; gap: 6px 10px;
  padding: 6px calc(var(--rui-edge-r) + var(--rui-tabs) + 8px) calc(env(safe-area-inset-bottom, 0px) + 6px) calc(var(--rui-edge-l) + var(--rui-tabs) + 8px);
  background: linear-gradient(0deg, rgba(5, 8, 10, 0.92), rgba(11, 8, 20, 0.74));
  border-top: 1px solid var(--rui-line);
}
.ghp-foot[hidden] { display: none; }
/* THE WORLD DOOR (../js/world-door.js, #279) on a phone: it stands on the foot's right end, not over its meters, and
   at the screen's right edge (inside the camera's side) rather than the painting's, so it covers as little of the
   painting's doors as it can (gate-hub-page.js clearDoor; a PC's foot ends short of it instead) */
html[data-ghp-door] .world-door { bottom: var(--ghp-door-bottom, 14px); right: calc(var(--sotc-edge-r, env(safe-area-inset-right, 0px)) + 8px); }
.ghp-foot[inert] { opacity: 0.45; }
/* bigger words on a PC: the foot takes a second row rather than squeezing the meters */
html[data-text-size] .ghp[data-mode="wide"] .ghp-foot { flex-wrap: wrap; }
html[data-text-size] .ghp[data-mode="wide"] .ghp-meters { flex-basis: 100%; max-width: none; }
/* a screen under 340 px tall (a phone with the browser's bars): the room keeps its painting; the meters are in the
   Ledger, Badges and Board in Places and the CHALLENGES tab */
@media (max-height: 339px) { .ghp-foot { display: none; } }

.ghp-meters {
  flex: 1 1 0; min-width: 0; max-width: calc(980px * var(--rui-s));
  display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 6px 22px;
  padding: 6px 14px; text-align: left; font-weight: normal;
}
.ghp-meter { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; flex: 1 1 0; }
.ghp-chaos { flex-grow: 1.6; }
.ghp-wins { flex-direction: row; align-items: center; gap: 10px; flex-grow: 1.3; }
.ghp-meter__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 10px; min-width: 0; }
.ghp-wins .ghp-meter__head { flex-direction: column; align-items: flex-start; gap: 0; }
.ghp-meter__name { font-size: var(--rui-min); line-height: 1.25; letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap; color: var(--meter, var(--rui-gold)); }
.ghp-rage .ghp-meter__name { color: var(--rui-ink); }
.ghp-wins .ghp-meter__name { color: var(--rui-gold); }
/* a PC's foot (2026-10-12, convention 36): the record is as wide as its "N won · N played" and its line wraps under
   it, so its words never run past the meters into the Fame beside them (a short window with the World door at
   1280 x 600); the Chaos Factor and the God Rage share what is left, a name taking a second line before it overruns */
.ghp[data-mode="wide"] .ghp-wins { flex: none; }
.ghp[data-mode="wide"] .ghp-wins .ghp-meter__head { width: min-content; }
.ghp[data-mode="wide"] .ghp-chaos .ghp-meter__name, .ghp[data-mode="wide"] .ghp-rage .ghp-meter__name { white-space: normal; }
.ghp-meter__line, .ghp-meter__level { font-size: var(--rui-min); line-height: 1.25; font-weight: normal; color: var(--rui-soft); min-width: 0; }
.ghp-meter__level { font-weight: bold; color: var(--meter); text-transform: uppercase; }
.ghp-meter__line[data-practice] { color: #7FE0D6; font-weight: bold; }

/* the Chaos Factor's line of fire: the lit share burns (held still under reduced motion) */
.ghp-fire { position: relative; display: block; height: 10px; border-radius: 5px; background: #14121A; border: 1px solid rgba(255, 255, 255, 0.16); overflow: hidden; }
.ghp-fire__fill { position: absolute; left: 0; top: 0; bottom: 0; min-width: 10px; border-radius: 5px;
  background: linear-gradient(90deg, var(--meter), #FFF1B0 140%); box-shadow: 0 0 10px var(--meter); animation: ghp-burn 1.6s ease-in-out infinite alternate; }
@keyframes ghp-burn { from { filter: brightness(0.9); } to { filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { .ghp-fire__fill { animation: none; } }

/* God Rage: five steps, Bored to Apoplectic */
.ghp-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.ghp-step { position: relative; display: block; height: 10px; border-radius: 4px; background: #14121A; border: 1px solid rgba(255, 255, 255, 0.14); overflow: hidden; }
.ghp-step[data-lit] { border-color: var(--meter); }
.ghp-step__fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--meter); opacity: 0.85; }

/* the win totals: a ring for the share won */
.ghp-ring { flex: none; position: relative; display: grid; place-items: center; width: calc(54px * var(--rui-s)); height: calc(54px * var(--rui-s)); border-radius: 50%;
  background: conic-gradient(var(--rui-gold) calc(var(--share, 0) * 1turn), #2A2140 0); }
.ghp-ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #120E1C; }
.ghp-ring__pct { position: relative; font-size: var(--rui-min); font-weight: bold; color: var(--rui-ink); }

.ghp-foot__btn { flex: 0 0 auto; align-self: center; }

/* the Fame (Notoriety): the balance, what the Gate paid today against the day's limit */
.ghp-fame { flex: 0 1 auto; display: flex; flex-direction: column; align-items: stretch; justify-content: center; gap: 4px; padding: 6px 14px; min-width: calc(190px * var(--rui-s)); text-align: left; font-weight: normal; --meter: var(--rui-gold); }
.ghp[data-side="horde"] .ghp-fame { --meter: #6BE04A; }
.ghp-fame .ghp-meter__head { justify-content: space-between; flex-wrap: nowrap; }
.ghp-fame__xp { font-size: var(--rui-min); font-weight: bold; color: var(--rui-ink); }
.ghp-fire--fame .ghp-fire__fill { animation: none; min-width: 0; }

/* a phone: one row of short words (the second lines are in the Ledger and the Fame's sheet), no ring; Badges and Board
   are in Places and the CHALLENGES tab */
.ghp[data-mode="compact"] .ghp-foot { flex-wrap: nowrap; padding-top: 4px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 4px); }
.ghp[data-mode="compact"] .ghp-meters { gap: 4px 16px; padding: 4px 12px; }
.ghp[data-mode="compact"] .ghp-fame { padding: 4px 12px; min-width: calc(120px * var(--rui-s)); }
.ghp[data-mode="compact"] .ghp-ring, .ghp[data-mode="compact"] .ghp-meter__line, .ghp[data-mode="compact"] .ghp-foot__btn { display: none; }
/* each meter as wide as its words; at Larger and Largest a name takes a second line before it runs into the next */
.ghp[data-mode="compact"] .ghp-meter { flex: 1 1 auto; }
.ghp[data-mode="compact"] .ghp-meter__name { white-space: normal; }
/* a screen held upright (the rotate curtain is a touch phone's; a narrow window shows the room): the meters take the
   foot's first row, the Fame its second */
@media (max-width: 560px) {
  .ghp-foot, .ghp[data-mode="compact"] .ghp-foot { flex-wrap: wrap; }
  .ghp-meters { flex-basis: 100%; max-width: none; }
}

/* ---- THE PINS: words tied to a spot on the painting ---- */
.ghp-pin { position: fixed; z-index: 1; }
.ghp-pin[hidden] { display: none; }
.ghp-pin--go { pointer-events: auto; white-space: nowrap; letter-spacing: 0.06em; text-transform: uppercase; }
.ghp-pin--tag { pointer-events: none; padding: 4px 14px; border-radius: 999px; background: var(--pin-accent, #FF8FC7); color: #14121A;
  font-size: var(--rui-min); font-weight: bold; line-height: 1.3; white-space: nowrap; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); }
.ghp-pin[inert] { opacity: 0.45; }
