:root {
  --ink: #140e0a;
  --ink-soft: #3a2d24;
  --paper: #f3e6cc;
  --cream: #f6edd9;
  --desk: #241c16;
  --burgundy: #7a1f2c;
  --brass: #e8b86d;
  --tobacco: #6b4a30;
  --forest: #1f4638;
  --type-display: "Literata", "Times New Roman", serif;
  --type-ui: "Source Sans 3", "Segoe UI", sans-serif;
  --type-mono: "IBM Plex Mono", ui-monospace, monospace;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--desk); }
body {
  font-family: var(--type-ui);
  color: var(--ink);
  background: var(--desk);
  letter-spacing: 0;
  overflow-x: hidden;
}
button, input { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; }
.plaque__bar,
.plaque__back,
.lot__open,
.lot__join,
.journal-fab,
.chip,
.draw__x,
.journal__close {
  -webkit-tap-highlight-color: transparent;
}
button { cursor: pointer; }
a { color: inherit; }
img, video { max-width: 100%; }

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: 12px;
  top: 12px;
  z-index: 80;
  background: var(--cream);
  color: var(--ink);
  padding: 8px;
}
:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

/* tooth on paper only */
.entry__card::after,
.slip__paper::after,
.journal::after,
.plaque__bar::after,
.lot__band::after,
.stub__panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ========== PARTNER SLIPS ========== */
/* Desktop: large card over the hall. The 25dvh strip is phone-only. */
.gate {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #120e0b;
  overflow: auto;
}
.gate__stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.gate__stage img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.gate__copy { display: none; }
.gate__copy h1,
.hero__poster h1 {
  margin: 0;
  max-width: 16ch;
  font-family: var(--type-display);
  font-weight: 520;
  font-size: clamp(2.4rem, 4.6vw, 4.6rem);
  line-height: 0.98;
  letter-spacing: 0;
  color: #f6edd9;
  text-shadow: 0 12px 28px rgba(8, 6, 4, 0.45);
}
.gate .hero__stamp,
.hero__poster .hero__stamp {
  position: static;
  margin: 0;
  color: rgba(246, 237, 217, 0.82);
}
.slip {
  position: relative;
  z-index: 2;
  width: min(960px, 94vw);
  min-height: min(72vh, 620px);
  color: #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.slip__paper { position: relative; height: 100%; }
.slip__pic {
  min-height: 100%;
  overflow: hidden;
  background: #111;
}
.slip__pic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.slip__line,
.slip__more,
.slip__sign {
  font-family: var(--type-display);
  letter-spacing: 0;
  margin: 0;
  overflow-wrap: break-word;
  max-width: 100%;
}
.slip__mark {
  margin: 10px 0 0;
  max-width: 100%;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  letter-spacing: 0;
  overflow-wrap: break-word;
}
.slip--alfa .slip__mark { color: #140e0a; }
.slip__x {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  border: 0;
  background: #fff;
  color: #111;
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.slip__x {
  visibility: hidden;
  pointer-events: none;
}
.slip.is-armed .slip__x {
  visibility: visible;
  pointer-events: auto;
}

.slip--alfa {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  background: #ef3124;
}
.slip--alfa .slip__pic { background: #ef3124; }
.slip--alfa .slip__pic img {
  object-fit: cover;
  object-position: center center;
}
.slip--alfa .slip__paper {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 64px 56px 28px 28px;
  background: #ef3124;
  box-shadow: inset 0 -8px 0 #111;
}
.slip--alfa .slip__line {
  font-size: clamp(1.8rem, 2.8vw, 2.7rem);
  line-height: 1.05;
  max-width: 11ch;
}
.slip--alfa .slip__more { font-size: 1.2rem; line-height: 1.3; }
.slip--alfa .slip__sign { margin-top: 18px; font-size: 1.25rem; font-weight: 700; }

.slip--vtb {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #0033a0;
}
.slip--vtb .slip__pic {
  order: 2;
  display: grid;
  place-items: center;
  background: #001433;
}
.slip--vtb .slip__pic img {
  width: min(88%, 460px);
  height: 78%;
  max-height: 100%;
  object-fit: contain;
  object-position: center center;
}
.slip--vtb .slip__paper {
  min-height: min(72vh, 620px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(64px, 7vw, 84px) clamp(56px, 6vw, 84px) clamp(36px, 6vw, 72px);
  background: #0033a0;
}
.slip--vtb .slip__line {
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
  line-height: 1.02;
  max-width: 11ch;
}
.slip__rule {
  display: block;
  width: min(180px, 46%);
  height: 0;
  margin: 22px 0 18px;
  border: 0;
  border-top: 3px solid #00a0e3;
}
.slip--vtb .slip__more { font-size: 1.35rem; }
.slip--vtb .slip__sign { margin-top: 28px; font-size: 1.35rem; font-weight: 700; }

.slip--gpb {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  background: #0c2340;
  border-left: 8px solid #f15a22;
  box-shadow: var(--shadow);
}
.slip--gpb .slip__pic {
  width: 100%;
  min-height: 0;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #061526;
}
.slip--gpb .slip__pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  background: #061526;
}
.slip--gpb .slip__paper {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 64px 56px 32px 28px;
  background: #0c2340;
}
.slip--gpb .slip__line {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1.15;
  max-width: 22ch;
}
.slip--gpb .slip__sign {
  align-self: flex-end;
  margin-top: 28px;
  font-size: 1.25rem;
  font-weight: 700;
  color: #f15a22;
}
.slip--gpb .slip__mark { align-self: flex-start; color: rgba(255, 255, 255, 0.7); }

/* ========== AUTH ========== */
.entry {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--desk);
}
.entry__card {
  position: relative;
  width: min(560px, 94vw);
  background: var(--paper);
  color: var(--ink);
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 0 100%);
}
.entry__card::before {
  content: "К-00";
  position: absolute;
  top: 14px;
  right: 36px;
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--tobacco);
}
.entry__kicker {
  margin: 0 0 8px;
  font-family: var(--type-ui);
  font-size: 14px;
  letter-spacing: 0;
  color: var(--burgundy);
}
.entry__title {
  font-family: var(--type-display);
  font-size: clamp(1.6rem, 3vw, 2.15rem);
  font-weight: 480;
  margin: 0 0 10px;
  line-height: 1.15;
  letter-spacing: 0;
}
.entry__lead {
  margin: 0 0 22px;
  color: var(--ink-soft);
  max-width: 38ch;
  line-height: 1.45;
  letter-spacing: 0;
}
.entry__ops { display: grid; gap: 10px; }
.entry__ops button {
  border: 0;
  text-align: left;
  padding: 14px 16px;
  background: #fff8ea;
  box-shadow: inset 0 0 0 1px rgba(20, 14, 10, 0.12);
}
.entry__ops button strong { display: block; font-size: 1.05rem; letter-spacing: 0; }
.entry__ops button span { color: var(--ink-soft); font-size: 0.95rem; }
.entry__ops button:hover { background: #fff; }
.entry__guest { background: var(--forest) !important; color: var(--cream) !important; }
.entry__guest span { color: #d8c7a6 !important; }

.stub {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  background: rgba(8, 10, 8, 0.55);
}
.stub__panel {
  position: relative;
  width: min(420px, 92vw);
  background: var(--cream);
  padding: 24px;
  box-shadow: var(--shadow);
}
.stub__panel h2 {
  font-family: var(--type-display);
  margin: 0 0 8px;
  letter-spacing: 0;
}
.stub__panel p { margin: 0 0 16px; color: var(--ink-soft); line-height: 1.45; }

/* ========== APP ========== */
.app { min-height: 100vh; }
.mast {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding:
    calc(18px + env(safe-area-inset-top, 0px))
    calc(clamp(16px, 2.4vw, 40px) + env(safe-area-inset-right, 0px))
    10px
    calc(clamp(16px, 2.4vw, 40px) + env(safe-area-inset-left, 0px));
  color: var(--cream);
}
.mast__brand { text-decoration: none; color: inherit; }
.mast__mark {
  display: block;
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
}
.mast__name {
  display: block;
  font-family: var(--type-display);
  font-weight: 480;
  font-size: clamp(1.45rem, 2.2vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0;
  max-width: 22ch;
}
.mast__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chip {
  font-family: var(--type-ui);
  font-size: 14px;
  letter-spacing: 0;
  padding: 6px 10px;
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(239, 226, 200, 0.35);
}
.chip--paper { background: var(--paper); color: var(--ink); border: 0; }
.chip[data-who] {
  border: 0;
  padding-left: 0;
  padding-right: 4px;
  color: rgba(239, 226, 200, 0.72);
}

/* HERO — still is in flow so the frame cannot collapse */
.hero {
  margin: 8px clamp(16px, 2vw, 28px) 12px;
}
.hero__ad {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
  max-width: calc(100% - 20px);
  margin: 0 10px 8px;
  min-height: 76px;
  padding: 14px 22px;
  color: #fff;
  background: #ef3124;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 230, 0.35),
    inset 0 -5px 0 #111;
  overflow-wrap: break-word;
}
.hero__ad[data-tone="vtb"] {
  background: #0033a0;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 230, 0.35),
    inset 0 -5px 0 #00a0e3;
}
.hero__ad[data-tone="gpb"] {
  background: #0c2340;
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 230, 0.35),
    inset 8px 0 0 #f15a22;
}
.hero__ad-tag {
  flex: none;
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}
.hero__ad[data-tone="alfa"] .hero__ad-tag { color: #140e0a; opacity: 1; }
.hero__ad-line {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--type-display);
  font-size: clamp(1.15rem, 2vw, 1.65rem);
  line-height: 1.2;
  letter-spacing: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.hero__ad-bank {
  flex: none;
  max-width: 100%;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow-wrap: break-word;
}
.hero__ad-bank::after {
  content: "Концепция партнёрской интеграции";
  display: block;
  margin-top: 3px;
  font-family: var(--type-mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none;
  opacity: 0.72;
}
.hero__frame {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background: var(--desk);
}
.hero__media--still {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center center;
  animation: none;
  transform: none;
}
.hero__media--video {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media--video:not([src]),
.hero__media--video[hidden] { display: none !important; }
.hero__stamp {
  position: absolute;
  z-index: 4;
  left: 16px;
  bottom: 16px;
  margin: 0;
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  border: 1px solid rgba(239, 226, 200, 0.45);
  padding: 6px 8px;
}
.hero__poster {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 22px 22px 18px;
  background: linear-gradient(180deg, rgba(12, 8, 6, 0) 18%, rgba(12, 8, 6, 0.78) 100%);
  pointer-events: none;
}
.hero__poster .hero__stamp { position: static; }

/* STAGE */
.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 420px);
  column-gap: 16px;
  align-items: stretch;
  padding: 0 clamp(16px, 2vw, 28px) 40px;
}
.catalogue {
  grid-column: 1;
  grid-row: 1;
  align-self: stretch;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: transparent;
  box-shadow: none;
}
.plaque {
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(20, 14, 10, 0.22);
}
.journal-fab { display: none; }

.plaque__back {
  display: none;
  margin: 0 0 8px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--cream);
  font-family: var(--type-ui);
  font-size: 16px;
  letter-spacing: 0;
}
.plaque__bar,
.plaque.is-on .plaque__bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  height: auto;
  min-height: 84px;
  max-height: none;
  padding: 10px 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow:
    inset 0 1px 0 rgba(255, 248, 230, 0.55),
    inset 0 -2px 0 rgba(20, 14, 10, 0.16);
}
.plaque__name {
  flex: 1 1 auto;
  min-width: 0;
  font-family: var(--type-display);
  font-weight: 480;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: break-word;
}
.plaque__sig {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  display: block;
}
.plaque__sig img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.plaque__mark {
  position: relative;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
  align-self: center;
}
.plaque__mark::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  transform: translate(-50%, -50%);
}
.plaque.is-on .plaque__mark {
  background: var(--burgundy);
  border-color: var(--burgundy);
}
.plaque.is-on .plaque__mark::after { opacity: 0; }
.plaque[data-cat="health"] .plaque__sig::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: 30%;
  top: 22%;
  width: 40%;
  height: 52%;
  border-radius: 50%;
  background: rgba(36, 28, 22, 0.55);
  mix-blend-mode: multiply;
  pointer-events: none;
}

