/* Taikyoku Shogi design system. Loaded after style.css. Documented in docs/WEBSITE_DESIGN.md.
   Language: painted ink, antique gold, lacquer, a courtyard at dusk (the game's own palette, scripts/ui/ui_theme.gd).
   Part 1 is global and safe on every page. Part 2 (body.themed) is the dark/light themed look the front page uses; other pages opt in with <body class="themed">. */

/* ---------- 1. tokens (dark is the default; the light theme is chosen with the toggle and remembered in this browser) ---------- */
:root {
  --lacquer: #0e0d0c; --lacquer-2: #161413; --lacquer-3: #201d19; --tk-night: #0a0908;
  --tk-gold: #dbbd70; --tk-gold-dim: #8c7847; --tk-gold-deep: #b8923a; --tk-gold-pale: #f3e2ae;
  --tk-ink: #ede8d9; --mist: #a9a79d; --vermilion: #d63d33; --jade: #52c78c;
  --paper-bg: #efe9db; --paper-bg-2: #e4dccb;

  /* semantic (dark is the default) */
  --bg: var(--lacquer); --bg-2: var(--lacquer-2); --surface: var(--lacquer-2); --surface-2: var(--lacquer-3);
  --fg: var(--tk-ink); --fg-muted: var(--mist); --line: rgba(219, 189, 112, .22); --line-strong: rgba(219, 189, 112, .5);
  --accent: var(--tk-gold); --link: var(--tk-gold); --btn-text: #1a1405; --shadow: 0 24px 60px rgba(0, 0, 0, .5);
  --wash-a: rgba(219, 189, 112, .06); --wash-b: rgba(214, 61, 51, .05);
  --gilt: linear-gradient(100deg, #c9a54f 0%, #f6e7b8 30%, #dbbd70 55%, #f0d98f 78%, #c9a54f 100%);

  --serif: "Hiragino Mincho ProN", "Hiragino Mincho Pro", "Yu Mincho", YuMincho, "Songti SC", "Noto Serif CJK JP", "Noto Serif JP", "Source Han Serif JP", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans CJK JP", "Noto Sans JP", Roboto, "Helvetica Neue", Arial, sans-serif;

  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem; --s6: 2.5rem; --s7: 4rem; --s8: clamp(4rem, 9vw, 8rem);
  --r-sm: 8px; --r: 14px; --r-lg: 22px;
  --measure: 62ch;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 64px;
}
:root[data-theme="light"] {
  --bg: var(--paper-bg); --bg-2: var(--paper-bg-2); --surface: #f7f2e6; --surface-2: #fffdf6;
  --fg: #1a1814; --fg-muted: #504c42; --line: rgba(120, 90, 20, .28); --line-strong: rgba(120, 90, 20, .6);
  --accent: #7d5f17; --link: #6b4f0d; --shadow: 0 18px 40px rgba(60, 40, 0, .18);
  --wash-a: rgba(184, 146, 58, .10); --wash-b: rgba(194, 40, 31, .05);
  --gilt: linear-gradient(100deg, #6b4f0d, #a47d1e 50%, #6b4f0d);
}
/* ---------- global: accessibility, CJK, motion ---------- */
:focus-visible { outline: 3px solid var(--tk-gold); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--tk-gold); color: #1a1405; padding: 12px 18px; border-radius: 0 0 10px 10px; font-weight: 700; text-decoration: none; transition: top .15s; }
.skip:focus { top: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:lang(ja) { line-break: strict; word-break: auto-phrase; overflow-wrap: break-word; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .eyebrow { font-feature-settings: "palt"; text-transform: none; letter-spacing: .02em; }
:lang(ja) .eyebrow { letter-spacing: .14em; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ---------- 2. themed pages ---------- */
body.themed { --max: 1240px; background: var(--bg); color: var(--fg); font-family: var(--sans); }
body.themed::before { display: none; }                    /* the paper grain of the light pages */
.themed h1, .themed h2, .themed h3 { font-family: var(--serif); }
.themed a { color: inherit; }
.themed .gl, .themed section a:not(.btn):not(.link):not(.opp) { color: var(--link); }
.themed .muted { color: var(--fg-muted); }
.themed .wrap { max-width: var(--max); padding: 0 clamp(18px, 4vw, 40px); }
@media (min-width: 1900px) { body.themed { --max: 1480px; font-size: 1.08rem; } }
@media (min-width: 2800px) { body.themed { --max: 1760px; font-size: 1.2rem; } }

/* section rhythm: every section is a stage with a faint ink wash and a gold hairline between them */
.themed section { position: relative; padding: var(--s8) 0; background: var(--bg); color: var(--fg); border: 0; }
.themed section.dark, .themed section.alt, .themed section.paper { background: var(--bg-2); color: var(--fg); }
.themed section.dark .muted, .themed section.paper .lead, .themed section .lead { color: var(--fg-muted); }
.themed section + section::before { content: ""; position: absolute; top: 0; left: 50%; width: min(520px, 70%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.themed section::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 85% 0%, var(--wash-a), transparent 70%), radial-gradient(50% 45% at 5% 100%, var(--wash-b), transparent 70%); }
.themed section > .wrap { position: relative; z-index: 1; }
.themed h2 { font-size: clamp(1.9rem, 3.6vw + .5rem, 3.4rem); line-height: 1.12; letter-spacing: .005em; }
.themed .eyebrow { color: var(--accent); letter-spacing: .22em; }
.themed .lead { font-size: clamp(1.02rem, .5vw + .95rem, 1.25rem); max-width: var(--measure); }
.gilt { background: var(--gilt); background-size: 300% 100%; background-position: 40% 0; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gilt 9s linear infinite; }
@keyframes gilt { to { background-position: -260% 0; } }

/* buttons */
.themed .btn { border-radius: 999px; min-height: 48px; padding: .8em 1.6em; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); letter-spacing: .01em; position: relative; overflow: hidden; isolation: isolate; transition: transform .2s var(--ease), border-color .2s, background .2s, box-shadow .2s; }
.themed .btn:hover { transform: translateY(-2px); border-color: var(--tk-gold); }
.themed .btn.primary { background: linear-gradient(180deg, #ecd391, #c29b45); color: var(--btn-text); border-color: #f0dda0; box-shadow: 0 10px 34px rgba(184, 146, 58, .3), inset 0 1px 0 rgba(255, 255, 255, .5); }
.themed .btn.primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s var(--ease); }
.themed .btn.primary:hover::after { transform: translateX(120%); }
.themed .btn.ghost { background: rgba(14, 13, 12, .62); color: #f2ecdc; border-color: rgba(219, 189, 112, .55); }
.themed .btn.dark { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.themed .btn.live { background: rgba(60, 14, 11, .72); border-color: rgba(214, 61, 51, .8); color: #f6efdc; }
.themed .btn.small { min-height: 40px; padding: .5em 1.1em; }

/* cards */
.themed .card { background: linear-gradient(180deg, var(--surface-2), var(--surface)); color: var(--fg); border: 1px solid var(--line); border-radius: var(--r); box-shadow: none; transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; }
.themed .card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.themed .card .k { color: var(--accent); }
.themed .stat { border-top-color: var(--tk-gold); background: var(--wash-a); }
.themed .stat b { color: var(--accent); } .themed .stat span { color: var(--fg-muted); }
.themed details.faq { border-bottom-color: var(--line); } .themed details.faq p { color: var(--fg-muted); }
.themed .joinform input[type=text], .themed .joinform input[type=email] { background: var(--surface-2); color: var(--fg); border-color: var(--line-strong); }
.themed .consentline, .themed .joinform .consentline { color: var(--fg-muted); }
.themed .shot { border-color: var(--line); box-shadow: var(--shadow); }
.themed .soon-card { background: var(--surface); border: 1px solid var(--line); color: var(--fg); }
.themed .dl code { background: #0b0a09; color: var(--tk-gold); }

/* header: one bar for every themed page (the beta strip, then brand, links, language, theme, call to action) */
.themed .betabar { background: linear-gradient(90deg, #3a0f0c, #8a1f18 50%, #3a0f0c); border-bottom: 1px solid rgba(219, 189, 112, .35); letter-spacing: .02em; }
.themed .nav { color: #f2ecdc; }
.themed .nav.solid { background: rgba(10, 9, 8, .86); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); box-shadow: 0 1px 0 var(--line); }
.themed .nav .brand { letter-spacing: .02em; }
.themed .nav a.link { opacity: .9; position: relative; padding: 6px 2px; }
.themed .nav a.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--tk-gold); transform: scaleX(0); transition: transform .25s var(--ease); }
.themed .nav a.link:hover::after, .themed .nav a.link[aria-current="page"]::after { transform: scaleX(1); }
.themed .nav .more .menu { background: rgba(14, 13, 12, .96); border: 1px solid var(--line); border-radius: var(--r-sm); }
.themebtn { all: unset; cursor: pointer; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); color: #f2ecdc; }
.themebtn:hover { border-color: var(--tk-gold); } .themebtn:focus-visible { outline: 3px solid var(--tk-gold); outline-offset: 2px; }
.themebtn svg { width: 18px; height: 18px; }

/* footer */
.themed footer { background: var(--tk-night); color: #b9b6aa; border-top: 1px solid var(--line); padding: var(--s7) 0; }
.themed footer a { color: var(--tk-gold); }

/* ---------- hero ---------- */
.hero2 { --gilt: linear-gradient(100deg, #c9a54f 0%, #f6e7b8 30%, #dbbd70 55%, #f0d98f 78%, #c9a54f 100%); position: relative; min-height: min(100svh, 1100px); display: grid; align-items: end; overflow: hidden; background: var(--tk-night); color: #f2ecdc; isolation: isolate; }
@media (min-width: 2400px) { .hero2 { min-height: min(100svh, 1300px); } }
.hero2-media { position: absolute; inset: 0; z-index: -3; }
.hero2-media img, .hero2-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
.hero2-film { opacity: 0; transition: opacity 1.2s; } .hero2-film.on { opacity: 1; }
.hero2-shade { position: absolute; inset: 0; z-index: -2; background:
  linear-gradient(0deg, rgba(10, 9, 8, .96) 0%, rgba(10, 9, 8, .6) 28%, rgba(10, 9, 8, 0) 58%),
  linear-gradient(90deg, rgba(10, 9, 8, .78) 0%, rgba(10, 9, 8, .25) 55%, rgba(10, 9, 8, 0) 80%),
  radial-gradient(ellipse at 50% 45%, transparent 50%, rgba(0, 0, 0, .5) 100%); }
.hero2-grain { position: absolute; inset: 0; z-index: -1; opacity: .07; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>"); }
.themed .wrap.hero2-in { padding-top: calc(var(--header-h) + 90px); padding-bottom: clamp(28px, 4vw, 64px); width: 100%; }
.hero2 .logo { display: flex; align-items: flex-end; gap: 16px; }
.hero2 h1 { margin: 0; font-size: clamp(3.2rem, 8vw + .5rem, 7.2rem); line-height: 1; letter-spacing: .04em; color: var(--tk-gold); text-shadow: 0 6px 50px rgba(0, 0, 0, .7); }
.hero2 h1 .gilt { text-shadow: none; filter: drop-shadow(0 6px 30px rgba(0, 0, 0, .6)); }
.hero2 .seal { width: clamp(44px, 6vw, 76px); height: clamp(44px, 6vw, 76px); background: var(--vermilion); color: #f7e9d8; font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.5rem); display: grid; place-items: center; border-radius: 6px; transform: rotate(-6deg); margin-bottom: clamp(8px, 1.4vw, 18px); box-shadow: 0 6px 18px rgba(0, 0, 0, .55); }
.hero2-sub { font-family: var(--serif); letter-spacing: .55em; font-size: clamp(.9rem, 1.4vw, 1.3rem); color: var(--tk-gold); margin: 10px 0 0; padding-bottom: 12px; border-bottom: 1px solid var(--line-strong); width: max-content; max-width: 100%; }
.hero2-promise { font-family: var(--serif); font-size: clamp(1.2rem, 1.4vw + .7rem, 2rem); line-height: 1.35; max-width: 44ch; margin: 22px 0 0; color: #f6efdc; text-shadow: 0 2px 24px rgba(0, 0, 0, .85); text-wrap: balance; }
:lang(ja) .hero2-promise { max-width: 22em; }
.hero2 .cta { margin-top: 28px; }
.hero2-fine { margin: 18px 0 0; font-size: .92rem; color: #d6d0bd; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.hero2-fine a { color: var(--tk-gold-pale); } .hero2-fine .say-btn { vertical-align: middle; }
.hero2-pause { all: unset; cursor: pointer; position: absolute; right: clamp(14px, 3vw, 36px); bottom: clamp(14px, 3vw, 28px); font-size: .8rem; letter-spacing: .06em; color: #e6dfcc; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(10, 9, 8, .5); backdrop-filter: blur(6px); }
.hero2-pause:hover { border-color: var(--tk-gold); } .hero2-pause:focus-visible { outline: 3px solid var(--tk-gold); }
.hero2-in > * { animation: rise .9s var(--ease) both; } .hero2-in > *:nth-child(2) { animation-delay: .08s; } .hero2-in > *:nth-child(3) { animation-delay: .16s; } .hero2-in > *:nth-child(4) { animation-delay: .26s; } .hero2-in > *:nth-child(5) { animation-delay: .36s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }

/* ---------- three beats ---------- */
.beat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 32px); margin-top: var(--s6); }
.beat { position: relative; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); display: flex; flex-direction: column; transition: transform .3s var(--ease), border-color .3s; }
.beat:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.beat picture, .beat img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.beat-body { padding: clamp(18px, 2.4vw, 30px); position: relative; }
.beat-num { font-family: var(--serif); font-size: clamp(2.4rem, 4.4vw, 4rem); line-height: 1; color: var(--accent); margin-bottom: .2em; }
.beat h3 { font-size: clamp(1.25rem, 1.4vw + .8rem, 1.7rem); margin-bottom: .35em; }
.beat p { margin: 0; color: var(--fg-muted); }

/* ---------- gallery ---------- */
.mosaic { display: grid; grid-template-columns: repeat(12, 1fr); gap: clamp(10px, 1.4vw, 20px); margin-top: var(--s6); }
.mosaic figure { margin: 0; position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: #000; grid-column: span 4; }
.mosaic figure.wide { grid-column: span 8; } .mosaic figure.half { grid-column: span 6; }
.mosaic picture, .mosaic img, .mosaic video { display: block; width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; transition: transform .8s var(--ease); }
.mosaic figure:hover img { transform: scale(1.035); }
.mosaic figcaption { position: absolute; inset: auto 0 0 0; padding: 36px 16px 12px; font-size: .9rem; color: #f2ecdc; background: linear-gradient(0deg, rgba(10, 9, 8, .88), transparent); pointer-events: none; }
.clip { cursor: pointer; } .clip button { all: unset; position: absolute; inset: 0; cursor: pointer; display: grid; place-items: center; z-index: 2; }
.clip button:focus-visible { outline: 3px solid var(--tk-gold); outline-offset: -3px; }
.clip .pl { width: 72px; height: 72px; border-radius: 50%; background: rgba(10, 9, 8, .6); border: 2px solid var(--tk-gold); display: grid; place-items: center; transition: transform .25s var(--ease); }
.clip button:hover .pl { transform: scale(1.1); } .clip .pl::before { content: ""; border-left: 20px solid var(--tk-gold); border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 6px; }
.clip video { position: absolute; inset: 0; z-index: 3; background: #000; }

/* ---------- ladder ---------- */
.ladder { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(10px, 1.4vw, 20px); margin-top: var(--s6); counter-reset: rung; }
.themed .opps { margin-top: var(--s6); gap: clamp(10px, 1.4vw, 20px); }
.themed .opp { aspect-ratio: 3 / 4; border: 1px solid var(--line); cursor: pointer; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; counter-increment: rung; }
.themed .opp:hover { transform: translateY(-4px); border-color: var(--tk-gold); box-shadow: 0 18px 40px rgba(0, 0, 0, .55); }
.themed .opp picture, .themed .opp img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 28%; }
.themed .opp::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(0deg, rgba(10, 9, 8, .94) 0%, rgba(10, 9, 8, .35) 38%, transparent 62%); }
.themed .opp::after { content: counter(rung, cjk-ideographic); position: absolute; top: 10px; left: 12px; z-index: 2; font-family: var(--serif); font-size: .95rem; color: var(--tk-gold); border: 1px solid var(--line-strong); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px; background: rgba(10, 9, 8, .6); }
.themed .opp div { z-index: 2; } .themed .opp b { font-size: clamp(1.15rem, 1vw + .8rem, 1.5rem); } .themed .opp span { display: block; color: #e6dfcc; font-size: .85rem; }
.themed .opp em { display: block; font-style: normal; color: #cfc9b6; font-size: .78rem; line-height: 1.4; margin-top: 4px; }
.fine-note { font-size: .88rem; color: var(--fg-muted); margin-top: var(--s4); max-width: 80ch; }

/* ---------- what is new ---------- */
.news { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); margin-top: var(--s6); }
.news article { border-left: 2px solid var(--tk-gold-dim); padding: 4px 0 4px 20px; }
.news time { display: block; font-size: .8rem; letter-spacing: .16em; color: var(--accent); text-transform: uppercase; }
.news h3 { font-size: 1.15rem; margin: .3em 0 .4em; } .news p { margin: 0; color: var(--fg-muted); font-size: .97rem; }
.newsmore { margin-top: var(--s5); }

/* ---------- trailer ---------- */
.trailer { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); align-items: center; margin-top: var(--s6); }
.trailer .herovid { max-width: none; margin: 0; }
.themed .herovid .hv-cap, .themed .herovid .hv-cap a { color: var(--fg-muted); text-shadow: none; }
.themed .herovid .hv-cap a { color: var(--link) !important; }

/* reveal on scroll (design.js adds .rvon to <html> only when motion is allowed) */
.rvon .rv { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.rvon .rv.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) { .ladder, .themed .opps { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) {
  .beat-grid, .news { grid-template-columns: 1fr; }
  .beat picture, .beat img { aspect-ratio: 16 / 9; }
  .trailer { grid-template-columns: 1fr; }
  .mosaic figure, .mosaic figure.wide, .mosaic figure.half { grid-column: span 12; }
  .themed .opps { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .themed .opps { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -18px; padding: 4px 18px 14px; -webkit-overflow-scrolling: touch; }
  .themed .opp { flex: 0 0 62%; scroll-snap-align: center; }
  .themed .wrap.hero2-in { padding-top: calc(var(--header-h) + 56px); }
  .hero2 .cta .btn { flex: 1 1 100%; justify-content: center; }
  .hero2-sub { letter-spacing: .32em; }
}
@media (max-width: 360px) { .hero2 h1 { font-size: 3.1rem; } }
@media (prefers-reduced-motion: reduce) {
  .gilt { animation: none; } .hero2-in > * { animation: none; } .rvon .rv { opacity: 1; transform: none; transition: none; }
  .themed .btn.primary::after { display: none; } .mosaic figure:hover img { transform: none; }
}
@media print { .hero2-media, .hero2-pause, .nav, .betabar { display: none; } }
.crop-face { object-position: 50% 22%; }
.beat img { height: auto; }
.clip figcaption { inset: 0 0 auto 0; padding: 12px 16px 36px; background: linear-gradient(180deg, rgba(10, 9, 8, .8), transparent); }
.themed .nk { background: var(--surface-2); color: var(--fg); border-color: var(--line); }
.themed section[id] { scroll-margin-top: 84px; }
@media (max-width: 430px) { .themed .nav { gap: 8px; padding-left: 14px; padding-right: 14px; } .themed .nav .brand { font-size: 1rem; gap: 8px; } .themed .nav .brand .badge { display: none; } .themebtn { width: 36px; height: 36px; } }
.themed .nk .kj { color: var(--fg); }

/* ---------- 3. the Features area (tools/build_features.py) and the front page "how it plays" strip ---------- */
.feat .fhead { padding: calc(var(--header-h, 88px) + clamp(28px, 5vw, 64px)) 0 clamp(28px, 4vw, 56px); background: var(--bg); position: relative; }
.feat .fhead::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 70% at 85% 0%, var(--wash-a), transparent 70%); }
.feat .fhead > .wrap { position: relative; z-index: 1; }
.feat .fhead h1 { font-size: clamp(2.1rem, 4.4vw + .4rem, 4rem); line-height: 1.1; margin: .1em 0 .3em; }
.feat .fk { font-family: var(--serif); font-size: clamp(3rem, 8vw, 6rem); line-height: 1; color: var(--accent); opacity: .85; }
.feat .crumbs { font-size: .9rem; margin-bottom: 10px; } .feat .crumbs a { color: var(--link); }
.avail { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 20px 0 8px; }
.avail li { border: 1px solid var(--line-strong); border-radius: 999px; padding: .4em 1em; font-size: .92rem; background: var(--surface); }
.avail li.av-yes { border-color: #4f9a62; } .avail li.av-part { border-color: var(--tk-gold); } .avail li.av-no { border-color: #b3564e; }
.avail-note { color: var(--fg-muted); max-width: var(--measure, 62ch); margin: 6px 0 0; }
.flist { margin: 12px 0 0; padding-left: 1.2em; max-width: 72ch; } .flist li { margin: .5em 0; color: var(--fg); } .flist li::marker { color: var(--accent); }
.feat section .lead { margin: 1em 0; }
.feat section .stats { margin: 22px 0; }
.ffig, .fclip { margin: clamp(18px, 3vw, 34px) 0; }
.ffig picture, .ffig img, .fsplit picture, .fsplit img, .fpair picture, .fpair img { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); box-shadow: var(--shadow); background: #000; }
.feat figcaption { font-size: .9rem; color: var(--fg-muted); margin-top: 8px; }
.fpair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 24px); margin: clamp(18px, 3vw, 34px) 0; } .fpair figure { margin: 0; }
.fsplit { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(18px, 3vw, 40px); align-items: center; margin: clamp(22px, 3.4vw, 44px) 0; } .fsplit figure { margin: 0; } .fsplit h3 { font-size: 1.5rem; margin: 0 0 .3em; }
.fclip { max-width: 360px; } .fclip video { display: block; width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); background: #000; }
.fcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 22px 0; } .fcards .card { padding: 16px 18px; } .fcards h3 { font-size: 1.1rem; margin: 0 0 .3em; } .fcards p { margin: 0; color: var(--fg-muted); font-size: .95rem; }
.tscroll { overflow-x: auto; margin: 22px 0; border: 1px solid var(--line); border-radius: var(--r-sm); } .tscroll:focus-visible { outline: 2px solid var(--tk-gold); }
.ftable { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 560px; } .ftable th, .ftable td { padding: .65em .9em; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; } .ftable thead th { background: var(--surface-2); color: var(--accent); }
.fopps { grid-template-columns: repeat(5, 1fr); } .themed .fopps .opp { aspect-ratio: 3 / 4; }
.gridc { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 26px); margin-top: var(--s6); }
.gcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); text-decoration: none; color: var(--fg); transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.gcard:hover, .gcard:focus-visible { transform: translateY(-4px); border-color: var(--tk-gold); box-shadow: var(--shadow); }
.gimg picture, .gimg img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.gbody { padding: 16px 18px 20px; position: relative; } .gbody h3 { font-size: 1.3rem; margin: 0 0 .3em; padding-right: 2em; } .gbody p { margin: 0 0 .8em; color: var(--fg-muted); font-size: .95rem; }
.gk { position: absolute; top: 12px; right: 16px; font-family: var(--serif); font-size: 1.7rem; color: var(--accent); }
.gchip { display: inline-block; font-size: .8rem; border: 1px solid var(--line-strong); border-radius: 999px; padding: .15em .8em; } .gchip.av-yes { border-color: #4f9a62; } .gchip.av-no { border-color: #b3564e; }
.fcols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 26px); margin: 26px 0; }
.themed .cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } .pg { display: block; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; text-decoration: none; color: var(--fg); font-family: var(--serif); font-size: 1.2rem; } .pg:hover, .pg:focus-visible { border-color: var(--tk-gold); } .pg span { display: block; font-family: var(--sans); font-size: .8rem; color: var(--fg-muted); letter-spacing: .08em; } .pg.next { text-align: right; }
.wn { grid-template-columns: repeat(3, 1fr); } .wn .flist { padding-left: 1.1em; font-size: .95rem; }
.howstrip { list-style: none; padding: 0; margin: var(--s6) 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(12px, 2vw, 24px); }
.howstrip a { display: block; height: 100%; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; background: var(--surface); text-decoration: none; color: var(--fg); transition: transform .3s var(--ease), border-color .3s; }
.howstrip a:hover, .howstrip a:focus-visible { transform: translateY(-4px); border-color: var(--tk-gold); }
.howstrip .hn { display: block; font-family: var(--serif); font-size: 2.6rem; line-height: 1; color: var(--accent); margin-bottom: .2em; } .howstrip b { display: block; font-family: var(--serif); font-size: 1.35rem; margin-bottom: .3em; } .howstrip a span:last-child { color: var(--fg-muted); font-size: .95rem; }
@media (max-width: 1000px) { .gridc, .wn { grid-template-columns: 1fr 1fr; } .howstrip, .fcards { grid-template-columns: 1fr 1fr; } .fopps { grid-template-columns: repeat(5, 1fr); } }
@media (max-width: 760px) { .gridc, .wn, .fsplit, .fcols, .fpair, .pager, .howstrip, .fcards { grid-template-columns: 1fr; } .pg.next { text-align: left; } .fclip { max-width: 100%; } .themed .fopps { display: flex; } }

/* live player facade: no request to YouTube until the visitor presses the button */
.ytfacade { cursor: pointer; border: 1px solid var(--line); background: #000; }
.ytfacade picture, .ytfacade img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.ytfacade iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ytgo { all: unset; position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; cursor: pointer; color: #f6efdc; text-align: center; padding: 16px; }
.ytgo:focus-visible { outline: 3px solid var(--tk-gold); outline-offset: -4px; }
.ytgo .pl { width: 72px; height: 72px; border-radius: 50%; background: rgba(10, 9, 8, .65); border: 2px solid var(--tk-gold); display: grid; place-items: center; transition: transform .25s var(--ease); }
.ytgo:hover .pl { transform: scale(1.08); } .ytgo .pl::before { content: ""; border-left: 20px solid var(--tk-gold); border-top: 12px solid transparent; border-bottom: 12px solid transparent; margin-left: 6px; }
.ytlabel { background: rgba(10, 9, 8, .75); padding: 6px 14px; border-radius: 999px; font-size: .95rem; }

/* cookie panel: a small card in the bottom right on wide screens (never over the hero text), a compact bar on narrow ones (the hero lifts above it, see --cb-h) */
.themed .cookiebar { left: auto; right: 16px; bottom: 52px; margin: 0; max-width: 360px; padding: 14px 16px; gap: 10px; border-radius: 12px; box-shadow: 0 12px 40px rgba(0, 0, 0, .6); }
.themed .cookiebar .cb-text { flex-basis: 100%; font-size: .82rem; line-height: 1.4; } .themed .cookiebar .cb-text b { display: block; }
.themed .cookiebar .cb-btns { width: 100%; } .themed .cookiebar .cb-btns .btn { flex: 1; min-height: 40px; }
@media (max-width: 900px) {
  .themed .cookiebar { left: 8px; right: 8px; bottom: 44px; max-width: none; }
  .themed .cookiebar .cb-text b { display: none; }
  .themed .wrap.hero2-in { padding-bottom: calc(var(--cb-h, 0px) + 72px); }
}
.hero2-pause { bottom: auto; top: calc(var(--header-h) + 52px); }
.hero2 { --gilt: linear-gradient(100deg, #dbbd70 0%, #f6e7b8 30%, #e6cb85 55%, #f0d98f 78%, #dbbd70 100%); }
@media (max-width: 900px) { .hero2-shade { background: linear-gradient(0deg, rgba(10, 9, 8, .97) 0%, rgba(10, 9, 8, .86) 40%, rgba(10, 9, 8, .6) 62%, rgba(10, 9, 8, .3) 85%, rgba(10, 9, 8, .35) 100%); } }

/* ===== 4. Play page (tools/build_play.py): /play/ and /ja/play/ ===== */
.playpg .fhead .cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }
.playpg .btn.big { font-size: 1.15rem; padding: 16px 28px; min-height: 56px; }
.playpg .sub { margin: 34px 0 10px; font-size: 1.2rem; }
.getgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin: 26px 0 8px; }
.pcard { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pcard h3 { margin: 0; }
.pcard .meta { color: var(--fg-muted); font-size: .92rem; }
.pcard .btn { align-self: flex-start; max-width: 100%; }
.pcard.rec { outline: 2px solid var(--tk-gold, #dcc17a); outline-offset: 2px; }
.pcard code { display: block; overflow-wrap: anywhere; word-break: break-all; font-size: .78rem; padding: 8px 10px; border-radius: 6px; background: #0b0a09; color: var(--tk-gold, #dcc17a); }
.pcard code.cmd, .pcard pre.cmd { overflow-wrap: anywhere; white-space: pre-wrap; word-break: break-word; }
.pcard pre.cmd { margin: 8px 0; padding: 10px 12px; border-radius: 6px; background: #0b0a09; color: var(--tk-gold, #dcc17a); font-size: .85rem; }
.pcard details { margin-top: 4px; }
.pcard summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.pcard details p, .pcard details li { font-size: .95rem; }
.pcard .soon { opacity: .6; pointer-events: none; }
@media (max-width: 760px) { .getgrid { grid-template-columns: 1fr; } .playpg .btn.big { width: 100%; justify-content: center; text-align: center; } }
