:root {
  --bg-top: #272527;
  --bg-mid: #343034;
  --bg-low: #5b3d49;
  --surface: #232222;
  --surface-soft: #2d2b2b;
  --border: #454040;
  --text: #f4eeee;
  --muted: #c8bfc2;
  --muted-strong: #a79da1;
  --pink: #d997a7;
  --shadow: rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

html {
  min-height: 100%;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  background-color: var(--bg-top);
  background:
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-low) 100%);
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  width: 100%;
  margin: 0;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background:
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-low) 100%);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 52%, var(--bg-low) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

button,
textarea {
  font: inherit;
}

.site-frame {
  min-height: 100vh;
  min-height: 100dvh;
  min-height: -webkit-fill-available;
  width: 100%;
  overflow-x: clip;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}

.site-header,
.site-footer {
  width: min(100% - 36px, 1180px);
  margin: 0 auto;
  color: var(--muted);
}

.site-header {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(217, 151, 167, 0.16);
}

.brand {
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-nav a {
  padding: 9px 6px;
  font-size: 0.94rem;
  font-weight: 650;
  transition: color 160ms ease;
}

.header-nav a:hover,
.header-nav a:focus-visible {
  color: var(--pink);
  outline: 0;
}

.header-nav a[aria-current="page"] {
  color: var(--text);
}

.page-shell {
  display: grid;
  place-items: center;
  padding: clamp(28px, 5vw, 64px) 18px;
}

.hero {
  width: min(100%, 1040px);
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
  transform: translateY(-2vh);
}

.hero.is-flow-active {
  min-height: calc(100svh - 190px);
  align-content: start;
  padding-bottom: 180px;
  transform: none;
}

.hero.is-flow-active h1,
.hero.is-flow-active .subtitle {
  display: none;
}

.hero.is-flow-active .prompt-box {
  position: fixed !important;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom)) !important;
  z-index: 24;
  width: min(calc(100% - 36px), 880px);
  margin: 0;
  transform: translateX(-50%);
}

h1 {
  margin: 4px 0 0;
  font-size: clamp(2.75rem, 6.2vw, 5.85rem);
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 800;
}

.subtitle {
  max-width: 650px;
  margin: 0 0 24px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.45;
}

.generation-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(217, 151, 167, 0.24);
  border-radius: 999px;
  background: rgba(35, 34, 34, 0.62);
  color: var(--muted);
  padding: 9px 14px;
  font-size: 0.9rem;
  font-weight: 800;
}

.generation-status span {
  color: var(--pink);
}

.generation-status strong {
  color: var(--text);
}

.prompt-error {
  width: min(100%, 880px);
  border: 1px solid rgba(217, 151, 167, 0.5);
  border-radius: 18px;
  background: rgba(217, 151, 167, 0.1);
  color: var(--pink);
  padding: 12px 16px;
  font-weight: 800;
  text-align: left;
}

.prompt-box {
  width: min(100%, 880px);
  min-height: 112px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px 14px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background: var(--surface);
  box-shadow: 0 28px 70px var(--shadow);
}

.input-wrap {
  position: relative;
  min-height: 44px;
}

textarea {
  width: 100%;
  min-height: 48px;
  max-height: 150px;
  resize: none;
  overflow: hidden;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  caret-color: var(--pink);
  font-size: clamp(1.14rem, 2vw, 1.35rem);
  line-height: 1.45;
}

textarea::placeholder {
  color: var(--muted-strong);
  opacity: 1;
}

.rotating-placeholder {
  position: absolute;
  inset: 0 auto auto 0;
  max-width: min(94%, 620px);
  color: var(--muted-strong);
  font-size: clamp(1.02rem, 1.65vw, 1.16rem);
  font-weight: 650;
  line-height: 1.45;
  text-align: left;
  pointer-events: none;
  opacity: 0;
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.rotating-placeholder.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.rotating-placeholder.is-hidden {
  opacity: 0;
  transform: translateY(8px);
}

.prompt-box.has-value .rotating-placeholder {
  display: none;
}

.home-latest {
  width: min(100%, 880px);
  display: grid;
  gap: 14px;
  margin-top: clamp(18px, 3vw, 28px);
  text-align: left;
}

.home-latest-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.home-latest-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  line-height: 1.1;
}

.home-latest-heading a {
  color: var(--pink);
  font-size: 0.9rem;
  font-weight: 800;
}

.home-latest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.home-story-card {
  position: relative;
  min-height: 168px;
  display: grid;
  align-content: start;
  gap: 10px;
  border: 1px solid rgba(217, 151, 167, 0.16);
  border-radius: 20px;
  background: rgba(35, 34, 34, 0.68);
  padding: 16px;
  overflow: hidden;
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.home-story-card:hover {
  border-color: rgba(217, 151, 167, 0.34);
  background: rgba(35, 34, 34, 0.84);
  transform: translateY(-2px);
}

.home-story-card a {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.home-story-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.18;
}

.home-story-card p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-story-card span {
  margin-top: auto;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
}

.prompt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.prompt-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-button,
.submit-button {
  display: inline-grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tool-button {
  width: 44px;
  height: 44px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 1.75rem;
  line-height: 1;
}

.tool-button.is-hidden-for-now {
  display: none;
}

.tool-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.submit-button {
  width: 48px;
  height: 48px;
  background: #e6dddf;
  color: #242020;
  font-size: 1.45rem;
  font-weight: 800;
}

.tool-button:hover,
.submit-button:hover {
  transform: translateY(-1px);
}

.tool-button:hover {
  background: #383435;
  color: var(--text);
}

.submit-button:hover {
  background: var(--pink);
}

.tool-button:focus-visible,
.submit-button:focus-visible {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}

.flow-context {
  width: min(100%, 880px);
  display: grid;
  gap: 10px;
  text-align: left;
}

.flow-context span {
  width: max-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--pink);
  padding: 0;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.15;
  text-transform: uppercase;
}

.flow-context h2 {
  max-width: 820px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.6rem, 3.2vw, 2.65rem);
  line-height: 1.08;
}

.flow-context p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.question-context {
  gap: 6px;
}

.question-context h2 {
  margin-bottom: 0;
}

.question-context h2 + p {
  margin-top: 0;
}

.brief-context {
  position: relative;
  gap: 18px;
  border: 1px solid rgba(217, 151, 167, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at top left, rgba(217, 151, 167, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(35, 34, 34, 0.96), rgba(26, 25, 25, 0.92));
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  padding: clamp(20px, 4vw, 28px);
  overflow: hidden;
}

.brief-context::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 151, 167, 0.6), transparent);
}

.brief-heading {
  display: grid;
  gap: 8px;
}

.brief-heading span {
  width: fit-content;
  border: 1px solid rgba(217, 151, 167, 0.28);
  border-radius: 999px;
  background: rgba(217, 151, 167, 0.09);
  color: var(--pink);
  padding: 6px 10px;
  font-size: 0.75rem;
}

.brief-heading h2 {
  margin: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.brief-heading p {
  max-width: 620px;
  margin: 0;
}

.brief-copy {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid rgba(217, 151, 167, 0.15);
  border-radius: 22px;
  background: rgba(13, 12, 12, 0.38);
  color: var(--muted);
  padding: clamp(16px, 3vw, 20px);
  font-size: 0.98rem;
  line-height: 1.65;
  scrollbar-color: rgba(217, 151, 167, 0.7) rgba(255, 255, 255, 0.04);
  scrollbar-width: thin;
}

.brief-copy::-webkit-scrollbar {
  width: 8px;
}

.brief-copy::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.brief-copy::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(217, 151, 167, 0.7);
}