.ladder {
  --lot-photo: 232px;
  --lot-row: 174px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 100%;
  padding: 0;
  background: transparent;
}
.ladder.is-reveal .lot:not(.is-open) { display: none; }

.lot {
  position: relative;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: auto;
  overflow: visible;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border-top: 1px solid rgba(20, 14, 10, 0.14);
}
.lot:not(.is-open) {
  height: var(--lot-row);
  min-height: var(--lot-row);
}
.lot.is-open {
  height: auto;
  max-height: none;
  overflow: visible;
  scroll-margin-top: 8px;
}

.lot__open {
  display: grid;
  grid-template-columns: var(--lot-photo) minmax(0, 1fr);
  align-items: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}
.lot--paper .lot__open { grid-template-columns: minmax(0, 1fr); }
.lot__open:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: -2px;
}

.lot__still,
.lot__reveal .lot__still,
.lot[data-level="5"].is-open .lot__reveal .lot__still {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  min-width: 0;
  min-height: 0;
  max-height: none;
  align-self: stretch;
  justify-self: stretch;
  overflow: hidden;
  background-color: #efe6d4;
  background-repeat: no-repeat;
  background-size: contain !important;
  background-position: center center !important;
  background-origin: content-box;
  background-clip: content-box;
  padding: 8px;
  box-sizing: border-box;
}
.lot__copy,
.lot__band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  column-gap: 16px;
  row-gap: 3px;
  min-width: 0;
  max-width: 100%;
  padding: 12px 16px;
  background: var(--paper);
  color: var(--ink);
}
.lot__serial,
.lot__title,
.lot__sentence { grid-column: 1; }
.lot__band {
  position: relative;
  gap: 6px;
  padding: 18px 56px 18px 20px;
}

