/* Complete warm-night theme. Scoped overrides preserve the reference light layout. */
html[data-theme="night"]{color-scheme:dark;background:#171313}
body[data-theme="night"]{
  color-scheme:dark;
  --orange:#ffad80;
  --ink:#f6ece5;
  --muted:#c6b4a9;
  --glass:rgba(35,28,26,.92);
  --panel-line:rgba(244,194,158,.17);
  --night-title:#fff4ed;
  --night-accent:#ffad80;
  --night-muted:#c6b4a9;
  background:#171313;
  color:var(--ink);
}
body[data-theme="night"] .wallpaper{filter:brightness(.40) saturate(.78)}
body[data-theme="night"] .wallpaper-wash{
  display:block;position:fixed;inset:0;z-index:-3;pointer-events:none;
  background:linear-gradient(90deg,rgba(20,16,17,.40),rgba(20,16,17,.16) 68%,rgba(20,16,17,.12));
}
body[data-theme="night"] .glass{
  background:var(--glass);
  border-color:var(--panel-line);
  box-shadow:inset 0 1px 0 rgba(255,224,204,.045),0 8px 26px rgba(0,0,0,.22);
  backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);
}
body[data-theme="night"] .topbar{
  background:linear-gradient(105deg,rgba(42,32,29,.96),rgba(31,26,25,.92));
}
body[data-theme="night"] .brand-name,
body[data-theme="night"] .profile-card h1,
body[data-theme="night"] .posts-title h2{color:var(--night-accent)}
body[data-theme="night"] .desktop-nav a,
body[data-theme="night"] .side-nav a{color:#ddd0c6}
body[data-theme="night"] .desktop-nav a.active,
body[data-theme="night"] .desktop-nav a:hover,
body[data-theme="night"] .side-nav a.active,
body[data-theme="night"] .side-nav a:hover{color:#ffb18b}
body[data-theme="night"] .desktop-nav a.active::after{background:#ffab7e}
body[data-theme="night"] .side-nav a.active{
  background:linear-gradient(90deg,rgba(255,132,77,.20),rgba(255,132,77,.09));
  box-shadow:inset 0 0 0 1px rgba(255,177,130,.10);
}
body[data-theme="night"] .side-nav a:hover:not(.active){background:rgba(255,181,132,.065)}
body[data-theme="night"] .desktop-nav a:first-child svg,
body[data-theme="night"] .side-nav a:first-child svg{stroke:#34251f}
body[data-theme="night"] .searchbox{
  background:rgba(14,12,12,.48);border-color:rgba(245,208,182,.22);
}
body[data-theme="night"] .searchbox:focus-within{
  border-color:#e8a278;background:rgba(14,12,12,.70);box-shadow:0 0 0 3px rgba(255,173,128,.10);
}
body[data-theme="night"] .searchbox input{color:#fff2e8;caret-color:#ffb18b}
body[data-theme="night"] .searchbox input::placeholder{color:#c3b0a5;opacity:1}
body[data-theme="night"] .searchbox svg{color:#cfbdb2}
body[data-theme="night"] .icon-btn{color:#e1cfc2}
body[data-theme="night"] .icon-btn:hover{color:#ffc09e;background:rgba(255,177,130,.075);border-radius:6px}
body[data-theme="night"] #themeToggle{color:#ffb385}
body[data-theme="night"] .icon-btn .dot{background:#ff7954;box-shadow:0 0 0 2px #2d231f}
body[data-theme="night"] .profile-card{background:linear-gradient(145deg,rgba(47,35,30,.94),rgba(32,27,25,.94))}
body[data-theme="night"] .profile-card p,
body[data-theme="night"] .stats span{color:var(--night-muted)}
body[data-theme="night"] .stats b{color:#fff0e5}
body[data-theme="night"] .stats div+div::before{background:rgba(245,201,172,.13)}
body[data-theme="night"] .music-copy strong{color:#f5e8de}
body[data-theme="night"] .music-copy span,
body[data-theme="night"] .music-time{color:#c5b1a3}
body[data-theme="night"] .progress{background:rgba(255,216,190,.13)}
body[data-theme="night"] .progress i{background:linear-gradient(90deg,#f0804d,#ffb382)}
body[data-theme="night"] .music-controls button{color:#d9c6b8}
body[data-theme="night"] .music-controls button:hover{color:#ffc6a7}
body[data-theme="night"] .music-controls .play{
  background:linear-gradient(145deg,#f89058,#de5c2b);color:#fff8f3;
  box-shadow:0 0 0 1px rgba(255,173,125,.16),0 3px 13px rgba(227,88,37,.18);
}
body[data-theme="night"] .quote-card{background:linear-gradient(135deg,rgba(47,33,28,.96),rgba(34,27,25,.94))}
body[data-theme="night"] .quote-card p{color:#ffc29f}
body[data-theme="night"] .quote-mark{color:#b96e52}
body[data-theme="night"] .hero{
  border-color:#bc764e;background:#38251e;
  box-shadow:0 0 0 1px rgba(255,186,132,.13),0 0 17px rgba(232,122,63,.12),0 8px 27px rgba(0,0,0,.20);
}
body[data-theme="night"] .hero-bg{filter:brightness(.72) saturate(.85)}
body[data-theme="night"] .hero::before{
  content:"";position:absolute;inset:0;z-index:-1;
  background:linear-gradient(90deg,rgba(27,16,15,.52),rgba(27,16,15,.16) 50%,transparent 76%);
}
body[data-theme="night"] .hero-glow{box-shadow:inset 0 0 4px 1px rgba(252,178,115,.20)}
body[data-theme="night"] .hero-copy h2{color:#fff5ee;text-shadow:0 2px 8px rgba(20,12,11,.40)}
body[data-theme="night"] .hero-copy p{color:#f0dfd3}
body[data-theme="night"] .hero-meta{color:#f2dfd1}
body[data-theme="night"] .eyebrow{
  background:linear-gradient(105deg,#704b2c,#713d28);color:#fff3df;
  box-shadow:inset 0 0 0 1px rgba(255,186,113,.20);
}
body[data-theme="night"] .featured-sparkles{fill:#ffdb84}
body[data-theme="night"] .hero-arrow{
  background:rgba(41,27,24,.55);border-color:rgba(255,207,171,.25);color:#ffeadb;
}
body[data-theme="night"] .hero-arrow:hover{background:rgba(61,37,28,.8);border-color:#ecb282}
body[data-theme="night"] .hero-dots button{background:rgba(255,220,193,.34)}
body[data-theme="night"] .hero-dots button.active{background:#ffe3cc}
body[data-theme="night"] .posts-panel{
  background:linear-gradient(130deg,rgba(37,29,26,.96),rgba(30,25,24,.93));
}
body[data-theme="night"] .posts-title h2::after{background:#ffac7e}
body[data-theme="night"] .posts-head>a{color:#e6d3c5}
body[data-theme="night"] .posts-head>a:hover{color:#ffc6a2}
body[data-theme="night"] .posts-head>a b{color:#ffae7e}
body[data-theme="night"] .post-card,
body[data-theme="night"] .post-card:nth-child(even){
  background:linear-gradient(115deg,rgba(58,44,37,.90),rgba(42,33,29,.93));
  border-color:rgba(255,207,171,.13);
  box-shadow:inset 0 1px 0 rgba(255,222,195,.025);
}
body[data-theme="night"] .post-card:hover{
  background:linear-gradient(115deg,rgba(68,49,40,.96),rgba(50,38,32,.98));
  border-color:rgba(255,184,131,.32);box-shadow:0 4px 17px rgba(0,0,0,.16);
}
body[data-theme="night"] .post-body h3{color:var(--night-title)}
body[data-theme="night"] .post-body p{color:#d3c0b2}
body[data-theme="night"] .meta{color:#c1ab9b}
body[data-theme="night"] .pill{
  background:linear-gradient(#a34725,#81361f);border-color:rgba(255,181,133,.35);
  color:#ffdbc1;box-shadow:none;
}
body[data-theme="night"] .post-thumb,
body[data-theme="night"] .album-art img{filter:brightness(.88) saturate(.9)}
body[data-theme="night"] .post-mascot,
body[data-theme="night"] .profile-avatar img,
body[data-theme="night"] .quote-mascot{filter:brightness(.89) saturate(.92)}
body[data-theme="night"] .deco-b{mask:url('assets/masks/deco-2.svg') center/100% 100% no-repeat}
body[data-theme="night"] .deco-c{mask:url('assets/masks/deco-3.svg') center/100% 100% no-repeat}
body[data-theme="night"] .deco-d{mask:url('assets/masks/deco-4.svg') center/100% 100% no-repeat}
body[data-theme="night"] .quote-mascot{mask:url('assets/masks/quote.svg') center/100% 100% no-repeat}
body[data-theme="night"] .empty-state{
  color:#d6c1b1;background:rgba(14,11,10,.25);border:1px solid rgba(246,198,165,.12);border-radius:5px;
}
body[data-theme="night"] .mobile-drawer{background:rgba(32,26,24,.98);color:#f0e1d6}
body[data-theme="night"] .mobile-drawer a:hover{background:rgba(255,171,124,.10);border-radius:4px;color:#ffbd93}
body[data-theme="night"] .ui-toast{background:rgba(36,28,24,.97);color:#f1ded0;border-color:rgba(255,196,151,.24)}
body[data-theme="night"] button:focus-visible,
body[data-theme="night"] a:focus-visible{outline-color:#ffc29c}
@media(max-width:540px){
  .top-actions #themeToggle{display:grid}
  .top-actions #themeToggle,.top-actions #mobileMenu{width:44px;height:44px}
  body[data-theme="night"] .hero::before{background:linear-gradient(90deg,rgba(22,13,12,.78),rgba(22,13,12,.24))}
}
/* The wallpaper sits behind the body, not behind an opaque body fill. */
body[data-theme="night"]{background:transparent}
body[data-theme="night"] .brand-mark img{mask:url('assets/masks/brand.svg') center/100% 100% no-repeat;filter:brightness(.91) saturate(.94)}
body[data-theme="night"] .hero-bg{filter:brightness(.79) saturate(.90)}
