/* === Twilight Brutalist Mono ===
   Eureka Seven 名言集 — Adult Edition */

@import url('https://fonts.googleapis.com/css2?family=Shippori+Mincho:wght@400;500;600;700;800&family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400;1,500&family=JetBrains+Mono:wght@300;400;500&family=Noto+Sans+JP:wght@300;400;500;700&display=swap');

:root {
  /* Twilight palette — エウレカの空 */
  --night-0: #05060f;       /* deepest void */
  --night-1: #0a0c1a;       /* base bg */
  --night-2: #11132a;       /* card surface */
  --night-3: #1a1c3a;       /* elevated */
  --indigo:  #1e1b4b;
  --violet:  #4c2a85;
  --magenta: #7c3aed;
  --twilight-pink: #f0abfc;
  --twilight-peach: #fda4af;
  --twilight-rose: #fecdd3;
  --dawn:    #fce7f3;
  --moon:    #e0e7ff;
  --mist:    #cbd5e1;
  --ash:     #94a3b8;
  --steel:   #475569;

  --fg:      #e2e8f0;
  --fg-dim:  #94a3b8;
  --fg-mute: #64748b;
  --bg:      var(--night-1);
  --bg-card: rgba(17, 19, 42, 0.6);

  /* Type stacks */
  --f-mincho: 'Shippori Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', serif;
  --f-serif:  'Cormorant Garamond', 'Shippori Mincho', serif;
  --f-mono:   'JetBrains Mono', 'SF Mono', Menlo, monospace;
  --f-sans:   'Noto Sans JP', -apple-system, sans-serif;

  --grad-twilight: linear-gradient(180deg, #05060f 0%, #0a0c1a 20%, #1e1b4b 55%, #4c2a85 80%, #fda4af 100%);
  --grad-dawn: linear-gradient(180deg, #1e1b4b 0%, #4c2a85 50%, #f0abfc 100%);
}

[data-theme="light"] {
  --night-0: #faf7f2;
  --night-1: #f5f1ea;
  --night-2: #ebe4d8;
  --night-3: #ddd4c1;
  --fg:      #1a1c3a;
  --fg-dim:  #4c2a85;
  --fg-mute: #64748b;
  --bg:      #f5f1ea;
  --bg-card: rgba(255, 252, 245, 0.7);
  --grad-twilight: linear-gradient(180deg, #faf7f2 0%, #ebe4d8 30%, #ddd4c1 60%, #c7b9d9 90%, #f0abfc 100%);
  --grad-dawn: linear-gradient(180deg, #ebe4d8 0%, #c7b9d9 50%, #f0abfc 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-mincho);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  background: var(--grad-twilight);
  background-attachment: fixed;
}

::selection { background: var(--magenta); color: white; }

/* Subtle particle/grain */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 80%, rgba(124, 58, 237, 0.08), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(240, 171, 252, 0.06), transparent 50%);
  z-index: 0;
}

body::after {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.35;
  mix-blend-mode: overlay;
  z-index: 1;
}

/* ============ HEADER / NAV ============ */
.site-chrome {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 36px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  mix-blend-mode: difference;
}

.site-chrome .left { display: flex; gap: 32px; align-items: center; }
.site-chrome .right { display: flex; gap: 24px; align-items: center; }

.brand-mark {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  color: var(--fg);
  letter-spacing: 0.3em;
}
.brand-mark .dot {
  display: inline-block;
  width: 6px; height: 6px;
  background: var(--twilight-pink);
  border-radius: 50%;
  margin: 0 8px 1px;
  vertical-align: middle;
  animation: pulse 3s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}

.chrome-btn {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  padding: 4px 0;
  position: relative;
  transition: color 0.3s;
}
.chrome-btn:hover { color: var(--twilight-pink); }
.chrome-btn::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.chrome-btn:hover::after { transform: scaleX(1); }
.chrome-btn.active { color: var(--twilight-pink); }
.chrome-btn.active::after { transform: scaleX(1); }

/* ============ SCROLL CONTAINER ============ */
.scroll-stage {
  position: relative;
  z-index: 2;
  scroll-snap-type: y mandatory;
  height: 100vh;
  overflow-y: scroll;
  scroll-behavior: smooth;
}
.scroll-stage::-webkit-scrollbar { width: 0; }

.scene {
  scroll-snap-align: start;
  scroll-snap-stop: always;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(80px, 10vh, 120px) 6vw clamp(60px, 7vh, 90px);
}

/* ============ HERO ============ */
.hero {
  align-items: stretch;
  justify-content: space-between;
}

.hero-meta-top {
  display: flex;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--fg-mute);
  text-transform: uppercase;
}

.hero-quote {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  margin: 24px 0;
  position: relative;
  min-height: 0;
}

.hero-quote .number {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(60px, 8vw, 120px);
  line-height: 0.85;
  color: transparent;
  -webkit-text-stroke: 1px var(--twilight-pink);
  opacity: 0.5;
  user-select: none;
  margin-bottom: 8px;
}

.hero-quote .jp {
  font-family: var(--f-mincho);
  font-weight: 700;
  font-size: clamp(32px, 6.2vw, 96px);
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: var(--fg);
  position: relative;
  z-index: 2;
}
.hero-quote .jp .punc { color: var(--twilight-pink); }

.hero-quote .en {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(15px, 1.8vw, 24px);
  line-height: 1.4;
  color: var(--fg-dim);
  margin-top: 20px;
  max-width: 70ch;
  letter-spacing: 0.01em;
}

.hero-meta-bottom {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-dim);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
}
.hero-meta-bottom .field {
  display: flex; flex-direction: column; gap: 8px;
}
.hero-meta-bottom .label { color: var(--fg-mute); font-size: 9px; }
.hero-meta-bottom .value { color: var(--fg); font-family: var(--f-sans); font-weight: 400; font-size: 14px; letter-spacing: 0; text-transform: none; }

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.4em;
  color: var(--fg-mute);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: float 3s ease-in-out infinite;
}
.scroll-cue .line {
  width: 1px; height: 36px;
  background: linear-gradient(180deg, var(--twilight-pink), transparent);
}
@keyframes float {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ============ QUOTE SCENE (non-hero) ============ */
.quote-scene {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.quote-scene .index-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--fg-mute);
  text-transform: uppercase;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 16px;
}