.brief-context .brief-copy p:first-child {
  margin-top: 0;
}

.brief-context .brief-copy p:last-child {
  margin-bottom: 0;
}

.brief-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0;
  border-top: 1px solid rgba(217, 151, 167, 0.12);
  padding-top: 18px;
}

.brief-actions form {
  margin: 0;
}

.brief-actions .creation-submit {
  min-width: 170px;
  background: linear-gradient(135deg, #f0e8ea, var(--pink));
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.24);
}

.brief-actions .plain-action {
  min-width: 120px;
}

.inline-thinking {
  width: min(100%, 880px);
  display: none;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  text-align: left;
}

.inline-thinking strong {
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.thinking-orbit {
  position: relative;
  width: 38px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
}

.thinking-orbit i {
  width: 8px;
  height: 8px;
  display: block;
  border-radius: 50%;
  background: var(--pink);
  opacity: 0.36;
  animation: thinking-wave 960ms ease-in-out infinite;
}

.thinking-orbit i:nth-child(2) {
  animation-delay: 140ms;
}

.thinking-orbit i:nth-child(3) {
  animation-delay: 280ms;
}

body.is-ai-thinking .inline-thinking {
  display: flex;
  animation: thinking-appear 220ms ease-out both;
}

.creation-panel {
  width: min(100%, 880px);
  display: grid;
  gap: 22px;
  margin-top: 14px;
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid rgba(217, 151, 167, 0.22);
  border-radius: 28px;
  background: rgba(35, 34, 34, 0.84);
  box-shadow: 0 28px 70px var(--shadow);
  text-align: left;
}

.final-output {
  position: relative;
  overflow: hidden;
  border-color: rgba(217, 151, 167, 0.3);
  background:
    radial-gradient(circle at 88% 12%, rgba(217, 151, 167, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(35, 34, 34, 0.94), rgba(26, 25, 25, 0.92));
}

.final-output::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(217, 151, 167, 0.68), transparent);
}

.creation-panel-heading {
  display: grid;
  gap: 8px;
}

.creation-panel-heading span {
  width: fit-content;
  border: 1px solid rgba(217, 151, 167, 0.28);
  border-radius: 999px;
  background: rgba(217, 151, 167, 0.09);
  color: var(--pink);
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.creation-panel-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.creation-panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.free-preview-note {
  max-width: 680px;
  border-left: 3px solid var(--pink);
  padding-left: 12px;
  color: var(--text) !important;
}

.question-form,
.question-list {
  display: grid;
  gap: 14px;
}

.question-card {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(217, 151, 167, 0.16);
  border-radius: 20px;
  background: rgba(28, 27, 27, 0.8);
  padding: 16px;
}

.question-card span {
  color: var(--pink);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.question-card strong {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.35;
}

.question-card textarea {
  min-height: 76px;
  max-height: 170px;
  border: 1px solid rgba(217, 151, 167, 0.14);
  border-radius: 16px;
  background: rgba(19, 18, 18, 0.72);
  padding: 12px 14px;
  font-size: 1rem;
}

.question-card textarea:focus {
  border-color: rgba(217, 151, 167, 0.34);
}

.creation-submit,
.plain-action {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 900;
  text-decoration: none;
}

.creation-submit {
  width: fit-content;
  background: var(--pink);
  color: #241f20;
  cursor: pointer;
}

.plain-action {
  border: 1px solid rgba(217, 151, 167, 0.18);
  background: rgba(28, 27, 27, 0.8);
  color: var(--text);
}

.final-brief,
.generated-story-preview {
  border: 1px solid rgba(217, 151, 167, 0.14);
  border-radius: 20px;
  background: rgba(19, 18, 18, 0.68);
  padding: 18px;
  color: var(--muted);
  line-height: 1.65;
}

.final-brief h3 {
  margin: 0 0 10px;
  color: var(--text);
  font-size: 1.08rem;
}

.generated-story-preview {
  position: relative;
  max-height: 300px;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(1.02rem, 1.7vw, 1.15rem);
}

.generated-story-preview::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 92px;
  background: linear-gradient(180deg, rgba(19, 18, 18, 0), rgba(19, 18, 18, 0.96));
}

.generated-story-preview p:first-child,
.final-brief p:first-child {
  margin-top: 0;
}

.generated-story-preview p:last-child,
.final-brief p:last-child {
  margin-bottom: 0;
}

.final-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upsell-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 9, 9, 0.58);
  backdrop-filter: blur(12px);
}

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

.upsell-card {
  position: relative;
  width: min(100%, 520px);
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
  border: 1px solid rgba(217, 151, 167, 0.34);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(217, 151, 167, 0.18), transparent 36%),
    linear-gradient(145deg, rgba(35, 34, 34, 0.98), rgba(27, 26, 26, 0.96));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.46);
  padding: clamp(24px, 5vw, 36px);
}

.upsell-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(217, 151, 167, 0.18);
  border-radius: 50%;
  background: rgba(19, 18, 18, 0.72);
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.upsell-sticker {
  width: min(210px, 56vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 22px 34px rgba(217, 151, 167, 0.24));
}

.upsell-copy {
  display: grid;
  gap: 8px;
}

.upsell-copy span {
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.upsell-copy h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 0.95;
}

.upsell-copy p {
  max-width: 390px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

@keyframes thinking-wave {
  0%,
  100% {
    opacity: 0.32;
    transform: translateY(0) scale(0.88);
  }

  45% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
}

@keyframes thinking-appear {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

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

.site-footer {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-top: 1px solid rgba(217, 151, 167, 0.14);
  font-size: 0.9rem;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  white-space: nowrap;
}

.footer-nav a {
  color: var(--muted);
  font-weight: 700;
  transition: color 160ms ease;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--pink);
  outline: 0;
}

.legal-reader {
  min-height: min(620px, 72vh);
}

.legal-body {
  max-width: 980px;
}

.faq-reader {
  gap: 30px;
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(217, 151, 167, 0.18);
  border-radius: 20px;
  background: rgba(24, 23, 23, 0.48);
  padding: clamp(18px, 2.6vw, 26px);
}

.faq-item h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.2rem, 2.1vw, 1.8rem);
  line-height: 1.1;
}

.faq-item p {
  max-width: 860px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.account-shell {
  display: grid;
  place-items: center;
  padding: clamp(32px, 6vw, 76px) 18px;
}

.account-wide-shell {
  width: min(100% - 36px, 1680px);
  margin: 0 auto;
  padding-top: clamp(10px, 1.8vw, 24px);
}

.account-panel {
  width: min(100%, 620px);
  display: grid;
  gap: 26px;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 28px 70px var(--shadow);
}

.account-wide-panel {
  width: 100%;
}

.account-heading {
  display: grid;
  gap: 8px;
}

.account-heading p {
  margin: 0;
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.account-heading h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4rem);
  line-height: 1;
}

.account-form {
  display: grid;
  gap: 18px;
}

.account-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
  gap: clamp(18px, 3vw, 30px);
  align-items: start;
}

.account-profile-form,
.account-wallet-panel {
  min-width: 0;
}

.account-form-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(217, 151, 167, 0.16);
  border-radius: 20px;
  background: rgba(26, 25, 25, 0.44);
}

.account-form-section h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
}

.field-group {
  display: grid;
  gap: 8px;
}

.field-group label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.field-group input,
.field-group select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #1c1b1b;
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  outline: 0;
}

