/*
 * Iron Vesper — one stylesheet for the whole site.
 * Iron at dusk: blue-black steel, lamp orange, a violet evening sky.
 * The Games Hub has its own lighter "reading lounge" skin at the end.
 */

:root {
  --iv-bg: #0b0d14;
  --iv-bg-2: #0f121c;
  --iv-panel: #141927;
  --iv-panel-2: #1a2032;
  --iv-line: #2a3249;
  --iv-line-2: #3a4462;
  --iv-ink: #eceef6;
  --iv-mute: #a7afc6;
  --iv-dim: #7c86a3;
  --iv-lamp: #ff8a3d;
  --iv-lamp-2: #ffb47a;
  --iv-lamp-ink: #1a0d03;
  --iv-dusk: #9a8cff;
  --iv-dusk-2: #c4bbff;
  --iv-go: #5fe3a1;
  --iv-stop: #ff6b6b;
  --iv-display: "Futura", "Century Gothic", "Avenir Next", "Trebuchet MS", sans-serif;
  --iv-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --iv-mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --iv-s1: 4px;
  --iv-s2: 8px;
  --iv-s3: 12px;
  --iv-s4: 16px;
  --iv-s5: 24px;
  --iv-s6: 32px;
  --iv-s7: 48px;
  --iv-s8: 64px;
  --iv-r: 6px;
  --iv-r-lg: 14px;
  --iv-wide: 1240px;
  --iv-ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--iv-ink);
  background-color: var(--iv-bg);
  background-image:
    radial-gradient(1200px 520px at 50% -180px, rgba(154, 140, 255, .22), transparent 70%),
    radial-gradient(700px 300px at 85% 0, rgba(255, 138, 61, .10), transparent 70%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 96px);
  background-repeat: no-repeat, no-repeat, repeat;
  font: 400 1rem/1.6 var(--iv-sans);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--iv-lamp-2); text-underline-offset: 3px; }
a:hover { color: #ffd2ad; }

:focus-visible { outline: 2px solid var(--iv-lamp); outline-offset: 3px; border-radius: 3px; }

h1, h2, h3 { font-family: var(--iv-display); line-height: 1.15; letter-spacing: .01em; margin: 0 0 var(--iv-s3); }
h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.1vw, 2rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 var(--iv-s4); }
ul, ol { margin: 0 0 var(--iv-s4); padding-left: 1.25rem; }
li { margin-bottom: var(--iv-s1); }

.iv-skip { position: absolute; left: -9999px; top: 0; z-index: 99; background: var(--iv-lamp); color: var(--iv-lamp-ink); padding: var(--iv-s2) var(--iv-s4); }
.iv-skip:focus { left: var(--iv-s4); top: var(--iv-s2); }

.iv-glyph { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.iv-kicker { font: 600 .78rem/1.4 var(--iv-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--iv-dusk-2); margin-bottom: var(--iv-s2); }
.iv-lead { font-size: 1.125rem; color: #d5d9e8; max-width: 64ch; }
.iv-small { font-size: .875rem; color: var(--iv-mute); }
.iv-prose { max-width: 68ch; }
.iv-prose h2 { margin-top: var(--iv-s6); }
.iv-prose h3 { margin-top: var(--iv-s5); }

/* ---------- compliance notice and top bar ---------- */

.iv-notice {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--iv-s1) var(--iv-s4);
  padding: 6px var(--iv-s4);
  background: #05060a;
  border-bottom: 1px solid var(--iv-line);
  font: 600 .75rem/1.4 var(--iv-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--iv-mute);
}
.iv-notice b { color: var(--iv-lamp-ink); background: var(--iv-lamp); padding: 0 6px; border-radius: 3px; }
.iv-notice span + span::before { content: "/"; margin-right: var(--iv-s4); color: var(--iv-line-2); }

.iv-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 13, 20, .9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--iv-line);
}
.iv-top__row {
  max-width: var(--iv-wide);
  margin: 0 auto;
  padding: var(--iv-s2) var(--iv-s4);
  display: flex;
  align-items: center;
  gap: var(--iv-s4);
}
.iv-brand { display: flex; align-items: center; gap: var(--iv-s2); text-decoration: none; color: var(--iv-ink); flex: none; }
.iv-brand img { width: 40px; height: 40px; }
.iv-brand__word { font: 800 1.2rem/1 var(--iv-display); letter-spacing: .06em; text-transform: uppercase; }
.iv-brand__word i { font-style: normal; color: var(--iv-lamp); margin-left: 4px; }

.iv-nav { display: flex; gap: 2px; flex: 1; justify-content: center; }
.iv-nav__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: var(--iv-r);
  color: var(--iv-mute);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color .16s ease-out, background-color .16s ease-out;
}
.iv-nav__item:hover { color: var(--iv-ink); background: var(--iv-panel); }
.iv-nav__item.is-here { color: var(--iv-ink); background: var(--iv-panel-2); }
.iv-lamp { width: 7px; height: 7px; border-radius: 50%; background: var(--iv-line-2); flex: none; transition: background-color .16s ease-out, box-shadow .16s ease-out; }
.iv-nav__item .iv-glyph { display: none; }
.iv-nav__item.is-here .iv-lamp { background: var(--iv-lamp); box-shadow: 0 0 10px var(--iv-lamp); }

.iv-hud { display: flex; align-items: center; gap: var(--iv-s2); flex: none; }
.iv-hud__bolts {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--iv-line-2); border-radius: 999px;
  color: var(--iv-ink); text-decoration: none; background: var(--iv-panel);
}
.iv-hud__bolts .iv-glyph { color: var(--iv-lamp); }
.iv-hud__bolts b { font: 700 1rem/1 var(--iv-mono); }
.iv-hud__bolts small { font-size: .7rem; color: var(--iv-dim); }
.iv-hud__shift { display: inline-flex; align-items: center; gap: 4px; font: 600 .85rem/1 var(--iv-mono); color: var(--iv-mute); }
.iv-hud__pause {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(154, 140, 255, .5);
  background: rgba(154, 140, 255, .12); color: var(--iv-dusk-2); font: 700 .85rem/1 var(--iv-sans); cursor: pointer;
  transition: background-color .16s ease-out;
}
.iv-hud__pause:hover { background: rgba(154, 140, 255, .24); }

.iv-main { max-width: var(--iv-wide); margin: 0 auto; padding: var(--iv-s5) var(--iv-s4) var(--iv-s8); }

.iv-trail ol { list-style: none; display: flex; flex-wrap: wrap; gap: var(--iv-s2); padding: 0; margin: 0 0 var(--iv-s5); font: 500 .8rem/1.4 var(--iv-mono); color: var(--iv-dim); }
.iv-trail li { margin: 0; }
.iv-trail li + li::before { content: "›"; margin-right: var(--iv-s2); color: var(--iv-line-2); }
.iv-trail a { color: var(--iv-mute); }

/* ---------- buttons, chips, panels ---------- */

