/* Rellawings header + site theme v5: intentionally isolated from the editor. */
.head-inner{max-width:1440px;gap:clamp(.8rem,2vw,2.4rem)}
.brand{flex:0 0 clamp(145px,17vw,235px)}
.main-nav{gap:clamp(.7rem,2vw,1.9rem)}
.main-nav a{padding:.55rem .15rem}
.account-nav{gap:.75rem;margin-left:auto;flex-wrap:nowrap}
.account-nav form{margin:0}
.account-dropdown{position:relative;flex:0 0 auto}
.account-dropdown>summary{list-style:none;display:flex;align-items:center;gap:.65rem;cursor:pointer;white-space:nowrap;padding:.38rem .3rem;border-radius:7px}
.account-dropdown>summary::-webkit-details-marker{display:none}
.account-dropdown>summary:hover,.account-dropdown[open]>summary{background:var(--raised)}
.nav-avatar{width:30px;height:30px;object-fit:cover;border-radius:4px;background:var(--raised)}
.nav-username{color:var(--accent);font-weight:750}
.account-dropdown>summary svg{width:12px;color:var(--text)}
.account-popover{position:absolute;right:0;top:calc(100% + 12px);width:min(282px,calc(100vw - 20px));padding:8px 0;background:var(--surface);border:1px solid var(--border);border-radius:12px;box-shadow:0 18px 50px #0009;z-index:230;color:var(--text);white-space:normal}
.account-popover>a,.account-popover form button{display:flex;align-items:center;width:100%;gap:12px;text-align:left;border:0;background:transparent;color:var(--text);padding:10px 16px;font-size:.91rem;line-height:1.3;border-radius:0;text-decoration:none}
.account-popover>a span:first-child,.account-popover form button span:first-child{width:20px;flex:0 0 20px;text-align:center;font-size:1.23rem;color:var(--muted)}
.account-popover>a:hover,.account-popover form button:hover{background:var(--raised);color:var(--accent)}
.account-popover .nav-count{margin-left:auto;background:#b75369;color:#fff;padding:0 6px;border-radius:12px;font-size:.7rem}
.theme-menu{display:flex;gap:8px;align-items:center;justify-content:space-between;border-top:1px solid var(--border);margin:7px 10px 0;padding:13px 6px 7px}
.theme-menu label{display:flex;align-items:center;flex-direction:row;gap:7px;margin:0;font-size:.86rem;font-weight:600;white-space:nowrap}
.theme-menu label span{color:var(--accent);font-size:1.25rem}
.theme-menu select{width:104px;min-width:0;padding:.32rem 1.4rem .32rem .5rem;font-size:.82rem;border:1px solid var(--border);background:var(--bg);color:var(--text);border-radius:6px}
/* Keep both utilities aligned as square icon buttons. */
.account-nav .header-search>summary,.account-nav .notification-dropdown>summary{width:38px;height:38px;min-width:38px;display:flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:7px;padding:0;color:var(--text)}
.account-nav .notification-dropdown>summary:hover,.account-nav .header-search>summary:hover{background:var(--raised)}
.account-nav .header-search-popover{right:0;top:calc(100% + 12px)}
.account-nav .notification-popover{right:0;top:calc(100% + 12px)}
/* Only the theme colors change: no new page designs or images are introduced. */
body[data-site-theme=light]{color-scheme:light;--bg:#f4f2f6;--surface:#fff;--raised:#eae4ef;--border:#d6ccdf;--text:#282532;--muted:#5e5969;--subtle:#716b7b;--accent:#704491;--accent-deep:#9c79b4;--focus:#73479c;background:var(--bg);color:var(--text)}
body[data-site-theme=sepia]{color-scheme:light;--bg:#ede2cb;--surface:#f8efdD;--raised:#e8d6b8;--border:#c7b498;--text:#403426;--muted:#6d5c49;--subtle:#756851;--accent:#805c72;--accent-deep:#a7837b;--focus:#7a526e;background:var(--bg);color:var(--text)}
body[data-site-theme=light] .site-head{background:rgba(250,248,251,.98);border-color:var(--border)}
body[data-site-theme=sepia] .site-head{background:rgba(239,227,205,.98);border-color:var(--border)}
body[data-site-theme=light] .account-popover,body[data-site-theme=sepia] .account-popover{box-shadow:0 14px 36px #3b2b3e30}
body[data-site-theme=light] .book-card,body[data-site-theme=sepia] .book-card{background:var(--surface);border-color:var(--border)}
body[data-site-theme=light] .tag{background:#f0e6f1;border-color:#dac9db;color:#55415e}
body[data-site-theme=sepia] .tag{background:#eadcc9;border-color:#c5ae9a;color:#5e443c}
body[data-site-theme=light] .small-banner,body[data-site-theme=sepia] .small-banner{background:var(--surface);border-color:var(--border)}
body[data-site-theme=light] .warning,body[data-site-theme=sepia] .warning{background:var(--raised);color:var(--text)}
body[data-site-theme=light] .comment.reply,body[data-site-theme=sepia] .comment.reply{background:var(--raised)}
body[data-site-theme=light] .notice,body[data-site-theme=sepia] .notice{background:var(--surface);color:var(--text)}
body[data-site-theme=light] .btn:hover,body[data-site-theme=sepia] .btn:hover{background:var(--raised);color:var(--accent)}
body[data-site-theme=light] .compact:hover,body[data-site-theme=sepia] .compact:hover{background:var(--raised)}
/* Preserve the reader's independent, existing typography preferences. */
@media(max-width:1000px){.head-inner{gap:.6rem}.brand{flex:0 0 160px}.main-nav{order:0;flex:1 1 auto;padding-bottom:0}.account-nav{margin-left:auto}}
@media(max-width:760px){.head-inner{flex-wrap:wrap;gap:.3rem .7rem;padding:.5rem .8rem}.brand{flex:0 0 auto}.brand img{max-height:44px}.account-nav{flex:0 0 auto;order:1;margin-left:auto;gap:.35rem}.main-nav{order:2;flex:1 1 100%;justify-content:center;padding:.2rem 0 .1rem;gap:1.25rem}.account-dropdown>summary{gap:.35rem}.nav-avatar{width:27px;height:27px}.account-nav .header-search>summary,.account-nav .notification-dropdown>summary{width:35px;height:35px;min-width:35px}}
@media(max-width:430px){.nav-username{display:none}.brand img{max-width:120px}.main-nav{font-size:.78rem;gap:.8rem}.account-popover{right:-88px}.account-nav .header-search-popover{right:-42px}.account-nav .notification-popover{right:-4px}}
