.story-quota {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  border-left: 3px solid var(--accent);
}

.story-quota > div {
  display: grid;
  gap: 0.25rem;
}

.story-quota__eyebrow,
.story-quota__detail {
  color: var(--gray);
  font-size: 0.82rem;
}

.story-quota__eyebrow {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.story-quota__badge {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* ARA Stories — studio + reader */

.story-studio-body {
  background: var(--black);
}

.story-studio {
  --studio-header-h: 64px;
  --studio-sidebar-w: 240px;
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--studio-sidebar-w) 1fr;
  grid-template-rows: var(--studio-header-h) 1fr;
  grid-template-areas:
    "header header"
    "sidebar main";
  transition: grid-template-columns 0.28s ease;
}

.story-studio--sidebar-closed {
  grid-template-columns: 0 1fr;
}

.story-studio__header {
  grid-area: header;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 1.25rem;
  height: var(--studio-header-h);
  background: var(--overlay-strong);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
}

.story-studio__header-start {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.story-studio__header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.story-studio__user-name {
  font-size: 0.82rem;
  color: var(--gray);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-studio__menu-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: var(--hover-bg);
  color: var(--white);
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  flex-shrink: 0;
}

.story-studio__menu-btn span {
  display: block;
  width: 14px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.25s, opacity 0.25s;
}

.story-studio--sidebar-closed .story-studio__menu-btn span:nth-child(1) {
  transform: translateY(5.5px) rotate(45deg);
}

.story-studio--sidebar-closed .story-studio__menu-btn span:nth-child(2) {
  opacity: 0;
}

.story-studio--sidebar-closed .story-studio__menu-btn span:nth-child(3) {
  transform: translateY(-5.5px) rotate(-45deg);
}

.story-studio__menu-btn:hover {
  border-color: var(--gray-dim);
  background: var(--hover-bg-strong);
}

.story-studio__sidebar {
  grid-area: sidebar;
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem;
  overflow: hidden auto;
  background: var(--graphite);
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.story-studio--sidebar-closed .story-studio__sidebar {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-100%);
}

.story-studio__backdrop {
  display: none;
}

.story-studio__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--white);
  min-width: 0;
}

.story-studio__brand span {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.story-studio__brand img {
  height: 36px;
  width: auto;
  flex-shrink: 0;
}

.story-studio__nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.studio-nav-group {
  margin: 0.15rem 0;
}

.studio-nav-group__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  color: var(--gray);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  user-select: none;
}

.studio-nav-group__summary::-webkit-details-marker {
  display: none;
}

.studio-nav-group__summary::after {
  content: '';
  width: 0.4rem;
  height: 0.4rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.7;
  transition: transform 0.15s ease;
}

.studio-nav-group[open] > .studio-nav-group__summary::after {
  transform: rotate(-135deg);
  margin-top: 0.2rem;
}

.studio-nav-group__summary:hover,
.studio-nav-group__summary.is-current {
  color: var(--white);
  background: var(--hover-bg);
}

.studio-nav-group__links {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin: 0.15rem 0 0.35rem 0.75rem;
  padding-left: 0.5rem;
  border-left: 1px solid var(--border);
}

.story-studio__nav a {
  color: var(--gray);
  text-decoration: none;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.story-studio__nav a:hover,
.story-studio__nav a.active {
  color: var(--white);
  background: var(--hover-bg);
}

.story-studio__main {
  grid-area: main;
  padding: 1.5rem;
  min-width: 0;
}

.story-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.story-page-header h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  margin-bottom: 0.35rem;
}

.story-page-header p {
  color: var(--gray);
}

.story-empty {
  text-align: center;
  padding: 3rem 2rem;
}

.story-empty h2 {
  font-family: var(--font-serif);
  margin-bottom: 0.75rem;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.story-grid--public {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* Studio list (admin / autor) — horizontal Wattpad-style grid */
.story-list--studio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.story-studio--sidebar-closed .story-list--studio {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.story-section {
  margin-bottom: 1.75rem;
}

.story-section__summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  list-style: none;
  margin-bottom: 1rem;
  padding: 0.35rem 0;
  user-select: none;
}

.story-section__summary::-webkit-details-marker {
  display: none;
}

.story-section__summary::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid var(--gray);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.story-section[open] > .story-section__summary::before {
  transform: rotate(90deg);
}

.story-section__title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--white);
}

