body.ws-story-read-dark {
  color-scheme: dark;
  background: #0f1419;
  color: #e8edf2;
}

body.ws-story-read-dark .site-header {
  background: #0f1419;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.ws-story-read-dark header a:link,
body.ws-story-read-dark header a:visited {
  color: #e8edf2;
}

body.ws-story-read-dark .site-header__nav a:link,
body.ws-story-read-dark .site-header__nav a:visited {
  color: #e8edf2;
}

body.ws-story-read-dark .site-header__nav a:hover {
  color: #ef017f;
}

body.ws-story-read-dark .site-header__nav .site-header__credits,
body.ws-story-read-dark .site-header__nav .site-header__credits:link,
body.ws-story-read-dark .site-header__nav .site-header__credits:visited {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
  color: #cbd5e1;
}

body.ws-story-read-dark .site-header__nav .site-header__credits:hover {
  border-color: rgba(239, 1, 127, 0.45);
  color: #ef017f;
}

body.ws-story-read-dark .site-header__credits strong {
  color: #fff;
}

body.ws-story-read-dark .site-header__nav .site-header__credits:hover strong {
  color: #ef017f;
}

body.ws-story-read-dark .site-header__credits span {
  color: #94a3b8;
}

body.ws-story-read-dark .header__mobile-toggle {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

body.ws-story-read-dark .header__mobile-toggle i {
  color: #fff;
}

body.ws-story-read-dark .site-footer {
  margin-top: 0;
}

body.story-read-page:not(.ws-story-read-dark) {
  background: #ffffff;
}

.story-read {
  --story-read-bg: #ffffff;
  --story-read-panel: #ffffff;
  --story-read-border: #e2e8f0;
  --story-read-text: #0f172a;
  --story-read-muted: #64748b;
  --story-read-accent: #ec008c;
  --story-read-link: #0077c8;
  --story-read-heading: #111827;
  --story-read-btn-bg: #ffffff;
  --story-read-btn-border: #d7ecfb;
  --story-read-btn-text: #0077c8;
  --story-read-btn-hover-bg: #eef8ff;
  --story-read-font-size: 18px;
  padding: 100px 0 80px;
  background: var(--story-read-bg);
  color: var(--story-read-text);
  min-height: calc(100vh - 120px);
}

body.ws-story-read-dark .story-read {
  --story-read-bg: #0f1419;
  --story-read-panel: #151b24;
  --story-read-border: rgba(255, 255, 255, 0.1);
  --story-read-text: #e8edf2;
  --story-read-muted: #9aa8b8;
  --story-read-accent: #ef017f;
  --story-read-link: #6ec8ff;
  --story-read-heading: #ffffff;
  --story-read-btn-bg: rgba(255, 255, 255, 0.04);
  --story-read-btn-border: rgba(255, 255, 255, 0.14);
  --story-read-btn-text: #ffffff;
  --story-read-btn-hover-bg: rgba(255, 255, 255, 0.08);
}

.story-read__header {
  margin-bottom: 32px;
}

.story-read__tag {
  color: var(--story-read-accent);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  margin: 0 0 12px;
  letter-spacing: 1px;
}

.story-read__header h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(52px, 8vw, 92px);
  font-weight: 700;
  line-height: 0.95;
  color: var(--story-read-heading);
  margin: 0;
}

.story-read__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 18px 0 0;
  color: var(--story-read-muted);
  font-size: 15px;
}

.story-read__meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.story-read__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 28px;
  padding: 18px 20px;
  border: 1px solid var(--story-read-border);
  border-radius: 18px;
  background: var(--story-read-panel);
}

.story-read__toolbar-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.story-read__theme {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.story-read__toolbar-label {
  color: var(--story-read-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.story-read__font-controls,
.story-read__downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.story-read__downloads form {
  margin: 0;
}

.story-read__font-btn,
.story-read__download-btn {
  align-items: center;
  background: var(--story-read-btn-bg);
  border: 1px solid var(--story-read-btn-border);
  border-radius: 999px;
  color: var(--story-read-btn-text);
  cursor: pointer;
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 8px;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.story-read__font-btn:hover,
.story-read__download-btn:hover {
  background: var(--story-read-btn-hover-bg);
  border-color: rgba(236, 0, 140, 0.35);
  color: var(--story-read-accent);
  transform: translateY(-1px);
}

body.ws-story-read-dark .story-read__font-btn:hover,
body.ws-story-read-dark .story-read__download-btn:hover {
  border-color: rgba(239, 1, 127, 0.45);
  color: #fff;
}

.story-read__font-btn.is-active,
.story-read__font-btn--theme.is-active {
  background: var(--story-read-btn-hover-bg);
  border-color: rgba(236, 0, 140, 0.35);
  color: var(--story-read-accent);
}

body.ws-story-read-dark .story-read__font-btn.is-active,
body.ws-story-read-dark .story-read__font-btn--theme.is-active {
  border-color: rgba(239, 1, 127, 0.45);
  color: #fff;
}

.story-read__download-btn--regenerate {
  background: rgba(236, 0, 140, 0.08);
  border-color: rgba(236, 0, 140, 0.25);
}

body.ws-story-read-dark .story-read__download-btn--regenerate {
  background: rgba(239, 1, 127, 0.12);
  border-color: rgba(239, 1, 127, 0.35);
}

.story-read__download-btn.is-disabled,
.story-read__font-btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.story-read__panel {
  border: 1px solid var(--story-read-border);
  border-radius: 24px;
  background: var(--story-read-panel);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
  padding: clamp(24px, 4vw, 42px);
}

body.ws-story-read-dark .story-read__panel {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.story-read__reader {
  --story-read-font-size: 18px;
}

.story-read__body {
  color: var(--story-read-text);
  font-size: var(--story-read-font-size);
  line-height: 1.8;
  transition: font-size 0.18s ease;
}

.story-read__body p {
  margin-bottom: 1.2rem;
}

.story-read__body p:last-child {
  margin-bottom: 0;
}

.story-read__body .ws-story-chapter-title {
  color: var(--story-read-heading);
  font-family: "Bebas Neue", sans-serif;
  font-size: 1.45em;
  letter-spacing: 0.4px;
  line-height: 1.15;
  margin: 2rem 0 1rem;
}

.story-read__body .ws-story-chapter-title:first-child {
  margin-top: 0;
}

.story-read__body strong {
  color: var(--story-read-heading);
}

.story-read__body a:link,
.story-read__body a:visited {
  color: var(--story-read-link);
  text-decoration: underline;
}

.story-read__body a:hover {
  color: var(--story-read-accent);
}

.story-read__body .ws-story-illustration {
  margin: 1.8rem 0;
  text-align: center;
}

.story-read__body .ws-story-illustration img {
  border-radius: 18px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  height: auto;
  max-width: 100%;
}

body.ws-story-read-dark .story-read__body .ws-story-illustration img {
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.story-read__back {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--story-read-border);
}

.story-read__back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--story-read-muted);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.story-read__back a:hover {
  color: var(--story-read-accent);
}

@media (max-width: 767px) {
  .story-read {
    padding: 88px 0 64px;
  }

  .story-read__toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .story-read__toolbar-group,
  .story-read__theme {
    width: 100%;
  }

  .story-read__font-btn--theme [data-theme-label] {
    display: none;
  }
}