/* Home page, in the light daytime look. The first screen is a giant game wall (home-wall.js draws it) on cream paper;
   everything else stays quiet: ink outlines, hard shadows, the slot colours as stickers. */
body { background: var(--stage); }

/* ---------- the wall ---------- */
.hero {
  --slots: 200px; /* height of the slot row at the bottom; home-wall.js sets the real figure */
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: max(640px, 100svh);
  display: flex;
  background: linear-gradient(180deg, var(--panel) 0%, var(--stage) 78%);
}
#wallbg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
/* Keeps the words readable over the pegs; it stops above the slot row so the piles stay bright. */
.scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(90deg, rgba(var(--paper-rgb), 0.97) 0%, rgba(var(--paper-rgb), 0.92) 38%, rgba(var(--paper-rgb), 0.45) 64%, rgba(var(--paper-rgb), 0) 80%);
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - var(--slots) - 90px), transparent calc(100% - var(--slots) + 10px));
  mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - var(--slots) - 90px), transparent calc(100% - var(--slots) + 10px));
}
.hero-in {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(24px, 4.5vh, 64px) max(16px, env(safe-area-inset-right, 0px)) calc(var(--slots) + 28px) max(16px, env(safe-area-inset-left, 0px));
  display: grid;
  gap: 12px;
  align-content: start;
}
.hero-in > .sitenotice { max-width: 720px; }

.mark {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.22em;
  font-size: clamp(46px, min(8.6vw, 13.5vh), 116px);
  line-height: 1;
  color: var(--ink);
}
.mark .mb-mark { width: 1.62em; height: 0.96em; }
.mark .mb-word { padding-bottom: 0.08em; }
.tag { margin: 8px 0 0; font-size: clamp(21px, 2.5vw, 30px); line-height: 1.12; font-weight: 800; }
.tag span { display: inline-block; }
.lead { margin: 0; font-size: 17px; line-height: 1.5; color: var(--ink-dim); max-width: 60ch; text-wrap: pretty; }

.live { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; width: fit-content; max-width: 100%; padding: 7px 12px; border-radius: 6px; background: var(--panel); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
/* The light on a live show: it blinks, like the light on a cabinet. */
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--pink); animation: live-blink 1.4s steps(2, jump-none) infinite; }
@keyframes live-blink { 50% { opacity: 0.25; } }
.live-head { font-weight: 800; color: var(--pink-text); }
.live-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.live-list li { display: flex; gap: 6px; align-items: baseline; }
.live-link { font-weight: 800; color: var(--ink); text-underline-offset: 3px; }
.live-meta { font-size: 14px; color: var(--ink-dim); }