.field-group textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #1c1b1b;
  color: var(--text);
  padding: 14px;
  font: inherit;
  line-height: 1.55;
  outline: 0;
}

.field-group textarea:focus-visible {
  border-color: rgba(217, 151, 167, 0.55);
}

.field-error {
  color: var(--pink);
  font-size: 0.85rem;
  font-weight: 700;
}

.live-field-error {
  display: block;
  margin-top: 2px;
}

.live-field-error[hidden] {
  display: none;
}

.field-group input.has-error {
  border-color: rgba(217, 151, 167, 0.72);
}

.field-group input:focus-visible,
.field-group select:focus-visible {
  border-color: rgba(217, 151, 167, 0.55);
}

.field-group input[readonly] {
  color: var(--muted);
}

.choice-group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.choice-group legend {
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.choice-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.choice-options label {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #1c1b1b;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.choice-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-options label:has(input:checked) {
  border-color: rgba(217, 151, 167, 0.62);
  background: #332d2f;
  color: var(--text);
}

.choice-options label:has(input:focus-visible) {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.sell-story-panel {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(217, 151, 167, 0.2);
  border-radius: 18px;
  background: rgba(35, 34, 34, 0.62);
}

.sell-story-toggle {
  position: relative;
  display: inline-flex;
  width: fit-content;
  cursor: pointer;
}

.sell-story-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sell-story-toggle span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(217, 151, 167, 0.38);
  border-radius: 999px;
  background: #2a2527;
  color: var(--text);
  padding: 0 18px;
  font-weight: 900;
}

.sell-story-toggle input:checked + span {
  background: #e6dddf;
  color: #242020;
}

.sell-story-toggle input:focus-visible + span {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.sell-price-field {
  display: none;
}

.sell-story-panel:has(input[name="sell_story"]:checked) .sell-price-field {
  display: grid;
}

.publish-type-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 6px;
  border: 1px solid rgba(217, 151, 167, 0.16);
  border-radius: 999px;
  background: rgba(24, 23, 23, 0.46);
}

.publish-type-toggle label {
  position: relative;
  flex: 1 1 150px;
  cursor: pointer;
}

.publish-type-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.publish-type-toggle span {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 900;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.publish-type-toggle input:checked + span {
  border-color: rgba(217, 151, 167, 0.44);
  background: #e6dddf;
  color: #242020;
}

.publish-type-toggle input:focus-visible + span {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.audio-upload-field small,
.author-note-field small {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.audio-upload-control {
  min-height: 58px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #1c1b1b;
  padding: 8px;
}

.field-group .audio-file-input {
  position: absolute;
  width: 1px;
  min-height: 1px;
  height: 1px;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.field-group .audio-file-input:focus-visible {
  border-color: transparent;
}

.audio-file-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 151, 167, 0.28);
  border-radius: 12px;
  background: #e6dddf;
  color: #242020 !important;
  padding: 0 14px;
  font-size: 0.88rem !important;
  font-weight: 900 !important;
  cursor: pointer;
  white-space: nowrap;
}

.audio-file-input:focus-visible + .audio-file-button {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.audio-file-name {
  min-width: 0;
  color: var(--muted);
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
}

.password-toggle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--pink);
  outline: 0;
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 4px;
}

.account-balance-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.account-balance-card,
.withdrawal-note {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid rgba(217, 151, 167, 0.18);
  border-radius: 18px;
  background: rgba(26, 25, 25, 0.54);
}

.account-balance-card {
  min-height: 190px;
  align-content: start;
  position: relative;
  overflow: hidden;
  padding: 22px;
}

.account-balance-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -44px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(217, 151, 167, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.bought-balance-card {
  background:
    linear-gradient(145deg, rgba(217, 151, 167, 0.1), rgba(26, 25, 25, 0.72) 52%),
    rgba(26, 25, 25, 0.54);
}

.account-balance-card span,
.withdrawal-note span {
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-balance-card strong,
.withdrawal-note strong {
  color: var(--text);
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
}

.account-balance-card p,
.withdrawal-note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.withdrawal-email-warning {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(217, 151, 167, 0.48);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.16), rgba(26, 25, 25, 0.72)),
    rgba(26, 25, 25, 0.72);
}

.withdrawal-email-warning strong {
  color: var(--pink);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.withdrawal-email-warning p {
  margin: 0;
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.45;
}

.withdrawal-email-warning a {
  width: fit-content;
  color: var(--text);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.withdraw-currency-group {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.withdraw-currency-group legend {
  margin: 0;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.withdraw-currency-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.withdraw-currency-grid label {
  position: relative;
  min-height: 58px;
  cursor: pointer;
}

.withdraw-currency-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.withdraw-currency-grid span {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 151, 167, 0.18);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(217, 151, 167, 0.06), rgba(28, 27, 27, 0.74)),
    #1c1b1b;
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.92rem;
  font-weight: 900;
  text-align: center;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease;
}

.withdraw-currency-grid input:checked + span {
  border-color: rgba(217, 151, 167, 0.62);
  background: #e6dddf;
  color: #242020;
}

.withdraw-currency-grid input:focus-visible + span {
  outline: 2px solid var(--pink);
  outline-offset: 3px;
}

.account-balance-card .save-button {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  margin-top: 6px;
}

.followed-authors-panel {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid rgba(217, 151, 167, 0.16);
  border-radius: 20px;
  background: rgba(26, 25, 25, 0.44);
}

.followed-authors-panel .section-title-row {
  margin: 0;
}

.followed-author-list {
  display: grid;
  gap: 10px;
}

.followed-author-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(217, 151, 167, 0.14);
  border-radius: 16px;
  background: rgba(28, 27, 27, 0.58);
  padding: 13px 14px;
}

.followed-author-card:hover,
.followed-author-card:focus-visible {
  border-color: rgba(217, 151, 167, 0.42);
  outline: 0;
}

.followed-author-card strong {
  color: var(--text);
  font-size: 1rem;
}

.followed-author-card span,
.account-muted-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 750;
}

.social-icon-section {
  gap: 18px;
}

.social-icon-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.social-picker-button {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(217, 151, 167, 0.2);
  border-radius: 50%;
  background:
    linear-gradient(145deg, rgba(217, 151, 167, 0.08), rgba(28, 27, 27, 0.78)),
    rgba(28, 27, 27, 0.72);
  color: var(--muted);
  cursor: pointer;
  transition:
    border-color 160ms ease,
    color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.social-picker-button:hover,
.social-picker-button:focus-visible,
.social-picker-button.is-active {
  border-color: rgba(217, 151, 167, 0.48);
  color: var(--pink);
  outline: 0;
  transform: translateY(-1px);
}

.social-picker-button.is-connected {
  border-color: color-mix(in srgb, var(--social-color) 56%, transparent);
  background:
    radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--social-color) 28%, transparent), transparent 58%),
    rgba(28, 27, 27, 0.84);
  color: var(--social-color);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
}

.social-picker-button .social-icon {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: inherit;
}

.social-picker-button .social-icon svg {
  width: 22px;
  height: 22px;
}

.social-link-editor {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(217, 151, 167, 0.22);
  border-radius: 16px;
  background: rgba(28, 27, 27, 0.64);
}

.social-link-editor[hidden] {
  display: none;
}

.social-link-editor label {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
}

.social-link-editor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.social-link-editor-row input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #1c1b1b;
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  outline: 0;
}

.social-link-editor-row input:focus-visible {
  border-color: rgba(217, 151, 167, 0.55);
}

.social-link-save-button {
  min-width: 96px;
}

.social-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 10px;
}

