/* Tana 棚: public pages. A collector's catalogue: archival paper, sumi ink, printed rules,
   and one region ink each for Japan (shu vermilion), North America (ai indigo) and Europe (pine). */
:root {
  --bg: #ECEBE6; --surface: #F7F6F2; --ink: #1F1C19; --muted: #67625A; --line: #D6D2C8; --line-strong: #B9B2A4;
  --accent: #5E3FA8; --accent-2: #4A2F8C; --accent-ink: #FFFFFF; --ring: rgba(94, 63, 168, .24); --fuji-soft: #E7E2F0;
  --r-jp: #B4452A; --r-na: #2C4A7E; --r-eu: #2E6A4E; --r-as: #8C6A14; --r-kr: #7A3E6E;
  --obi: #5E3FA8;
  --serif: "Libre Caslon Text", "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  --mincho: "Shippori Mincho B1", "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  --gothic: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171A21; --surface: #1E212A; --ink: #ECE8DF; --muted: #A7A193; --line: #2C303B; --line-strong: #474C59;
    --accent: #B9A2FF; --accent-2: #D0C1FF; --accent-ink: #171A21; --ring: rgba(185, 162, 255, .3); --fuji-soft: #262338;
    --r-jp: #EE8E70; --r-na: #92B0EC; --r-eu: #82C6A2; --r-as: #D9B25C; --r-kr: #D39AC6;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--gothic); font-size: 16px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }

.top { display: flex; align-items: center; justify-content: space-between; max-width: 720px; margin: 0 auto; padding: 16px 20px 12px; border-bottom: 1px solid var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 20px; }
.brand-mark { width: 20px; height: 22px; }
.brand-mark .s1 { fill: var(--r-jp); } .brand-mark .s2 { fill: var(--r-na); } .brand-mark .s3 { fill: var(--r-eu); }
.brand-ja { font-family: var(--mincho); font-size: 23px; }
.top-link { font-size: 14px; }

.page { max-width: 720px; margin: 0 auto; padding: 18px 20px 44px; }
.foot { max-width: 720px; margin: 0 auto; padding: 16px 20px 48px; border-top: 1px solid var(--ink); color: var(--muted); font-size: 13px; line-height: 1.6; }
.foot p { margin: 8px 0; }

/* The game's spine beside its title, as it would stand on a shelf */
.shelf { display: grid; grid-template-columns: 52px 1fr; gap: 22px; align-items: start; margin-top: 8px; }
.spine {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  width: 52px; min-height: 230px; max-height: 360px; padding: 14px 0 12px; border-radius: 2px;
  background: var(--obi); color: #fff;
  box-shadow: inset 2px 0 0 rgba(255, 255, 255, .16), inset -2px 0 0 rgba(0, 0, 0, .18), 0 1px 0 rgba(31, 28, 25, .15);
}
.spine::before, .spine::after { content: ""; position: absolute; left: 8px; right: 8px; height: 1px; background: rgba(255, 255, 255, .45); }
.spine::before { top: 9px; } .spine::after { bottom: 30px; }
.spine-title { flex: none; writing-mode: vertical-rl; white-space: nowrap; font-family: var(--mincho); font-weight: 700; font-size: 18px; letter-spacing: .08em; line-height: 1; max-height: 290px; overflow: hidden; text-overflow: ellipsis; margin-bottom: 14px; }
.spine-title[lang="en"] { font-family: var(--serif); text-orientation: sideways; font-size: 14px; letter-spacing: .03em; }
.spine-plat { flex: none; font-size: 10px; font-weight: 700; letter-spacing: .06em; opacity: .92; }

.crumb { margin: 0 0 6px; color: var(--muted); font-size: 14px; }
.crumb a { color: var(--muted); }
.game-head h1, .plat-head h1 { font-family: var(--serif); font-weight: 700; font-size: 32px; line-height: 1.18; letter-spacing: -.005em; margin: 0; text-wrap: balance; }
.game-head h1[lang="ja"], .plat-head h1[lang="ja"] { font-family: var(--mincho); letter-spacing: .02em; }
.title-alt { font-size: 15px; margin: 6px 0 0; line-height: 1.5; }
.title-alt[lang="ja"] { font-family: var(--mincho); font-weight: 700; letter-spacing: .03em; opacity: .85; }
.reading { color: var(--muted); font-size: 13px; letter-spacing: .1em; margin: 2px 0 0; }
.intl { display: block; font-family: var(--gothic); font-size: 15px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-top: 4px; }
.lede { margin: 10px 0 0; color: var(--muted); max-width: 60ch; }

/* Status stamps: outlined in the ink of the region they speak for */
.status { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 4px 10px; border: 1px solid currentColor; border-radius: 2px; font-size: 14px; font-weight: 500; background: transparent; }
.status .dot { display: none; }
.status.jp-only { color: var(--r-jp); }
.status.west { color: var(--r-na); }
.status.west-only { color: var(--r-na); border-style: double; border-width: 3px; }
.status.west-phys { color: var(--r-na); }
.status.unknown { color: var(--muted); border-style: dashed; }

.facts { margin: 26px 0 0; display: grid; grid-template-columns: auto 1fr; font-size: 14px; border-top: 1.5px solid var(--ink); }
.facts dt, .facts dd { padding: 7px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); padding-right: 24px; }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