.lot__serial {
  margin: 0;
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--tobacco);
}
.lot__title {
  margin: 0;
  font-family: var(--type-display);
  font-weight: 480;
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1.15;
  color: var(--ink);
  max-width: 100%;
  overflow: visible;
  overflow-wrap: break-word;
}
.lot__line,
.lot__stake,
.lot__seats,
.lot__in {
  margin: 0;
  letter-spacing: 0;
  color: var(--ink);
}
.lot__line {
  grid-column: 2;
  grid-row: 1 / span 3;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  row-gap: 2px;
  min-width: 0;
  max-width: 100%;
  text-align: right;
}
.lot__stake::after { content: none; }
.lot__line,
.lot__stake,
.lot__seats {
  font-family: var(--type-mono);
  font-size: 15px;
  line-height: 1.35;
}
.lot__in {
  font-family: var(--type-ui);
  font-size: 16px;
  line-height: 1.45;
}

.lot__reveal {
  position: relative;
  display: grid;
  grid-template-columns: var(--lot-photo) minmax(0, 1fr);
  align-items: stretch;
  background: var(--paper);
  color: var(--ink);
  min-height: var(--lot-row);
  overflow: visible;
}
.lot--paper .lot__reveal { grid-template-columns: minmax(0, 1fr); }
.lot.is-open .lot__reveal {
  grid-template-columns: minmax(280px, 42%) minmax(0, 1fr);
  min-height: 280px;
}
.lot.is-open .lot__still {
  min-height: 280px;
}
.lot__sentence {
  margin: 0;
  font-family: var(--type-ui);
  font-size: 17px;
  line-height: 1.35;
  letter-spacing: 0;
  max-width: 100%;
  overflow: visible;
  overflow-wrap: break-word;
}
.lot__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  box-shadow: 0 0 0 2px var(--cream);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.lot__join {
  justify-self: start;
  margin-top: 8px;
  padding: 12px 16px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-family: var(--type-display);
  letter-spacing: 0;
}
.lot[data-level="5"] .lot__join {
  background: var(--brass);
  border-color: var(--brass);
  color: #1a120c;
  padding: 14px 18px;
}
.lot__in { margin-top: 8px; }