.iv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--iv-s2);
  min-height: 44px; padding: 10px 18px; border-radius: var(--iv-r);
  border: 1px solid transparent; font: 700 .95rem/1.2 var(--iv-sans); text-decoration: none; cursor: pointer;
  transition: transform .14s ease-out, background-color .16s ease-out, border-color .16s ease-out, box-shadow .16s ease-out;
}
.iv-btn:active { transform: scale(.97); }
.iv-btn--lamp { background: var(--iv-lamp); color: var(--iv-lamp-ink); box-shadow: 0 0 0 0 rgba(255, 138, 61, 0); }
.iv-btn--lamp:hover { color: var(--iv-lamp-ink); background: #ff9b57; box-shadow: 0 0 24px rgba(255, 138, 61, .35); }
.iv-btn--lamp::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff4e8; box-shadow: 0 0 8px #fff; }
.iv-btn--rail { background: transparent; color: var(--iv-ink); border-color: var(--iv-line-2); }
.iv-btn--rail:hover { color: var(--iv-ink); border-color: var(--iv-lamp); }
.iv-btn--ghost { background: transparent; color: var(--iv-mute); }
.iv-btn--ghost:hover { color: var(--iv-ink); }
.iv-btn--even { flex: 1; background: var(--iv-panel-2); color: var(--iv-ink); border-color: var(--iv-line-2); }
.iv-btn--even:hover { border-color: var(--iv-ink); color: var(--iv-ink); }
.iv-btn--dusk { background: rgba(154, 140, 255, .16); color: var(--iv-dusk-2); border-color: rgba(154, 140, 255, .45); }
.iv-btn--dusk:hover { background: rgba(154, 140, 255, .26); color: #fff; }
.iv-btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.iv-btn--wide { width: 100%; }
.iv-linkish { background: none; border: 0; padding: 0; color: var(--iv-lamp-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.iv-panel {
  position: relative;
  background: var(--iv-panel);
  border: 1px solid var(--iv-line);
  border-radius: var(--iv-r-lg);
  padding: var(--iv-s5);
}
.iv-panel::before {
  content: "";
  position: absolute;
  left: var(--iv-s5); right: var(--iv-s5); top: -1px; height: 3px;
  background: repeating-linear-gradient(90deg, var(--iv-line-2) 0 10px, transparent 10px 16px);
  border-radius: 2px;
}
.iv-panel--lamp::before { background: repeating-linear-gradient(90deg, var(--iv-lamp) 0 10px, transparent 10px 16px); }
.iv-panel--dusk::before { background: repeating-linear-gradient(90deg, var(--iv-dusk) 0 10px, transparent 10px 16px); }

/* ticket stubs: perforated chips for short facts */
.iv-stubs { display: flex; flex-wrap: wrap; gap: var(--iv-s2); list-style: none; padding: 0; margin: 0 0 var(--iv-s4); }
.iv-stub {
  position: relative; margin: 0;
  padding: 6px 14px 6px 12px;
  background: var(--iv-panel-2);
  border: 1px dashed var(--iv-line-2);
  border-radius: 4px;
  font: 600 .8rem/1.3 var(--iv-mono);
  color: var(--iv-mute);
}
.iv-stub b { display: block; color: var(--iv-ink); font-size: .9rem; }
.iv-stub::before, .iv-stub::after {
  content: ""; position: absolute; top: 50%; width: 10px; height: 10px; margin-top: -5px;
  border-radius: 50%; background: var(--iv-bg);
}
.iv-stub::before { left: -6px; }
.iv-stub::after { right: -6px; }

.iv-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 700 .72rem/1.6 var(--iv-mono); letter-spacing: .08em; text-transform: uppercase; border: 1px solid currentColor; }
.iv-chip--forge { color: var(--iv-lamp); }
.iv-chip--cards { color: var(--iv-dusk); }
.iv-chip--dice { color: var(--iv-go); }

.iv-head { margin-bottom: var(--iv-s6); }
.iv-head h1 { max-width: 22ch; }

.iv-section { margin: var(--iv-s8) 0 0; }
.iv-section__top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: var(--iv-s3); margin-bottom: var(--iv-s5); }
.iv-section__top p { margin: 0; color: var(--iv-mute); max-width: 56ch; }

.iv-notebox { padding: var(--iv-s3) var(--iv-s4); border-radius: var(--iv-r); border: 1px solid rgba(154, 140, 255, .45); background: rgba(154, 140, 255, .1); color: var(--iv-dusk-2); margin: 0 0 var(--iv-s4); }
.iv-notebox--ok { border-color: rgba(95, 227, 161, .5); background: rgba(95, 227, 161, .1); color: #b9f5d6; }
.iv-notebox--bad { border-color: rgba(255, 107, 107, .5); background: rgba(255, 107, 107, .1); color: #ffc9c9; }

/* ---------- the Roundhouse (home) ---------- */

.iv-roundhouse {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: var(--iv-s6);
  align-items: center;
}
.iv-roundhouse__intro { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--iv-s5); align-items: end; }
.iv-roundhouse__intro p { color: var(--iv-mute); }

.iv-ring {
  --ring: min(560px, 90vw);
  position: relative;
  width: var(--ring);
  height: var(--ring);
  margin: 0 auto;
}
.iv-ring__svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.iv-ring__svg .pit { fill: #0d1019; stroke: var(--iv-line-2); stroke-width: 2; }
.iv-ring__svg .pit-ring { fill: none; stroke: rgba(255, 138, 61, .35); stroke-width: 1.5; stroke-dasharray: 3 7; }
.iv-ring__svg .rail { stroke: #3a4462; stroke-width: 3; }
.iv-ring__svg .sleepers { stroke: #262d42; stroke-width: 9; stroke-dasharray: 2 10; }
.iv-ring__svg .deck { fill: #1b2133; stroke: #46506f; stroke-width: 2; }
.iv-ring__svg .deck-rail { stroke: var(--iv-lamp); stroke-width: 2.5; }
.iv-ring__svg .hub { fill: var(--iv-lamp); }
.iv-ring__svg .star { fill: var(--iv-dusk-2); }
.iv-bridge { transform-origin: 280px 280px; transform: rotate(var(--turn, 0deg)); transition: transform .32s var(--iv-ease); }

.iv-stall {
  --size: calc(var(--ring) * .17);
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--size);
  margin-left: calc(var(--size) / -2);
  margin-top: calc(var(--size) * -.66);
  transform: rotate(var(--a)) translateY(calc(var(--ring) * -.385)) rotate(calc(-1 * var(--a)));
  text-decoration: none;
  color: var(--iv-ink);
  text-align: center;
}
.iv-stall--1 { --a: 0deg; }
.iv-stall--2 { --a: 51.43deg; }
.iv-stall--3 { --a: 102.86deg; }
.iv-stall--4 { --a: 154.29deg; }
.iv-stall--5 { --a: 205.71deg; }
.iv-stall--6 { --a: 257.14deg; }
.iv-stall--7 { --a: 308.57deg; }
.iv-stall__door {
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 999px 999px 8px 8px;
  overflow: hidden;
  border: 2px solid var(--iv-line-2);
  background: var(--iv-panel);
  transition: border-color .16s ease-out, transform .16s ease-out, box-shadow .16s ease-out;
}
.iv-stall__door img { width: 100%; height: 100%; object-fit: cover; }
.iv-stall__no { display: block; margin-top: 4px; font: 700 .7rem/1 var(--iv-mono); color: var(--iv-dim); letter-spacing: .1em; }
.iv-stall:hover .iv-stall__door, .iv-stall:focus-visible .iv-stall__door, .iv-stall.is-on .iv-stall__door {
  border-color: var(--iv-lamp);
  box-shadow: 0 0 22px rgba(255, 138, 61, .45);
  transform: translateY(-3px);
}
.iv-stall.is-on .iv-stall__no { color: var(--iv-lamp); }

.iv-dossier { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: var(--iv-s5); align-items: start; }
.iv-dossier__art { border-radius: var(--iv-r-lg); overflow: hidden; border: 1px solid var(--iv-line-2); }
.iv-dossier h2 { font-size: 1.8rem; margin-top: var(--iv-s2); }
.iv-dossier__acts { display: flex; flex-wrap: wrap; gap: var(--iv-s2); }
.iv-dossier__hint { grid-column: 1 / -1; margin: 0; font-size: .85rem; color: var(--iv-dim); }

.iv-shift {
  margin-top: var(--iv-s7);
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  gap: 1px;
  background: var(--iv-line);
  border: 1px solid var(--iv-line);
  border-radius: var(--iv-r-lg);
  overflow: hidden;
}
.iv-shift > div { background: var(--iv-panel); padding: var(--iv-s3) var(--iv-s4); }
.iv-shift dt { font: 600 .72rem/1.3 var(--iv-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--iv-dim); }
.iv-shift dd { margin: 2px 0 0; font: 700 1.25rem/1.2 var(--iv-mono); }
.iv-shift__acts { display: flex; gap: var(--iv-s2); align-items: center; }

.iv-lines { display: grid; gap: var(--iv-s5); }
.iv-line { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--iv-s5); align-items: start; padding-top: var(--iv-s5); border-top: 1px solid var(--iv-line); }
.iv-line h3 { margin-bottom: var(--iv-s1); }
.iv-line__p { color: var(--iv-mute); font-size: .95rem; }
.iv-wagons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--iv-s3); }
.iv-wagon {
  display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: var(--iv-s3); align-items: center;
  padding: var(--iv-s2); border-radius: var(--iv-r-lg); background: var(--iv-panel); border: 1px solid var(--iv-line);
  text-decoration: none; color: var(--iv-ink);
  transition: border-color .16s ease-out, transform .16s ease-out;
}
.iv-wagon:hover { color: var(--iv-ink); border-color: var(--iv-lamp); transform: translateY(-2px); }
.iv-wagon img { width: 72px; height: 96px; object-fit: cover; border-radius: 8px; }
.iv-wagon b { display: block; font-family: var(--iv-display); font-size: 1.05rem; }
.iv-wagon small { display: block; color: var(--iv-mute); font-size: .82rem; line-height: 1.4; }

.iv-timetable { width: 100%; border-collapse: collapse; font-size: .95rem; }
.iv-timetable th, .iv-timetable td { text-align: left; padding: var(--iv-s3) var(--iv-s4); border-bottom: 1px solid var(--iv-line); vertical-align: top; }
.iv-timetable th { font: 700 .75rem/1.3 var(--iv-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--iv-dim); }
.iv-timetable td:first-child { font: 700 1rem/1.4 var(--iv-mono); color: var(--iv-lamp); width: 64px; }
.iv-timetable td b { display: block; font-family: var(--iv-display); font-size: 1.05rem; }
.iv-timetable td span { color: var(--iv-mute); }

.iv-loungeband {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 0;
  border-radius: var(--iv-r-lg); overflow: hidden; background: #f5efe4; color: #23211c;
}
.iv-loungeband img { width: 100%; height: 100%; object-fit: cover; }
.iv-loungeband__txt { padding: var(--iv-s6); }
.iv-loungeband__txt .iv-kicker { color: #2f6b4f; }
.iv-loungeband h2 { font-family: "Iowan Old Style", "Charter", "Georgia", serif; }
.iv-loungeband p { color: #4a463e; }
.iv-loungeband a.iv-btn { background: #23211c; color: #f5efe4; }
.iv-loungeband a.iv-btn:hover { background: #2f6b4f; color: #fff; }

.iv-cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--iv-s4); list-style: none; padding: 0; }
.iv-cards3 li { margin: 0; }
.iv-cards3 a { display: block; height: 100%; padding: var(--iv-s5); border-radius: var(--iv-r-lg); border: 1px solid var(--iv-line); background: var(--iv-panel); text-decoration: none; color: var(--iv-ink); transition: border-color .16s ease-out; }
.iv-cards3 a:hover { color: var(--iv-ink); border-color: var(--iv-dusk); }
.iv-cards3 b { display: block; font-family: var(--iv-display); font-size: 1.1rem; margin: var(--iv-s2) 0; }
.iv-cards3 span { color: var(--iv-mute); font-size: .92rem; }

.iv-faq { display: grid; gap: var(--iv-s2); max-width: 860px; }
.iv-faq details { border: 1px solid var(--iv-line); border-radius: var(--iv-r); background: var(--iv-panel); }
.iv-faq summary { cursor: pointer; padding: var(--iv-s4); font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: var(--iv-s3); }
.iv-faq summary::-webkit-details-marker { display: none; }
.iv-faq summary::after { content: "+"; font-family: var(--iv-mono); color: var(--iv-lamp); }
.iv-faq details[open] summary::after { content: "–"; }
.iv-faq details p { padding: 0 var(--iv-s4); color: #d0d4e3; }

/* ---------- the Yard (all stalls) ---------- */

.iv-yard { display: grid; gap: var(--iv-s7); }
.iv-yard__line h2 { display: flex; align-items: center; gap: var(--iv-s3); }
.iv-yard__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--iv-s4); }
.iv-bay-card { display: flex; flex-direction: column; border-radius: var(--iv-r-lg); overflow: hidden; background: var(--iv-panel); border: 1px solid var(--iv-line); }
.iv-bay-card__art { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
.iv-bay-card__art img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; transition: transform .3s var(--iv-ease); }
.iv-bay-card:hover .iv-bay-card__art img { transform: scale(1.04); }
.iv-bay-card__body { padding: var(--iv-s4) var(--iv-s5) var(--iv-s5); display: flex; flex-direction: column; gap: var(--iv-s2); flex: 1; }
.iv-bay-card__body h3 { margin: 0; }
.iv-bay-card__body h3 a { color: var(--iv-ink); text-decoration: none; }
.iv-bay-card__body p { color: var(--iv-mute); font-size: .95rem; margin: 0; flex: 1; }
.iv-bay-card__acts { display: flex; gap: var(--iv-s2); flex-wrap: wrap; }

.iv-compare { overflow-x: auto; border: 1px solid var(--iv-line); border-radius: var(--iv-r-lg); }
.iv-compare table { width: 100%; min-width: 640px; border-collapse: collapse; }
.iv-compare th, .iv-compare td { padding: var(--iv-s3) var(--iv-s4); border-bottom: 1px solid var(--iv-line); text-align: left; font-size: .92rem; }
.iv-compare thead th { font: 700 .72rem/1.3 var(--iv-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--iv-dim); background: var(--iv-bg-2); }
.iv-compare tbody tr:last-child td { border-bottom: 0; }

/* ---------- a stall (game page) ---------- */

.iv-stallhead {
  position: relative;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: var(--iv-s5);
  align-items: end;
  padding: var(--iv-s6);
  border-radius: var(--iv-r-lg);
  overflow: hidden;
  border: 1px solid var(--iv-line);
  isolation: isolate;
}
.iv-stallhead__bg { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.iv-stallhead::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(11, 13, 20, .95), rgba(11, 13, 20, .55)); }
.iv-stallhead__cover { border-radius: var(--iv-r-lg); border: 2px solid var(--iv-line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.iv-stallhead h1 { margin-bottom: var(--iv-s2); }
.iv-stallhead .iv-lead { margin-bottom: var(--iv-s3); }

.iv-bay {
  margin-top: var(--iv-s5);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: var(--iv-s4);
  align-items: start;
}
.iv-stage {
  position: relative;
  min-height: 380px;
  border-radius: var(--iv-r-lg);
  border: 1px solid var(--iv-line-2);
  background: radial-gradient(circle at 50% 0, rgba(154, 140, 255, .18), transparent 60%), #0a0c13;
  padding: var(--iv-s5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--iv-s4);
  overflow: hidden;
}
.iv-stage__msg { font: 600 .95rem/1.5 var(--iv-mono); color: var(--iv-mute); text-align: center; min-height: 1.5em; margin: 0; }
.iv-stage__msg.is-good { color: var(--iv-go); }
.iv-stage__msg.is-hot { color: var(--iv-lamp-2); }

.iv-deck {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--iv-s4);
  align-items: center;
  padding: var(--iv-s4);
  border-radius: var(--iv-r-lg);
  background: linear-gradient(180deg, #171c2b, #10141f);
  border: 1px solid var(--iv-line-2);
}
.iv-stake { display: flex; align-items: center; gap: var(--iv-s2); flex-wrap: wrap; }
.iv-stake__lbl { font: 600 .72rem/1.3 var(--iv-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--iv-dim); width: 100%; }
.iv-stake__step { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--iv-line-2); background: var(--iv-panel-2); color: var(--iv-ink); font: 700 1.2rem/1 var(--iv-mono); cursor: pointer; transition: border-color .14s ease-out, transform .14s ease-out; }
.iv-stake__step:hover { border-color: var(--iv-lamp); }
.iv-stake__step:active { transform: scale(.94); }
.iv-stake__val { min-width: 86px; text-align: center; font: 700 1.4rem/1 var(--iv-mono); }
.iv-stake__val small { display: block; font: 600 .7rem/1.4 var(--iv-mono); color: var(--iv-dim); }
.iv-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--iv-s2); }
.iv-go {
  min-width: 150px; min-height: 56px; padding: 0 28px; border-radius: 999px; border: 0;
  background: radial-gradient(circle at 50% 30%, #ffb47a, var(--iv-lamp) 60%, #d9661f);
  color: var(--iv-lamp-ink); font: 800 1.05rem/1 var(--iv-display); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 0 0 4px rgba(255, 138, 61, .18), 0 8px 24px rgba(255, 138, 61, .25);
  transition: transform .12s ease-out, box-shadow .16s ease-out;
}
.iv-go:hover { box-shadow: 0 0 0 6px rgba(255, 138, 61, .25), 0 10px 30px rgba(255, 138, 61, .35); }
.iv-go:active { transform: scale(.96); }
.iv-go[disabled] { opacity: .45; cursor: not-allowed; }
.iv-alt {
  min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--iv-line-2); background: var(--iv-panel-2);
  color: var(--iv-ink); font: 700 .95rem/1 var(--iv-sans); cursor: pointer; transition: border-color .14s ease-out, transform .12s ease-out;
}
.iv-alt:hover { border-color: var(--iv-dusk); }
.iv-alt:active { transform: scale(.96); }
.iv-alt[hidden], .iv-go[hidden] { display: none; }

.iv-gauges { display: flex; gap: var(--iv-s3); }
.iv-gauge { width: 84px; text-align: center; }
.iv-gauge svg { width: 84px; height: 52px; display: block; }
.iv-gauge .arc { fill: none; stroke: var(--iv-line-2); stroke-width: 6; stroke-linecap: round; }
.iv-gauge .arc-on { fill: none; stroke: var(--iv-dusk); stroke-width: 6; stroke-linecap: round; }
.iv-gauge .needle { stroke: var(--iv-lamp); stroke-width: 2.5; stroke-linecap: round; transform-origin: 42px 46px; transition: transform .4s var(--iv-ease); }
.iv-gauge b { display: block; font: 700 .9rem/1.2 var(--iv-mono); }
.iv-gauge small { display: block; font: 600 .66rem/1.3 var(--iv-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--iv-dim); }

.iv-runsheet { padding: var(--iv-s4); }
.iv-runsheet h2 { font-size: 1.05rem; margin-bottom: var(--iv-s2); }
.iv-runsheet ol { list-style: none; padding: 0; margin: 0 0 var(--iv-s3); font: 500 .82rem/1.4 var(--iv-mono); }
.iv-runsheet li { display: flex; justify-content: space-between; gap: var(--iv-s2); padding: 6px 0; border-bottom: 1px dashed var(--iv-line); margin: 0; }
.iv-runsheet li span:last-child { color: var(--iv-mute); }
.iv-runsheet li.is-up span:last-child { color: var(--iv-go); }
.iv-runsheet .iv-empty { color: var(--iv-dim); border: 0; }
.iv-runsheet dl { display: grid; grid-template-columns: 1fr auto; gap: 4px var(--iv-s3); margin: 0 0 var(--iv-s3); font: 500 .85rem/1.4 var(--iv-mono); }
.iv-runsheet dt { color: var(--iv-dim); }
.iv-runsheet dd { margin: 0; text-align: right; }

.iv-locknote { grid-column: 1 / -1; margin: 0; }

.iv-stallbody { margin-top: var(--iv-s7); display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--iv-s6); align-items: start; }
.iv-specplate { position: sticky; top: 96px; }
.iv-specplate dl { margin: 0 0 var(--iv-s4); display: grid; gap: 0; }
.iv-specplate dl > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--iv-s3); padding: var(--iv-s2) 0; border-bottom: 1px solid var(--iv-line); }
.iv-specplate dt { font: 600 .74rem/1.5 var(--iv-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--iv-dim); }
.iv-specplate dd { margin: 0; font-size: .95rem; }