.social-field {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 7px 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(217, 151, 167, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(217, 151, 167, 0.055), rgba(28, 27, 27, 0.68)),
    rgba(28, 27, 27, 0.58);
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.social-field:focus-within {
  border-color: rgba(217, 151, 167, 0.42);
  background:
    linear-gradient(145deg, rgba(217, 151, 167, 0.1), rgba(28, 27, 27, 0.74)),
    rgba(28, 27, 27, 0.66);
}

.social-field:last-child {
  grid-column: 1 / -1;
}

.social-field > span:not(.social-icon) {
  align-self: end;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.1;
}

.social-field input {
  grid-column: 2;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #1c1b1b;
  color: var(--text);
  padding: 0 11px;
  font: inherit;
  font-size: 0.92rem;
  outline: 0;
}

.social-field input:focus-visible {
  border-color: rgba(217, 151, 167, 0.55);
}

.social-icon,
.author-social-icon {
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 151, 167, 0.2);
  border-radius: 50%;
  background: rgba(217, 151, 167, 0.1);
  color: var(--pink);
}

.social-icon {
  grid-row: 1 / span 2;
  width: 40px;
  height: 40px;
  align-self: center;
}

.social-icon svg,
.author-social-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.social-icon .icon-fill,
.author-social-icon .icon-fill {
  fill: currentColor;
  stroke: none;
}

.earned-balance-card {
  border-color: rgba(229, 185, 151, 0.42);
  background:
    linear-gradient(145deg, rgba(229, 185, 151, 0.12), rgba(26, 25, 25, 0.76) 46%),
    rgba(26, 25, 25, 0.54);
}

.withdrawal-history {
  display: grid;
  gap: 10px;
  padding-top: 6px;
}

.withdrawal-history h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--muted);
}

.withdrawal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(26, 25, 25, 0.48);
}

.withdrawal-row span {
  color: var(--muted);
  font-weight: 700;
}

.withdrawal-row strong {
  color: var(--pink);
  font-size: 0.88rem;
}

.save-state {
  color: var(--pink);
  font-size: 0.92rem;
  font-weight: 700;
}

.save-button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: #e6dddf;
  color: #242020;
  padding: 0 20px;
  font-weight: 800;
  cursor: pointer;
}

.save-button:hover,
.save-button:focus-visible {
  background: var(--pink);
  outline: 0;
}

.content-shell,
.reader-shell {
  width: min(100% - 36px, 1680px);
  margin: 0 auto;
  padding: clamp(8px, 1.4vw, 18px) 0 clamp(34px, 5vw, 70px);
}

.list-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.story-list-heading {
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  align-items: end;
  gap: clamp(18px, 4vw, 48px);
}

.list-heading-copy {
  display: grid;
  gap: 10px;
}

.list-heading h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.2rem);
}

.list-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.tag-filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding-bottom: 8px;
}

.tag-filter-pill,
.story-tag-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid rgba(217, 151, 167, 0.26);
  border-radius: 999px;
  background: rgba(28, 27, 27, 0.72);
  color: var(--muted);
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1;
}

.tag-filter-pill:hover,
.tag-filter-pill:focus-visible,
.tag-filter-pill.is-active {
  border-color: rgba(217, 151, 167, 0.58);
  background: rgba(217, 151, 167, 0.18);
  color: var(--text);
  outline: 0;
}

.story-tags {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.story-tag-pill {
  min-height: 28px;
  border-color: rgba(217, 151, 167, 0.2);
  background: rgba(217, 151, 167, 0.1);
  color: #d9cdd0;
  padding: 0 10px;
  font-size: 0.72rem;
}

a.story-tag-pill:hover,
a.story-tag-pill:focus-visible {
  border-color: rgba(217, 151, 167, 0.54);
  color: var(--text);
  outline: 0;
}

.reader-story-tags {
  border-top: 1px solid rgba(217, 151, 167, 0.12);
  padding-top: 18px;
}

.reader-story-tags .story-tag-pill {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.86rem;
}

.my-stories-heading p {
  margin-top: 8px;
}

.author-profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px;
  margin-bottom: 32px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(217, 151, 167, 0.18);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(217, 151, 167, 0.1), rgba(35, 34, 34, 0.9) 44%),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.author-profile-heading {
  display: grid;
  gap: 10px;
}

.author-profile-heading p {
  margin: 0;
  color: var(--pink);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.author-profile-heading h1 {
  margin: 0;
  font-size: clamp(2.6rem, 5vw, 5.1rem);
  line-height: 0.96;
}

.author-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.author-profile-stats span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(217, 151, 167, 0.16);
  border-radius: 999px;
  background: rgba(28, 27, 27, 0.48);
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.84rem;
  font-weight: 850;
}

.author-page-social-links {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.author-page-social-links a {
  padding: 0 12px;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.premium-story-section {
  display: grid;
  gap: 16px;
  margin-bottom: 34px;
  border: 1px solid rgba(217, 151, 167, 0.28);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.14), rgba(35, 34, 34, 0.72) 42%),
    rgba(35, 34, 34, 0.72);
  padding: clamp(16px, 2.4vw, 24px);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.24);
}

.premium-section-heading,
.regular-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.premium-section-heading {
  border-bottom: 1px solid rgba(217, 151, 167, 0.16);
  padding-bottom: 14px;
}

.premium-section-heading span {
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.premium-section-heading h2,
.regular-section-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.3rem);
  line-height: 1;
}

.regular-section-heading {
  margin: 0 0 14px;
}

.premium-story-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.story-card {
  position: relative;
  min-height: 268px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18);
  transition:
    border-color 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.top-story-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(217, 151, 167, 0.4);
  border-radius: 999px;
  background: rgba(217, 151, 167, 0.16);
  color: var(--text);
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.paid-story-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid rgba(230, 221, 223, 0.3);
  border-radius: 999px;
  background: #e6dddf;
  color: #242020;
  padding: 0 12px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.story-card:has(.top-story-badge) .paid-story-badge {
  top: 50px;
}

.audio-story-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(217, 151, 167, 0.36);
  border-radius: 999px;
  background: rgba(217, 151, 167, 0.18);
  color: var(--pink);
  padding: 0 10px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.paid-story-card {
  border-color: rgba(229, 185, 151, 0.48);
  background:
    linear-gradient(145deg, rgba(229, 185, 151, 0.12), rgba(35, 34, 34, 0.96) 48%),
    var(--surface);
}

.paid-story-card:hover {
  border-color: rgba(229, 185, 151, 0.72);
  background:
    linear-gradient(145deg, rgba(229, 185, 151, 0.16), rgba(38, 36, 36, 0.98) 48%),
    #262424;
}

.premium-story-card {
  min-height: 300px;
  border-color: rgba(217, 151, 167, 0.44);
  background:
    linear-gradient(145deg, rgba(217, 151, 167, 0.16), rgba(35, 34, 34, 0.94) 44%),
    var(--surface);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.premium-story-card:hover {
  border-color: rgba(217, 151, 167, 0.68);
  background:
    linear-gradient(145deg, rgba(217, 151, 167, 0.2), rgba(38, 36, 36, 0.98) 44%),
    #262424;
}

.premium-badge {
  min-height: 32px;
  border-color: rgba(230, 221, 223, 0.44);
  background: #e6dddf;
  color: #242020;
  padding: 0 12px;
}

.premium-story-card h2 {
  font-size: 1.34rem;
}

.premium-story-card p {
  color: #ddd2d5;
}

.story-card:hover {
  border-color: rgba(217, 151, 167, 0.34);
  background: #262424;
  transform: translateY(-2px);
}

.card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.story-card-copy {
  display: grid;
  gap: 10px;
}

.story-card:has(.top-story-badge) .story-card-copy {
  padding-top: 30px;
}

.story-card:has(.paid-story-badge) .story-card-copy {
  padding-top: 30px;
}

.story-card:has(.audio-story-badge) .story-card-copy {
  padding-top: 30px;
}

.story-card:has(.top-story-badge):has(.paid-story-badge) .story-card-copy {
  padding-top: 66px;
}

.story-card:has(.top-story-badge):has(.audio-story-badge) .story-card-copy,
.story-card:has(.paid-story-badge):has(.audio-story-badge) .story-card-copy {
  padding-top: 66px;
}

.story-card h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.18rem;
  line-height: 1.18;
  letter-spacing: 0;
}

