:root {
  --bg: #f3f0e9;
  --surface: #fbf9f4;
  --surface-strong: #ffffff;
  --ink: #171713;
  --muted: #77736a;
  --line: #d9d4c9;
  --line-strong: #bdb7aa;
  --accent: #ef3f57;
  --accent-soft: #fde5e8;
  --yellow: #f5c74a;
  --lime: #b7da52;
  --blue: #597cff;
  --purple: #9068ea;
  --shadow: 0 24px 70px rgba(31, 27, 19, .08);
  --radius: 22px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body.dark {
  --bg: #151513;
  --surface: #1e1e1a;
  --surface-strong: #272722;
  --ink: #f5f1e7;
  --muted: #aaa59a;
  --line: #3b3a34;
  --line-strong: #57554c;
  --accent-soft: #47232a;
  --shadow: 0 24px 70px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 16px;
  transition: color .25s ease, background-color .25s ease;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 3px; }
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.11'/%3E%3C/svg%3E");
}

.site-header {
  max-width: 1440px; margin: 0 auto; padding: 24px 48px;
  display: flex; justify-content: space-between; align-items: center;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; letter-spacing: -.03em; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: var(--accent); font-size: 18px; }
.beta { padding: 3px 6px; border: 1px solid var(--line-strong); border-radius: 5px; color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.data-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.data-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 4px color-mix(in srgb, var(--yellow) 18%, transparent); }
.data-status.live i { background: var(--lime); box-shadow: 0 0 0 4px color-mix(in srgb, var(--lime) 18%, transparent); }
.icon-button { border: 1px solid var(--line); width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: transparent; cursor: pointer; font-size: 20px; }