.iv-payplate { width: 100%; border-collapse: collapse; margin: 0 0 var(--iv-s4); font-size: .92rem; }
.iv-payplate caption { text-align: left; font: 600 .78rem/1.5 var(--iv-mono); color: var(--iv-dim); padding-bottom: var(--iv-s2); }
.iv-payplate th, .iv-payplate td { padding: 8px 10px; border-bottom: 1px solid var(--iv-line); text-align: right; font-family: var(--iv-mono); }
.iv-payplate th:first-child, .iv-payplate td:first-child { text-align: left; font-family: var(--iv-sans); }
.iv-payplate thead th { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--iv-dim); }
.iv-payplate td img { width: 32px; height: 32px; display: inline-block; vertical-align: middle; margin-right: 8px; }

.iv-rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--iv-s3); }

/* ---------- reels ---------- */

.iv-reels { display: grid; gap: 6px; padding: 10px; border-radius: 12px; background: #06070c; border: 1px solid var(--iv-line-2); box-shadow: inset 0 0 30px rgba(0, 0, 0, .6); }
.iv-reels--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); width: min(100%, 560px); }
.iv-reels--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 280px); }
.iv-reel { display: grid; gap: 6px; }
.iv-cell {
  position: relative; aspect-ratio: 1; border-radius: 8px; background: linear-gradient(180deg, #161b29, #0f121c);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.iv-cell img { width: 86%; height: 86%; object-fit: contain; transition: transform .18s ease-out, opacity .18s ease-out; }
.iv-cell.is-spin img { opacity: .2; transform: translateY(8px) scale(.94); }
.iv-cell.is-win { box-shadow: inset 0 0 0 2px var(--iv-lamp), 0 0 18px rgba(255, 138, 61, .35); }
.iv-cell.is-struck { box-shadow: inset 0 0 0 2px var(--iv-dusk), 0 0 18px rgba(154, 140, 255, .4); }
.iv-cell.is-copied { box-shadow: inset 0 0 0 2px #5be0ff, 0 0 18px rgba(91, 224, 255, .35); }

.iv-twin { display: flex; align-items: center; gap: var(--iv-s3); flex-wrap: wrap; justify-content: center; }
.iv-twin__lbl { display: block; text-align: center; font: 600 .7rem/1.4 var(--iv-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--iv-dim); margin-bottom: 6px; }
.iv-twin__link { font: 700 1.4rem/1 var(--iv-mono); color: #5be0ff; }

.iv-train { display: flex; gap: 6px; padding: 10px; border-radius: 12px; background: #06070c; border: 1px solid var(--iv-line-2); max-width: 100%; overflow-x: auto; }
.iv-train .iv-reel { width: clamp(52px, 9vw, 84px); flex: none; }
.iv-train .iv-reel.is-new { animation: iv-couple .3s var(--iv-ease); }
@keyframes iv-couple { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.iv-train__cars { display: flex; gap: 4px; justify-content: center; font: 600 .75rem/1 var(--iv-mono); color: var(--iv-dim); }
.iv-train__cars span { width: 22px; height: 8px; border-radius: 3px; background: var(--iv-line); }
.iv-train__cars span.is-on { background: var(--iv-lamp); }

.iv-bonusbar { font: 700 .85rem/1.3 var(--iv-mono); color: var(--iv-dusk-2); letter-spacing: .06em; text-transform: uppercase; margin: 0; }

/* ---------- cards ---------- */

.iv-table { display: grid; gap: var(--iv-s4); width: 100%; max-width: 640px; }
.iv-hand { display: grid; gap: var(--iv-s2); justify-items: center; }
.iv-hand__lbl { font: 600 .72rem/1.4 var(--iv-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--iv-dim); }
.iv-hand__row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 92px; }
.iv-card {
  width: 62px; height: 88px; border-radius: 8px; background: #f6f3ec; color: #16181f;
  display: flex; flex-direction: column; justify-content: space-between; padding: 6px 7px;
  font: 800 1.05rem/1 var(--iv-display); box-shadow: 0 6px 14px rgba(0, 0, 0, .45);
  animation: iv-deal .22s var(--iv-ease) both;
}
.iv-card i { font-style: normal; font-size: 1.6rem; align-self: center; }
.iv-card small { align-self: flex-end; transform: rotate(180deg); font-size: .9rem; }
.iv-card--red { color: #c8232f; }
.iv-card--back { background: repeating-linear-gradient(45deg, #2b3350 0 6px, #222941 6px 12px); border: 2px solid #46506f; }
.iv-card.is-dim { opacity: .35; }
.iv-card.is-key { outline: 3px solid var(--iv-lamp); outline-offset: 1px; }
@keyframes iv-deal { from { opacity: 0; transform: translateY(-10px) scale(.95); } to { opacity: 1; transform: none; } }
.iv-handinfo { margin: 0; font: 600 .85rem/1.4 var(--iv-mono); color: var(--iv-mute); min-height: 1.4em; text-align: center; }

/* ---------- dice ---------- */

.iv-dice { display: flex; gap: var(--iv-s3); flex-wrap: wrap; justify-content: center; }
.iv-die {
  position: relative; width: 70px; height: 70px; border-radius: 14px; border: 2px solid #4a5476;
  background: linear-gradient(145deg, #2b3247, #171b28); cursor: default; padding: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); place-items: center;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .08), 0 8px 18px rgba(0, 0, 0, .45);
  transition: transform .14s ease-out, border-color .14s ease-out, box-shadow .14s ease-out;
}
button.iv-die { cursor: pointer; }
.iv-die .pip { width: 12px; height: 12px; border-radius: 50%; background: var(--iv-lamp); box-shadow: 0 0 8px rgba(255, 138, 61, .7); }
.iv-die.is-held { border-color: var(--iv-go); box-shadow: 0 0 0 3px rgba(95, 227, 161, .25), 0 8px 18px rgba(0, 0, 0, .45); transform: translateY(-4px); }
.iv-die.is-held::after { content: "HELD"; position: absolute; bottom: -20px; left: 0; right: 0; font: 700 .62rem/1 var(--iv-mono); letter-spacing: .12em; color: var(--iv-go); }
.iv-die.is-banked { border-color: var(--iv-dusk); }
.iv-die.is-banked::after { content: attr(data-role); position: absolute; bottom: -20px; left: -10px; right: -10px; font: 700 .62rem/1 var(--iv-mono); letter-spacing: .1em; color: var(--iv-dusk-2); text-transform: uppercase; }
.iv-die.is-roll { animation: iv-tumble .3s ease-out; }
@keyframes iv-tumble { 0% { transform: rotate(-12deg) scale(.9); opacity: .4; } 100% { transform: none; opacity: 1; } }
.iv-die .p1 { grid-area: 1 / 1; } .iv-die .p2 { grid-area: 1 / 3; } .iv-die .p3 { grid-area: 2 / 1; }
.iv-die .p4 { grid-area: 2 / 2; } .iv-die .p5 { grid-area: 2 / 3; } .iv-die .p6 { grid-area: 3 / 1; } .iv-die .p7 { grid-area: 3 / 3; }
.iv-steps { display: flex; gap: var(--iv-s2); list-style: none; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.iv-steps li { margin: 0; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--iv-line-2); font: 600 .75rem/1.3 var(--iv-mono); color: var(--iv-dim); }
.iv-steps li.is-done { border-color: var(--iv-dusk); color: var(--iv-dusk-2); }

/* ---------- logbook ---------- */

.iv-rankbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; list-style: none; padding: 0; margin: var(--iv-s4) 0; }
.iv-rankbar li { margin: 0; padding: var(--iv-s3) var(--iv-s2); background: var(--iv-panel-2); border-radius: 6px; text-align: center; font: 600 .75rem/1.3 var(--iv-mono); color: var(--iv-dim); border-bottom: 3px solid var(--iv-line-2); }
.iv-rankbar li b { display: block; font-family: var(--iv-display); font-size: .95rem; color: var(--iv-mute); }
.iv-rankbar li.is-past { border-bottom-color: var(--iv-dusk); }
.iv-rankbar li.is-now { border-bottom-color: var(--iv-lamp); background: rgba(255, 138, 61, .1); }
.iv-rankbar li.is-now b { color: var(--iv-ink); }
.iv-insignia { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--iv-s3); list-style: none; padding: 0; }
.iv-insignia li {
  margin: 0; padding: var(--iv-s4); border-radius: 10px; background: var(--iv-panel); border: 1px solid var(--iv-line);
  background-image: radial-gradient(circle at 10px 10px, var(--iv-line-2) 2px, transparent 3px), radial-gradient(circle at calc(100% - 10px) 10px, var(--iv-line-2) 2px, transparent 3px);
}
.iv-insignia li b { display: block; font-family: var(--iv-display); margin-top: var(--iv-s2); }
.iv-insignia li span { display: block; font-size: .85rem; color: var(--iv-mute); }
.iv-insignia li.is-earned { border-color: var(--iv-lamp); }
.iv-insignia li.is-earned b::after { content: " ✓"; color: var(--iv-lamp); }
.iv-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--iv-s5); align-items: start; }

/* ---------- forms and Safer Play tools ---------- */

.iv-form { display: grid; gap: var(--iv-s4); }
.iv-form label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.iv-form input[type="text"], .iv-form input[type="email"], .iv-form input[type="time"], .iv-form select, .iv-form textarea {
  width: 100%; padding: 11px 12px; border-radius: var(--iv-r); border: 1px solid var(--iv-line-2);
  background: #0c0f18; color: var(--iv-ink); font: 400 1rem/1.4 var(--iv-sans);
}
.iv-form textarea { resize: vertical; min-height: 140px; }
.iv-tick { display: flex !important; grid-template-columns: none; gap: var(--iv-s2) !important; align-items: flex-start; font-weight: 400 !important; }
.iv-tick input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--iv-lamp); }
.iv-err { display: block; color: #ffb3b3; font-weight: 600; font-size: .85rem; }
.iv-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--iv-s4); }
.iv-tool h3 { display: flex; align-items: center; gap: var(--iv-s2); }
.iv-tool__now { font: 600 .85rem/1.4 var(--iv-mono); color: var(--iv-dusk-2); margin-bottom: var(--iv-s3); }
.iv-choices { display: flex; flex-wrap: wrap; gap: var(--iv-s2); margin-bottom: var(--iv-s3); }
.iv-choice { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--iv-line-2); background: var(--iv-panel-2); color: var(--iv-ink); font: 600 .88rem/1 var(--iv-sans); cursor: pointer; transition: border-color .14s ease-out, background-color .14s ease-out; }
.iv-choice:hover { border-color: var(--iv-dusk); }
.iv-choice[aria-pressed="true"] { border-color: var(--iv-lamp); background: rgba(255, 138, 61, .15); }
.iv-inline { display: flex; flex-wrap: wrap; gap: var(--iv-s2); align-items: center; }
.iv-inline input[type="time"] { width: auto; padding: 9px 10px; border-radius: var(--iv-r); border: 1px solid var(--iv-line-2); background: #0c0f18; color: var(--iv-ink); font: 600 1rem/1 var(--iv-mono); }

.iv-quiz { counter-reset: q; list-style: none; padding: 0; display: grid; gap: var(--iv-s3); }
.iv-quiz li { counter-increment: q; margin: 0; padding: var(--iv-s4); border: 1px solid var(--iv-line); border-radius: var(--iv-r); background: var(--iv-panel); }
.iv-quiz li > p::before { content: counter(q, decimal-leading-zero) "  "; font-family: var(--iv-mono); color: var(--iv-lamp); }
.iv-quiz fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--iv-s2); }
.iv-quiz legend { position: absolute; left: -9999px; }
.iv-quiz label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--iv-line-2); font-size: .88rem; cursor: pointer; }
.iv-quiz input { accent-color: var(--iv-lamp); }
.iv-result { margin-top: var(--iv-s4); }