.quote-scene .episode-tag {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--twilight-pink);
  letter-spacing: 0.05em;
  text-transform: none;
}

.quote-body {
  margin: 8vh 0;
  position: relative;
}

.quote-body .quote-num {
  font-family: var(--f-serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(48px, 6vw, 88px);
  color: var(--twilight-pink);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 24px;
}

.quote-body .jp {
  font-family: var(--f-mincho);
  font-weight: 600;
  font-size: clamp(32px, 5.4vw, 84px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--fg);
  max-width: 22ch;
}
.quote-body .jp.long { font-size: clamp(26px, 3.8vw, 58px); max-width: 28ch; }
.quote-body .jp.xlong { font-size: clamp(22px, 3.2vw, 48px); max-width: 36ch; line-height: 1.4; }

.quote-body .en {
  font-family: var(--f-serif);
  font-style: italic;
  font-weight: 300;
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.5;
  color: var(--fg-dim);
  margin-top: 28px;
  max-width: 60ch;
}

.quote-body .romaji {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--fg-mute);
  margin-top: 16px;
  max-width: 70ch;
  font-weight: 300;
}

/* Meta footer for each quote */
.quote-foot {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr auto;
  gap: 32px;
  align-items: end;
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fg-mute);
}
.quote-foot .field { display: flex; flex-direction: column; gap: 6px; }
.quote-foot .label { font-size: 9px; }
.quote-foot .value {
  font-family: var(--f-sans);
  font-weight: 400;
  color: var(--fg);
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}
.quote-foot .value.serif {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--twilight-pink);
  font-weight: 400;
}
.quote-foot .context {
  font-family: var(--f-sans);
  font-weight: 300;
  font-size: 12px;
  line-height: 1.6;
  color: var(--fg-dim);
  text-transform: none;
  letter-spacing: 0;
  max-width: 50ch;
}

.fav-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--fg-dim);
  width: 44px; height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.3s;
  font-size: 16px;
}
.fav-btn:hover {
  border-color: var(--twilight-pink);
  color: var(--twilight-pink);
  transform: scale(1.05);
}
.fav-btn.active {
  border-color: var(--twilight-pink);
  background: rgba(240, 171, 252, 0.12);
  color: var(--twilight-pink);
}

