
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ink-950); color: var(--text); font-family: var(--font); -webkit-text-size-adjust: 100%; }
body { position: relative; margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
[hidden] { display: none !important; }
h1, h2, p, ol, ul { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 6px; }

body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: min(1100px, 100%); z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 50% 0 / 80px 80px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 50% 0 / 80px 80px;
  -webkit-mask-image: radial-gradient(75% 70% at 50% 22%, #000 0%, transparent 78%); mask-image: radial-gradient(75% 70% at 50% 22%, #000 0%, transparent 78%);
  opacity: .42;
}
body::after {
  content: ""; position: absolute; left: 50%; top: 120px; width: min(1200px, 100%); height: 620px; transform: translateX(-50%); z-index: -1; pointer-events: none;
  background: radial-gradient(50% 50% at 50% 50%, var(--tie-soft), transparent 70%); opacity: .55; filter: blur(40px);
}

.th-wrap { width: min(100% - 2 * var(--gutter), var(--w-wide)); margin-inline: auto; }
.th-skip { position: absolute; left: 16px; top: -60px; z-index: 5; padding: 10px 14px; border-radius: var(--r-sm); background: var(--paper); color: var(--on-light); font-weight: 600; text-decoration: none; }
.th-skip:focus { top: 12px; }

.th-top { border-bottom: 1px solid var(--line); }
.th-top-in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 64px; }
.th-brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; min-height: 44px; text-decoration: none; color: var(--text); }
.th-mark { width: 24px; height: 28px; flex: none; }
.th-s1 { stop-color: var(--cyan); } .th-s2 { stop-color: var(--azure); } .th-s3 { stop-color: var(--violet); }
.th-brand-name { font-size: 15px; font-weight: 600; letter-spacing: -.01em; white-space: nowrap; color: var(--text-2); }
.th-brand-name b { font-weight: 800; color: var(--text); }
.th-top-label, .th-label, .th-now-label, .th-side-h, .th-side-n { font: 700 var(--fs-label)/1 var(--font-mono); letter-spacing: var(--track-label); text-transform: uppercase; }
.th-top-label { color: var(--text-3); }
.th-back { justify-self: end; display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px; font-size: 14px; font-weight: 600; color: var(--text-2); text-decoration: none; transition: color var(--t-fast) var(--ease-out); }
.th-back-short { display: none; }
.th-back::after { content: ""; width: 7px; height: 7px; margin-left: 9px; border: solid currentColor; border-width: 1.6px 1.6px 0 0; transform: rotate(45deg); transition: transform var(--t-fast) var(--ease-out); }
.th-back:hover { color: var(--text); }
.th-back:hover::after { transform: translateX(3px) rotate(45deg); }

.th-main { flex: 1 0 auto; }
.th-hero { padding-top: clamp(1.5rem, 3.4vw, 2.75rem); }
.th-title { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 24px; margin-bottom: clamp(1.1rem, 2.2vw, 1.75rem); }
.th-title > * { grid-column: 1; }
.th-title > .th-keys { grid-column: 2; grid-row: 3; align-self: center; }
.th-keys { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 16px; font: 700 11px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.th-keys span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.th-keys kbd { min-width: 22px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 6px; font: inherit; color: var(--text-2); background: var(--ink-850); box-shadow: inset 0 0 0 1px var(--line-strong); }
.th-keys kbd + kbd { margin-left: -2px; }
.th-label { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; color: var(--text-2); }
.th-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px var(--tie-soft); }
.th-hero[data-playing="1"] .th-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--cyan); animation: th-pulse 1.8s var(--ease-out) infinite; }
@keyframes th-pulse { from { transform: scale(1); opacity: .7; } to { transform: scale(3.4); opacity: 0; } }
.th-label-sep { color: var(--text-3); }
#thIndex { color: var(--text-2); }
.th-h1 { font-size: clamp(2rem, 4.4vw, 3.5rem); font-weight: 800; line-height: var(--lh-tight); letter-spacing: var(--track-head); text-wrap: balance; overflow-wrap: anywhere; }
.th-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; min-height: 28px; font-size: 15px; line-height: 1.3; color: var(--text-2); }
.th-cat { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px 0 9px; border: 1px solid var(--line-strong); border-radius: var(--r-pill); font: 700 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.th-cat i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent, var(--azure)); }
.th-meta-fig { font: 700 12.5px/1 var(--font-mono); letter-spacing: .04em; color: var(--text-2); }