.iv-orgs { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--iv-s3); list-style: none; padding: 0; }
.iv-orgs li { margin: 0; padding: var(--iv-s4); border-radius: var(--iv-r); border: 1px solid var(--iv-line); background: var(--iv-panel); }
.iv-orgs b { display: block; font-family: var(--iv-display); font-size: 1.05rem; }
.iv-orgs span { display: block; color: var(--iv-mute); font-size: .9rem; margin: 4px 0 var(--iv-s2); }

.iv-address { font-style: normal; }

/* ---------- footer, consent, dialogs, toast ---------- */

.iv-foot { border-top: 1px solid var(--iv-line); background: #07080d; padding: var(--iv-s7) var(--iv-s4) var(--iv-s6); font-size: .92rem; }
.iv-foot > div { max-width: var(--iv-wide); margin: 0 auto; }
.iv-foot__plate { padding: var(--iv-s4) var(--iv-s5); border: 1px solid var(--iv-line-2); border-radius: var(--iv-r-lg); background: var(--iv-panel); margin-bottom: var(--iv-s6) !important; }
.iv-foot__plate p:last-child { margin-bottom: 0; color: var(--iv-mute); }
.iv-foot__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr); gap: var(--iv-s5); }
.iv-foot__h { font: 700 .74rem/1.4 var(--iv-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--iv-dim); margin-bottom: var(--iv-s3); }
.iv-foot ul { list-style: none; padding: 0; }
.iv-foot li { margin-bottom: var(--iv-s2); color: var(--iv-mute); }
.iv-foot a { color: var(--iv-ink); }
.iv-foot__base { margin-top: var(--iv-s5) !important; padding-top: var(--iv-s4); border-top: 1px solid var(--iv-line); color: var(--iv-dim); font-size: .85rem; }