/* JOURNAL */
.journal {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  top: auto;
  align-self: stretch;
  width: auto;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  justify-self: stretch;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 10px 28px rgba(20, 14, 10, 0.28);
}
.journal__head {
  padding: 20px 20px 12px;
  border-bottom: 1px solid rgba(20, 14, 10, 0.2);
}
.journal__head h2 {
  margin: 0;
  font-family: var(--type-display);
  font-weight: 480;
  font-size: 22px;
  letter-spacing: 0;
  line-height: 1.15;
}
.journal__head p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--ink-soft);
}
.journal__mark {
  margin: 0;
  padding: 10px 20px 14px;
  font-family: var(--type-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tobacco);
}
.journal__close {
  display: none;
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  text-decoration: underline;
  font-size: 15px;
}
.journal__feed {
  flex: 1;
  overflow: auto;
  padding: 0 20px 8px;
  min-height: 120px;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 47px,
    rgba(20, 14, 10, 0.12) 48px
  );
}
.line {
  display: flex;
  gap: 10px;
  align-items: baseline;
  margin: 0;
  padding: 12px 0;
  border-bottom: 1px solid rgba(20, 14, 10, 0.16);
  font-family: var(--type-ui);
  font-size: 16px;
  line-height: 1.45;
  letter-spacing: 0;
}
.line time {
  flex: none;
  font-family: var(--type-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.line b {
  flex: none;
  font-family: var(--type-display);
  font-weight: 480;
  letter-spacing: 0;
}
.line span { min-width: 0; }
.line--sys {
  display: block;
  font-family: var(--type-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--burgundy);
}
.line--sys time { margin-right: 8px; }

.foot {
  padding:
    8px
    calc(clamp(16px, 3vw, 40px) + env(safe-area-inset-right, 0px))
    calc(40px + env(safe-area-inset-bottom, 0px))
    calc(clamp(16px, 3vw, 40px) + env(safe-area-inset-left, 0px));
  color: #c9b89a;
  font-size: 0.95rem;
  line-height: 1.45;
  letter-spacing: 0;
}
.foot a { color: var(--cream); }
.byline { opacity: 0.4; font-size: 0.85rem; }

@media (min-width: 768px) {
  html, body {
    background-color: #120e0b;
    background-image: url("../assets/cinema/regen/hero-hall.jpg?v=3");
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
    background-repeat: no-repeat;
  }
  .mast {
    background: linear-gradient(180deg, rgba(18, 14, 11, 0.86), rgba(18, 14, 11, 0.28));
  }
  .hero {
    margin: 0;
    min-height: calc(100dvh - 96px);
    display: flex;
    flex-direction: column;
  }
  .hero__ad {
    max-width: min(920px, calc(100% - 48px));
    margin: 14px auto 0;
  }
  .hero__frame {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    background: transparent;
  }
  .hero__media--still {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    opacity: 0;
    pointer-events: none;
  }
  .foot {
    background: linear-gradient(180deg, rgba(12, 8, 6, 0), rgba(12, 8, 6, 0.78));
  }
}

@media (max-width: 1100px) {
  html, body { overflow-x: clip; }
  .foot a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .hero__frame { min-height: 0; }
  .hero__ad { flex-wrap: wrap; gap: 8px 14px; min-height: 0; padding: 12px 14px; }
  .hero__ad-line { flex-basis: 100%; order: 3; }
  .stage {
    display: block;
    padding:
      0
      calc(16px + env(safe-area-inset-right, 0px))
      calc(32px + env(safe-area-inset-bottom, 0px))
      calc(16px + env(safe-area-inset-left, 0px));
    overflow: visible;
  }
  .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
  }
  .catalogue, .journal { grid-column: auto; grid-row: auto; }
  .catalogue { width: 100%; }
  .plaque { width: 100%; }
  .journal { min-height: 0; }
  .journal-fab:not([hidden]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: static;
    width: auto;
    margin: 0;
    min-height: 44px;
    min-width: 44px;
    padding: 6px 10px;
    border: 1px solid rgba(239, 226, 200, 0.35);
    border-radius: 0;
    background: transparent;
    color: var(--cream);
    font-family: var(--type-ui);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    text-align: center;
    box-shadow: none;
  }
  body.is-reading .journal-fab { display: none !important; }
  .plaque.is-on .plaque__back {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
    width: 100%;
    height: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0 16px;
    border: 0;
    border-bottom: 1px solid rgba(20, 14, 10, 0.22);
    background: #e4d3b4;
    color: var(--ink);
    font-family: var(--type-ui);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0;
    text-align: left;
  }
  .plaque__back::before {
    content: "←";
    margin-right: 10px;
    font-size: 18px;
    line-height: 1;
  }
  .plaque__bar,
  .plaque.is-on .plaque__bar {
    height: auto;
    min-height: 84px;
    max-height: none;
    margin-left: 0;
    width: 100%;
    padding: 10px 16px;
    flex: 0 0 auto;
  }
  .plaque.is-on .plaque__bar {
    background: var(--paper);
  }
  .ladder { padding-left: 0; padding-bottom: 28px; gap: 0; align-items: stretch; }
  .lot { width: 100%; max-width: none; }
  .lot__open,
  .lot__reveal,
  .lot__copy,
  .lot__band,
  .lot__title,
  .lot__sentence { max-width: 100%; min-width: 0; }
  .lot__open,
  .lot__reveal { grid-template-columns: var(--lot-photo) minmax(0, 1fr); align-items: stretch; }
  .lot--paper .lot__open,
  .lot--paper .lot__reveal { grid-template-columns: minmax(0, 1fr); }
  .lot__still,
  .lot__reveal .lot__still,
  .lot[data-level="5"].is-open .lot__reveal .lot__still {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    align-self: stretch;
    min-width: 0;
    max-height: none;
  }
  .lot__title { overflow-wrap: break-word; }
  .lot__sentence { overflow-wrap: break-word; }
  body.is-chat { overflow: hidden; }
  .journal {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--mast-h, 72px);
    bottom: 0;
    width: 100%;
    max-width: none;
    max-height: none;
    padding:
      0
      env(safe-area-inset-right, 0px)
      env(safe-area-inset-bottom, 0px)
      env(safe-area-inset-left, 0px);
    z-index: 35;
    overflow: hidden;
    transform: translateY(110%);
    visibility: hidden;
    pointer-events: none;
  }
  .journal__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 4px;
  }
  .journal__head h2 { grid-column: 1; grid-row: 1; }
  .journal__head p { grid-column: 1 / -1; grid-row: 2; margin: 0; }
  .journal__close {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .journal__feed {
    flex: 1 1 auto;
    min-height: 0;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .journal.is-open {
    transform: none;
    visibility: visible;
    pointer-events: auto;
  }
  body.is-draw .journal {
    transform: translateY(110%);
    visibility: hidden;
    pointer-events: none;
  }
  body.is-reading .journal {
    transform: translateY(110%);
    visibility: hidden;
    pointer-events: none;
  }
  .journal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    margin-top: 0;
    padding: 0 12px;
    border: 1px solid rgba(20, 14, 10, 0.35);
    background: transparent;
    text-decoration: none;
    font-size: 15px;
  }
  .slip--alfa,
  .slip--vtb,
  .slip--gpb { grid-template-columns: 1fr; }
  .slip--vtb .slip__pic { order: 0; }
  .slip--vtb .slip__paper,
  .slip--gpb .slip__paper { min-height: 0; }
  .slip__pic { min-height: 38vh; }
  .slip--gpb .slip__pic { width: 100%; min-height: 0; height: auto; max-height: none; aspect-ratio: 16 / 9; }
  .slip--vtb .slip__pic img { width: 100%; height: 100%; object-fit: contain; object-position: center center; }
  .slip--gpb .slip__pic img { object-fit: contain; object-position: center center; }
  .slip { width: 100%; }
}