/* ---------- two ways in ---------- */
.start { max-width: 780px; margin-top: 8px; }
.doors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
}
.door { display: grid; gap: 10px; align-content: start; padding: 20px 24px 22px; margin: 0; min-width: 0; }
.door h2 { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 800; color: var(--ink); }
.door h2 label { cursor: pointer; }
.door p { margin: 0; font-size: 15px; color: var(--ink-dim); }
.door .btn { margin-top: auto; }
.door-off { font-weight: 600; color: var(--ink) !important; }
/* The "or" is a ball sitting on the seam between the two ways in. */
.or { position: relative; width: 2px; margin: 22px 0; background: var(--ink); }
.or span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-display); font-size: 15px; color: var(--ink);
  background: var(--field);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
}
.btn.twitch { background: var(--twitch); color: #fff; }
.btn.twitch:hover { background: #a970ff; }
.field-row { display: flex; gap: 8px; margin-top: auto; }
.field-row input { flex: 1; min-width: 0; }
.status { margin: 0; font-size: 15px; font-weight: 600; color: var(--pink-text) !important; }
.trylink { margin: 4px 0 0; font-size: 15px; }
.trylink a { font-weight: 700; text-underline-offset: 3px; white-space: nowrap; }

/* ---------- your links ---------- */
.ready {
  display: grid; gap: 14px;
  padding: 20px 22px 22px;
  background: var(--panel);
  border: 2px solid var(--ink);
  border-radius: 8px;
  box-shadow: 5px 5px 0 var(--ink);
}
.ready-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.ready-head h2 { margin: 0; font-size: 22px; font-weight: 800; }
.ready-acct, .ready-acct form { display: flex; gap: 8px; margin: 0; }
.ready-go { display: flex; flex-wrap: wrap; gap: 10px; }
.ready-go .btn { flex: 1 1 200px; }
.ready-note { margin: 0; font-size: 14px; color: var(--ink-dim); }
.links { display: grid; gap: 12px; }
.link { display: grid; gap: 5px; min-width: 0; }
.link-name { font-weight: 700; font-size: 15px; }
.link-name small { margin-left: 6px; font-weight: 400; font-size: 13px; color: var(--ink-dim); }
.secret { display: flex; gap: 6px; min-width: 0; }
.secret input { flex: 1; min-width: 0; font-size: 14px; color: var(--ink-dim); }
.btn.small { min-height: 40px; padding: 6px 12px; font-size: 14px; }
.ready-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 4px; }
.reset { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.reset-status { font-size: 13px; color: var(--ink-dim); max-width: 36ch; }

/* ---------- below the wall ---------- */
.below { max-width: 1180px; margin: 0 auto; padding: 64px 16px 24px; display: grid; gap: 64px; }
.sect h2 { margin: 0 0 22px; font-family: var(--font-display); font-weight: 400; font-size: clamp(22px, 3vw, 30px); line-height: 1.1; color: var(--ink); }
.sect p { margin: 0; color: var(--ink-dim); }
.sect strong { color: var(--ink); }

/* How a show runs: what you'd see in chat or on the wall, beside what it means. No numbered circles. */
.log-intro { margin: -10px 0 18px !important; }
.log { display: grid; border-top: 2px solid var(--ink); }
.log-row { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--rule); }
.log-see { margin: 0 !important; display: grid; gap: 6px; justify-items: start; }
.log-see.log-powers { grid-template-columns: repeat(2, max-content); }
.log-chat { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 14px; color: var(--ink); background: var(--field); border: 2px solid var(--ink); border-radius: 6px; padding: 4px 9px; max-width: 100%; overflow-wrap: anywhere; }
.log-chat b { font-family: var(--font-ui); font-weight: 800; margin-right: 4px; }
.log-chat b::after { content: ":"; color: var(--ink-dim); }
.log-word { justify-self: start; font-family: var(--font-display); font-size: 16px; color: var(--ink) !important; background: var(--gold); border: 2px solid var(--ink); border-radius: 5px; padding: 3px 10px 2px; box-shadow: 2px 2px 0 var(--ink); }
.log-plates { grid-template-columns: repeat(9, 22px); gap: 4px !important; }
.log-plates i { width: 22px; height: 26px; border-radius: 4px; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.log-plates i.r { background: var(--aqua); }
.log-plates i.b { background: var(--pink); }
.log-plates i.p { background: var(--gold); }
.log-say { margin: 0 !important; font-size: 16px; line-height: 1.5; max-width: 62ch; }

.ways { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0; }
.way { padding: 4px 28px 4px 0; }
.way + .way { border-left: 2px solid var(--ink); padding: 4px 0 4px 28px; }
.way h3 { margin: 0 0 8px; font-size: 19px; font-weight: 800; }
.aside { margin-top: 16px !important; font-size: 15px; max-width: 78ch; }

.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.pair p { max-width: 60ch; }

.foot { max-width: 1180px; margin: 0 auto; padding: 22px 16px 48px; display: grid; gap: 8px; border-top: 2px solid var(--ink); font-size: 14px; color: var(--ink-dim); }
.foot p { margin: 0; }
.foot a { margin-right: 16px; font-weight: 700; }
/* Phones: each footer link gets a full-height tap target. */
@media (max-width: 820px) { .foot a { display: inline-block; padding: 10px 4px 10px 0; } }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .hero { min-height: 0; }
  .mark { font-size: clamp(38px, 10.8vw, 60px); }
  /* The whole wall sits behind the page, zoomed out; the words stay readable over it and the slots run along the
     bottom, clear of the fade. */
  .scrim {
    background: linear-gradient(180deg, rgba(var(--paper-rgb), 0.86) 0, rgba(var(--paper-rgb), 0.78) 60%, rgba(var(--paper-rgb), 0.55) 100%);
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - var(--slots) - 70px), transparent calc(100% - var(--slots) + 6px));
    mask-image: linear-gradient(180deg, #000 0, #000 calc(100% - var(--slots) - 70px), transparent calc(100% - var(--slots) + 6px));
  }
  .doors { grid-template-columns: minmax(0, 1fr); }
  .or { width: auto; height: 2px; margin: 18px 22px; } /* room for the ball above and below */
  .door { padding: 20px 18px 22px; }
  .log-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .ways, .pair { grid-template-columns: minmax(0, 1fr); }
  .way { padding: 0 0 18px; }
  .way + .way { border-left: 0; border-top: 2px solid var(--ink); padding: 18px 0 0; }
  .pair { gap: 40px; }
  .below { gap: 52px; padding-top: 48px; }
}
@media (max-width: 420px) {
  .field-row { flex-direction: column; }
  .secret { flex-wrap: wrap; }
  .secret input { flex-basis: 100%; }
  .secret .btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .live-dot { animation: none; }
}