.iv-consent {
  position: fixed; left: var(--iv-s4); bottom: var(--iv-s4); z-index: 60; width: min(440px, calc(100vw - 32px));
  padding: var(--iv-s5); border-radius: var(--iv-r-lg); background: var(--iv-panel-2); border: 1px solid var(--iv-line-2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .55); font-size: .92rem;
}
.iv-consent__t { font: 800 1.05rem/1.3 var(--iv-display); margin-bottom: var(--iv-s2); }
.iv-consent__btns { display: flex; gap: var(--iv-s2); }

.iv-sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: var(--iv-s4); background: rgba(5, 6, 10, .86); backdrop-filter: blur(6px); }
.iv-sheet[hidden] { display: none; }
.iv-sheet__card { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; padding: var(--iv-s6); border-radius: var(--iv-r-lg); background: var(--iv-panel); border: 1px solid var(--iv-line-2); animation: iv-sheet-in .22s var(--iv-ease); }
.iv-sheet__card--gate { text-align: center; }
.iv-sheet__card--gate img { margin: 0 auto var(--iv-s4); }
.iv-sheet__card[hidden] { display: none; }
@keyframes iv-sheet-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.iv-sheet__t { font: 800 1.4rem/1.25 var(--iv-display); margin-bottom: var(--iv-s3); }
.iv-sheet__btns { display: flex; flex-direction: column; gap: var(--iv-s2); margin: var(--iv-s4) 0; }
.iv-sheet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--iv-s2); margin: var(--iv-s4) 0; }

