/* livetokyo.com — broadcast UI (rebuild 2026-08-19)
   Tokens per docs/DESIGN.md v2. Dark-only by design: the video is the light source. */

:root {
  --ink: #09090B;
  --panel: #111114;
  --panel-2: #17171B;
  --line: #26262B;
  --line-strong: #3A3A42;
  --text: #EDEDEF;
  --text-dim: #8E8E96;
  --text-faint: #5C5C64;
  --signal: #FF3B30;
  --amber: #F0A830;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--amber); }
img { max-width: 100%; }
button {
  font-family: inherit;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

.mono { font-family: var(--mono); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.vh {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
[id] { scroll-margin-top: 110px; }

/* ---------- header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.hdr__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand__mark {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.32em;
  color: var(--text);
  white-space: nowrap;
}
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--signal);
  display: inline-block;
  flex: none;
  animation: breathe 2s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.nav { display: flex; align-items: center; gap: 26px; font-size: 13.5px; font-weight: 500; }
.nav a { color: var(--text-dim); }
.nav a:hover { color: var(--text); }
.nav__lang { font-family: var(--mono); font-size: 12px; color: var(--text-dim); white-space: nowrap; }
.nav__lang strong { color: var(--text); font-weight: 500; }
.nav__unit { font-family: var(--mono); font-size: 12px; color: var(--text-dim); border: 1px solid var(--line); padding: 4px 8px; }
.nav__unit:hover { color: var(--amber); border-color: var(--line-strong); }

/* now strip */
.now-strip {
  border-bottom: 1px solid var(--line);
  background: var(--ink);
}
.now-strip__in {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 7px 24px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.now-strip__in::-webkit-scrollbar { display: none; }
.now-strip__clock { color: var(--amber); }
.now-strip__sep { color: var(--text-faint); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background: #000;
}
.hero__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100dvh - 98px);
  overflow: hidden;
  background: #000;
}
.hero__stage iframe,
.hero__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.hero__poster { object-fit: cover; }
.hero__fade {
  position: absolute;
  inset: 0;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 3;
}
.hero.switching .hero__fade { opacity: 1; }
.hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(9,9,11,0.5) 0%, rgba(9,9,11,0) 22%, rgba(9,9,11,0) 55%, rgba(9,9,11,0.86) 100%);
}
.hero__chip {
  position: absolute;
  z-index: 4;
  top: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  padding: 6px 11px;
  border: 1px solid rgba(237,237,239,0.26);
  background: rgba(9,9,11,0.42);
  color: var(--text);
}
.hero__chip--onair { left: 24px; }
.hero__chip--ch { right: 24px; color: rgba(237,237,239,0.8); }
.hero__meta {
  position: absolute;
  z-index: 4;
  left: 24px;
  right: 24px;
  bottom: 26px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  pointer-events: none;
}
.hero__meta > * { pointer-events: auto; }
.hero__label {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.3em;
  color: var(--amber);
}
.hero__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 4.8vw, 66px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin: 10px 0 8px;
}
.hero__area { font-size: 14px; color: rgba(237,237,239,0.8); }
.hero__actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; flex: none; }
.btn-ghost {
  display: inline-block;
  border: 1px solid var(--amber);
  color: var(--amber);
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn-ghost:hover { background: var(--amber); color: var(--ink); }
.btn-quiet {
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(237,237,239,0.7);
  border: 1px solid rgba(237,237,239,0.26);
  background: rgba(9,9,11,0.42);
  padding: 7px 12px;
  white-space: nowrap;
}
.btn-quiet:hover { color: var(--amber); border-color: var(--amber); }
.hero__cue {
  display: block;
  text-align: center;
  padding: 12px 0 14px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--text-faint);
}
.hero__cue:hover { color: var(--amber); }

/* ---------- sections ---------- */
.sec { padding-top: 96px; }
.sec__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.sec__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.2vw, 40px);
  line-height: 1.05;
  margin: 0 0 8px;
}
.sec__sub { font-size: 14px; color: var(--text-dim); margin: 0; }
.sec__aside { font-family: var(--mono); font-size: 12px; color: var(--text-dim); white-space: nowrap; }

