:root {
  --bg: #081721;
  --bg-deep: #0d2230;
  --text: rgba(245, 250, 253, 0.97);
  --muted: rgba(186, 206, 220, 0.78);
  --muted-soft: rgba(186, 206, 220, 0.52);
  --line: rgba(125, 170, 197, 0.18);
  --accent-blue: #56c2ff;
  --accent-pink: #ffb347;
  --accent-blue-soft: rgba(86, 194, 255, 0.18);
  --accent-pink-soft: rgba(255, 179, 71, 0.18);
  --button-text: #03131d;
  --shadow: 0 26px 70px rgba(2, 9, 14, 0.34);
  --card-bg: rgba(11, 29, 41, 0.72);
  --card-bg-strong: rgba(16, 39, 54, 0.88);
  --radius-xl: 20px;
  --radius-lg: 16px;
  --radius-md: 12px;
}

/* Visual Refresh: playful tool UI */
:root {
  --bg: #fff7ff;
  --bg-deep: #f7e8ff;
  --text: #33263d;
  --muted: #756683;
  --muted-soft: #a394b1;
  --line: rgba(51, 38, 61, 0.12);
  --accent-blue: #87d8ff;
  --accent-pink: #ff8a72;
  --accent-blue-soft: rgba(135, 216, 255, 0.26);
  --accent-pink-soft: rgba(255, 138, 114, 0.22);
  --button-text: #2f2238;
  --card-bg: rgba(255, 255, 255, 0.96);
  --card-bg-strong: rgba(255, 250, 255, 0.98);
  --shadow: 0 12px 0 rgba(51, 38, 61, 0.08), 0 20px 38px rgba(108, 74, 143, 0.14);
}

body {
  font-family: "Nunito", "M PLUS Rounded 1c", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 246, 0.88), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 240, 178, 0.88), transparent 26%),
    linear-gradient(180deg, #fff9ff 0%, #f6ebff 58%, #fff5f2 100%);
}

body::before {
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px),
    linear-gradient(rgba(168, 136, 200, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 136, 200, 0.08) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 24px 24px;
  opacity: 0.72;
}

body::after {
  display: none;
}

.floating-header {
  top: 18px;
  left: 24px;
  right: 24px;
}

.floating-brand {
  gap: 12px;
  color: #6e5c80;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.floating-brand-icon {
  width: 24px;
  height: 16px;
}

.floating-brand-icon span {
  width: 16px;
  height: 16px;
  box-shadow: 0 3px 0 rgba(51, 38, 61, 0.12);
}

.floating-brand-text {
  font-size: 0.96rem;
}

.language-wrap::after {
  right: 18px;
  border-right-color: #6d577f;
  border-bottom-color: #6d577f;
}

.language-select {
  min-width: 142px;
  height: 40px;
  border: 2px solid rgba(58, 42, 72, 0.22);
  border-radius: 14px;
  background: #fff;
  color: #5f4b72;
  font-weight: 900;
  box-shadow: 0 5px 0 rgba(75, 55, 91, 0.1);
}

.home-screen,
.history-screen,
.privacy-screen,
.success-screen,
.status-screen {
  background: transparent;
}

.home-title,
.reader-title,
.privacy-title,
.status-title,
.success-kicker,
.success-title,
.history-result-title,
.history-modal-title,
.success-card h2,
.privacy-block h3 {
  font-family: "M PLUS Rounded 1c", "Nunito", sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
}

.home-subtitle,
.home-tagline,
.history-result-eyebrow,
.success-subtitle,
.success-kicker,
.successHeroEyebrow {
  letter-spacing: 0.04em;
}