.iv-toast {
  position: fixed; left: 50%; bottom: var(--iv-s5); z-index: 90; margin: 0; max-width: min(520px, calc(100vw - 32px));
  padding: var(--iv-s3) var(--iv-s5); border-radius: 999px; background: #f1efe9; color: #15171e; font-weight: 600; font-size: .92rem;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: transform .2s ease-out, opacity .2s ease-out;
}
.iv-toast.is-up { transform: translate(-50%, 0); opacity: 1; }

.iv-locked .iv-go, .iv-locked .iv-alt { opacity: .45; }

.iv-calm *, .iv-calm *::before, .iv-calm *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Games Hub: the reading lounge ---------- */

.iv-skin-hub .iv-main {
  --hub-paper: #f5efe4;
  --hub-card: #fffaf1;
  --hub-ink: #23211c;
  --hub-mute: #5d584e;
  --hub-line: #ddd2bf;
  --hub-moss: #2f6b4f;
  --hub-clay: #b4532a;
  max-width: none;
  padding: 0 0 var(--iv-s8);
  background: var(--hub-paper);
  color: var(--hub-ink);
}
.iv-skin-hub .iv-main > * { max-width: var(--iv-wide); margin-left: auto; margin-right: auto; padding-left: var(--iv-s4); padding-right: var(--iv-s4); }
.iv-skin-hub .iv-trail { padding-top: var(--iv-s5); }
.iv-skin-hub .iv-trail ol, .iv-skin-hub .iv-trail a { color: var(--hub-mute); }
.iv-skin-hub .iv-main h1, .iv-skin-hub .iv-main h2, .iv-skin-hub .iv-main h3 { font-family: "Iowan Old Style", "Charter", "Georgia", serif; font-weight: 700; letter-spacing: 0; }
.iv-skin-hub .iv-main a { color: var(--hub-moss); }
.iv-skin-hub .iv-main a:hover { color: #1d4733; }
.iv-skin-hub .iv-kicker { color: var(--hub-clay); }
.iv-skin-hub .iv-lead { color: #3c382f; }
.iv-skin-hub .iv-small { color: var(--hub-mute); }
.iv-skin-hub :focus-visible { outline-color: var(--hub-moss); }

.iv-hubnav { display: flex; flex-wrap: wrap; gap: var(--iv-s2); margin-bottom: var(--iv-s5); font: 600 .85rem/1.4 var(--iv-mono); }
.iv-hubnav a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--hub-line); text-decoration: none; background: var(--hub-card); }
.iv-hubnav a[aria-current="page"] { background: var(--hub-ink); color: var(--hub-paper) !important; border-color: var(--hub-ink); }

