/* 全站基础配色变量 + 深色模式覆盖 + 盒模型重置：所有页面都会加载 layout.css，
   放在这里才能保证没有加载 index.css 的页面（about/contact/complaint/privacy）
   也有正确的背景色变量、深浅色模式切换效果，以及不带默认 body 外边距的满屏背景 */
:root{--bg:#fff5f8;--card-bg:#ffffff;--text:#333;--text-light:#666;--accent:#ff69b4;--accent-dark:#d6408f;--border:#ffd1e8;--header-bg:#ff69b4;--header-text:#fff;--accent-rgb:255,105,180;}
body.dark{--bg:#1a0d12;--card-bg:#2a1a22;--text:#f0e0e8;--text-light:#c0a0b0;--accent:#ff8ac4;--accent-dark:#e04a9a;--border:#4a2a3a;--header-bg:#c03a7a;--header-text:#ffe6f0;--accent-rgb:255,138,196;}
*{margin:0;padding:0;box-sizing:border-box;}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;background:var(--bg);color:var(--text);line-height:1.5;min-height:100vh;overflow-x:hidden;}

/* 字母头像（作者头像用，颜色/尺寸由 PHP 内联 style 决定，这里只负责居中排版），全站通用 */
.letter-avatar{display:flex;align-items:center;justify-content:center;border-radius:50%;color:#fff;font-weight:700;line-height:1;flex-shrink:0;user-select:none;}

/* 全站共用的基础头部样式（各页面专属 CSS 里仍有各自的覆盖/微调版本，这里只作为兜底，
   保证没有专属样式的页面——例如 about/contact/complaint/privacy——头部也能正常显示） */
header{background:var(--header-bg,#ff69b4);color:var(--header-text,#fff);padding:0.8rem 1rem;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:1rem;}
.site-title{font-size:1.5rem;font-weight:bold;color:#fff;text-decoration:none;}
nav a{color:#fff;margin:0 0.9rem;text-decoration:none;font-weight:500;}
nav a:hover{text-decoration:underline;}
nav .header-menu-list{list-style:none;display:flex;flex-wrap:wrap;margin:0;padding:0;}
nav .header-menu-list li{list-style:none;}
.theme-toggle{background:rgba(255,255,255,0.25);border:none;color:#fff;padding:0.5rem 0.9rem;border-radius:999px;cursor:pointer;font-size:0.95rem;}
.theme-toggle:hover{background:rgba(255,255,255,0.4);}
/* 移动端把站名与模式按钮固定在首行，导航在次行横向触控滚动，避免菜单与按钮相互覆盖。 */
@media (max-width:768px){
header{display:grid;grid-template-columns:minmax(0,1fr) auto;flex-direction:initial;align-items:center;gap:.65rem .75rem;padding:.65rem .75rem;}
.site-title{grid-column:1;grid-row:1;width:auto;min-width:0;max-width:100%;text-align:left;font-size:1.2rem;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
header>nav{grid-column:1/-1;grid-row:2;width:100%;display:flex;flex-wrap:nowrap;align-items:center;gap:.85rem;overflow-x:auto;overflow-y:hidden;padding:.1rem 0 .15rem;scrollbar-width:none;-webkit-overflow-scrolling:touch;}
header>nav::-webkit-scrollbar{display:none;}
header>nav a{flex:0 0 auto;margin:0;white-space:nowrap;font-size:.82rem;}
header>nav .header-menu-list{flex-wrap:nowrap;gap:.85rem;width:max-content;min-width:100%;}
.theme-toggle{grid-column:2;grid-row:1;align-self:center;margin:0;padding:.38rem .7rem;font-size:.8rem;line-height:1.2;white-space:nowrap;}
}

.site-footer{border-top:1px solid var(--border,#ffd1e8);margin-top:3rem;padding:1.5rem 1rem;color:var(--text-light,#666);font-size:0.9rem;}
.footer-row{max-width:1200px;margin:0 auto;display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:0.8rem;}
.footer-copyright{white-space:nowrap;}
.footer-nav{display:flex;}
/* 页脚导航不应该比正文更抢眼，间距收紧、字号调小，保持克制 */
.footer-menu-list{list-style:none;display:flex;flex-wrap:wrap;gap:0.9rem;margin:0;padding:0;}
.footer-menu-list a{color:var(--text-light,#666);text-decoration:none;font-size:0.82rem;margin:0;}
.footer-menu-list a:hover{color:var(--accent,#ff69b4);text-decoration:underline;}
@media (max-width:600px){.footer-row{flex-direction:column;text-align:center;gap:0.5rem;}}

