/* BeanCat — variant B landing page.
   Idiom: a FrontPage-era fan site. Windows-98 grey chrome, cream paper insets,
   a tiled wallpaper cut from the renders themselves, bitmap headings, hard
   drop shadows, blinking stickers, 88x31 badges. Everything is BeanCat's own. */

:root {
  --mono: "Lucida Console", Consolas, "Courier New", "Microsoft YaHei", monospace;

  --face:  #c0c0c0;   /* window chrome */
  --hi:    #ffffff;
  --lite:  #dfdfdf;
  --shade: #808080;
  --dark:  #000000;

  --paper: #fffbe6;   /* prose insets */
  --ink:   #14100f;
  --dim:   #5c5247;

  --hot:   #ff2fa0;
  --acid:  #c8ff00;
  --acid-ink: #2c3d00;
  --alarm: #fff200;
  --red:   #ff0000;
  --blue:  #0000ee;   /* the 1997 defaults, on purpose */
  --purple:#551a8b;

  --px: 4px;          /* bitmap heading cell size */
}

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

body {
  margin: 0;
  padding: 0 0 3em;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: #140e18 url("assets/wallpaper.webp") repeat;
  background-size: 384px 240px;
  text-align: center;
  overflow-x: hidden;
}
@media (max-width: 640px) { body { font-size: 13px; } }

a { color: var(--blue); }
a:visited { color: var(--purple); }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--alarm); outline-offset: 2px; }

img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.skip { position: absolute; left: -9999px; top: 0; padding: .5em 1em; background: var(--acid); color: var(--acid-ink); z-index: 9; }
.skip:focus { left: 8px; top: 8px; }

/* ── bevels ──────────────────────────────────────────────────── */

.raised {
  background: var(--face);
  border: 3px solid;
  border-color: var(--hi) var(--dark) var(--dark) var(--hi);
  box-shadow: inset 1px 1px var(--lite), inset -1px -1px var(--shade);
}
.sunk {
  border: 3px solid;
  border-color: var(--shade) var(--hi) var(--hi) var(--shade);
  box-shadow: inset 1px 1px var(--dark), inset -1px -1px var(--lite);
}

/* ── bitmap headings ─────────────────────────────────────────── */

.px { display: block; height: calc(var(--px) * 8); width: auto; max-width: 100%; }
.px-ink { fill: var(--ink); }
.px-shadow { fill: var(--hot); }

.head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4em 1em;
  padding: .55em .7em .7em;
  --px: 3px;
}
.head .zh {
  font-size: 1.35em;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink);
  text-shadow: 2px 2px 0 var(--hot);
}
.head .tag {
  margin-left: auto;
  font-size: .78em;
  color: #3b3b3b;
  letter-spacing: 1px;
}

/* ── top strip ───────────────────────────────────────────────── */