/* ============ MOTION (subtle) ============ */
.reveal { opacity: 1; transform: none; transition: opacity 1.4s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal-2 { transition-delay: 0.15s; }
.reveal-3 { transition-delay: 0.3s; }
.reveal-4 { transition-delay: 0.45s; }
.reveal-5 { transition-delay: 0.6s; }
.reveal-6 { transition-delay: 0.75s; }

/* JS-ready reveal: hide then animate in */
.js-ready .reveal { opacity: 0; transform: translateY(16px); }
.js-ready .reveal.in { opacity: 1; transform: none; }

/* ============ INDEX / END SCENE ============ */
.end-scene {
  align-items: center;
  text-align: center;
  justify-content: center;
}
.end-scene .end-mark {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: clamp(60px, 10vw, 140px);
  font-weight: 300;
  color: var(--twilight-pink);
  letter-spacing: 0.1em;
  line-height: 1;
}
.end-scene .end-sub {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.4em;
  color: var(--fg-mute);
  text-transform: uppercase;
  margin-top: 24px;
}
.end-scene .credit {
  font-family: var(--f-sans);
  font-size: 12px;
  color: var(--fg-mute);
  margin-top: 80px;
  line-height: 2;
  letter-spacing: 0.05em;
}

/* ============ FILTER PANEL ============ */
.filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 6, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}
.filter-overlay.open { opacity: 1; pointer-events: auto; }

.filter-panel {
  width: 100%;
  max-width: 720px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(17, 19, 42, 0.5);
  padding: 48px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.filter-overlay.open .filter-panel { transform: translateY(0); }

.filter-panel .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 20px;
  margin-bottom: 32px;
}
.filter-panel .head h2 {
  font-family: var(--f-mincho);
  font-weight: 600;
  font-size: 28px;
  color: var(--fg);
  margin: 0;
}
.filter-panel .head .sub {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--fg-mute);
  text-transform: uppercase;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
}
.char-chip {
  background: rgba(17, 19, 42, 0.7);
  border: none;
  padding: 18px 20px;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--fg-dim);
  font-family: var(--f-mincho);
  font-size: 16px;
  transition: background 0.25s, color 0.25s;
}
.char-chip:hover { background: rgba(76, 42, 133, 0.4); color: var(--fg); }
.char-chip.active { background: rgba(240, 171, 252, 0.15); color: var(--twilight-pink); }
.char-chip .count {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--fg-mute);
  letter-spacing: 0.1em;
}

.filter-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  justify-content: flex-end;
}
.btn-ghost, .btn-primary {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 14px 28px;
  border-radius: 0;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.2);
  background: transparent;
  color: var(--fg-dim);
  transition: all 0.25s;
}
.btn-ghost:hover { border-color: var(--fg); color: var(--fg); }
.btn-primary {
  background: var(--twilight-pink);
  color: var(--night-1);
  border-color: var(--twilight-pink);
  font-weight: 500;
}
.btn-primary:hover { background: var(--dawn); border-color: var(--dawn); }

/* close button */
.icon-x {
  position: absolute;
  top: 20px; right: 20px;
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  cursor: pointer;
  color: var(--fg-dim);
  display: grid; place-items: center;
  transition: all 0.25s;
}
.icon-x:hover { border-color: var(--twilight-pink); color: var(--twilight-pink); }

/* ============ AMBIENT AUDIO BUTTON ============ */
.audio-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}
.audio-toggle .equalizer {
  display: inline-flex;
  align-items: end;
  gap: 2px;
  height: 12px;
}
.audio-toggle .equalizer span {
  display: block;
  width: 2px;
  background: currentColor;
  height: 4px;
  opacity: 0.4;
}
.audio-toggle.playing .equalizer span {
  animation: eq 1.2s ease-in-out infinite;
}
.audio-toggle.playing .equalizer span:nth-child(2) { animation-delay: 0.15s; }
.audio-toggle.playing .equalizer span:nth-child(3) { animation-delay: 0.3s; }
.audio-toggle.playing .equalizer span:nth-child(4) { animation-delay: 0.45s; }
@keyframes eq {
  0%,100% { height: 3px; opacity: 0.5; }
  50% { height: 12px; opacity: 1; }
}

/* Audio mode swap button */
.mode-swap {
  font-size: 9px !important;
  letter-spacing: 0.2em !important;
  padding: 5px 10px !important;
  border: 1px solid rgba(255,255,255,0.18) !important;
  background: rgba(124, 58, 237, 0.08);
  transition: all 0.3s;
}
.mode-swap:hover {
  border-color: var(--twilight-pink) !important;
  background: rgba(240, 171, 252, 0.12);
  color: var(--twilight-pink);
}
.mode-swap::after { display: none !important; }
.audio-toggle[data-mode="techno"] {
  color: #f472b6;
}
.audio-toggle[data-mode="techno"].playing .equalizer span {
  background: #f472b6;
  animation-duration: 0.4s !important;
}