.story-section__count {
  font-size: 0.72rem;
  color: var(--gray);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.story-section__empty {
  color: var(--gray);
  font-size: 0.88rem;
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
}

.story-card--studio {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 132px;
  padding: 0;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, transform 0.2s;
}

.story-card--studio:hover {
  border-color: var(--gray-dim);
  transform: translateY(-1px);
}

.story-card--studio .story-card__cover {
  width: 72px;
  min-width: 72px;
  min-height: 132px;
  aspect-ratio: auto;
  height: auto;
  align-self: stretch;
  border: none;
  border-right: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
  background: var(--surface-subtle);
}

.story-card--studio .story-card__cover img {
  width: 100%;
  height: 100%;
  min-height: 132px;
  object-fit: cover;
}

.story-card--studio .story-card__cover span {
  font-size: 1.75rem;
}

.story-card--studio .story-card__body {
  flex: 1;
  min-width: 0;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.story-card--studio .story-card__title {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.3;
  margin: 0;
  color: var(--white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card--studio .story-card__author {
  font-size: 0.65rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-card--studio .story-card__synopsis {
  flex: 1;
  margin: 0.1rem 0 0;
  color: var(--gray-dim);
  font-size: 0.78rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.story-card--studio .story-card__footer {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.35rem;
  font-size: 0.68rem;
  color: var(--gray);
  flex-wrap: wrap;
}

.story-card--studio .story-card__stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.story-card--studio .story-card__stat svg {
  opacity: 0.7;
}

.story-card--studio .story-card__dot {
  opacity: 0.5;
}

.story-card--studio .story-card__status--published {
  color: var(--success-text);
}

.story-card--studio .story-card__status--inactive {
  color: var(--error-text);
}

/* Public catalog cards */
.story-card {
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 1.15rem;
  align-items: start;
}

.story-card--link {
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
  padding: 1rem;
}

.story-card--link:hover {
  transform: translateY(-2px);
}

.story-card.admin-card:not(.story-card--studio) {
  padding: 1rem;
}

.story-card__cover {
  aspect-ratio: 2 / 3;
  width: 124px;
  border: 1px solid var(--border);
  border-radius: 2px 8px 8px 2px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface-subtle);
  box-shadow: 4px 10px 24px var(--shadow-sm);
  flex-shrink: 0;
}

.story-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-card__cover span {
  font-family: var(--font-serif);
  font-size: 2rem;
}

.story-card__body h2 {
  font-size: 1.1rem;
  margin: 0.35rem 0;
}

.story-card__author {
  font-size: 0.78rem;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0.25rem 0 0;
}

.story-card__body p {
  color: var(--gray);
  font-size: 0.88rem;
  margin: 0.25rem 0;
}

.story-card__synopsis {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
  font-size: 0.84rem;
  max-height: 2.9em;
}

.story-card__meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.75rem;
  color: var(--gray);
  margin: 0.5rem 0 0.75rem;
}

.story-badge {
  display: inline-block;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.story-badge--draft { color: var(--gray); }
.story-badge--published { color: var(--success-text); border-color: var(--alert-success-border); }
.story-badge--inactive { color: var(--error-text); border-color: var(--alert-error-border); }

.story-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-hint {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--gray);
}

.genre-description {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--gray-dim);
  font-size: 0.8rem;
  line-height: 1.55;
}

.story-editor__schedule {
  min-width: 190px;
  font-size: 0.78rem;
}

.story-genre-picker {
  margin-bottom: 1rem;
}

.story-genre-picker__toggle {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--white);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.story-genre-picker__toggle:hover {
  border-color: var(--gray-dim);
  background: var(--hover-bg);
}

.story-genre-picker__toggle-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
}

.story-genre-picker__toggle-hint {
  font-size: 0.86rem;
  color: var(--white);
}

.story-genre-picker__panel {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.75rem;
}

.story-genre-step label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
}

.story-media-fields {
  display: grid;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

.story-media-fields__item label {
  display: block;
  margin-bottom: 0.5rem;
}

.story-media-fields__preview {
  display: grid;
  place-items: center;
  border: 1px dashed var(--border);
  background: var(--surface-subtle);
  color: var(--gray);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

.story-media-fields__preview--cover {
  width: 88px;
  aspect-ratio: 2 / 3;
}

.story-media-fields__preview--banner {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 1;
}

.story-media-fields__current {
  display: block;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 0.65rem;
}

.story-media-fields__current--cover {
  width: 88px;
  aspect-ratio: 2 / 3;
}

.story-media-fields__current--banner {
  width: 100%;
  max-width: 280px;
  aspect-ratio: 3 / 1;
}

.story-reader__banner {
  position: relative;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  margin-top: calc(var(--nav-h) * -1);
  padding-top: var(--nav-h);
  min-height: calc(min(36vh, 320px) + var(--nav-h));
}

.story-reader:has(.story-reader__banner) {
  padding-top: 0;
}

.story-reader__banner-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
}

.story-reader__banner-content {
  position: relative;
  z-index: 1;
  padding: 2rem 1.5rem 2.5rem;
  color: var(--hero-text);
}

.story-reader__banner .story-reader__back,
.story-reader__banner .story-reader__author {
  color: var(--hero-text-muted);
}

.story-reader__banner .story-reader__back:hover {
  color: var(--hero-text);
}

.story-reader__banner-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.75rem);
  margin: 0.5rem 0 0.25rem;
  color: var(--hero-text);
}

