:root {
  color-scheme: dark;
  --bg: #130f1b;
  --surface: #201828;
  --input: #181320;
  --text: #fcf4f5;
  --muted: #c3b5c7;
  --border: #423445;
  --rose: #efadbd;
  --ink: #271520;
  --body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Georgia, "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 18px; }
body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--body);
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; }
.wrap { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.sr-only, .symbols {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 8px;
  padding: 12px;
  background: var(--rose);
  color: var(--ink);
  transform: translateY(-150%);
}
.skip:focus { transform: none; }
.icon {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header { border-block-end: 1px solid #322739; }
.header-inner, .footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.header-inner { min-height: 73px; }
.wordmark {
  display: inline-flex;
  gap: 0.24em;
  align-items: center;
  flex-shrink: 0;
  min-height: 44px;
  font: 700 clamp(17px, 2vw, 23px)/1.1 var(--display);
  letter-spacing: -0.025em;
  text-decoration: none;
}
.wordmark img { margin-inline-end: 0.25em; }
.wordmark span { color: var(--rose); }
.header-inner nav, .footer-inner nav { display: flex; flex-wrap: wrap; gap: 5px 22px; }
.header-inner nav a, .footer-inner nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.87rem;
  font-weight: 620;
  text-decoration: none;
}
.header-inner nav a:hover, .footer-inner nav a:hover { color: var(--rose); }
.header-inner nav .nav-watchlist {
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text);
}
.nav-watchlist .icon { width: 17px; height: 17px; }

.hero {
  display: flex;
  align-items: flex-end;
  min-height: 482px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid #5e3b4e;
  border-radius: 18px;
  background:
    linear-gradient(90deg, #20131f 0%, #20131fe3 22%, transparent 70%),
    linear-gradient(0deg, #20131fbb, transparent 44%),
    #20131f url("./assets/hero.jpg") 70% center / cover no-repeat;
}
.hero-copy { padding: clamp(30px, 5vw, 72px); }
.hero h1 {
  font: 400 clamp(58px, 7.4vw, 102px)/0.96 var(--display);
  letter-spacing: -0.075em;
  text-wrap: balance;
}
.hero h1 em { color: var(--rose); font-weight: 400; }
.hero p {
  max-width: 36ch;
  margin: 23px 0 24px;
  color: #f3dce5;
  font-size: clamp(1rem, 2vw, 1.125rem);
}

.button, button.primary, .text-button, .list-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 16px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 7px;
  text-decoration: none;
  font-size: 0.875rem;
  line-height: 1.25;
  font-weight: 720;
  cursor: pointer;
}
.primary { background: var(--rose); color: var(--ink); }
.primary:hover { background: #ffd0d9; }
.button.primary { min-height: 48px; }

.tools { margin-top: 42px; }
.section-lead { display: flex; align-items: baseline; flex-wrap: wrap; gap: 5px 20px; margin-bottom: 14px; }
.section-lead h2, .faq h2 {
  font: 400 clamp(32px, 4vw, 49px)/1.04 var(--display);
  letter-spacing: -0.05em;
}
.section-lead p, .tool-heading p, .watchlist-empty, .info p { color: var(--muted); }
.tool-nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-bottom: 20px; }
.tool-nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 68px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  font-size: 0.8rem;
  line-height: 1.15;
  font-weight: 690;
  text-decoration: none;
}
.tool-nav a:hover { border-color: var(--accent); background: #302337; }
.tone-rose { --accent: #f2a7bd; --icon-bg: #3e2337; }
.tone-lilac { --accent: #d7b9f5; --icon-bg: #342747; }
.tone-peach { --accent: #f6b79f; --icon-bg: #422b35; }
.tone-amber { --accent: #f5d190; --icon-bg: #3c302c; }
.tone-mint { --accent: #a9d8c8; --icon-bg: #263735; }
.tool-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--accent);
  background: var(--icon-bg);
}
.tool-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 15px;
  margin-bottom: 15px;
}
.tool-card {
  min-width: 0;
  padding: clamp(19px, 3vw, 31px);
  border: 1px solid var(--border);
  border-radius: 13px;
  background: linear-gradient(145deg, var(--surface), #1b1523);
}
.tool-card:target { border-color: var(--accent); }
.tool-heading { display: flex; gap: 13px; align-items: flex-start; margin-bottom: 20px; }
.tool-heading .tool-icon { flex-basis: 41px; width: 41px; height: 41px; }
.tool-heading h3 {
  font: 400 clamp(25px, 3vw, 33px)/1.1 var(--display);
  letter-spacing: -0.04em;
}
.tool-heading p { margin-top: 5px; font-size: 0.9rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid label { display: grid; gap: 5px; min-width: 0; color: #e5d9e6; font-size: 0.85rem; font-weight: 640; }
.form-grid .full { grid-column: 1 / -1; }
input:not([type="checkbox"]), select {
  width: 100%;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--input);
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
}
input::placeholder { color: #b1a4b6; opacity: 1; }
select:required:invalid { color: #c3b5c7; }
select option { color: var(--text); }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; margin-top: 16px; }
.text-button, .list-action { color: var(--text); background: transparent; }
.text-button:hover, .list-action:hover { color: var(--rose); }
.result {
  margin-top: 17px;
  padding: 16px;
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--accent);
  border-radius: 7px;
  background: var(--input);
  overflow-wrap: anywhere;
}
.result h4 {
  margin: 0 0 5px;
  font: 400 1.45rem/1.15 var(--display);
  color: var(--accent);
}
.result p, .result ul { margin: 0; color: #e5d9e6; font-size: 0.94rem; }
.result p + p, .result ul { margin-top: 9px; }
.result ul { padding-inline-start: 19px; }

.list-fields { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.watchlist-empty { padding-top: 16px; font-size: 0.88rem; }
.watch-entry {
  padding-top: 13px;
  margin-top: 15px;
  border-top: 1px solid var(--border);
}
.watch-entry h4 { margin: 0; overflow-wrap: anywhere; font-size: 1rem; }
.watch-entry progress { display: block; width: 100%; height: 8px; margin: 8px 0 4px; accent-color: var(--accent); }
.watch-entry p { color: var(--muted); font-size: 0.85rem; }
.entry-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 8px; }
.list-action { min-width: 44px; border-color: var(--border); padding: 0 9px; }
.list-action:disabled { opacity: 0.45; cursor: default; }
.storage-note { margin-top: 12px; color: #f3c58f; font-size: 0.88rem; }

.ad-slot {
  display: grid;
  place-items: center;
  padding: 20px 0 35px;
}
.ad-target {
  width: min(300px, 100%);
  min-height: 250px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  border: 1px dashed #67566c;
  border-radius: 8px;
  color: var(--muted);
  background: #19141f;
  font-size: 0.85rem;
}
.ad-target span { font-weight: 700; color: #e9ddeb; }

.faq { display: grid; grid-template-columns: minmax(190px, 1fr) minmax(0, 1.65fr); gap: 22px; padding-block: 45px 52px; }
.faq details { border-top: 1px solid var(--border); }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 49px;
  padding-block: 9px;
  cursor: pointer;
  font-weight: 620;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--rose); font-size: 1.3rem; font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-block: 0 15px; color: var(--muted); }
.site-footer { border-block-start: 1px solid #322739; }
.footer-inner { min-height: 77px; padding-block: 10px; }
.footer-inner .wordmark { font-size: 1.15rem; }
.preview-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
}
.preview-control input { width: 17px; height: 17px; accent-color: var(--rose); }

.info { max-width: 720px; min-height: 55vh; padding-block: 50px 70px; }
.info h1 { margin: 10px 0 20px; font: 400 clamp(45px, 7vw, 72px)/1 var(--display); letter-spacing: -0.05em; }
.info h2 { margin-block: 24px 5px; font: 400 1.65rem var(--display); }
.info p + p { margin-top: 12px; }
.info .back { display: inline-flex; min-height: 44px; align-items: center; color: var(--rose); }

@media (max-width: 1000px) {
  .tool-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tool-nav a { min-height: 52px; }
}
@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .header-inner { min-height: 65px; }
  .header-inner nav { gap: 5px 12px; }
  .hero {
    min-height: 430px;
    margin-top: 15px;
    background:
      linear-gradient(0deg, #231420 5%, #231420e8 23%, #23142011 78%),
      #231420 url("./assets/hero.jpg") 72% top / auto 79% no-repeat;
  }
  .hero-copy { padding: 28px 21px; }
  .hero h1 { font-size: clamp(46px, 9.4vw, 74px); }
  .hero p { margin-block: 15px 19px; max-width: 33ch; }
  .tools { margin-top: 30px; }
  .tool-row { grid-template-columns: 1fr; }
  .faq { grid-template-columns: 1fr; gap: 15px; padding-block: 30px; }
}
@media (max-width: 490px) {
  .wrap { width: calc(100% - 28px); }
  .header-inner { gap: 5px 8px; }
  .header-inner .nav-faq { display: none; }
  .wordmark img { width: 29px; height: 29px; }
  .header-inner nav { gap: 5px 9px; }
  .header-inner nav .nav-watchlist { padding-inline: 8px; }
  .header-inner nav .nav-watchlist span { position: absolute; clip-path: inset(50%); }
  .header-inner nav .nav-watchlist { min-width: 44px; justify-content: center; }
  .hero { min-height: 397px; border-radius: 12px; }
  .tool-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .tool-nav a { padding: 6px 8px; }
  .tool-card { padding: 17px; }
  #story-creator .form-grid { grid-template-columns: 1fr; }
  .footer-inner { padding-block: 13px; }
}
@media (max-width: 350px) {
  .form-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 42px; }
}

.live-ad { display: none; }
.ads-enabled .live-ad {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}
@media (max-width: 299px) {
  .ads-enabled .live-ad { display: none; }
}
