/* One persisted palette drives both the journal and its content studio. */
body[data-theme]{--paper:#f7f5ef;--surface:#fffcf6;--wash:#efeee6;--ink:#26382f;--soft:#626e5d;--muted:#848b7a;--line:#d9ddcf;--brand:#45624e;--on-brand:#ffffff;--tint:#e4e7d7;--hill:#9ba98c;--deep-hill:#667f62;--sun:#dbbd87;--sidebar:#293e30;--sidebar-ink:#d7dfcc;--bg:var(--paper);--bg-alt:var(--wash);--card:var(--surface);--text:var(--ink);--text-soft:var(--soft);--text-secondary:var(--soft);--text-muted:var(--muted);--accent:var(--brand);--border:var(--line);--border-light:var(--line);--accent-light:var(--hill);--card-bg:var(--surface);background:var(--paper);color:var(--ink);color-scheme:light}
body[data-theme="apricot"]{--paper:#fbf4e9;--surface:#fffaf1;--wash:#f1e5d4;--ink:#513d31;--soft:#8b7661;--muted:#a18c75;--line:#e2d4bf;--brand:#955d3e;--tint:#ebd4b6;--hill:#d3ae83;--deep-hill:#a77957;--sun:#dca66a;--sidebar:#503b2e;--sidebar-ink:#e5d9c7}
body[data-theme="blue"]{--paper:#f1f5f8;--surface:#fbfdfe;--wash:#e6edf2;--ink:#2c424f;--soft:#667d8b;--muted:#869aa7;--line:#d1dee5;--brand:#42657b;--tint:#ccdde5;--hill:#99b2bf;--deep-hill:#6c8c9d;--sun:#d6c5a4;--sidebar:#2a414d;--sidebar-ink:#d1e0e6}
body[data-theme="night"]{--paper:#1b2422;--surface:#242f2b;--wash:#202b27;--ink:#e3e6d7;--soft:#b3bdae;--muted:#8f9d8d;--line:#3a493e;--brand:#c7b990;--on-brand:#26352c;--tint:#35443d;--hill:#526750;--deep-hill:#354f3c;--sun:#a29262;--sidebar:#151e1a;--sidebar-ink:#c6d0ba;color-scheme:dark}
body[data-theme] .nav,body[data-theme] .ft{background:var(--paper);border-color:var(--line)}
body[data-theme] .nav-logo,body[data-theme] h1,body[data-theme] h2,body[data-theme] h3{color:var(--ink)}
body[data-theme] .nav-links a{color:var(--soft)}body[data-theme] .nav-links a.active{color:var(--brand)}
body[data-theme] .nav-links a:after{background:var(--brand)}body[data-theme] .hero-art{background:var(--tint);border-color:var(--line)}
body[data-theme] .art-sun{background:var(--sun)}body[data-theme] .hill-one{background:var(--hill)}body[data-theme] .hill-two{background:var(--deep-hill)}
body[data-theme] .hero-eyebrow,body[data-theme] .section-header .en-label,body[data-theme] .page-eyebrow,body[data-theme] .featured-card .fc-cat,body[data-theme] .fc-more,body[data-theme] .post-item .pi-cat{color:var(--brand)}
body[data-theme] .hero-subtitle,body[data-theme] .hero-about,body[data-theme] .section-header .desc,body[data-theme] .featured-card .fc-excerpt,body[data-theme] .post-item .pi-body p,body[data-theme] .quote-bio,body[data-theme] .about-card p,body[data-theme] .post-body{color:var(--soft)}
body[data-theme] .hero-uptime,body[data-theme] .fc-meta,body[data-theme] .pi-date,body[data-theme] .visit-count,body[data-theme] .ft-copy,body[data-theme] .ft-beian,body[data-theme] .ph p,body[data-theme] .ppm,body[data-theme] .back-to-journal{color:var(--muted)}
body[data-theme] .journal-button,body[data-theme] #msgBtn{background:var(--brand)!important;border-color:var(--brand);color:var(--on-brand)!important}
body[data-theme] .journal-button:hover,body[data-theme] #msgBtn:hover{filter:brightness(1.1)}
body[data-theme] .featured-card,body[data-theme] .about-card{background:var(--surface);border-color:var(--line)}
body[data-theme] .featured-card:hover{background:var(--surface);border-color:var(--brand)}
body[data-theme] .section-alt,body[data-theme] .section-message{background:var(--wash);border-color:var(--line)}
body[data-theme] .section-quote{background:var(--paper)}body[data-theme] .post-item,body[data-theme] .post-pn{border-color:var(--line)}
body[data-theme] .post-item .pi-date .pi-day,body[data-theme] .about-card .about-kicker,body[data-theme] .ml a{color:var(--brand)}
body[data-theme] .about-icon,body[data-theme] .post-body pre,body[data-theme] .post-body blockquote{background:var(--tint);color:var(--soft)}
body[data-theme] .post-body a{color:var(--brand)}body[data-theme] .post-body blockquote{border-color:var(--hill)}
body[data-theme] .cf a{border-color:var(--line);color:var(--soft)}body[data-theme] .cf a.active{background:var(--brand);color:var(--on-brand);border-color:var(--brand)}
body[data-theme] #msgForm,body[data-theme] #msgList>div{background:var(--surface)!important;border-color:var(--line)!important}
body[data-theme] #msgForm input,body[data-theme] #msgForm textarea{background:var(--paper)!important;border-color:var(--line)!important;color:var(--ink)!important}
body[data-theme] #msgForm label,body[data-theme] #msgList p,body[data-theme] #msgList span{color:var(--soft)!important}
body[data-theme] .sidebar{background:var(--sidebar)}body[data-theme] .sidebar-nav a,body[data-theme] .sidebar-logout a{color:var(--sidebar-ink)}
body[data-theme] .sidebar-title{color:var(--sidebar-ink)}body[data-theme] .sidebar-nav li.active a{background:#ffffff10;border-left-color:var(--sun);color:#fffef4}
body[data-theme] .card{background:var(--surface);border-color:var(--line)}body[data-theme] .card-hd{border-color:var(--line)}
body[data-theme] .btn-p{background:var(--brand);border-color:var(--brand);color:var(--on-brand)}body[data-theme] .btn-d{background:var(--wash);color:var(--soft);border-color:var(--line)}
body[data-theme] .fg label,body[data-theme] .review-toggle{color:var(--soft)}body[data-theme] .fg input,body[data-theme] .fg textarea,body[data-theme] .fg select,body[data-theme] .post-tools input,body[data-theme] .post-tools select{background:var(--paper);color:var(--ink);border-color:var(--line)}
body[data-theme] .upload-zone{background:var(--wash);border-color:var(--hill)}body[data-theme] #postPreview{background:var(--surface);border-color:var(--line)}
body[data-theme="night"] #app [style*="color"]{color:var(--soft)!important}body[data-theme="night"] .badge-pub{background:#3b5138;color:#d0dfb8}body[data-theme="night"] .btn-danger{background:#52382f;color:#edc1a3;border-color:#6b4b3e}
.footer-inner{display:flex;justify-content:space-between;align-items:center;gap:22px}.footer-brand{font:14px/1.8 var(--font-serif);color:var(--ink)}.footer-brand span{font:10px/1.8 var(--font-sans);color:var(--muted);margin-left:6px}.ft-copy{margin-top:9px}.footer-links{display:flex;gap:20px;flex-wrap:wrap;justify-content:flex-end;font:11px/1.8 var(--font-sans);color:var(--muted)}
.reading-music{position:fixed;right:22px;bottom:22px;z-index:101;display:grid;place-items:center;width:38px;height:38px;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--brand);font-size:18px;cursor:pointer;box-shadow:0 3px 14px #182b1710}.reading-music.playing{background:var(--brand);color:var(--on-brand)}
.is-navigating:before{content:'';position:fixed;inset:0 auto auto 0;height:2px;width:60%;background:#82956e;z-index:1000;animation:loading-line .6s infinite alternate}@keyframes loading-line{to{width:95%}}
.admin-workspace{margin-left:220px;flex:1;min-width:0}.admin-workspace .main{margin-left:0;max-width:1500px}.studio-topbar{height:70px;display:flex;justify-content:space-between;align-items:center;padding:0 40px;border-bottom:1px solid var(--line);font-size:12px;color:var(--soft);background:var(--surface)}.studio-topbar a{font-size:12px;color:var(--brand)}.topbar-sep{margin:0 13px;color:var(--hill)}
.studio-kicker{font-size:9px!important;letter-spacing:1.7px!important;color:var(--muted)!important;margin-bottom:13px!important}.dashboard-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.dashboard-heading h2{font-size:31px}.theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px}.theme-choice{display:block;text-align:left;cursor:pointer;border:1px solid var(--line);border-radius:9px;padding:0;background:var(--surface);overflow:hidden;color:var(--ink);transition:border-color .2s,transform .2s;font-family:var(--font-sans)}.theme-choice:hover{transform:translateY(-3px);border-color:var(--brand)}.theme-choice.selected{border:2px solid var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 12%,transparent)}
.theme-sample{background:var(--sample-paper);color:var(--sample-ink);padding:20px 23px;height:215px;pointer-events:none}.sample-nav{display:flex;justify-content:space-between;font-size:9px;border-bottom:1px solid color-mix(in srgb,var(--sample-ink) 18%,transparent);padding-bottom:10px;letter-spacing:.5px}.sample-nav span{font-size:7px;opacity:.7}.sample-hero{display:flex;justify-content:space-between;padding-top:20px;gap:15px}.sample-hero small{font-size:6px;letter-spacing:1.2px;opacity:.7}.sample-hero strong{display:block;font:20px/1.7 "STSong",Georgia,serif;font-weight:400;margin:8px 0 10px;letter-spacing:1px}.sample-hero i{display:block;width:48px;height:11px;background:var(--sample-ink);opacity:.8;border-radius:2px}.sample-art{height:125px;width:95px;flex-shrink:0;border-radius:60px 60px 3px 3px;background:var(--sample-tint);position:relative;overflow:hidden}.sample-art:before{content:'';position:absolute;width:30px;height:30px;border-radius:50%;background:var(--sample-ink);opacity:.25;left:19px;top:25px}.sample-art:after{content:'';position:absolute;bottom:-20px;right:-30px;width:180px;height:80px;background:var(--sample-ink);opacity:.3;transform:rotate(-20deg);border-radius:50%}.sample-lines{display:flex;gap:10px;margin-top:14px}.sample-lines i{display:block;flex:1;height:2px;background:var(--sample-ink);opacity:.2}.theme-caption{padding:19px 22px 21px;position:relative}.theme-caption strong{font-size:15px;font-weight:500}.theme-caption p{font-size:11px;color:var(--soft);margin-top:8px;line-height:1.8}.theme-check{float:right;font-size:10px;color:var(--brand);padding-top:3px}.theme-savebar{margin-top:24px;padding:20px 23px;display:flex;align-items:center;gap:12px;background:var(--surface);border:1px solid var(--line);border-radius:8px}.theme-savebar p{flex:1;font-size:11px;color:var(--soft);line-height:1.8}
@media(max-width:1120px){.theme-sample{padding:17px;height:205px}.sample-hero strong{font-size:18px}.sample-art{width:75px}.studio-topbar{padding:0 28px}.theme-savebar{flex-wrap:wrap}.theme-savebar p{flex-basis:100%}}
@media(max-width:768px){.admin-workspace{margin-left:0}.admin-workspace .main{padding-top:26px}.studio-topbar{padding:0 20px 0 66px;height:64px;font-size:10px}.studio-topbar a{font-size:10px}.topbar-sep{margin:0 6px}.dashboard-heading{align-items:flex-start;flex-direction:column}.dashboard-heading h2{font-size:26px}.theme-grid{gap:15px}.theme-sample{height:190px;padding:15px}.sample-art{width:65px;height:112px}.sample-hero strong{font-size:16px}.sample-hero small{font-size:5px}.theme-caption{padding:14px}.theme-caption strong{font-size:13px}.theme-caption p{font-size:10px}.theme-check{float:none;display:block;margin-top:6px}.footer-inner{display:block}.footer-links{justify-content:flex-start;margin-top:15px;gap:10px 20px}.footer-brand span{display:block;margin:3px 0 0}.nav-links.open{background:var(--paper)}.theme-savebar{padding:17px}}
@media(max-width:480px){.theme-grid{grid-template-columns:1fr}.theme-sample{height:215px;padding:19px 23px}.sample-art{width:95px;height:125px}.sample-hero strong{font-size:21px}.sample-hero small{font-size:6px}.theme-check{float:right;margin-top:0}.theme-caption strong{font-size:15px}}

.studio-summary{display:flex;gap:32px;align-items:center;padding:23px 28px;background:var(--tint);border:1px solid var(--line);border-radius:9px;margin-bottom:23px}.studio-summary>div{flex:1}.studio-summary span{display:block;font-size:10px;letter-spacing:.5px;color:var(--soft)}.studio-summary strong{display:block;font:26px/1.5 Georgia,serif;color:var(--ink);font-weight:400;margin-top:5px}.log-pager{display:flex;gap:15px;justify-content:center;align-items:center;margin-top:20px;font-size:11px;color:var(--muted)}.table-scroll{overflow:auto}table{width:100%;border-collapse:collapse}th,td{white-space:nowrap;padding:13px 12px;border-bottom:1px solid var(--line);text-align:left;font-size:12px}th{color:var(--muted);font-weight:400}.editor-format{display:flex;gap:6px;flex-wrap:wrap}.editor-toolbar{flex-wrap:wrap;gap:10px}.editor-media{background:var(--wash);padding:18px;border:1px solid var(--line);border-radius:5px;margin-bottom:20px}.editor-media p{font-size:12px;margin-bottom:12px;color:var(--soft)}.editor-media-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(85px,1fr));gap:10px;max-height:260px;overflow:auto}.editor-media-grid button{border:1px solid var(--line);padding:0;background:var(--surface);cursor:pointer;border-radius:5px;overflow:hidden}.editor-media-grid img{width:100%;height:75px;object-fit:cover}
@media(max-width:768px){.studio-summary{gap:16px;padding:18px;flex-wrap:wrap}.studio-summary>div{min-width:65px}.studio-summary>button{flex-basis:100%}.studio-summary strong{font-size:23px}}

.hero-line{display:block}.music-card{display:flex;gap:35px;align-items:flex-start;max-width:900px}.music-record{display:grid;place-items:center;flex-shrink:0;width:140px;height:140px;border-radius:50%;color:var(--paper);font-size:45px;background:repeating-radial-gradient(circle,var(--sidebar) 0px,var(--sidebar) 4px,var(--brand) 5px,var(--sidebar) 6px);border:8px solid var(--wash)}.music-fields{flex:1;min-width:0}.field-hint{font-size:11px;color:var(--muted);line-height:1.8;margin-top:8px}.music-actions{display:flex;gap:12px;margin-top:22px}.reading-music.playing{animation:music-breathe 3s ease-in-out infinite}@keyframes music-breathe{50%{box-shadow:0 0 0 7px color-mix(in srgb,var(--brand) 8%,transparent)}}@media(max-width:700px){.music-card{flex-direction:column;gap:22px}.music-record{width:95px;height:95px;font-size:32px}.music-fields{width:100%}}
.reading-music[hidden]{display:none}
