/* ============================================================
   我的小屋 · 子页面共享样式
   与首页（index.html）同一套暖色小屋视觉：
   奶油纸底 / 白卡片 / 橘色点缀 / 圆角柔和
   ============================================================ */

:root{
  --ink:        #4a3b32;   /* 正文（与首页 --day-font 一致） */
  --ink-soft:   #8a7a6d;
  --accent:     #e07b39;   /* 强调橘（与首页 .stat-num 一致） */
  --accent-deep:#b35a1f;
  --paper:      #f7f1e6;
  --card:       rgba(255,255,255,.8);
  --line:       rgba(74,59,50,.12);
}

*{ margin:0; padding:0; box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  font-family:"PingFang SC","Microsoft YaHei",sans-serif;
  color:var(--ink);
  background:
    radial-gradient(ellipse 60% 30% at 15% 0%,  rgba(255,214,165,.35), transparent 70%),
    radial-gradient(ellipse 55% 28% at 90% 8%,  rgba(255,186,140,.22), transparent 70%),
    radial-gradient(ellipse 70% 30% at 50% 100%,rgba(255,205,160,.18), transparent 75%),
    var(--paper);
  background-attachment:fixed;
  min-height:100vh;
}

/* ============ 夜晚主题（跟随首页昼夜切换） ============
   首页挂饰切到夜晚后，状态存入 localStorage（cottage-night），
   各子页面 <head> 内的预加载脚本在渲染前就把 night 挂到 <html> 上，
   首帧即为夜晚配色，避免跳转时亮→暗闪烁。
   排除首页（data-page="home"），首页场景有自己的昼夜系统。 */