@media (max-width: 767px) {
  .app { display: flex; flex-direction: column; }
  .mast {
    order: 1;
    position: sticky;
    top: 0;
    z-index: 8;
    background: var(--desk);
    flex-wrap: wrap;
  }
  .hero { order: 2; }
  .stage { order: 3; }
  .foot { order: 4; }
  .gate__stage img { object-position: center 46%; }
  .hero { margin: 0; }
  .hero__frame {
    min-height: calc(100svh - 250px);
    background: transparent;
    overflow: visible;
  }
  .hero__media--still {
    position: fixed;
    z-index: 0;
    inset: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 46%;
    opacity: 1;
    pointer-events: none;
  }
  .hero__ad,
  .stage,
  .foot { position: relative; z-index: 1; }
  .mast { background: #120e0b; }
  .foot {
    background: linear-gradient(180deg, rgba(12, 8, 6, 0), rgba(12, 8, 6, 0.82));
  }
  .lot__copy,
  .lot__band { grid-template-columns: minmax(0, 1fr); }
  .lot__line {
    grid-column: 1;
    grid-row: auto;
    align-items: flex-start;
    text-align: left;
  }
  .lot[data-level="5"] .lot__open {
    grid-template-columns: var(--lot-photo) minmax(0, 1fr);
  }
  .plaque.is-on .plaque__back {
    position: sticky;
    top: var(--mast-h, 0px);
    z-index: 5;
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
  }
  .plaque.is-on .plaque__bar {
    position: sticky;
    top: calc(var(--mast-h, 0px) + 44px);
    z-index: 5;
    background: var(--paper);
  }
}

@media (max-width: 720px) {
  .gate { padding: 0; }
  .slip { min-height: 100vh; width: 100%; max-width: 100%; }
  .slip--alfa .slip__paper,
  .slip--vtb .slip__paper,
  .slip--gpb .slip__paper {
    padding: 72px 18px 28px;
  }
  .slip--vtb .slip__paper { justify-content: flex-start; }
  .slip--vtb .slip__line { font-size: 1.85rem; }
  .slip--gpb .slip__line { font-size: 1.45rem; }
  .hero__ad { gap: 8px 12px; padding: 12px 14px; }
  .hero__ad-line { font-size: 1.25rem; }
  .hero__ad-bank { font-size: 0.95rem; letter-spacing: 0; }
  .stage { overflow: visible; }
}

@media (max-width: 540px) {
  .mast {
    padding:
      calc(14px + env(safe-area-inset-top, 0px))
      calc(16px + env(safe-area-inset-right, 0px))
      8px
      calc(16px + env(safe-area-inset-left, 0px));
    align-items: flex-start;
  }
  .hero { margin: 0; }
  .stage {
    padding:
      0
      calc(16px + env(safe-area-inset-right, 0px))
      calc(28px + env(safe-area-inset-bottom, 0px))
      calc(16px + env(safe-area-inset-left, 0px));
  }
  .ladder {
    --lot-photo: 136px;
    --lot-row: 176px;
    gap: 0;
    padding-bottom: 0;
  }
  .lot:not(.is-open) {
    height: var(--lot-row);
    min-height: var(--lot-row);
  }
  .lot__title { font-size: 20px; line-height: 1.15; }
  .lot__sentence,
  .lot__line,
  .lot__stake { font-size: 15px; line-height: 1.3; }
  .lot__line { flex-direction: column; align-items: flex-start; row-gap: 1px; }
  .lot__stake::after { content: none; }
  .lot__copy { padding: 8px 12px; }
  .plaque__name { font-size: 18px; line-height: 1.15; white-space: normal; overflow-wrap: normal; word-break: normal; }
  .plaque__bar,
  .plaque.is-on .plaque__bar { height: auto; min-height: 76px; max-height: none; padding: 8px 12px; gap: 10px; }
  .plaque__sig { flex-basis: 56px; width: 56px; height: 56px; }
  .plaque.is-on .plaque__back { color: var(--ink); font-size: 16px; width: 100%; height: 44px; min-height: 44px; }
  .lot.is-open .lot__reveal,
  .lot.is-open .lot__open {
    grid-template-columns: minmax(0, 1fr);
  }
  .lot.is-open .lot__still,
  .lot[data-level="5"].is-open .lot__reveal .lot__still {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    min-height: 0;
  }
  .lot.is-open .lot__reveal { min-height: 0; }
}

@media (max-width: 420px) {
  .plaque__name { font-size: 17px; line-height: 1.15; white-space: normal; overflow-wrap: break-word; }
  .plaque__bar,
  .plaque.is-on .plaque__bar {
    height: auto;
    min-height: 72px;
    max-height: none;
    flex: 0 0 auto;
  }
  .plaque__sig { flex-basis: 48px; width: 48px; height: 48px; }
}

/* Prize sheet: same split as a partner slip, stays until closed. */
body.is-draw { overflow: hidden; }
.draw {
  position: fixed;
  inset: 0;
  z-index: 65;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding:
    calc(24px + env(safe-area-inset-top, 0px))
    calc(24px + env(safe-area-inset-right, 0px))
    calc(24px + env(safe-area-inset-bottom, 0px))
    calc(24px + env(safe-area-inset-left, 0px));
}
.draw[hidden] { display: none !important; }
.draw__veil {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(20, 14, 10, 0.62);
  cursor: pointer;
}
.draw__card {
  position: relative;
  z-index: 1;
  width: min(960px, 100%);
  max-height: calc(100dvh - 48px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(240px, 0.92fr);
  align-items: stretch;
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.draw__pic {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 3 / 2;
  height: auto;
  background-color: #efe6d4;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center center;
  background-origin: content-box;
  background-clip: content-box;
  padding: 10px;
  box-sizing: border-box;
}
.draw__paper {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  padding: 22px 68px 28px 24px;
  background: var(--paper);
}
.draw__x {
  position: sticky;
  top: 12px;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  z-index: 3;
  width: 44px;
  height: 44px;
  margin: 12px 12px 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
}
.draw__kicker,
.draw__sign,
.draw__fact {
  margin: 0;
  font-family: var(--type-mono);
  font-size: 15px;
  line-height: 1.35;
  letter-spacing: 0;
}
.draw__kicker { color: var(--tobacco); letter-spacing: 0.08em; font-size: 11px; }
.draw__line,
.draw__more {
  margin: 0;
  font-family: var(--type-display);
  font-weight: 480;
  letter-spacing: 0;
  overflow-wrap: break-word;
}
.draw__line {
  font-size: clamp(1.65rem, 2.5vw, 2.45rem);
  line-height: 1.12;
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: normal;
}
.draw__more { font-size: 1.2rem; line-height: 1.3; }
.draw__sign { margin-top: 10px; }
.draw__note,
.draw__in {
  margin: 0;
  max-width: 100%;
  overflow-wrap: break-word;
  font-family: var(--type-ui);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.draw__card .lot__join {
  margin-top: 12px;
  align-self: flex-start;
  max-width: 100%;
  flex: 0 0 auto;
  white-space: normal;
}
.draw__card[data-level="5"] .lot__join {
  background: var(--brass);
  border-color: var(--brass);
  color: #1a120c;
}
@media (max-width: 720px) {
  .draw {
    padding:
      env(safe-area-inset-top, 0px)
      env(safe-area-inset-right, 0px)
      env(safe-area-inset-bottom, 0px)
      env(safe-area-inset-left, 0px);
  }
  .draw__card {
    width: 100%;
    max-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .draw__pic {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    height: auto;
    max-height: none;
    min-height: 0;
    aspect-ratio: 4 / 3;
    align-self: start;
  }
  .draw__paper {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    padding: 16px 18px calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .draw__x {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: calc(12px + env(safe-area-inset-top, 0px));
    margin-right: calc(12px + env(safe-area-inset-right, 0px));
    top: calc(12px + env(safe-area-inset-top, 0px));
  }
  .draw__line { font-size: 1.65rem; }
}
@media (min-width: 1101px) {
  .draw { place-items: start; padding: 0; }
  .draw__veil {
    inset: auto;
    left: var(--draw-l, 0px);
    top: var(--draw-t, 0px);
    width: var(--draw-w, 100%);
    height: var(--draw-h, 100%);
  }
  .draw__card {
    position: absolute;
    left: var(--draw-l, 0px);
    top: var(--draw-t, 0px);
    width: var(--draw-w, 100%);
    max-width: none;
    height: var(--draw-h, 100%);
    max-height: var(--draw-h, 100dvh);
    min-height: 0;
  }
  .draw__veil { background: rgba(20, 14, 10, 0.78); }
}
@media (max-width: 1100px) {
  .draw { top: 0; padding: 0; }
  .draw__veil {
    top: var(--draw-t, 0px);
    height: calc(100% - var(--draw-t, 0px));
  }
  .draw__card {
    position: absolute;
    left: 0;
    top: var(--draw-t, 0px);
    width: 100%;
    max-width: none;
    height: calc(100% - var(--draw-t, 0px));
    max-height: none;
  }
  .mast { z-index: 80; }
  .plaque { scroll-margin-top: var(--mast-h, 72px); }
}
@media (max-width: 767px) {
  .gate {
    display: block;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
  }
  .gate__copy {
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: 25dvh;
    bottom: 0;
    flex-direction: column;
    justify-content: flex-end;
    gap: 10px;
    padding:
      18px
      22px
      calc(28px + env(safe-area-inset-bottom, 0px))
      22px;
    background: linear-gradient(180deg, rgba(12, 8, 6, 0) 0%, rgba(12, 8, 6, 0.2) 28%, rgba(12, 8, 6, 0.78) 100%);
  }
  .gate__copy h1 {
    max-width: 11ch;
    font-size: clamp(2.6rem, 12vw, 4.4rem);
    line-height: 0.96;
  }
  .slip,
  .slip--alfa,
  .slip--vtb,
  .slip--gpb {
    pointer-events: auto;
    position: absolute;
    left: 10px;
    right: 10px;
    top: max(8px, env(safe-area-inset-top, 0px));
    display: grid;
    grid-template-columns: minmax(88px, 32%) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    width: auto;
    height: 25dvh;
    max-height: 25dvh;
    min-height: 0;
    border-left-width: 0;
  }
  .slip--vtb .slip__pic { order: 0; }
  .slip__pic,
  .slip--alfa .slip__pic,
  .slip--vtb .slip__pic,
  .slip--gpb .slip__pic {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }
  .slip__pic img,
  .slip--vtb .slip__pic img,
  .slip--gpb .slip__pic img,
  .slip--alfa .slip__pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .slip__paper,
  .slip--alfa .slip__paper,
  .slip--vtb .slip__paper,
  .slip--gpb .slip__paper {
    min-height: 0;
    height: 100%;
    justify-content: center;
    gap: 1px;
    padding: 8px 48px 8px 12px;
  }
  .slip__line,
  .slip--alfa .slip__line,
  .slip--vtb .slip__line,
  .slip--gpb .slip__line {
    font-size: clamp(0.95rem, 3.6vw, 1.25rem);
    line-height: 1.08;
    max-width: none;
  }
  .slip__more,
  .slip--vtb .slip__more,
  .slip--alfa .slip__more { font-size: 0.82rem; line-height: 1.15; }
  .slip__sign,
  .slip--alfa .slip__sign,
  .slip--vtb .slip__sign,
  .slip--gpb .slip__sign {
    margin-top: 2px;
    font-size: 0.78rem;
  }
  .slip__mark { margin-top: 1px; font-size: 9px; line-height: 1.2; }
  .slip__rule { width: 72px; margin: 3px 0; border-top-width: 2px; }
  .slip__x {
    top: 6px;
    right: 6px;
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .draw.is-live .draw__card { animation: nkvp-slip 0.45s ease both; }
  .draw.is-live .draw__line,
  .draw.is-live .draw__more,
  .draw.is-live .draw__sign,
  .draw.is-live .draw__fact,
  .draw.is-live .draw__note { animation: nkvp-slip 0.7s ease both; }
  .draw.is-live .draw__more { animation-delay: 0.12s; }
  .draw.is-live .draw__sign,
  .draw.is-live .draw__fact { animation-delay: 0.28s; }
  .draw.is-live .draw__note { animation-delay: 0.4s; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}
