:root {
  --bg: #0b0b0d;
  --bg-2: #141417;
  --bg-3: #1c1c20;
  --line: rgba(255, 255, 255, .09);
  --fg: #f2f0ea;
  --fg-2: #c9c6be;
  --mut: #8d8a83;
  --acc: #ff5a36;
  --f-jp: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', system-ui, sans-serif;
  --f-en: 'Space Grotesk', var(--f-jp);
  --f-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --gut: clamp(16px, 4vw, 48px);
  --r: 10px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 500 16px/1.75 var(--f-jp);
  font-feature-settings: 'palt';
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  word-break: auto-phrase; /* break Japanese at phrase boundaries (Chromium) */
  text-wrap: pretty;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 4px; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.wrap { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 var(--gut); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--fg); color: var(--bg); padding: 8px 12px; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ── hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: min(92svh, 920px);
  display: flex;
  align-items: flex-end;
  padding: 120px 0 clamp(40px, 7vh, 88px);
  isolation: isolate;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media img, .hero-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-media video { opacity: 0; transition: opacity 1.2s ease; }
.hero-media video.on { opacity: 1; }
.hero-media::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(to top, var(--bg) 2%, rgba(11, 11, 13, .55) 42%, rgba(11, 11, 13, .15) 75%, rgba(11, 11, 13, .55)),
    linear-gradient(to right, rgba(11, 11, 13, .8), rgba(11, 11, 13, 0) 65%);
}
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--fg-2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--acc); box-shadow: 0 0 12px var(--acc); }
.hero h1 {
  margin: 18px 0 20px;
  font: 700 clamp(64px, 13vw, 196px)/.86 var(--f-en);
  letter-spacing: -.055em;
  margin-left: -.05em;
}
.lede { max-width: 34em; font-size: clamp(15px, 1.5vw, 18px); color: var(--fg-2); }
.stats { display: flex; gap: clamp(24px, 4vw, 56px); margin: 32px 0 36px; }
.stats dt { font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); }
.stats dd { margin-top: 8px; font: 500 clamp(24px, 2.6vw, 32px)/1 var(--f-en); font-variant-numeric: tabular-nums; }
.hero-play {
  display: inline-flex; align-items: center; gap: 16px;
  padding: 10px 26px 10px 10px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: rgba(20, 20, 23, .55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color .2s, background .2s;
}
.hero-play:hover { border-color: rgba(255, 255, 255, .4); background: rgba(30, 30, 34, .7); }
.hero-play small { display: block; font: 500 11px/1.4 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mut); }
.hero-play > span:last-child { font: 700 17px/1.3 var(--f-en); }
.hero-play em { font: 500 13px/1 var(--f-jp); font-style: normal; color: var(--fg-2); margin-left: 10px; }
.pbtn { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--acc); color: #fff; }
.pbtn svg { width: 22px; height: 22px; fill: currentColor; stroke: none; margin-left: 3px; }