html.night{ background:#1c1830; }
html.night body:not([data-page="home"]){
  --ink:        #eee6d9;
  --ink-soft:   #ab9db0;
  --accent:     #ffb266;
  --accent-deep:#ffce9a;
  --card:       rgba(66,56,92,.88);
  --line:       rgba(255,255,255,.18);
}
html.night body:not([data-page="home"]){
  background:
    radial-gradient(ellipse 60% 30% at 15% 0%,  rgba(255,178,102,.07), transparent 70%),
    radial-gradient(ellipse 55% 28% at 90% 8%,  rgba(255,178,102,.05), transparent 70%),
    radial-gradient(ellipse 70% 30% at 50% 100%,rgba(255,178,102,.06), transparent 75%),
    linear-gradient(180deg,#1c1830,#262038);
  background-attachment:fixed;
}
html.night body:not([data-page="home"]) .site-header{ background:rgba(24,20,38,.86); }
html.night body:not([data-page="home"]) .menu-btn{ background:rgba(74,62,98,.6); color:#ffce9a; }
html.night body:not([data-page="home"]) .menu-btn:hover{ background:rgba(90,76,118,.85); box-shadow:0 6px 16px rgba(0,0,0,.4); }
html.night body:not([data-page="home"]) .chip{ background:rgba(58,49,78,.66); }
html.night body:not([data-page="home"]) .chip:hover{ background:rgba(74,62,98,.85); }
html.night body:not([data-page="home"]) .chip-bar select{ background:rgba(58,49,78,.8); }
html.night body:not([data-page="home"]) .tab-row .tab{ background:rgba(58,49,78,.66); }
html.night body:not([data-page="home"]) .tab-row .tab:hover{ background:rgba(74,62,98,.85); }
html.night body:not([data-page="home"]) .tag{ background:#5a4230; color:#ffce9a; }
html.night body:not([data-page="home"]) .t-item::before{ background:#2c2640; }
html.night body:not([data-page="home"]) .card{ box-shadow:0 8px 28px rgba(0,0,0,.35); }
html.night body:not([data-page="home"]) .card:hover{ box-shadow:0 14px 34px rgba(0,0,0,.45); }

/* ============ 顶栏 ============ */
.site-header{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:16px 34px;
  background:rgba(247,241,230,.86);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}
.site-header .back-home{
  display:flex; align-items:center; gap:8px;
  color:var(--ink); text-decoration:none;
  font-weight:700; letter-spacing:1px; font-size:16px;
  transition:color .25s;
}
.site-header .back-home:hover{ color:var(--accent); }
.menu-btn{
  display:flex; align-items:center; gap:8px;
  border:1px solid rgba(224,123,57,.45);
  background:rgba(255,227,196,.6);
  color:var(--accent-deep);
  font-size:14px; letter-spacing:1px;
  padding:8px 18px; border-radius:20px;
  cursor:pointer;
  transition:background .25s, transform .25s, box-shadow .25s;
}
.menu-btn:hover{
  background:rgba(255,214,170,.9);
  transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(179,90,31,.18);
}

/* ============ 页头 ============ */
.page-hero{
  max-width:1080px; margin:0 auto;
  padding:56px 28px 8px;
}
.page-hero .hero-emoji{ font-size:46px; line-height:1; }
.page-hero h1{
  font-size:30px; letter-spacing:2px; margin-top:14px;
  display:flex; align-items:baseline; gap:14px; flex-wrap:wrap;
}
.page-hero .hero-en{ font-size:15px; color:var(--accent); font-weight:600; letter-spacing:1px; opacity:.85; }
.page-hero .hero-desc{ margin-top:10px; font-size:14.5px; color:var(--ink-soft); }

/* ============ 主体 ============ */
.page-main{
  max-width:1080px; margin:0 auto;
  padding:30px 28px 60px;
}
.section-title{
  font-size:19px; margin:38px 0 16px;
  display:flex; align-items:center; gap:8px;
}
.section-title::after{
  content:''; flex:1; height:1px;
  background:linear-gradient(to right, var(--line), transparent);
}

/* ============ 卡片 ============ */
.card{
  border-radius:18px; padding:22px 24px;
  background:var(--card);
  box-shadow:0 8px 28px rgba(90,60,30,.12);
  transition:transform .35s ease, box-shadow .35s ease;
}
.card:hover{ transform:translateY(-5px); box-shadow:0 14px 34px rgba(90,60,30,.18); }

/* ============ 筛选 chips ============ */
.chip-bar{
  display:flex; flex-wrap:wrap; gap:10px;
  margin:14px 0 6px; align-items:center;
}
.chip-bar .bar-label{ font-size:12.5px; color:var(--ink-soft); margin-right:2px; }
.chip{
  font-size:13px; letter-spacing:.5px;
  padding:6px 15px; border-radius:16px;
  border:1px solid rgba(224,123,57,.4);
  background:rgba(255,255,255,.6);
  color:var(--accent-deep);
  cursor:pointer;
  transition:all .22s;
  user-select:none;
}
.chip:hover{ background:rgba(255,214,170,.7); }
.chip.active{
  background:linear-gradient(135deg,#ffab5e,#e07b39);
  border-color:transparent;
  color:#fff;
  box-shadow:0 4px 12px rgba(224,123,57,.35);
}
.chip-bar select{
  font-size:13px; padding:6px 12px;
  border-radius:16px;
  border:1px solid rgba(224,123,57,.4);
  background:rgba(255,255,255,.75);
  color:var(--accent-deep);
  outline:none; cursor:pointer;
}
.filter-empty{
  display:none;
  text-align:center; padding:44px 0;
  color:var(--ink-soft); font-size:14px;
}
.filter-empty.show{ display:block; }

/* ============ 栏目 Tab ============ */
.tab-row{ display:flex; flex-wrap:wrap; gap:10px; margin-bottom:22px; }
.tab-row .tab{
  font-size:14px; letter-spacing:1px;
  padding:9px 22px; border-radius:22px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.6);
  color:var(--ink-soft);
  cursor:pointer;
  transition:all .25s;
}
.tab-row .tab:hover{ color:var(--accent-deep); background:rgba(255,214,170,.55); }
.tab-row .tab.active{
  background:linear-gradient(135deg,#ffab5e,#e07b39);
  border-color:transparent; color:#fff;
  box-shadow:0 5px 14px rgba(224,123,57,.35);
}
.tab-panel{ display:none; }
.tab-panel.active{ display:block; animation:fadeUp .45s ease; }
@keyframes fadeUp{ from{ opacity:0; transform:translateY(14px);} to{ opacity:1; transform:none;} }

/* ============ 网格 ============ */
.grid-auto{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:20px;
}
.grid-wide{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:20px;
}

/* ============ 通用小元素 ============ */
.tag{
  display:inline-block; font-size:11px;
  padding:2px 9px; border-radius:10px;
  background:#ffe3c4; color:var(--accent-deep);
  white-space:nowrap;
}
.rating{ color:#e8a33d; font-size:13px; letter-spacing:1px; white-space:nowrap; }
.meta{ font-size:12.5px; color:var(--ink-soft); }
.muted{ color:var(--ink-soft); }

/* ============ 空状态 ============ */
.empty-state{
  text-align:center; padding:60px 20px;
  color:var(--ink-soft);
}
.empty-state .big{ font-size:40px; margin-bottom:12px; }

/* ============ 小屋地图导航浮层 ============ */
.site-menu-mask{
  position:fixed; inset:0; z-index:200;
  background:rgba(30,20,10,.45);
  backdrop-filter:blur(4px);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition:opacity .3s ease;
}
.site-menu-mask.open{ opacity:1; pointer-events:auto; }
.site-menu{
  width:min(860px, calc(100vw - 40px));
  max-height:min(640px, calc(100vh - 60px));
  overflow:auto;
  border-radius:24px;
  background:linear-gradient(160deg,#fff8ec,#ffeeda);
  box-shadow:0 30px 80px rgba(40,20,5,.5);
  padding:30px 32px 26px;
  transform:translateY(18px) scale(.97);
  transition:transform .3s ease;
}
.site-menu-mask.open .site-menu{ transform:none; }
/* 从门里长出来的地图：缩放原点对准门中心（JS 写入 transform-origin） */
.site-menu-mask.from-door .site-menu{
  opacity:0;
  transform:scale(.16);
  filter:blur(3px);
  transition:transform .52s cubic-bezier(.18,.85,.25,1),
             opacity .38s ease,
             filter .45s ease;
}
.site-menu-mask.from-door.open .site-menu{
  opacity:1;
  transform:none;
  filter:none;
}
.site-menu .menu-head{
  display:flex; align-items:center; justify-content:space-between;
  margin-bottom:20px;
}
.site-menu .menu-head h2{ font-size:20px; letter-spacing:2px; }
.site-menu .menu-close{
  width:34px; height:34px; border-radius:50%;
  border:1px solid rgba(74,59,50,.25);
  background:rgba(255,255,255,.7);
  font-size:15px; cursor:pointer; color:var(--ink);
  transition:transform .25s, background .25s;
}
.site-menu .menu-close:hover{ transform:rotate(90deg); background:#fff; }
/* 页面内嵌版小屋地图（首页 #site-map-inline）：与弹层共用同一套卡片样式 */
:is(.site-menu, .site-map-inline) .menu-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(230px,1fr));
  gap:14px;
}
:is(.site-menu, .site-map-inline) a.menu-item{
  display:flex; gap:13px; align-items:flex-start;
  text-decoration:none; color:var(--ink);
  padding:15px 16px; border-radius:16px;
  background:rgba(255,255,255,.72);
  border:1px solid rgba(224,123,57,.18);
  transition:transform .25s, box-shadow .25s, background .25s;
}
:is(.site-menu, .site-map-inline) a.menu-item:hover{
  transform:translateY(-3px);
  background:#fff;
  box-shadow:0 10px 24px rgba(179,90,31,.18);
}
:is(.site-menu, .site-map-inline) a.menu-item.current{
  background:linear-gradient(135deg,#fff1dd,#ffe3c4);
  border-color:rgba(224,123,57,.45);
}
:is(.site-menu, .site-map-inline) .mi-emoji{ font-size:24px; line-height:1.2; }
:is(.site-menu, .site-map-inline) .mi-name{ font-size:15px; font-weight:700; }
:is(.site-menu, .site-map-inline) .mi-name .en{ font-size:11.5px; color:var(--accent); font-weight:600; margin-left:6px; }
:is(.site-menu, .site-map-inline) .mi-desc{ font-size:12px; color:var(--ink-soft); margin-top:3px; line-height:1.5; }

/* 首页内嵌小屋地图板块 */
.home-sitemap{
  margin-top:40px;
  padding:26px 28px 30px;
  border-radius:24px;
  background:linear-gradient(160deg, rgba(255,248,236,.9), rgba(255,238,218,.9));
  border:1px solid rgba(224,123,57,.16);
  box-shadow:0 12px 34px rgba(120,70,20,.08);
}
.home-sitemap h2{ margin:0 0 4px; }
.content .home-sitemap .sub{ margin:0 0 18px; opacity:.75; }
.home-sitemap .mi-desc{ min-height:2.9em; }

/* 夜晚：内嵌小屋地图面板与卡片同步换肤（弹层浮窗保持原来的暖色不变） */
body.night .home-sitemap{
  background:linear-gradient(160deg, rgba(44,36,62,.94), rgba(28,24,42,.94));
  border-color:rgba(255,196,132,.14);
  box-shadow:0 12px 34px rgba(0,0,0,.4);
}
body.night .site-map-inline a.menu-item{
  background:rgba(58,49,78,.72);
  border-color:rgba(255,196,132,.13);
  color:#eee6d9;
}
body.night .site-map-inline a.menu-item:hover{ background:rgba(74,62,98,.9); }
body.night .site-map-inline a.menu-item.current{
  background:linear-gradient(135deg,#5a4230,#6b4a2e);
  border-color:rgba(255,180,110,.42);
}
body.night .site-map-inline .mi-desc{ color:#ab9db0; }
body.night .site-map-inline .mi-name .en{ color:#ffb266; }

/* 夜晚：弹层浮窗同步换上夜景配色（与内嵌版/首页内容区一致） */
body.night .site-menu-mask{ background:rgba(5,4,10,.62); }
body.night .site-menu{
  background:linear-gradient(160deg, rgba(44,36,62,.97), rgba(28,24,42,.97));
  box-shadow:0 30px 80px rgba(0,0,0,.6);
}
body.night .site-menu .menu-head h2{ color:#eee6d9; }
body.night .site-menu .menu-close{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.22);
  color:#eee6d9;
}
body.night .site-menu .menu-close:hover{ background:rgba(255,255,255,.18); }
body.night .site-menu a.menu-item{
  background:rgba(58,49,78,.72);
  border-color:rgba(255,196,132,.13);
  color:#eee6d9;
}
body.night .site-menu a.menu-item:hover{ background:rgba(74,62,98,.9); }
body.night .site-menu a.menu-item.current{
  background:linear-gradient(135deg,#5a4230,#6b4a2e);
  border-color:rgba(255,180,110,.42);
}
body.night .site-menu .mi-desc{ color:#ab9db0; }
body.night .site-menu .mi-name .en{ color:#ffb266; }

/* 夜晚兜底：浮层自带 menu-night class 时同样换夜景配色
   （nav.js 打开浮层时按 localStorage 的 cottage-night 挂 class，
    不依赖 body.night，防止任何时序或缓存导致的漏换肤） */
.site-menu-mask.menu-night{ background:rgba(5,4,10,.62); }
.site-menu-mask.menu-night .site-menu{
  background:linear-gradient(160deg, rgba(44,36,62,.97), rgba(28,24,42,.97));
  box-shadow:0 30px 80px rgba(0,0,0,.6);
}
.site-menu-mask.menu-night .site-menu .menu-head h2{ color:#eee6d9; }
.site-menu-mask.menu-night .site-menu .menu-close{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.22);
  color:#eee6d9;
}
.site-menu-mask.menu-night .site-menu .menu-close:hover{ background:rgba(255,255,255,.18); }
.site-menu-mask.menu-night .site-menu a.menu-item{
  background:rgba(58,49,78,.72);
  border-color:rgba(255,196,132,.13);
  color:#eee6d9;
}
.site-menu-mask.menu-night .site-menu a.menu-item:hover{ background:rgba(74,62,98,.9); }
.site-menu-mask.menu-night .site-menu a.menu-item.current{
  background:linear-gradient(135deg,#5a4230,#6b4a2e);
  border-color:rgba(255,180,110,.42);
}
.site-menu-mask.menu-night .site-menu .mi-desc{ color:#ab9db0; }
.site-menu-mask.menu-night .site-menu .mi-name .en{ color:#ffb266; }

/* ============ 海报放大查看（详情页封面 lightbox） ============ */
.detail-poster{ cursor:zoom-in; transition:transform .25s ease; }
.detail-poster:hover{ transform:scale(1.03); }
.lightbox-mask{
  position:fixed; inset:0; z-index:300;
  background:rgba(12,9,6,.78);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none;
  transition:opacity .3s ease;
  cursor:zoom-out;
}
.lightbox-mask.open{ opacity:1; pointer-events:auto; }
.lightbox-mask img{
  max-width:min(86vw, 560px); max-height:86vh;
  border-radius:16px;
  box-shadow:0 30px 90px rgba(0,0,0,.6);
  transform:scale(.55); opacity:0;
  transition:transform .38s cubic-bezier(.2,.9,.3,1.12), opacity .3s ease;
}
.lightbox-mask.open img{ transform:scale(1); opacity:1; }

/* ============ 页脚 ============ */
.site-footer{
  text-align:center; padding:34px 20px 44px;
  font-size:13px; color:var(--ink-soft); opacity:.75;
}

@media (max-width:640px){
  .site-header{ padding:12px 16px; }
  .page-hero{ padding:36px 18px 4px; }
  .page-main{ padding:22px 16px 40px; }
  .page-hero h1{ font-size:24px; }
  .page-hero .hero-emoji{ font-size:38px; }
  .card{ padding:18px 18px; border-radius:16px; }
  .grid-auto{ grid-template-columns:1fr; gap:16px; }
  .grid-wide{ grid-template-columns:1fr; gap:16px; }
  .tab-row{ gap:8px; margin-bottom:18px; }
  .tab-row .tab{ font-size:13px; padding:8px 16px; border-radius:18px; }
  .chip-bar{ gap:8px; }
  .chip{ font-size:12px; padding:5px 12px; }
  .chip-bar select{ font-size:12px; padding:5px 10px; }
  .section-title{ font-size:17px; margin:30px 0 14px; }
  .site-menu{ padding:22px 18px 20px; border-radius:20px; }
  :is(.site-menu,.site-map-inline) .menu-grid{ grid-template-columns:1fr; gap:10px; }
  .site-footer{ padding:26px 16px 36px; }
}

/* 手机竖屏：进一步压缩 */
@media (max-width:400px){
  .page-hero h1{ font-size:21px; gap:10px; }
  .tab-row .tab{ font-size:12.5px; padding:7px 13px; }
  .card{ padding:16px 15px; }
}

/* ===== 全站自定义鼠标皮肤（昼夜两套，箭头形一眼认得出） =====
   白天：奶暖白箭头 + 焦糖描边；指向可点元素时变蜜桃橙填充
   夜晚：夜页同款奶油字色 + 淡紫描边；指向可点元素时灯笼橙描边（仍是夜色，不回白天配色）
   无顶部圆点；任何系统光标（pointer/zoom/text 等）一律被覆盖为自定义 */
html{
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><path d='M7 2.5 L22 14.5 L15.4 15.7 L18.9 22.8 L15.5 24.4 L12.1 17.2 L7 21.4 Z' fill='%23fff3dd' stroke='%23c96a2a' stroke-width='2' stroke-linejoin='round'/></svg>") 4 2, auto !important;
}
a, button, input, select, textarea, label, summary,
[role='button'], [onclick], .menu-close, .menu-item, .pv-chip, .pv-chip-link{
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><path d='M7 2.5 L22 14.5 L15.4 15.7 L18.9 22.8 L15.5 24.4 L12.1 17.2 L7 21.4 Z' fill='%23ffd9a8' stroke='%23a34f18' stroke-width='2' stroke-linejoin='round'/></svg>") 4 2, pointer !important;
}
body.night{
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><path d='M7 2.5 L22 14.5 L15.4 15.7 L18.9 22.8 L15.5 24.4 L12.1 17.2 L7 21.4 Z' fill='%23f3e9dc' stroke='%238f7bb8' stroke-width='2' stroke-linejoin='round'/></svg>") 4 2, auto !important;
}
body.night a, body.night button, body.night input, body.night select,
body.night textarea, body.night label, body.night summary,
body.night [role='button'], body.night [onclick], body.night .menu-close,
body.night .menu-item, body.night .pv-chip, body.night .pv-chip-link{
  cursor:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='28' height='28' viewBox='0 0 28 28'><path d='M7 2.5 L22 14.5 L15.4 15.7 L18.9 22.8 L15.5 24.4 L12.1 17.2 L7 21.4 Z' fill='%23f3e9dc' stroke='%238f7bb8' stroke-width='2.4' stroke-linejoin='round'/></svg>") 4 2, pointer !important;
}

/* ===== 板块页底部返回小屋按钮（页脚版权文字上方） ===== */
.back-home-wrap{ text-align:center; margin:26px 0 8px; }
.back-home-btn{
  display:inline-flex; align-items:center; gap:7px;
  padding:10px 26px; border-radius:999px;
  background:linear-gradient(135deg,#ffb266,#e07b39);
  color:#fff; font-size:14px; font-weight:600; letter-spacing:.04em;
  text-decoration:none;
  box-shadow:0 6px 16px rgba(224,123,57,.35);
  transition:transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.back-home-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 10px 22px rgba(224,123,57,.45);
  filter:brightness(1.06);
}
body.night .back-home-btn{
  background:linear-gradient(135deg,#8f7bb8,#5d4a86);
  box-shadow:0 6px 16px rgba(93,74,134,.4);
}
body.night .back-home-btn:hover{ box-shadow:0 10px 22px rgba(93,74,134,.5); filter:brightness(1.12); }