/* ============ PROGRESS BAR ============ */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 1px;
  background: var(--twilight-pink);
  z-index: 150;
  transition: width 0.1s linear;
  width: 0;
  box-shadow: 0 0 12px var(--twilight-pink);
}

/* ============ INDEX SIDE NAV ============ */
.dotnav {
  position: fixed;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dotnav button {
  width: 8px; height: 8px;
  border-radius: 0;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s;
}
.dotnav button.active {
  background: var(--twilight-pink);
  border-color: var(--twilight-pink);
  height: 24px;
}
.dotnav button:hover { border-color: var(--twilight-pink); }

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: rgba(17,19,42,0.85);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(240,171,252,0.3);
  color: var(--fg);
  padding: 14px 28px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 300;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ============ COMMENTARY (アクセルG解説) ============ */
.commentary-section {
  margin-top: 28px;
  padding: 22px 24px;
  background: rgba(17, 19, 42, 0.55);
  border-left: 2px solid rgba(240, 171, 252, 0.4);
}

.commentary-section::before {
  content: 'COMMENTARY — アクセルG';
  display: block;
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--twilight-pink);
  text-transform: uppercase;
  margin-bottom: 14px;
  opacity: 0.8;
}

.commentary-text {
  font-family: var(--f-mincho);
  font-weight: 400;
  font-size: clamp(12px, 1.3vw, 14px);
  line-height: 2.1;
  color: var(--fg-dim);
  max-width: 72ch;
}

.commentary-byline {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--fg-mute);
  margin-top: 12px;
  text-transform: uppercase;
}

/* ============ RESPONSIVE — TABLET ============ */
@media (max-width: 1024px) {
  .scene { padding: 96px 5vw 72px; }
  .hero-meta-bottom { grid-template-columns: repeat(2, 1fr); gap: 24px 32px; }
  .quote-foot { grid-template-columns: 1fr 1fr auto; gap: 20px 24px; }
  .quote-foot .field:nth-child(4) { grid-column: 1 / 3; }
  .dotnav { right: 12px; }
}