.story-reader__header--with-banner {
  padding-top: 2rem;
}

.story-reader__kicker--episode {
  margin-top: 0;
}

.story-reader__episode-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 0.35rem;
}

.story-workspace {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.story-workspace__tree {
  position: sticky;
  top: 1rem;
  max-height: calc(100vh - 2rem);
  overflow: auto;
}

.story-workspace__story-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.story-workspace__cover {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.story-workspace__settings {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin-bottom: 1rem;
}

.story-season {
  margin-bottom: 1rem;
}

.story-season__head span {
  color: var(--gray);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.story-episode-list {
  list-style: none;
  margin: 0.5rem 0;
  padding: 0;
}

.story-episode-list li a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 0.5rem;
  padding: 0.55rem 0.65rem;
  border-radius: 6px;
  text-decoration: none;
  color: var(--gray);
  font-size: 0.85rem;
}

.story-episode-list li.is-active a,
.story-episode-list li a:hover {
  background: var(--hover-bg);
  color: var(--white);
}

.story-episode-list li a strong {
  grid-column: 2;
}

.story-episode-list li a em {
  grid-column: 2;
  font-style: normal;
  justify-self: start;
}

.story-add-btn,
.story-workspace__new-season {
  margin-top: 0.5rem;
}

.story-workspace__new-season {
  display: grid;
  gap: 0.5rem;
}

.story-editor__toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.story-editor__title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
}

.story-editor__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.story-editor__status {
  width: auto;
  min-width: 140px;
}

.story-editor__delete {
  margin-top: 1rem;
}

.story-preview-modal {
  position: fixed;
  inset: 0;
  background: var(--modal-backdrop);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.story-preview-modal[hidden] {
  display: none !important;
}

.story-preview-modal__dialog {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--graphite);
  border: 1px solid var(--border);
}

.story-preview-modal__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.story-preview-modal__head button {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
}

.note-editor.note-frame {
  border-color: var(--border) !important;
}

.note-toolbar {
  background: var(--editor-toolbar-bg) !important;
  border-color: var(--border) !important;
}

.note-editing-area,
.note-editable {
  background: var(--editor-bg) !important;
  color: var(--white) !important;
}

.note-btn {
  background: var(--graphite) !important;
  border-color: var(--border) !important;
  color: var(--gray) !important;
}

.note-dropdown-menu {
  background: var(--graphite) !important;
  border-color: var(--border) !important;
}

.note-dropdown-menu > li > a {
  color: var(--white) !important;
}

/* Public reader */
.story-reader {
  color: var(--white);
}

.page-historys-hero .nav:not(.scrolled) .nav__logo span,
.page-historys-hero .nav:not(.scrolled) .nav__links a,
.page-historys-hero .nav:not(.scrolled) .nav__access {
  color: rgba(255, 255, 255, 0.92);
}

.page-historys-hero .nav:not(.scrolled) .nav__links a:hover,
.page-historys-hero .nav:not(.scrolled) .nav__links a.active {
  color: #ffffff;
}

.page-historys-hero .nav:not(.scrolled) .nav__links a::after {
  background: #ffffff;
}

.page-historys-hero .nav:not(.scrolled) .nav__toggle span {
  background: #ffffff;
}

.page-historys-hero .nav:not(.scrolled) .theme-toggle {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.page-historys-hero .nav:not(.scrolled) .theme-toggle:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.42);
}

