:root {
  --ink: #0b1230;
  --muted: #657092;
  --line: #d9def3;
  --paper: #f7f8ff;
  --accent: #ff6958;
  --dark: #111c42;
}

body { background: var(--paper); color: var(--ink); }
a:hover { color: #e95864; }
:focus-visible { outline-color: #8e7bfa !important; }
.site-header { background: rgba(255,255,255,.94); border-color: #e7e9f7; }
.nav { min-height: 70px; }
.brand { font-size: 27px; }
.brand-mark { width: 40px; height: 40px; border-radius: 7px; background: #111a3a; box-shadow: 0 5px 14px #17244b25; }
.nav nav { gap: clamp(14px,2.4vw,33px); }
.nav-join { position: relative; isolation: isolate; border: 0; border-radius: 8px; padding: 11px 22px; background: linear-gradient(110deg,#ff9956,#ff6688,#b993ff); }
.nav-join:before { content: ''; position: absolute; inset: 1.5px; z-index: -1; border-radius: 6.5px; background: #fff; }
.nav-join:hover { color: #a84f8c; }
.eyebrow { color: #ff6958; letter-spacing: .17em; }
.button { border-radius: 8px; }
.button:hover { transform: translateY(-1px); }
.text-link { color: #4b4f81; }

/* Home */
.home-page .intro { min-height: 392px; margin-top: 20px; padding: 42px clamp(32px,5vw,68px); border-radius: 18px; box-shadow: 0 20px 44px #15204a14; background: linear-gradient(90deg,rgba(8,17,48,.74),rgba(12,20,56,.29) 60%,rgba(16,16,53,.04)),url('/assets/hero-portal.webp') center / cover no-repeat; }
.intro-copy { max-width: 715px; }
.home-page .intro .eyebrow { color: #c5aaff; }
.home-page .intro .eyebrow:after { content: ''; display: inline-block; width: min(16vw,200px); height: 1px; margin: 0 0 4px 16px; background: linear-gradient(90deg,#a78aea,transparent); }
.home-page .intro h1 { margin: 15px 0 11px; font-size: clamp(44px,5.5vw,78px); line-height: 1.01; font-weight: 800; letter-spacing: -.062em; }
.home-page .intro h1 em { font: inherit; font-style: normal; letter-spacing: inherit; color: #ffc2b5; background: linear-gradient(95deg,#f6a9ed 5%,#ffafab 56%,#ffc39c); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.home-page .intro p { font-size: clamp(16px,1.55vw,19px); line-height: 1.5; color: #e5e7fa; }
.hero-actions { margin-top: 22px; gap: 30px; }
.home-page .intro .button,.vote-panel .button { min-height: 48px; padding: 12px 22px; color: #10142c; border: 0; background: linear-gradient(105deg,#ffaf7e,#ff9db9 57%,#b994ff); box-shadow: 0 9px 20px #bd88bb2b; }
.home-page .intro .button:hover,.vote-panel .button:hover { filter: brightness(1.055); }
.hero-link { border-bottom: 2px solid #d3a1ea; }
.intro-feature { justify-content: flex-end; min-width: 200px; padding-left: 27px; border-left: 1px solid #d1abf27a; }
.feature-kicker,.feature-orbit { display: none; }
.feature-count { align-items: center; }
.feature-count strong { font-size: clamp(50px,6vw,78px); font-weight: 800; letter-spacing: -.07em; }
.feature-count span { color: #f2eefe; font-size: 15px; line-height: 1.35; }
.home-page .section-head { margin-top: 32px; margin-bottom: 12px; }
.home-page .section-head h2 { margin-top: 3px; font-size: clamp(27px,3vw,38px); line-height: 1.15; }
.home-page .section-head .eyebrow:after { content: ''; display: inline-block; width: 54px; height: 1px; margin: 0 0 3px 12px; background: #ff8b81; }
.popular-grid { gap: 14px; }
.universe-card { min-height: 200px; padding: 18px; border-radius: 10px; background: #162349; transition: transform .18s ease,box-shadow .18s ease; }
.universe-card:hover { box-shadow: 0 13px 27px #121c4630; }
.universe-card img { opacity: .95; }
.universe-card:after { background: linear-gradient(180deg,transparent 40%,rgba(7,11,32,.76) 100%); }
.universe-content strong { font-size: clamp(18px,1.8vw,23px); }
.universe-content small { font-size: 12px; }
.universe-arrow { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid #ffffff70; border-radius: 50%; background: #ffffff22; font-size: 19px; line-height: 1; }
.universe-slider { gap: 14px; padding-bottom: 12px; scrollbar-color: #ced2e9 transparent; }
.universe-slider .universe-card { flex-basis: 280px; }
.slider-actions button { width: 46px; height: 46px; border-color: #cfd5ef; background: transparent; color: #1a2750; }
.slider-actions button:last-child { border-color: #ff737e; }
.story-card { position: relative; display: flex; flex-direction: column; min-height: 268px; overflow: hidden; padding: 25px 28px 21px; border-color: #dce1f3; border-radius: 12px; background: linear-gradient(145deg,#fff 62%,#f5f2ff); box-shadow: 0 7px 24px #1f2b5910; transition: transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.story-card:before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(#ff9c77,#e59cdd,#a895fc); }
.story-card:after { content: ''; position: absolute; right: -60px; top: -90px; width: 220px; height: 220px; border: 1px solid #dddcf8; border-radius: 50%; pointer-events: none; }
.story-card:hover { transform: translateY(-3px); border-color: #cbd0ed; box-shadow: 0 15px 32px #1f2b591a; }
.story-card-top,.story-card h3,.story-card p,.story-card-bottom { position: relative; z-index: 1; }
.story-card-top { align-items: center; }
.story-card h3 { margin: 17px 0 9px; font-size: clamp(21px,2vw,25px); line-height: 1.23; }
.story-card h3 a:hover { color: #c25487; }
.story-card p { margin-bottom: 24px; color: #626d8c; font-size: 14px; line-height: 1.65; }
.story-card .eyebrow { color: #f36667; font-size: 11px; }
.story-card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; padding-top: 16px; border-top: 1px solid #e4e5f3; }
.story-card .story-meta { display: flex; align-items: center; gap: 7px 15px; padding: 0; border: 0; color: #6a7293; font-size: 12px; }
.story-card .story-meta span { white-space: nowrap; }
.story-card .story-author { color: #343e65; font-weight: 700; }
.story-card .story-score { color: #30385d; font-weight: 800; }
.story-card .story-score span { color: #ff8277; font-size: 16px; }
.story-read { display: grid; place-items: center; width: 37px; height: 37px; flex: 0 0 37px; border: 1px solid #d8c9ee; border-radius: 50%; color: #584884; background: #f7f1ff; font-size: 20px; line-height: 1; }
.story-read:hover { border-color: #e987b1; color: #a94478; background: #ffeef8; }

/* Universe headers use their editable cover as a full-width backdrop. */
.universe-page { background: linear-gradient(180deg,#f3f5ff,#f8f9ff 560px); }
.universe-hero { position: relative; isolation: isolate; display: flex; align-items: end; min-height: 330px; margin-top: 24px; overflow: hidden; border: 1px solid #3c4774; border-radius: 17px; background: radial-gradient(circle at 78% 20%,#473b7b,#17264b 45%,#101a3c); color: #fff; box-shadow: 0 17px 37px #1e2b5b1c; }
.universe-hero img { position: absolute; z-index: -2; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 45%; opacity: .85; }
.universe-hero:after { content: ''; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,rgba(8,16,46,.96),rgba(8,16,46,.76) 48%,rgba(8,16,46,.19)),linear-gradient(0deg,rgba(7,14,40,.44),transparent 45%); pointer-events: none; }
.universe-hero > div { position: relative; z-index: 1; width: 100%; max-width: 780px; padding: 42px clamp(28px,5vw,60px); }
.universe-hero .eyebrow { color: #ff9b8c; }
.universe-hero h1 { margin: 13px 0 9px; color: #fff; font-size: clamp(42px,5vw,66px); line-height: 1.04; }
.universe-hero p { max-width: 650px; margin: 0 0 17px; color: #e6e8fc; font-size: clamp(16px,1.7vw,19px); }
.universe-hero .muted { display: inline-block; color: #f3d4ec; font-weight: 700; }
.universe-page .section-head { margin-top: 42px; }
.universe-page .section-head h2 { font-size: clamp(28px,3vw,36px); }

/* Story page */
.story-page { background: linear-gradient(180deg,rgba(246,248,255,.75),rgba(247,248,255,.95) 380px,#f7f8ff 750px),url('/assets/hero-portal.webp') top center / auto 530px no-repeat,#f7f8ff; }
.story-detail,.story-page .reader,.story-page .reader-open,.story-page .vote-panel,.story-page .comments { max-width: 1000px; }
.story-detail { margin-top: 68px; margin-bottom: 28px; }
.story-detail .eyebrow { color: #ff6859; }
.story-detail h1 { font-size: clamp(43px,5.2vw,68px); line-height: 1.04; letter-spacing: -.065em; margin: 17px 0 14px; }
.story-detail .lead { max-width: 950px; color: #626d95; font-size: clamp(18px,1.7vw,21px); }
.detail-meta { gap: 10px 25px; margin: 26px 0; color: #657092; font-size: 14px; }
.detail-meta strong { color: #4b5476; font-weight: 600; }
.rating-overview { border-color: #d5dcf2; background: #ffffffc7; backdrop-filter: blur(8px); border-radius: 8px; }
.rating-overview > div { min-height: 96px; padding: 17px 23px; border-color: #d5dcf2; }
.rating-overview small { color: #6d789f; font-size: 14px; }
.rating-overview strong { color: #101936; font-size: 22px; line-height: 1.2; }
.rating-overview strong .muted { font-size: 15px; }
.story-page .reader { border-color: #d0d8f0; background: #f7f7ff; box-shadow: 0 8px 24px #25316b0b; }
.reader-toolbar { min-height: 72px; background: linear-gradient(105deg,#131d43,#182a58 75%,#111a40); color: #fff; border-color: #43507a; }
.reader-controls button,.reader-controls select { background: #233158; border: 1px solid #576488; color: #fff; }
.reader-controls button.active { border-color: #ffb0a7; color: #fff; background: linear-gradient(135deg,#b06ba8,#354a80); }
.reader-controls label { color: #fff; }
.reader-body { color: #28314d; }
.story-page .reader-body { min-height: 130px; padding: 38px 46px; }
.reader.dark { background: #161e38; color: #e9edfa; }
.reader.dark .reader-body { color: #e9edfa; }
.reader.dark .reader-toolbar { background: #0f1834; }
.reader-open { margin-top: 18px; }
.reader-open .button { border: 1px solid #cbd3ee; background: #ffffffca; color: #121a37; }
.reader-open .button:hover { background: #fff; }
.vote-panel { margin-top: 30px; margin-bottom: 60px; padding: 28px 31px; border-color: #d1d9f1; background: #ffffffd9; box-shadow: 0 8px 22px #2431600c; }
.vote-panel h2 { font-size: clamp(29px,3vw,38px); font-weight: 600; }
.vote-panel p { margin: 10px 0 0; color: #69739c; }
.vote-panel fieldset label { white-space: nowrap; }
.vote-panel .button { white-space: normal; }
.comments .section-head { margin-top: 0; }
.comments .section-head h2 { font-size: clamp(32px,3.1vw,39px); }
.comments .empty { border-color: #bbc7e9; background: #ffffffa8; }
.comment-form,.comment { border-color: #d7def2; background: #ffffffdc; }
.comment.reply { background: #f4f5ff; border-left-color: #a68ae8; }
.author-badge { background: #e5dcff; color: #564095; }

/* Five clear, keyboard accessible choices with a live word label. */
.star-rating { gap: 4px; margin: 3px 0 8px; }
.star-rating label { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; font-size: 40px; color: #c9cde1; text-shadow: 0 1px 0 #fff; transition: color .14s,transform .14s,background .14s; }
.star-rating label:hover { transform: translateY(-3px) scale(1.06); background: #ffedf1; }
.star-rating input:checked ~ label,.star-rating label:hover,.star-rating label:hover ~ label { color: #ff8673; }
.star-rating input:focus-visible + label { outline: 3px solid #a98bf5; }
.rating-description { display: block; min-height: 20px; color: #69739c; font-size: 13px; }

.reading-page { background: #f7f8ff; }
.reading-page .reader-toolbar { background: #111b3e; }
.reading-page .reader-body { color: #293354; }
.reading-page .reader.dark .reader-body { color: #e9edfa; }
.site-footer { border-color: #e0e4f3; }

/* Admin tools */
.admin-page .page-top { margin-bottom: 20px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; padding-bottom: 14px; border-bottom: 1px solid #dce1f1; }
.admin-tabs a,.admin-filter a { padding: 9px 15px; border: 1px solid #dbe0ef; border-radius: 8px; background: #fff; color: #485477; font-size: 14px; font-weight: 700; }
.admin-tabs a[aria-current=page],.admin-filter a[aria-current=page] { border-color: #b5a1ed; background: #f1eaff; color: #493373; }
.admin-split { display: grid; grid-template-columns: minmax(290px,.88fr) minmax(0,1.45fr); align-items: start; gap: 22px; margin-bottom: 70px; }
.admin-panel,.admin-create { padding: 24px; border: 1px solid #dce1f3; border-radius: 12px; background: #fff; box-shadow: 0 7px 24px #1f2b590b; }
.admin-panel .section-head { margin: 0 0 18px; }
.admin-panel .section-head h2 { font-size: 27px; }
.admin-panel .search { margin-bottom: 18px; }
.admin-panel .search input { flex: 1; min-width: 0; }
.admin-cover { display: block; max-width: 210px; max-height: 115px; object-fit: cover; margin-bottom: 18px; border-radius: 7px; }
.admin-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.admin-list { margin: 0; }
.admin-list-row,.admin-user-row { align-items: start; }
.admin-list-row>div:first-child,.admin-user-row>div:first-child { flex: 1; min-width: 0; }
.admin-list-row .admin-row-actions { display: flex; flex-direction: row; flex-wrap: wrap; align-items: start; gap: 12px; }
.admin-row-actions>a { padding: 7px 0; font-size: 13px; font-weight: 800; }
.inline-delete { position: relative; font-size: 13px; }
.inline-delete summary { padding: 7px 0; color: #b54750; cursor: pointer; font-weight: 800; }
.inline-delete form { width: min(265px,70vw); margin-top: 10px; padding: 15px; border: 1px solid #efcdd5; border-radius: 8px; background: #fff9fb; }
.inline-delete small { display: block; margin-bottom: 12px; color: #6f7895; }
.inline-delete .button { width: 100%; white-space: normal; }
.pagination { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 20px; color: #697394; font-size: 13px; }
.pagination span { margin-right: 10px; }
.pagination a { min-width: 34px; padding: 6px 9px; border: 1px solid #d6dcf0; border-radius: 6px; text-align: center; background: #fff; }
.pagination a[aria-current=page] { background: #dcd1fa; color: #342359; font-weight: 800; }
.admin-create { display: block; margin-bottom: 22px; }
.admin-create summary { cursor: pointer; color: #28345a; font-weight: 800; }
.admin-create form { margin-top: 22px; }
.admin-user-row .status { align-self: flex-start; margin-top: 5px; }
.admin-user-row .admin-user-actions { display: flex; flex-direction: row; align-items: start; flex-wrap: wrap; gap: 8px; }
.admin-user-actions form:first-child { display: flex; align-items: center; gap: 7px; }
.admin-user-actions select { width: 150px; padding: 8px 10px; font-size: 13px; }
.admin-user-actions .button { min-height: 38px; padding: 8px 12px; font-size: 12px; }
.admin-user-actions .button:disabled,.admin-user-actions select:disabled { opacity: .5; cursor: not-allowed; }
.admin-hint { margin: -9px 0 22px; color: #687391; }
.admin-rating-list { display: grid; gap: 12px; }
.admin-rating-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px; border: 1px solid #e0e3f0; border-radius: 9px; background: #fcfcff; }
.admin-rating-row>div { display: grid; gap: 5px; min-width: 170px; }
.admin-rating-row small { color: #697394; }
.admin-rating-row form { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; }
.admin-rating-row .field { width: 115px; margin: 0; color: #5d6786; font-size: 12px; }
.admin-rating-row .field input { padding: 8px 10px; }
.admin-rating-row .button { min-height: 40px; padding: 8px 13px; }

/* Public catalogs and reading history */
.universe-description { display: none; }
.section-actions { display: flex; align-items: center; gap: 22px; }
.catalog-top { margin-bottom: 22px; }
.catalog-top p { margin: 4px 0 0; color: #6b7596; }
.catalog-controls { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin: 0 0 22px; padding: 18px 20px; border: 1px solid #dce1f3; border-radius: 12px; background: #fff; }
.catalog-controls form { display: flex; align-items: end; flex: 1; flex-wrap: wrap; gap: 11px; }
.catalog-controls form label { display: flex; flex-direction: column; gap: 5px; min-width: 175px; color: #687391; font-size: 12px; font-weight: 700; }
.catalog-controls form label:has(input) { flex: 1; }
.catalog-controls input,.catalog-controls select { min-height: 43px; padding: 9px 12px; border-color: #d3daed; border-radius: 7px; color: #182445; font-size: 14px; }
.catalog-controls .button { min-height: 43px; }
.view-toggle { display: flex; gap: 5px; padding: 4px; border: 1px solid #dbe0f0; border-radius: 9px; background: #f4f5fd; }
.view-toggle a { padding: 6px 11px; border-radius: 6px; color: #697493; font-size: 14px; font-weight: 700; }
.view-toggle a[aria-current=page] { background: #fff; box-shadow: 0 2px 7px #18245619; color: #2b3356; }
.catalog-universes.view-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
.catalog-universes.view-grid .universe-card { min-height: 230px; }
.catalog-universes.view-list { grid-template-columns: 1fr; }
.catalog-universes.view-list .universe-card { min-height: 175px; padding: 24px 30px; }
.catalog-universes.view-list .universe-content { max-width: 75%; }
.catalog-universes.view-list .universe-description { display: block; max-width: 650px; color: #e3e5f6; font-size: 14px; }
.catalog-universes.view-list .universe-card:after { background: linear-gradient(90deg,rgba(7,11,32,.85),rgba(7,11,32,.32)); }
.catalog-stories { margin-bottom: 0; }
.catalog-stories.view-list { grid-template-columns: 1fr; }
.catalog-stories.view-list .story-card { min-height: 190px; }
.catalog-stories.view-list .story-card p { margin-bottom: 15px; }
.catalog-pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 27px 0 75px; color: #697394; font-size: 13px; }
.catalog-pagination span { margin-right: 12px; }
.catalog-pagination a { display: grid; place-items: center; min-width: 37px; height: 37px; padding: 4px 9px; border: 1px solid #d4dbf0; border-radius: 7px; background: #fff; color: #38466e; font-weight: 800; }
.catalog-pagination a[aria-current=page] { border-color: #bd9aeb; background: #eee5ff; color: #4b357a; }
.reader-body [data-read-paragraph] { scroll-margin-top: 100px; }
.reading-badge { display: inline-block; margin: 0 0 2px; padding: 5px 10px; border: 1px solid #b4d9c6; border-radius: 20px; background: #e8f6ee; color: #25644c; font-size: 13px; font-weight: 800; }
.reading-tools { display: flex; align-items: center; justify-content: space-between; gap: 15px; max-width: 1000px; margin: 10px auto 0; }
.reading-continue { color: #6b4db0; font-size: 14px; font-weight: 800; }
.read-status-button { width: auto; min-height: 38px; padding: 7px 12px; border: 1px solid #cad2e9; border-radius: 7px; background: #fff; color: #3e4b70; font-size: 13px; font-weight: 800; }
.read-status-button:hover { border-color: #ab9add; background: #f7f2ff; }
.reading-guest { max-width: 1000px; margin: 10px auto 0; color: #6d7895; font-size: 14px; }
.reading-guest a { color: #8b4ea7; font-weight: 800; text-decoration: underline; }
.reading-page .reading-head { align-items: center; max-width: 1030px; }
.reading-page .reading-head .read-status-button { margin-left: auto; }
.reading-page .reading-guest { max-width: 900px; padding: 20px 30px 50px; }
.account-history { margin: 28px 0 44px; }
.account-history .section-head { margin-bottom: 15px; }
.history-status { display: flex; align-items: center; flex-direction: row !important; flex-wrap: wrap; gap: 9px; }
.history-score { color: #e47765; font-size: 13px; font-weight: 800; }
.account-history .catalog-pagination { margin: 10px 0 0; }

@media (max-width: 850px) {
  .home-page .intro { min-height: 380px; }
  .intro-feature { min-width: 150px; width: 25%; }
  .feature-count { display: block; }
  .feature-count span { display: block; }
  .rating-overview strong { font-size: 18px; }
  .admin-split { grid-template-columns: 1fr; }
  .admin-user-row,.admin-rating-row { flex-direction: column; align-items: stretch; }
  .catalog-universes.view-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .home-page .intro { min-height: 390px; background-position: 58% center; padding: 38px 28px; }
  .intro-copy { max-width: 530px; }
  .home-page .intro h1 { font-size: clamp(42px,8vw,58px); }
  .home-page .intro p { max-width: 440px; }
  .intro-feature { display: none; }
  .story-detail { margin-top: 40px; }
  .story-page { background-size: auto,auto 400px,auto; }
  .story-page .reader-body { padding: 28px; }
  .universe-hero { min-height: 300px; }
  .universe-hero:after { background: linear-gradient(90deg,rgba(8,16,46,.90),rgba(8,16,46,.42)),linear-gradient(0deg,rgba(7,14,40,.55),transparent 60%); }
}
@media (max-width: 520px) {
  .brand { font-size: 23px; }
  .nav-join { padding: 8px 12px; }
  .home-page .intro { min-height: 420px; margin-top: 12px; background-position: 60% center; background-image: linear-gradient(90deg,rgba(8,17,48,.87),rgba(12,20,56,.44)),url('/assets/hero-portal.webp'); }
  .home-page .intro h1 { font-size: 42px; }
  .hero-actions { gap: 16px; }
  .popular-grid { gap: 10px; }
  .popular-grid .universe-card { min-height: 160px; }
  .popular-grid .universe-content strong { font-size: 16px; }
  .popular-grid .universe-content small { font-size: 11px; }
  .popular-grid .universe-arrow { width: 27px; height: 27px; flex-basis: 27px; font-size: 15px; }
  .rating-overview { grid-template-columns: 1fr; }
  .rating-overview > div { min-height: 66px; padding: 12px 17px; border-right: 0; border-bottom: 1px solid #d5dcf2; }
  .rating-overview > div:last-child { border-bottom: 0; }
  .story-detail h1 { font-size: 41px; }
  .reader-toolbar { padding: 14px; }
  .reader-controls { gap: 7px; }
  .reader-controls label { font-size: 12px; }
  .reader-controls select { max-width: 100px; }
  .story-page .reader-body { padding: 24px 18px; }
  .star-rating label { width: 43px; }
  .universe-hero { min-height: 280px; margin-top: 14px; }
  .universe-hero > div { padding: 31px 25px; }
  .universe-hero h1 { font-size: 40px; }
  .story-card { min-height: 0; padding: 22px; }
  .story-card .story-meta { gap: 7px 12px; }
  .admin-panel { padding: 17px; }
  .admin-user-actions form:first-child { flex-wrap: wrap; }
  .admin-list-row { flex-direction: column; }
  .section-actions { gap: 10px; }
  .section-actions .text-link { font-size: 12px; }
  .catalog-controls { padding: 14px; }
  .catalog-controls form label { width: 100%; }
  .catalog-universes.view-grid { grid-template-columns: 1fr; }
  .catalog-universes.view-list .universe-content { max-width: 90%; }
  .catalog-universes.view-list .universe-card { min-height: 190px; }
  .reading-tools { align-items: start; flex-direction: column; }
  .reading-page .reading-head { flex-wrap: wrap; }
  .reading-page .reading-head .read-status-form { width: 100%; }
  .reading-page .reading-guest { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .universe-card,.story-card,.star-rating label,.button { transition: none; }
}

/* Submission page */
.submit-page { background: linear-gradient(180deg,#f2f4ff 0,#f8f9ff 420px,#f7f8ff 100%); }
.submit-hero { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 246px; margin: 24px 0 26px; overflow: hidden; padding: 38px clamp(26px,5vw,60px); border-radius: 17px; color: #fff; background: radial-gradient(circle at 82% 35%,#5b4e9d77,transparent 31%),linear-gradient(110deg,#101a3d,#1a2758 62%,#22275a); box-shadow: 0 16px 34px #1b265226; }
.submit-hero:after { content: ''; position: absolute; right: -75px; top: -170px; width: 500px; height: 500px; border: 1px solid #c4a6ff55; border-radius: 50%; box-shadow: 0 0 0 72px #bfa1ff0b,0 0 0 145px #f5a6d30a; pointer-events: none; }
.submit-hero > div:first-child { position: relative; z-index: 1; max-width: 680px; }
.submit-hero .eyebrow { color: #c9aeff; }
.submit-hero h1 { margin: 12px 0 8px; font-size: clamp(40px,5vw,65px); line-height: 1.05; letter-spacing: -.06em; }
.submit-hero p { max-width: 610px; margin: 0; color: #d8def8; font-size: 17px; }
.submit-hero-mark { z-index: 1; padding-right: 4vw; color: #ffb9c9; font-size: clamp(65px,9vw,130px); text-shadow: 0 0 40px #d78fff8c; }
.submit-layout { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 22px; align-items: start; margin-bottom: 76px; }
.submit-form { min-width: 0; }
.submit-section { margin-bottom: 18px; overflow: hidden; border: 1px solid #dce1f3; border-radius: 13px; background: #fff; box-shadow: 0 8px 26px #1f2b590d; }
.submit-section-head { display: flex; align-items: flex-start; gap: 18px; padding: 26px 30px 22px; border-bottom: 1px solid #e9ebf6; background: linear-gradient(105deg,#fff,#f8f7ff); }
.submit-section-head > span { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 10px; background: linear-gradient(130deg,#ffe5da,#f0dbff); color: #9a548b; font-size: 13px; font-weight: 800; }
.submit-section-head h2 { margin: 0 0 3px; font-size: 24px; letter-spacing: -.04em; }
.submit-section-head p { margin: 0; color: #697495; font-size: 14px; }
.submit-section-body { padding: 28px 30px 14px; }
.submit-page .field { color: #344063; font-size: 13px; }
.submit-page input,.submit-page select,.submit-page textarea { border-color: #d4daee; border-radius: 8px; background: #fcfcff; color: #172142; }
.submit-page input:focus,.submit-page select:focus,.submit-page textarea:focus { border-color: #9b8de1; outline: 3px solid #ddcffb80; }
.submit-page textarea::placeholder,.submit-page input::placeholder { color: #929bb3; }
.story-editor { overflow: hidden; border: 1px solid #d4daee; border-radius: 9px; background: #fcfcff; }
.story-editor:focus-within { border-color: #9b8de1; box-shadow: 0 0 0 3px #ddcffb80; }
.story-editor-toolbar { display: flex; align-items: center; gap: 7px; min-height: 48px; padding: 6px 10px; border-bottom: 1px solid #e4e8f5; background: #f7f8ff; }
.story-editor-toolbar button { width: 34px; height: 34px; border: 1px solid #d9ddef; border-radius: 6px; background: #fff; color: #2b365b; }
.story-editor-toolbar button:hover { border-color: #bd9ee6; background: #f8efff; }
.story-editor-toolbar span { margin-left: 10px; color: #74809e; font-size: 12px; }
.story-editor textarea { display: block; width: 100%; min-height: 380px; margin: 0; padding: 22px 24px; border: 0; border-radius: 0; outline: 0 !important; box-shadow: none; resize: vertical; font-size: 16px; line-height: 1.8; }
.submit-format-note { margin: 11px 0 6px; color: #77819d; font-size: 12px; }
.submit-actions { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 26px; border: 1px solid #dce1f3; border-radius: 11px; background: #fff; }
.submit-actions div { display: flex; flex-direction: column; gap: 2px; }
.submit-actions div strong { font-size: 15px; }
.submit-actions div span { color: #77819d; font-size: 13px; }
.submit-actions .button { border: 0; color: #151b35; background: linear-gradient(105deg,#ffaf7e,#ff9db9 57%,#b994ff); }
.submit-aside { position: sticky; top: 20px; padding: 28px 25px; border: 1px solid #dce1f3; border-radius: 12px; background: #fff; box-shadow: 0 8px 26px #1f2b590d; }
.submit-aside h2 { margin: 10px 0 21px; font-size: 24px; line-height: 1.2; letter-spacing: -.04em; }
.submit-aside ol { margin: 0; padding-left: 21px; color: #5e6989; font-size: 14px; }
.submit-aside li { padding-left: 4px; margin-bottom: 16px; }
.submit-aside li::marker { color: #ef7e83; font-weight: 800; }
.submit-aside-note { padding-top: 18px; border-top: 1px solid #e9ebf6; color: #6b7694; font-size: 13px; }
.submit-aside-note a { color: #a5549e; font-weight: 800; text-decoration: underline; }
@media (max-width: 850px) { .submit-layout { grid-template-columns: 1fr; } .submit-aside { position: static; } }
@media (max-width: 600px) { .submit-hero { min-height: 220px; margin-top: 14px; padding: 30px 25px; } .submit-hero h1 { font-size: 42px; } .submit-hero-mark { display: none; } .submit-section-head { padding: 22px 20px; } .submit-section-body { padding: 23px 20px 10px; } .story-editor-toolbar span { display: none; } .story-editor textarea { min-height: 320px; padding: 17px; } .submit-actions { align-items: stretch; flex-direction: column; } .submit-actions .button { width: 100%; } }

/* Moderation reading preview */
.moderation-preview-link { margin: 3px 0 23px; white-space: normal; text-align: center; }
.moderation-card form { padding-top: 18px; border-top: 1px solid #e7eaf5; }
.moderation-preview-head { max-width: 1000px; margin: 42px auto 25px; }
.moderation-preview-head > a { display: inline-block; margin-bottom: 25px; color: #59678f; font-size: 14px; font-weight: 800; }
.moderation-preview-head > a:hover { color: #aa548d; }
.moderation-preview-head h1 { margin: 9px 0 12px; font-size: clamp(38px,5vw,62px); line-height: 1.08; letter-spacing: -.06em; }
.moderation-preview-head p { max-width: 850px; margin: 0 0 17px; color: #697492; font-size: 17px; }
.moderation-preview-head small { color: #697492; }
.moderation-preview-reader { max-width: 1000px; margin-bottom: 10px; }
.moderation-preview-reader .reader-body { max-width: 900px; min-height: 50vh; margin: auto; padding: 40px 34px 90px; }
.moderation-preview-note { max-width: 1000px; margin: 0 auto 80px; color: #77819d; font-size: 13px; }
@media (max-width: 600px) { .moderation-preview-head { margin-top: 25px; } .moderation-preview-reader .reader-body { padding: 24px 18px 70px; } }

/* Keep the story page compact until the reader chooses to expand it. */
.story-reader-actions { margin: 0 auto 14px; }
.story-page .reader { position: relative; }
.story-page .reader.is-collapsed .reader-body { max-height: 390px; overflow: hidden; }
.story-page .reader.is-collapsed:after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 100px; pointer-events: none; background: linear-gradient(transparent,#fff); }
.story-page .reader.is-collapsed.dark:after { background: linear-gradient(transparent,#162334); }
.reader-expand-wrap { max-width: 1000px; margin: 12px auto 0; text-align: center; }
.reader-expand-wrap .button { min-width: 225px; background: #fff; border-color: #d5daf0; }
@media (max-width: 600px) { .story-page .reader.is-collapsed .reader-body { max-height: 320px; } .story-reader-actions { text-align: left; } }