section { margin-top: 32px; }
section h2 { font-family: var(--serif); font-size: 20px; margin: 0 0 10px; }
.rel { display: grid; grid-template-columns: 118px 1fr; gap: 12px; padding: 10px 0 10px 12px; border-top: 1px solid var(--line); border-left: 3px solid var(--line-strong); font-size: 14px; }
.rel:last-child { border-bottom: 1px solid var(--line); }
.rel[data-region="NA"] { border-left-color: var(--r-na); } .rel[data-region="EU"] { border-left-color: var(--r-eu); } .rel[data-region="JP"] { border-left-color: var(--r-jp); } .rel[data-region="AS"] { border-left-color: var(--r-as); } .rel[data-region="KR"] { border-left-color: var(--r-kr); }
.rel-region { font-family: var(--serif); font-weight: 700; }
.rel[data-region="NA"] .rel-region { color: var(--r-na); } .rel[data-region="EU"] .rel-region { color: var(--r-eu); }
.rel-title { font-weight: 500; }
.rel-meta { color: var(--muted); }
.editions, .diffs, .index, .plats { margin: 0; padding: 0; list-style: none; }
.editions li { padding: 7px 0; border-top: 1px solid var(--line); font-size: 14px; }
.editions li:last-child { border-bottom: 1px solid var(--line); }
.code { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1.5px solid var(--ink); border-radius: 1px; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; color: var(--ink); }
.muted { color: var(--muted); }
.diff { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.diff:last-child { border-bottom: 1px solid var(--line); }
.diff-head { color: var(--muted); font-size: 13px; }
.diff-summary { font-weight: 500; margin-top: 2px; }
.diff-sides { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; margin: 8px 0 0; }
.diff-sides dt { color: var(--muted); } .diff-sides dd { margin: 0; }
.aliases { margin: 22px 0 0; color: var(--muted); font-size: 13px; }

.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 3px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); font-weight: 500; }
.btn.ghost:hover { background: var(--surface); color: var(--accent); border-color: var(--accent); }

/* Platform pages: a printed index between two ink rules */
.plat-head { margin-top: 10px; }
.index { margin-top: 22px; border-top: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); }
.index li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.index li:first-child { border-top: 0; }
.index a { font-family: var(--serif); font-weight: 700; }
.index a[lang="ja"] { font-family: var(--mincho); }
.index .ja, .plats .ja { color: var(--muted); font-size: 13px; margin-left: 6px; }
.index .yr, .plats .yr { color: var(--muted); font-size: 13px; margin-left: 6px; white-space: nowrap; }
.index .tag { display: inline-block; margin-left: 8px; padding: 0 7px; border: 1px solid currentColor; border-radius: 2px; color: var(--r-jp); font-size: 12px; font-weight: 500; vertical-align: 1px; }
.index .tag.west { color: var(--r-na); }
.plats li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.plats a { font-family: var(--serif); font-weight: 700; }