.story-card p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.55;
}

.story-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted-strong);
  font-size: 0.76rem;
  font-weight: 700;
}

.story-card-actions {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.story-card-meta form {
  margin: 0;
}

.story-author-link {
  position: relative;
  z-index: 2;
  color: var(--pink);
  font-weight: 900;
}

.story-author-link:hover,
.story-author-link:focus-visible {
  color: var(--text);
  outline: 0;
}

.story-card-actions strong {
  color: var(--pink);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.story-card-stats {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.story-card-stats form {
  margin: 0;
}

.story-stat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 32px;
  min-width: 54px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(44, 42, 42, 0.74);
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.story-stat svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.like-story-button {
  cursor: pointer;
  font-family: inherit;
}

.like-story-button:hover,
.like-story-button:focus-visible,
.like-story-button.is-liked {
  border-color: rgba(217, 151, 167, 0.45);
  background: rgba(217, 151, 167, 0.12);
  color: var(--pink);
  outline: 0;
}

.like-story-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.premium-story-card .story-stat {
  border-color: rgba(230, 221, 223, 0.2);
  background: rgba(22, 21, 21, 0.34);
}

.story-card-rating {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(44, 42, 42, 0.74);
  color: var(--muted);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.rating-stars {
  position: relative;
  display: inline-block;
  color: rgba(200, 191, 194, 0.36);
  font-size: 0.9rem;
  letter-spacing: 0;
  line-height: 1;
}

.rating-stars-base,
.rating-stars-fill {
  display: block;
}

.rating-stars-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--rating-percent, 0%);
  overflow: hidden;
  color: #e5b967;
  white-space: nowrap;
}

.rating-score {
  min-width: 28px;
  color: var(--muted);
}

.premium-story-card .story-card-rating {
  border-color: rgba(230, 221, 223, 0.2);
  background: rgba(22, 21, 21, 0.34);
}

.top-balance-box {
  display: grid;
  gap: 4px;
  justify-items: end;
  padding: 14px 16px;
  border: 1px solid rgba(217, 151, 167, 0.22);
  border-radius: 18px;
  background: rgba(35, 34, 34, 0.58);
}

.top-balance-box span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.top-balance-box strong {
  color: var(--pink);
  font-size: 1rem;
}

.status-message {
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  font-weight: 800;
}

.success-message {
  border-color: rgba(217, 151, 167, 0.28);
  background: rgba(217, 151, 167, 0.12);
  color: var(--text);
}

.error-message {
  border-color: rgba(217, 151, 167, 0.52);
  color: var(--pink);
}

.error-message a {
  color: var(--text);
  margin-left: 8px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.top-story-form {
  display: grid;
  gap: 18px;
}

.selectable-story {
  cursor: pointer;
}

.selectable-story input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.selectable-story.is-selected,
.selectable-story:has(input:checked) {
  border-color: rgba(217, 151, 167, 0.62);
  background: #2b2728;
}

.selectable-story:has(input:focus-visible) {
  outline: 2px solid var(--pink);
  outline-offset: 4px;
}

.top-actions {
  justify-content: space-between;
}

.plain-action {
  color: var(--muted);
  font-weight: 800;
}

.plain-action:hover,
.plain-action:focus-visible {
  color: var(--pink);
  outline: 0;
}

.save-story-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--muted);
  cursor: pointer;
}

.save-story-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.save-story-button:hover,
.save-story-button:focus-visible,
.save-story-button.is-saved,
.share-story-button.is-shared {
  color: var(--pink);
  outline: 0;
}

.save-story-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 16px;
  max-width: 520px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface);
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.empty-state a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #e6dddf;
  color: #242020;
  padding: 0 18px;
  font-weight: 800;
}

.split-heading {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.publish-link {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e6dddf;
  color: #242020;
  padding: 0 20px;
  font-weight: 800;
}

.publish-link:hover,
.publish-link:focus-visible {
  background: var(--pink);
  outline: 0;
}

.top-promote-link {
  position: relative;
  border: 1px solid rgba(217, 151, 167, 0.48);
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.28), rgba(230, 221, 223, 0.92)),
    #e6dddf;
  color: #241f20;
  box-shadow: 0 14px 38px rgba(217, 151, 167, 0.16);
}

.top-promote-link::before {
  content: "↑";
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 8px;
  border-radius: 50%;
  background: #241f20;
  color: #e6dddf;
  font-size: 0.9rem;
  line-height: 1;
}

.top-promote-link:hover,
.top-promote-link:focus-visible {
  background: var(--pink);
}

.heading-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.secondary-link {
  border: 1px solid rgba(217, 151, 167, 0.22);
  background: var(--surface);
  color: var(--text);
}

.coin-balance-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(217, 151, 167, 0.24);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--pink);
  font-weight: 800;
}

.library-section {
  display: grid;
  gap: 16px;
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid rgba(217, 151, 167, 0.14);
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-title-row h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.4rem, 2.5vw, 2.15rem);
}

.section-title-row span {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--pink);
  font-weight: 800;
}

.inline-empty {
  max-width: none;
}

.publish-panel {
  width: min(100%, 760px);
  display: grid;
  gap: 26px;
  padding: clamp(26px, 4vw, 38px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 28px 70px var(--shadow);
}

.publish-form {
  display: grid;
  gap: 18px;
}

.tag-picker-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid rgba(217, 151, 167, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.1), rgba(24, 23, 23, 0.42)),
    rgba(24, 23, 23, 0.44);
  padding: 16px;
}

.tag-picker-panel legend {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  padding: 0 6px;
}

.tag-picker-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.tag-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-picker-grid label {
  cursor: pointer;
}

.tag-picker-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tag-picker-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid rgba(217, 151, 167, 0.24);
  border-radius: 999px;
  background: rgba(28, 27, 27, 0.74);
  color: var(--muted);
  padding: 0 14px;
  font-size: 0.88rem;
  font-weight: 800;
}

.tag-picker-grid input:checked + span {
  border-color: rgba(217, 151, 167, 0.62);
  background: rgba(217, 151, 167, 0.2);
  color: var(--text);
}

.tag-picker-grid input:focus-visible + span {
  outline: 2px solid rgba(217, 151, 167, 0.6);
  outline-offset: 3px;
}

.report-panel {
  width: min(100%, 860px);
  display: grid;
  gap: 24px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  padding: clamp(24px, 4vw, 38px);
  box-shadow: 0 28px 70px var(--shadow);
}

.account-heading span {
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 750;
}

.report-form {
  display: grid;
  gap: 18px;
}

.report-category-panel {
  display: grid;
  gap: 12px;
  margin: 0;
  border: 1px solid rgba(217, 151, 167, 0.18);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.09), rgba(24, 23, 23, 0.54)),
    rgba(24, 23, 23, 0.44);
  padding: 16px;
}