.strip {
  display: flex;
  flex-wrap: wrap;
  gap: .4em 1.2em;
  align-items: center;
  justify-content: center;
  padding: .45em .8em;
  font-size: .82em;
  letter-spacing: 1px;
  color: #ead9ff;
  background: rgba(20, 10, 24, .78);
  border-bottom: 2px solid var(--hot);
}
.strip a { color: var(--acid); text-decoration: none; }
.strip a:hover { color: #fff; text-decoration: underline; }
.strip .note { color: #b9a5cc; }

.tool {
  font-family: var(--mono);
  font-size: 1em;
  padding: .15em .7em;
  color: var(--ink);
  background: var(--face);
  border: 2px solid;
  border-color: var(--hi) var(--dark) var(--dark) var(--hi);
  cursor: pointer;
}
.tool:active { border-color: var(--dark) var(--hi) var(--hi) var(--dark); }

/* ── page column ─────────────────────────────────────────────── */

.col { display: flex; flex-direction: column; align-items: center; }

.win {
  width: 50em;
  max-width: 94vw;
  margin: .7em auto .2em;
  padding: .45em;
  text-align: left;
}

.paper {
  padding: 1.1em 1.2em;
  background: var(--paper);
  color: var(--ink);
}
.paper.tight { padding: .8em .9em; }

/* ── hero ────────────────────────────────────────────────────── */

.hero {
  padding: 1.6em 1em 1.4em;
  background: #fff;
  text-align: center;
}
.hero .px { --px: 8px; margin: 0 auto .2em; }
.hero .px-shadow { fill: var(--hot); }
@media (max-width: 640px) { .hero .px { --px: 5px; } }

.wordmark-zh { font-size: 1.1em; letter-spacing: 6px; color: var(--dim); margin-bottom: .6em; }

.odo { display: inline-flex; gap: 2px; margin: .4em 0 .2em; }
.odo span {
  display: inline-block;
  min-width: 1.15em;
  padding: .05em .12em;
  font-size: 1.25em;
  font-weight: 700;
  color: #fff;
  background: #000;
  border: 1px solid #555;
  box-shadow: inset 0 -.45em rgba(255,255,255,.08);
}
.odo-label { font-size: .72em; letter-spacing: 2px; color: var(--dim); margin-bottom: .9em; }

.statement {
  font-size: 1.55em;
  line-height: 1.35;
  margin: .3em auto .2em;
  max-width: 22em;
}
.statement .red { color: var(--red); }
.statement .blue { color: var(--blue); }
@media (max-width: 640px) { .statement { font-size: 1.25em; } }

.shout {
  margin: .9em auto 0;
  padding: .45em .8em;
  max-width: 30em;
  font-size: .82em;
  font-style: italic;
  color: var(--alarm);
  background: #000;
  box-shadow: 6px 6px 0 var(--hot);
}
.shout.cool { box-shadow: 6px 6px 0 #00d5ff; }

.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em; margin-top: 1.1em; }

.cta {
  display: inline-block;
  min-width: 13em;
  max-width: 90vw;
  padding: .55em 1.4em;
  font-family: var(--mono);
  font-size: .92em;
  font-weight: 700;
  color: var(--acid-ink);
  background: var(--acid);
  border: 4px outset #e6ff7a;
  box-shadow: 6px 6px 0 #000;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.cta:visited { color: var(--acid-ink); }
.cta:hover { background: #dbff4d; color: var(--acid-ink); box-shadow: 3px 3px 0 #000; }
.cta:active { border-style: inset; box-shadow: 1px 1px 0 #000; transform: translate(2px, 2px); }

.hero-cat {
  width: 12em;
  max-width: 68vw;
  margin: 1.2em auto 0;
  border: 4px solid #000;
  box-shadow: 8px 8px 0 #000, 14px 14px 0 var(--hot);
}

.player { margin-top: 1.4em; font-size: .82em; color: var(--dim); }
.player .tool { margin-right: .5em; }

/* ── film strip belt ─────────────────────────────────────────── */

.film {
  position: relative;
  width: 100%;
  height: 150px;
  margin: .6em 0;
  padding: 14px 0;
  overflow: hidden;
  background: #000;
}
.film::before, .film::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 8px;
  background: repeating-linear-gradient(90deg, transparent 0 12px, #fff 12px 20px, transparent 20px 30px);
}
.film::before { top: 3px; }
.film::after { bottom: 3px; }
.film-track {
  display: flex;
  height: 122px;
  width: max-content;
  animation: film-roll 52s linear infinite;
}
.film.reverse .film-track { animation-duration: 70s; animation-direction: reverse; }
.film-track img { width: 122px; height: 122px; border-right: 3px solid #000; }
@keyframes film-roll { to { transform: translateX(-50%); } }

/* ── imageboard post ─────────────────────────────────────────── */

.post {
  width: 51em;
  max-width: 94vw;
  margin: .7em auto .2em;
  padding: .6em .8em .9em;
  background: #f0e0d6;
  border: 2px solid #d9bfb7;
  text-align: left;
}
.post-bar { font-size: .92em; color: #800000; }
.post-bar .name { color: #117743; font-weight: 700; }
.post-bar .trip { color: #228854; }
.post-bar .meta { color: #6f6f6f; }
.post-bar .live { color: var(--red); font-weight: 700; animation: blink 1.3s steps(1) infinite; }
.post-body { display: flex; flex-wrap: wrap; gap: .8em; margin-top: .5em; }
.post-thumb { max-width: 190px; }
.post-thumb img { border: 1px solid #b6a49a; }
.post-thumb .fname { font-size: .74em; color: #6d5a4e; padding-top: 3px; word-break: break-all; }
.crawl { flex: 1 1 16em; min-width: 14em; color: #789922; white-space: pre-wrap; line-height: 1.5; }
.caret { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ── manifesto ───────────────────────────────────────────────── */

.lines { margin: 0; padding: 0; list-style: none; counter-reset: line; }
.lines li {
  position: relative;
  padding: .35em 0 .35em 2.6em;
  border-bottom: 1px dotted #c9b9a0;
  counter-increment: line;
}
.lines li:last-child { border-bottom: 0; }
.lines li::before {
  content: counter(line, decimal-leading-zero);
  position: absolute; left: 0; top: .35em;
  color: var(--hot);
  font-weight: 700;
}
.pair { display: flex; flex-wrap: wrap; justify-content: center; gap: 1em; margin: 1em 0 .2em; }
.pair img { width: 10em; min-width: 0; border: 3px solid var(--ink); box-shadow: 5px 5px 0 var(--hot); }

/* ── curse index ─────────────────────────────────────────────── */

.index { width: 100%; border-collapse: collapse; font-size: .9em; }
.index th, .index td { padding: .4em .5em; border-bottom: 1px solid #d9c9a8; text-align: left; vertical-align: top; }
.index th { color: var(--dim); font-weight: 400; font-size: .85em; letter-spacing: 1px; }
.index td.n { text-align: right; font-weight: 700; white-space: nowrap; }
.index td.bar { font-family: var(--mono); letter-spacing: -1px; color: var(--hot); white-space: nowrap; }
.index td.bar .off { color: #d8ccb6; }
.index tr:last-child td { border-bottom: 0; }
.legend { display: flex; flex-wrap: wrap; gap: .5em 1.2em; margin-top: 1em; font-size: .88em; }
.legend .g { display: inline-block; min-width: 1.6em; padding: 0 .3em; margin-right: .35em; text-align: center; font-weight: 700; color: #fff; background: var(--red); border: 2px solid #000; }

/* ── missing poster ──────────────────────────────────────────── */

.poster {
  margin: 0 auto;
  max-width: 30em;
  padding: 1em 1em .4em;
  background: #fff;
  color: #000;
  border: 5px solid #000;
  text-align: center;
  box-shadow: 10px 10px 0 rgba(0,0,0,.45);
  transform: rotate(-1.2deg);
}
.poster .px { --px: 6px; margin: 0 auto .5em; }
.poster .px-shadow { fill: #bbb; }
.poster .zh-big { font-size: 2em; font-weight: 700; letter-spacing: 8px; margin-bottom: .3em; }
.poster img { width: 13em; max-width: 70vw; margin: 0 auto .8em; border: 3px solid #000; }
.poster dl { margin: 0; text-align: left; font-size: .9em; }
.poster dl div { display: flex; gap: .6em; padding: .25em 0; border-top: 1px dashed #999; }
.poster dt { flex: 0 0 8.5em; font-weight: 700; }
.poster dd { margin: 0; flex: 1; min-width: 0; }
.poster .reward { margin: .8em 0 .5em; font-weight: 700; color: var(--red); }
.tabs { display: flex; justify-content: space-between; margin: .6em -.6em 0; padding-top: .4em; border-top: 2px dashed #000; }
.tabs span {
  writing-mode: vertical-rl;
  font-size: .62em;
  letter-spacing: 1px;
  padding: .5em .1em;
  border-right: 1px dashed #000;
  color: #444;
}
.tabs span:last-child { border-right: 0; }

/* ── folder grid ─────────────────────────────────────────────── */

.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6em; }
@media (max-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 420px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.tile { position: relative; padding: 3px 3px 0; background: #fff; border: 2px solid #000; box-shadow: 4px 4px 0 #000; }
.tile img { width: 100%; aspect-ratio: 1; background: #333; }
.tile .cap { display: block; padding: 4px 2px; font-size: .68em; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.stamp {
  position: absolute; top: 8px; right: 8px;
  padding: .1em .35em;
  font-size: 1.15em;
  font-weight: 700;
  line-height: 1;
  color: var(--red);
  background: rgba(255,255,255,.82);
  border: 3px double var(--red);
  transform: rotate(12deg);
  pointer-events: none;
}
.stamp small { display: block; font-size: .42em; letter-spacing: 1px; }

.grid-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6em; margin-top: 1em; font-size: .85em; color: var(--dim); }
.grid-tools .cta { min-width: 0; font-size: .95em; padding: .45em 1.1em; box-shadow: 4px 4px 0 #000; }

.new {
  display: inline-block;
  margin-left: .6em;
  padding: .05em .45em;
  font-size: .75em;
  font-weight: 700;
  color: var(--red);
  background: var(--alarm);
  border: 2px solid var(--red);
  transform: rotate(-6deg);
  animation: blink 1.1s steps(1) infinite;
}

/* ── report / spec tables ────────────────────────────────────── */

.report { width: 100%; border-collapse: collapse; font-size: .92em; }
.report th, .report td { padding: .4em .5em; border-bottom: 1px dotted #b9a98c; text-align: left; vertical-align: top; }
.report th { width: 46%; font-weight: 400; color: var(--dim); }
.report td { font-weight: 700; word-break: break-all; }
.report td.zero { color: var(--red); }
.report tr:last-child th, .report tr:last-child td { border-bottom: 0; }
.footnote { margin-top: .9em; font-size: .8em; color: var(--dim); }

/* ── personnel file ──────────────────────────────────────────── */

.file th { width: 7.5em; white-space: nowrap; font-weight: 700; color: var(--ink); }
.file td { font-weight: 400; word-break: normal; }
.file .co { display: block; }
.file .him { display: block; margin-top: .2em; color: var(--hot); font-style: italic; }

/* ── warning ─────────────────────────────────────────────────── */

.slab { padding: 1.1em 1.2em; background: #000; color: #fff; }
.slab .lead { color: var(--alarm); font-weight: 700; }
.slab b { color: var(--alarm); }
.slab a { color: #ff7c7c; }

/* ── badges ──────────────────────────────────────────────────── */

.badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; padding: .8em .5em; }
.badges svg { width: 88px; height: 31px; image-rendering: pixelated; }

/* ── footer ──────────────────────────────────────────────────── */

.footer { padding: 1em 1.2em; text-align: center; font-size: .9em; color: #222; }
.footer .fine { margin-top: .9em; padding-top: .8em; border-top: 1px solid var(--shade); font-size: .8em; text-align: left; color: #333; }
.footer code { word-break: break-all; }
.bottom { margin: 1.4em auto 0; font-size: .8em; letter-spacing: 1px; color: #c9b7d9; }

/* ── language twins ──────────────────────────────────────────── */

body[data-lang="en"] .zh { display: none; }
body[data-lang="zh"] .en { display: none; }
body[data-lang="zh"] .strip, body[data-lang="zh"] .odo-label { letter-spacing: 0; }

/* ── phase twins (set by phase.js from site-config.js) ───────── */

body:not([data-phase="prelaunch"]) .p-pre { display: none; }
body[data-phase="prelaunch"] .p-on, body[data-phase="prelaunch"] .p-live, body[data-phase="prelaunch"] .p-sold { display: none; }
body[data-phase="live"] .p-sold { display: none; }
body[data-phase="soldout"] .p-live { display: none; }
body:not([data-sample]) .p-sample { display: none; }

/* ── motion opt-out ──────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .film-track, .live, .caret, .new { animation: none; }
}