.iv-hubhero { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--iv-s6); align-items: center; margin-bottom: var(--iv-s7); }
.iv-hubhero img { border-radius: 18px; box-shadow: 0 18px 40px rgba(60, 45, 20, .18); }

.iv-hubtools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--iv-s4); margin-bottom: var(--iv-s7); }
.iv-hubbox { padding: var(--iv-s5); border-radius: 16px; background: var(--hub-card); border: 1px solid var(--hub-line); }
.iv-hubbox h2 { font-size: 1.4rem; }
.iv-hubbox p { color: var(--hub-mute); }
.iv-hubpills { display: flex; flex-wrap: wrap; gap: var(--iv-s2); margin-bottom: var(--iv-s3); }
.iv-hubpill { min-height: 40px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--hub-line); background: #fff; color: var(--hub-ink); font: 600 .9rem/1 var(--iv-sans); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; transition: border-color .14s ease-out, background-color .14s ease-out; }
.iv-hubpill:hover { border-color: var(--hub-moss); }
.iv-hubpill[aria-pressed="true"], .iv-hubpill.is-on { background: var(--hub-moss); border-color: var(--hub-moss); color: #fff !important; }
.iv-setlist { list-style: none; padding: 0; margin: var(--iv-s3) 0 0; counter-reset: set; }
.iv-setlist li { counter-increment: set; margin: 0; padding: var(--iv-s3) 0; border-top: 1px dashed var(--hub-line); display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: var(--iv-s2); }
.iv-setlist li::before { content: counter(set, decimal-leading-zero); font: 700 .85rem/1.6 var(--iv-mono); color: var(--hub-clay); }
.iv-setlist li.is-rest::before { content: "··"; color: var(--hub-mute); }
.iv-setlist b { display: block; }
.iv-setlist span { color: var(--hub-mute); font-size: .9rem; }

.iv-shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--iv-s5); }
.iv-shelfcard { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: var(--iv-s4); padding: var(--iv-s4); border-radius: 16px; background: var(--hub-card); border: 1px solid var(--hub-line); }
.iv-shelfcard[hidden] { display: none; }
.iv-shelfcard__art img { border-radius: 10px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.iv-shelfcard__no { font: 700 .75rem/1.4 var(--iv-mono); letter-spacing: .1em; color: var(--hub-clay); margin: 0 0 4px; }
.iv-shelfcard h3 { margin-bottom: var(--iv-s2); font-size: 1.35rem; }
.iv-shelfcard p { font-size: .95rem; color: #3f3b33; }
.iv-shelfcard dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--iv-s3); margin: 0 0 var(--iv-s3); font-size: .85rem; }
.iv-shelfcard dt { color: var(--hub-mute); }
.iv-shelfcard dd { margin: 0; }
.iv-shelfcard__acts { display: flex; flex-wrap: wrap; gap: var(--iv-s2); }
.iv-hubtags { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; padding: 0; margin: 0 0 var(--iv-s2); }
.iv-hubtags li { margin: 0; padding: 1px 8px; border-radius: 999px; background: #ece2cf; font: 600 .72rem/1.6 var(--iv-mono); color: #4d473b; }
.iv-hubbtn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 16px; border-radius: 999px; font: 700 .9rem/1.2 var(--iv-sans); text-decoration: none; border: 1px solid var(--hub-ink); transition: background-color .14s ease-out, color .14s ease-out; }
.iv-hubbtn--solid { background: var(--hub-ink); color: var(--hub-paper) !important; }
.iv-hubbtn--solid:hover { background: var(--hub-moss); border-color: var(--hub-moss); }
.iv-hubbtn--line { background: transparent; color: var(--hub-ink) !important; }
.iv-hubbtn--line:hover { background: #ece2cf; }
.iv-score { font: 700 .95rem/1 var(--iv-mono); color: var(--hub-clay); }

.iv-hubrules { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--iv-s4); list-style: none; padding: 0; }
.iv-hubrules li { margin: 0; padding: var(--iv-s5); border-radius: 16px; background: var(--hub-card); border: 1px solid var(--hub-line); }
.iv-hubrules b { display: block; font-family: "Iowan Old Style", "Charter", "Georgia", serif; font-size: 1.1rem; margin-bottom: 4px; }
.iv-hubrules span { color: var(--hub-mute); font-size: .93rem; }

.iv-review { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--iv-s6); align-items: start; }
.iv-review__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--iv-s5); align-items: center; margin-bottom: var(--iv-s6); }
.iv-review__head img { border-radius: 16px; }
.iv-review__body { font-size: 1.05rem; }
.iv-review__body p { color: #34302a; }
.iv-review__body h2 { margin-top: var(--iv-s6); font-size: 1.5rem; }
.iv-factcard { position: sticky; top: 96px; padding: var(--iv-s5); border-radius: 16px; background: var(--hub-card); border: 1px solid var(--hub-line); }
.iv-factcard dl { margin: 0 0 var(--iv-s4); }
.iv-factcard dl > div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: var(--iv-s2); padding: 8px 0; border-bottom: 1px solid var(--hub-line); font-size: .92rem; }
.iv-factcard dt { color: var(--hub-mute); font-weight: 600; }
.iv-factcard dd { margin: 0; }
.iv-stopnote { padding: var(--iv-s4); border-left: 4px solid var(--hub-clay); background: #fbeee0; border-radius: 0 12px 12px 0; }
.iv-hubmore { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--iv-s4); list-style: none; padding: 0; }
.iv-hubmore li { margin: 0; }
.iv-hubmore a { display: block; padding: var(--iv-s3); border-radius: 14px; background: var(--hub-card); border: 1px solid var(--hub-line); text-decoration: none; color: var(--hub-ink) !important; }
.iv-hubmore img { border-radius: 10px; margin-bottom: var(--iv-s2); }
.iv-hubmore b { display: block; font-family: "Iowan Old Style", "Charter", "Georgia", serif; }
.iv-hubmore span { color: var(--hub-mute); font-size: .88rem; }

/* ---------- smaller screens ---------- */

@media (max-width: 1240px) {
  .iv-hud__shift { display: none; }
  .iv-hud__bolts small { display: none; }
}