.report-category-panel legend {
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  padding: 0 6px;
}

.report-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.report-category-grid label {
  position: relative;
  cursor: pointer;
}

.report-category-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.report-category-grid span {
  min-height: 48px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(217, 151, 167, 0.2);
  border-radius: 14px;
  background: rgba(28, 27, 27, 0.72);
  color: var(--muted);
  padding: 0 14px;
  font-size: 0.92rem;
  font-weight: 850;
}

.report-category-grid input:checked + span {
  border-color: rgba(217, 151, 167, 0.62);
  background: rgba(217, 151, 167, 0.18);
  color: var(--text);
}

.report-category-grid input:focus-visible + span {
  outline: 2px solid rgba(217, 151, 167, 0.6);
  outline-offset: 3px;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.form-success-message {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(217, 151, 167, 0.26);
  border-radius: 18px;
  background: rgba(217, 151, 167, 0.12);
  padding: 14px 16px;
}

.form-success-message strong {
  color: var(--text);
}

.form-success-message a {
  color: var(--pink);
  font-weight: 900;
}

.coin-heading {
  grid-template-columns: 1fr auto;
  align-items: end;
}

.coin-wallet-card {
  width: min(100%, 420px);
  min-width: min(100%, 340px);
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  border: 1px solid rgba(217, 151, 167, 0.34);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.14), rgba(35, 34, 34, 0.88) 54%),
    var(--surface);
  padding: 14px 18px 14px 14px;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.24);
}

.coin-wallet-card img {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.coin-wallet-card div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.coin-wallet-card span {
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.coin-wallet-card strong {
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1;
  white-space: nowrap;
}

.coin-wallet-card small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.coin-usage-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: stretch;
  margin: -8px 0 24px;
  border: 1px solid rgba(217, 151, 167, 0.24);
  border-radius: 26px;
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.14), rgba(35, 34, 34, 0.74) 48%),
    rgba(35, 34, 34, 0.68);
  padding: clamp(18px, 2.8vw, 26px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.22);
}

.coin-usage-heading {
  display: grid;
  align-content: center;
  gap: 10px;
}

.coin-usage-heading span {
  width: fit-content;
  border: 1px solid rgba(217, 151, 167, 0.3);
  border-radius: 999px;
  background: rgba(217, 151, 167, 0.1);
  color: var(--pink);
  padding: 6px 10px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.coin-usage-heading h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.35rem, 2.7vw, 2.25rem);
  line-height: 1.08;
}

.coin-usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.coin-usage-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(217, 151, 167, 0.18);
  border-radius: 20px;
  background: rgba(28, 27, 27, 0.66);
  padding: 16px;
}

.coin-usage-grid article span {
  color: var(--pink);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.coin-usage-grid article strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.2;
}

.coin-usage-grid article p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.payment-status-card {
  display: grid;
  gap: 6px;
  margin: -8px 0 18px;
  padding: 18px 22px;
  border: 1px solid rgba(217, 151, 167, 0.34);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.12), rgba(28, 27, 27, 0.86)),
    var(--surface);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.2);
}

.payment-status-card strong {
  color: var(--text);
  font-size: 1.08rem;
}

.payment-status-card p,
.payment-status-card small {
  margin: 0;
  color: var(--muted);
}

.payment-status-card small {
  font-size: 0.82rem;
  font-weight: 700;
}

.crypto-note {
  display: grid;
  gap: 6px;
  justify-items: end;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(35, 34, 34, 0.58);
}

.coin-crypto-note {
  width: fit-content;
  margin: -12px 0 22px auto;
}

.crypto-note span {
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.crypto-note strong {
  color: var(--text);
  font-size: 0.95rem;
}

.coin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.coin-card {
  --tier-accent: rgba(217, 151, 167, 0.48);
  --tier-accent-strong: #d997a7;
  --tier-bg: #242222;
  position: relative;
  overflow: visible;
  display: grid;
  align-content: start;
  gap: 18px;
  justify-items: start;
  min-height: 424px;
  padding: 24px 22px 22px;
  border: 1px solid var(--tier-accent);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 46%),
    var(--tier-bg);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.coin-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 16px;
  pointer-events: none;
}

.coin-card::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  left: 18px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--tier-accent-strong), transparent);
  opacity: 0.45;
  pointer-events: none;
}

.coin-card.tier-1 {
  --tier-accent: rgba(129, 116, 122, 0.54);
  --tier-accent-strong: #9d9197;
  --tier-bg: #232222;
}

.coin-card.tier-2 {
  --tier-accent: rgba(173, 131, 143, 0.54);
  --tier-accent-strong: #c28b9a;
  --tier-bg: #262324;
}

.coin-card.tier-3 {
  --tier-accent: rgba(217, 151, 167, 0.56);
  --tier-accent-strong: #d997a7;
  --tier-bg: #292526;
}

.coin-card.tier-4 {
  --tier-accent: rgba(229, 170, 185, 0.62);
  --tier-accent-strong: #e3a5b4;
  --tier-bg: #2d2729;
}

.coin-card.tier-5 {
  --tier-accent: rgba(229, 185, 151, 0.62);
  --tier-accent-strong: #e5b997;
  --tier-bg: #302827;
}

.coin-card.tier-6 {
  --tier-accent: rgba(235, 198, 156, 0.7);
  --tier-accent-strong: #ebc69c;
  --tier-bg: #342b27;
}

.coin-card.tier-7 {
  --tier-accent: rgba(241, 207, 169, 0.78);
  --tier-accent-strong: #f1cfa9;
  --tier-bg: #382f2a;
}

.coin-card.tier-8 {
  --tier-accent: rgba(250, 219, 183, 0.86);
  --tier-accent-strong: #fadbb7;
  --tier-bg: #3c332d;
}

.coin-card > *:not(.coin-sticker) {
  position: relative;
  z-index: 1;
}

.coin-sticker {
  width: min(100%, 190px);
  height: auto;
  justify-self: center;
  margin: -2px 0 0;
  filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.26));
  pointer-events: none;
}

.coin-card.featured-pack {
  border-color: var(--tier-accent);
  box-shadow:
    0 30px 72px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(250, 219, 183, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.coin-card-top {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.coin-card-top span {
  color: var(--muted);
  font-weight: 800;
}

.coin-card-top strong {
  color: var(--tier-accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.coin-amount {
  display: grid;
  gap: 2px;
}

.coin-amount strong {
  color: var(--text);
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 0.95;
}

.coin-amount span {
  color: var(--muted);
  font-weight: 700;
}

.coin-price {
  display: grid;
  gap: 3px;
}

.coin-price span {
  color: var(--text);
  font-size: 1.45rem;
  font-weight: 800;
}

.coin-price small {
  color: var(--muted-strong);
}

.coin-buy-form {
  align-self: end;
  width: 100%;
}

.crypto-pay-button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #f0e8ea, var(--tier-accent-strong));
  color: #242020;
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.2);
}

.crypto-pay-button:hover,
.crypto-pay-button:focus-visible {
  transform: translateY(-1px);
  outline: 0;
}

.reader-shell {
  width: min(100% - 36px, 1080px);
}

.story-reader {
  display: grid;
  gap: 24px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 28px 70px var(--shadow);
}

.story-purchase-panel {
  position: relative;
  display: grid;
  gap: 18px;
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(229, 185, 151, 0.42);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(229, 185, 151, 0.14), rgba(35, 34, 34, 0.96) 46%),
    var(--surface);
  box-shadow: 0 28px 70px var(--shadow);
}

.purchase-back-link {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 151, 167, 0.16);
  border-radius: 999px;
  background: rgba(28, 27, 27, 0.64);
  color: var(--muted);
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 900;
}

.purchase-back-link:hover,
.purchase-back-link:focus-visible {
  color: var(--pink);
  outline: 0;
}

.purchase-balance-card {
  position: absolute;
  top: clamp(22px, 3vw, 34px);
  right: clamp(22px, 3vw, 34px);
  display: grid;
  gap: 4px;
  min-width: 180px;
  max-width: 260px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 151, 167, 0.2);
  border-radius: 16px;
  background: rgba(24, 23, 23, 0.58);
}