.page-historys-hero .nav:not(.scrolled) .nav__logo img {
  background: rgba(255, 255, 255, 0.96);
}

.historys-landing__hero {
  position: relative;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: calc(var(--nav-h) * -1);
  padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem;
}

.historys-landing__hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  transform: scale(1.03);
}

.historys-landing__hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
}

.historys-landing__hero-content {
  position: relative;
  z-index: 1;
  max-width: 760px;
  text-align: center;
}

.historys-landing__hero .section-label {
  color: var(--hero-text-muted);
}

.historys-landing__hero .btn--primary {
  background: #ffffff;
  color: #141414;
  border-color: #ffffff;
}

.historys-landing__hero .btn--primary:hover {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.historys-landing__title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.08;
  margin: 0.75rem 0 1rem;
  color: var(--hero-text);
}

.historys-landing__lead {
  font-size: clamp(1rem, 2.2vw, 1.15rem);
  line-height: 1.7;
  color: var(--hero-text-muted);
  max-width: 620px;
  margin: 0 auto 2rem;
}

.historys-landing__catalog {
  padding: 4rem 0 var(--section-pad);
}

.historys-landing__catalog-head {
  margin-bottom: 2.5rem;
}

.historys-landing__grid {
  gap: 2.25rem;
}

.historys-book-card {
  text-decoration: none;
  color: inherit;
  display: block;
}

.historys-book-card__placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--graphite), var(--black));
  font-family: var(--font-serif);
  font-size: 3rem;
  color: var(--gray);
}

.historys-book-card__genre {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
}

.historys-landing__empty {
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  color: var(--gray);
}

/* Story profile (Wattpad-style) */
.story-profile {
  color: var(--white);
}

.story-profile:not(.story-profile--has-banner) {
  padding-top: var(--nav-h);
}

.story-profile--has-banner {
  --profile-banner-h: clamp(280px, 40vh, 400px);
  position: relative;
  padding-top: var(--nav-h);
}

.story-profile__masthead {
  position: relative;
  height: 0;
}

.story-profile--has-banner .story-profile__masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--profile-banner-h) + var(--nav-h));
  pointer-events: none;
}

.story-profile__banner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 20%;
  z-index: 0;
}

.story-profile__banner-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
}

.story-profile__layout {
  position: relative;
  z-index: 1;
}

.story-profile__hero {
  position: relative;
  padding: 1.25rem 0 1rem;
}

.story-profile--has-banner .story-profile__hero {
  min-height: var(--profile-banner-h);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 0;
  padding-bottom: 1.25rem;
}

.story-profile--has-banner .story-profile__hero-grid {
  align-items: end;
}

.story-profile__cover {
  position: relative;
  z-index: 3;
}

.story-profile--has-banner .story-profile__back,
.story-profile--has-banner .story-profile__title,
.story-profile--has-banner .story-profile__author,
.story-profile--has-banner .story-profile__stats {
  color: var(--hero-text);
}

.story-profile--has-banner .story-profile__author,
.story-profile--has-banner .story-profile__stats {
  color: var(--hero-text-muted);
}

.story-profile--has-banner .story-profile__back:hover {
  color: #ffffff;
}

.story-profile--has-banner .btn--primary {
  background: #ffffff;
  color: #141414;
  border-color: #ffffff;
}

.story-profile--has-banner .btn--primary:hover {
  background: transparent;
  color: #ffffff;
  border-color: #ffffff;
}

.story-profile__back {
  display: inline-block;
  color: var(--gray);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}

.story-profile__back:hover {
  color: var(--white);
}

.story-profile__hero-grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  align-items: start;
}

.story-profile__cover img,
.story-profile__cover-placeholder {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 8px 16px 40px var(--shadow-md);
}

.story-profile--has-banner .story-profile__cover img,
.story-profile--has-banner .story-profile__cover-placeholder {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}

