:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #242323;
  background: #f6f5f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #242323;
  --muted: #898783;
  --line: #e8e6e1;
  --accent: #7956cf;
  --accent-dark: #6140b5;
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  padding: 28px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 82% 10%, rgba(226, 218, 243, .38), transparent 28%),
    #f6f5f2;
}

button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.page-shell {
  width: min(1120px, 100%);
  min-height: min(720px, calc(100vh - 56px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(61, 50, 84, .07);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(49, 39, 67, .1), 0 3px 12px rgba(49, 39, 67, .04);
}

.story-panel {
  position: relative;
  min-height: 640px;
  padding: 42px 48px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse at 20% 75%, rgba(198, 169, 255, .25), transparent 34%),
    linear-gradient(145deg, #29213b 0%, #382b55 56%, #4b3870 100%);
}

.brand {
  z-index: 1;
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.06em;
}

.brand-mark { width: 30px; height: 30px; display: block; object-fit: contain; }

.story-copy { position: relative; z-index: 1; margin: auto 0; padding: 38px 0 30px; }
.eyebrow { color: #9c8ac7; font-size: 10px; font-weight: 750; letter-spacing: .16em; }
.story-panel .eyebrow { color: #d3c4f4; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #baa3ef; box-shadow: 0 0 0 4px rgba(186, 163, 239, .13); }

.story-copy h1 {
  max-width: 380px;
  margin: 25px 0 16px;
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 540;
  line-height: 1.07;
  letter-spacing: -.065em;
}

.story-copy p { max-width: 340px; margin: 0; color: #c7c1d0; font-size: 14px; line-height: 1.8; }
.story-footer { position: relative; z-index: 1; min-height: 185px; display: flex; align-items: flex-end; }
.story-footer p { z-index: 1; margin: 0; color: #d4cedf; font-size: 12px; }
.orbit { position: absolute; right: 3%; bottom: -180px; width: 320px; height: 320px; border: 1px solid rgba(226, 216, 249, .17); border-radius: 50%; }
.orbit-two { right: 14%; bottom: -143px; width: 245px; height: 245px; border-color: rgba(226, 216, 249, .13); }
.orbit-three { right: 26%; bottom: -103px; width: 165px; height: 165px; border-color: rgba(226, 216, 249, .1); }

.form-panel { padding: 56px 52px 25px; display: flex; flex-direction: column; justify-content: center; }
.auth-card { width: min(100%, 380px); margin: auto; }
.card-heading { margin-bottom: 25px; }
.card-heading h2, .signed-in h2 { margin: 11px 0 7px; font-size: 32px; font-weight: 620; letter-spacing: -.055em; }
.card-heading p, .signed-in p { margin: 0; color: var(--muted); font-size: 13px; }

.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 18px; border-radius: 10px; background: #f5f4f2; }
.mode-button { padding: 10px 8px; border: 0; border-radius: 7px; color: #8a8884; background: transparent; font-size: 12px; font-weight: 600; transition: background .18s, color .18s, box-shadow .18s; }
.mode-button.is-active { color: var(--ink); background: #fff; box-shadow: 0 1px 5px rgba(36, 35, 35, .08); }
.divider { display: flex; align-items: center; gap: 12px; margin: 19px 0; color: #aaa8a3; font-size: 10px; }
.divider::before, .divider::after { height: 1px; flex: 1; content: ""; background: var(--line); }

.field { display: grid; gap: 7px; margin-bottom: 15px; color: #565450; font-size: 11px; font-weight: 620; }
.field input { width: 100%; height: 44px; padding: 0 13px; border: 1px solid #e8e6e2; border-radius: 8px; outline: none; color: var(--ink); background: #fff; font-size: 12px; font-weight: 450; transition: border-color .16s, box-shadow .16s; }
.field input::placeholder { color: #bbb9b4; }
.field input:focus { border-color: #9b80db; box-shadow: 0 0 0 3px rgba(121, 86, 207, .1); }
.password-control { position: relative; display: block; }
.password-control input { padding-right: 58px; }
.reveal-button { position: absolute; top: 50%; right: 11px; padding: 4px; transform: translateY(-50%); border: 0; color: #7d62bd; background: transparent; font-size: 10px; font-weight: 650; }
.form-message { min-height: 18px; margin: -2px 0 8px; color: #b33e50; font-size: 11px; line-height: 1.5; }
.form-message.is-success { color: #398366; }
.submit-button { width: 100%; min-height: 46px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border: 0; border-radius: 8px; color: #fff; background: var(--accent); font-size: 12px; font-weight: 650; transition: background .18s, transform .18s; }
.submit-button:hover { background: var(--accent-dark); }
.submit-button:active { transform: translateY(1px); }
.submit-button:disabled { cursor: wait; opacity: .7; }
.privacy-note { margin: 20px 0 0; display: flex; align-items: center; justify-content: center; gap: 6px; color: #aaa8a3; font-size: 10px; }
.privacy-note svg { width: 14px; height: 14px; }
.page-footer { margin: 24px auto 0; color: #aaa8a3; text-align: center; font-size: 10px; }

.mobile-brand { display: none; }
.signed-in { padding: 25px 0; text-align: center; }
.signed-in-icon { width: 52px; height: 52px; margin: 0 auto 23px; display: grid; place-items: center; border-radius: 50%; color: #4b987a; background: #eaf5ef; font-size: 23px; }
.signed-in h2 { margin-bottom: 8px; }
.signed-in p { margin-bottom: 28px; }
.write-link { width: 100%; min-height: 44px; margin-bottom: 10px; padding: 0 15px; display: flex; align-items: center; justify-content: space-between; border: 1px solid #e8e6e2; border-radius: 8px; color: var(--accent-dark); text-decoration: none; font-size: 12px; font-weight: 650; }
.write-link:hover { background: #f8f6fc; }

@media (max-width: 820px) {
  body { padding: 18px; }
  .page-shell { min-height: calc(100vh - 36px); grid-template-columns: .85fr 1.15fr; }
  .story-panel { padding: 34px 30px; }
  .form-panel { padding: 42px 30px 22px; }
}

@media (max-width: 620px) {
  body { padding: 0; background: #fff; }
  .page-shell { width: 100%; min-height: 100vh; display: block; border: 0; border-radius: 0; box-shadow: none; }
  .story-panel { display: none; }
  .form-panel { min-height: 100vh; padding: 28px 24px 20px; }
  .auth-card { width: min(100%, 390px); }
  .mobile-brand { display: inline-flex; margin-bottom: 45px; color: #302943; }
  .card-heading h2 { font-size: 30px; }
  .page-footer { margin-top: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

:root {
  color-scheme: dark;
  color: #eee8e5;
  background: #100d0e;
  --ink: #eee8e5;
  --muted: #a39796;
  --line: #392326;
  --accent: #bd2034;
  --accent-dark: #98182a;
}

body {
  color: var(--ink);
  background:
    radial-gradient(ellipse at 82% 10%, rgba(116, 22, 36, .18), transparent 30%),
    #100d0e;
}

.page-shell {
  border-color: #3a2024;
  background: #171112;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .55), 0 0 45px rgba(116, 22, 36, .1);
}

.story-panel {
  background:
    radial-gradient(ellipse at 20% 75%, rgba(145, 24, 42, .27), transparent 34%),
    linear-gradient(145deg, #1d1215 0%, #32141a 56%, #4a151f 100%);
}

.story-copy h1, .card-heading h2, .signed-in h2 {
  font-family: "UnifrakturCook", "Old English Text MT", Georgia, serif;
  font-weight: 700;
  letter-spacing: 0;
}

.story-copy h1 { font-size: clamp(48px, 5vw, 66px); }
.story-copy p, .card-heading p, .signed-in p { color: #c1b2b0; }
.story-footer p { color: #d3c3c0; }
.orbit { border-color: rgba(215, 136, 146, .2); }
.orbit-two { border-color: rgba(215, 136, 146, .15); }
.orbit-three { border-color: rgba(215, 136, 146, .12); }
.eyebrow, .story-panel .eyebrow { color: #d36a76; }
.status-dot { background: #d84353; box-shadow: 0 0 0 4px rgba(216, 67, 83, .14); }
.brand { color: #f0e5e2; }
.brand-mark { color: #e84c5d; }

.form-panel { color: var(--ink); background: #171112; }
.card-heading h2 { color: #f2e8e5; }
.mode-switch { background: #211719; }
.mode-button { color: #a99a98; }
.mode-button.is-active { color: #f3e8e6; background: #352125; box-shadow: inset 0 0 0 1px #593038; }
.divider { color: #91817f; }
.divider::before, .divider::after { background: #392326; }
.field { color: #c6b8b5; }
.field input {
  border-color: #493034;
  color: #f3e8e6;
  background: #100d0e;
}
.field input::placeholder { color: #766769; }
.field input:focus { border-color: #bd4a59; box-shadow: 0 0 0 3px rgba(189, 32, 52, .16); }
.reveal-button { color: #e17580; }
.form-message { color: #f08089; }
.form-message.is-success { color: #b6a270; }
.submit-button { color: #fff4f1; background: #a91c30; }
.submit-button:hover { background: #c02a3f; }
.privacy-note, .page-footer { color: #8d7e7d; }
.mobile-brand { color: #f0e5e2; }

.dashboard {
  width: 100%;
  min-height: 100vh;
  padding: 0 clamp(18px, 4vw, 72px) 58px;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(111, 20, 33, .16), transparent 30%),
    #100d0e;
}

.home-header {
  min-height: 90px;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 1fr) 1fr;
  align-items: center;
  gap: 20px;
  border-bottom: 1px solid rgba(119, 48, 57, .32);
}

.home-header .brand { font-family: "Spectral SC", Georgia, serif; font-size: 18px; letter-spacing: .12em; text-transform: uppercase; }
.home-header .brand-mark { width: 34px; height: 34px; border: 1px solid #7d2531; border-radius: 50%; color: #e04a5b; font-family: "UnifrakturCook", serif; font-size: 24px; }
.welcome-copy { text-align: center; }
.welcome-copy .eyebrow { font-size: 9px; }
.welcome-copy h1 { margin: 4px 0 0; color: #f0e5e2; font-family: "UnifrakturCook", "Old English Text MT", Georgia, serif; font-size: 26px; font-weight: 700; }
.header-profile { justify-self: end; width: 44px; height: 44px; overflow: hidden; display: grid; place-items: center; border: 1px solid #77303a; border-radius: 50%; color: #f5d6d5; background: #32171c; text-decoration: none; font-family: "Spectral SC", serif; font-size: 18px; }
.header-profile img { width: 100%; height: 100%; object-fit: cover; }

.dashboard-layout { width: min(1580px, 100%); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: clamp(24px, 3.2vw, 52px); align-items: start; }
.discovery-column { min-width: 0; }
.category-section { padding-top: 30px; }
.section-heading { margin-bottom: 16px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
.section-heading .eyebrow { color: #b35662; }
.section-heading h2 { margin: 5px 0 0; color: #f0e7e4; font-family: "UnifrakturCook", "Old English Text MT", Georgia, serif; font-size: clamp(30px, 3vw, 40px); font-weight: 700; }
.carousel-controls { display: flex; gap: 8px; }
.arrow-button, .icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid #582a31;
  border-radius: 50%;
  color: #f0d7d6;
  background: #1c1315;
  font-size: 18px;
  transition: background .18s, border-color .18s, transform .18s;
}
.arrow-button:hover, .icon-button:hover { transform: translateY(-1px); border-color: #a43a49; background: #32181d; }
.carousel-viewport { overflow: hidden; padding: 4px 1px 14px; }
.category-track { display: flex; gap: 16px; will-change: transform; transition: transform .42s cubic-bezier(.2,.8,.2,1); }
.category-card {
  position: relative;
  flex: 0 0 calc((100% - 32px) / 3);
  min-width: 220px;
  height: clamp(260px, 30vw, 370px);
  padding: 18px;
  display: flex;
  align-items: end;
  overflow: hidden;
  border: 1px solid #54242c;
  border-radius: 13px;
  color: #fff3ef;
  background-color: #29171a;
  background-position: center;
  background-size: cover;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
  text-align: left;
  transition: border-color .18s, transform .18s, filter .18s;
}
.category-card:hover { transform: translateY(-3px); border-color: #c04756; filter: saturate(1.08); }
.category-card.is-selected { border-color: #ee5969; box-shadow: 0 0 0 1px #ee5969, 0 14px 28px rgba(0, 0, 0, .32); }
.category-card-label { max-width: 100%; font-family: "Yeseva One", "UnifrakturCook", Georgia, serif; font-size: clamp(29px, 3vw, 44px); font-weight: 400; line-height: 1.05; text-shadow: 0 3px 14px #000; overflow-wrap: anywhere; }
.category-filter { min-height: 27px; display: flex; align-items: center; gap: 12px; color: #9c8b89; font-size: 11px; }
.category-filter button { padding: 3px 7px; border: 0; color: #dd7a84; background: transparent; font-size: 10px; text-decoration: underline; }

.hot-section { padding-top: 30px; }
.hot-section .section-heading { padding-bottom: 13px; border-bottom: 1px solid #382226; }
.hot-section .section-heading h2 { font-size: 38px; letter-spacing: .04em; }
.hot-flame { color: #d33b4c; font-family: "Spectral SC", serif; font-size: 22px; vertical-align: 5px; }
.section-note { color: #8f7e7e; font-size: 10px; }
.hot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.hot-story-card { min-width: 0; overflow: hidden; border: 1px solid #3c2529; border-radius: 11px; background: linear-gradient(145deg, #1e1517, #171112); cursor: pointer; }
.hot-story-image { width: 100%; height: 155px; display: block; object-fit: cover; background: #241519; }
.hot-story-copy { padding: 14px 15px 3px; }
.story-category { color: #d26672; font-family: "Spectral SC", Georgia, serif; font-size: 9px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.hot-story-copy h3 { margin: 6px 0; color: #eee4e1; font-family: "Spectral SC", Georgia, serif; font-size: 17px; font-weight: 600; }
.story-author, .story-stats { margin: 0; color: #9c8a89; font-size: 10px; }
.story-excerpt { min-height: 34px; margin: 10px 0; color: #c1b2b0; font-size: 11px; line-height: 1.55; }
.story-stats { color: #d0a6a6; }
.hot-story-actions { padding: 11px 14px 14px; display: flex; gap: 8px; }
.read-story-button, .save-story-button, .like-story-button, .outline-button {
  min-height: 35px;
  padding: 0 12px;
  border: 1px solid #72303a;
  border-radius: 6px;
  color: #f2e5e2;
  background: #3a171e;
  font-size: 10px;
  font-weight: 650;
}
.read-story-button:hover, .save-story-button:hover, .like-story-button:hover, .outline-button:hover { border-color: #c84858; background: #521a25; }
.save-story-button { color: #d5b3b0; background: transparent; }
.like-story-button { color: #ed8790; background: transparent; }
.empty-state { grid-column: 1 / -1; padding: 38px 20px; border: 1px dashed #55323a; border-radius: 10px; color: #ab9997; text-align: center; font-size: 12px; }
.home-status { min-height: 18px; color: #e58b93; font-size: 11px; }

.user-sidebar { position: sticky; top: 20px; padding-top: 30px; display: grid; gap: 13px; }
.account-card, .library-card { padding: 17px; border: 1px solid #3e272b; border-radius: 11px; background: #191214; }
.account-topline { display: flex; align-items: center; justify-content: space-between; }
.account-topline .eyebrow { color: #b35662; }
.icon-button { flex: 0 0 34px; width: 34px; height: 34px; font-size: 17px; }
.account-identity { margin-top: 14px; display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.account-avatar { width: 48px; height: 48px; flex: 0 0 48px; overflow: hidden; display: grid; place-items: center; border: 1px solid #7f303a; border-radius: 50%; color: #f5d6d5; background: #32171c; font-family: "Spectral SC", serif; font-size: 19px; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; }
.account-name-wrap { min-width: 0; display: grid; gap: 4px; }
.account-name-wrap strong { overflow: hidden; color: #f1e7e4; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.account-name-wrap span { overflow: hidden; color: #958483; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.profile-link { margin-top: 14px; padding-top: 12px; display: flex; justify-content: space-between; border-top: 1px solid #362327; color: #d27a83; text-decoration: none; font-size: 10px; }
.create-story-button { min-height: 63px; padding: 10px 13px; display: flex; align-items: center; gap: 12px; border: 1px solid #a43545; border-radius: 9px; color: #fff1ed; background: linear-gradient(115deg, #811a2a, #46151d); text-align: left; box-shadow: 0 8px 24px rgba(91, 13, 26, .2); }
.create-story-button:hover { background: linear-gradient(115deg, #a32336, #5a1721); }
.create-mark { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; font-size: 20px; }
.create-story-button strong, .create-story-button small { display: block; }
.create-story-button strong { font-family: "Spectral SC", Georgia, serif; font-size: 11px; }
.create-story-button small { margin-top: 4px; color: #d5a5a5; font-size: 9px; }
.library-card { padding: 12px 14px 15px; }
.library-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; border-radius: 6px; background: #100d0e; }
.library-tab { min-height: 29px; border: 0; border-radius: 4px; color: #a08e8d; background: transparent; font-size: 10px; }
.library-tab.is-active { color: #f2e7e4; background: #3a1c22; box-shadow: inset 0 0 0 1px #5a2a32; }
.library-card h2 { margin: 16px 2px 8px; color: #e9ddda; font-family: "Spectral SC", Georgia, serif; font-size: 12px; font-weight: 600; }
.library-list { max-height: 310px; overflow-y: auto; }
.library-item { width: 100%; padding: 10px 2px; display: grid; gap: 4px; border: 0; border-top: 1px solid #302024; color: inherit; background: transparent; text-align: left; }
.library-item:hover strong { color: #f08a93; }
.library-item strong { overflow: hidden; color: #d9cdca; font-family: "Spectral SC", Georgia, serif; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.library-item span, .library-empty { color: #958382; font-size: 9px; }
.library-empty { padding: 11px 2px; line-height: 1.6; }
.signout-button { padding: 9px 3px; display: flex; justify-content: space-between; border: 0; color: #998686; background: transparent; text-align: left; font-size: 10px; }
.signout-button:hover { color: #e27d87; }

.hollow-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: min(88vh, 900px);
  padding: clamp(20px, 4vw, 38px);
  overflow: auto;
  border: 1px solid #67303a;
  border-radius: 13px;
  color: #efe5e2;
  background: #181113;
  box-shadow: 0 25px 100px rgba(0, 0, 0, .75);
}
.hollow-dialog::backdrop { background: rgba(7, 5, 6, .82); backdrop-filter: blur(4px); }
.dialog-close-row { display: flex; justify-content: end; }
.hollow-dialog h2 { margin: 5px 0 8px; color: #f2e5e2; font-family: "UnifrakturCook", "Old English Text MT", Georgia, serif; font-size: 34px; }
.hollow-dialog > p:not(.story-byline):not(.dialog-message) { color: #a99896; font-size: 11px; line-height: 1.6; }
.create-category-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.create-category-card { min-width: 0; height: 125px; flex-basis: auto; padding: 12px; border-radius: 8px; }
.create-category-card .category-card-label { font-size: clamp(19px, 3vw, 28px); }
.setting-row { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #362327; }
.setting-row:first-of-type { margin-top: 20px; }
.setting-row strong, .setting-row small { display: block; }
.setting-row strong { color: #e7d9d6; font-size: 11px; }
.setting-row small { max-width: 410px; margin-top: 5px; color: #988684; font-size: 9px; line-height: 1.5; }
.setting-row input { width: 17px; height: 17px; accent-color: #c1273a; }
.dialog-message { min-height: 18px; color: #df8c92; font-size: 10px; }
.dialog-message.is-success { color: #b6a270; }
.settings-dialog { width: min(820px, calc(100vw - 28px)); }
.settings-section { margin-top: 22px; padding-top: 18px; border-top: 1px solid #392326; }
.settings-section h3 { margin: 0 0 12px; color: #eedfdd; font-family: "Spectral SC", Georgia, serif; font-size: 13px; }
.settings-form-grid, .account-settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.settings-field { min-width: 0; margin-bottom: 12px; display: grid; gap: 6px; color: #c6b8b5; font-size: 10px; }
.settings-field > span { display: block; }
.settings-field > span small { color: #95817f; font-size: 9px; font-weight: 400; }
.settings-field input, .settings-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid #493034;
  border-radius: 6px;
  outline: none;
  color: #f3e8e6;
  background: #100d0e;
  font-size: 11px;
}
.settings-field textarea { min-height: 70px; resize: vertical; }
.settings-field input:focus, .settings-field textarea:focus { border-color: #bd4a59; box-shadow: 0 0 0 3px rgba(189, 32, 52, .16); }
.settings-field-wide { grid-column: 1 / -1; }
.settings-media-list { border-top: 1px solid #382529; }
.settings-media-row { min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid #382529; }
.settings-media-row strong, .settings-media-row small { display: block; }
.settings-media-row strong { color: #e7d9d6; font-size: 10px; }
.settings-media-row small { margin-top: 4px; color: #988684; font-size: 9px; }
.settings-media-row .outline-button { min-height: 32px; padding: 0 11px; border: 1px solid #67313a; border-radius: 6px; color: #f0d9d7; background: #271619; font-size: 9px; }
.settings-media-row .outline-button:hover { border-color: #bd4a59; background: #451820; }
.account-settings-grid { gap: 12px; }
.account-settings-grid form { min-width: 0; padding: 14px; border: 1px solid #382529; border-radius: 8px; background: #130f10; }
.account-settings-grid h4 { margin: 0 0 13px; color: #e7d9d6; font-family: "Spectral SC", Georgia, serif; font-size: 10px; }
.account-settings-grid .submit-button { min-height: 38px; font-size: 10px; }
.story-dialog { width: min(850px, calc(100vw - 28px)); }
.story-dialog h2 { font-size: clamp(32px, 5vw, 48px); }
.story-byline { margin: 0 0 16px; color: #aa9492; font-size: 11px; }
.story-actions { margin-top: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.rating-control { display: flex; gap: 2px; }
.rating-control button { padding: 3px; border: 0; color: #76686a; background: transparent; font-size: 17px; }
.rating-control button.is-rated, .rating-control button:hover { color: #d9a14b; }
.rating-summary { color: #ac9a96; font-size: 9px; }
.outline-button { background: transparent; }
.story-card-meta { margin: 0 0 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.story-tag-chip, .story-meta-chip {
  padding: 5px 9px;
  display: inline-flex;
  border: 1px solid #3e3032;
  border-radius: 18px;
  color: #c3b4b1;
  background: rgba(35, 27, 29, .8);
  font-size: 9px;
  line-height: 1.15;
}
.story-dialog {
  position: relative;
  width: min(1180px, calc(100vw - 32px));
  max-height: min(94vh, 1050px);
  padding: 0;
  overflow: auto;
  scroll-behavior: smooth;
}
.story-close-row { position: absolute; z-index: 4; top: 16px; right: 17px; }
.story-close-row .icon-button { border-color: rgba(236, 226, 224, .45); color: #fff; background: rgba(10, 8, 9, .7); }
.story-hero {
  position: relative;
  min-height: clamp(390px, 54vw, 560px);
  display: flex;
  align-items: end;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 74% 38%, rgba(119, 111, 121, .24), transparent 35%),
    linear-gradient(120deg, #090809, #21181b 64%, #100d0e);
}
.story-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; object-position: center 42%; }
.story-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7, 6, 7, .97) 0%, rgba(9, 7, 8, .83) 38%, rgba(9, 7, 8, .2) 100%), linear-gradient(0deg, rgba(8, 6, 7, .9), transparent 52%); }
.story-hero-copy { position: relative; z-index: 1; width: min(720px, 76%); padding: 55px clamp(24px, 5vw, 62px) 42px; }
.story-original-label { color: #e34757; font-family: "Spectral SC", Georgia, serif; font-size: 10px; font-weight: 700; letter-spacing: .18em; }
.story-hero-copy h2 { margin: 13px 0 14px; color: #f0e7e5; font-family: "Spectral SC", Georgia, serif; font-size: clamp(39px, 6vw, 72px); font-weight: 400; letter-spacing: .035em; line-height: 1.02; text-transform: uppercase; text-shadow: 0 3px 22px #000; }
.story-meta-badges { display: flex; flex-wrap: wrap; gap: 7px; }
.story-meta-chip { padding: 7px 11px; border-color: rgba(232, 220, 218, .2); color: #ded3d1; background: rgba(13, 10, 11, .7); }
.story-hero-about { max-width: 480px; margin: 13px 0 0; color: #c3b8b6; font-family: Georgia, "Times New Roman", serif; font-size: 14px; line-height: 1.6; }
.story-byline { margin: 10px 0 0; color: #aa9492; font-size: 10px; }
.story-byline a { color: #ded1cf; text-decoration: none; }
.story-byline a:hover { color: #ef8790; }
.story-read-button {
  min-height: 39px;
  padding: 0 17px;
  border: 1px solid #b61e31;
  border-radius: 22px;
  color: #fff;
  background: #951728;
  font-size: 10px;
  font-weight: 700;
}
.story-read-button:hover { background: #b51c31; }
.story-share-button {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(232, 220, 218, .35);
  border-radius: 50%;
  color: #e8ddda;
  background: rgba(15, 12, 13, .55);
  font-size: 15px;
}
.story-share-button:hover { border-color: #bd4a59; background: #34171c; }
.story-detail-message { margin: 0; padding: 0 28px; }
.story-detail-grid {
  margin: 0 24px;
  display: grid;
  grid-template-columns: minmax(180px, .9fr) minmax(280px, 2.2fr) minmax(190px, 1.15fr);
  border: 1px solid #342629;
  border-radius: 10px;
  background: rgba(14, 11, 12, .91);
}
.story-detail-column { min-width: 0; padding: 20px; }
.story-detail-column + .story-detail-column { border-left: 1px solid #302326; }
.story-detail-column h3, .story-more-heading h3 {
  margin: 0 0 13px;
  color: #e8ddda;
  font-family: "Spectral SC", Georgia, serif;
  font-size: 16px;
  font-weight: 500;
}
.story-detail-column h3 { padding-left: 9px; border-left: 2px solid #b92639; }
.story-detail-column > p { margin: 9px 0; color: #ac9d9b; font-size: 10px; line-height: 1.45; }
.story-detail-column > p > span:first-child { margin-right: 7px; color: #bd9b9e; }
.story-detail-column > p strong { color: #d7cac8; font-weight: 500; }
.story-about-column > p { margin: 0; color: #d3c6c4; font-family: Georgia, "Times New Roman", serif; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.story-tag-list { display: flex; flex-wrap: wrap; gap: 7px; }
.story-reader-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.story-reader-heading .eyebrow { color: #c55d68; }
.story-rating { display: flex; align-items: center; gap: 9px; }
.story-overview-rating { margin: 20px 24px; padding: 15px 20px; border: 1px solid #342629; border-radius: 9px; background: rgba(14, 11, 12, .91); }
.story-more-section { padding: 5px clamp(24px, 5vw, 62px) 32px; }
.story-more-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.story-more-heading h3 { padding-left: 9px; border-left: 2px solid #b92639; }
.story-more-heading > span { color: #998988; font-size: 9px; }
.story-recommendations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.story-recommendation { min-width: 0; padding: 0; overflow: hidden; border: 1px solid #38282b; border-radius: 8px; color: #eee5e2; background: #171112; text-align: left; }
.story-recommendation:hover { border-color: #9c3c49; }
.story-recommendation img { width: 100%; height: 110px; display: block; object-fit: cover; background: #241519; }
.story-recommendation > span { padding: 10px; display: grid; gap: 5px; }
.story-recommendation small { color: #c56872; font-size: 8px; text-transform: uppercase; }
.story-recommendation strong { overflow: hidden; font-family: "Spectral SC", Georgia, serif; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.admin-description { margin: 0 0 14px; color: #a99896; font-size: 10px; line-height: 1.6; }
.admin-list-toolbar { display: flex; align-items: end; gap: 12px; }
.admin-list-toolbar .settings-field { flex: 1; }
.admin-list-toolbar input { min-height: 36px; }
.admin-user-list { display: grid; gap: 8px; }
.admin-user-row { min-width: 0; padding: 11px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #382529; border-radius: 7px; background: #130f10; }
.admin-user-info { min-width: 0; display: grid; gap: 5px; }
.admin-user-info strong { overflow: hidden; color: #eee1df; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-info small { overflow: hidden; color: #a18d8b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-role { color: #d18489; font-size: 8px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.admin-user-role.is-banned { color: #ef7c87; }
.admin-user-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: end; gap: 6px; }
.admin-user-actions button, .admin-list-toolbar > button { min-height: 30px; padding: 0 9px; border: 1px solid #67313a; border-radius: 5px; color: #f0d9d7; background: #271619; font-size: 9px; }
.admin-user-actions button:hover, .admin-list-toolbar > button:hover { border-color: #bd4a59; background: #451820; }
.admin-user-actions button.is-danger { color: #ef9ca3; }
.admin-user-actions button:disabled, .admin-list-toolbar > button:disabled { cursor: wait; opacity: .6; }
.admin-empty { padding: 20px; border: 1px dashed #55323a; border-radius: 7px; color: #ab9997; text-align: center; font-size: 10px; }

@media (max-width: 950px) {
  .dashboard-layout { grid-template-columns: minmax(0, 1fr) 255px; gap: 20px; }
  .category-card { flex-basis: calc((100% - 16px) / 2); }
  .hot-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .dashboard { padding: 0 15px 35px; }
  .home-header { min-height: 75px; grid-template-columns: 1fr auto; }
  .home-header .brand { font-size: 15px; }
  .welcome-copy { display: none; }
  .dashboard-layout { grid-template-columns: minmax(0, 1fr); gap: 5px; }
  .discovery-column { grid-row: 2; }
  .category-section { padding-top: 20px; }
  .category-card { flex-basis: 78%; min-width: 0; height: 265px; }
  .user-sidebar { position: static; padding-top: 18px; grid-row: 1; grid-template-columns: 1fr 1fr; align-items: start; }
  .account-card, .library-card { grid-column: 1 / -1; }
  .account-card { grid-row: 1; }
  .create-story-button { grid-column: 1 / -1; grid-row: 2; }
  .library-card { grid-row: 3; }
  .signout-button { grid-column: 1 / -1; }
  .hot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hot-story-image { height: 120px; }
  .hot-story-actions { flex-wrap: wrap; }
  .section-note { display: none; }
}

@media (max-width: 440px) {
  .hot-grid { grid-template-columns: 1fr; }
  .hot-story-image { height: 165px; }
  .create-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-actions { align-items: flex-start; }
}

@media (max-width: 620px) {
  .settings-form-grid, .account-settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-field-wide { grid-column: auto; }
  .settings-section { margin-top: 18px; padding-top: 15px; }
  .settings-media-row { gap: 8px; }
  .settings-media-row small { max-width: 190px; line-height: 1.4; }
  .admin-user-row { align-items: flex-start; flex-direction: column; }
  .admin-user-actions { justify-content: start; }
}

@media (max-width: 760px) {
  .story-dialog { width: calc(100vw - 18px); max-height: 96vh; }
  .story-hero { min-height: 440px; }
  .story-hero-copy { width: min(100%, 600px); padding: 48px 22px 28px; }
  .story-hero-copy h2 { font-size: clamp(35px, 9vw, 54px); }
  .story-detail-grid { margin: 0 12px; grid-template-columns: minmax(0, 1fr); }
  .story-detail-column + .story-detail-column { border-top: 1px solid #302326; border-left: 0; }
  .story-recommendations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-more-section { padding-right: 20px; padding-left: 20px; }
}

@media (max-width: 440px) {
  .story-reader-heading { align-items: flex-start; flex-direction: column; }
  .story-recommendation img { height: 85px; }
  .story-detail-column { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .category-track { transition: none; }
}

.home-header .brand-mark { padding: 2px; }
.field textarea {
  width: 100%;
  min-height: 74px;
  padding: 11px 13px;
  resize: vertical;
  border: 1px solid #493034;
  border-radius: 8px;
  outline: none;
  color: #f3e8e6;
  background: #100d0e;
  font-family: inherit;
  font-size: 12px;
  font-weight: 450;
  line-height: 1.5;
}
.field textarea::placeholder { color: #766769; }
.field textarea:focus { border-color: #bd4a59; box-shadow: 0 0 0 3px rgba(189, 32, 52, .16); }
.field-hint { color: #92807e; font-size: 9px; font-weight: 400; line-height: 1.5; }
.optional-details { margin: -2px 0 15px; border: 1px solid #493034; border-radius: 8px; background: #130f10; }
.optional-details summary { padding: 12px; color: #e2cdca; cursor: pointer; font-size: 10px; font-weight: 600; list-style-position: inside; }
.optional-details summary span { color: #95817f; font-weight: 400; }
.optional-details-body { padding: 0 12px 5px; }
.photo-field { display: grid; gap: 7px; margin: 0 0 15px; color: #c6b8b5; font-size: 11px; font-weight: 620; }
.photo-picker { display: flex; align-items: center; gap: 10px; }
.photo-picker button { min-height: 34px; padding: 0 11px; border: 1px solid #67313a; border-radius: 6px; color: #f0d9d7; background: #271619; font-size: 10px; }
.photo-picker button:hover { border-color: #bd4a59; background: #451820; }
.photo-picker span { min-width: 0; overflow: hidden; color: #a79593; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.account-name-wrap #sidebar-handle { color: #d18489; font-family: "Spectral SC", Georgia, serif; }

.reviewer-access-button {
  position: fixed;
  z-index: 20;
  top: 14px;
  right: 20px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #78303a;
  border-radius: 22px;
  color: #f0dfdc;
  background: rgba(31, 16, 19, .94);
  font-size: 11px;
  font-weight: 650;
  box-shadow: 0 5px 20px rgba(0, 0, 0, .28);
}

.reviewer-access-button:hover {
  border-color: #c34b59;
  background: #35171c;
}

.reviewer-access-button:disabled {
  cursor: wait;
  opacity: .7;
}

.reviewer-preview-toast {
  position: fixed;
  z-index: 40;
  top: 18px;
  left: 50%;
  width: min(520px, calc(100vw - 28px));
  padding: 13px 17px;
  transform: translateX(-50%);
  border: 1px solid #74313b;
  border-radius: 8px;
  color: #f0dfdc;
  background: rgba(25, 16, 18, .97);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .55);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.story-author-link {
  color: inherit;
  text-decoration-color: #77404a;
  text-underline-offset: 3px;
}

.story-author-link:hover { color: #ef8791; }

@media (max-width: 620px) {
  .reviewer-access-button {
    top: 12px;
    right: 12px;
    min-height: 36px;
    padding: 0 11px;
    font-size: 9px;
  }
}