.th-stage { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 20px; align-items: stretch; }
.th-player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; background: var(--ink-900); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-2); scroll-margin-top: 16px; }
.th-player .stlive { border-radius: inherit; }
.th-side { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--glass); box-shadow: var(--shadow-1); overflow: hidden; }
.th-side-in { position: absolute; inset: 0; display: flex; flex-direction: column; }
.th-side-head { flex: none; display: flex; align-items: baseline; gap: 10px; padding: 18px 20px 12px; }
.th-side-h { color: var(--text-2); }
.th-side-n { color: var(--text-2); }
.th-chapters { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 0 8px 8px; list-style: none; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.th-chapters li { flex: 1 1 0; min-height: 36px; max-height: 50px; display: flex; }
.th-chapters[data-more="1"] { -webkit-mask-image: linear-gradient(#000 calc(100% - 44px), transparent); mask-image: linear-gradient(#000 calc(100% - 44px), transparent); }
.th-chap {
  -webkit-appearance: none; appearance: none; position: relative; flex: 1 1 auto; width: 100%; min-width: 0; padding: 0 12px 0 10px; border: 0; border-radius: 10px; overflow: hidden;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px;
  background: none; color: var(--text-2); font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out);
}
.th-chap:focus-visible { outline-offset: -2px; border-radius: 10px; }
.th-chap-n { min-width: 26px; padding: 5px 5px 4px; border-radius: 5px; text-align: center; font: 700 11px/1 var(--font-mono); letter-spacing: .02em; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line-strong); transition: background var(--t-fast) var(--ease-out), color var(--t-fast) var(--ease-out); }
.th-chap-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; font-weight: 600; line-height: 1.25; letter-spacing: .07em; text-transform: uppercase; }
.th-chap-time { font: 700 11px/1 var(--font-mono); color: var(--text-2); }
@media (hover: hover) { .th-chap:hover { background: var(--line); color: var(--text); } }
.th-chap[aria-current="true"] { color: var(--text); background: var(--line); }
.th-chap[aria-current="true"] .th-chap-n { background: var(--paper); color: var(--on-light); box-shadow: none; }
.th-chap[aria-current="true"] .th-chap-time { color: var(--text); }
.th-chap[aria-current="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--tie); transform-origin: 0 50%; transform: scaleX(var(--th-p, 0)); }
.th-chap[disabled] { cursor: default; background: none; color: var(--text-2); }
.th-hero[data-live="0"] .th-keys { visibility: hidden; }

.th-now { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 12px 20px; align-items: start; min-height: 86px; padding: 20px 0 0; }
.th-now-label { padding-top: 12px; color: var(--text-3); }
.th-facts { display: flex; flex-wrap: wrap; gap: 10px; min-width: 0; }
.th-help { flex: 1 1 100%; padding-top: 7px; font-size: var(--fs-lead); line-height: 1.4; color: var(--text); }
.th-help-sub { flex: 1 1 100%; margin-top: -4px; font-size: var(--fs-small); line-height: 1.5; color: var(--text-2); }
.th-fact { position: relative; min-width: 0; max-width: 100%; padding: 10px 16px 10px 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--ink-850); animation: th-in 380ms var(--ease-out) both; }
.th-fact:nth-child(2) { animation-delay: 60ms; } .th-fact:nth-child(3) { animation-delay: 120ms; } .th-fact:nth-child(4) { animation-delay: 180ms; }
.th-fact::before { content: ""; position: absolute; left: -1px; top: 9px; bottom: 9px; width: 3px; border-radius: 2px; background: var(--accent, var(--azure)); }
.th-fact b { display: block; font-size: 14px; font-weight: 700; line-height: 1.3; letter-spacing: -.005em; color: var(--text); }
.th-fact span { display: block; margin-top: 3px; font: 700 11.5px/1.45 var(--font-mono); color: var(--text-2); overflow-wrap: anywhere; }
@keyframes th-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.th-picker { padding: clamp(2.5rem, 6vw, 4.5rem) 0 clamp(3rem, 7vw, 5.5rem); }
.th-picker-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; padding-bottom: 18px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.th-h2 { font-size: var(--fs-h3); font-weight: 700; letter-spacing: var(--track-head); line-height: var(--lh-snug); }
.th-picker-note { font-size: var(--fs-small); color: var(--text-3); }
.th-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 30px 20px; padding: 0; list-style: none; }
.th-card { -webkit-appearance: none; appearance: none; display: block; width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.th-card:focus-visible { outline-offset: 6px; border-radius: var(--r-sm); }
.th-thumb { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: var(--r-sm); background: var(--ink-850); box-shadow: 0 0 0 1px var(--line); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out); }
.th-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.th-thumb::after {    
  content: ""; position: absolute; inset: -5px; border-radius: 14px; padding: 1.5px; background: var(--tie); pointer-events: none; opacity: 0; transform: scale(.985);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.th-card[aria-current="true"] .th-thumb::after { opacity: 1; transform: none; }
.th-len { position: absolute; right: 7px; bottom: 7px; padding: 4px 6px 3px; border-radius: 6px; font: 700 10.5px/1 var(--font-mono); letter-spacing: .04em; color: var(--text); background: var(--ink-950); box-shadow: 0 0 0 1px var(--line-strong); }
@media (hover: hover) { .th-card:hover .th-thumb { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-1); } }
.th-card-text { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 2px; padding-top: 12px; }
.th-card-i { grid-row: 1 / span 2; padding-top: 3px; font: 700 11px/1.2 var(--font-mono); letter-spacing: .04em; color: var(--text-3); }
.th-card-model { font-size: 15px; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.th-card-maker { font-size: 13px; line-height: 1.35; color: var(--text-3); }
.th-card[aria-current="true"] .th-card-i { color: var(--cyan); }

.th-foot { border-top: 1px solid var(--line); }
.th-foot-in { display: grid; gap: 4px; padding: 26px 0 34px; font-size: 13px; line-height: 1.5; color: var(--text-3); }
.th-noscript { margin: 0; padding: 20px var(--gutter); font-size: var(--fs-small); color: var(--text-2); }

@media (max-width: 1099px) {
  .th-stage { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .th-side { border: 0; border-radius: 0; background: none; box-shadow: none; overflow: visible; margin-inline: calc(-1 * var(--gutter)); }
  .th-side-in { position: static; display: block; }
  .th-side-head { display: none; }
  .th-chapters { flex-direction: row; gap: 8px; padding: 2px var(--gutter) 6px; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .th-chapters::-webkit-scrollbar { display: none; }
  .th-chapters[data-more="1"] { -webkit-mask-image: none; mask-image: none; }
  .th-chapters li { flex: none; min-height: 44px; max-height: none; scroll-snap-align: start; }
  .th-chap { grid-template-columns: auto auto; gap: 9px; height: 44px; padding: 0 14px 0 9px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 1px var(--line); background: var(--ink-900); }
  .th-chap:focus-visible { border-radius: var(--r-pill); }
  .th-chap[aria-current="true"] { background: var(--ink-800); box-shadow: inset 0 0 0 1px var(--line-strong); }
  .th-chap-n { border-radius: 999px; min-width: 28px; }
  .th-chap-t { overflow: visible; }
  .th-chap-time { display: none; }
  .th-chap[aria-current="true"]::after { left: 14px; right: 14px; bottom: 5px; height: 1.5px; border-radius: 1px; }
  .th-now { grid-template-columns: minmax(0, 1fr); gap: 4px; padding-top: 14px; min-height: 96px; }
  .th-now-label { padding-top: 4px; }
  .th-keys { display: none; }
  .th-title { grid-template-columns: minmax(0, 1fr); }
}
@media (hover: none) { .th-keys { display: none; } }
@media (max-width: 959px) {
  .th-grid { display: flex; gap: 14px; margin-inline: calc(-1 * var(--gutter)); padding: 6px var(--gutter) 10px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-inline: var(--gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .th-grid::-webkit-scrollbar { display: none; }
  .th-grid li { flex: none; width: min(62vw, 250px); scroll-snap-align: start; }
}
@media (max-width: 759px) {
  .th-top-in { grid-template-columns: 1fr auto; height: 56px; }
  .th-top-label { display: none; }
  .th-stage { margin-inline: calc(-1 * var(--gutter)); }
  .th-player { border-radius: 0; box-shadow: 0 1px 0 var(--line), 0 -1px 0 var(--line); }
  .th-side { margin-inline: 0; }
  .th-now[data-started="1"] { min-height: 262px; }       
  .th-help { font-size: 1rem; }
  .th-fact { flex: 1 1 100%; }
  .th-back-long { display: none; }
  .th-back-short { display: inline; }
  .th-label { font-size: 11px; letter-spacing: .07em; }
  .th-picker-head { margin-bottom: 14px; }
}
@media (pointer: coarse) { .th-chapters li { min-height: 44px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; animation-delay: 0s !important; }
}
