/* ========== Glimmer OS 主屏幕样式 - 极简白冰设计 ========== */

/* ================= 系统变量 ================= */
:root {
    /* 日间模式基础变量 */
    --bg-milky: #F2F2F4;
    --card-white: #FFFFFF;
    --card-black: #111111;
    --text-black: #1A1A1A;
    --text-grey: #8E8E93;
    --text-main: #111111;
    --text-sub: #8E8E93;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.03);
    --shadow-heavy: 0 12px 30px rgba(0, 0, 0, 0.12);
    --font-serif: 'Playfair Display', serif;
    --font-hand: 'Caveat', cursive;
    --sat: env(safe-area-inset-top, 20px);

    /* 🌟 全局缩放系数引擎：默认苹果大屏，缩放系数为 1 (100%) */
    --s: 1;
}

/* 🌟 智能探测：如果屏幕高度小于 820px (普通安卓)，整体缩小到 88% */
@media (max-height: 820px) { :root { --s: 0.88; } }
/* 如果屏幕高度小于 740px (带底栏的矮屏)，整体缩小到 80% */
@media (max-height: 740px) { :root { --s: 0.80; } }
/* 如果是极小屏幕，整体缩小到 72% */
@media (max-height: 660px) { :root { --s: 0.72; } }

body.dark-mode {
    /* 夜间模式覆盖变量 */
    --bg-milky: #0A0A0A;
    --card-white: #1A1A1C;
    --card-black: #2A2A2D;
    --text-black: #EFEFEF;
    --text-grey: #7A7A7A;
    --text-main: #EFEFEF;
    --text-sub: #7A7A7A;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-heavy: 0 12px 30px rgba(0, 0, 0, 0.8);
}

/* 强制主页使用自己的文字颜色 */
body.dark-mode .taro-home {
    color: var(--text-black) !important;
}

body.dark-mode .taro-home * {
    color: inherit;
}

/* ================= 主页面 CSS ================= */
.taro-home {
    width: 100%; height: 100%;
    background: var(--bg-milky) !important;
    min-height: 100vh; min-height: 100dvh;
    position: relative; overflow: hidden;
    transition: background 0.5s;
    display: flex;
    flex-direction: column;
}

/* 🔧 强制覆盖：确保极简白冰设计的核心样式不被其他CSS文件覆盖 */
.taro-home .card,
.taro-home .taro-card {
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: 28px !important;
    box-shadow: var(--shadow-soft) !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    transition: background 0.5s, box-shadow 0.5s, border 0.5s !important;
}

/* 黑色卡片由 theme.js 动态控制，不使用 CSS 变量硬编码 */

body.dark-mode .taro-home .card,
body.dark-mode .taro-home .taro-card {
    border: 1px solid rgba(255,255,255,0.05) !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    box-shadow: var(--shadow-soft) !important;
}
.taro-safe-top {
    height: 0;
    flex-shrink: 0;
    /* 防御性兜底：JS 没把 height 设上时，min-height 顶住灵动岛/刘海。
       env() 在不支持的设备/桌面浏览器返回 0，正常机型行为不变 */
    min-height: env(safe-area-inset-top, 0px);
}
/* safe-top 高度由 JS 动态控制，仅 iOS standalone 模式才补偿；
   CSS 的 min-height 是 PWA 探测失败时的兜底（如 Safari 直开） */