.purchase-balance-card span {
  color: var(--pink);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.purchase-balance-card strong {
  color: var(--text);
  font-size: clamp(1.3rem, 2.2vw, 2rem);
  line-height: 1;
}

.purchase-heading {
  display: grid;
  gap: 12px;
  padding-top: 42px;
  padding-right: min(34vw, 300px);
}

.purchase-heading span {
  width: fit-content;
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(230, 221, 223, 0.3);
  border-radius: 999px;
  background: #e6dddf;
  color: #242020;
  padding: 0 12px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.purchase-heading h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  line-height: 1;
}

.purchase-heading p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

.purchase-summary {
  display: grid;
  grid-template-columns: minmax(220px, 360px);
  gap: 14px;
}

.purchase-summary div {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(217, 151, 167, 0.2);
  border-radius: 18px;
  background: rgba(24, 23, 23, 0.48);
}

.purchase-summary span {
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.purchase-summary strong {
  color: var(--text);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1;
}

.purchase-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.reader-heading {
  display: grid;
  gap: 10px;
}

.reader-heading a {
  width: max-content;
  color: var(--pink);
  font-size: 0.9rem;
  font-weight: 800;
}

.reader-heading h1 {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.8rem);
  line-height: 1;
}

.reader-heading p {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.reader-author-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.author-follower-count {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid rgba(217, 151, 167, 0.22);
  border-radius: 999px;
  background: rgba(217, 151, 167, 0.1);
  color: #d9cdd0;
  padding: 0 10px;
  font-size: 0.76rem;
  font-weight: 900;
}

.author-social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.author-social-links a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(217, 151, 167, 0.18);
  border-radius: 999px;
  background: rgba(28, 27, 27, 0.64);
  color: var(--muted);
  padding: 0 12px 0 5px;
  font-size: 0.88rem;
  font-weight: 900;
}

.author-social-links a:hover,
.author-social-links a:focus-visible {
  border-color: rgba(217, 151, 167, 0.44);
  color: var(--pink);
  outline: 0;
}

.author-social-icon {
  width: 28px;
  height: 28px;
}

.author-social-icon svg {
  width: 15px;
  height: 15px;
}

.reader-save {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.author-follow-form {
  margin: 0;
}

.follow-author-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(217, 151, 167, 0.24);
  border-radius: 999px;
  background: rgba(28, 27, 27, 0.64);
  color: var(--muted);
  cursor: pointer;
  padding: 0 14px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.follow-author-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.follow-author-button:hover,
.follow-author-button:focus-visible,
.follow-author-button.is-following {
  border-color: rgba(217, 151, 167, 0.48);
  background: rgba(217, 151, 167, 0.14);
  color: var(--pink);
  outline: 0;
}

.follow-author-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.large-follow-button {
  min-height: 48px;
  padding: 0 18px;
}

.save-button.is-saved {
  background: var(--pink);
}

.author-note-panel {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(217, 151, 167, 0.22);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.11), rgba(24, 23, 23, 0.68)),
    rgba(24, 23, 23, 0.58);
  padding: clamp(16px, 2.5vw, 22px);
}

.author-note-panel strong {
  color: var(--pink);
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: uppercase;
}

.author-note-copy {
  color: #eee6e8;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  line-height: 1.65;
}

.author-note-copy p {
  margin: 0;
}

.story-body {
  color: #eee6e8;
  font-size: clamp(1.05rem, 1.55vw, 1.22rem);
  line-height: 1.78;
}

.story-body p {
  margin: 0 0 1.15em;
}

.audio-story-player {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(217, 151, 167, 0.2);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(217, 151, 167, 0.12), rgba(24, 23, 23, 0.72)),
    rgba(24, 23, 23, 0.64);
  padding: clamp(18px, 3vw, 26px);
}

.audio-story-player audio {
  width: 100%;
  min-height: 48px;
  accent-color: var(--pink);
}

.audio-story-description {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
}

.story-pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 8px;
}

.story-pagination a {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--muted);
  font-weight: 800;
}

.story-pagination a[aria-current="page"],
.story-pagination a:hover,
.story-pagination a:focus-visible {
  background: #e6dddf;
  color: #242020;
  outline: 0;
}

.reader-rating-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(217, 151, 167, 0.22);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(229, 185, 151, 0.1), rgba(24, 23, 23, 0.72)),
    rgba(24, 23, 23, 0.58);
  padding: clamp(18px, 3vw, 26px);
}

.story-report-panel {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(217, 151, 167, 0.14);
  padding-top: 18px;
}

.report-story-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(217, 151, 167, 0.26);
  border-radius: 999px;
  background: rgba(28, 27, 27, 0.72);
  color: var(--text);
  padding: 0 18px;
  font-size: 0.9rem;
  font-weight: 900;
}

.report-story-button:hover,
.report-story-button:focus-visible {
  border-color: rgba(217, 151, 167, 0.6);
  background: rgba(217, 151, 167, 0.16);
  outline: 0;
}

.reader-rating-copy {
  display: grid;
  gap: 4px;
}

.reader-rating-copy span {
  color: var(--pink);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.reader-rating-copy strong {
  color: var(--text);
  font-size: clamp(1.45rem, 3vw, 2.15rem);
  line-height: 1;
}

.reader-rating-copy small {
  color: var(--muted);
  font-weight: 750;
}

.reader-rating-form {
  margin: 0;
}

.rating-input-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid rgba(217, 151, 167, 0.2);
  border-radius: 999px;
  background: rgba(28, 27, 27, 0.62);
  padding: 8px;
}