.story-profile__cover-placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 3rem;
  background: var(--graphite);
  color: var(--gray);
}

.story-profile__title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
  margin: 0 0 0.5rem;
  color: var(--white);
}

.story-profile__author {
  color: var(--gray);
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.story-profile__author a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.story-profile__author a:hover {
  color: var(--white);
}

.story-profile--has-banner .story-profile__author a:hover {
  color: var(--hero-text);
}

.story-profile__isbn {
  color: var(--gray);
  margin: 0 0 1.25rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.story-profile--has-banner .story-profile__isbn {
  color: var(--hero-text-muted);
}

.story-profile__cta {
  margin-bottom: 1rem;
}

.story-engagement {
  margin: 0 0 1.25rem;
  max-width: 420px;
}

.story-engagement__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
}

.story-engagement__stat,
.story-engagement__like {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--gray-dim);
}

.story-engagement__like {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  color: var(--gray-dim);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.story-engagement__like:hover {
  color: var(--white);
  border-color: var(--gray-dim);
}

.story-engagement__like.is-liked {
  color: var(--white);
  border-color: var(--white);
  background: var(--hover-bg);
}

.story-engagement__like.is-liked .story-engagement__icon {
  filter: none;
}

.story-engagement__label {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  opacity: 0.85;
}

.story-engagement__help-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.story-engagement__help {
  font-size: 0.72rem;
  color: var(--gray);
  text-decoration: underline;
  text-underline-offset: 0.15em;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.story-engagement__help:hover {
  color: var(--white);
}

.story-engagement__policy {
  position: absolute;
  left: 0;
  top: calc(100% + 0.65rem);
  bottom: auto;
  width: min(340px, 78vw);
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  background: var(--graphite);
  box-shadow: 0 12px 36px var(--shadow-md);
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--gray-dim);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  pointer-events: none;
}

.story-engagement__help-wrap.is-open .story-engagement__policy,
.story-engagement__help-wrap:hover .story-engagement__policy {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@media (hover: none), (pointer: coarse) {
  .story-engagement__help-wrap:hover .story-engagement__policy {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
  }

  .story-engagement__help-wrap.is-open .story-engagement__policy {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.story-engagement__policy p {
  margin: 0 0 0.55rem;
}

.story-engagement__policy ul {
  margin: 0 0 0.55rem;
  padding-left: 1.1rem;
  list-style: disc;
}

.story-engagement__policy li {
  margin-bottom: 0.35rem;
}

.story-profile--has-banner .story-engagement__stat,
.story-profile--has-banner .story-engagement__like,
.story-profile--has-banner .story-engagement__help {
  color: var(--hero-text-muted);
}

.story-profile--has-banner .story-engagement__like {
  border-color: rgba(255, 255, 255, 0.28);
}

.story-profile--has-banner .story-engagement__like:hover,
.story-profile--has-banner .story-engagement__like.is-liked,
.story-profile--has-banner .story-engagement__help:hover {
  color: var(--hero-text);
}

.story-profile--has-banner .story-engagement__policy {
  background: rgba(12, 12, 12, 0.96);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--hero-text-muted);
}

.story-profile__stats {
  font-size: 0.8rem;
  color: var(--gray);
  letter-spacing: 0.04em;
  margin: 0;
}

.story-profile__body {
  padding-bottom: 1.5rem;
}

.story-profile__tablist {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.5rem;
}

.story-profile__tab {
  padding: 0.65rem 0;
  margin-right: 1.5rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--gray);
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.story-profile__tab:hover,
.story-profile__tab.is-active {
  color: var(--white);
  border-bottom-color: var(--white);
}

.story-profile__section {
  margin-top: 1.25rem;
  margin-bottom: 0;
}

.story-profile__meta {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.story-profile__meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}

.story-profile__meta-label {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  flex-shrink: 0;
}

.story-profile__panel > .story-profile__resumo {
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 0;
}

.story-profile__section h2 {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0 0 0.5rem;
  font-weight: 500;
}

.story-profile__resumo {
  line-height: 1.75;
  color: var(--gray-dim);
  margin: 0;
  white-space: pre-line;
}

.story-profile__resumo--empty {
  color: var(--gray);
  font-style: italic;
}

.story-profile__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.story-profile__chip {
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--gray-dim);
}

.story-profile__chips--tags .story-profile__chip {
  border-style: dashed;
}

.story-profile__chapters {
  list-style: none;
  margin: 0;
  padding: 0;
}

.story-profile__season-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 1rem 0 0.35rem;
  list-style: none;
}

.story-profile__chapters li a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--gray-dim);
  transition: color 0.2s;
}