.taro-view-port {
    width: 100%;
    flex: 1;
    overflow: hidden; position: relative;
    /* none（不是 pan-x）：自定义 translateX 轮播必须让浏览器完全不接管手势，
       否则 Chromium/Edge 判定为水平 pan 时会 pointercancel 掉、setPointerCapture 也拦不住，
       表现为"能划但翻不过去"。主页每页 overflow:hidden、定高，无需保留任何原生滚动。 */
    touch-action: none; padding-top: 4px; cursor: grab;
    min-height: 0;
}
.taro-view-port:active { cursor: grabbing; }
.taro-slider-track { display: flex; width: 300%; height: 100%; transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.taro-page {
    width: calc(100% / 3); height: 100%;
    padding: 0 20px 30px; display: flex; flex-direction: column;
    justify-content: flex-start;
    gap: calc(12px * var(--s)); /* 🌟 间距等比缩小 */
    overflow: hidden; pointer-events: none;
}
.taro-page > * { pointer-events: auto; }
.taro-page::-webkit-scrollbar { display: none; }

/* 通用卡片与网格 */
.taro-home .card,
.taro-home .taro-card {
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: 28px !important;
    box-shadow: var(--shadow-soft) !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    transition: background 0.5s, box-shadow 0.5s, border 0.5s !important;
    /* 🌟 核心修复 2：开启 3D 硬件加速，彻底修复移动端 scale 导致的边缘截断 Bug！ */
    transform: translateZ(0);
    will-change: transform;
}
body.dark-mode .taro-home .card,
body.dark-mode .taro-home .taro-card {
    border: 1px solid rgba(255,255,255,0.05) !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    box-shadow: var(--shadow-soft) !important;
}
.taro-home .grid-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 14px !important;
    flex-shrink: 0 !important;
}
.taro-home .deco-lbl {
    font-size: 9px !important;
    font-weight: 900 !important;
    color: var(--theme-text, #bbb) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-bottom: -6px !important;
    padding-left: 4px !important;
    flex-shrink: 0 !important;
    transition: color 0.5s !important;
}
body.dark-mode .taro-home .deco-lbl {
    color: var(--theme-text, #666) !important;
}

/* 悬挂AI入口 */
.hanging-ai-trigger {
    position: absolute; top: -8px; right: 32px; z-index: 50; cursor: pointer;
    display: flex; flex-direction: column; align-items: center;
    transform-origin: top center; animation: sway-bw 6s ease-in-out infinite alternate;
}
@keyframes sway-bw { 0% { transform: rotate(-5deg); } 100% { transform: rotate(5deg); } }
.hanging-ai-trigger .rope { width: 2px; height: 20px; background: var(--text-black); opacity: 0.15; transition: 0.5s; }
.hanging-ai-trigger .tag {
    background: var(--card-white); padding: 10px 6px; width: 32px;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06); border-radius: 0 0 4px 4px; border: 1px solid rgba(0,0,0,0.03); transition: 0.5s;
    position: relative;
}
/* 🔴 有未读更新时点亮的呼吸红点（点过更新日志后消失，下次发版再亮） */
.hanging-ai-trigger .paofu-guide-dot {
    display: none;
    position: absolute; top: -4px; right: -4px;
    width: 9px; height: 9px;
    background: #FF3B30; border-radius: 50%;
    border: 2px solid var(--card-white);
    z-index: 2;
    animation: paofu-guide-pulse 2s infinite;
}
@keyframes paofu-guide-pulse {
    0%   { box-shadow: 0 0 0 0px rgba(255,59,48,0.45); }
    70%  { box-shadow: 0 0 0 6px rgba(255,59,48,0); }
    100% { box-shadow: 0 0 0 0px rgba(255,59,48,0); }
}
.hanging-ai-trigger .barcode {
    width: 16px; height: 24px; opacity: 0.9; transition: 0.5s;
    background: repeating-linear-gradient(to right, var(--text-black) 0, var(--text-black) 1px, transparent 1px, transparent 3px, var(--text-black) 3px, var(--text-black) 4.5px, transparent 4.5px, transparent 6px, var(--text-black) 6px, var(--text-black) 7px);
}
.hanging-ai-trigger span { font-size: 8px; font-weight: 900; color: var(--text-black); writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: 1px; }
body.dark-mode .hanging-ai-trigger .rope { background: #fff; opacity: 0.2; }
body.dark-mode .hanging-ai-trigger .barcode { opacity: 0.6; background: repeating-linear-gradient(to right, #fff 0, #fff 1px, transparent 1px, transparent 3px, #fff 3px, #fff 4.5px, transparent 4.5px, transparent 6px, #fff 6px, #fff 7px); }
body.dark-mode .hanging-ai-trigger span { color: #fff; opacity: 0.8; }

/* PAGE 1：名片、日历、照片、音乐 */
/* 顶部时间和问候语 */
.taro-home .p1-time {
    font-size: 48px !important;
    font-weight: 300 !important;
    color: var(--text-black) !important;
    text-align: center !important;
    letter-spacing: -2px !important;
    transition: 0.5s !important;
}
.taro-home .p1-greeting {
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--text-grey) !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
    transition: 0.5s !important;
}
.taro-home .p1-date {
    font-size: 12px !important;
    font-weight: 600 !important;
    color: var(--text-grey) !important;
    letter-spacing: 1px !important;
    transition: 0.5s !important;
}
.taro-home .p1-greeting-row,
.taro-home .p1-date-weather {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.taro-home .taro-person-card,
.taro-home .profile-card {
    height: calc(280px * var(--s)) !important; /* 🌟 完美等比缩小 */
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    text-align: center !important;
    position: relative !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: 28px !important;
    box-shadow: var(--shadow-soft) !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    overflow: hidden !important;
}
body.dark-mode .taro-home .taro-person-card,
body.dark-mode .taro-home .profile-card {
    background: #1A1A1C !important;
    border: 1px solid #333 !important;
}

/* 封面图 */
.pc-header {
    position: absolute !important; top: 0 !important; left: 0 !important;
    width: 100% !important;
    height: calc(120px * var(--s)) !important; /* 🌟 等比缩小 */
    z-index: 0;
    overflow: hidden; padding: 0 !important; margin: 0 !important;
}
.pc-header img {
    width: 100% !important; height: 100% !important; object-fit: cover; display: block; transition: 0.5s;
}
body.dark-mode .pc-header img { filter: brightness(0.8); }
body.dark-mode .pc-header { border-bottom-color: rgba(255,255,255,0.1); }

.bg-name-deco {
    position: absolute;
    bottom: calc(30px * var(--s)); /* 🌟 等比缩小 */
    left: 50%; transform: translateX(-50%);
    font-family: var(--font-serif); font-weight: 900;
    font-size: clamp(28px, calc(76px * var(--s)), 76px); /* 🌟 等比缩小 */
    color: rgba(0,0,0,0.03); -webkit-text-stroke: 0;
    z-index: 1; pointer-events: none; white-space: nowrap; transition: 0.5s;
    letter-spacing: 2px;
}
body.dark-mode .bg-name-deco { color: rgba(255,255,255,0.08); }

.taro-avatar-wrap, .avatar {
    width: calc(76px * var(--s)); /* 🌟 等比缩小 */
    height: calc(76px * var(--s));
    border-radius: 50%;
    background: var(--card-white);
    padding: calc(4px * var(--s)); /* 🌟 等比缩小 */
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    position: relative; z-index: 2;
    margin-top: calc(82px * var(--s)); /* 🌟 等比缩小 */
    flex-shrink: 0;
    transition: 0.5s;
}
.taro-avatar-wrap img, .avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
body.dark-mode .taro-avatar-wrap, body.dark-mode .avatar { background: #1A1A1C; box-shadow: 0 8px 24px rgba(0,0,0,0.5); }

.taro-pc-name, .p-name {
    font-size: calc(20px * var(--s)); /* 🌟 等比缩小 */
    font-weight: 900; color: var(--text-black); position: relative; z-index: 2;
    margin-top: calc(8px * var(--s)); /* 🌟 等比缩小 */
    transition: 0.5s;
}
.taro-pc-quote, .pc-quote, .p-quote {
    font-family: var(--font-serif);
    font-size: calc(12px * var(--s)); /* 🌟 等比缩小 */
    font-style: italic;
    color: var(--text-grey); background: rgba(0,0,0,0.04);
    margin-top: calc(8px * var(--s)); /* 🌟 等比缩小 */
    position: relative; z-index: 2;
    padding: calc(4px * var(--s)) calc(14px * var(--s)); /* 🌟 等比缩小 */
    border-radius: calc(20px * var(--s)); /* 🌟 等比缩小 */
    transition: 0.5s;
}
body.dark-mode .taro-pc-quote, body.dark-mode .p-quote { background: rgba(255,255,255,0.05); color: #A0A0A5; }
.taro-pc-pinyin, .p-pinyin { display: none !important; }
.taro-pc-role {
    font-size: calc(10px * var(--s)); /* 🌟 等比缩小 */
    font-weight: 800; color: var(--text-grey);
    letter-spacing: calc(2px * var(--s)); /* 🌟 等比缩小 */
    text-transform: uppercase; position: relative; z-index: 2; transition: 0.5s;
}
.taro-pc-line {
    width: calc(60px * var(--s)); /* 🌟 等比缩小 */
    height: 1px; background: var(--text-black);
    margin: calc(8px * var(--s)) 0; /* 🌟 等比缩小 */
    opacity: 0.3; transition: 0.5s;
}
body.dark-mode .taro-pc-line { background: var(--text-grey); opacity: 0.5; }
.p1-divider { display: flex !important; align-items: center !important; justify-content: center !important; gap: 12px; height: 20px; opacity: 0.3; width: 100%; }
.p1-divider .line { flex: 1 !important; height: 1px; background: var(--text-black); transition: 0.5s; }
body.dark-mode .p1-divider { opacity: 0.5; }
body.dark-mode .p1-divider .line { background: var(--text-grey); }
.p1-divider-text { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--text-black); transition: 0.5s; }

/* 支持HTML中的头像内部结构 */
.taro-avatar-glow { display: none; }
.taro-avatar-ring {
    width: 100%; height: 100%; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.taro-avatar-inner {
    width: 100%; height: 100%; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; font-weight: 900; color: var(--text-black);
    background: linear-gradient(135deg, #ffd6e7 0%, #e6d6ff 100%);
    transition: 0.5s;
}
body.dark-mode .taro-avatar-inner { color: var(--text-main); }

.taro-home .cal-card,
.taro-home .taro-card.cal {
    padding: calc(18px * var(--s)) calc(16px * var(--s)) !important; /* 🌟 等比缩小 */
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: calc(165px * var(--s)) !important; /* 🌟 等比缩小 */
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: 28px !important;
    box-shadow: var(--shadow-soft) !important;
}
body.dark-mode .taro-home .cal-card,
body.dark-mode .taro-home .taro-card.cal {
    background: #1A1A1C !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}
.taro-home .cal-top {
    display: flex !important;
    justify-content: space-between !important;
    font-size: calc(9px * var(--s)) !important; /* 🌟 等比缩小 */
    font-weight: 800 !important;
    /* color: var(--text-grey) !important; */ /* 🎨 移除硬编码颜色，让 theme.js 动态控制 */
    transition: 0.5s !important;
}
.taro-home .cal-nums {
    display: flex !important;
    gap: calc(8px * var(--s)) !important; /* 🌟 等比缩小 */
    height: calc(90px * var(--s)) !important; /* 🌟 等比缩小 */
    margin-top: calc(10px * var(--s)) !important; /* 🌟 等比缩小 */
}
.taro-home .cal-n {
    flex: 1 !important;
    background: var(--card-black) !important;
    border-radius: calc(14px * var(--s)) !important; /* 🌟 等比缩小 */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #fff !important;
    font-size: calc(32px * var(--s)) !important; /* 🌟 等比缩小 */
    font-weight: 800 !important;
    transition: 0.5s !important;
}

.taro-home .photo-card,
.taro-home .taro-card.photo {
    height: calc(165px * var(--s)) !important; /* 🌟 等比缩小 */
    position: relative !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: 28px !important;
    box-shadow: var(--shadow-soft) !important;
    overflow: hidden !important;
}
body.dark-mode .taro-home .photo-card,
body.dark-mode .taro-home .taro-card.photo {
    background: #1A1A1C !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}
.photo-card img, .bento-tall-inner img {
    width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; transition: filter 0.5s;
}
.pol img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; pointer-events: none; transition: filter 0.5s; }
body.dark-mode .photo-card img, body.dark-mode .bento-tall-inner img { filter: brightness(0.8); }
body.dark-mode .pol img { filter: none; }
.photo-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-grey); font-size: 12px; transition: 0.5s; }
.photo-placeholder i { font-size: 32px; opacity: 0.5; }
.editable-img { cursor: pointer; transition: transform 0.2s; }
.editable-img:active { transform: scale(0.95) !important; }

.taro-home .music-card,
.taro-home .taro-card.music {
    height: calc(126px * var(--s)) !important; /* 🌟 等比缩小 */
    padding: calc(24px * var(--s)) !important; /* 🌟 等比缩小 */
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    overflow: visible !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: 28px !important;
    box-shadow: var(--shadow-soft) !important;
}
body.dark-mode .taro-home .music-card,
body.dark-mode .taro-home .taro-card.music {
    background: #1A1A1C !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}
.taro-home .mc-info { z-index: 2 !important; }
.taro-home .mc-title {
    font-family: var(--font-serif) !important;
    font-size: calc(20px * var(--s)) !important; /* 🌟 等比缩小 */
    font-weight: 900 !important;
    /* color: var(--text-black) !important; */ /* 🎨 移除硬编码颜色，让 theme.js 动态控制 */
    transition: 0.5s !important;
}
.taro-home .mc-artist {
    font-size: calc(11px * var(--s)) !important; /* 🌟 等比缩小 */
    /* color: var(--text-grey) !important; */ /* 🎨 移除硬编码颜色，让 theme.js 动态控制 */
    font-weight: 600 !important;
    margin-top: 2px !important;
    transition: 0.5s !important;
}
.mc-lyric-wrap {
    overflow: hidden;
    white-space: nowrap;
    max-width: 160px;
    margin-top: 4px;
    height: 16px;
}
.mc-lyric-wrap span {
    display: inline-block;
    font-size: 11px;
    color: var(--text-grey);
    opacity: 0.75;
    animation: mc-lyric-scroll 8s linear infinite;
}
.mc-lyric-wrap span:empty { animation: none; }
@keyframes mc-lyric-scroll {
    0%   { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
.mc-ctrl {
    display: flex;
    gap: calc(16px * var(--s)); /* 🌟 等比缩小 */
    margin-top: calc(16px * var(--s)); /* 🌟 等比缩小 */
    align-items: center;
    font-size: calc(14px * var(--s)); /* 🌟 等比缩小 */
    color: var(--text-black);
    transition: 0.5s;
}
.mc-btn { cursor: pointer; opacity: 0.6; }
.mc-btn:hover { opacity: 1; }
.mc-play {
    width: calc(28px * var(--s)); /* 🌟 等比缩小 */
    height: calc(28px * var(--s)); /* 🌟 等比缩小 */
    background: var(--card-black);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.5s;
}
.vinyl-wrapper {
    position: absolute;
    right: calc(-45px * var(--s)); /* 🌟 等比缩小 */
    top: 50%;
    margin-top: calc(-55px * var(--s)); /* 🌟 等比缩小 */
    width: calc(110px * var(--s)); /* 🌟 等比缩小 */
    height: calc(110px * var(--s)); /* 🌟 等比缩小 */
    z-index: 1;
}
.vinyl-record {
    width: 100%; height: 100%; border-radius: 50%;
    background: conic-gradient(from 120deg, transparent 0%, rgba(255,255,255,0.15) 15%, transparent 30%, transparent 50%, rgba(255,255,255,0.15) 65%, transparent 80%), repeating-radial-gradient(#111 0px, #111 2px, #262626 3px, #111 4px);
    border: calc(3px * var(--s)) solid var(--card-white); /* 🌟 等比缩小 */
    box-shadow: -5px 5px 15px rgba(0,0,0,0.15);
    display: flex; align-items: center; justify-content: center;
    animation: spinVinyl 4s linear infinite; pointer-events: none; transition: 0.5s;
}
.vinyl-record::before {
    content: '';
    position: absolute;
    width: calc(36px * var(--s)); /* 🌟 等比缩小 */
    height: calc(36px * var(--s)); /* 🌟 等比缩小 */
    border-radius: 50%;
    background: #f4f4f4;
    border: 1px solid #ccc;
    transition: 0.5s;
}
.vinyl-record::after {
    content: '';
    position: absolute;
    width: calc(8px * var(--s)); /* 🌟 等比缩小 */
    height: calc(8px * var(--s)); /* 🌟 等比缩小 */
    border-radius: 50%;
    background: var(--bg-milky);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.4);
    transition: 0.5s;
}
@keyframes spinVinyl { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
body.dark-mode .vinyl-record { background: conic-gradient(from 120deg, transparent 0%, rgba(255,255,255,0.05) 15%, transparent 30%, transparent 50%, rgba(255,255,255,0.05) 65%, transparent 80%), repeating-radial-gradient(#111 0px, #111 2px, #222 3px, #111 4px); border-color: #333; }
body.dark-mode .vinyl-record::before { background: #222; border-color: #444; }
body.dark-mode .vinyl-record::after { background: #000; }

/* PAGE 2：钱包、拍立得、APP */
.taro-home .wallet-card {
    background: var(--card-black) !important;
    color: #fff !important;
    padding: 24px !important;
    height: 130px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    box-shadow: var(--shadow-heavy) !important;
    border-radius: 28px !important;
    transition: 0.5s !important;
}
.wallet-label { font-size: 10px; font-weight: 700; color: #888; }
.wallet-num { font-family: var(--font-serif); font-size: 38px; font-weight: 700; margin-top: 8px; }
.wallet-icon { font-size: 32px; opacity: 0.8; }

.taro-home .triple-polaroids {
    height: 170px !important;
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}
.taro-home .pol {
    position: absolute !important;
    width: 90px !important;
    height: 110px !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    padding: 4px 4px 20px !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1) !important;
    transition: 0.5s !important;
    border-radius: 3px !important;
}
body.dark-mode .taro-home .pol {
    /* background: #1A1A1C !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border: 1px solid #333 !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5) !important;
}
.photo-placeholder-sm { position: absolute; inset: 4px; bottom: 20px; display: flex; align-items: center; justify-content: center; background: #eee; transition: 0.5s; z-index: 0; }
.pol img { width: 100%; height: 100%; object-fit: cover; display: block; position: relative; z-index: 1; }
.pol-left { left: 5px; transform: rotate(-6deg); z-index: 1; }
.pol-right { right: 5px; transform: rotate(8deg); z-index: 2; }
.pol-center { z-index: 3; transform: scale(1.1) translateY(-5px); }
body.dark-mode .pol { border: 1px solid #333; box-shadow: 0 8px 20px rgba(0,0,0,0.5); }
body.dark-mode .pol img { filter: brightness(0.9); }
body.dark-mode .photo-placeholder-sm { background: #222; }

.p2-bottom { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; height: 180px; }
.taro-home .quote-card {
    background: var(--card-black) !important;
    color: #fff !important;
    padding: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    border-radius: 28px !important;
    box-shadow: var(--shadow-soft) !important;
    transition: 0.5s !important;
}
.taro-home .quote-card-title {
    font-family: var(--font-serif) !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    border-bottom: 1px solid #333 !important;
    padding-bottom: 6px !important;
    margin-bottom: 10px !important;
    transition: 0.5s !important;
}
.taro-home .quote-card-text {
    font-size: 13px !important;
    line-height: 1.6 !important;
    color: #ddd !important;
    font-weight: 600 !important;
    transition: 0.5s !important;
}
body.dark-mode .taro-home .quote-card-title {
    border-bottom-color: #444 !important;
}
body.dark-mode .taro-home .quote-card-text {
    color: #aaa !important;
}

.taro-home .app-2x2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    grid-template-rows: 1fr 1fr !important;
    gap: 12px !important;
}
.taro-home .app-sq {
    border-radius: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    box-shadow: var(--shadow-soft) !important;
    font-size: 24px !important;
    color: var(--text-black) !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    transition: 0.5s !important;
    overflow: visible !important;
}
.taro-home .app-sq span {
    font-size: 9px !important;
    font-weight: 800 !important;
    white-space: nowrap !important;
}
.taro-home .app-sq-dark {
    background: var(--card-black) !important;
    color: #fff !important;
}
.taro-home .app-sq-dark span {
    color: #999 !important;
}
body.dark-mode .taro-home .app-sq {
    background: #1A1A1C !important;
}
body.dark-mode .taro-home .app-sq-dark {
    background: var(--card-black) !important;
    border: 1px solid #333 !important;
}
.taro-home .app-sq .icon-box { display: flex; align-items: center; justify-content: center; width: auto; height: auto; font-size: 20px; background: none !important; border: none !important; box-shadow: none !important; backdrop-filter: none !important; }
.taro-home .app-sq .icon-box i { background: none !important; -webkit-background-clip: unset !important; background-clip: unset !important; -webkit-text-fill-color: unset !important; color: var(--text-black) !important; filter: none !important; font-size: 20px !important; }
.taro-home .app-sq-dark .icon-box i { color: #fff !important; }

/* PAGE 3：Bento、Companion、Whisper */
/* Bento 容器布局 */
.taro-home .p3-bento {
    display: grid !important;
    grid-template-columns: 1.2fr 1fr !important;
    gap: 14px !important;
    height: 210px !important;
    flex-shrink: 0 !important;
    position: relative !important;
    z-index: 2 !important;
    overflow: visible !important;
}

.taro-home .bento-stacked {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    min-height: 0 !important;
    height: 100% !important;
    position: relative !important;
    z-index: 3 !important;
}

.taro-home .bento-tall {
    position: relative !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: 24px !important;
    padding: 8px 8px 32px 8px !important;
    box-shadow: 0 12px 24px rgba(0,0,0,0.06) !important;
    transform: rotate(-2deg) !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    min-height: 0 !important;
    transition: 0.5s !important;
    overflow: hidden !important;
}
body.dark-mode .taro-home .bento-tall {
    background: #1A1A1C !important;
    border: 1px solid #333 !important;
    box-shadow: 0 12px 24px rgba(0,0,0,0.3) !important;
}
.taro-home .bento-sm-black {
    flex: 1 !important;
    background: var(--card-black) !important;
    border-radius: 24px !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: var(--shadow-heavy) !important;
    color: #fff !important;
    position: relative !important;
    overflow: hidden !important;
    transition: 0.5s !important;
}
body.dark-mode .taro-home .bento-sm-black {
    background: var(--card-black) !important;
    border: 1px solid #333 !important;
}
.taro-home .bento-sm-white {
    flex: 1 !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: 24px !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    gap: 8px !important;
    border: none !important;
    box-shadow: var(--shadow-soft) !important;
    position: relative !important;
    transition: 0.5s !important;
}
body.dark-mode .taro-home .bento-sm-white {
    background: #1A1A1C !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}
.bs-icon { width: 32px !important; height: 32px !important; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; transition: 0.5s; background: none !important; border: none !important; box-shadow: none !important; backdrop-filter: none !important; flex-shrink: 0 !important; }
.bs-black-icon { background: var(--c-comp-starhub, #222) !important; color: #fff !important; border: none !important; border-radius: 10px !important; }
.bs-white-icon { background: #F2F2F4 !important; color: var(--text-black) !important; border-radius: 10px !important; }
.bs-black-icon i { background: none !important; -webkit-background-clip: unset !important; background-clip: unset !important; -webkit-text-fill-color: #fff !important; color: #fff !important; filter: none !important; }
.bs-white-icon i { background: none !important; -webkit-background-clip: unset !important; background-clip: unset !important; -webkit-text-fill-color: var(--text-black) !important; color: var(--text-black) !important; filter: none !important; }
.bs-title { font-size: 13px; font-weight: 900; color: inherit; }
.bs-sub { font-size: 8px; /* color: var(--text-grey); */ letter-spacing: 1px; margin-top: 2px; } /* 🎨 移除硬编码颜色，让 theme.js 动态控制 */

/* Bento 内部元素 */
.taro-home .bento-tall-inner {
    flex: 1 !important;
    background: #F5F5F7 !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.taro-home .bento-tall-text {
    position: absolute !important;
    bottom: 8px !important;
    left: 0 !important;
    width: 100% !important;
    text-align: center !important;
    font-family: var(--font-serif) !important;
    font-size: 11px !important;
    font-style: italic !important;
    font-weight: 400 !important;
    /* color: var(--text-grey) !important; */ /* 🎨 移除硬编码颜色，让 theme.js 动态控制 */
    letter-spacing: 1px !important;
    text-transform: none !important;
}

.taro-home .bento-tape {
    position: absolute !important;
    top: -8px !important;
    left: 50% !important;
    transform: translateX(-50%) rotate(3deg) !important;
    width: 50px !important;
    height: 16px !important;
    background: rgba(255,255,255,0.85) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    border-radius: 2px !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08) !important;
    z-index: 10 !important;
}

body.dark-mode .bento-tall { background: var(--card-white); border: 1px solid #333; box-shadow: 0 12px 24px rgba(0,0,0,0.3); }
body.dark-mode .bento-tall-inner { background: #222; }
body.dark-mode .bento-tape { background: rgba(255,255,255,0.1); box-shadow: 0 2px 6px rgba(0,0,0,0.5); border-color: rgba(255,255,255,0.05); backdrop-filter: blur(4px); }
body.dark-mode .bento-sm-black { background: var(--card-black); border: 1px solid #333; }
body.dark-mode .bento-sm-white { border: 1px solid rgba(255,255,255,0.05); }
body.dark-mode .bs-white-icon { background: #2A2A2D !important; color: #fff !important; }
body.dark-mode .bs-white-icon i {
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #fff !important;
    color: #fff !important;
    filter: none !important;
}

.taro-home .bw-companion {
    height: 140px !important;
    background: var(--card-black) !important;
    color: #fff !important;
    padding: 24px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
    border-radius: 28px !important;
    box-shadow: var(--shadow-soft) !important;
    transition: 0.5s !important;
    overflow: hidden !important;
}

/* Companion 卡片内部元素 */
.taro-home .bwc-bg-watermark {
    position: absolute !important;
    font-size: 120px !important;
    color: rgba(255,255,255,0.05) !important;
    right: -20px !important;
    bottom: -30px !important;
    pointer-events: none !important;
}

.taro-home .bwc-content {
    flex: 1 !important;
    z-index: 2 !important;
}

.taro-home .bwc-locked {
    font-size: 9px !important;
    font-weight: 900 !important;
    color: #888 !important;
    letter-spacing: 2px !important;
    margin-bottom: 8px !important;
}

.taro-home .bwc-title {
    font-family: var(--font-serif) !important;
    font-size: 32px !important;
    font-weight: 900 !important;
    color: #fff !important;
    margin: 2px 0 !important;
}

.taro-home .bwc-sub {
    font-size: 11px !important;
    color: #aaa !important;
    font-style: italic !important;
    line-height: 1.4 !important;
}

.taro-home .bwc-lock-icon {
    font-size: 32px !important;
    color: rgba(255,255,255,0.3) !important;
    z-index: 2 !important;
}
.taro-home .bw-whisper {
    height: 140px !important;
    padding: 20px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    border: 1px solid #E5E5EA !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: 28px !important;
    box-shadow: var(--shadow-soft) !important;
    transition: 0.5s !important;
}
body.dark-mode .taro-home .bw-whisper {
    background: #1A1A1C !important;
    border: 1px solid #333 !important;
}
.bww-header { display: flex; justify-content: space-between; border-bottom: 1.5px solid #F0F0F2; padding-bottom: 10px; transition: 0.5s; }
body.dark-mode .bww-header { border-bottom-color: #333; }
.bww-year { display: flex; align-items: center; gap: 8px; }
.bww-year-label { font-size: 14px; font-weight: 900; color: var(--text-black); transition: 0.5s; }
.bww-num { background: var(--card-black); color: #fff; font-size: 26px; font-weight: 900; padding: 6px 10px; border-radius: 8px; line-height: 1; transition: 0.5s; }
.bww-icon { font-size: 24px; color: var(--text-black); transition: 0.5s; }
.bww-log-label { font-size: 10px; font-weight: 800; color: var(--text-grey); margin-top: 10px; letter-spacing: 1px; }
.bww-hand { font-family: 'Caveat', var(--font-hand), cursive !important; font-size: 32px; color: var(--text-black); transform: rotate(-3deg); align-self: flex-end; margin-right: 5px; transition: 0.5s; }

/* 分页点与底栏 */
.taro-home .p-dots,
.taro-home .taro-dots {
    display: none !important; /* 🌟 隐藏分页点 */
}
.taro-home .dot,
.taro-home .taro-dot {
    width: calc(6px * var(--s)) !important; /* 🌟 挂钩缩放系数 */
    height: calc(6px * var(--s)) !important; /* 🌟 挂钩缩放系数 */
    border-radius: 50% !important;
    background: #dcdcdc !important;
    transition: 0.3s !important;
}
.taro-home .dot.active,
.taro-home .taro-dot.active {
    background: var(--text-black) !important;
    width: calc(16px * var(--s)) !important; /* 🌟 挂钩缩放系数 */
    border-radius: calc(3px * var(--s)) !important; /* 🌟 挂钩缩放系数 */
}
body.dark-mode .taro-home .dot,
body.dark-mode .taro-home .taro-dot {
    background: #444 !important;
}
body.dark-mode .taro-home .dot.active,
body.dark-mode .taro-home .taro-dot.active {
    background: #fff !important;
}

/* 浮动音乐播放器 */
.taro-float-music {
    position: absolute;
    bottom: calc(var(--dock-actual-height, 68px) + var(--bottom-nav-pb, 16px) + 20px); /* 🔧 动态计算：dock实际高度 + dock底部边距 + 额外间距 */
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--card-white);
    border-radius: 50%;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 50; /* 🔧 低于 dock 的 z-index: 100 */
}
.taro-float-music:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-heavy);
}
body.dark-mode .taro-float-music {
    border: 1px solid rgba(255,255,255,0.05);
}
.taro-fm-disc {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--card-black);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: spinVinyl 4s linear infinite;
}
.taro-bar {
    width: 3px;
    height: 12px;
    background: #fff;
    margin: 0 1px;
    border-radius: 2px;
    animation: musicBar 0.8s ease-in-out infinite;
}
@keyframes musicBar {
    0%, 100% { height: 8px; }
    50% { height: 16px; }
}

.taro-home .bottom-nav {
    flex-shrink: 0 !important;
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: transparent !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
    padding: calc(8px * var(--s)) 0 calc(16px * var(--s)) 0 !important;
}

/* standalone/fullscreen 模式加底部 safe area */
@media all and (display-mode: standalone), (display-mode: fullscreen) {
    .taro-home .bottom-nav {
        padding-bottom: calc(16px * var(--s) + max(16px, env(safe-area-inset-bottom, 16px))) !important;
    }
}
.taro-home .dock,
.taro-home .taro-dock-container {
    /* 🌟 全部挂钩 var(--s) 缩放系数，安卓上自动变秀气 */
    width: calc(min(280px, 75vw) * var(--s)) !important;
    min-height: calc(68px * var(--s)) !important;
    height: auto !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
    border-radius: calc(34px * var(--s)) !important;
    box-shadow: var(--shadow-soft) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 calc(24px * var(--s)) !important;
    border: 1px solid rgba(0,0,0,0.05) !important;
    transition: 0.5s !important;
    margin-left: auto !important;
    margin-right: auto !important;
    /* 🌟 恢复底部边距，避免贴底 */
    margin-bottom: calc(16px * var(--s)) !important;
    z-index: 100 !important;
    pointer-events: auto !important;
}
body.dark-mode .taro-home .dock,
body.dark-mode .taro-home .taro-dock-container {
    border: 1px solid #333 !important;
    /* background: var(--card-white) !important; */ /* 🎨 注释掉硬编码背景色，让 theme.js 动态控制 */
}

/* iOS PWA standalone 模式 dock 强制居中 */
@media all and (display-mode: standalone) {
    .taro-home .bottom-nav {
        align-items: center !important;
        padding-left: env(safe-area-inset-left, 0px) !important;
        padding-right: env(safe-area-inset-right, 0px) !important;
    }
    .taro-home .taro-dock-container,
    .taro-home .dock {
        margin-left: auto !important;
        margin-right: auto !important;
        align-self: center !important;
    }
    .taro-home .taro-dots,
    .taro-home .p-dots {
        padding-left: env(safe-area-inset-left, 0px) !important;
        padding-right: env(safe-area-inset-right, 0px) !important;
    }
}
.dock-i, .taro-dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(4px * var(--s)); /* 🌟 挂钩缩放系数 */
    cursor: pointer;
}
.d-icon, .taro-dock-icon-box {
    width: calc(36px * var(--s)); /* 🌟 挂钩缩放系数 */
    height: calc(36px * var(--s)); /* 🌟 挂钩缩放系数 */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: calc(18px * var(--s)); /* 🌟 挂钩缩放系数 */
    color: var(--text-black);
    transition: 0.5s;
}
.dock-i.main .d-icon, .taro-dock-item.main .taro-dock-icon-box, .taro-echo-box {
    background: var(--card-black) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    width: calc(44px * var(--s)) !important; /* 🌟 挂钩缩放系数 */
    height: calc(44px * var(--s)) !important; /* 🌟 挂钩缩放系数 */
    font-size: calc(20px * var(--s)) !important; /* 🌟 挂钩缩放系数 */
}
.d-lbl, .taro-dock-label {
    font-size: calc(9px * var(--s)); /* 🌟 挂钩缩放系数 */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: calc(1px * var(--s)); /* 🌟 挂钩缩放系数 */
    color: var(--theme-text, var(--text-black));
    transition: 0.5s;
}
body.dark-mode .d-icon, body.dark-mode .taro-dock-icon-box { color: #fff; }
body.dark-mode .dock-i.main .d-icon, body.dark-mode .taro-dock-item.main .taro-dock-icon-box, body.dark-mode .taro-echo-box { background: #fff !important; color: #000 !important; box-shadow: 0 4px 12px rgba(255,255,255,0.1) !important; }
body.dark-mode .d-lbl, body.dark-mode .taro-dock-label { color: var(--theme-text, var(--text-grey)); }

/* 顶部时间+问候语容器 */
.p1-hero-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

/* ================= PAGE 4：天气 + 拼贴 + 时光胶囊 + 岁时记 ================= */

/* 1. 顶部：无界气象排版 (纯文字浮空，只读展示引擎天气) */
.p4-weather-typo {
    display: flex; flex-direction: column; gap: 8px;
    margin-top: 45px; /* 完美避开右上角的悬浮吊牌（对齐设计稿 主页第四页.html:138） */
    padding: 0 10px; position: relative; transition: 0.2s;
}
.p4-weather-typo:active { transform: scale(0.98); }

.p4-wt-top { display: flex; justify-content: space-between; align-items: center; padding-right: 10px; }

.p4-wt-temp {
    font-family: var(--font-serif); font-size: 86px; font-weight: 900;
    line-height: 0.8; letter-spacing: -4px; color: var(--theme-text, #1A1A1A);
}

.uw-icon-zone {
    position: relative; width: 64px; height: 64px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.uw-icon {
    position: absolute; font-size: 56px; color: var(--theme-text, #1A1A1A);
    opacity: 0; transition: opacity 0.4s ease, transform 0.4s ease;
}

@keyframes spinIcon { 100% { transform: rotate(360deg); } }
@keyframes floatY { 0% { transform: translateY(-3px); } 100% { transform: translateY(3px); } }
@keyframes floatX { 0% { transform: translateX(-3px); } 100% { transform: translateX(3px); } }
@keyframes flashIcon { 0%, 90%, 100% { opacity: 0.5; } 92%, 96% { opacity: 1; text-shadow: 0 0 12px rgba(0,0,0,0.5); } }
@keyframes rainShake { 0% { transform: translateY(0) rotate(0); } 100% { transform: translateY(2px) rotate(-2deg); } }
@keyframes pulseBlur { 0% { opacity: 0.6; filter: blur(1px); } 100% { opacity: 1; filter: blur(0); } }

.is-sunny .ic-sun { opacity: 1; animation: spinIcon 12s linear infinite; }
.is-cloudy .ic-cloud { opacity: 1; animation: floatY 3s ease-in-out infinite alternate; color: var(--theme-text, #555); }
.is-rainy .ic-rain { opacity: 1; animation: rainShake 1s ease-in-out infinite alternate; color: var(--theme-text, #444); }
.is-snowy .ic-snow { opacity: 1; animation: floatY 4s ease-in-out infinite alternate; color: var(--theme-text, #777); }
.is-thunder .ic-thunder { opacity: 1; animation: flashIcon 2s infinite; }
.is-windy .ic-wind { opacity: 1; animation: floatX 2s ease-in-out infinite alternate; }
.is-foggy .ic-fog { opacity: 1; animation: pulseBlur 3s ease-in-out infinite alternate; color: var(--theme-text, #999); }

.p4-wt-line { width: 100%; height: 1.5px; background: var(--theme-text, #1A1A1A); margin: 4px 0; }
.p4-wt-bot { display: flex; justify-content: space-between; align-items: flex-end; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: var(--theme-text, #1A1A1A); }
.p4-wt-bot-left { display: flex; flex-direction: column; gap: 4px; }
.p4-wt-loc { font-size: 11px; outline: none; border-bottom: 1px dashed transparent; transition: 0.2s; }
.p4-wt-loc:focus { border-bottom: 1px dashed #ccc; }
.p4-wt-date { font-size: 9px; font-weight: 800; color: var(--text-grey); letter-spacing: 1px; }
/* 2. 核心拼贴区：双拍立得 + 胶带 */
.p4-collage-zone { position: relative; height: 210px; margin: 15px 0 10px; }
.p4-photo-1 {
    position: absolute; left: 10px; top: 20px; width: 120px; height: 140px;
    background: #fff; padding: 6px 6px 24px 6px; border: 1px solid #E5E5EA;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); transform: rotate(-6deg); z-index: 1;
}
.p4-photo-1 img { width: 100%; height: 100%; object-fit: cover; background: #eee; pointer-events: none; }
.p4-photo-2 {
    position: absolute; left: 90px; top: 40px; width: 125px; height: 145px;
    background: #fff; padding: 6px 6px 24px 6px; border: 1px solid #E5E5EA;
    box-shadow: 0 15px 30px rgba(0,0,0,0.08); transform: rotate(4deg); z-index: 2;
}
.p4-photo-2 img { width: 100%; height: 100%; object-fit: cover; background: #eee; pointer-events: none; }
.p4-tape {
    position: absolute; top: -10px; left: 50px; width: 45px; height: 14px;
    background: rgba(255,255,255,0.95); border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05); transform: rotate(-2deg); z-index: 3;
}
.p4-collage-text {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    text-align: right; display: flex; flex-direction: column; gap: 8px;
}
.p4-ct-title { font-family: var(--font-serif); font-size: 16px; font-weight: 900; color: var(--theme-text, #1A1A1A); outline: none; border-bottom: 1px dashed transparent; }
.p4-ct-title .p4-ct-magic { display: inline-block; margin-left: 10px; /* Magic Sense 单独右移，Love is 不动，制造错位 */ }
.p4-ct-title:focus { border-bottom: 1px dashed #ccc; }
.p4-ct-sub { font-size: 9px; font-weight: 700; color: var(--text-grey); letter-spacing: 1px; outline: none; border-bottom: 1px dashed transparent; text-transform: uppercase; }
.p4-ct-sub:focus { border-bottom: 1px dashed #ccc; }
.p4-ct-icon { font-size: 18px; color: var(--theme-text, #1A1A1A); align-self: flex-end; }

/* 3. 底部混排区：时光胶囊 + 唯一的《岁时记》App */
.p4-bottom-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; height: 160px; position: relative; z-index: 6; /* 浮在拼贴区溢出的照片(z1/z2)之上，否则照片角盖住左下角卡片吃掉点击 */ }
.p4-tracker-card {
    background: var(--card-white); border-radius: 24px; padding: 16px;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: var(--shadow-soft); border: 1px solid rgba(0,0,0,0.02);
}
.p4-tc-header { display: flex; flex-direction: column; gap: 4px; }
.p4-tc-name { font-size: 11px; font-weight: 900; color: var(--text-black); display: flex; align-items: center; gap: 4px; outline: none; border-bottom: 1px dashed transparent; }
.p4-tc-name:focus { border-bottom: 1px dashed #ccc; }
.p4-tc-date { font-size: 9px; font-weight: 700; color: var(--text-grey); letter-spacing: 1px; outline: none; border-bottom: 1px dashed transparent; }
.p4-tc-date:focus { border-bottom: 1px dashed #ccc; }
.p4-tc-bot { display: flex; justify-content: space-between; align-items: flex-end; }
.p4-tc-main { display: flex; align-items: baseline; gap: 4px; }
.p4-tc-days { font-family: var(--font-serif); font-size: 38px; font-weight: 900; line-height: 1; outline: none; border-bottom: 1px dashed transparent; color: var(--text-black); }
.p4-tc-days:focus { border-bottom: 1px dashed #ccc; }
.p4-tc-unit { font-size: 10px; font-weight: 800; color: var(--text-grey); }
.p4-tc-img { width: 50px; height: 50px; border-radius: 12px; background: #eee; overflow: hidden; border: 1px solid rgba(0,0,0,0.05); }
.p4-tc-img img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.p4-single-app-zone {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    position: relative; height: 100%;
}
.p4-doodle-arrow {
    font-family: 'Caveat', var(--font-hand), cursive !important; /* 对齐页3 .bww-hand 的生效写法：显式 Caveat 打头 + !important，否则回退普通体 */
    font-size: 18px; color: var(--text-grey);
    transform: rotate(-10deg); margin-bottom: 12px; margin-left: -20px; outline: none;
    animation: bobArrow 2s ease-in-out infinite alternate;
}
@keyframes bobArrow { 0% { transform: rotate(-10deg) translateY(0); } 100% { transform: rotate(-10deg) translateY(-4px); } }
.p4-the-app-icon {
    width: 64px; height: 64px; background: var(--card-white); color: var(--text-black);
    border-radius: 18px; display: flex; align-items: center; justify-content: center;
    font-size: 32px; box-shadow: var(--shadow-soft); border: 1px solid #E5E5EA;
    cursor: pointer; transition: 0.2s;
}
.p4-the-app-icon:active { transform: scale(0.95); }
.p4-the-app-name { font-size: 11px; font-weight: 800; color: var(--theme-text, #1A1A1A); margin-top: 10px; letter-spacing: 1px; }

/* ===== PAGE 4 夜间模式：与前三页对齐（变量已在 .taro-home 根块翻转，这里只补写死色值）===== */
/* 双拍立得：白底白边 → 暗卡底 + 暗边（同 photo-card #1A1A1C / pol #333） */
body.dark-mode .taro-home .p4-photo-1,
body.dark-mode .taro-home .p4-photo-2 {
    background: #1A1A1C !important;
    border: 1px solid #333 !important;
    box-shadow: 0 12px 28px rgba(0,0,0,0.5) !important;
}
body.dark-mode .taro-home .p4-photo-1 img,
body.dark-mode .taro-home .p4-photo-2 img { background: #222 !important; }
/* 胶带：亮白 → 压暗半透明 */
body.dark-mode .taro-home .p4-tape {
    background: rgba(255,255,255,0.12) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4) !important;
}
/* 时光胶囊缩略图占位灰 → 暗灰（同 placeholder-sm #222） */
body.dark-mode .taro-home .p4-tc-img {
    background: #222 !important;
    border: 1px solid rgba(255,255,255,0.05) !important;
}
/* 岁时记 App 图标浅边 → 暗边（底色 var(--card-white) 已自动翻） */
body.dark-mode .taro-home .p4-the-app-icon {
    border: 1px solid rgba(255,255,255,0.05) !important;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5) !important;
}
/* 时光胶囊卡片边线压暗（底色 var(--card-white) 已自动翻） */
body.dark-mode .taro-home .p4-tracker-card {
    border: 1px solid rgba(255,255,255,0.05) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.5) !important;
}
/* 天气图标深灰态 → 提亮，保留彼此区分度 */
body.dark-mode .taro-home .is-cloudy .ic-cloud { color: #B0B0B0 !important; }
body.dark-mode .taro-home .is-rainy .ic-rain { color: #9FB4C9 !important; }
body.dark-mode .taro-home .is-snowy .ic-snow { color: #C9D4E0 !important; }
body.dark-mode .taro-home .is-foggy .ic-fog { color: #A8A8A8 !important; }
/* 闪电态阴影在暗底改用亮辉 */
body.dark-mode .taro-home .is-thunder .ic-thunder { text-shadow: 0 0 14px rgba(255,255,255,0.4); }