/* ---------- channel guide ---------- */
.guide { border-top: 1px solid var(--line); }
.guide__row {
  display: grid;
  grid-template-columns: 56px 128px minmax(0, 1fr) auto 72px;
  align-items: center;
  gap: 20px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background 0.15s ease;
  text-align: left;
  width: 100%;
}
.guide__row:hover { background: var(--panel); }
.guide__row.is-current {
  background: var(--panel);
  box-shadow: inset 2px 0 0 var(--amber);
}
.guide__ch { font-family: var(--mono); font-size: 13px; color: var(--text-dim); }
.guide__row.is-current .guide__ch { color: var(--amber); }
.guide__thumb {
  width: 128px;
  height: 72px;
  object-fit: cover;
  display: block;
  background: var(--panel-2);
}
.guide__name { font-size: 15px; font-weight: 600; line-height: 1.35; }
.guide__area { font-size: 12.5px; color: var(--text-dim); margin-top: 2px; }
.guide__hint {
  font-size: 13px;
  color: var(--text-dim);
  font-style: italic;
  text-align: right;
}
.guide__live {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--signal);
}
.guide__live .live-dot { width: 7px; height: 7px; }
.guide__foot { display: flex; justify-content: flex-end; padding-top: 14px; }
.guide__more { font-family: var(--mono); font-size: 12px; color: var(--text-dim); }
.guide__more:hover { color: var(--amber); }

/* ---------- chips (region filter) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  padding: 7px 14px;
  border: 1px solid var(--line);
  color: var(--text-dim);
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.chip:hover { color: var(--text); border-color: var(--line-strong); }
.chip.is-on { color: var(--amber); border-color: var(--amber); }

/* ---------- card rails / grids ---------- */
.cardgrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.card {
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  text-align: left;
  padding: 0 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.15s ease, border-color 0.15s ease;
  width: 100%;
}
.card:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--panel-2);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card__body { display: flex; flex-direction: column; gap: 3px; padding: 0 12px; }
.card__name { font-size: 14px; font-weight: 600; line-height: 1.35; }
.card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card__area { font-size: 12px; color: var(--text-dim); }
.card__live {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--signal);
}
.card__live .live-dot { width: 6px; height: 6px; }

/* ---------- scenes ---------- */
.scenegrid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.scene {
  position: relative;
  height: 300px;
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  text-align: left;
  padding: 0;
  width: 100%;
}
.scene img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.scene:hover img { transform: scale(1.03); }
.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9,9,11,0.08) 38%, rgba(9,9,11,0.9) 100%);
}
.scene.is-on { border-color: var(--amber); }
.scene__body {
  position: absolute;
  z-index: 1;
  left: 18px;
  right: 18px;
  bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.scene__name {
  font-family: var(--serif);
  font-style: italic;
  font-size: 26px;
  line-height: 1.1;
  color: var(--text);
}
.scene__desc { font-size: 12.5px; color: rgba(237,237,239,0.75); }
.scene-rail { margin-top: 16px; }
.scene-rail[hidden] { display: none; }

/* ---------- leave it on ---------- */
.leave {
  margin-top: 96px;
  border: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  align-items: center;
  gap: 48px;
  padding: 52px;
}
.leave__copy { display: flex; flex-direction: column; gap: 18px; flex: 1 1 auto; min-width: 0; }
.leave__title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.12;
  margin: 0;
}
.leave__uses { font-size: 14.5px; color: var(--text-dim); line-height: 1.8; margin: 0; }
.leave__visual { position: relative; flex: 0 0 400px; }
.leave__frame {
  border: 1px solid var(--line);
  background: var(--ink);
  padding: 22px;
}
.leave__frame img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  box-shadow: 0 0 60px rgba(240, 168, 48, 0.16);
}
.leave__clock {
  position: absolute;
  top: 32px;
  right: 32px;
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(237,237,239,0.8);
}

/* ---------- footer ---------- */
.ftr {
  border-top: 1px solid var(--line);
  margin-top: 112px;
  padding: 40px 0 30px;
}
.ftr__cols {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.ftr__about { max-width: 460px; display: flex; flex-direction: column; gap: 10px; }
.ftr__note { font-size: 12.5px; color: var(--text-dim); line-height: 1.7; }
.ftr__nav { display: flex; gap: 64px; }
.ftr__col { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.ftr__col a { color: var(--text-dim); }
.ftr__col a:hover { color: var(--amber); }
.ftr__head {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  color: var(--text);
}
.ftr__credits { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 20px; }
.ftr__credits summary {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-dim);
  cursor: pointer;
  list-style: none;
}
.ftr__credits summary::-webkit-details-marker { display: none; }
.ftr__credits summary:hover { color: var(--amber); }
.ftr__credits ul {
  columns: 3;
  gap: 32px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 14px 0 0 0;
  margin: 0;
  list-style: none;
}
.ftr__credits li { margin-bottom: 6px; break-inside: avoid; }
.ftr__credits a { color: var(--text-dim); }
.ftr__credits a:hover { color: var(--amber); }
.ftr__base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  margin-top: 24px;
  padding-top: 18px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-dim);
}