.ready-uid { margin: 0; font-size: 13px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }

/* Pro: what it is and what it costs, in plain view (Paddle asks for both on the site). */
.pro-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.pro-row > p { max-width: 62ch; }
.pro-buy { display: grid; gap: 10px; justify-items: start; padding: 18px 20px; border: 2px solid var(--ink); border-radius: 8px; background: var(--panel); box-shadow: 4px 4px 0 var(--ink); }
.pro-price { margin: 0; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pro-price b { font-family: var(--font-display); font-weight: 400; font-size: 34px; line-height: 1; color: var(--ink); }
.pro-price span { color: var(--ink-dim); font-size: 15px; }
.pro-small { margin: 0; font-size: 13px; }
.foot p:empty { display: none; }
@media (max-width: 760px) { .pro-row { grid-template-columns: minmax(0, 1fr); gap: 18px; } }

.sect-act { margin-top: 16px !important; display: flex; flex-wrap: wrap; gap: 10px; }
.trylink span { color: var(--ink-dim); margin: 0 8px; }

/* The game's home page: one panel to wishlist it on Steam or play a show now. */
.wish { display: grid; gap: 10px; max-width: 560px; padding: 20px 24px 22px; background: var(--panel); border: 2px solid var(--ink); border-radius: 8px; box-shadow: 5px 5px 0 var(--ink); }
.wish h2 { margin: 0; font-size: 21px; line-height: 1.2; font-weight: 800; color: var(--ink); }
.wish p { margin: 0; font-size: 15px; color: var(--ink-dim); }
.wish-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.wish-acts .btn { flex: 1 1 180px; }
@media (max-width: 760px) { .wish { padding: 20px 18px 22px; } }

/* Returning players: straight into the game from the top right of the hero. On wide screens the pills float top
   right, clear of the mark; on phones they take a row of their own above it, so the wordmark never runs under them
   whatever the text size. */
.hero-nav { position: absolute; top: 14px; right: 16px; z-index: 3; display: flex; gap: 6px; }
@media (max-width: 760px) { .hero-nav { position: static; justify-content: flex-end; margin: -8px 0 0; } }
.hero-nav a { display: inline-block; min-height: 40px; padding: 9px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--raised); color: var(--ink); font-weight: 800; text-decoration: none; box-shadow: 0 3px 0 var(--edge); }
.hero-nav a:hover { background: var(--gold); }
.live-links { margin: 10px 0 0; font-size: 14px; color: var(--ink-dim); }
.live-links a { font-weight: 700; color: var(--ink); text-underline-offset: 3px; }
.on-air #play-live { border-color: #e91916; }