/* ============ RESPONSIVE — MOBILE ============ */
@media (max-width: 760px) {
  /* Header: condensed two-row layout */
  .site-chrome {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px 12px;
    background: linear-gradient(180deg, rgba(5,6,15,0.92), rgba(5,6,15,0.7) 80%, transparent);
    backdrop-filter: blur(12px);
  }
  .site-chrome .left {
    width: 100%;
    justify-content: space-between;
    gap: 12px;
  }
  .site-chrome .left .muted { font-size: 8px; letter-spacing: 0.18em; }
  .site-chrome .right {
    width: 100%;
    justify-content: space-between;
    gap: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .site-chrome .right::-webkit-scrollbar { display: none; }
  .brand-mark { font-size: 10px; letter-spacing: 0.22em; }
  .chrome-btn {
    font-size: 9px;
    letter-spacing: 0.16em;
    padding: 6px 0;
    flex-shrink: 0;
    white-space: nowrap;
  }
  #btnFav { font-size: 0; }
  #btnFav::before {
    content: 'FAVS';
    font-size: 9px;
    letter-spacing: 0.16em;
  }
  #btnFav #favCount { font-size: 9px; margin-left: 4px; }
  #btnRandom { font-size: 0; }
  #btnRandom::before {
    content: 'TODAY';
    font-size: 9px;
    letter-spacing: 0.16em;
  }

  .scene { padding: 132px 6vw 80px; }

  .hero-meta-top { gap: 12px; }
  .hero-meta-top > div { font-size: 9px !important; }
  .hero-quote { padding: 20px 0; }
  .hero-quote .number {
    font-size: clamp(72px, 22vw, 140px);
    margin-bottom: 12px;
  }
  .hero-quote .jp {
    font-size: clamp(38px, 11vw, 64px);
    line-height: 1.32;
    letter-spacing: 0.01em;
  }
  .hero-quote .en {
    font-size: clamp(15px, 4.2vw, 22px);
    line-height: 1.45;
    margin-top: 24px;
  }
  .hero-meta-bottom {
    grid-template-columns: 1fr 1fr;
    gap: 18px 20px;
    padding-top: 20px;
  }
  .hero-meta-bottom .value { font-size: 12px; }

  .quote-scene .index-row { font-size: 9px; }
  .quote-scene .episode-tag { font-size: 11px; }
  .quote-body { margin: 4vh 0; }
  .quote-body .quote-num {
    font-size: clamp(60px, 18vw, 110px);
    margin-bottom: 8px;
  }
  .quote-body .jp {
    font-size: clamp(30px, 8.5vw, 48px) !important;
    line-height: 1.35 !important;
    max-width: 100% !important;
  }
  .quote-body .jp.long {
    font-size: clamp(26px, 7.4vw, 42px) !important;
  }
  .quote-body .jp.xlong {
    font-size: clamp(22px, 6.2vw, 36px) !important;
    line-height: 1.45 !important;
  }
  .quote-body .en {
    font-size: clamp(14px, 4vw, 18px);
    line-height: 1.5;
    margin-top: 20px;
    max-width: 100%;
  }
  .quote-body .romaji {
    font-size: 10px;
    margin-top: 14px;
  }

  .quote-foot {
    grid-template-columns: 1fr 1fr;
    gap: 16px 20px;
    padding-top: 20px;
    margin-top: auto;
  }
  .quote-foot .field { gap: 4px; }
  .quote-foot .label { font-size: 8px; }
  .quote-foot .value { font-size: 12px; }
  .quote-foot .context {
    grid-column: 1 / -1;
    font-size: 12px;
    line-height: 1.55;
  }
  .quote-foot .fav-btn {
    grid-column: 1 / -1;
    justify-self: start;
    width: 44px; height: 44px;
    margin-top: 4px;
  }

  .commentary-section {
    margin-top: 20px;
    padding: 16px 14px;
  }
  .commentary-text {
    font-size: 12.5px;
    line-height: 1.95;
  }

  .dotnav { display: none; }
  .progress { height: 1px; }

  .scroll-cue {
    bottom: 16px;
    right: 16px;
    font-size: 8px;
  }
  .scroll-cue .line { height: 24px; }

  .filter-overlay { padding: 0; align-items: stretch; }
  .filter-panel {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 24px 20px;
    border-radius: 0;
    overflow-y: auto;
  }
  .filter-panel .head { margin-bottom: 24px; padding-right: 48px; }
  .filter-panel .head h2 { font-size: 22px; }
  .char-grid {
    grid-template-columns: 1fr;
    padding: 8px;
    gap: 4px;
    max-height: calc(100dvh - 280px);
    overflow-y: auto;
  }
  .char-chip {
    padding: 14px 18px;
    font-size: 13px;
    min-height: 48px;
  }
  .filter-actions {
    gap: 12px;
    margin-top: 24px;
    flex-direction: column-reverse;
  }
  .btn-ghost, .btn-primary {
    width: 100%;
    padding: 14px 20px;
    min-height: 48px;
    justify-content: center;
    text-align: center;
  }
  .icon-x {
    top: 16px; right: 16px;
    width: 44px; height: 44px;
  }

  .toast {
    bottom: 20px;
    left: 16px; right: 16px;
    transform: none;
    width: auto;
    text-align: center;
    font-size: 10px;
  }
  .toast.show { transform: translateY(0); }

  .end-scene .end-mark { font-size: clamp(80px, 24vw, 140px); }
  .end-scene .end-sub { font-size: 10px; }
}

/* ============ RESPONSIVE — SMALL MOBILE ============ */
@media (max-width: 380px) {
  .site-chrome { padding: 10px 12px; }
  .scene { padding: 128px 5vw 72px; }
  .hero-quote .jp { font-size: clamp(34px, 10vw, 52px); }
  .quote-body .jp { font-size: clamp(26px, 7.5vw, 40px) !important; }
  .hero-meta-bottom { grid-template-columns: 1fr; }
}

/* ============ TOUCH-FRIENDLY ============ */
@media (hover: none) and (pointer: coarse) {
  .chrome-btn:hover::after { transform: scaleX(0); }
  .fav-btn { min-width: 44px; min-height: 44px; }
  .scroll-stage { scroll-snap-type: y mandatory; }
}

/* ============ LANDSCAPE PHONE ============ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .scene { padding: 80px 6vw 40px; }
  .hero-quote .jp { font-size: clamp(28px, 6vw, 44px); }
  .quote-body .jp { font-size: clamp(22px, 5vw, 36px) !important; }
  .hero-quote .number { font-size: clamp(48px, 10vw, 80px); margin-bottom: 4px; }
  .quote-body .quote-num { font-size: clamp(40px, 8vw, 64px); margin-bottom: 4px; }
  .hero-meta-bottom { padding-top: 12px; }
}