/* ---------- ambient mode ---------- */
body.ambient { overflow: hidden; }
body.ambient .hdr,
body.ambient .now-strip,
body.ambient .hero__scrim,
body.ambient .hero__chip,
body.ambient .hero__meta,
body.ambient .hero__cue,
body.ambient main > *:not(.hero),
body.ambient .ftr { display: none; }
body.ambient .hero {
  position: fixed;
  inset: 0;
  z-index: 100;
}
/* hide the comment drawer trigger (chimatter SDK) while ambient */
body.ambient [class*="cmt-"] { display: none !important; }
body.ambient .hero__stage {
  aspect-ratio: auto;
  max-height: none;
  height: 100dvh;
}
.ambient-hud {
  display: none;
  position: fixed;
  z-index: 101;
  inset: 0;
  pointer-events: none;
}
body.ambient .ambient-hud { display: block; }
.ambient-hud__clock {
  position: absolute;
  top: 22px;
  right: 30px;
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(237,237,239,0.5);
}
.ambient-hud__name {
  position: absolute;
  left: 30px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  opacity: 0.55;
}
.ambient-hud__ch {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--text);
}
.ambient-hud__title { font-family: var(--serif); font-size: 26px; color: var(--text); }
.ambient-hud__exit {
  position: absolute;
  right: 30px;
  bottom: 26px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(237,237,239,0.5);
  pointer-events: auto;
  padding: 8px 12px;
  border: 1px solid rgba(237,237,239,0.2);
  background: rgba(9,9,11,0.4);
}
.ambient-hud__exit:hover { color: var(--amber); border-color: var(--amber); }
.ambient-hud.is-idle .ambient-hud__clock,
.ambient-hud.is-idle .ambient-hud__name,
.ambient-hud.is-idle .ambient-hud__exit { opacity: 0; transition: opacity 1.2s ease; }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ---------- about page ---------- */
.prose { max-width: 720px; }
.prose h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 4vw, 52px); line-height: 1.05; margin: 0 0 18px; }
.prose h2 { font-family: var(--serif); font-weight: 400; font-size: 27px; margin: 44px 0 12px; }
.prose p { color: var(--text-dim); margin: 0 0 14px; }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--amber); }
.prose a:hover { text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 1023px) {
  .cardgrid, .scenegrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leave { flex-direction: column; align-items: stretch; padding: 32px 24px; gap: 28px; }
  .leave__visual { flex: none; }
  .guide__hint { display: none; }
  .guide__row { grid-template-columns: 44px 112px minmax(0, 1fr) 64px; }
  .ftr__credits ul { columns: 2; }
}
@media (max-width: 767px) {
  .nav { gap: 16px; }
  .nav a[data-navlink] { display: none; }
  .hdr__bar { height: 54px; padding: 0 16px; }
  .wrap { padding: 0 16px; }
  .now-strip__in { padding: 6px 16px; }
  .hero__stage { max-height: none; }
  .hero__meta { position: static; padding: 16px; flex-direction: column; align-items: flex-start; }
  .hero__scrim { background: linear-gradient(180deg, rgba(9,9,11,0.4) 0%, rgba(9,9,11,0) 30%, rgba(9,9,11,0) 100%); }
  .hero__chip--onair { left: 16px; top: 12px; }
  .hero__chip--ch { right: 16px; top: 12px; }
  .hero { background: var(--ink); }
  .hero__actions { flex-direction: row; align-items: center; }
  .sec { padding-top: 64px; }
  .guide__row { grid-template-columns: 36px 96px minmax(0, 1fr) 20px; gap: 12px; padding: 10px 8px; }
  .guide__thumb { width: 96px; height: 54px; }
  .guide__live span:last-child { display: none; }
  .cardgrid, .scenegrid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .scene { height: 170px; }
  .scene__name { font-size: 19px; }
  .scene__desc { display: none; }
  .ftr__nav { gap: 40px; }
  .ftr__credits ul { columns: 1; }
}