.rating-star-button {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(200, 191, 194, 0.42);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.48rem;
  font-weight: 900;
  line-height: 1;
  transition:
    background 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.rating-star-button.is-selected {
  color: #e5b967;
}

.rating-input-group:hover .rating-star-button {
  color: rgba(200, 191, 194, 0.42);
}

.rating-input-group .rating-star-button:hover,
.rating-input-group .rating-star-button:has(~ .rating-star-button:hover) {
  color: #e5b967;
}

.rating-star-button:hover,
.rating-star-button:focus-visible {
  background: rgba(229, 185, 151, 0.12);
  outline: 0;
  transform: translateY(-1px);
}

.rating-star-button:disabled {
  cursor: progress;
  opacity: 0.7;
}

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

@media (max-width: 700px) {
  .site-header,
  .site-footer {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .site-header {
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    justify-content: center;
    gap: 13px;
    padding: 14px max(14px, env(safe-area-inset-right)) 15px max(14px, env(safe-area-inset-left));
    border-bottom: 1px solid rgba(217, 151, 167, 0.17);
    background:
      linear-gradient(180deg, rgba(39, 37, 39, 0.98), rgba(35, 34, 34, 0.86)),
      var(--bg-top);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  }

  .brand {
    justify-self: center;
    font-size: 1.42rem;
    font-weight: 900;
    line-height: 1;
  }

  .header-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 7px;
    overflow: visible;
  }

  .header-nav a {
    min-width: 0;
    min-height: 39px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(217, 151, 167, 0.15);
    border-radius: 13px;
    background: rgba(28, 27, 27, 0.58);
    color: var(--muted);
    padding: 0 7px;
    font-size: clamp(0.68rem, 2.8vw, 0.82rem);
    font-weight: 850;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .header-nav a[aria-current="page"] {
    border-color: rgba(217, 151, 167, 0.36);
    background:
      linear-gradient(135deg, rgba(217, 151, 167, 0.2), rgba(217, 151, 167, 0.08)),
      rgba(28, 27, 27, 0.72);
    color: var(--text);
  }

  .page-shell {
    align-items: start;
    padding-top: 48px;
  }

  .hero {
    transform: none;
    gap: 14px;
  }

  .hero.is-flow-active {
    min-height: calc(100svh - 202px);
    padding-bottom: 160px;
  }

  .hero.is-flow-active .prompt-box {
    width: calc(100% - 28px);
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }

  .subtitle {
    margin-bottom: 18px;
    font-size: 1rem;
  }

  .prompt-box {
    min-height: 118px;
    padding: 16px 18px 14px;
    border-radius: 24px;
  }

  .input-wrap {
    min-height: 52px;
  }

  textarea {
    min-height: 54px;
  }

  .rotating-placeholder {
    max-width: 94%;
    font-size: 1.18rem;
    line-height: 1.28;
  }

  .prompt-actions {
    gap: 12px;
  }

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

  .home-latest-grid {
    grid-template-columns: 1fr;
  }

  .home-story-card {
    min-height: 132px;
  }

  .flow-context {
    gap: 6px;
  }

  .question-context {
    gap: 4px;
  }

  .flow-context h2 {
    font-size: 1.55rem;
  }

  .flow-context p,
  .brief-copy {
    font-size: 0.95rem;
  }

  .brief-copy {
    max-height: 240px;
  }

  .brief-context {
    gap: 14px;
    border-radius: 24px;
    padding: 18px;
  }

  .brief-actions,
  .brief-actions form {
    width: 100%;
  }

  .brief-actions {
    justify-content: stretch;
    padding-top: 14px;
  }

  .creation-panel {
    gap: 18px;
    margin-top: 10px;
    padding: 18px;
    border-radius: 22px;
  }

  .creation-panel-heading h2 {
    font-size: 1.55rem;
  }

  .question-card {
    padding: 14px;
    border-radius: 18px;
  }

  .question-card strong {
    font-size: 1rem;
  }

  .question-card textarea {
    min-height: 86px;
    font-size: 1rem;
  }

  .creation-submit,
  .plain-action {
    width: 100%;
  }

  .account-balance-grid,
  .purchase-summary {
    grid-template-columns: 1fr;
  }

  .account-wide-shell {
    width: min(100% - 28px, 1680px);
    padding-right: 0;
    padding-left: 0;
  }

  .account-dashboard {
    grid-template-columns: 1fr;
  }

  .social-fields-grid {
    grid-template-columns: 1fr;
  }

  .purchase-heading {
    padding-top: 10px;
    padding-right: 0;
  }

  .purchase-balance-card {
    position: static;
    width: 100%;
    max-width: none;
  }

  .withdrawal-row {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .final-actions {
    width: 100%;
  }

  .inline-thinking {
    justify-content: flex-start;
  }

  .site-footer {
    position: sticky;
    bottom: 0;
    z-index: 18;
    min-height: auto;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 17px max(14px, env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    border-top: 1px solid rgba(217, 151, 167, 0.16);
    background:
      linear-gradient(180deg, rgba(42, 38, 42, 0.86), rgba(63, 45, 54, 0.92)),
      var(--bg-low);
    font-size: 0.8rem;
    text-align: center;
  }

  .site-footer > span {
    color: var(--muted);
    font-weight: 800;
  }

  .footer-nav {
    width: min(100%, 420px);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: normal;
  }

  .footer-nav a {
    min-width: 0;
    min-height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(217, 151, 167, 0.12);
    border-radius: 11px;
    background: rgba(28, 27, 27, 0.34);
    padding: 0 7px;
    font-size: clamp(0.68rem, 2.7vw, 0.76rem);
    line-height: 1.1;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .content-shell,
  .reader-shell {
    width: min(100% - 28px, 1680px);
    padding-top: 10px;
  }

  .story-list-heading {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 16px;
  }

  .tag-filter-bar {
    justify-content: flex-start;
    padding-bottom: 0;
  }

  .tag-filter-pill {
    min-height: 36px;
    font-size: 0.8rem;
  }

  .tag-picker-grid {
    gap: 8px;
  }

  .tag-picker-grid span {
    min-height: 36px;
    padding: 0 12px;
    font-size: 0.82rem;
  }

  .report-category-grid {
    grid-template-columns: 1fr;
  }

  .report-actions,
  .report-actions .plain-action,
  .report-actions .save-button {
    width: 100%;
  }

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

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

  .split-heading {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .publish-link {
    width: 100%;
  }

  .heading-actions {
    width: 100%;
    justify-content: stretch;
  }

  .author-profile-hero {
    grid-template-columns: 1fr;
    border-radius: 22px;
  }

  .author-profile-hero .author-follow-form,
  .author-profile-hero .follow-author-button {
    width: 100%;
  }

  .reader-save {
    justify-content: stretch;
  }

  .reader-save form,
  .reader-save .save-button,
  .reader-save .follow-author-button {
    width: 100%;
  }

  .top-balance-box {
    width: 100%;
    justify-items: start;
  }

  .top-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .plain-action {
    text-align: center;
  }

  .coin-heading {
    grid-template-columns: 1fr;
  }

  .coin-wallet-card {
    width: 100%;
    min-width: 0;
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .coin-wallet-card strong {
    font-size: clamp(2rem, 8vw, 3.4rem);
  }

  .coin-usage-panel {
    grid-template-columns: 1fr;
    margin: 0 0 18px;
  }

  .coin-usage-grid {
    grid-template-columns: 1fr;
  }

  .crypto-note {
    justify-items: start;
  }

  .coin-crypto-note {
    width: 100%;
    margin: -4px 0 18px;
  }

  .coin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .coin-card {
    padding: 18px;
    border-radius: 18px;
    gap: 12px;
  }

  .coin-sticker {
    width: min(100%, 128px);
    margin: 0;
  }

  .audio-upload-control {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .audio-file-button {
    width: 100%;
  }

  .audio-file-name {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .story-card {
    min-height: 236px;
    padding: 14px;
  }

  .story-card h2 {
    font-size: 1.02rem;
  }

  .story-card p {
    font-size: 0.94rem;
  }

  .story-reader {
    padding: 24px 20px;
    border-radius: 22px;
  }

  .story-body {
    font-size: 1rem;
    line-height: 1.7;
  }

  .reader-rating-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .story-report-panel {
    justify-content: stretch;
  }

  .report-story-button {
    width: 100%;
  }

  .rating-input-group {
    width: 100%;
    justify-content: space-between;
  }

  .rating-star-button {
    width: 40px;
    height: 40px;
  }
}

@media (min-width: 701px) and (max-width: 1200px) {
  .account-dashboard {
    grid-template-columns: 1fr;
  }

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

  .coin-heading {
    grid-template-columns: 1fr;
  }

  .coin-wallet-card {
    width: min(100%, 560px);
  }

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

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

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