main { max-width: 1440px; margin: 0 auto; padding: 0 48px 72px; }
.hero { padding: 86px 0 64px; }
.eyebrow, .section-kicker, .panel-label { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow span { color: var(--accent); }
.hero-grid { margin-top: 22px; display: grid; grid-template-columns: minmax(420px, 1.1fr) minmax(380px, .9fr); align-items: end; gap: 80px; }
h1 { margin: 0; font-size: clamp(54px, 7vw, 106px); line-height: .94; letter-spacing: -.075em; font-weight: 850; }
h1 em { color: var(--accent); font-style: normal; }
.hero-copy { margin: 28px 0 0; max-width: 600px; color: var(--muted); font-size: 17px; line-height: 1.85; }
.search-card { padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.search-card label { display: block; margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.search-row { display: flex; gap: 8px; }
.search-row input { min-width: 0; flex: 1; height: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: var(--surface-strong); }
.search-row button, .primary-button { border: 0; border-radius: 12px; padding: 0 20px; color: #fff; background: var(--ink); cursor: pointer; font-weight: 700; }
.search-row button { display: flex; align-items: center; gap: 16px; white-space: nowrap; }
.search-row button b { font-size: 22px; }
.suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.suggestions span { color: var(--muted); font-size: 11px; }
.suggestions button { border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; }
.suggestions button:hover { border-color: var(--accent); color: var(--accent); }

.story-shell { border-top: 1px solid var(--line-strong); padding-top: 42px; scroll-margin-top: 20px; }
.story-header { display: flex; justify-content: space-between; align-items: end; gap: 32px; }
.story-header h2 { margin: 8px 0 10px; font-size: clamp(34px, 4vw, 58px); line-height: 1; letter-spacing: -.055em; }
.story-header p:not(.section-kicker) { margin: 0; max-width: 680px; color: var(--muted); line-height: 1.7; }
.story-actions { display: flex; gap: 10px; flex-shrink: 0; }
.primary-button, .secondary-button { min-height: 44px; padding: 0 18px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 700; }
.primary-button { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); }
.secondary-button { border: 1px solid var(--line-strong); background: transparent; }
.play-icon { font-size: 10px; }
.journey-strip { display: flex; align-items: center; justify-content: center; gap: 16px; margin: 34px 0 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-size: 11px; }
.journey-strip span { display: flex; align-items: center; gap: 7px; }
.journey-strip span.active { color: var(--ink); font-weight: 700; }
.journey-strip b { color: var(--accent); font-size: 9px; }
.journey-strip i { color: var(--line-strong); font-style: normal; }

.chapter-strip { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); margin: 44px 0 28px; }
.chapter-strip::before { content: ""; position: absolute; top: 18px; left: 4%; right: 4%; height: 2px; background: var(--line); }
.chapter { position: relative; border: 0; padding: 0; text-align: center; color: var(--muted); background: transparent; cursor: pointer; }
.chapter-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 38px; height: 38px; margin: 0 auto 9px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--bg); font-size: 11px; transition: .25s ease; }
.chapter span:last-child { font-size: 11px; }
.chapter.active .chapter-dot, .chapter.past .chapter-dot { border-color: var(--accent); color: #fff; background: var(--accent); }
.chapter.active { color: var(--ink); font-weight: 700; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.52fr) minmax(300px, .48fr); gap: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 40px rgba(28, 25, 18, .035); }
.timeline-panel, .moment-panel, .chart-panel, .keyword-panel, .viewpoints-panel { padding: 26px; }
.panel-heading { display: flex; justify-content: space-between; align-items: start; gap: 24px; }
.panel-heading h3, .moment-panel h3 { margin: 7px 0 0; font-size: 22px; line-height: 1.3; letter-spacing: -.035em; }
.panel-heading.compact h3 { font-size: 18px; }
.time-chip { padding: 7px 11px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 700; white-space: nowrap; }
.timeline { position: relative; margin-top: 28px; }
.timeline::before { content: ""; position: absolute; top: 13px; bottom: 28px; left: 9px; width: 1px; background: var(--line-strong); }
.timeline-event { position: relative; display: grid; grid-template-columns: 20px 76px 1fr auto; gap: 13px; align-items: start; width: 100%; border: 0; padding: 0 0 24px; text-align: left; color: var(--muted); background: transparent; cursor: pointer; }
.timeline-event:last-child { padding-bottom: 0; }
.event-dot { position: relative; z-index: 1; width: 19px; height: 19px; border: 5px solid var(--surface); border-radius: 50%; background: var(--line-strong); transition: .22s ease; }
.event-time { padding-top: 1px; font-size: 11px; font-variant-numeric: tabular-nums; }
.event-title { display: block; color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.5; }
.event-phase { padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; font-size: 9px; }
.timeline-event.active .event-dot { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline-event.active .event-title { color: var(--accent); }
.timeline-event.past .event-dot { background: var(--ink); }

.moment-panel { position: relative; overflow: hidden; background: var(--ink); color: var(--bg); }
.moment-panel::after { content: ""; position: absolute; width: 170px; height: 170px; right: -65px; top: -65px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 26px rgba(255,255,255,.04), 0 0 0 54px rgba(255,255,255,.025); }
.moment-panel .panel-label { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.moment-index { margin: 22px 0 8px; color: var(--accent); font-size: 54px; font-weight: 850; line-height: 1; letter-spacing: -.07em; }
.moment-phase { margin: 0; color: color-mix(in srgb, var(--bg) 65%, transparent); font-size: 11px; }
.moment-panel h3 { position: relative; z-index: 1; margin-top: 10px; font-size: 24px; }
.moment-summary { color: color-mix(in srgb, var(--bg) 72%, transparent); font-size: 13px; line-height: 1.75; }
.quote-block { margin: 22px 0; padding: 15px; border-left: 2px solid var(--accent); background: rgba(255,255,255,.05); }
.quote-block span { color: color-mix(in srgb, var(--bg) 50%, transparent); font-size: 9px; letter-spacing: .1em; }
.quote-block blockquote { margin: 8px 0 0; font-size: 13px; line-height: 1.65; }
.moment-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.moment-stats div { border-top: 1px solid rgba(255,255,255,.15); padding-top: 12px; }
.moment-stats dt { color: color-mix(in srgb, var(--bg) 50%, transparent); font-size: 9px; }
.moment-stats dd { margin: 5px 0 0; font-size: 12px; font-weight: 700; }

.insight-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr); gap: 18px; margin-top: 18px; }
.source-panel { margin-top: 18px; padding: 26px; }
.source-badge { padding: 7px 11px; border-radius: 999px; color: var(--accent); background: var(--accent-soft); font-size: 11px; font-weight: 700; white-space: nowrap; }
.source-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.source-card { min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-strong); }
.source-card header, .source-card footer { display: flex; align-items: center; gap: 10px; }
.source-card header { justify-content: space-between; }
.source-card header strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.source-ref { display: inline-flex; margin-right: 6px; padding: 2px 5px; border-radius: 4px; color: var(--accent); background: var(--accent-soft); font-style: normal; font-size: 8px; }
.source-card time { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.source-card p { display: -webkit-box; min-height: 64px; margin: 14px 0; overflow: hidden; color: var(--ink); font-size: 12px; line-height: 1.7; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.source-card footer { flex-wrap: wrap; color: var(--muted); font-size: 9px; }
.source-card footer a { margin-left: auto; color: var(--accent); font-weight: 700; text-decoration: none; }
.source-empty { grid-column: 1 / -1; margin: 0; padding: 28px; border: 1px dashed var(--line-strong); border-radius: 14px; color: var(--muted); text-align: center; font-size: 12px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 3px; border-radius: 9px; }
.legend .positive { background: var(--lime); } .legend .neutral { background: var(--blue); } .legend .negative { background: var(--accent); }
.chart-wrap { margin-top: 18px; min-height: 210px; }
.sentiment-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-axis-text { fill: var(--muted); font: 9px var(--font); }
.chart-line { fill: none; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-area { opacity: .08; }
.chart-point { stroke: var(--surface); stroke-width: 2; transition: r .2s ease; }
.chart-cursor { stroke: var(--line-strong); stroke-width: 1; stroke-dasharray: 3 4; }
.chart-note, .keyword-note { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.chart-note strong { color: var(--accent); }
.ghost-number { color: var(--line-strong); font-size: 28px; font-weight: 800; }
.keyword-cloud { display: flex; min-height: 208px; align-content: center; justify-content: center; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 25px 8px 12px; }
.keyword { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); transition: transform .25s ease, opacity .25s ease; }
.keyword::before { content: "#"; color: var(--accent); font-size: .7em; }

.viewpoints-panel { margin-top: 18px; }
.panel-aside { margin: 0; color: var(--muted); font-size: 10px; }
.viewpoint-list { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 24px; border-top: 1px solid var(--line); }
.viewpoint { position: relative; padding: 22px 28px 0 0; }
.viewpoint + .viewpoint { padding-left: 28px; border-left: 1px solid var(--line); }
.viewpoint-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.viewpoint-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.viewpoint-marker { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: var(--ink); font-size: 9px; }
.viewpoint-share { font-size: 22px; font-weight: 850; letter-spacing: -.04em; }
.viewpoint-copy { min-height: 63px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.viewpoint-bar { height: 4px; border-radius: 99px; background: var(--line); overflow: hidden; }
.viewpoint-bar i { display: block; height: 100%; background: var(--accent); }
.viewpoint-cue { margin-top: 9px; color: var(--muted); font-size: 9px; }
.expression-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr); gap: 18px; margin-top: 18px; }
.wind-panel, .mouthpiece-panel { padding: 26px; }
.wind-live, .mouthpiece-safe { padding: 7px 10px; border-radius: 999px; color: var(--muted); background: var(--surface-strong); font-size: 9px; white-space: nowrap; }
.wind-live i { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lime) 20%, transparent); }
.wind-stage { display: grid; grid-template-columns: 180px 1fr; align-items: center; gap: 20px; min-height: 230px; margin-top: 10px; }
.wind-dial { position: relative; width: 170px; height: 170px; border: 1px solid var(--line-strong); border-radius: 50%; background: radial-gradient(circle, var(--surface-strong) 0 38%, transparent 39%), repeating-conic-gradient(from 0deg, var(--line) 0 1deg, transparent 1deg 30deg); box-shadow: inset 0 0 0 14px var(--surface), inset 0 0 0 15px var(--line); }
.dial-label { position: absolute; color: var(--muted); font-size: 9px; }
.dial-label.north { top: 8px; left: 50%; transform: translateX(-50%); }
.dial-label.east { top: 50%; right: 9px; transform: translateY(-50%); }
.dial-label.south { bottom: 8px; left: 50%; transform: translateX(-50%); }
.dial-label.west { top: 50%; left: 9px; transform: translateY(-50%); }
.wind-needle { position: absolute; z-index: 2; left: 50%; bottom: 50%; width: 8px; height: 61px; border-radius: 99px 99px 4px 4px; background: linear-gradient(var(--accent) 0 72%, var(--ink) 72%); transform: translateX(-50%) rotate(0); transform-origin: 50% 100%; transition: transform .65s cubic-bezier(.2,.8,.2,1); }
.wind-needle::after { content: ""; position: absolute; top: -8px; left: 50%; width: 0; height: 0; border-right: 8px solid transparent; border-bottom: 15px solid var(--accent); border-left: 8px solid transparent; transform: translateX(-50%); }
.dial-center { position: absolute; z-index: 3; left: 50%; top: 50%; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: var(--ink); transform: translate(-50%, -50%); font-size: 13px; }
.wind-kicker { margin: 0; color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .12em; }
.wind-copy h4 { margin: 8px 0; font-size: 27px; line-height: 1.05; letter-spacing: -.05em; }
.wind-copy > p:not(.wind-kicker) { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.weather-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 15px; }
.weather-pills span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 9px; }
.wind-options { display: grid; gap: 7px; }
.wind-options button { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; color: var(--muted); background: var(--surface-strong); cursor: pointer; transition: .2s ease; }
.wind-options button span { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.wind-options button i { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--ink); font-style: normal; font-size: 8px; }
.wind-options button b { font-size: 14px; }
.wind-options button.active { border-color: var(--accent); color: var(--ink); box-shadow: 0 0 0 3px var(--accent-soft); }
.mouthpiece-panel { position: relative; overflow: hidden; background: var(--ink); color: var(--bg); }
.mouthpiece-panel::after { content: "“"; position: absolute; top: -32px; right: 16px; color: rgba(255,255,255,.05); font: 180px/1 Georgia, serif; pointer-events: none; }
.mouthpiece-panel .panel-label { color: color-mix(in srgb, var(--bg) 55%, transparent); }
.mouthpiece-safe { position: relative; z-index: 1; color: color-mix(in srgb, var(--bg) 70%, transparent); background: rgba(255,255,255,.08); }
.selected-stance { position: relative; z-index: 1; margin-top: 22px; color: color-mix(in srgb, var(--bg) 60%, transparent); font-size: 10px; }
.selected-stance strong { color: var(--accent); font-size: 12px; }
.intent-label { display: block; margin: 16px 0 8px; color: color-mix(in srgb, var(--bg) 62%, transparent); font-size: 10px; }
.mouthpiece-panel textarea { position: relative; z-index: 1; width: 100%; min-height: 92px; resize: vertical; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 13px; color: var(--bg); background: rgba(255,255,255,.06); line-height: 1.6; }
.mouthpiece-panel textarea::placeholder { color: color-mix(in srgb, var(--bg) 35%, transparent); }
.emotion-picker, .style-row { position: relative; z-index: 1; display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin: 15px 0; }
.emotion-picker > span, .style-row > span { width: 100%; color: color-mix(in srgb, var(--bg) 50%, transparent); font-size: 9px; }
.emotion-chip, .style-chip { border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: 7px 10px; color: color-mix(in srgb, var(--bg) 68%, transparent); background: transparent; cursor: pointer; font-size: 9px; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.emotion-chip:hover, .style-chip:hover { transform: translateY(-1px); }
.emotion-chip.active, .style-chip.active { border-color: var(--accent); color: #fff; background: var(--accent); }
.emotion-meter { position: relative; z-index: 1; margin: 14px 0; padding: 12px 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 11px; background: rgba(255,255,255,.035); }
.emotion-meter label, .emotion-meter > div { display: flex; justify-content: space-between; align-items: center; color: color-mix(in srgb, var(--bg) 48%, transparent); font-size: 9px; }
.emotion-meter label strong { color: var(--accent); }
.emotion-meter input { width: 100%; margin: 11px 0 7px; accent-color: var(--accent); }
.emotion-meter > div { font-size: 8px; }
.generate-button { display: flex; justify-content: space-between; width: 100%; border: 0; border-radius: 11px; padding: 13px 15px; color: #fff; background: var(--accent); cursor: pointer; font-weight: 800; }
.generate-button:disabled { opacity: .6; cursor: wait; }
.mouthpiece-results { position: relative; z-index: 1; display: grid; gap: 8px; margin-top: 14px; }
.result-placeholder { margin: 0; padding: 20px; border: 1px dashed rgba(255,255,255,.15); border-radius: 11px; color: color-mix(in srgb, var(--bg) 50%, transparent); text-align: center; font-size: 10px; }
.result-placeholder.error { color: #ff9cab; }
.mouthpiece-option { padding: 13px; border: 1px solid rgba(255,255,255,.13); border-radius: 11px; background: rgba(255,255,255,.05); }
.mouthpiece-option.selected { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.mouthpiece-option header { display: flex; justify-content: space-between; align-items: center; }
.mouthpiece-option header span { color: var(--accent); font-size: 9px; font-weight: 700; }
.mouthpiece-option header div { display: flex; gap: 6px; }
.mouthpiece-option header button { border: 0; color: color-mix(in srgb, var(--bg) 65%, transparent); background: transparent; cursor: pointer; font-size: 9px; }
.mouthpiece-option p { margin: 8px 0; color: var(--bg); font-size: 12px; line-height: 1.65; }
.mouthpiece-option small { color: color-mix(in srgb, var(--bg) 45%, transparent); font-size: 9px; }
.publish-note { margin: 12px 0 0; color: color-mix(in srgb, var(--bg) 42%, transparent); font-size: 9px; line-height: 1.5; }
.story-footer { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 20px 4px 0; }
.story-footer p { display: flex; align-items: center; gap: 9px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.story-footer p span { flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: var(--yellow); }
.story-footer button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 11px; }

.share-dialog { width: min(680px, calc(100% - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 24px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 120px rgba(0,0,0,.28); }
.share-dialog::backdrop { background: rgba(16, 15, 13, .68); backdrop-filter: blur(6px); }
.dialog-shell { padding: 24px; }
.dialog-shell > header { display: flex; align-items: start; justify-content: space-between; }
.dialog-shell h2 { margin: 5px 0 0; font-size: 24px; }
.share-card { margin-top: 20px; padding: 28px; border-radius: 18px; color: #f8f3e8; background: #181814; overflow: hidden; position: relative; }
.share-card::before { content: ""; position: absolute; width: 260px; height: 260px; top: -150px; right: -100px; border: 50px solid #ef3f57; border-radius: 50%; opacity: .85; }
.share-card-top, .share-card-bottom { position: relative; display: flex; justify-content: space-between; color: #aaa69c; font-size: 10px; }
.share-tag { position: relative; margin: 48px 0 12px; color: #ef3f57; font-size: 11px; font-weight: 700; }
.share-card h3 { position: relative; margin: 0; max-width: 80%; font-size: 34px; line-height: 1.08; letter-spacing: -.055em; }
.share-card > p:not(.share-tag) { position: relative; color: #c5c0b5; font-size: 12px; line-height: 1.7; }
.receipt-route { position: relative; display: grid; grid-template-columns: 1fr auto 1.2fr auto 1fr; align-items: start; gap: 10px; margin: 20px 0; padding: 16px; border-radius: 12px; background: rgba(255,255,255,.06); }
.receipt-route div { min-width: 0; }
.receipt-route span, .receipt-feeling span, .share-voice span { display: block; margin-bottom: 6px; color: #8e8a80; font-size: 8px; letter-spacing: .08em; }
.receipt-route b { display: -webkit-box; overflow: hidden; color: #f8f3e8; font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.receipt-route > i { padding-top: 18px; color: #ef3f57; font-style: normal; }
.receipt-feeling { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.receipt-feeling div { padding: 13px; border: 1px solid rgba(255,255,255,.1); border-radius: 10px; }
.receipt-feeling strong { color: #fff; font-size: 12px; }
.share-voice { position: relative; margin: 12px 0 22px; padding: 14px; border-left: 3px solid #ef3f57; background: rgba(255,255,255,.06); }
.share-voice b { display: block; font-size: 12px; line-height: 1.6; }
.share-card-bottom i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; background: #ef3f57; font-style: normal; font-size: 16px; }
.publish-preview-label { display: flex; justify-content: space-between; margin: 16px 0 7px; color: var(--muted); font-size: 10px; }
.publish-preview { width: 100%; min-height: 76px; resize: vertical; border: 1px solid var(--line); border-radius: 11px; padding: 12px; color: var(--ink); background: var(--surface-strong); line-height: 1.55; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.publish-disclosure { margin: 10px 0 0; color: var(--muted); text-align: right; font-size: 9px; }
.confirm-dialog { width: min(480px, calc(100% - 28px)); padding: 0; border: 0; border-radius: 20px; color: var(--ink); background: var(--surface); box-shadow: 0 30px 120px rgba(0,0,0,.28); }
.confirm-dialog::backdrop { background: rgba(16,15,13,.72); backdrop-filter: blur(6px); }
.confirm-dialog form { padding: 26px; }
.confirm-dialog h2 { margin: 7px 0 16px; font-size: 25px; }
.confirm-dialog blockquote { margin: 0; padding: 15px; border-left: 3px solid var(--accent); color: var(--ink); background: var(--surface-strong); font-size: 12px; line-height: 1.7; }
.confirm-dialog form > p:not(.panel-label) { color: var(--muted); font-size: 10px; line-height: 1.6; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 11px 16px; border-radius: 999px; color: var(--bg); background: var(--ink); opacity: 0; pointer-events: none; transition: .25s ease; font-size: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.loading .story-shell { opacity: .45; pointer-events: none; }

@media (max-width: 980px) {
  .site-header, main { padding-left: 24px; padding-right: 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 38px; }
  .hero-copy { max-width: 720px; }
  .dashboard-grid, .insight-grid { grid-template-columns: 1fr; }
  .expression-grid { grid-template-columns: 1fr; }
  .source-list { grid-template-columns: 1fr; }
  .moment-panel { min-height: 390px; }
}

@media (max-width: 680px) {
  .site-header { padding: 18px 16px; }
  main { padding: 0 16px 48px; }
  .data-status { display: none; }
  .hero { padding: 56px 0 44px; }
  h1 { font-size: clamp(48px, 15vw, 70px); }
  .hero-copy { font-size: 15px; }
  .search-card { padding: 18px; border-radius: 16px; }
  .search-row { display: grid; }
  .search-row button { justify-content: space-between; height: 48px; }
  .story-header { align-items: start; flex-direction: column; }
  .journey-strip { justify-content: flex-start; overflow-x: auto; border-radius: 14px; }
  .journey-strip span { flex: 0 0 auto; }
  .story-actions { width: 100%; }
  .story-actions button { flex: 1; }
  .chapter span:last-child { display: none; }
  .chapter-strip { margin: 32px 0 20px; }
  .timeline-panel, .moment-panel, .chart-panel, .keyword-panel, .viewpoints-panel { padding: 20px; }
  .source-panel { padding: 20px; }
  .wind-panel, .mouthpiece-panel { padding: 20px; }
  .wind-stage { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .panel-heading { gap: 12px; }
  .time-chip { display: none; }
  .timeline-event { grid-template-columns: 20px 52px 1fr; }
  .event-phase { display: none; }
  .moment-stats { grid-template-columns: 1fr 1fr; }
  .viewpoint-list { grid-template-columns: 1fr; }
  .viewpoint { padding: 20px 0; }
  .viewpoint + .viewpoint { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .viewpoint-copy { min-height: 0; }
  .panel-aside { display: none; }
  .story-footer { align-items: start; flex-direction: column; }
  .dialog-shell { padding: 18px; }
  .share-card { padding: 22px; }
  .share-card h3 { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; }
}
