/*
 * StoryBloom · Cozy Archive
 * Warm parchment, ivory, cocoa and a restrained plum accent.
 * Scoped to the Cozy theme so existing Starry, Midnight and Light choices stay intact.
 * Loaded after page-specific CSS to neutralize hard-coded neon colors.
 */
:root[data-theme="cozy"]{
  color-scheme:light;
  --bg:#F7F5EF;
  --surface:#FFFCF7;
  --surface-2:#EAEDE4;
  --text:#2B332C;
  --muted:#5E685F;
  --line:#D6DBCF;
  --accent:#3D614A;
  --accent-dark:#2C4937;
  --accent-soft:#E4EDE3;
  --danger:#A1463D;
  --shadow:0 8px 24px rgba(50,63,47,.065);
  --radius:15px;
  --hero-wash:#ECF0E8;
  --header-bg:rgba(255,252,247,.97);
  --modern-accent:#41664D;
  --modern-accent-2:#A46552;
  --modern-shadow:0 7px 24px rgba(48,61,46,.075);
  --cover-a:linear-gradient(145deg,#49392F,#866150,#B9947D);
  --cover-b:linear-gradient(145deg,#455248,#667460,#B2B8A0);
  --cover-c:linear-gradient(145deg,#594550,#876775,#B9A0A5);
}
html[data-theme="cozy"] body{
  background:var(--bg);
  color:var(--text);
  color-scheme:light;
}
html[data-theme="cozy"] body::before{
  display:none!important;
}
/* Calm, solid navigation and visible search field */
html[data-theme="cozy"] .modern-header,
html[data-theme="cozy"] .site-header{
  background:rgba(255,249,244,.96);
  border-bottom:1px solid var(--line);
  box-shadow:0 1px 0 rgba(65,44,35,.03);
  backdrop-filter:blur(10px);
}
html[data-theme="cozy"] .modern-brand-mark,
html[data-theme="cozy"] .brand-mark{
  background:#72566D;
  color:white;
  box-shadow:none;
  border-radius:12px;
}
html[data-theme="cozy"] .modern-brand-copy strong{
  font-family:Georgia,"Times New Roman",serif;
  font-size:22px;
  font-weight:700;
  letter-spacing:-.025em;
}
html[data-theme="cozy"] .modern-brand-copy small{
  color:var(--muted);
}
html[data-theme="cozy"] .modern-main-nav a:hover,
html[data-theme="cozy"] .profile-dropdown a:hover,
html[data-theme="cozy"] .mobile-bottom-nav a:hover{
  background:var(--surface-2);
  color:var(--text);
}
html[data-theme="cozy"] .mobile-bottom-nav,
html[data-theme="cozy"] .mobile-slide-nav,
html[data-theme="cozy"] .profile-dropdown,
html[data-theme="cozy"] .theme-panel{
  background:var(--surface);
  border-color:var(--line);
  box-shadow:var(--shadow);
}
html[data-theme="cozy"] .modern-icon-button,
html[data-theme="cozy"] .profile-menu-button,
html[data-theme="cozy"] .round-button{
  background:var(--surface);
  border-color:var(--line);
  color:var(--text);
}
html[data-theme="cozy"] .button.primary,
html[data-theme="cozy"] button.button.primary,
html[data-theme="cozy"] .modern-write-button,
html[data-theme="cozy"] .modern-primary-cta,
html[data-theme="cozy"] .modern-search-bar button,
html[data-theme="cozy"] .modern-save-search button,
html[data-theme="cozy"] .hero-search button{
  background:#755449;
  border-color:#755449;
  color:#FFFDF9!important;
  box-shadow:none;
  text-shadow:none;
}
html[data-theme="cozy"] .button.primary:hover,
html[data-theme="cozy"] .modern-write-button:hover,
html[data-theme="cozy"] .modern-primary-cta:hover,
html[data-theme="cozy"] .modern-search-bar button:hover{
  background:#5F4037;
  border-color:#5F4037;
  color:white!important;
  transform:none;
}
html[data-theme="cozy"] a:focus-visible,
html[data-theme="cozy"] button:focus-visible,
html[data-theme="cozy"] input:focus-visible,
html[data-theme="cozy"] textarea:focus-visible,
html[data-theme="cozy"] select:focus-visible{
  outline:3px solid #937C56;
  outline-offset:3px;
}
html[data-theme="cozy"] input,
html[data-theme="cozy"] textarea,
html[data-theme="cozy"] select{
  background:#FFFCF9;
  color:var(--text);
  border-color:var(--line);
}
html[data-theme="cozy"] input::placeholder,
html[data-theme="cozy"] textarea::placeholder{
  color:#77665C;
  opacity:1;
}
html[data-theme="cozy"] .eyebrow,
html[data-theme="cozy"] .hero-kicker{
  color:#755449;
  letter-spacing:.11em;
}
html[data-theme="cozy"] a{
  text-underline-offset:.15em;
}
/* A welcome, not a flashy landing-page animation */
html[data-theme="cozy"] .modern-hero,
html[data-theme="cozy"] .cinematic-starry-hero,
html[data-theme="cozy"] .feeling-hero{
  background:linear-gradient(125deg,#F2E6D9 0%,#F8F2E9 62%,#F0E4DA 100%);
  border-color:#E2D2C5;
  box-shadow:none;
  min-height:440px;
  border-radius:20px;
}
html[data-theme="cozy"] .feeling-hero{
  padding:clamp(34px,5vw,68px);
}
html[data-theme="cozy"] .feeling-hero::before,
html[data-theme="cozy"] .feeling-hero::after,
html[data-theme="cozy"] .cinematic-starry-hero::before,
html[data-theme="cozy"] .cinematic-moon{
  display:none!important;
}
html[data-theme="cozy"] .feeling-flower{
  opacity:.14;
  color:#846A5B;
  text-shadow:none;
}
html[data-theme="cozy"] .feeling-hero-copy h1,
html[data-theme="cozy"] .cinematic-starry-hero h1{
  color:#322824;
  max-width:900px;
  font-size:clamp(43px,5.8vw,79px);
  line-height:1.08;
  letter-spacing:-.045em;
}
html[data-theme="cozy"] .feeling-hero-copy h1 em,
html[data-theme="cozy"] .cinematic-starry-hero h1 em{
  color:#775144;
}
html[data-theme="cozy"] .feeling-hero-copy>p,
html[data-theme="cozy"] .cinematic-starry-hero p{
  color:#5C4E46;
  max-width:650px;
  font-size:clamp(15px,1.4vw,18px);
  line-height:1.7;
}
html[data-theme="cozy"] .feeling-hero .hero-kicker{
  color:#775144;
  letter-spacing:.12em;
}
html[data-theme="cozy"] .feeling-hero .noncommercial-badge{
  background:#FFF9F4;
  border:1px solid #DDCEC1;
  color:#62483E;
  backdrop-filter:none;
  box-shadow:none;
}
html[data-theme="cozy"] .feeling-search,
html[data-theme="cozy"] .cinematic-search{
  background:#FFF9F4;
  border:1px solid #D7C5B7;
  box-shadow:0 5px 18px rgba(80,56,44,.07);
  border-radius:15px;
}
html[data-theme="cozy"] .feeling-search input{
  background:transparent;
  color:#2F2723;
}
html[data-theme="cozy"] .feeling-search button{
  background:#755449;
  color:white;
  box-shadow:none;
  border-radius:11px;
}
html[data-theme="cozy"] .feeling-moods a,
html[data-theme="cozy"] .mood-shortcuts a{
  border:1px solid #D8C7B9;
  background:#FFF9F4;
  color:#624A41;
  font-size:12px;
  box-shadow:none;
}
html[data-theme="cozy"] .feeling-moods a:hover{
  background:#EBDAD0;
  transform:none;
}
/* Simple archive surfaces and title-first story browsing */
html[data-theme="cozy"] .modern-feature-strip,
html[data-theme="cozy"] .modern-filter-sidebar,
html[data-theme="cozy"] .modern-trending,
html[data-theme="cozy"] .modern-story-card,
html[data-theme="cozy"] .story-card,
html[data-theme="cozy"] .file-import-card,
html[data-theme="cozy"] .import-panel,
html[data-theme="cozy"] .settings-section-card,
html[data-theme="cozy"] .modern-surface,
html[data-theme="cozy"] .advanced-search-card,
html[data-theme="cozy"] .story-shell,
html[data-theme="cozy"] .dashboard-kpis>div,
html[data-theme="cozy"] .writer-story-table article,
html[data-theme="cozy"] .reader-community,
html[data-theme="cozy"] .text-story-hero,
html[data-theme="cozy"] .editor-card,
html[data-theme="cozy"] .form-card{
  background:var(--surface);
  border-color:var(--line);
  box-shadow:0 3px 14px rgba(72,53,45,.045);
}
html[data-theme="cozy"] .modern-story-card,
html[data-theme="cozy"] .text-story-card,
html[data-theme="cozy"] .story-card{
  border-radius:14px;
  box-shadow:none;
  transition:border-color .15s ease,background-color .15s ease;
}
html[data-theme="cozy"] .modern-story-card:hover,
html[data-theme="cozy"] .story-card:hover{
  border-color:#B69F8F;
  background:#FFFCF8;
  box-shadow:0 3px 16px rgba(65,43,32,.06);
  transform:none;
}
html[data-theme="cozy"] .text-story-card .modern-story-heading-row h3,
html[data-theme="cozy"] .story-info h1{
  color:#332822;
  font-family:Georgia,"Times New Roman",serif;
  letter-spacing:-.02em;
}
html[data-theme="cozy"] .text-story-card .modern-story-body{
  padding:22px 24px;
}
html[data-theme="cozy"] .text-story-card .modern-story-summary{
  color:#5C5049;
  line-height:1.65;
}
html[data-theme="cozy"] .modern-tag-row a,
html[data-theme="cozy"] .tag-list span,
html[data-theme="cozy"] .modern-pill-options span,
html[data-theme="cozy"] .work-metadata a,
html[data-theme="cozy"] .tag-pill,
html[data-theme="cozy"] .feature-icon{
  background:#F3E9E1;
  border-color:#DFCFC1;
  color:#61483E;
}
html[data-theme="cozy"] .modern-tag-row a:hover{
  background:#EADACD;
}
html[data-theme="cozy"] .modern-feature-strip{
  box-shadow:none;
}
html[data-theme="cozy"] .modern-feature-strip a:hover{
  background:#F1E8DF;
}
html[data-theme="cozy"] .page-banner,
html[data-theme="cozy"] .story-hero.text-story-hero{
  background:linear-gradient(145deg,#F1E6DA,#F7F0E8);
  border-color:#DDCEC1;
}
html[data-theme="cozy"] .story-hero.text-story-hero{
  box-shadow:none;
}
html[data-theme="cozy"] .modern-footer{
  background:#EEE3D9;
  border-top:1px solid #DCCCBD;
  color:var(--text);
}
/* Theme toggle sample */
.site-theme-choice.cozy{--sample-a:#F6F1EA;--sample-b:#785548}
/* Keep features usable for readers who reduce effects or motion */
html[data-theme="cozy"][data-glow="none"] *,
html[data-theme="cozy"] body.reduced-motion *{
  text-shadow:none;
}
@media(max-width:700px){
  html[data-theme="cozy"] .modern-hero,
  html[data-theme="cozy"] .cinematic-starry-hero,
  html[data-theme="cozy"] .feeling-hero{
    min-height:0;
    border-radius:0;
  }
  html[data-theme="cozy"] .feeling-hero{
    padding:35px 23px;
  }
  html[data-theme="cozy"] .feeling-hero-copy h1{
    font-size:clamp(37px,9vw,56px);
  }
  html[data-theme="cozy"] .text-story-card .modern-story-body{
    padding:18px 16px;
  }
  html[data-theme="cozy"] .modern-feature-strip{
    border-radius:13px;
  }
}


/* Second editorial pass: a welcoming little library with a garden outside.
   Avoid glossy startup presentation: natural materials, clear type, quiet motion. */
:root[data-theme="cozy"] {
  --cozy-ink:#2B332C;
  --cozy-pine:#3D614A;
  --cozy-pine-dark:#2D4937;
  --cozy-clay:#9C5948;
  --cozy-honey:#A77B43;
  --cozy-linen:#F7F5EF;
  --cozy-paper:#FFFCF7;
  --cozy-sage:#E4EDE3;
  --cozy-outline:#D6DBCF;
}
html[data-theme="cozy"] body{
  background:var(--cozy-linen);
  color:var(--cozy-ink);
}
html[data-theme="cozy"] .modern-header,
html[data-theme="cozy"] .site-header{
  background:rgba(255,252,247,.97);
  border-bottom-color:#D6DBCF;
}
html[data-theme="cozy"] .modern-brand-mark,
html[data-theme="cozy"] .brand-mark{
  background:#3D614A;
  box-shadow:none;
}
html[data-theme="cozy"] .modern-brand-copy strong{color:#2D4937}
html[data-theme="cozy"] .modern-brand-copy small{color:#586558}
html[data-theme="cozy"] .modern-write-button,
html[data-theme="cozy"] .button.primary,
html[data-theme="cozy"] button.button.primary,
html[data-theme="cozy"] .modern-primary-cta,
html[data-theme="cozy"] .modern-search-bar button,
html[data-theme="cozy"] .modern-save-search button,
html[data-theme="cozy"] .hero-search button,
html[data-theme="cozy"] .feeling-search button{
  background:#3D614A;
  border:1px solid #3D614A;
  color:#FFFFFF!important;
  border-radius:10px;
  box-shadow:none;
}
html[data-theme="cozy"] .modern-write-button:hover,
html[data-theme="cozy"] .button.primary:hover,
html[data-theme="cozy"] .modern-primary-cta:hover,
html[data-theme="cozy"] .modern-search-bar button:hover,
html[data-theme="cozy"] .feeling-search button:hover{
  background:#2D4937;
  border-color:#2D4937;
  box-shadow:none;
}
html[data-theme="cozy"] .modern-icon-button,
html[data-theme="cozy"] .profile-menu-button,
html[data-theme="cozy"] .round-button{
  background:#FFFCF7;
  border-color:#D6DBCF;
}
html[data-theme="cozy"] input,
html[data-theme="cozy"] select,
html[data-theme="cozy"] textarea{
  background:#FFFCF7;
  color:#2B332C;
  border-color:#CCD4C7;
}
html[data-theme="cozy"] input:focus,
html[data-theme="cozy"] select:focus,
html[data-theme="cozy"] textarea:focus{
  border-color:#5F8068;
  box-shadow:0 0 0 3px rgba(61,97,74,.11);
}
html[data-theme="cozy"] a:focus-visible,
html[data-theme="cozy"] button:focus-visible,
html[data-theme="cozy"] input:focus-visible{
  outline-color:#3D614A;
}
html[data-theme="cozy"] .hero-kicker,
html[data-theme="cozy"] .eyebrow{
  color:#466A50;
  letter-spacing:.08em;
}
html[data-theme="cozy"] .modern-hero,
html[data-theme="cozy"] .cinematic-starry-hero,
html[data-theme="cozy"] .feeling-hero{
  background:
    linear-gradient(110deg,rgba(255,252,247,.8),transparent 65%),
    linear-gradient(145deg,#F1F1E7,#E8EDE3);
  border-color:#D6DBCF;
  border-radius:14px;
  box-shadow:none;
}
html[data-theme="cozy"] .feeling-hero{
  min-height:410px;
  padding:clamp(34px,5vw,64px);
}
html[data-theme="cozy"] .feeling-hero-copy{
  margin-left:0;
}
html[data-theme="cozy"] .feeling-hero-copy h1,
html[data-theme="cozy"] .cinematic-starry-hero h1{
  font-family:Georgia,"Times New Roman",serif;
  color:#2D3930;
  font-weight:650;
  font-size:clamp(40px,5.6vw,76px);
  letter-spacing:-.04em;
  line-height:1.1;
}
html[data-theme="cozy"] .feeling-hero-copy h1 em,
html[data-theme="cozy"] .cinematic-starry-hero h1 em{
  color:#935A44;
  font-weight:500;
}
html[data-theme="cozy"] .feeling-hero-copy>p,
html[data-theme="cozy"] .cinematic-starry-hero p{
  color:#536155;
  max-width:620px;
  line-height:1.7;
}
html[data-theme="cozy"] .feeling-flower{
  color:#6E8F72;
  opacity:.09;
  text-shadow:none;
}
html[data-theme="cozy"] .feeling-hero .noncommercial-badge{
  background:#FFFCF7;
  border-color:#CED8CA;
  color:#48644F;
}
html[data-theme="cozy"] .feeling-search,
html[data-theme="cozy"] .cinematic-search{
  max-width:700px;
  background:#FFFCF7;
  border-color:#C6D2C5;
  border-radius:13px;
  box-shadow:0 3px 12px rgba(52,75,51,.06);
}
html[data-theme="cozy"] .feeling-search input{
  color:#2B332C;
}
html[data-theme="cozy"] .feeling-moods a,
html[data-theme="cozy"] .mood-shortcuts a{
  background:#FFFCF7;
  border-color:#CCD7CA;
  color:#405D47;
  border-radius:999px;
}
html[data-theme="cozy"] .feeling-moods a:hover,
html[data-theme="cozy"] .mood-shortcuts a:hover{
  background:#E4EDE3;
  border-color:#A3B6A7;
  color:#2D4937;
}
html[data-theme="cozy"] .cozy-hero-shortcuts{
  display:flex;align-items:center;gap:12px 22px;flex-wrap:wrap;
  margin:19px 0 0;
  font-size:13px;
}
html[data-theme="cozy"] .cozy-hero-shortcuts a{
  color:#385F46;
  text-underline-offset:4px;
  font-weight:750;
}
html[data-theme="cozy"] .cozy-hero-shortcuts a:hover{color:#234731}
html[data-theme="cozy"] .modern-feature-strip,
html[data-theme="cozy"] .modern-filter-sidebar,
html[data-theme="cozy"] .modern-trending,
html[data-theme="cozy"] .modern-story-card,
html[data-theme="cozy"] .story-card,
html[data-theme="cozy"] .file-import-card,
html[data-theme="cozy"] .import-panel,
html[data-theme="cozy"] .settings-section-card,
html[data-theme="cozy"] .modern-surface,
html[data-theme="cozy"] .advanced-search-card,
html[data-theme="cozy"] .story-shell,
html[data-theme="cozy"] .dashboard-kpis>div,
html[data-theme="cozy"] .writer-story-table article,
html[data-theme="cozy"] .editor-card,
html[data-theme="cozy"] .form-card{
  background:#FFFCF7;
  border-color:#D6DBCF;
  box-shadow:0 2px 12px rgba(43,54,44,.045);
}
html[data-theme="cozy"] .modern-story-card,
html[data-theme="cozy"] .text-story-card,
html[data-theme="cozy"] .story-card{
  border-left:3px solid #8FA78F;
  border-radius:10px;
  box-shadow:none;
}
html[data-theme="cozy"] .modern-story-card:hover,
html[data-theme="cozy"] .text-story-card:hover,
html[data-theme="cozy"] .story-card:hover{
  transform:none;
  background:#FFFFFF;
  border-color:#A5B9A6;
  border-left-color:#4D7256;
  box-shadow:0 4px 15px rgba(52,74,50,.055);
}
html[data-theme="cozy"] .text-story-card .modern-story-body{padding:22px 25px}
html[data-theme="cozy"] .text-story-card .modern-story-heading-row h3{
  font-family:Georgia,"Times New Roman",serif;
  font-weight:700;
  color:#2F4737;
  line-height:1.24;
}
html[data-theme="cozy"] .text-story-card .modern-story-heading-row h3 a{
  color:inherit;
  text-decoration:none;
  text-underline-offset:4px;
}
html[data-theme="cozy"] .text-story-card .modern-story-heading-row h3 a:hover{
  text-decoration:underline;
}
html[data-theme="cozy"] .text-story-card .modern-story-summary{
  font-size:14px;
  line-height:1.75;
  color:#505C51;
}
html[data-theme="cozy"] .text-story-kicker{color:#526555;letter-spacing:.045em}
html[data-theme="cozy"] .modern-tag-row a,
html[data-theme="cozy"] .story-card-feeling-row a,
html[data-theme="cozy"] .tag-list span,
html[data-theme="cozy"] .work-metadata a,
html[data-theme="cozy"] .tag-pill,
html[data-theme="cozy"] .feature-icon{
  background:#EEF2E9;
  border-color:#D6DFCF;
  color:#3A5C43;
}
html[data-theme="cozy"] .modern-feature-strip{
  border-radius:12px;
  box-shadow:none;
}
html[data-theme="cozy"] .modern-feature-strip a:hover{background:#F0F3EB}
html[data-theme="cozy"] .modern-tag-row a:hover,
html[data-theme="cozy"] .story-card-feeling-row a:hover{background:#DDE8DB}
html[data-theme="cozy"] .modern-feature-strip .feature-icon{
  border-radius:10px;
}
html[data-theme="cozy"] .modern-section-title h2,
html[data-theme="cozy"] .discovery-lane-intro h2,
html[data-theme="cozy"] .modern-results-header h2,
html[data-theme="cozy"] .filter-sidebar-top h2{
  font-family:Georgia,"Times New Roman",serif;
  color:#304334;
  letter-spacing:-.02em;
}
html[data-theme="cozy"] .page-banner,
html[data-theme="cozy"] .story-hero.text-story-hero{
  background:#EFF1E9;
  border-color:#D6DBCF;
}
html[data-theme="cozy"] .modern-footer{
  background:#E9EDE4;
  color:#2B332C;
  border-top:1px solid #D1DACD;
}
html[data-theme="cozy"] .modern-footer a:hover{color:#2F6645}
.site-theme-choice.cozy{--sample-a:#F7F5EF;--sample-b:#3D614A}
@media(max-width:700px){
 html[data-theme="cozy"] .feeling-hero{padding:35px 22px;min-height:0}
 html[data-theme="cozy"] .text-story-card .modern-story-body{padding:19px 17px}
 html[data-theme="cozy"] .feeling-hero-copy h1{font-size:clamp(37px,9vw,53px)}
 html[data-theme="cozy"] .cozy-hero-shortcuts{margin-top:14px;gap:12px}
}
@media(prefers-reduced-motion:reduce){
 html[data-theme="cozy"] .modern-story-card,
 html[data-theme="cozy"] .story-card{transition:none}
}
