:root {
  color-scheme: dark;
  --accent: #ff7417;
  --accent-soft: #ffb27d;
  --background: #050505;
  --panel: rgba(20, 20, 21, 0.94);
  --line: rgba(255, 116, 23, 0.28);
  --muted: #bcb6b1;
  --text: #f8f5f2;
}

* { box-sizing: border-box; }
html { background: var(--background); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--background); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
a { color: inherit; }
.page-shell { position: relative; z-index: 1; width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 18px 0 36px; }
.page-shell::before { position: fixed; inset: 0; z-index: -1; content: ""; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, 0.2), #050505 78%), url("../assets/hero_background_small.png") center top / cover no-repeat; opacity: 0.2; }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 10px 0 18px; border-bottom: 1px solid var(--line); }
.product-link { display: block; width: min(390px, 52vw); }
.product-link img { display: block; width: 100%; height: 58px; object-fit: contain; object-position: left center; }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
nav a, .copy-button { border: 1px solid var(--line); border-radius: 6px; background: rgba(28, 28, 29, 0.9); color: var(--accent-soft); font-size: 0.8rem; font-weight: 750; text-decoration: none; padding: 9px 12px; cursor: pointer; }
nav a:hover, nav a:focus-visible, .copy-button:hover, .copy-button:focus-visible { border-color: var(--accent); color: #fff; outline: none; box-shadow: 0 0 0 3px rgba(255, 116, 23, 0.14); }
.intro { min-height: 430px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 360px); align-items: center; gap: 48px; padding: 46px 0 34px; }
.intro h1 { max-width: 760px; margin: 10px 0 20px; color: #fff; font-size: clamp(2.35rem, 6vw, 5.3rem); line-height: 0.98; letter-spacing: 0; }
.intro p { max-width: 700px; color: var(--accent-soft); font-size: 1.05rem; line-height: 1.7; }
.intro img { width: 100%; max-height: 340px; object-fit: contain; filter: drop-shadow(0 18px 44px rgba(255, 84, 0, 0.26)); }
.eyebrow { color: var(--accent); font-size: 0.7rem; font-weight: 850; text-transform: uppercase; }
.demo, .script-section, .gallery-section, .mode-section, .api-section { margin-top: 20px; padding: 24px 0; border-top: 1px solid var(--line); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
h2 { margin: 5px 0 0; font-size: 1.65rem; letter-spacing: 0; }
.duration { color: var(--muted); font-size: 0.78rem; }
audio { width: 100%; height: 48px; accent-color: var(--accent); }
.transcript { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 18px; border: 1px solid var(--line); background: var(--line); }
.transcript > div { padding: 18px; background: var(--panel); }
.transcript strong { color: var(--accent); font-size: 0.75rem; text-transform: uppercase; }
.transcript p { margin: 8px 0 0; color: #e2ddd8; line-height: 1.55; }
pre { margin: 0; padding: 18px; overflow: auto; border: 1px solid rgba(255, 255, 255, 0.09); border-radius: 6px; background: rgba(11, 11, 12, 0.95); color: #ffd1b1; font: 0.8rem/1.65 Consolas, "Cascadia Code", "SFMono-Regular", monospace; }
code { font-family: Consolas, "Cascadia Code", "SFMono-Regular", monospace; }
.mode-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mode-grid article { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.mode-grid h3 { margin: 0; font-size: 1rem; }
.mode-grid h3 code { color: var(--accent); }
.mode-grid p, .api-section > p { color: var(--muted); font-size: 0.87rem; line-height: 1.6; }
.mode-grid pre { margin-top: 17px; font-size: 0.72rem; }
.dialogue-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dialogue-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.dialogue-card-heading { min-height: 72px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialogue-card-heading h3 { margin: 5px 0 0; font-size: 1.08rem; }
.dialogue-card-heading > span { max-width: 42%; color: var(--muted); font-size: 0.7rem; line-height: 1.4; text-align: right; }
.dialogue-card audio { margin: 8px 0 14px; }
.compact-transcript { display: grid; gap: 1px; border: 1px solid rgba(255, 255, 255, 0.07); background: rgba(255, 255, 255, 0.07); }
.compact-transcript p { min-height: 86px; margin: 0; padding: 12px; background: rgba(11, 11, 12, 0.72); color: #ddd7d1; font-size: 0.8rem; line-height: 1.5; }
.compact-transcript strong { display: block; margin-bottom: 5px; color: var(--accent); font-size: 0.68rem; text-transform: uppercase; }
.dialogue-card details { margin-top: 14px; }
.dialogue-card summary { padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; color: var(--accent-soft); font-size: 0.78rem; font-weight: 750; cursor: pointer; }
.dialogue-card details[open] summary { margin-bottom: 10px; border-color: var(--accent); }
.script-actions { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.dialogue-card pre { max-height: 330px; padding: 13px; font-size: 0.66rem; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; }
footer img { display: block; width: 180px; max-height: 38px; object-fit: contain; object-position: left center; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 20; padding: 10px 14px; border: 1px solid var(--accent); border-radius: 6px; background: #1d120c; color: #ffd2b3; font-size: 0.82rem; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); }

@media (max-width: 760px) {
  .page-shell { width: min(100% - 24px, 1120px); }
  .site-header { align-items: flex-start; flex-direction: column; }
  .product-link { width: min(100%, 360px); }
  .product-link img { height: 48px; }
  nav { justify-content: flex-start; }
  .intro { min-height: 0; grid-template-columns: 1fr; gap: 18px; padding-top: 34px; }
  .intro img { max-height: 220px; }
  .intro h1 { font-size: clamp(2.25rem, 14vw, 4rem); }
  .transcript, .mode-grid, .dialogue-gallery { grid-template-columns: 1fr; }
  .dialogue-card-heading { min-height: 0; }
  .compact-transcript p { min-height: 0; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; }
  .copy-button { width: 100%; }
  footer { align-items: flex-start; flex-direction: column; }
}