@media (max-width: 480px) {
  .shelf { grid-template-columns: 44px 1fr; gap: 16px; }
  .spine { width: 44px; min-height: 200px; }
  .spine-title { font-size: 16px; max-height: 240px; }
  .game-head h1, .plat-head h1 { font-size: 27px; }
  .rel { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Member share pages and the embed widget ---------- */
:root { --oak: #A8764A; --oak-hi: #C39162; --oak-lo: #75492A; --walnut: #3D2B1E; }
@media (prefers-color-scheme: dark) { :root { --oak: #7E5634; --oak-hi: #976A45; --oak-lo: #54361F; --walnut: #1F1712; } }
.profile .lede { font-size: 17px; color: var(--muted); margin: 4px 0 14px; }
.profile .bio { max-width: 60ch; }
.profile .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.pcase { display: block; position: relative; padding: 4px 18px 1px; margin: 18px 0 8px; border-top: 11px solid var(--oak-lo); border-radius: 3px 3px 2px 2px; overflow-x: auto;
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, .22) 0 1px, transparent 1px 132px), var(--walnut);
  box-shadow: inset 11px 0 0 var(--oak-lo), inset -11px 0 0 var(--oak-lo); }
.pcase .prow { position: relative; display: flex; align-items: flex-end; min-height: 60px; padding: 20px 0 0; margin-bottom: 15px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0) 24px); }
.pcase .prow::after { content: ""; position: absolute; left: -7px; right: -7px; bottom: -15px; height: 15px;
  background: linear-gradient(180deg, var(--oak-hi) 0, var(--oak) 18%, var(--oak) 70%, var(--oak-lo) 100%); box-shadow: 0 5px 8px -3px rgba(0, 0, 0, .55); }
.pcase .pbook { position: relative; flex: 0 0 var(--w); width: var(--w); height: var(--h); margin-left: 1px; color: #fff; display: flex; flex-direction: column; align-items: center;
  padding: 8px 0 5px; border-radius: 2px 2px 0 0; box-sizing: border-box;
  background: linear-gradient(90deg, rgba(255, 255, 255, .24) 0, rgba(255, 255, 255, .05) 26%, rgba(0, 0, 0, 0) 56%, rgba(0, 0, 0, .3) 100%), var(--obi);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07), 2px 0 3px -1px rgba(0, 0, 0, .5); }
.pcase .pbook:first-child { margin-left: 0; }
.pcase .pbook.pgap { margin-left: 11px; }
.pcase .pbook::before { content: ""; position: absolute; left: 3px; right: 3px; top: 4px; height: 1px; background: rgba(255, 255, 255, .42); }
.pcase .pbook-t { writing-mode: vertical-rl; font-family: "Shippori Mincho B1", "Libre Caslon Text", serif; font-size: var(--fs, 10px); font-weight: 700; line-height: 1;
  letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-height: 0; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.pcase .pbook-p { writing-mode: vertical-rl; font-size: 7px; font-weight: 700; letter-spacing: .06em; opacity: .82; margin-top: 4px; }
.pcase-empty { color: #E9DFD2; padding: 16px 4px; }
body.embed { margin: 0; background: transparent; }
.embed-card { display: block; text-decoration: none; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong, #C9C5BB); border-radius: 6px; padding: 12px 14px 10px; }
.embed-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; font-size: 13px; color: var(--muted); }
.embed-head strong { font-family: "Libre Caslon Text", serif; font-size: 16px; color: var(--ink); }
.pcase.one { margin: 10px 0 6px; overflow: hidden; }
.pcase.one .prow { margin-bottom: 15px; }
.embed-foot { display: block; text-align: right; font-size: 12px; color: var(--muted); }

/* ---------- Help pages ---------- */
.top-links { display: flex; gap: 18px; align-items: baseline; }
.help { max-width: 68ch; }
.help h2 { margin-top: 1.6em; }
.help ul { padding-left: 1.2em; }
.help li { margin: .3em 0; }
.help-toc h2 { font-size: 1.15rem; margin: 1.4em 0 .3em; }
.help-toc ul { list-style: none; padding-left: 0; margin: 0; }
.help-toc li { margin: .15em 0; }
.help-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 2.2em 0 1em; padding-top: 1em; border-top: 1px solid var(--line-strong, #C9C5BB); }
.help-nav a { display: block; text-decoration: none; padding: 8px 0; }
.help-nav span { display: block; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.help-next { text-align: right; }
.help-all { font-size: 14px; color: var(--muted); }