.story-profile__chapters li a:hover {
  color: var(--white);
}

.story-profile__chapter-num {
  font-size: 0.75rem;
  color: var(--gray);
  min-width: 1.5rem;
}

.story-profile__chapter-title {
  flex: 1;
}

.story-profile__similar {
  padding: 2rem 0 var(--section-pad);
  border-top: 1px solid var(--border);
}

.story-profile__similar-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0 0 1.25rem;
  color: var(--white);
}

.story-profile__similar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1.25rem;
}

.historys-book-card--small {
  text-decoration: none;
  color: inherit;
  display: block;
}

.historys-book-card--small__cover {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--graphite);
  margin-bottom: 0.5rem;
  transition: transform 0.25s, border-color 0.25s;
}

.historys-book-card--small:hover .historys-book-card--small__cover {
  transform: translateY(-3px);
  border-color: var(--gray-dim);
}

.historys-book-card--small__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.historys-book-card--small__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gray);
}

.historys-book-card--small__title {
  font-size: 0.78rem;
  line-height: 1.35;
  margin: 0 0 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.historys-book-card--small__author {
  font-size: 0.68rem;
  color: var(--gray);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.historys-hero {
  padding-top: calc(var(--nav-h) + 3rem);
  padding-bottom: 2rem;
}

.historys-catalog {
  padding-bottom: var(--section-pad);
}

.story-reader__header {
  padding-top: calc(var(--nav-h) + 2rem);
  padding-bottom: 2rem;
  max-width: 760px;
}

.story-reader__back {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.88rem;
}

.story-reader__kicker {
  color: var(--gray);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 1rem 0 0.5rem;
}

.story-reader__header h1,
.story-reader__episode-title {
  font-family: var(--font-serif);
  color: var(--white);
}

.story-reader__header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.5rem;
}

.story-reader__episode-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 0.35rem;
}

.story-reader__content {
  max-width: 760px;
  font-size: 1.08rem;
  line-height: 1.85;
  padding-bottom: 3rem;
  color: var(--white);
}

.story-reader__content--collapsible {
  position: relative;
  max-height: 1200px;
  overflow: hidden;
  padding-bottom: 6rem;
}

.story-reader__content--collapsible::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 12rem;
  background: linear-gradient(transparent, var(--black) 72%);
  pointer-events: none;
}

.story-reader__content--collapsible.is-expanded {
  max-height: none;
  overflow: visible;
}

.story-reader__content--collapsible.is-expanded::after {
  display: none;
}

.story-reader__content--collapsible.is-fully-expanded {
  max-height: none;
  overflow: visible;
}

.story-reader__content--collapsible.is-fully-expanded::after {
  display: none;
}

.story-reader__expand {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  background: var(--black);
  color: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
}

.story-reader__expand:hover {
  color: var(--accent);
}

.story-reader__content--collapsible.is-expanded .story-reader__expand {
  position: static;
  display: block;
  margin: 1.5rem auto 0;
  transform: none;
}

.story-reader__content :where(p, li, h1, h2, h3, h4, h5, h6, span, div, blockquote, strong, em) {
  color: inherit;
}

.story-reader__content a {
  color: var(--gray-dim);
  text-decoration: underline;
}

.story-reader__content a:hover {
  color: var(--white);
}

[data-theme="light"] .story-reader__content [style*="color"] {
  color: inherit !important;
}

.story-reader__author {
  color: var(--gray);
}

.story-reader__content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.story-reader__nav {
  max-width: 760px;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid var(--border);
}

.story-reader__chapters {
  max-width: 760px;
  padding-bottom: 4rem;
}

.story-reader__chapters h2 {
  font-family: var(--font-serif);
  color: var(--white);
}

.story-reader__season h3 {
  font-size: 0.9rem;
  color: var(--gray);
  margin: 1rem 0 0.5rem;
}

.story-reader__chapters ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.story-reader__chapters li a {
  color: var(--gray);
  text-decoration: none;
  display: block;
  padding: 0.4rem 0;
}