@media (max-width: 1100px) {
  .iv-shift { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .iv-shift__acts { grid-column: 1 / -1; justify-content: flex-start; }
  .iv-wagons { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  .iv-top__row { flex-wrap: wrap; gap: var(--iv-s2) var(--iv-s3); }
  .iv-hud { margin-left: auto; }
  .iv-nav { order: 3; flex-basis: 100%; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--iv-s4) * -1); padding: 0 var(--iv-s4) 2px; }
  .iv-nav::-webkit-scrollbar { display: none; }
  .iv-roundhouse, .iv-roundhouse__intro { grid-template-columns: minmax(0, 1fr); }
  .iv-bay { grid-template-columns: minmax(0, 1fr); }
  .iv-stallbody { grid-template-columns: minmax(0, 1fr); }
  .iv-specplate, .iv-factcard { position: static; }
  .iv-line { grid-template-columns: minmax(0, 1fr); gap: var(--iv-s3); }
  .iv-loungeband { grid-template-columns: minmax(0, 1fr); }
  .iv-loungeband img { max-height: 260px; }
  .iv-cards3, .iv-rail { grid-template-columns: minmax(0, 1fr); }
  .iv-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iv-split, .iv-tools { grid-template-columns: minmax(0, 1fr); }
  .iv-hubhero, .iv-hubtools, .iv-shelf, .iv-review, .iv-review__head { grid-template-columns: minmax(0, 1fr); }
  .iv-hubrules, .iv-hubmore { grid-template-columns: minmax(0, 1fr); }
  .iv-deck { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .iv-stake { justify-content: center; }
  .iv-stake__lbl { text-align: center; }
}

@media (max-width: 600px) {
  .iv-notice { font-size: .66rem; gap: 2px var(--iv-s2); }
  .iv-notice span + span::before { margin-right: var(--iv-s2); }
  .iv-brand__word { font-size: 1rem; }
  .iv-brand img { width: 34px; height: 34px; }
  .iv-hud__bolts small { display: none; }
  .iv-hud__pause span { display: none; }
  .iv-main { padding-top: var(--iv-s4); }
  .iv-panel { padding: var(--iv-s4); }
  .iv-ring { --ring: min(360px, 92vw); }
  .iv-stall { --size: calc(var(--ring) * .19); }
  .iv-dossier { grid-template-columns: 96px minmax(0, 1fr); gap: var(--iv-s3); }
  .iv-dossier h2 { font-size: 1.4rem; }
  .iv-shift { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iv-wagons { grid-template-columns: minmax(0, 1fr); }
  .iv-stallhead { grid-template-columns: 90px minmax(0, 1fr); padding: var(--iv-s4); gap: var(--iv-s3); }
  .iv-stage { padding: var(--iv-s3); min-height: 300px; }
  .iv-reels { gap: 4px; padding: 6px; }
  .iv-reel { gap: 4px; }
  .iv-card { width: 44px; height: 64px; font-size: .85rem; padding: 4px 5px; }
  .iv-card i { font-size: 1.15rem; }
  .iv-card small { font-size: .7rem; }
  .iv-hand__row { gap: 4px; min-height: 66px; }
  .iv-die { width: 54px; height: 54px; border-radius: 11px; }
  .iv-die .pip { width: 9px; height: 9px; }
  .iv-dice { gap: var(--iv-s2); }
  .iv-gauge { width: 72px; }
  .iv-gauge svg { width: 72px; height: 45px; }
  .iv-foot__grid { grid-template-columns: minmax(0, 1fr); }
  .iv-sheet__card { padding: var(--iv-s5); }
  .iv-sheet__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iv-rankbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .iv-shelfcard { grid-template-columns: minmax(0, 1fr); }
  .iv-timetable td:first-child { width: 40px; padding-right: 0; }
  .iv-consent { left: var(--iv-s2); bottom: var(--iv-s2); width: calc(100vw - 16px); padding: var(--iv-s4); }
}

.iv-vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.iv-gauge .needle { transform: rotate(-90deg); }
.iv-bay.is-busy .iv-stake__step { opacity: .5; }
.iv-twin > div { width: min(280px, 40vw); }
.iv-twin .iv-reels--3 { width: 100%; }
@media (max-width: 600px) { .iv-twin { gap: 6px; flex-wrap: nowrap; } .iv-twin > div { width: 44vw; } .iv-twin__link { font-size: 1rem; } }
.iv-shift--mini { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--iv-s2); }
.iv-yard > *, .iv-bay > *, .iv-stallbody > *, .iv-split > * { min-width: 0; }
.iv-stage > * { max-width: 100%; }
.iv-train .iv-reel { width: clamp(40px, 10.5vw, 84px); }
.iv-tablewrap { overflow-x: auto; max-width: 100%; }
@media (max-width: 600px) { .iv-payplate th, .iv-payplate td { padding: 6px 5px; font-size: .82rem; } .iv-payplate td img { width: 24px; height: 24px; margin-right: 4px; } }
.iv-hubtools { align-items: start; }
@media (max-width: 920px) { .iv-bay .iv-stage { order: 0; } .iv-bay .iv-locknote { order: 1; } .iv-bay .iv-deck { order: 2; } .iv-bay .iv-runsheet { order: 3; } }
.iv-reels--routes .iv-cell { outline: 0 solid transparent; }
.iv-cell.is-t1 { box-shadow: inset 0 0 0 2px rgba(255, 138, 61, .75); }
.iv-cell.is-t2 { box-shadow: inset 0 0 0 2px rgba(154, 140, 255, .8); }
.iv-cell.is-t3 { box-shadow: inset 0 0 0 2px rgba(95, 227, 161, .75); }
.iv-cell.is-t4 { box-shadow: inset 0 0 0 2px rgba(91, 224, 255, .75); }
.iv-cell.is-junction::after { content: "×2"; position: absolute; top: 4px; right: 5px; font: 800 .7rem/1 var(--iv-mono); color: #fff; background: var(--iv-lamp); padding: 2px 4px; border-radius: 4px; }
.iv-cell.is-win { background: linear-gradient(180deg, #2a2135, #1a1422); }
.iv-routekey { display: flex; gap: var(--iv-s3); flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; margin: 0; font: 600 .74rem/1.3 var(--iv-mono); color: var(--iv-mute); }
.iv-routekey li { margin: 0; display: flex; align-items: center; gap: 6px; }
.iv-routekey i { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.iv-routekey .k1 { background: var(--iv-lamp); } .iv-routekey .k2 { background: var(--iv-dusk); } .iv-routekey .k3 { background: var(--iv-go); } .iv-routekey .k4 { background: #5be0ff; }
.iv-calls { display: flex; gap: var(--iv-s2); flex-wrap: wrap; justify-content: center; }
.iv-calls__lbl { width: 100%; text-align: center; font: 600 .72rem/1.3 var(--iv-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--iv-dim); }
.iv-hazard__state { display: flex; gap: var(--iv-s2); flex-wrap: wrap; justify-content: center; list-style: none; padding: 0; margin: 0; }
.iv-hazard__state li { margin: 0; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--iv-line-2); font: 700 .8rem/1.3 var(--iv-mono); color: var(--iv-mute); }
.iv-hazard__state li b { color: var(--iv-ink); }
.iv-timeset { display: flex; flex-wrap: wrap; gap: var(--iv-s3); align-items: end; margin-bottom: var(--iv-s3); }
.iv-timeset label { display: grid; gap: 4px; font: 600 .85rem/1.3 var(--iv-sans); color: var(--hub-mute); }
.iv-timeset input { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--hub-line); background: #fff; color: var(--hub-ink); font: 700 1rem/1 var(--iv-mono); }
.iv-departures { width: 100%; border-collapse: collapse; font-size: .9rem; background: #23211c; color: #f5efe4; border-radius: 12px; overflow: hidden; }
.iv-departures th { text-align: left; padding: 8px 10px; font: 700 .7rem/1.3 var(--iv-mono); letter-spacing: .12em; text-transform: uppercase; color: #e9b48f; border-bottom: 1px solid #3b372f; }
.iv-departures td { padding: 8px 10px; border-bottom: 1px dashed #3b372f; vertical-align: top; }
.iv-departures td:nth-child(-n+2) { font: 700 .9rem/1.4 var(--iv-mono); color: #ffd9a8; white-space: nowrap; }
.iv-departures td:nth-child(3) { font-weight: 700; }
.iv-departures tr.is-rest td { color: #b7ad9c; font-style: italic; }
@media (max-width: 600px) { .iv-departures td:nth-child(4), .iv-departures th:nth-child(4) { display: none; } }