/* ── filters + grid ───────────────────────────────── */
.filters {
  position: sticky; top: 0; z-index: 10;
  display: flex; gap: 8px;
  margin: 0 calc(var(--gut) * -1);
  padding: 14px var(--gut);
  background: rgba(11, 11, 13, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none;
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 14px; font-weight: 700;
  color: var(--fg-2);
  transition: background .15s, color .15s, border-color .15s;
}
.filters button span { font: 500 11px/1 var(--f-mono); color: var(--mut); }
.filters button:hover { border-color: rgba(255, 255, 255, .25); color: var(--fg); }
.filters button.on { background: var(--fg); border-color: var(--fg); color: var(--bg); }
.filters button.on span { color: rgba(11, 11, 13, .55); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: clamp(28px, 3.5vw, 44px) clamp(16px, 2vw, 28px);
  padding: 36px 0 96px;
}
.card[hidden] { display: none; }
.card { animation: rise .5s both cubic-bezier(.2, .7, .2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.card a { display: block; }
.thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-2);
  box-shadow: 0 0 0 1px var(--line);
}
.thumb img, .thumb video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.thumb video { opacity: 0; transition: opacity .3s; }
.thumb video.on { opacity: 1; }
.card a:hover .thumb img { transform: scale(1.035); }
.thumb .num, .thumb .dur, .thumb .badge {
  position: absolute; z-index: 1;
  font: 500 11px/1 var(--f-mono);
  letter-spacing: .06em;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(8, 8, 10, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.thumb .num { top: 10px; left: 10px; }
.thumb .dur { bottom: 10px; right: 10px; font-variant-numeric: tabular-nums; }
.thumb .badge { top: 10px; right: 10px; color: var(--fg-2); }
.cap { padding: 14px 2px 0; }
.cap h3 { font-size: 18px; font-weight: 900; line-height: 1.4; letter-spacing: .01em; transition: color .15s; }
.card a:hover h3 { color: var(--acc); }
.cap .sub { margin-top: 2px; font-size: 13px; color: var(--fg-2); }
.cap .meta { display: flex; gap: 12px; margin-top: 8px; font: 400 11px/1.5 var(--f-mono); color: var(--mut); letter-spacing: .04em; }
.cap .meta span { font-family: var(--f-jp); font-weight: 500; letter-spacing: 0; }

/* ── footer ───────────────────────────────────────── */
.foot { display: grid; gap: 40px; padding-top: 56px; padding-bottom: 56px; border-top: 1px solid var(--line); }
.foot h2 { font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--mut); margin-bottom: 14px; }
.foot p { max-width: 42em; font-size: 14px; color: var(--fg-2); }
.foot .copy { font: 400 12px/1 var(--f-mono); color: var(--mut); }

/* ── player dialog ────────────────────────────────── */
.player {
  width: 100%; height: 100%;
  max-width: none; max-height: none;
  margin: 0; padding: 0;
  border: 0;
  background: rgba(9, 9, 11, .97);
  color: var(--fg);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.player::backdrop { background: rgba(0, 0, 0, .6); }
.player[open] { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
body.locked { overflow: hidden; }
.pl-top {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1320px; margin: 0 auto;
  padding: 14px var(--gut);
  background: linear-gradient(rgba(9, 9, 11, .95) 60%, rgba(9, 9, 11, 0));
}
.pl-num { font: 500 12px/1 var(--f-mono); letter-spacing: .12em; color: var(--mut); }
.pl-num b { color: var(--fg); font-weight: 500; }
.pl-nav { display: flex; gap: 6px; }
.pl-nav button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); transition: background .15s, border-color .15s; }
.pl-nav button:hover { background: var(--bg-3); border-color: rgba(255, 255, 255, .2); }
.pl-stage { max-width: 1320px; margin: 0 auto; padding: 0 var(--gut); }
.pl-stage video {
  width: 100%;
  max-height: calc(100svh - 150px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  background: #000;
  border-radius: var(--r);
  object-fit: contain;
}
.pl-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 32px clamp(32px, 5vw, 80px);
  max-width: 1320px; margin: 0 auto;
  padding: 32px var(--gut) 80px;
}
.pl-langs { display: flex; gap: 6px; margin-bottom: 18px; }
.pl-langs:empty { display: none; }
.pl-langs button { height: 30px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; font-weight: 700; color: var(--fg-2); }
.pl-langs button[aria-pressed="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.player h2 { font-size: clamp(26px, 3.4vw, 44px); font-weight: 900; line-height: 1.25; letter-spacing: .01em; }
.pl-sub { margin-top: 6px; font-size: 15px; color: var(--fg-2); }
.pl-desc { margin-top: 22px; max-width: 38em; font-size: 16px; line-height: 1.95; }
.pl-share { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.btn { display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); font-size: 14px; font-weight: 700; transition: background .15s; }
.btn:hover { background: var(--bg-3); }
.btn[hidden] { display: none; }
.btn .xi { width: 14px; height: 14px; fill: currentColor; stroke: none; margin-right: 8px; }
.btn-acc { background: var(--acc); border-color: var(--acc); color: #fff; }
.btn-acc:hover { background: #ff7152; }
.cap .meta .xm { font-style: normal; font-family: var(--f-en); color: var(--fg-2); letter-spacing: 0; }
.pl-meta dd a { text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; }
.pl-meta dd a:hover { color: var(--fg); }
.pl-side h3 { font: 500 11px/1 var(--f-mono); letter-spacing: .14em; color: var(--mut); margin-bottom: 14px; }
.pl-notes li { position: relative; padding: 10px 0 10px 18px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.7; color: var(--fg-2); }
.pl-notes li::before { content: ''; position: absolute; left: 0; top: 19px; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); }
.pl-meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; }
.pl-meta dt { font: 500 11px/1.9 var(--f-mono); letter-spacing: .1em; color: var(--mut); text-transform: uppercase; }
.pl-meta dd { color: var(--fg-2); }
.pl-related:empty { display: none; }
.pl-related { margin-top: 28px; }
.pl-related a { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center; margin-top: 10px; border-radius: 8px; transition: background .15s; }
.pl-related a:hover { background: var(--bg-2); }
.pl-related img { aspect-ratio: 16 / 9; border-radius: 6px; object-fit: cover; }
.pl-related b { display: block; font-size: 14px; font-weight: 700; line-height: 1.4; }
.pl-related small { font-size: 12px; color: var(--mut); }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 10px 18px; border-radius: 999px;
  background: var(--fg); color: var(--bg);
  font-size: 14px; font-weight: 700;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .pl-body { grid-template-columns: 1fr; }
  .pl-stage { padding: 0; }
  .pl-stage video { border-radius: 0; }
}
@media (max-width: 560px) {
  .hero { min-height: 86svh; padding-top: 96px; }
  .hero-play { padding-right: 18px; }
  .hero-play em { display: block; margin: 4px 0 0; }
  .stats { margin: 26px 0 30px; }
  .cap h3 { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