.story-reader__chapters li.is-current a,
.story-reader__chapters li a:hover {
  color: var(--white);
}

.story-reader--preview {
  padding: 1.5rem;
}

@media (max-width: 1100px) {
  .story-workspace { grid-template-columns: 1fr; }
  .story-workspace__tree { position: static; max-height: none; }
}

@media (max-width: 900px) {
  .story-studio {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }

  .story-studio__sidebar {
    position: fixed;
    top: var(--studio-header-h);
    left: 0;
    bottom: 0;
    width: min(280px, 86vw);
    z-index: 35;
    transform: translateX(-100%);
    opacity: 1;
    pointer-events: none;
    box-shadow: 8px 0 32px var(--shadow-md);
  }

  .story-studio--sidebar-open .story-studio__sidebar {
    transform: translateX(0);
    pointer-events: auto;
  }

  .story-studio--sidebar-closed .story-studio__sidebar {
    transform: translateX(-100%);
  }

  .story-studio__backdrop {
    display: block;
    position: fixed;
    inset: var(--studio-header-h) 0 0 0;
    z-index: 30;
    background: var(--modal-backdrop);
    backdrop-filter: blur(2px);
  }

  .story-studio__user-name {
    display: none;
  }
}

@media (max-width: 1400px) {
  .story-list--studio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .story-studio--sidebar-closed .story-list--studio {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1100px) {
  .story-list--studio,
  .story-studio--sidebar-closed .story-list--studio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .historys-landing__hero {
    min-height: 62vh;
    padding-bottom: 3rem;
  }

  .historys-landing__catalog {
    padding-top: 3rem;
  }

  .historys-landing__grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem;
  }

  .story-profile__hero-grid {
    grid-template-columns: 140px 1fr;
    gap: 1.25rem;
  }

  .story-profile__similar-grid {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 1rem;
  }

  .story-list--studio,
  .story-studio--sidebar-closed .story-list--studio {
    grid-template-columns: 1fr;
  }

  .story-card--studio {
    min-height: 120px;
  }

  .story-card--studio .story-card__cover,
  .story-card--studio .story-card__cover img {
    width: 80px;
    min-width: 80px;
    min-height: 120px;
  }

  .story-card--studio .story-card__synopsis {
    -webkit-line-clamp: 2;
  }

  .story-card:not(.story-card--studio) {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .story-card__cover {
    width: 132px;
  }

  .story-form__grid { grid-template-columns: 1fr; }
}

/* ─── Clean chapter reader ─── */
.page-reader .footer,
.page-reader .whatsapp-float,
.page-reader .scroll-top {
  display: none;
}

.page-reader .nav {
  background: var(--overlay-strong);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.page-reader .nav:not(.scrolled) {
  background: var(--overlay-strong);
  border-bottom-color: var(--border);
}

.story-reader--clean {
  padding-top: var(--nav-h);
  min-height: 100vh;
  color: var(--white);
}

.story-reader__toolbar {
  position: sticky;
  top: var(--nav-h);
  z-index: 20;
  background: var(--black);
  border-bottom: 1px solid var(--border);
}

.story-reader__toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0.35rem 0;
}

.story-reader__toolbar-back {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.story-reader__toolbar-back:hover {
  color: var(--white);
}

.story-reader__toolbar-meta {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  flex-shrink: 0;
}

.story-reader__stage {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
  padding: 2rem 0 4rem;
}

.story-reader__main {
  min-width: 0;
  max-width: 680px;
}

.story-reader__episode-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0 0 0.5rem;
}

.story-reader--clean .story-reader__episode-title {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  line-height: 1.2;
  margin: 0 0 1.75rem;
  color: var(--white);
}

.story-reader--clean .story-reader__content {
  max-width: none;
  font-size: 1.12rem;
  line-height: 1.9;
  padding-bottom: 3rem;
  color: var(--white);
}

.story-reader__nav--end {
  max-width: none;
  padding-top: 2.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--border);
}

/* Author widget (reader sidebar) */
.author-widget {
  position: sticky;
  top: calc(var(--nav-h) + 52px + 1.5rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.85rem;
  padding: 1rem 0.5rem;
}

.author-widget__avatar-link {
  display: block;
  text-decoration: none;
}

.author-widget__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  display: block;
  transition: border-color 0.2s, transform 0.2s;
}