.app-card,
.recorder-card,
.result-card,
.section-card,
.success-card,
.history-item,
.history-modal-card,
.privacy-block,
.story-card,
.record-dock-inner,
.failure-box {
  border: 2px solid rgba(54, 36, 69, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  box-shadow: var(--shadow);
}

.privacy-intro,
.privacy-copy p,
.privacy-copy li,
.privacy-meta,
.reader-description,
.history-description,
.success-paragraph,
.success-copy-block p,
.success-notes-list li,
.success-muted-line,
.success-reference-line,
.history-detail-copy,
.history-age-line,
.processing-note,
.failure-box,
.home-description,
.home-notes,
.reader-footer-links a,
.footer-links a,
.status-footer-links a {
  color: #786889;
}

.privacy-block {
  padding: 24px 26px;
}

.privacy-block + .privacy-block {
  margin-top: 18px;
}

.privacy-block h3::before {
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a668ff, #ff8a72);
}

.hero-primary,
.primary-button,
.success-retry-button,
.success-history-button,
.history-modal-confirm,
.dock-button.is-stop {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff937c 0%, #ff7f66 100%);
  color: #2f2238;
  box-shadow: 0 4px 0 #2f2238;
  font-weight: 900;
}

.hero-secondary,
.secondary-button,
.success-download-button,
.failure-secondary,
.history-pill-button,
.history-delete-button,
.history-modal-cancel {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe470 0%, #ffd54f 100%);
  color: #2f2238;
  box-shadow: 0 4px 0 #2f2238;
  font-weight: 900;
}

.history-pill-button-pink,
.history-delete-single {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: #fff;
  color: #ff7f66;
  box-shadow: 0 4px 0 rgba(47, 34, 56, 0.12);
}

.hero-primary:hover,
.hero-secondary:hover,
.primary-button:hover,
.secondary-button:hover,
.success-download-button:hover,
.success-retry-button:hover,
.success-history-button:hover,
.history-delete-button:hover {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #2f2238;
}

.disclaimer-box {
  border: 2px solid rgba(166, 104, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: #8a789a;
}

.home-notes li::before {
  border: 2px solid #a668ff;
  background: #fff;
}

.reader-tab {
  border: 2px solid rgba(47, 34, 56, 0.14);
  border-radius: 18px;
  background: #fff;
  color: #7b6c8c;
  box-shadow: 0 4px 0 rgba(47, 34, 56, 0.08);
  font-weight: 800;
}

.reader-tab.is-active {
  border-color: #2f2238;
  background: linear-gradient(180deg, #c884ff 0%, #a668ff 100%);
  color: #fff;
  box-shadow: 0 4px 0 #2f2238;
}

.story-card {
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 252, 255, 0.98)),
    linear-gradient(180deg, #f0dbff 0%, #ffffff 46%);
}

.story-head span,
.story-body ruby rt {
  color: #9d8aac;
}

.record-dock-inner {
  background: linear-gradient(180deg, #fff 0%, #fff7ff 100%);
}

.record-meter-text,
.record-meter-text.is-recording {
  color: #826f93;
  font-weight: 800;
}

.record-meter-text.is-recording::before {
  background: #ff7f66;
  box-shadow: 0 0 0 8px rgba(255, 127, 102, 0.12);
}

/* Final mobile overflow guard for reader / recording screens */
@media (max-width: 720px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  .site-shell,
  main,
  .page-shell,
  .reader-page,
  .reader-head,
  .reader-description,
  .story-card,
  .story-head,
  .story-body,
  .record-dock,
  .record-dock-inner,
  .reader-footer-links {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .page-shell {
    width: min(100%, calc(100vw - 28px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .reader-page {
    overflow-x: clip;
    padding-inline: 0 !important;
  }

  .reader-description {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .reader-tabs {
    display: flex;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 12px !important;
    padding: 4px 0 8px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .reader-tabs::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .reader-tab {
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: fit-content !important;
    min-height: 50px !important;
    padding: 0 18px !important;
    font-size: 0.92rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis;
  }

  .story-card {
    padding: 18px 16px 92px !important;
  }

  .story-head {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: baseline;
  }

  .story-head h3,
  .story-head span,
  .story-body p,
  .reader-footer-links a {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .record-dock {
    left: auto !important;
    right: auto !important;
    bottom: 10px !important;
  }

  .record-dock-inner {
    padding: 12px 14px 16px !important;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: min(100%, calc(100vw - 18px)) !important;
  }

  .reader-head {
    gap: 10px;
  }

  .reader-title {
    font-size: clamp(1.85rem, 9vw, 2.4rem);
  }

  .reader-description {
    font-size: 0.84rem !important;
    line-height: 1.58 !important;
  }

  .reader-tab {
    min-height: 48px !important;
    padding: 0 16px !important;
    font-size: 0.88rem !important;
  }

  .story-head h3 {
    font-size: 0.92rem !important;
  }

  .story-head span {
    font-size: 0.78rem !important;
  }

  .story-body {
    font-size: 0.8rem !important;
    line-height: 1.78 !important;
  }
}

.history-item-main,
.history-item-date,
.history-item-meta,
.history-item-summary,
.history-item-caret,
.history-result-eyebrow,
.history-age-line,
.success-age-text,
.success-age-highlight,
.success-copy-block strong,
.success-keyword,
.metric-rail-row,
.history-mini-rail-row {
  color: var(--text);
}

.history-item-badge {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: linear-gradient(180deg, #8edcff 0%, #75d0ff 100%);
  color: #2f2238;
  box-shadow: 0 4px 0 rgba(47, 34, 56, 0.16);
}

.history-audio-player {
  border: 2px solid rgba(47, 34, 56, 0.1);
  border-radius: 28px;
  background: #fff;
}

.history-audio-time,
.history-audio-play,
.history-audio-icon {
  color: #2f2238;
  font-weight: 900;
}

.history-audio-progress-fill,
.history-audio-progress-thumb {
  background: #2f2238;
}

.history-audio-menu,
.history-speed-menu {
  border: 2px solid rgba(47, 34, 56, 0.12);
  border-radius: 20px;
  box-shadow: 0 18px 34px rgba(80, 51, 102, 0.2);
  overflow: hidden;
}

.history-audio-menu-item,
.history-speed-option {
  font-family: "Nunito", "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
}

.history-audio-menu-item:hover,
.history-speed-option:hover,
.history-speed-option.is-active {
  background: #f6ebff;
}

.history-score-orb,
.success-score-orb-large {
  border: 2px solid rgba(47, 34, 56, 0.12);
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.96), rgba(243, 233, 255, 0.92));
}

.history-score-bubble,
.success-score-orb-blue,
.success-score-orb-pink {
  border: 2px solid rgba(47, 34, 56, 0.14);
  box-shadow: 0 10px 24px rgba(120, 84, 157, 0.14);
}

.history-score-bubble-blue,
.success-score-orb-blue {
  background: linear-gradient(180deg, #9be2ff 0%, #83d8ff 100%);
}

.history-score-bubble-pink,
.success-score-orb-pink {
  background: linear-gradient(180deg, #ffb6a8 0%, #ff8a72 100%);
}

.success-gauge-track,
.metric-rail,
.history-mini-gauge-track,
.history-mini-rail {
  border: 2px solid rgba(47, 34, 56, 0.08);
  border-radius: 999px;
  background: linear-gradient(90deg, #86d7ff 0%, #dcc2ff 48%, #ff9b7d 100%);
}

.success-gauge-thumb,
.metric-knob,
.history-mini-gauge-thumb,
.history-mini-rail i {
  border: 3px solid #2f2238;
  background: #fffdf8;
  box-shadow: 0 4px 0 rgba(47, 34, 56, 0.14);
}

.success-gauge-mark {
  background: rgba(102, 78, 126, 0.24);
}

.share-pill-button {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: linear-gradient(180deg, #af72ff 0%, #9d59ff 100%);
  color: #fff;
  box-shadow: 0 4px 0 #2f2238;
}

.history-detail-card,
.success-card,
.timeline-card,
.metric-card,
.insight-card,
.visualizer-card,
.script-card {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.95);
}

.timeline-plot,
.histogram-stage {
  border-radius: 20px;
  background: linear-gradient(180deg, #fff6ff 0%, #f5ecff 100%);
}

.timeline-line,
.timeline-line-mid,
.timeline-line-low {
  border-top-color: rgba(130, 109, 154, 0.24);
}

.timeline-polyline {
  stroke: #8b63ff;
}

.timeline-point {
  fill: #ff8a72;
}

.success-notes-list li::marker,
.privacy-copy li::marker {
  color: #a668ff;
}

.footer-links,
.reader-footer-links,
.privacy-footer-links,
.history-footer-links,
.status-footer-links {
  gap: 28px;
}

.footer-links a,
.reader-footer-links a,
.privacy-footer-links a,
.history-footer-links a,
.status-footer-links a,
.about-link {
  color: #7b6c8c;
  font-weight: 800;
  text-decoration-thickness: 2px;
}

.success-kicker,
.success-subtitle {
  color: #756683 !important;
}

.reader-footer-links a.is-active,
.privacy-footer-links a.is-active {
  color: #2f2238;
}

/* Final light-theme override for processing / analyzing screen */
.processing-step {
  color: #8c7da0 !important;
}

.processing-step::before {
  background: rgba(124, 108, 145, 0.22) !important;
}

.processing-step.is-done {
  color: #6c5d80 !important;
}

.processing-step.is-done::before {
  background: #7fd2ff !important;
}

.processing-step.is-active {
  color: #4f3e63 !important;
  font-weight: 800 !important;
}

.processing-step.is-active::before {
  background: #ff9bb0 !important;
}

.processing-note {
  color: #6f5f84 !important;
}

.status-footer-links {
  color: #8a7a9e !important;
}

.status-footer-links a {
  color: #7b6c8c !important;
}

/* Absolute final overrides: keep light theme readable on result/history detail sections */
.flow-panel,
.flow-panel-wide {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #fffdfd 0%, #f8f0fc 100%) !important;
  border: 2px solid rgba(76, 58, 95, 0.12) !important;
  box-shadow:
    0 12px 26px rgba(122, 97, 150, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.flow-panel::before,
.flow-panel-wide::before {
  content: "" !important;
  position: absolute !important;
  inset: 16px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 189, 210, 0.28), transparent 36%),
    radial-gradient(circle at 78% 82%, rgba(143, 216, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 239, 252, 0.42)) !important;
  opacity: 0.95 !important;
  pointer-events: none !important;
}

.flow-panel > *,
.flow-panel-wide > * {
  position: relative !important;
  z-index: 1 !important;
}

.flow-arrow {
  color: rgba(87, 67, 109, 0.46) !important;
}

.flow-panel strong,
.flow-panel span,
.flow-sound-word,
.success-flow-panels strong,
.success-flow-panels span {
  color: #433255 !important;
}

.flow-wave-pink {
  color: #f09bb2 !important;
}

.flow-wave-blue {
  color: #86cfff !important;
}

.success-copy-block p,
.success-copy-muted,
.success-rich-copy,
.success-rich-copy p,
.success-rich-copy li,
.success-numeric-copy,
.success-numeric-copy p,
.success-numeric-copy li,
.success-data-row,
.success-notes-list li,
.volume-row span,
.success-age-text {
  color: #5b4a70 !important;
}

.success-copy-block strong,
.success-keyword,
.success-keyword-soft,
.success-rich-copy strong,
.success-rich-copy b,
.success-rich-copy .success-keyword,
.success-rich-copy .success-keyword-soft,
.success-numeric-copy strong,
.success-numeric-copy b,
.success-data-row strong,
.success-age-highlight,
.success-details-panel summary,
.success-details-panel[open] summary {
  color: #5b3f76 !important;
}

.success-details-panel summary::after {
  color: rgba(91, 63, 118, 0.72) !important;
}

.success-details-panel,
.success-card {
  box-shadow:
    0 10px 0 rgba(74, 56, 96, 0.05),
    0 14px 26px rgba(122, 97, 150, 0.08) !important;
}

.histogram-card,
.timeline-card {
  background: linear-gradient(180deg, #fffefe 0%, #f7eefc 100%) !important;
}

.histogram-stage {
  background: linear-gradient(180deg, rgba(88, 103, 119, 0.96) 0%, rgba(99, 113, 127, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 10px 22px rgba(80, 66, 99, 0.10) !important;
}

.histogram-bars span {
  background: linear-gradient(180deg, #f3f8fd 0%, #d3dfe9 100%) !important;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.14) !important;
}

.histogram-labels span {
  color: rgba(242, 247, 251, 0.96) !important;
}

.timeline-card {
  background: linear-gradient(180deg, #fffefe 0%, #f8f0fc 100%) !important;
}

.timeline-plot {
  background: linear-gradient(180deg, #eadcf6 0%, #e6d7f4 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.40) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 10px 22px rgba(111, 89, 140, 0.08) !important;
}

.timeline-plot::before {
  content: "" !important;
  position: absolute !important;
  inset: 18px !important;
  border-radius: 26px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)) !important;
  pointer-events: none !important;
}

.timeline-line {
  background: rgba(116, 95, 142, 0.24) !important;
}

.timeline-ylabels {
  color: #604d76 !important;
}

.timeline-y-top {
  color: #ff7f9f !important;
}

.timeline-y-bottom {
  color: #55b2f7 !important;
}

.timeline-xlabels span {
  color: #6e5a84 !important;
}

.timeline-polyline {
  stroke: #6f61ff !important;
  stroke-width: 10 !important;
}

.timeline-point {
  fill: #ff876d !important;
}

.timeline-point-muted {
  fill: #c3b7d1 !important;
}

.success-metric-circle,
.history-score-orb,
.history-score-bubble,
.history-score-bubble-blue,
.history-score-bubble-pink {
  box-shadow:
    inset 0 0 0 2px rgba(74, 56, 96, 0.08),
    0 12px 24px rgba(122, 97, 150, 0.10) !important;
}

.success-metric-circle {
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), rgba(242, 233, 248, 0.72)) !important;
}

/* Absolute final mobile fix: keep recording page inside viewport */
@media (max-width: 720px) {
  html,
  body,
  .site-shell,
  main,
  .page-shell,
  .reader-page {
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .page-shell {
    width: calc(100vw - 24px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .reader-page,
  .reader-head,
  .reader-description,
  .reader-tabs,
  .story-card,
  .record-dock,
  .record-dock-inner,
  .reader-footer-links {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .reader-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 2px 0 6px !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
  }

  .reader-tabs::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  .reader-tab {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 8px !important;
    border-radius: 14px !important;
    font-size: 0.76rem !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }

  .story-card {
    overflow: hidden !important;
  }
}

@media (max-width: 420px) {
  .page-shell {
    width: calc(100vw - 16px) !important;
  }

  .reader-tabs {
    gap: 6px !important;
  }

  .reader-tab {
    min-height: 30px !important;
    height: 30px !important;
    padding: 0 6px !important;
    font-size: 0.72rem !important;
  }
}

/* Ultimate recording-tab mobile override */
@media (max-width: 720px) {
  .reader-page .reader-tabs {
    align-items: stretch !important;
  }

  .reader-page .reader-tab {
    min-height: 36px !important;
    height: 36px !important;
    padding: 6px 8px !important;
    border-radius: 12px !important;
    font-size: 0.7rem !important;
    line-height: 1.05 !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    text-wrap: balance !important;
  }
}

@media (max-width: 420px) {
  .reader-page .reader-tab {
    min-height: 33px !important;
    height: 33px !important;
    padding: 5px 7px !important;
    font-size: 0.66rem !important;
    line-height: 1 !important;
  }
}

/* Final fix for light home / reader / about / privacy screens */
.home-subtitle,
.home-tagline {
  color: #6c5a80 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.reader-tabs {
  padding: 4px 4px 8px !important;
  overflow: visible !important;
  align-items: stretch !important;
}

.reader-tab {
  min-height: 72px !important;
  padding: 0 28px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1.15 !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

.reader-tab.is-active {
  transform: none !important;
}

.disclaimer-box {
  border-radius: 20px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 2px solid rgba(166, 104, 255, 0.14) !important;
  box-shadow:
    0 8px 20px rgba(122, 97, 150, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
  color: #6c5a80 !important;
}

.about-card h2,
.about-card h3,
.about-card strong,
.about-copy h2,
.about-copy h3,
.about-copy strong,
.privacy-card h2,
.privacy-card h3,
.privacy-card strong,
.privacy-copy h2,
.privacy-copy h3,
.privacy-copy strong {
  color: #4c3a5f !important;
}

.about-card p,
.about-card li,
.about-copy p,
.about-copy li,
.privacy-card p,
.privacy-card li,
.privacy-copy p,
.privacy-copy li {
  color: #6c5a80 !important;
}

.about-card a,
.about-copy a,
.privacy-card a,
.privacy-copy a {
  color: #5f45d6 !important;
}

/* Final light-theme readability pass for result / history detail cards */
.flow-panel,
.flow-panel-wide {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #fffdfd 0%, #f8f0fc 100%) !important;
  border: 2px solid rgba(76, 58, 95, 0.12) !important;
  box-shadow:
    0 12px 26px rgba(122, 97, 150, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.flow-panel::before,
.flow-panel-wide::before {
  content: "" !important;
  position: absolute !important;
  inset: 16px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 189, 210, 0.28), transparent 36%),
    radial-gradient(circle at 78% 82%, rgba(143, 216, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 239, 252, 0.42)) !important;
  opacity: 0.95 !important;
  pointer-events: none !important;
}

.flow-panel > *,
.flow-panel-wide > * {
  position: relative !important;
  z-index: 1 !important;
}

.flow-arrow {
  color: rgba(87, 67, 109, 0.46) !important;
}

.flow-panel strong,
.flow-panel span,
.flow-sound-word,
.success-flow-panels strong,
.success-flow-panels span {
  color: #433255 !important;
}

.flow-wave-pink {
  color: #f09bb2 !important;
}

.flow-wave-blue {
  color: #86cfff !important;
}

.success-copy-block p,
.success-copy-muted,
.success-rich-copy,
.success-rich-copy p,
.success-rich-copy li,
.success-numeric-copy,
.success-numeric-copy p,
.success-numeric-copy li,
.success-data-row,
.success-notes-list li,
.volume-row span,
.success-age-text {
  color: #5b4a70 !important;
}

.success-copy-block strong,
.success-keyword,
.success-keyword-soft,
.success-rich-copy strong,
.success-rich-copy b,
.success-rich-copy .success-keyword,
.success-rich-copy .success-keyword-soft,
.success-numeric-copy strong,
.success-numeric-copy b,
.success-data-row strong,
.success-age-highlight,
.success-details-panel summary,
.success-details-panel[open] summary {
  color: #5b3f76 !important;
}

.success-details-panel summary::after {
  color: rgba(91, 63, 118, 0.72) !important;
}

.success-details-panel,
.success-card {
  box-shadow:
    0 10px 0 rgba(74, 56, 96, 0.05),
    0 14px 26px rgba(122, 97, 150, 0.08) !important;
}

.histogram-card,
.timeline-card {
  background: linear-gradient(180deg, #fffefe 0%, #f7eefc 100%) !important;
}

.histogram-stage {
  background:
    linear-gradient(180deg, rgba(88, 103, 119, 0.96) 0%, rgba(99, 113, 127, 0.96) 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.10) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.10),
    0 10px 22px rgba(80, 66, 99, 0.10) !important;
}

.histogram-bars span {
  background: linear-gradient(180deg, #f3f8fd 0%, #d3dfe9 100%) !important;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.14) !important;
}

.histogram-labels span {
  color: rgba(242, 247, 251, 0.96) !important;
}

.timeline-card {
  background: linear-gradient(180deg, #fffefe 0%, #f8f0fc 100%) !important;
}

.timeline-plot {
  background: linear-gradient(180deg, #eadcf6 0%, #e6d7f4 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.40) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 10px 22px rgba(111, 89, 140, 0.08) !important;
}

.timeline-plot::before {
  content: "" !important;
  position: absolute !important;
  inset: 18px !important;
  border-radius: 26px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)) !important;
  pointer-events: none !important;
}

.timeline-line {
  background: rgba(116, 95, 142, 0.24) !important;
}

.timeline-ylabels {
  color: #604d76 !important;
}

.timeline-y-top {
  color: #ff7f9f !important;
}

.timeline-y-bottom {
  color: #55b2f7 !important;
}

.timeline-xlabels span {
  color: #6e5a84 !important;
}

.timeline-polyline {
  stroke: #6f61ff !important;
  stroke-width: 10 !important;
}

.timeline-point {
  fill: #ff876d !important;
}

.timeline-point-muted {
  fill: #c3b7d1 !important;
}

.success-metric-circle,
.history-score-orb,
.history-score-bubble,
.history-score-bubble-blue,
.history-score-bubble-pink {
  box-shadow:
    inset 0 0 0 2px rgba(74, 56, 96, 0.08),
    0 12px 24px rgba(122, 97, 150, 0.10) !important;
}

.success-metric-circle {
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), rgba(242, 233, 248, 0.72)) !important;
}

/* Final contrast fix for light theme navigation and history headers */
.back-button,
.back-button:link,
.back-button:visited,
.back-button:hover,
.back-button:active,
.back-button:focus-visible {
  color: #4c3a5f !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.back-button .icon,
.back-button span {
  color: inherit !important;
  opacity: 1 !important;
}

.history-item-date,
.history-item-meta,
.history-item-summary,
.history-item-caret {
  color: #6c5a80 !important;
  opacity: 1 !important;
}

.history-item-main,
.history-item-title,
.history-item-subtitle {
  color: #4c3a5f !important;
}

.history-storage-note,
#historyStorageNote {
  color: #6c5a80 !important;
  opacity: 1 !important;
}

.reader-tabs {
  padding-bottom: 0 !important;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.reader-tabs::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.history-audio-menu {
  overflow: visible !important;
  z-index: 70 !important;
}

.history-speed-menu {
  top: -10px !important;
  left: 0 !important;
  width: 290px !important;
  max-height: min(420px, 72vh) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  z-index: 90 !important;
}

.history-speed-list {
  display: block !important;
}

.history-speed-option {
  min-height: 74px;
}

.history-speed-label {
  white-space: nowrap !important;
}

.history-speed-menu::-webkit-scrollbar {
  width: 10px !important;
}

.history-speed-menu::-webkit-scrollbar-track {
  background: rgba(47, 34, 56, 0.08) !important;
}

.history-speed-menu::-webkit-scrollbar-thumb {
  background: rgba(47, 34, 56, 0.28) !important;
  border-radius: 999px !important;
}

/* Final readability pass for result / history detail cards in light theme */
.success-score-orb-large,
.history-score-orb {
  background: radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.78), rgba(239, 231, 250, 0.64) 42%, rgba(228, 215, 244, 0.78) 100%) !important;
  border: 2px solid rgba(76, 58, 95, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 12px 28px rgba(120, 92, 154, 0.12) !important;
}

.success-score-orb-large strong,
.history-score-orb strong,
.success-score-orb-large span,
.history-score-orb span,
.success-score-orb-large small,
.history-score-orb small {
  color: #3d2d4f !important;
}

.success-details-panel,
.success-details-panel summary,
.success-details-inner,
.success-rich-copy,
.success-numeric-copy,
.success-card h2,
.history-success-card h2 {
  color: #3f2f52 !important;
}

.success-details-panel summary {
  background: linear-gradient(180deg, #fffdfd 0%, #f7f0fb 100%) !important;
}

.success-details-panel summary::after {
  color: #6d597f !important;
}

.histogram-card,
.timeline-card {
  background: linear-gradient(180deg, #fffefe 0%, #f9f3fc 100%) !important;
}

.histogram-stage {
  background: linear-gradient(180deg, #b9bec3 0%, #b3b8bd 100%) !important;
}

.histogram-bars span {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(232, 239, 246, 0.92)) !important;
}

.histogram-labels span {
  color: rgba(255, 255, 255, 0.88) !important;
}

.timeline-plot {
  background: linear-gradient(180deg, #f8effc 0%, #f4eafa 100%) !important;
}

.timeline-line {
  background: rgba(120, 102, 149, 0.28) !important;
}

.timeline-y-top {
  color: #ff8ca7 !important;
}

.timeline-y-bottom {
  color: #67bfff !important;
}

.timeline-xlabels span {
  color: #7d688f !important;
}

.timeline-polyline {
  stroke: #7a63ff !important;
}

.timeline-point {
  fill: #ff856d !important;
}

.timeline-point-muted {
  fill: #b8b1c0 !important;
}

.volume-table,
.volume-row span,
.volume-row strong,
.success-reference-line,
.success-muted-line,
.insight-card p,
.success-paragraph,
.success-copy-block p {
  color: #5c4a70 !important;
}

/* Final visual pass for explanation / histogram / timeline blocks */
.flow-panel {
  background: linear-gradient(180deg, #fffdfd 0%, #f7effc 100%) !important;
  border: 2px solid rgba(76, 58, 95, 0.10) !important;
  box-shadow: 0 10px 24px rgba(122, 97, 150, 0.10) !important;
}

.flow-panel strong,
.flow-panel span,
.flow-sound-word {
  color: #433255 !important;
}

.flow-wave-pink {
  background:
    radial-gradient(circle at 16px 18px, transparent 18px, #f2a4b8 19px, #f2a4b8 22px, transparent 23px) !important;
}

.flow-wave-blue {
  background:
    radial-gradient(circle at 16px 18px, transparent 18px, #86cfff 19px, #86cfff 22px, transparent 23px) !important;
}

.success-copy-block strong,
.success-keyword,
.success-keyword-soft,
.success-rich-copy strong,
.success-rich-copy b {
  color: #6b527f !important;
}

.success-copy-muted,
.success-rich-copy,
.success-rich-copy p,
.success-rich-copy li,
.success-numeric-copy,
.success-numeric-copy p,
.success-numeric-copy li {
  color: #59486d !important;
}

.success-details-panel {
  background: linear-gradient(180deg, #fffefe 0%, #fbf5fd 100%) !important;
}

.success-details-inner {
  background: transparent !important;
}

.histogram-card {
  background: linear-gradient(180deg, #fffefe 0%, #f8f1fc 100%) !important;
}

.histogram-stage {
  background: linear-gradient(180deg, #728391 0%, #60707e 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10) !important;
}

.histogram-bars {
  align-items: end;
}

.histogram-bars span {
  background: linear-gradient(180deg, #eef5fb 0%, #d3e0ea 100%) !important;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.12) !important;
}

.histogram-labels span {
  color: rgba(244, 248, 251, 0.94) !important;
}

.timeline-card {
  background: linear-gradient(180deg, #fffefe 0%, #f8f1fc 100%) !important;
}

.timeline-plot {
  background: linear-gradient(180deg, #efe4f8 0%, #eadcf6 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

.timeline-plot::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0)) !important;
}

.timeline-ylabels {
  color: #5d4c70 !important;
}

.timeline-y-top {
  color: #ff7f9f !important;
}

.timeline-y-bottom {
  color: #55b2f7 !important;
}

.timeline-xlabels span {
  color: #735f87 !important;
}

.timeline-line {
  background: rgba(124, 103, 151, 0.34) !important;
}

.timeline-polyline {
  stroke: #6e59ff !important;
  stroke-width: 12 !important;
}

.timeline-point {
  fill: #ff8b72 !important;
}

.timeline-point-muted {
  fill: #bcaec8 !important;
}

.back-button {
  color: #8b789d;
  font-weight: 800;
  text-shadow: none;
}

.back-button:hover {
  color: #5e496f;
}

/* readability pass for light theme */
:root {
  --text: #2f2238;
  --muted: #5f4d72;
  --muted-soft: #7d6a91;
}

.history-description,
.reader-description,
.home-description,
.home-notes,
.privacy-intro,
.privacy-copy p,
.privacy-copy li,
.privacy-meta,
.success-copy-block p,
.success-paragraph,
.success-muted-line,
.success-reference-line,
.history-detail-copy,
.history-age-line,
.processing-note,
.failure-box,
.story-head span,
.story-body ruby rt,
.record-meter-text,
.record-meter-text.is-recording,
.history-storage-note,
.footer-links a,
.reader-footer-links a,
.privacy-footer-links a,
.history-footer-links a,
.status-footer-links a,
.about-link {
  color: #5f4d72;
}

.history-item-main,
.history-item-date,
.history-item-meta,
.history-item-summary,
.history-item-caret,
.history-result-eyebrow,
.history-result-title,
.success-kicker,
.success-subtitle,
.success-title,
.success-title-keyword,
.success-keyword-soft,
.success-age-text,
.success-age-highlight,
.success-copy-block strong,
.success-keyword,
.metric-rail-row,
.history-mini-rail-row,
.history-score-orb span,
.history-score-orb small,
.success-score-orb span,
.success-score-orb small,
.volume-row span,
.volume-row strong,
.success-data-row,
.success-data-row strong,
.privacy-block h3,
.success-card h2,
.story-head h3,
.story-body,
.history-detail-card h4 {
  color: #2f2238;
}

.history-storage-note {
  color: #7a678d;
}

.history-item,
.success-card,
.history-detail-card,
.privacy-block,
.story-card,
.timeline-card,
.histogram-card,
.metric-card,
.insight-card,
.visualizer-card,
.script-card,
.record-dock-inner,
.failure-box,
.history-modal-card,
.success-score-orb-large {
  border-color: rgba(47, 34, 56, 0.16);
}

.histogram-card,
.timeline-card {
  background: #fffafc;
}

.histogram-stage,
.timeline-plot {
  background: linear-gradient(180deg, #f9f0ff 0%, #f2e7fb 100%);
}

.histogram-bars span {
  background: linear-gradient(180deg, #8e72ff 0%, #6c53ea 100%);
}

.histogram-labels,
.timeline-xlabels {
  color: #736184;
}

.timeline-ylabels {
  color: #6e5d80;
}

.timeline-y-top {
  color: #ff7f66;
}

.timeline-y-bottom {
  color: #4ca6ff;
}

.timeline-line,
.timeline-line-mid,
.timeline-line-low {
  border-top-color: rgba(93, 71, 120, 0.26);
}

.timeline-polyline {
  stroke: #7357f6;
}

.timeline-point {
  fill: #ff7f66;
}

.timeline-point-muted {
  fill: #766888;
}

.success-gauge-mark {
  background: rgba(88, 68, 114, 0.34);
}

.history-mini-gauge-labels span:first-child,
.success-gauge-left {
  color: #4ca6ff;
}

.history-mini-gauge-labels span:last-child,
.success-gauge-right {
  color: #ff7f66;
}

.successReasonBody strong,
.success-copy-block strong,
.success-rich-copy strong,
.privacy-copy strong {
  color: #3a2748;
}

.success-rich-copy,
.success-copy-muted {
  color: #625174;
}

@media (max-width: 768px) {
  .floating-header {
    top: 16px;
    left: 16px;
    right: 16px;
  }

  .language-select {
    min-width: 122px;
  }

  .app-card,
  .recorder-card,
  .result-card,
  .section-card,
  .success-card,
  .history-item,
  .story-card,
  .privacy-block,
  .history-modal-card,
  .record-dock-inner {
    border-radius: 20px;
  }

  .reader-tab {
    border-radius: 16px;
  }

  .history-audio-player {
    border-radius: 22px;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Noto Sans JP", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(86, 194, 255, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 179, 71, 0.12), transparent 22%),
    linear-gradient(180deg, #0e2433 0%, #081721 52%, var(--bg-deep) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(rgba(106, 154, 184, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(106, 154, 184, 0.05) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.55;
}

body::after {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(125deg, rgba(86, 194, 255, 0.06), transparent 28%),
    linear-gradient(305deg, rgba(255, 179, 71, 0.05), transparent 24%);
  mix-blend-mode: screen;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.site-shell {
  position: relative;
  min-height: 100vh;
}

.site-shell[data-view="home"] .app-section {
  display: none;
}

.site-shell[data-view="reader"] .home-screen,
.site-shell[data-view="history"] .home-screen,
.site-shell[data-view="about"] .home-screen,
.site-shell[data-view="privacy"] .home-screen,
.site-shell[data-view="processing"] .home-screen,
.site-shell[data-view="failure"] .home-screen,
.site-shell[data-view="success"] .home-screen {
  display: none;
}

.site-shell[data-view="home"] #historyScreen,
.site-shell[data-view="home"] #aboutScreen,
.site-shell[data-view="home"] #privacyScreen,
.site-shell[data-view="home"] #processingScreen,
.site-shell[data-view="home"] #failureScreen,
.site-shell[data-view="home"] #successScreen,
.site-shell[data-view="home"] #legacySections,
.site-shell[data-view="reader"] #historyScreen,
.site-shell[data-view="reader"] #aboutScreen,
.site-shell[data-view="reader"] #privacyScreen,
.site-shell[data-view="reader"] #processingScreen,
.site-shell[data-view="reader"] #failureScreen,
.site-shell[data-view="reader"] #successScreen,
.site-shell[data-view="reader"] #legacySections,
.site-shell[data-view="history"] #analyzer,
.site-shell[data-view="history"] #aboutScreen,
.site-shell[data-view="history"] #privacyScreen,
.site-shell[data-view="history"] #processingScreen,
.site-shell[data-view="history"] #failureScreen,
.site-shell[data-view="history"] #successScreen,
.site-shell[data-view="history"] #legacySections,
.site-shell[data-view="about"] #historyScreen,
.site-shell[data-view="about"] #privacyScreen,
.site-shell[data-view="about"] #analyzer,
.site-shell[data-view="about"] #processingScreen,
.site-shell[data-view="about"] #failureScreen,
.site-shell[data-view="about"] #successScreen,
.site-shell[data-view="about"] #legacySections,
.site-shell[data-view="privacy"] #historyScreen,
.site-shell[data-view="privacy"] #aboutScreen,
.site-shell[data-view="privacy"] #analyzer,
.site-shell[data-view="privacy"] #processingScreen,
.site-shell[data-view="privacy"] #failureScreen,
.site-shell[data-view="privacy"] #successScreen,
.site-shell[data-view="privacy"] #legacySections,
.site-shell[data-view="processing"] #analyzer,
.site-shell[data-view="processing"] #historyScreen,
.site-shell[data-view="processing"] #aboutScreen,
.site-shell[data-view="processing"] #privacyScreen,
.site-shell[data-view="processing"] #failureScreen,
.site-shell[data-view="processing"] #successScreen,
.site-shell[data-view="processing"] #legacySections,
.site-shell[data-view="failure"] #analyzer,
.site-shell[data-view="failure"] #historyScreen,
.site-shell[data-view="failure"] #aboutScreen,
.site-shell[data-view="failure"] #privacyScreen,
.site-shell[data-view="failure"] #processingScreen,
.site-shell[data-view="failure"] #successScreen,
.site-shell[data-view="failure"] #legacySections {
  display: none;
}

.site-shell[data-view="success"] #historyScreen,
.site-shell[data-view="success"] #aboutScreen,
.site-shell[data-view="success"] #privacyScreen,
.site-shell[data-view="success"] #analyzer,
.site-shell[data-view="success"] #processingScreen,
.site-shell[data-view="success"] #failureScreen,
.site-shell[data-view="success"] #legacySections {
  display: none;
}

.floating-header {
  position: absolute;
  top: 24px;
  left: 28px;
  right: 28px;
  z-index: 10;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  pointer-events: none;
}

.floating-brand,
.language-wrap {
  pointer-events: auto;
}

.floating-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.floating-brand-icon {
  position: relative;
  width: 18px;
  height: 12px;
}

.floating-brand-icon span {
  position: absolute;
  top: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  opacity: 0.95;
  box-shadow: 0 0 0 2px rgba(4, 17, 27, 0.46);
}

.floating-brand-icon span:first-child {
  left: 0;
  background: var(--accent-blue);
}

.floating-brand-icon span:last-child {
  right: 0;
  background: var(--accent-pink);
}

.floating-brand-text {
  font-size: 0.78rem;
}

.language-wrap {
  position: relative;
}

.language-wrap::after {
  position: absolute;
  top: 50%;
  right: 16px;
  width: 9px;
  height: 9px;
  margin-top: -6px;
  border-right: 2px solid rgba(255, 255, 255, 0.86);
  border-bottom: 2px solid rgba(255, 255, 255, 0.86);
  content: "";
  transform: rotate(45deg);
  pointer-events: none;
}

.language-select {
  min-width: 136px;
  height: 38px;
  padding: 0 36px 0 14px;
  border: 1px solid rgba(108, 156, 184, 0.28);
  border-radius: 12px;
  appearance: none;
  background: linear-gradient(180deg, rgba(18, 45, 61, 0.94), rgba(13, 32, 46, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 14px 30px rgba(2, 10, 14, 0.3);
  color: var(--text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.home-screen {
  min-height: 100vh;
  padding: 78px 24px 26px;
  display: grid;
  place-items: center;
}

.history-screen {
  min-height: 100vh;
  padding: 78px 0 26px;
}

.history-shell {
  width: min(760px, calc(100% - 24px));
}

.history-page {
  min-height: calc(100vh - 104px);
  display: flex;
  flex-direction: column;
}

.history-head {
  gap: 14px;
  margin-bottom: 28px;
}

.history-title {
  margin: 0;
}

.history-description {
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.78;
}

.history-list {
  display: grid;
  gap: 16px;
}

.history-item {
  padding: 0;
  border: 1px solid rgba(106, 154, 184, 0.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(15, 37, 51, 0.92), rgba(10, 27, 39, 0.9));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 18px 36px rgba(2, 10, 14, 0.2);
  overflow: hidden;
}

.history-item-main {
  width: 100%;
  padding: 20px 22px;
  border: 0;
  background: transparent;
  text-align: left;
  font: inherit;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.history-item-date,
.history-item-meta {
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.92rem;
}

.history-item-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(86, 194, 255, 0.96), rgba(135, 227, 255, 0.94));
  color: #08202d;
  font-size: 0.92rem;
  font-weight: 900;
  box-shadow: 0 10px 18px rgba(40, 161, 219, 0.18);
}

.history-item-meta {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item-summary {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.history-item-caret {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.34);
  font-size: 1.05rem;
}

.history-item-body {
  padding: 0 18px 18px;
}

.history-audio-player {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 78px;
  margin-top: 4px;
  padding: 0 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(248, 251, 253, 0.98), rgba(233, 242, 248, 0.96));
  position: relative;
  box-shadow: 0 16px 28px rgba(3, 11, 18, 0.18);
}

.history-audio-play {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #101621;
  font-size: 1.08rem;
  line-height: 1;
  cursor: pointer;
}

.history-audio-time {
  min-width: 96px;
  color: #2b3240;
  font-size: 1rem;
  font-weight: 700;
  white-space: nowrap;
}

.history-audio-progress {
  position: relative;
  width: 100%;
  height: 22px;
  margin-left: -4px;
  cursor: pointer;
}

.history-audio-progress-base,
.history-audio-progress-fill {
  position: absolute;
  top: 50%;
  left: 0;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
}

.history-audio-progress-base {
  width: 100%;
  background: rgba(17, 17, 17, 0.16);
}

.history-audio-progress-fill {
  width: 0;
  background: rgba(17, 17, 17, 0.92);
}

.history-audio-progress-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #111111;
  transform: translate(-50%, -50%);
}

.history-audio-icon {
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #101621;
  display: inline-grid;
  place-items: center;
  line-height: 1;
  cursor: pointer;
}

.history-audio-icon svg,
.history-audio-menu-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.history-audio-icon.is-muted {
  opacity: 0.52;
}

.history-audio-more {
  margin-left: -2px;
}

.history-audio-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 10px;
  min-width: 258px;
  border-radius: 4px;
  background: #fff;
  color: #1b1b1b;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  overflow: visible;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 140ms ease, transform 140ms ease;
  z-index: 15;
}

.history-audio-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.history-audio-menu-item,
.history-speed-option {
  width: 100%;
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border: 0;
  background: #fff;
  color: #1a1a1a;
  font: inherit;
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}

.history-audio-menu-item:first-child {
  border-radius: 4px 4px 0 0;
}

.history-audio-menu-item:last-of-type {
  border-radius: 0 0 4px 4px;
}

.history-audio-menu-item + .history-audio-menu-item {
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.history-audio-menu-item:hover,
.history-speed-option:hover,
.history-speed-option.is-active {
  background: #ececec;
}

.history-audio-menu-icon {
  display: inline-grid;
  place-items: center;
  color: #111;
}

.history-speed-menu {
  position: absolute;
  top: -6px;
  left: 0;
  width: 290px;
  max-height: 340px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 140ms ease, transform 140ms ease;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 24;
}

.history-speed-menu.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.history-speed-list {
  display: grid;
}

.history-speed-label {
  white-space: nowrap;
}

.history-speed-menu::-webkit-scrollbar {
  width: 10px;
}

.history-speed-menu::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.06);
}

.history-speed-menu::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.24);
  border-radius: 999px;
}

.history-speed-check {
  min-width: 18px;
  text-align: right;
  color: #377cff;
}

.history-audio {
  display: none;
}

.history-audio-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.history-pill-button,
.history-delete-single {
  min-height: 48px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.82);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
}

.history-pill-button-pink,
.history-delete-single {
  border-color: rgba(242, 164, 184, 0.58);
  color: rgba(242, 164, 184, 0.94);
}

.history-result-eyebrow {
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-align: center;
}

.history-result-title {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 2rem;
  line-height: 1.12;
  text-align: center;
}

.history-mini-gauge {
  margin-top: 14px;
}

.history-mini-gauge-track,
.history-mini-rail {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(139, 200, 241, 0.95), rgba(189, 191, 229, 0.92), rgba(242, 164, 184, 0.94));
}

.history-mini-gauge-thumb,
.history-mini-rail i {
  position: absolute;
  top: 50%;
  width: 22px;
  height: 22px;
  border: 4px solid rgba(67, 89, 102, 0.94);
  border-radius: 50%;
  background: #edf3f7;
  box-shadow: 0 8px 18px rgba(17, 29, 35, 0.2);
  transform: translate(-50%, -50%);
}

.history-mini-gauge-thumb {
  left: 28%;
}

.history-mini-gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.82rem;
}

.history-mini-gauge-labels span:first-child {
  color: var(--accent-blue);
}

.history-mini-gauge-labels span:last-child {
  color: var(--accent-pink);
}

.history-score-row {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 14px;
  align-items: center;
  margin-top: 16px;
}

.history-score-orb {
  display: flex;
  min-height: 160px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle at 42% 35%, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
}

.history-score-orb strong {
  font-size: 2.1rem;
  line-height: 1;
}

.history-score-orb span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.86rem;
}

.history-score-orb small {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.8rem;
}

.history-score-pair {
  position: relative;
  height: 140px;
}

.history-score-bubble {
  position: absolute;
  top: 0;
  width: 124px;
  height: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #2b3c47;
}

.history-score-bubble strong {
  font-size: 1.78rem;
  line-height: 1;
}

.history-score-bubble small {
  margin-top: 6px;
  color: rgba(43, 60, 71, 0.92);
  font-size: 0.82rem;
  font-weight: 700;
}

.history-score-bubble-blue {
  left: 0;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.2), #8bc8f1 0, #8bc8f1 76%, #84bee6 100%);
}

.history-score-bubble-pink {
  right: 0;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.2), #f2a4b8 0, #f2a4b8 76%, #ea98ad 100%);
}

.history-detail-card {
  margin-top: 18px;
  padding: 18px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.history-detail-card h4 {
  margin: 0 0 16px;
  font-size: 1rem;
  line-height: 1.35;
}

.history-detail-copy {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.94rem;
  line-height: 1.8;
}

.history-mini-rails {
  display: grid;
  gap: 12px;
}

.history-mini-rail-row {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
}

.history-age-line {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.94rem;
  line-height: 1.7;
}

.history-age-line strong {
  color: rgba(255, 255, 255, 0.98);
  font-size: 1.28em;
  font-weight: 900;
}

.history-delete-single {
  width: 100%;
  margin-top: 18px;
}

.history-success-card {
  margin-top: 18px;
}

.history-success-card summary {
  color: rgba(255, 255, 255, 0.94);
}

.history-flow-panels {
  margin-bottom: 22px;
}

.history-copy-block {
  gap: 14px;
}

.history-divider {
  margin: 40px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.history-delete-button {
  width: min(100%, 480px);
  min-height: 60px;
  margin: 0 auto;
  border: 1px solid rgba(242, 164, 184, 0.72);
  border-radius: 999px;
  background: transparent;
  color: rgba(242, 164, 184, 0.96);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
}

.history-storage-note {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.96rem;
  text-align: center;
}

.history-footer-links {
  margin-top: 26px;
  padding-top: 18px;
}

.history-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
}

.history-modal.is-hidden {
  display: none;
}

.history-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 27, 33, 0.52);
  backdrop-filter: blur(4px);
}

.history-modal-card {
  position: relative;
  z-index: 1;
  width: min(92vw, 440px);
  padding: 22px 20px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(82, 104, 117, 0.98), rgba(69, 92, 105, 0.98));
  box-shadow: 0 28px 60px rgba(12, 19, 24, 0.32);
}

.history-modal-title {
  margin: 0;
  font-size: 1.24rem;
}

.history-modal-body {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.94rem;
  line-height: 1.7;
}

.history-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.history-modal-cancel,
.history-modal-confirm {
  min-height: 52px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
}

.history-modal-confirm {
  border: 0;
  background: linear-gradient(90deg, rgba(139, 200, 241, 0.95), rgba(244, 157, 187, 0.95));
  color: var(--button-text);
}

.privacy-screen {
  min-height: 100vh;
  padding: 78px 0 26px;
}

.privacy-shell {
  width: min(760px, calc(100% - 24px));
}

.privacy-page {
  min-height: calc(100vh - 104px);
}

.privacy-head {
  gap: 14px;
  margin-bottom: 28px;
}

.privacy-title {
  margin: 0;
}

.privacy-intro,
.privacy-copy p,
.privacy-copy li,
.privacy-meta {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.82;
}

.privacy-intro {
  margin: 0 0 26px;
}

.privacy-block + .privacy-block {
  margin-top: 30px;
}

.privacy-block h3 {
  position: relative;
  margin: 0 0 18px;
  padding-left: 16px;
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.32rem;
  line-height: 1.4;
}

.privacy-block h3::before {
  content: "";
  position: absolute;
  top: 0.22em;
  left: 0;
  width: 4px;
  height: 1.28em;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(139, 200, 241, 0.95), rgba(242, 164, 184, 0.95));
}

.privacy-copy p {
  margin: 0;
}

.privacy-copy p + p {
  margin-top: 16px;
}

.privacy-copy ul {
  margin: 12px 0 0;
  padding-left: 1.25em;
}

.privacy-copy li + li {
  margin-top: 10px;
}

.privacy-copy a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.privacy-meta {
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.5);
}

.privacy-footer-links {
  padding-top: 44px;
}

.reader-footer-links a.is-active,
.privacy-footer-links a.is-active {
  color: rgba(255, 255, 255, 0.96);
}

.about-mail {
  margin-top: 18px;
}

.home-inner {
  width: min(100%, 640px);
  text-align: center;
}

.hero-orb {
  position: relative;
  width: 170px;
  height: 102px;
  margin: 0 auto 10px;
  filter: drop-shadow(0 18px 24px rgba(2, 11, 16, 0.24));
}

.orb {
  position: absolute;
  top: 0;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  opacity: 0.96;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.orb-left {
  left: 34px;
  background: radial-gradient(circle at 30% 30%, rgba(164, 233, 255, 0.95), rgba(86, 194, 255, 0.86) 64%, rgba(27, 121, 170, 0.88));
}

.orb-right {
  right: 34px;
  background: radial-gradient(circle at 30% 30%, rgba(255, 221, 150, 0.96), rgba(255, 179, 71, 0.88) 64%, rgba(214, 117, 20, 0.9));
}

.home-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1;
  letter-spacing: 0.01em;
  font-weight: 900;
  text-transform: uppercase;
}

.home-subtitle {
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.72rem, 1.5vw, 0.92rem);
  letter-spacing: 0.24em;
  font-weight: 800;
}

.home-tagline {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: clamp(0.68rem, 1.3vw, 0.78rem);
  letter-spacing: 0.12em;
  font-weight: 600;
}

.home-description {
  width: min(100%, 620px);
  margin: 12px auto 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: clamp(0.72rem, 1.3vw, 0.82rem);
  line-height: 1.65;
  text-align: left;
}

.highlight-blue {
  color: var(--accent-blue);
  font-weight: 800;
}

.highlight-pink {
  color: #ffc56f;
  font-weight: 800;
}

.home-actions {
  width: min(100%, 520px);
  margin: 14px auto 0;
  display: grid;
  gap: 10px;
}

.hero-primary,
.hero-secondary,
.primary-button,
.secondary-button {
  min-height: 40px;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.hero-primary:hover,
.hero-secondary:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.hero-primary {
  border: 0;
  background: linear-gradient(90deg, rgba(77, 192, 245, 0.98), rgba(255, 181, 73, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 34px rgba(14, 102, 151, 0.18);
  color: var(--button-text);
  font-size: clamp(0.82rem, 1.4vw, 0.92rem);
}

.hero-secondary {
  border: 1px solid rgba(106, 154, 184, 0.2);
  background: linear-gradient(180deg, rgba(13, 32, 46, 0.82), rgba(9, 24, 35, 0.82));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: clamp(0.8rem, 1.35vw, 0.9rem);
}

.disclaimer-box {
  width: min(100%, 520px);
  margin: 12px auto 0;
  padding: 8px 12px;
  border: 1px solid rgba(106, 154, 184, 0.18);
  border-radius: 10px;
  color: rgba(186, 206, 220, 0.72);
  font-size: clamp(0.68rem, 1.15vw, 0.74rem);
  line-height: 1.55;
  background:
    linear-gradient(90deg, rgba(86, 194, 255, 0.08) 0 4px, transparent 4px),
    rgba(12, 29, 40, 0.58);
}

.home-notes {
  width: min(100%, 620px);
  margin: 10px auto 0;
  padding: 0;
  list-style: none;
  color: rgba(255, 255, 255, 0.5);
  text-align: left;
}

.home-notes li {
  position: relative;
  padding-left: 20px;
  font-size: clamp(0.62rem, 1.1vw, 0.72rem);
  line-height: 1.45;
}

.home-notes li + li {
  margin-top: 3px;
}

.home-notes li::before {
  position: absolute;
  top: 0.3em;
  left: 0;
  width: 11px;
  height: 11px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  content: "";
}

.home-seo-copy {
  width: min(100%, 620px);
  margin: 16px auto 0;
  padding: 14px 18px;
  border: 2px solid rgba(166, 104, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(86, 56, 113, 0.08);
  text-align: left;
}

.home-seo-copy p {
  margin: 0;
  color: #6f6283;
  font-size: clamp(0.72rem, 1.15vw, 0.8rem);
  line-height: 1.72;
}

.home-seo-copy p + p {
  margin-top: 10px;
}

.home-faq-section {
  width: min(100%, 620px);
  margin: 16px auto 0;
  text-align: left;
}

.home-faq-title {
  margin: 0 0 10px;
  color: #3b2d4d;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  font-weight: 900;
}

.home-faq-grid {
  display: grid;
  gap: 10px;
}

.home-faq-card {
  padding: 14px 18px;
  border: 2px solid rgba(166, 104, 255, 0.14);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(86, 56, 113, 0.08);
}

.home-faq-card h3 {
  margin: 0 0 6px;
  color: #3b2d4d;
  font-size: clamp(0.82rem, 1.3vw, 0.92rem);
  font-weight: 800;
}

.home-faq-card p {
  margin: 0;
  color: #6f6283;
  font-size: clamp(0.72rem, 1.15vw, 0.8rem);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.about-link {
  display: inline-block;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  text-underline-offset: 6px;
}

.app-section {
  padding: 0 0 72px;
}

.site-shell[data-view="reader"] .app-section {
  padding-bottom: 8px;
}

.reader-page {
  position: relative;
  padding: 74px 0 64px;
}

.reader-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 18px;
}

.back-button {
  border: 0;
  padding: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.reader-title {
  margin: 0;
  font-size: 1.95rem;
}

.reader-description {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
  line-height: 1.68;
}

.reader-tabs {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.reader-tab {
  flex: 0 0 auto;
  min-height: 56px;
  padding: 0 22px;
  border: 1px solid rgba(106, 154, 184, 0.18);
  border-radius: 12px;
  background: rgba(10, 27, 39, 0.36);
  color: rgba(210, 223, 232, 0.72);
  font: inherit;
  font-size: 0.96rem;
  cursor: pointer;
}

.reader-tab.is-active {
  border-color: rgba(86, 194, 255, 0.22);
  background: linear-gradient(135deg, rgba(236, 246, 252, 0.98), rgba(206, 229, 242, 0.96));
  color: #173445;
  font-weight: 800;
  box-shadow: 0 12px 26px rgba(9, 18, 25, 0.16);
}

.story-card {
  position: relative;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(236, 244, 249, 0.98), rgba(219, 232, 240, 0.98));
  color: #203744;
  padding: 26px 28px 108px;
  box-shadow: 0 22px 44px rgba(2, 10, 14, 0.16);
}

.story-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
}

.story-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
}

.story-head span {
  color: #758590;
  font-size: 0.88rem;
  font-weight: 700;
}

.story-divider {
  margin: 12px 0 18px;
  border-top: 1px solid rgba(48, 66, 77, 0.12);
}

.story-body {
  font-size: 0.94rem;
  line-height: 1.95;
  letter-spacing: 0.01em;
}

.story-body p {
  margin: 0 0 18px;
}

.story-body ruby rt {
  font-size: 0.42em;
  color: #7b8c98;
}

.record-dock {
  position: sticky;
  bottom: 16px;
  z-index: 7;
  margin-top: 18px;
}

.record-dock-inner {
  border: 1px solid rgba(106, 154, 184, 0.14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(13, 32, 46, 0.96), rgba(8, 22, 32, 0.98));
  box-shadow: 0 18px 40px rgba(3, 12, 18, 0.34);
  backdrop-filter: blur(12px);
  padding: 14px 18px 18px;
  display: grid;
  justify-items: center;
}

.record-meter-text {
  display: grid;
  justify-items: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.record-meter-text.is-recording {
  color: rgba(255, 255, 255, 0.86);
}

.record-meter-text.is-recording::before {
  width: 12px;
  height: 12px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: rgba(242, 164, 184, 0.88);
  box-shadow: 0 0 0 8px rgba(242, 164, 184, 0.08);
  content: "";
  animation: recording-dot-blink 1.15s ease-in-out infinite;
}

.dock-button {
  width: min(100%, 420px);
  margin: 14px auto 0;
  justify-self: center;
}

.dock-button.is-stop {
  background: linear-gradient(90deg, rgba(255, 108, 143, 0.98), rgba(255, 176, 88, 0.98));
  color: #1d2931;
  animation: stop-button-pulse 1.8s ease-out infinite;
}

.reader-footer-links {
  display: flex;
  justify-content: center;
  gap: 34px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding-bottom: 0;
}

.reader-footer-links a {
  color: rgba(255, 255, 255, 0.44);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.status-screen {
  min-height: 100vh;
  padding: 92px 0 28px;
  animation: screen-fade 260ms ease;
}

.status-shell {
  min-height: calc(100vh - 120px);
}

.status-page {
  display: flex;
  min-height: calc(100vh - 140px);
  flex-direction: column;
}

.status-title {
  margin: 104px 0 24px;
  font-size: 2rem;
  line-height: 1.05;
}

.processing-track {
  width: 100%;
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}

.processing-track-fill {
  width: 18%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(139, 200, 241, 0.95), rgba(242, 164, 184, 0.95));
}

.processing-steps {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.processing-step {
  position: relative;
  padding-left: 28px;
  color: rgba(255, 255, 255, 0.32);
  font-size: 0.92rem;
  line-height: 1.55;
}

.processing-step + .processing-step {
  margin-top: 18px;
}

.processing-step::before {
  position: absolute;
  top: 0.42em;
  left: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  content: "";
}

.processing-step.is-done {
  color: rgba(255, 255, 255, 0.62);
}

.processing-step.is-done::before {
  background: rgba(139, 200, 241, 0.9);
}

.processing-step.is-active {
  color: rgba(255, 255, 255, 0.86);
}

.processing-step.is-active::before {
  background: rgba(242, 164, 184, 0.92);
}

.processing-note {
  margin: 36px 0 0;
  color: rgba(255, 255, 255, 0.44);
  font-size: 0.88rem;
  line-height: 1.65;
}

.failure-box {
  margin-top: 12px;
  padding: 18px 24px;
  border: 1px solid rgba(255, 179, 71, 0.44);
  border-radius: 14px;
  background: rgba(16, 34, 45, 0.66);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.98rem;
  line-height: 1.6;
}

.failure-actions {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.failure-primary,
.failure-secondary {
  min-height: 80px;
  font-size: 1.12rem;
}

.failure-secondary {
  background: rgba(255, 255, 255, 0.04);
}

.status-footer-links {
  display: flex;
  justify-content: center;
  gap: 34px;
  margin-top: auto;
  padding-top: 28px;
  color: rgba(255, 255, 255, 0.34);
  flex-wrap: wrap;
}

.status-footer-links a {
  color: rgba(255, 255, 255, 0.34);
  text-decoration: underline;
  text-underline-offset: 6px;
}

.status-spinner {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 52px;
  height: 52px;
  border: 5px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
}

.site-shell[data-view="processing"] .status-spinner {
  animation: spinner-drift 1.4s linear infinite;
}

.success-screen {
  min-height: 100vh;
  padding: 92px 0 28px;
  animation: screen-fade 260ms ease;
}

.success-shell {
  width: min(1180px, calc(100% - 36px));
}

.success-page {
  display: grid;
  gap: 28px;
}

.success-hero {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding-top: 16px;
}

.success-kicker {
  width: 100%;
  margin: 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: 1.6rem;
  font-weight: 900;
}

.success-subtitle {
  margin: 32px 0 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.98rem;
  letter-spacing: 0.22em;
}

.success-title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  text-align: center;
}

.success-title-keyword {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 900;
}

.success-keyword-soft {
  color: rgba(255, 226, 236, 0.94);
  font-weight: 800;
}

.success-gauge,
.success-score-cluster,
.success-actions {
  width: 100%;
}

.success-gauge-track,
.metric-rail {
  position: relative;
  height: 28px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(86, 194, 255, 0.94), rgba(162, 208, 236, 0.88), rgba(255, 179, 71, 0.94));
}

.success-gauge-track {
  height: 22px;
}

.success-gauge-mark {
  position: absolute;
  top: 50%;
  width: 2px;
  height: 40px;
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-50%);
}

.success-gauge-mark:nth-child(1) {
  left: 40%;
}

.success-gauge-mark:nth-child(2) {
  left: 60%;
}

.success-gauge-thumb,
.metric-knob {
  position: absolute;
  top: 50%;
  width: 34px;
  height: 34px;
  border: 4px solid rgba(15, 39, 54, 0.94);
  border-radius: 50%;
  background: #f2f7fa;
  box-shadow: 0 12px 24px rgba(3, 13, 20, 0.28);
  transform: translate(-50%, -50%);
}

.success-gauge-thumb {
  left: 27%;
}

.success-gauge-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  font-size: 1rem;
}

.success-gauge-left {
  color: var(--accent-blue);
}

.success-gauge-right {
  color: var(--accent-pink);
}

.share-pill-button {
  min-width: 640px;
  min-height: 110px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(7, 17, 24, 0.98), rgba(4, 10, 14, 0.98));
  color: #fff;
  font: inherit;
  font-size: 1.4rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 26px 54px rgba(1, 7, 11, 0.34);
}

.share-pill-icon {
  display: inline-block;
  margin-right: 16px;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(3px);
}

.success-score-cluster {
  display: grid;
  grid-template-columns: 360px 420px;
  justify-content: center;
  align-items: center;
  gap: 42px;
  margin-top: 10px;
}

.success-score-orb {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-radius: 50%;
}

.success-score-content {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.success-score-orb strong {
  font-size: 4rem;
  line-height: 1;
}

.success-score-orb span {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 1.2rem;
}

.success-score-orb small {
  margin-top: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 1.05rem;
}

.success-score-orb-large {
  width: 360px;
  height: 360px;
  background: radial-gradient(circle at 42% 35%, rgba(132, 192, 225, 0.16), rgba(17, 39, 53, 0.8));
  border: 1px solid rgba(106, 154, 184, 0.18);
}

.success-score-pair {
  position: relative;
  width: 420px;
  height: 250px;
}

.success-score-orb-blue,
.success-score-orb-pink {
  position: absolute;
  top: 0;
  width: 220px;
  height: 220px;
  color: #2b3c47;
}

.success-score-orb-blue {
  left: 0;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.22), #77d5ff 0, #56c2ff 74%, #2ca9e6 100%);
}

.success-score-orb-pink {
  right: 0;
  background: radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.22), #ffd07d 0, #ffb347 74%, #ec8f22 100%);
}

.success-card {
  padding: 32px 36px;
  border: 1px solid rgba(106, 154, 184, 0.16);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(13, 32, 46, 0.84), rgba(9, 24, 35, 0.84));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.02),
    0 20px 38px rgba(1, 8, 12, 0.18);
}

.success-card h2 {
  margin: 0 0 24px;
  font-size: 1.9rem;
  line-height: 1.18;
}

.metric-rail-list {
  display: grid;
  gap: 26px;
}

.metric-rail-row {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 80px;
  align-items: center;
  gap: 26px;
  font-size: 1.08rem;
}

.metric-knob {
  width: 30px;
  height: 30px;
}

.success-paragraph,
.success-copy-block p,
.success-notes-list li,
.success-muted-line,
.success-reference-line {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1rem;
  line-height: 1.8;
}

.success-paragraph {
  margin: 26px 0 0;
}

.success-age-text {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 2.2rem;
  line-height: 1.5;
}

.success-age-highlight {
  color: rgba(255, 255, 255, 0.98);
  font-weight: 900;
  font-size: 1.12em;
}

.success-flow-panels {
  display: grid;
  grid-template-columns: 1fr auto 1.2fr auto 0.72fr;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.flow-panel {
  min-height: 178px;
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 14px;
}

.flow-panel-wide {
  min-height: 178px;
}

.flow-arrow {
  color: rgba(255, 255, 255, 0.4);
  font-size: 4rem;
  line-height: 1;
}

.flow-wave {
  display: inline-block;
  width: 70px;
  height: 30px;
  border-top: 6px solid currentColor;
  border-radius: 999px 999px 0 0;
}

.flow-wave-pink {
  color: rgba(242, 164, 184, 0.94);
}

.flow-wave-blue {
  color: rgba(139, 200, 241, 0.9);
}

.flow-wave-group {
  display: flex;
  gap: 16px;
}

.flow-sound-word {
  font-size: 2.9rem;
  line-height: 1;
}

.success-copy-block {
  display: grid;
  gap: 16px;
}

.success-copy-block p {
  margin: 0;
}

.success-copy-block strong {
  color: rgba(255, 225, 235, 0.96);
}

.success-keyword {
  color: rgba(255, 214, 228, 0.98);
  font-weight: 900;
}

.success-copy-muted {
  color: rgba(255, 255, 255, 0.54);
}

.success-rich-copy {
  display: grid;
  gap: 16px;
}

.success-rich-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.84;
}

.success-data-grid {
  display: grid;
  gap: 0;
}

.success-data-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.76);
  font-size: 1rem;
  line-height: 1.65;
}

.success-data-row:last-child {
  border-bottom: 0;
}

.success-data-row strong {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 800;
  text-align: right;
}

.success-details-panel summary {
  list-style: none;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 800;
}

.success-details-panel summary::-webkit-details-marker {
  display: none;
}

.success-details-panel summary::after {
  margin-left: 10px;
  color: rgba(255, 255, 255, 0.46);
  content: "▾";
}

.success-details-panel[open] summary::after {
  content: "▴";
}

.success-details-inner {
  margin-top: 18px;
}

.success-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 40px;
}

.breakdown-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1.18rem;
}

.breakdown-item strong {
  margin-left: auto;
  font-size: 1.26rem;
}

.dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
}

.dot-blue { background: var(--accent-blue); }
.dot-pink { background: var(--accent-pink); }
.dot-gray { background: rgba(184, 192, 198, 0.8); }
.dot-pale { background: rgba(247, 205, 216, 0.95); }

.histogram-card,
.timeline-card {
  padding: 22px;
  border-radius: 24px;
  background: rgba(31, 48, 58, 0.32);
}

.histogram-bars {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
  min-height: 190px;
}

.histogram-bars span {
  display: block;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, rgba(221, 228, 235, 0.96), rgba(188, 198, 208, 0.8));
}

.histogram-labels,
.timeline-xlabels {
  display: flex;
  justify-content: space-between;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.36);
  font-size: 0.96rem;
}

.timeline-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: minmax(250px, auto) auto;
  column-gap: 14px;
}

.timeline-ylabels {
  grid-row: 1;
  position: relative;
  color: rgba(255, 255, 255, 0.54);
  font-size: 0.92rem;
  writing-mode: vertical-lr;
  text-orientation: mixed;
}

.timeline-y-top {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(242, 164, 184, 0.92);
}

.timeline-y-bottom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(139, 200, 241, 0.88);
}

.timeline-plot {
  position: relative;
  grid-row: 1;
  border-radius: 24px;
  background: rgba(31, 48, 58, 0.38);
  overflow: hidden;
}

.timeline-plot::before {
  content: none;
}

.timeline-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 2px dashed rgba(255, 255, 255, 0.16);
}

.timeline-line-mid { top: 42%; }
.timeline-line-low { top: 60%; }

.timeline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.timeline-polyline {
  fill: none;
  stroke: rgba(139, 200, 241, 0.9);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timeline-point {
  fill: rgba(139, 200, 241, 0.96);
}

.timeline-point-muted {
  fill: rgba(190, 197, 203, 0.92);
}

.timeline-xlabels {
  grid-column: 2;
}

.volume-table {
  display: grid;
}

.volume-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.08rem;
}

.volume-row:last-child {
  border-bottom: 0;
}

.success-notes-list {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.success-notes-list li + li {
  margin-top: 18px;
}

.success-actions {
  display: grid;
  justify-items: center;
  gap: 22px;
  padding-bottom: 8px;
}

.success-download-button,
.success-retry-button,
.success-history-button {
  width: min(100%, 640px);
  min-height: 104px;
  font-size: 1.34rem;
}

.success-save-row {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  color: var(--text);
  font-size: 1.06rem;
  font-weight: 700;
}

.success-save-row input {
  width: 26px;
  height: 26px;
  accent-color: var(--accent-pink);
}

.success-muted-line,
.success-reference-line {
  margin: 0;
  text-align: center;
}

.success-reference-line {
  color: rgba(255, 255, 255, 0.48);
}

@keyframes screen-fade {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinner-drift {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes stop-button-pulse {
  0% {
    box-shadow:
      0 0 0 0 rgba(242, 145, 176, 0.3),
      0 0 0 0 rgba(242, 145, 176, 0.16);
  }

  70% {
    box-shadow:
      0 0 0 14px rgba(242, 145, 176, 0),
      0 0 0 28px rgba(242, 145, 176, 0);
  }

  100% {
    box-shadow:
      0 0 0 0 rgba(242, 145, 176, 0),
      0 0 0 0 rgba(242, 145, 176, 0);
  }
}

@keyframes recording-dot-blink {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.28;
    transform: scale(0.88);
  }
}

.result-card.is-hidden,
.section-card.is-hidden {
  display: none;
}

.page-shell {
  width: min(760px, calc(100% - 24px));
  margin: 0 auto;
}

.app-card {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card-bg);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

.recorder-card,
.result-card,
.section-card {
  background: var(--card-bg);
}

.mini-label {
  margin: 0 0 8px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-head,
.meter-display,
.metric-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.card-head h2,
.hero-result-copy h3 {
  margin: 0;
  line-height: 1.08;
}

.card-head h2 {
  font-size: clamp(1.35rem, 4vw, 1.8rem);
}

.panel-status,
.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
}

.panel-status {
  color: #d8fff1;
  background: rgba(0, 194, 137, 0.14);
}

.result-badge {
  color: #ffe8ef;
  background: rgba(242, 164, 184, 0.18);
}

.script-card,
.visualizer-card,
.metric-card,
.insight-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  background: var(--card-bg-strong);
}

.script-card {
  margin-top: 16px;
  padding: 16px;
}

.script-label,
.helper-text,
.section-text,
.insight-card p,
.support-line a {
  color: var(--muted);
}

.script-label {
  margin: 0 0 10px;
  font-size: 0.84rem;
}

.script-text {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.75;
  font-weight: 700;
}

.visualizer-card {
  margin-top: 14px;
  padding: 16px;
}

.ring-panel {
  display: grid;
  place-items: center;
  margin: 18px 0 14px;
}

.ring-ring {
  display: grid;
  place-items: center;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: conic-gradient(from 180deg, var(--accent-blue) 0deg, var(--accent-pink) 180deg, rgba(255, 255, 255, 0.12) 180deg 360deg);
}

.ring-core,
.score-circle {
  display: grid;
  place-items: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(69, 92, 105, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ring-label,
.score-circle span {
  color: var(--muted-soft);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ring-core strong,
.score-circle strong {
  font-size: 2rem;
  line-height: 1;
}

.live-meter,
.metric-bar {
  width: 100%;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.live-meter {
  height: 14px;
  border-radius: 999px;
}

.live-meter-fill,
.metric-bar > div {
  height: 100%;
  border-radius: inherit;
  transition: width 180ms ease;
}

.live-meter-fill {
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), #b4c6ef, var(--accent-pink));
}

.meter-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  color: var(--muted-soft);
  font-size: 0.78rem;
}

.controls {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.primary-button,
.secondary-button {
  min-height: 64px;
}

.primary-button {
  border: 0;
  background: linear-gradient(90deg, rgba(139, 200, 241, 0.95), rgba(244, 157, 187, 0.95));
  color: var(--button-text);
}

.primary-button.is-recording {
  background: linear-gradient(90deg, #86bef4, #bdacec, #f59cb6);
}

.secondary-button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.helper-text {
  margin: 14px 2px 0;
  font-size: 0.92rem;
  line-height: 1.7;
}

.hero-result {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin-top: 18px;
}

.hero-result-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

.score-circle {
  width: 124px;
  height: 124px;
}

.metric-grid,
.insight-grid {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.metric-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card,
.insight-card {
  padding: 14px;
}

.metric-bar {
  height: 10px;
  margin-top: 10px;
  border-radius: 999px;
}

.metric-bar > div {
  width: 0%;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-pink));
}

.insight-card h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.insight-card p,
.feature-list,
.section-text {
  margin: 0;
  line-height: 1.8;
}

.feature-list {
  margin-top: 12px;
  padding-left: 20px;
  color: var(--muted);
}

.support-line {
  margin: 18px 0 0;
}

.support-line a {
  text-decoration: none;
  font-weight: 700;
}

@media (max-width: 900px) {
  .floating-header {
    top: 20px;
    left: 20px;
    right: 20px;
  }
}

@media (max-width: 720px) {
  .floating-header {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    align-items: center;
  }

  .floating-brand-text {
    font-size: 0.96rem;
  }

  .floating-brand {
    align-items: center;
  }

  .language-wrap {
    display: flex;
    align-items: center;
  }

  .language-select {
    min-width: 132px;
    height: 48px;
    padding: 0 40px 0 16px;
    border-radius: 16px;
    font-size: 0.95rem;
  }

  .home-screen {
    padding: 82px 16px 28px;
  }

  .history-screen {
    padding: 82px 0 24px;
  }

  .history-shell {
    width: calc(100% - 12px);
  }

  .history-page {
    min-height: calc(100vh - 106px);
  }

  .history-head {
    gap: 12px;
    margin-bottom: 22px;
  }

  .history-description {
    margin-bottom: 20px;
    font-size: 0.88rem;
    line-height: 1.68;
  }

  .history-list {
    gap: 14px;
  }

  .history-item {
    border-radius: 20px;
  }

  .history-item-main {
    padding: 16px 16px;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 10px;
  }

  .history-item-date {
    font-size: 0.8rem;
  }

  .history-item-badge {
    min-height: 30px;
    padding: 0 12px;
    font-size: 0.84rem;
    justify-self: start;
  }

  .history-item-summary {
    justify-content: space-between;
    gap: 10px;
  }

  .history-item-meta {
    font-size: 0.8rem;
    text-align: left;
    flex: 1 1 auto;
  }

  .history-item-caret {
    align-self: center;
    margin-left: 0;
  }

  .history-item-body {
    padding: 0 12px 14px;
  }

  .history-audio-player {
    gap: 10px;
    min-height: 68px;
    padding: 0 18px;
  }

  .history-audio-time {
    min-width: 86px;
    font-size: 0.88rem;
  }

  .history-audio-icon {
    width: 24px;
    height: 24px;
  }

  .history-audio-icon svg,
  .history-audio-menu-icon svg {
    width: 20px;
    height: 20px;
  }

  .history-audio-menu {
    right: 4px;
    min-width: 224px;
  }

  .history-speed-menu {
    width: 248px;
  }

  .history-audio {
    height: 46px;
  }

  .history-audio-actions {
    gap: 10px;
    margin-top: 12px;
  }

  .history-pill-button,
  .history-delete-single {
    min-height: 44px;
    font-size: 0.84rem;
  }

  .history-result-eyebrow {
    margin-top: 18px;
    font-size: 0.72rem;
  }

  .history-result-title {
    font-size: 1.66rem;
  }

  .history-score-row {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .history-score-orb {
    min-height: 128px;
  }

  .history-score-orb strong {
    font-size: 1.62rem;
  }

  .history-score-pair {
    height: 118px;
  }

  .history-score-bubble {
    width: 96px;
    height: 96px;
  }

  .history-score-bubble strong {
    font-size: 1.34rem;
  }

  .history-score-bubble small {
    font-size: 0.74rem;
  }

  .history-detail-card {
    margin-top: 14px;
    padding: 14px 12px;
    border-radius: 18px;
  }

  .history-detail-card h4 {
    margin-bottom: 12px;
    font-size: 0.92rem;
  }

  .history-detail-copy {
    font-size: 0.88rem;
    line-height: 1.72;
  }

  .history-mini-rail-row {
    grid-template-columns: 92px minmax(0, 1fr) 34px;
    gap: 8px;
    font-size: 0.74rem;
  }

  .history-mini-gauge-track,
  .history-mini-rail {
    height: 10px;
  }

  .history-mini-gauge-thumb,
  .history-mini-rail i {
    width: 18px;
    height: 18px;
    border-width: 3px;
  }

  .history-divider {
    margin: 38px 0 22px;
  }

  .history-delete-button {
    width: min(100%, 446px);
    min-height: 58px;
    font-size: 0.94rem;
  }

  .history-storage-note {
    margin-top: 14px;
    font-size: 0.86rem;
  }

  .history-footer-links {
    padding-top: 32px;
    gap: 20px;
  }

  .history-modal-card {
    width: calc(100vw - 28px);
    padding: 20px 16px 16px;
    border-radius: 22px;
  }

  .history-modal-title {
    font-size: 1.08rem;
  }

  .history-modal-body {
    font-size: 0.86rem;
  }

  .history-modal-actions {
    gap: 10px;
  }

  .history-success-card {
    margin-top: 16px;
  }

  .privacy-screen {
    padding: 82px 0 24px;
  }

  .privacy-shell {
    width: calc(100% - 12px);
  }

  .privacy-page {
    min-height: calc(100vh - 106px);
  }

  .privacy-head {
    gap: 12px;
    margin-bottom: 22px;
  }

  .privacy-intro,
  .privacy-copy p,
  .privacy-copy li,
  .privacy-meta {
    font-size: 0.88rem;
    line-height: 1.72;
  }

  .privacy-intro {
    margin-bottom: 22px;
  }

  .privacy-block + .privacy-block {
    margin-top: 24px;
  }

  .privacy-block h3 {
    margin-bottom: 14px;
    padding-left: 14px;
    font-size: 1.08rem;
  }

  .privacy-copy p + p {
    margin-top: 12px;
  }

  .privacy-copy ul {
    margin-top: 10px;
    padding-left: 1.1em;
  }

  .privacy-copy li + li {
    margin-top: 8px;
  }

  .privacy-meta {
    margin-top: 28px;
  }

  .privacy-footer-links {
    padding-top: 28px;
    gap: 16px;
  }

  .home-inner {
    width: 100%;
  }

  .hero-orb {
    width: 188px;
    height: 116px;
    margin-bottom: 12px;
  }

  .orb {
    width: 102px;
    height: 102px;
  }

  .orb-left {
    left: 18px;
  }

  .orb-right {
    right: 18px;
  }

  .home-tagline {
    margin-top: 18px;
  }

  .home-description {
    margin-top: 18px;
    font-size: 0.92rem;
    line-height: 1.62;
  }

  .hero-primary,
  .hero-secondary {
    min-height: 70px;
    font-size: 1rem;
  }

  .home-actions {
    gap: 16px;
  }

  .disclaimer-box {
    margin-top: 18px;
    padding: 16px 14px;
    font-size: 0.88rem;
    line-height: 1.62;
  }

  .home-notes {
    margin-top: 14px;
  }

  .home-notes li {
    font-size: 0.85rem;
    line-height: 1.56;
  }

  .footer-links {
    margin-top: 20px;
    gap: 18px;
  }

  .home-faq-section {
    margin-top: 18px;
  }

  .home-faq-card {
    padding: 14px 14px;
  }

  .page-shell {
    width: calc(100% - 24px);
  }

  .metric-grid,
  .hero-result {
    grid-template-columns: 1fr;
  }

  .hero-result {
    justify-items: start;
  }

  .card-head {
    flex-direction: column;
  }

  .reader-page {
    padding: 76px 0 40px;
  }

  .reader-head {
    gap: 12px;
    margin-bottom: 18px;
  }

  .back-button {
    font-size: 0.9rem;
  }

  .reader-title {
    font-size: 1.6rem;
  }

  .reader-description {
    margin-bottom: 14px;
    font-size: 0.88rem;
    line-height: 1.58;
  }

  .reader-tabs {
    gap: 10px;
    margin-bottom: 12px;
  }

  .reader-tab {
    min-height: 50px;
    padding: 0 18px;
    font-size: 0.92rem;
  }

  .story-card {
    padding: 18px 16px 92px;
    border-radius: 26px;
  }

  .story-head h3 {
    font-size: 0.94rem;
  }

  .story-head span {
    font-size: 0.8rem;
  }

  .story-divider {
    margin: 10px 0 14px;
  }

  .story-body {
    font-size: 0.82rem;
    line-height: 1.82;
  }

  .story-body p {
    margin-bottom: 14px;
  }

  .record-dock {
    bottom: 10px;
    margin-top: 14px;
  }

  .record-dock-inner {
    padding: 12px 14px 16px;
    border-radius: 24px;
  }

  .dock-button {
    width: min(100%, 320px);
    margin-top: 10px;
  }

  .reader-footer-links {
    gap: 26px;
    margin-top: 14px;
    padding-bottom: 0;
  }

  .status-screen {
    padding: 76px 0 20px;
  }

  .status-shell {
    min-height: calc(100vh - 96px);
  }

  .status-page {
    min-height: calc(100vh - 108px);
  }

  .status-title {
    margin: 96px 0 22px;
    font-size: 2.1rem;
  }

  .processing-step {
    font-size: 0.88rem;
  }

  .processing-note {
    font-size: 0.82rem;
  }

  .failure-box {
    padding: 16px 18px;
    font-size: 0.92rem;
  }

  .failure-actions {
    gap: 14px;
    margin-top: 22px;
  }

  .failure-primary,
  .failure-secondary {
    min-height: 72px;
    font-size: 1.08rem;
  }

  .status-footer-links {
    gap: 24px;
    padding-top: 20px;
    font-size: 0.9rem;
  }

  .status-spinner {
    right: 10px;
    bottom: 10px;
    width: 44px;
    height: 44px;
    border-width: 4px;
  }

  .success-screen {
    padding: 76px 0 22px;
  }

  .success-shell {
    width: calc(100% - 16px);
  }

  .success-page {
    gap: 18px;
  }

  .success-hero {
    gap: 16px;
    padding-top: 0;
  }

  .success-kicker {
    font-size: 0.88rem;
    font-weight: 900;
  }

  .success-subtitle {
    margin-top: 4px;
    font-size: 0.7rem;
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.34);
  }

  .success-title {
    font-size: 1.54rem;
    text-align: center;
    line-height: 1.18;
  }

  .success-gauge-track {
    height: 18px;
  }

  .success-gauge-thumb,
  .metric-knob {
    width: 28px;
    height: 28px;
    border-width: 4px;
  }

  .success-gauge-mark {
    height: 28px;
  }

  .success-gauge-labels {
    margin-top: 10px;
    font-size: 0.96rem;
  }

  .share-pill-button {
    min-width: 0;
    width: min(100%, 320px);
    min-height: 70px;
    font-size: 1.02rem;
  }

  .share-pill-icon {
    margin-right: 10px;
    font-size: 1.5rem;
  }

  .success-score-cluster {
    grid-template-columns: 1fr;
    gap: 18px;
    margin-top: 4px;
  }

  .success-score-orb-large {
    width: 210px;
    height: 210px;
    margin: 0 auto;
  }

  .success-score-orb strong {
    font-size: 2rem;
  }

  .success-score-orb span {
    margin-top: 6px;
    font-size: 0.88rem;
  }

  .success-score-orb small {
    font-size: 0.84rem;
  }

  .success-score-pair {
    width: 260px;
    height: 160px;
    margin: 0 auto;
  }

  .success-score-orb-blue,
  .success-score-orb-pink {
    width: 140px;
    height: 140px;
  }

  .success-score-pair .success-score-content {
    gap: 2px;
  }

  .success-score-pair .success-score-content strong {
    font-size: 2.12rem;
  }

  .success-score-pair .success-score-content small {
    color: rgba(43, 60, 71, 0.92);
    font-size: 0.76rem;
    font-weight: 700;
  }

  .success-card {
    padding: 22px 18px;
    border-radius: 24px;
  }

  .success-card h2 {
    margin-bottom: 16px;
    font-size: 1.42rem;
  }

  .metric-rail-list {
    gap: 18px;
  }

  .metric-rail-row {
    grid-template-columns: 1fr;
    gap: 8px;
    font-size: 0.96rem;
  }

  .metric-rail-row strong {
    justify-self: end;
  }

  .metric-rail {
    height: 14px;
  }

  .metric-knob {
    width: 24px;
    height: 24px;
    border-width: 3px;
  }

  .success-paragraph,
  .success-copy-block p,
  .success-rich-copy p,
  .success-notes-list li,
  .success-muted-line,
  .success-reference-line,
  .volume-row,
  .breakdown-item {
    font-size: 0.94rem;
    line-height: 1.72;
  }

  .success-age-text {
    font-size: 1.16rem;
    line-height: 1.72;
  }

  .success-age-highlight {
    font-size: 1.36em;
  }

  .success-flow-panels {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 18px;
  }

  .flow-arrow {
    justify-self: center;
    font-size: 2rem;
    transform: rotate(90deg);
  }

  .flow-panel,
  .flow-panel-wide {
    min-height: 126px;
  }

  .flow-wave {
    width: 44px;
    height: 20px;
    border-top-width: 4px;
  }

  .flow-wave-group {
    gap: 10px;
  }

  .flow-sound-word {
    font-size: 2rem;
  }

  .success-breakdown-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .histogram-card,
  .timeline-card {
    padding: 14px;
    border-radius: 20px;
  }

  .histogram-bars {
    min-height: 120px;
    gap: 4px;
  }

  .timeline-card {
    grid-template-columns: 30px minmax(0, 1fr);
    grid-template-rows: 220px auto;
    column-gap: 8px;
  }

  .timeline-ylabels {
    padding-top: 0;
    font-size: 0.8rem;
  }

  .timeline-y-top {
    top: 10px;
  }

  .timeline-y-bottom {
    top: 132px;
    left: 50%;
    margin-top: 0;
    margin-left: 0;
  }

  .timeline-svg {
    inset: 8px 0 0;
    height: calc(100% - 8px);
  }

  .timeline-polyline {
    stroke-width: 6;
  }

  .timeline-points span {
    width: 10px;
    height: 10px;
  }

  .volume-row {
    padding: 14px 0;
    align-items: flex-start;
  }

  .success-rich-copy {
    gap: 14px;
  }

  .success-data-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 12px 0;
    font-size: 0.92rem;
  }

  .success-actions {
    gap: 16px;
    padding-bottom: 0;
  }

  .success-download-button,
  .success-retry-button,
  .success-history-button {
    width: min(100%, 320px);
    min-height: 76px;
    font-size: 1.04rem;
  }

  .success-save-row {
    align-items: flex-start;
    gap: 12px;
    font-size: 0.92rem;
    line-height: 1.6;
  }

  .success-save-row input {
    width: 22px;
    height: 22px;
  }
}

/* Final visual override: playful tool UI */
:root {
  --bg: #fff7ff;
  --bg-deep: #f7e8ff;
  --text: #33263d;
  --muted: #756683;
  --muted-soft: #a394b1;
  --line: rgba(51, 38, 61, 0.12);
  --accent-blue: #87d8ff;
  --accent-pink: #ff8a72;
  --accent-blue-soft: rgba(135, 216, 255, 0.26);
  --accent-pink-soft: rgba(255, 138, 114, 0.22);
  --button-text: #2f2238;
  --card-bg: rgba(255, 255, 255, 0.96);
  --card-bg-strong: rgba(255, 250, 255, 0.98);
  --shadow: 0 12px 0 rgba(51, 38, 61, 0.08), 0 20px 38px rgba(108, 74, 143, 0.14);
}

body {
  font-family: "Nunito", "M PLUS Rounded 1c", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 214, 246, 0.88), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 240, 178, 0.88), transparent 26%),
    linear-gradient(180deg, #fff9ff 0%, #f6ebff 58%, #fff5f2 100%);
}

body::before {
  background:
    radial-gradient(circle at 12px 12px, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px),
    linear-gradient(rgba(168, 136, 200, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 136, 200, 0.08) 1px, transparent 1px);
  background-size: 24px 24px, 24px 24px, 24px 24px;
  opacity: 0.72;
}

body::after {
  display: none;
}

.floating-brand,
.floating-brand-text,
.home-title,
.reader-title,
.privacy-title,
.status-title,
.success-kicker,
.success-title,
.history-result-title,
.history-modal-title,
.success-card h2,
.privacy-block h3,
.share-pill-button,
.hero-primary,
.hero-secondary,
.primary-button,
.secondary-button,
.success-download-button,
.success-retry-button,
.success-history-button,
.history-delete-button {
  font-family: "M PLUS Rounded 1c", "Nunito", sans-serif;
}

.floating-brand {
  gap: 12px;
  color: #6e5c80;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: none;
}

.floating-brand-icon {
  width: 24px;
  height: 16px;
}

.floating-brand-icon span {
  width: 16px;
  height: 16px;
  box-shadow: 0 3px 0 rgba(51, 38, 61, 0.12);
}

.floating-brand-text {
  font-size: 0.96rem;
}

.language-wrap::after {
  right: 18px;
  border-right-color: #6d577f;
  border-bottom-color: #6d577f;
}

.language-select {
  min-width: 142px;
  height: 40px;
  border: 2px solid rgba(58, 42, 72, 0.22);
  border-radius: 14px;
  background: #fff;
  color: #5f4b72;
  font-weight: 900;
  box-shadow: 0 5px 0 rgba(75, 55, 91, 0.1);
}

.home-title,
.reader-title,
.privacy-title,
.status-title,
.success-title,
.history-result-title {
  font-weight: 800;
  letter-spacing: -0.02em;
  text-transform: none;
}

.home-title {
  line-height: 1.04;
}

.home-subtitle,
.home-tagline,
.history-result-eyebrow,
.success-subtitle,
.success-kicker {
  letter-spacing: 0.04em;
}

.app-card,
.recorder-card,
.result-card,
.section-card,
.success-card,
.history-item,
.history-modal-card,
.privacy-block,
.story-card,
.record-dock-inner,
.failure-box,
.history-detail-card,
.timeline-card,
.metric-card,
.insight-card,
.visualizer-card,
.script-card,
.success-score-orb-large {
  border: 2px solid rgba(54, 36, 69, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--text);
  box-shadow: var(--shadow);
}

.privacy-intro,
.privacy-copy p,
.privacy-copy li,
.privacy-meta,
.reader-description,
.history-description,
.success-paragraph,
.success-copy-block p,
.success-notes-list li,
.success-muted-line,
.success-reference-line,
.history-detail-copy,
.history-age-line,
.processing-note,
.failure-box,
.home-description,
.home-notes,
.reader-footer-links a,
.footer-links a,
.status-footer-links a,
.about-link {
  color: #786889;
}

.privacy-block {
  padding: 24px 26px;
}

.privacy-block h3::before {
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, #a668ff, #ff8a72);
}

.hero-primary,
.primary-button,
.success-retry-button,
.success-history-button,
.history-modal-confirm,
.dock-button.is-stop {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff937c 0%, #ff7f66 100%);
  color: #2f2238;
  box-shadow: 0 4px 0 #2f2238;
  font-weight: 900;
}

.hero-secondary,
.secondary-button,
.success-download-button,
.failure-secondary,
.history-pill-button,
.history-delete-button,
.history-modal-cancel {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffe470 0%, #ffd54f 100%);
  color: #2f2238;
  box-shadow: 0 4px 0 #2f2238;
  font-weight: 900;
}

.history-pill-button-pink,
.history-delete-single {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: #fff;
  color: #ff7f66;
  box-shadow: 0 4px 0 rgba(47, 34, 56, 0.12);
}

.hero-primary:hover,
.hero-secondary:hover,
.primary-button:hover,
.secondary-button:hover,
.success-download-button:hover,
.success-retry-button:hover,
.success-history-button:hover,
.history-delete-button:hover {
  transform: translateY(1px);
  box-shadow: 0 2px 0 #2f2238;
}

.disclaimer-box {
  border: 2px solid rgba(166, 104, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  color: #8a789a;
}

.home-notes li::before {
  border: 2px solid #a668ff;
  background: #fff;
}

.hero-orb {
  filter: drop-shadow(0 16px 18px rgba(177, 131, 221, 0.18));
}

.orb {
  border: 2px solid rgba(51, 38, 61, 0.08);
  opacity: 0.96;
}

.orb-left {
  background: radial-gradient(circle at 30% 30%, #c2efff 0%, #88d9ff 58%, #79c0ff 100%);
}

.orb-right {
  background: radial-gradient(circle at 30% 30%, #ffe9b1 0%, #ffc39f 58%, #ff8a72 100%);
}

.reader-tab {
  border: 2px solid rgba(47, 34, 56, 0.14);
  border-radius: 18px;
  background: #fff;
  color: #7b6c8c;
  box-shadow: 0 4px 0 rgba(47, 34, 56, 0.08);
  font-weight: 800;
}

.reader-tab.is-active {
  border-color: #2f2238;
  background: linear-gradient(180deg, #c884ff 0%, #a668ff 100%);
  color: #fff;
  box-shadow: 0 4px 0 #2f2238;
}

.story-card {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 244, 255, 0.96), rgba(255, 255, 255, 0.98));
}

.record-dock-inner {
  background: linear-gradient(180deg, #fff 0%, #fff7ff 100%);
}

.record-meter-text,
.record-meter-text.is-recording {
  color: #826f93;
  font-weight: 800;
}

.record-meter-text.is-recording::before {
  background: #ff7f66;
  box-shadow: 0 0 0 8px rgba(255, 127, 102, 0.12);
}

.history-item-badge {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: linear-gradient(180deg, #8edcff 0%, #75d0ff 100%);
  color: #2f2238;
  box-shadow: 0 4px 0 rgba(47, 34, 56, 0.16);
}

.history-audio-player {
  border: 2px solid rgba(47, 34, 56, 0.1);
  border-radius: 28px;
  background: #fff;
}

.history-audio-time,
.history-audio-play,
.history-audio-icon,
.history-audio-icon svg,
.history-audio-menu-icon svg {
  color: #2f2238;
}

.history-audio-progress-fill,
.history-audio-progress-thumb {
  background: #2f2238;
}

.history-audio-menu,
.history-speed-menu {
  border: 2px solid rgba(47, 34, 56, 0.12);
  border-radius: 20px;
  box-shadow: 0 18px 34px rgba(80, 51, 102, 0.2);
  overflow: hidden;
}

.history-audio-menu-item,
.history-speed-option {
  font-family: "Nunito", "M PLUS Rounded 1c", sans-serif;
  font-weight: 800;
}

.history-audio-menu-item:hover,
.history-speed-option:hover,
.history-speed-option.is-active {
  background: #f6ebff;
}

.success-gauge-track,
.metric-rail,
.history-mini-gauge-track,
.history-mini-rail {
  border: 2px solid rgba(47, 34, 56, 0.08);
  border-radius: 999px;
  background: linear-gradient(90deg, #86d7ff 0%, #dcc2ff 48%, #ff9b7d 100%);
}

.success-gauge-thumb,
.metric-knob,
.history-mini-gauge-thumb,
.history-mini-rail i {
  border: 3px solid #2f2238;
  background: #fffdf8;
  box-shadow: 0 4px 0 rgba(47, 34, 56, 0.14);
}

.success-score-orb-blue,
.history-score-bubble-blue {
  background: linear-gradient(180deg, #9be2ff 0%, #83d8ff 100%);
  border: 2px solid rgba(47, 34, 56, 0.12);
  box-shadow: 0 10px 24px rgba(120, 84, 157, 0.14);
}

.success-score-orb-pink,
.history-score-bubble-pink {
  background: linear-gradient(180deg, #ffb6a8 0%, #ff8a72 100%);
  border: 2px solid rgba(47, 34, 56, 0.12);
  box-shadow: 0 10px 24px rgba(120, 84, 157, 0.14);
}

.share-pill-button {
  border: 2px solid #2f2238;
  border-radius: 999px;
  background: linear-gradient(180deg, #b07dff 0%, #9f61ff 100%);
  color: #fff;
  box-shadow: 0 4px 0 #2f2238;
}

.footer-links a,
.reader-footer-links a,
.privacy-footer-links a,
.history-footer-links a,
.status-footer-links a,
.about-link {
  color: #7b6c8c;
  font-weight: 800;
  text-decoration-thickness: 2px;
}

.reader-footer-links a.is-active,
.privacy-footer-links a.is-active {
  color: #2f2238;
}

/* Absolute final overrides: keep light theme readable on result/history detail sections */
.flow-panel,
.flow-panel-wide {
  position: relative !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #fffdfd 0%, #f8f0fc 100%) !important;
  border: 2px solid rgba(76, 58, 95, 0.12) !important;
  box-shadow:
    0 12px 26px rgba(122, 97, 150, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.72) !important;
}

.flow-panel::before,
.flow-panel-wide::before {
  content: "" !important;
  position: absolute !important;
  inset: 16px !important;
  border-radius: 22px !important;
  background:
    radial-gradient(circle at 20% 18%, rgba(255, 189, 210, 0.28), transparent 36%),
    radial-gradient(circle at 78% 82%, rgba(143, 216, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(247, 239, 252, 0.42)) !important;
  opacity: 0.95 !important;
  pointer-events: none !important;
}

.flow-panel > *,
.flow-panel-wide > * {
  position: relative !important;
  z-index: 1 !important;
}

.flow-arrow {
  color: rgba(87, 67, 109, 0.46) !important;
}

.flow-panel strong,
.flow-panel span,
.flow-sound-word,
.success-flow-panels strong,
.success-flow-panels span {
  color: #433255 !important;
}

.flow-wave-pink {
  color: #f09bb2 !important;
}

.flow-wave-blue {
  color: #86cfff !important;
}

.success-copy-block p,
.success-copy-muted,
.success-rich-copy,
.success-rich-copy p,
.success-rich-copy li,
.success-numeric-copy,
.success-numeric-copy p,
.success-numeric-copy li,
.success-data-row,
.success-notes-list li,
.volume-row span,
.success-age-text {
  color: #5b4a70 !important;
}

.success-copy-block strong,
.success-keyword,
.success-keyword-soft,
.success-rich-copy strong,
.success-rich-copy b,
.success-rich-copy .success-keyword,
.success-rich-copy .success-keyword-soft,
.success-numeric-copy strong,
.success-numeric-copy b,
.success-data-row strong,
.success-age-highlight,
.success-details-panel summary,
.success-details-panel[open] summary {
  color: #5b3f76 !important;
}

.success-details-panel summary::after {
  color: rgba(91, 63, 118, 0.72) !important;
}

.success-details-panel,
.success-card {
  box-shadow:
    0 10px 0 rgba(74, 56, 96, 0.05),
    0 14px 26px rgba(122, 97, 150, 0.08) !important;
}

.histogram-card,
.timeline-card {
  background: linear-gradient(180deg, #fffefe 0%, #f7eefc 100%) !important;
}

.histogram-stage {
  border-radius: 20px !important;
  background: linear-gradient(180deg, #eadcf6 0%, #e6d7f4 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.40) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 10px 22px rgba(111, 89, 140, 0.08) !important;
}

.histogram-bars span {
  background: linear-gradient(180deg, #8b7aff 0%, #6d5cff 100%) !important;
  box-shadow: 0 3px 0 rgba(255, 255, 255, 0.12) !important;
}

.histogram-labels span {
  color: #6e5a84 !important;
}

.timeline-card {
  background: linear-gradient(180deg, #fffefe 0%, #f8f0fc 100%) !important;
}

.timeline-plot {
  border-radius: 20px !important;
  background: linear-gradient(180deg, #eadcf6 0%, #e6d7f4 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.40) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.54),
    0 10px 22px rgba(111, 89, 140, 0.08) !important;
}

.timeline-plot::before {
  content: "" !important;
  position: absolute !important;
  inset: 18px !important;
  border-radius: 26px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)) !important;
  pointer-events: none !important;
}

.timeline-line {
  background: rgba(116, 95, 142, 0.24) !important;
}

.timeline-ylabels {
  color: #604d76 !important;
}

.timeline-y-top {
  color: #ff7f9f !important;
}

.timeline-y-bottom {
  color: #55b2f7 !important;
}

.timeline-xlabels span {
  color: #6e5a84 !important;
}

.timeline-polyline {
  stroke: #6f61ff !important;
  stroke-width: 10 !important;
}

.timeline-point {
  fill: #ff876d !important;
}

.timeline-point-muted {
  fill: #c3b7d1 !important;
}

.success-metric-circle,
.history-score-orb,
.history-score-bubble,
.history-score-bubble-blue,
.history-score-bubble-pink {
  box-shadow:
    inset 0 0 0 2px rgba(74, 56, 96, 0.08),
    0 12px 24px rgba(122, 97, 150, 0.10) !important;
}

.success-metric-circle {
  background: radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.72), rgba(242, 233, 248, 0.72)) !important;
}
