/* Batch B: shared editorial UI. Sizes use rem to follow browser text settings. */
:root {
  --ink: #303246;
  --muted: #606478;
  --violet: #62518c;
  --rose: #96506e;
  --paper: #fcfafb;
  --line: #e6e0e9;
  --radius-card: 1.75rem;
}
[hidden] { display: none !important; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; padding: 1.5rem; margin: 2rem 0 1rem; border: 1px solid var(--line); border-radius: 1.5rem; background: #fff; align-items: end; }
.filters label { display: block; font-size: .9rem; margin-bottom: .4rem; }
.filters input,.filters select { width: 100%; min-width: 0; min-height: 48px; padding: .7rem; border: 1px solid #bdb3cd; border-radius: .8rem; color: var(--ink); background: #fcfafb; font: inherit; }
.filters .button { justify-content: center; }
button { font: inherit; cursor: pointer; border: 0; }
.clear { background: #f0eaf5; color: var(--violet); border-radius: .8rem; min-height: 48px; }
input:focus-visible,select:focus-visible,button:focus-visible { outline: 3px solid #754590; outline-offset: 3px; }
@media(max-width:760px) { .filters { grid-template-columns: 1fr; padding: 1rem; } }
body { font-size: 1rem; background: radial-gradient(ellipse at 100% 15%, #f2eef8 0, transparent 40rem), var(--paper); }
main { overflow-wrap: anywhere; }
.wrap { width: min(1160px, calc(100% - 4rem)); }
.header { background: #fcfafb; border-bottom: 0; }
.nav { padding-block: 1.15rem; }
.brand { letter-spacing: .03em; }
.brand small { font-size: .75rem; letter-spacing: .13em; }
nav a { min-height: 44px; display: inline-flex; align-items: center; }
.nav nav { gap: .35rem; }
.nav nav a { padding: .5rem 1.05rem; border-radius: 999px; }
.nav nav a[aria-current] { background: #eee7f4; box-shadow: none; font-weight: 650; }
.nav nav a:hover { background: #f2edf5; }
a:focus-visible { outline: 3px solid #754590; outline-offset: 4px; border-radius: 4px; }
.eyebrow { font-size: .875rem; letter-spacing: .12em; }
.hero { width: min(1440px, calc(100% - 3rem)); margin: .5rem auto 0; min-height: 570px; border-radius: 2rem 2rem 5rem 2rem; isolation: isolate; box-shadow: 0 22px 50px -35px #64558460; }
.hero>.scene { opacity: .95; }
.hero:after { background: linear-gradient(90deg, #f5f0f8 0%, #f5f0f8ed 32%, #f3eaf7a3 56%, #f1e7f200 82%); }
.hero-content { padding-block: 4.7rem; }
.hero h1 { font-size: clamp(2.7rem, 4.8vw, 4.4rem); line-height: 1.48; letter-spacing: .045em; }
.hero-content p:not(.eyebrow) { color: #4f526a; }
.hero-note { font-size: .75rem; letter-spacing: .14em; }
.button { padding: .8rem 1.5rem; min-height: 48px; border-radius: 1rem; background: #62518c; box-shadow: 0 8px 18px #62518c25; gap: 1rem; font-size: 1rem; }
.vertical { background: #393750a8; border-radius: 20px; padding: 1.3rem .5rem; font-size: .85rem; }
.scene { background: url("../images/hero-moonbranch.jpg") center right / cover no-repeat, radial-gradient(ellipse at 68% 24%, #f2dff13d, transparent 50%), linear-gradient(170deg,#596b9c,#a6a7d0 45%,#e1bfd0 78%,#eddadf); }
.scene .moon, .scene .cloud, .scene .ridge, .scene .lake, .scene .star { display: none; }
.ridge { clip-path: none; border-radius: 50% 70% 0 0 / 70% 90% 0 0; transform: rotate(-9deg); bottom: -7%; }
.ridge-a { left: -15%; height: 45%; width: 95%; background: #707aab; opacity: .68; }
.ridge-b { left: 38%; bottom: -14%; height: 40%; width: 95%; background: #505f8b; transform: rotate(8deg); }
.lake { height: 13%; opacity: .55; }
.moon { width: 72px; height: 72px; background: #fff6e9; box-shadow: 0 0 0 14px #fff2e110, 0 0 0 35px #fff2e108, 0 0 60px #fff2db7a; }
.hero .moon { width: 120px; height: 120px; left: 73%; top: 19%; }
.cloud { filter: blur(18px); }
.section { padding-top: 4.5rem; }
.section-title { margin-bottom: 1.75rem; align-items: center; }
.section-title h2 { font-size: clamp(1.65rem, 3vw, 2rem); }
.section-title p { margin-bottom: .4rem; }
.moods { gap: 0; background: #f4eff6; border-radius: 1.75rem; padding: 1.5rem .75rem; }
.moods>a { border: 0; border-radius: 1rem; padding: 1.25rem 1.75rem; background: none; position: relative; }
.moods>a+a { border-left: 1px solid #dcd3e5; border-radius: 0; }
.moods>a:hover { background: #ffffff8c; border-radius: 1rem; }
.moods span { font-size: 1.75rem; display: inline-flex; width: 48px; height: 48px; justify-content: center; align-items: center; border: 1px solid #d6c6dd; border-radius: 50%; margin-bottom: .6rem; }
.moods h3 { font-family: var(--serif); font-weight: 600; }
.moods p { font-size: .9375rem; }
.grid { gap: 1.75rem; align-items: stretch; }
.card { border-radius: var(--radius-card); padding: .65rem; border-color: #e9e3ec; box-shadow: 0 10px 36px -24px #4e426a60; display: flex; flex-direction: column; overflow: visible; }
.card-art { overflow: hidden; border-radius: 1.2rem; height: 215px; flex-shrink: 0; }
.art-img { width: 100%; height: 100%; object-fit: cover; object-position: center top; display: block; }
.card-body { padding: 1.3rem 1rem 1rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.25rem; font-weight: 650; }
.card-body p { font-size: 1rem; }
.card-body .eyebrow { font-size: .875rem; line-height: 1.8; color: #62518c; }
.card-body .original { font-size: .875rem; }
.card-body .text-link { margin-top: auto; align-self: flex-start; }
.art-caption { font-size: .75rem; letter-spacing: .1em; background: #323b60dc; padding: .2rem .65rem; border-radius: 8px; left: 15px; bottom: 14px; }
.text-link { min-height: 44px; display: inline-flex; align-items: center; gap: .7rem; font-size: .9375rem; }
.card:hover { border-color: #cbbdd9; box-shadow: 0 18px 38px -26px #4e426a80; }
.quote { border: 0; background: #eee9f4; border-radius: 2rem; padding: 3rem 1.5rem; position: relative; }
.quote:before { content: '✧'; display: block; color: #826c9e; font-size: 1.5rem; margin-bottom: .8rem; }
.quote a { display: inline-block; padding: .65rem; }
.page-head { padding: 4rem 0 2.5rem; }
.page-head h1 { font-size: clamp(2.5rem, 4.3vw, 4rem); }
.page-head>p { max-width: 60ch; }
.chips { gap: .65rem; }
.chips a { padding: .55rem 1rem; border-radius: .9rem; font-size: .9375rem; }
.chips a:hover { background: #eee7f4; }
.breadcrumb { align-items: center; gap: .7rem; font-size: .875rem; }
.breadcrumb a { min-height: 44px; text-decoration: underline; text-underline-offset: 4px; }
.detail-hero { gap: 3rem; align-items: center; }
.detail-hero>div { min-width: 0; }
.detail-hero h1 { font-size: clamp(2.2rem,4vw,3.4rem); }
.detail-art { border-radius: 2rem 2rem 4rem 2rem; box-shadow: 12px 12px 0 #ece5f1; }
.tag { border-radius: .7rem; background: #eee7f4; border-color: transparent; font-size: .875rem; }
.reading-layout { gap: clamp(2rem,5vw,5rem); }
.reading section { padding-bottom: 1.3rem; border-bottom: 1px solid #ebe5ed; }
.reading h2 { font-size: 1.55rem; }
.reading p { color: #51566c; line-height: 2; }
.reading-aside { border-radius: 1.5rem; background: #f0eaf5; padding: 1.75rem; position: sticky; top: 2rem; align-self: start; }
.reading-aside h2 { margin-top: .5rem; }
.reading-aside p { line-height: 1.9; margin-bottom: 1.2rem; }
.reading-aside a { display: inline-block; padding-block: .4rem; }
.fine { font-size: .875rem; }
.empty { border-radius: 2rem; background: #f1edf7; }
.footer { padding-top: 3rem; }
.footer small { font-size: .8125rem; }
.footer a { min-height: 44px; display: inline-flex; align-items: center; }
.skip { border-radius: .7rem; }
#cat-cursor { position: fixed; top: 0; left: 0; width: 72px; height: 72px; pointer-events: none; z-index: 9999; opacity: 0; filter: drop-shadow(0 3px 6px rgba(48, 50, 70, .35)); transition: opacity .2s ease, width .15s ease, height .15s ease; will-change: transform; }
#cat-cursor.is-hover { width: 82px; height: 82px; }
body.has-cat-cursor, body.has-cat-cursor a, body.has-cat-cursor button, body.has-cat-cursor [role="button"] { cursor: none; }
@media (hover:hover) and (prefers-reduced-motion:no-preference) {
  .card,.button,.moods>a { transition: box-shadow .2s ease, background-color .2s ease, border-color .2s ease; }
}
@media (min-width:761px) and (max-width:1000px) {
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .moods>a { padding: 1rem; }
  .nav { flex-wrap: wrap; }
}
@media (max-width:760px) {
  .wrap { width: calc(100% - 2.25rem); }
  .nav { gap: .6rem; padding-block: .8rem; }
  .nav nav { width: 100%; gap: .15rem; justify-content: space-between; }
  .nav nav a { padding-inline: .6rem; font-size: .875rem; }
  .hero { width: calc(100% - 1.25rem); margin-top: .1rem; min-height: 0; border-radius: 1.5rem 1.5rem 3rem 1.5rem; }
  .hero-content { padding-block: 3rem; }
  .hero h1 { font-size: clamp(2.2rem,8vw,3.3rem); }
  .hero:after { background: linear-gradient(90deg,#f5f0f8f5,#f5f0f8dc 55%,#f5f0f870); }
  .hero .moon { left: 76%; width: 65px; height: 65px; }
  .hero-content p:not(.eyebrow) { font-size: .9375rem; }
  .moods { padding: .6rem; }
  .moods>a { padding: 1.2rem; }
  .moods>a+a { border-left: 0; border-top: 1px solid #dcd3e5; }
  .moods span { float: left; margin: .3rem 1rem 1rem 0; }
  .section { padding-top: 2.5rem; }
  .card-art { height: 210px; }
  .section-title { align-items: flex-start; }
  .page-head { padding-top: 2.5rem; }
  .page-head h1 { font-size: clamp(2rem,8vw,3rem); }
  .detail-art { margin-right: .75rem; border-radius: 1.5rem 1.5rem 3rem 1.5rem; }
  .detail-hero { padding-block: 1.7rem; }
  .reading-layout { padding-top: 1.5rem; }
  .reading-aside { padding: 1.5rem; }
  .footer { margin-top: 1.5rem; }
}
@media (max-width:380px) { .nav nav a { padding-inline: .45rem; } .brand { white-space: normal; } }
.save-button { display: inline-flex; margin-top: 1rem; padding: .65rem 1rem; border: 1px solid #cfc1df; border-radius: 1rem; background: #f1eaf8; color: #554173; min-height: 44px; }
.card-body .save-button { display: flex; }
.save-button[aria-pressed="true"] { background: #62518c; color: white; }
button:disabled { opacity: .55; cursor: not-allowed; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2rem 0; flex-wrap: wrap; }
.saved-card { padding: 1.5rem; }
.clear-confirm { background: #f0e9f6; border: 1px solid #cfc1df; border-radius: 1.2rem; padding: 1.5rem; margin-bottom: 1.5rem; }
.save-feedback:not(:empty) { position: sticky; bottom: 1rem; margin: 1rem auto; width: min(680px,calc(100% - 32px)); padding: 1rem 1.4rem; background: #eee8f6; color: #40324f; border: 1px solid #cfc1df; border-radius: 1rem; box-shadow: 0 8px 24px #40324f18; z-index: 5; }
.save-feedback.save-error { background: #fff1ed; color: #792f24; border-color: #d09c91; }
/* Keep the language control with the brand when navigation wraps. */
.nav {display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:1rem}
.language {display:inline-flex;align-items:center;justify-content:center;justify-self:end;min-height:44px;padding:.35rem .95rem;border:1px solid #d5c9df;border-radius:999px;color:var(--violet);font-size:.9rem}
.language:hover {background:#eee7f4}
.card-body,.filters>div,.reading-layout>* {min-width:0}
.card-body .save-button {align-self:flex-start}
.detail-hero .save-button {display:flex;width:fit-content}
.button,.save-button,.clear,.tag {max-width:100%;white-space:normal;line-height:1.45}
.clear {padding:.6rem 1rem}
html[lang=en] {--serif:Georgia,'Times New Roman',serif}
html[lang=en] h1,html[lang=en] h2 {letter-spacing:-.025em;line-height:1.18;text-wrap:balance}
html[lang=en] .hero h1 {line-height:1.06;font-size:clamp(2.9rem,6vw,5.5rem);margin-block:.45em}
html[lang=en] .card-body h3 {line-height:1.35}
html[lang=en] .reading p {line-height:1.7}
@media(max-width:850px) {
 .nav {grid-template-columns:minmax(0,1fr) auto;gap:.3rem 1rem}
 .nav>.brand {grid-area:1/1}
 .nav>.language {grid-area:1/2}
 .nav>nav {grid-area:2/1/3/3;justify-content:flex-start;flex-wrap:wrap;width:100%}
}
@media(max-width:760px) {
 .hero-content {padding-block:clamp(2.6rem,8vw,4rem)}
 .moods>a {display:flow-root}
 .section-title {align-items:flex-start}
 .reading-aside {position:static}
}