.author-widget__avatar--placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  background: var(--graphite);
  color: var(--gray);
}

.author-widget__avatar-link:hover .author-widget__avatar {
  border-color: var(--gray-dim);
  transform: translateY(-2px);
}

.author-widget__label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.2rem;
}

.author-widget__name {
  display: block;
  font-size: 0.92rem;
  color: var(--white);
  text-decoration: none;
  line-height: 1.35;
}

.author-widget__name:hover {
  text-decoration: underline;
}

.author-widget__socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.35rem;
}

.author-widget__social {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--gray);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.author-widget__social svg {
  width: 14px;
  height: 14px;
}

.author-widget__social:hover {
  color: var(--white);
  border-color: var(--gray-dim);
  background: var(--hover-bg);
}

/* Public author profile */
.author-profile {
  color: var(--white);
}

.author-profile:not(.author-profile--has-banner) {
  padding-top: var(--nav-h);
}

.author-profile--has-banner {
  --author-banner-h: clamp(220px, 32vh, 320px);
  position: relative;
  padding-top: var(--nav-h);
}

.author-profile__masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--author-banner-h) + var(--nav-h));
  pointer-events: none;
}

.author-profile__banner {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.author-profile__banner-overlay {
  position: absolute;
  inset: 0;
  background: var(--hero-scrim);
}

.author-profile__layout {
  position: relative;
  z-index: 1;
}

.author-profile__hero {
  padding: 1.25rem 0 1.5rem;
}

.author-profile--has-banner .author-profile__hero {
  min-height: var(--author-banner-h);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-top: 0;
}

.author-profile__back {
  display: inline-block;
  color: var(--gray);
  text-decoration: none;
  font-size: 0.88rem;
  margin-bottom: 1rem;
}

.author-profile--has-banner .author-profile__back {
  color: var(--hero-text-muted);
}

.author-profile__back:hover {
  color: var(--white);
}

.author-profile__hero-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 1.75rem;
  align-items: end;
}

.author-profile__avatar-wrap {
  display: flex;
  justify-content: center;
}

.author-profile__avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border);
  box-shadow: 0 12px 40px var(--shadow-md);
}

.author-profile__avatar--placeholder {
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  background: var(--graphite);
  color: var(--gray);
}

.author-profile--has-banner .author-profile__kicker,
.author-profile--has-banner .author-profile__name,
.author-profile--has-banner .author-profile__legal-name,
.author-profile--has-banner .author-profile__stats {
  color: var(--hero-text);
}

.author-profile--has-banner .author-profile__kicker,
.author-profile--has-banner .author-profile__legal-name,
.author-profile--has-banner .author-profile__stats {
  color: var(--hero-text-muted);
}

.author-profile__kicker {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0 0 0.35rem;
}

.author-profile__name {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin: 0 0 0.35rem;
  line-height: 1.1;
}

.author-profile__legal-name {
  color: var(--gray);
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}

.author-profile__socials {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-bottom: 0.75rem;
}

.author-profile__socials a {
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
}

.author-profile--has-banner .author-profile__socials a {
  color: var(--hero-text-muted);
}

.author-profile__socials a:hover {
  color: var(--white);
  text-decoration: underline;
}

.author-profile__stats {
  font-size: 0.8rem;
  color: var(--gray);
  margin: 0;
}

.author-profile__bio,
.author-profile__works {
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
}

.author-profile__section-title {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

.author-profile__bio-text {
  line-height: 1.75;
  color: var(--gray-dim);
  white-space: pre-line;
  margin: 0;
}

.author-profile__empty {
  color: var(--gray);
  font-style: italic;
}

.author-profile__works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .story-reader__stage {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding-top: 1.25rem;
  }

  .author-widget {
    position: static;
    flex-direction: row;
    align-items: center;
    text-align: left;
    padding: 0 0 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .author-widget__info {
    flex: 1;
    min-width: 0;
  }

  .author-widget__socials {
    justify-content: flex-start;
  }

  .author-profile__hero-grid {
    grid-template-columns: 120px 1fr;
    gap: 1.25rem;
  }

  .author-profile__avatar {
    width: 120px;
    height: 120px;
  }
}
