:root {
    /* 梦幻浅金色调 */
    --primary: #d9b877;          /* 香槟金 */
    --primary-light: #ecd9a8;    /* 浅蜜金 */
    --primary-dark: #b8935a;     /* 深金棕 */
    --accent: #e8c66f;           /* 淡金 */
    --accent-glow: #fff3d6;      /* 金色光晕 */

    /* 梦幻背景 */
    --bg-1: #fdf6e9;
    --bg-2: #f9edd4;
    --bg-3: #f5e6c8;
    --bg-pearl: #fbeee6;         /* 珍珠粉光 */

    /* 毛玻璃 */
    --glass-bg: linear-gradient(135deg, rgba(255, 253, 246, 0.48), rgba(255, 247, 231, 0.3));
    --glass-bg-hover: linear-gradient(135deg, rgba(255, 254, 250, 0.62), rgba(255, 250, 238, 0.45));
    --glass-border: rgba(255, 255, 255, 0.65);
    --glass-shadow: 0 10px 36px rgba(184, 147, 90, 0.18);

    /* 文字 */
    --text-primary: #6b5a35;
    --text-secondary: #9a8a68;
    --text-muted: #bfae8c;

    --success: #a3b98a;
    --warning: #dcb86a;
    --danger: #d29a8a;
    --radius: 20px;
    --blur: 28px;
}

* {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background:
        radial-gradient(1200px 800px at 85% -10%, rgba(232, 198, 111, 0.22), transparent 60%),
        radial-gradient(900px 700px at -10% 100%, rgba(251, 238, 230, 0.7), transparent 55%),
        linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 45%, var(--bg-3) 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    overscroll-behavior-y: none;
    -webkit-font-smoothing: antialiased;
}

/* 梦幻漂浮光斑（呼吸动画） */
body::before {
    content: '';
    position: fixed;
    top: -140px; right: -140px;
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(236, 217, 168, 0.55), rgba(236, 217, 168, 0.12) 55%, transparent 72%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: breathe 9s ease-in-out infinite;
    filter: blur(4px);
}

body::after {
    content: '';
    position: fixed;
    bottom: -160px; left: -120px;
    width: 420px; height: 420px;
    background: radial-gradient(circle, rgba(251, 238, 230, 0.85), rgba(232, 198, 111, 0.14) 58%, transparent 74%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: breathe 11s ease-in-out infinite reverse;
    filter: blur(6px);
}

@keyframes breathe {
    0%, 100% { transform: scale(1) translate(0, 0); opacity: 0.9; }
    50% { transform: scale(1.12) translate(-14px, 18px); opacity: 1; }
}

/* 磨砂颗粒质感层（全屏极低透明度） */
.grain {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.05;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    mix-blend-mode: overlay;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 28px calc(96px + env(safe-area-inset-bottom, 0px));
    position: relative;
    z-index: 2;
}

/* ===== 毛玻璃核心混合（多层质感） ===== */
.glass,
.panel {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur)) saturate(170%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(170%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow:
        var(--glass-shadow),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.95),      /* 顶部镜面高光 */
        inset 0 -1px 0 rgba(255, 255, 255, 0.4),        /* 底部反光 */
        inset 1px 0 0 rgba(255, 255, 255, 0.5);         /* 侧缘光 */
    overflow: hidden;
}

/* 顶部流光描边 */
.glass::before,
.panel::before {
    content: '';
    position: absolute;
    top: 0; left: 12%; right: 12%;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), rgba(232, 198, 111, 0.8), rgba(255, 255, 255, 0.95), transparent);
    border-radius: 2px;
    pointer-events: none;
}

/* 对角镜面辉光 */
.glass::after,
.panel::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0.06) 28%, transparent 52%, rgba(255, 243, 214, 0.1) 82%, transparent 100%);
    pointer-events: none;
}

@supports not (backdrop-filter: blur(1px)) {
    .glass, .panel, .resume-card, .stat-card, .nav, .filter-bar {
        background: rgba(253, 246, 233, 0.88);
    }
}

/* ===== 顶部导航（桌面） ===== */
.nav {
    padding: 14px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-brand {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--text-primary);
}

.logo {
    width: 42px; height: 42px;
    background: linear-gradient(145deg, #f3e2b8, var(--primary) 55%, var(--primary-dark));
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    color: #fffdf5; font-size: 19px;
    box-shadow:
        0 5px 16px rgba(184, 147, 90, 0.4),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.85),
        inset 0 -2px 4px rgba(184, 147, 90, 0.35);
    flex-shrink: 0;
}

.nav-brand-title { font-size: 17px; font-weight: 700; letter-spacing: 0.5px; }
.nav-brand-sub { font-size: 11px; color: var(--text-muted); margin-top: 1px; }

.nav-tabs { display: flex; gap: 6px; flex-wrap: wrap; }

.nav-tab {
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 14px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.25s ease;
    display: inline-flex; align-items: center; gap: 7px;
    border: 1px solid transparent;
    min-height: 44px;
}

.nav-tab:hover { background: rgba(232, 198, 111, 0.18); color: var(--primary-dark); }
.nav-tab:active { transform: scale(0.96); }

.nav-tab.active {
    background: linear-gradient(145deg, rgba(236, 217, 168, 0.95), rgba(184, 147, 90, 0.92));
    color: #fffdf5;
    box-shadow: 0 4px 14px rgba(184, 147, 90, 0.38), inset 0 1.5px 0 rgba(255, 255, 255, 0.65);
}

/* ===== 通用组件 ===== */
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; letter-spacing: 0.3px; }
.page-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 22px; }

.btn {
    border: none; cursor: pointer;
    border-radius: 50px;
    font-size: 14px; font-weight: 600;
    padding: 11px 24px;
    transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 8px;
    font-family: inherit;
    text-decoration: none;
    min-height: 44px;
    user-select: none;
    -webkit-user-select: none;
}

.btn-primary {
    background: linear-gradient(145deg, #f0dda8, var(--primary) 50%, var(--primary-dark));
    color: #fffdf5;
    box-shadow: 0 5px 16px rgba(184, 147, 90, 0.4), inset 0 1.5px 0 rgba(255, 255, 255, 0.7);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(184, 147, 90, 0.48), inset 0 1.5px 0 rgba(255, 255, 255, 0.7); }
.btn-primary:active { transform: scale(0.97); }

.btn-ghost {
    background: rgba(255, 253, 246, 0.4);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.btn-ghost:hover { background: rgba(255, 254, 248, 0.62); color: var(--text-primary); }
.btn-ghost:active { transform: scale(0.97); }

/* ===== 统计卡片 ===== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur)) saturate(170%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(170%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow:
        var(--glass-shadow),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(255, 255, 255, 0.4);
    display: flex; align-items: center; gap: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    text-decoration: none; color: inherit;
    position: relative;
    overflow: hidden;
}

/* 卡片内对角辉光 */
.stat-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.38) 0%, transparent 45%);
    pointer-events: none;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 44px rgba(184, 147, 90, 0.26), inset 0 1.5px 0 rgba(255, 255, 255, 0.95);
    background: var(--glass-bg-hover);
}
.stat-card:active { transform: scale(0.98); }

.stat-icon {
    width: 48px; height: 48px;
    border-radius: 15px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.9), 0 3px 10px rgba(184, 147, 90, 0.12);
}
.stat-icon.total { background: linear-gradient(145deg, rgba(236, 217, 168, 0.75), rgba(217, 184, 119, 0.4)); }
.stat-icon.recent { background: linear-gradient(145deg, rgba(255, 243, 214, 0.9), rgba(232, 198, 111, 0.45)); }
.stat-icon.starred { background: linear-gradient(145deg, rgba(220, 226, 190, 0.85), rgba(163, 185, 138, 0.35)); }
.stat-icon.categories { background: linear-gradient(145deg, rgba(250, 224, 210, 0.9), rgba(210, 154, 138, 0.35)); }

.stat-value { font-size: 28px; font-weight: 700; line-height: 1; color: var(--text-primary); }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== 筛选栏 ===== */
.filter-bar {
    padding: 14px 22px;
    margin-bottom: 24px;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.filter-label { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-right: 2px; }

.filter-chip {
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    cursor: pointer;
    background: rgba(255, 253, 246, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: var(--text-secondary);
    transition: all 0.25s ease;
    font-family: inherit;
    min-height: 38px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.filter-chip:hover { background: rgba(232, 198, 111, 0.2); border-color: var(--primary); color: var(--primary-dark); }
.filter-chip:active { transform: scale(0.95); }
.filter-chip.active {
    background: linear-gradient(145deg, #f0dda8, var(--primary) 55%, var(--primary-dark));
    border-color: transparent; color: #fffdf5;
    box-shadow: 0 3px 12px rgba(184, 147, 90, 0.36), inset 0 1.5px 0 rgba(255, 255, 255, 0.65);
}

.filter-sep { width: 1px; height: 24px; background: rgba(184, 147, 90, 0.22); margin: 0 8px; }

.sort-select {
    background: rgba(255, 253, 246, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 8px 14px;
    font-size: 13px; color: var(--text-secondary);
    outline: none; cursor: pointer; font-family: inherit;
    margin-left: auto;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* ===== 简历卡片 ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 20px;
    padding-bottom: 24px;
}

.resume-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur)) saturate(170%);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(170%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow:
        var(--glass-shadow),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(255, 255, 255, 0.4),
        inset 1px 0 0 rgba(255, 255, 255, 0.5);
    transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* 悬停时展开的顶部金光 */
.resume-card::before {
    content: '';
    position: absolute;
    top: 0; left: 10%; right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), var(--accent-glow), var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 对角镜面光 */
.resume-card::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(115deg, rgba(255, 255, 255, 0.34) 0%, rgba(255, 255, 255, 0.05) 30%, transparent 55%);
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.resume-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 48px rgba(184, 147, 90, 0.28), inset 0 1.5px 0 rgba(255, 255, 255, 0.95);
    background: var(--glass-bg-hover);
}
.resume-card:hover::before { opacity: 1; }
.resume-card:active { transform: scale(0.98); }
.resume-card.starred::before {
    opacity: 1;
    background: linear-gradient(90deg, transparent, #dcb86a, #fff3d6, #dcb86a, transparent);
}

.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; position: relative; z-index: 2; }

.avatar {
    width: 52px; height: 52px;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 600;
    color: #fffdf5;
    background: linear-gradient(145deg, #f3e2b8, var(--primary) 55%, var(--primary-dark));
    flex-shrink: 0;
    box-shadow:
        0 5px 14px rgba(184, 147, 90, 0.32),
        inset 0 2px 0 rgba(255, 255, 255, 0.85),
        inset 0 -2px 4px rgba(184, 147, 90, 0.3);
}
.avatar.c2 { background: linear-gradient(145deg, #f7ecc4, #e8c66f 55%, #c9a24e); }
.avatar.c3 { background: linear-gradient(145deg, #e2ead0, #a3b98a 55%, #7f9463); }
.avatar.c4 { background: linear-gradient(145deg, #f6ded2, #d29a8a 55%, #b07465); }
.avatar.c5 { background: linear-gradient(145deg, #ecdfc6, #c2a06b 55%, #96794b); }

.card-actions { display: flex; gap: 6px; }

.icon-btn {
    width: 36px; height: 36px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 253, 246, 0.42);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
    color: var(--text-muted);
    backdrop-filter: blur(8px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    text-decoration: none;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.75); color: var(--primary-dark); transform: scale(1.08); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.star-btn.active { color: #c99a2e; background: rgba(255, 243, 214, 0.75); }

.resume-name { font-size: 17px; font-weight: 700; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; position: relative; z-index: 2; }
.resume-role { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; position: relative; z-index: 2; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; position: relative; z-index: 2; }

.tag {
    font-size: 11px; padding: 4px 11px;
    border-radius: 50px;
    background: rgba(232, 198, 111, 0.16);
    color: var(--primary-dark);
    border: 1px solid rgba(232, 198, 111, 0.35);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.tag.status-new { background: rgba(163, 185, 138, 0.18); color: #6f8352; border-color: rgba(163, 185, 138, 0.4); }
.tag.status-viewed { background: rgba(220, 184, 106, 0.2); color: #a8842e; border-color: rgba(220, 184, 106, 0.42); }
.tag.status-archived { background: rgba(191, 174, 140, 0.18); color: #8a7a58; border-color: rgba(191, 174, 140, 0.4); }

.card-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(184, 147, 90, 0.14);
    font-size: 12px; color: var(--text-muted);
    position: relative; z-index: 2;
}
.foot-item { display: flex; align-items: center; gap: 5px; }

.skill-bar { height: 6px; border-radius: 10px; background: rgba(184, 147, 90, 0.14); margin: 10px 0 14px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(184, 147, 90, 0.15); }
.skill-fill {
    height: 100%; border-radius: 10px;
    background: linear-gradient(90deg, #f3e2b8, var(--primary) 60%, var(--primary-dark));
    box-shadow: 0 1px 3px rgba(184, 147, 90, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.7);
    transition: width 0.6s ease;
}

/* ===== 搜索框 ===== */
.search-box {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255, 253, 246, 0.45);
    backdrop-filter: blur(14px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    padding: 9px 16px;
    width: 280px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.9);
}
.search-box:focus-within {
    width: 340px;
    box-shadow: 0 0 0 3px rgba(232, 198, 111, 0.3), inset 0 1.5px 0 rgba(255, 255, 255, 0.9);
    background: rgba(255, 254, 248, 0.65);
}

.search-box svg { width: 16px; height: 16px; stroke: var(--text-muted); flex-shrink: 0; }

.search-box input {
    border: none; outline: none; background: transparent;
    width: 100%; font-size: 15px; color: var(--text-primary);
    font-family: inherit;
    min-height: 22px;
}
.search-box input::placeholder { color: var(--text-muted); }

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(107, 90, 53, 0.28);
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
    display: none;
    align-items: center; justify-content: center;
    z-index: 100;
    padding: 20px;
    padding-top: calc(20px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.modal-overlay.show { display: flex; animation: fadeIn 0.25s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
    background: linear-gradient(160deg, rgba(255, 252, 243, 0.86), rgba(255, 247, 231, 0.72));
    backdrop-filter: blur(36px) saturate(180%);
    -webkit-backdrop-filter: blur(36px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 24px;
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 30px;
    box-shadow:
        0 24px 64px rgba(107, 90, 53, 0.28),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.95),
        inset 0 -1px 0 rgba(255, 255, 255, 0.4);
    animation: slideUp 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.modal::before {
    content: '';
    position: absolute;
    top: 0; left: 14%; right: 14%;
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.95), rgba(232, 198, 111, 0.8), rgba(255, 255, 255, 0.95), transparent);
}

@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.modal-title { font-size: 20px; font-weight: 700; }

.close-btn {
    width: 40px; height: 40px;
    border-radius: 13px; border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 253, 246, 0.45);
    cursor: pointer; font-size: 18px;
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.close-btn:hover { background: rgba(250, 224, 210, 0.7); color: var(--danger); }
.close-btn:active { transform: scale(0.92); }

/* ===== 表单 ===== */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

.form-group input,
.form-group select,
.form-group textarea {
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 13px;
    padding: 11px 14px;
    font-size: 15px;
    background: rgba(255, 253, 246, 0.55);
    outline: none;
    transition: all 0.2s ease;
    color: var(--text-primary);
    font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), inset 0 2px 6px rgba(184, 147, 90, 0.06);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 198, 111, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 252, 0.8);
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group select { cursor: pointer; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }

.form-hint { font-size: 12px; color: var(--text-muted); }

/* ===== 详情 ===== */
.detail-body { display: grid; grid-template-columns: 80px 1fr; gap: 20px; margin-bottom: 20px; align-items: start; }

.detail-avatar {
    width: 80px; height: 80px;
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 600;
    color: #fffdf5;
    background: linear-gradient(145deg, #f3e2b8, var(--primary) 55%, var(--primary-dark));
    box-shadow: 0 8px 22px rgba(184, 147, 90, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.85);
}

.detail-info-row { display: flex; gap: 32px; margin-top: 8px; flex-wrap: wrap; }

.detail-meta {
    margin: 16px 0;
    padding: 15px 18px;
    background: rgba(255, 253, 246, 0.42);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.detail-meta-row { display: flex; gap: 12px; margin-bottom: 8px; font-size: 13px; }
.detail-meta-row:last-child { margin-bottom: 0; }
.meta-key { color: var(--text-muted); min-width: 70px; flex-shrink: 0; }
.meta-val { color: var(--text-primary); font-weight: 500; }

/* ===== Toast ===== */
.toast {
    position: fixed;
    bottom: calc(32px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%) translateY(90px);
    background: rgba(107, 90, 53, 0.82);
    backdrop-filter: blur(14px);
    color: #fff8e8;
    padding: 13px 28px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 12px 32px rgba(107, 90, 53, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 200;
    pointer-events: none;
    max-width: calc(100vw - 48px);
    text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

/* ===== 空状态 ===== */
.empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
}
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.55; }

/* ===== 章节标题 ===== */
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; position: relative; z-index: 2; }
.section-title { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.section-more { font-size: 13px; color: var(--primary-dark); text-decoration: none; }
.section-more:hover { text-decoration: underline; }

/* ===== iPhone 适配：≤ 760px 变为 iOS App 布局 ===== */
@media (max-width: 760px) {
    .container {
        padding: 14px 16px calc(120px + env(safe-area-inset-bottom, 0px));
    }

    /* 顶部只留品牌条 */
    .nav {
        padding: 12px 16px;
        margin-bottom: 16px;
        border-radius: 22px;
    }
    .nav-tabs { display: none; }   /* 移到底部标签栏 */

    .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 16px; border-radius: 18px; }
    .stat-icon { width: 42px; height: 42px; font-size: 19px; border-radius: 13px; }
    .stat-value { font-size: 24px; }

    .grid { grid-template-columns: 1fr; gap: 16px; }
    .search-box, .search-box:focus-within { width: 100%; }

    .header-row { flex-direction: column; align-items: stretch; }
    .header-row .search-box { width: 100%; }

    .form-grid { grid-template-columns: 1fr; }
    .entry-layout { grid-template-columns: 1fr !important; }

    .filter-bar { gap: 8px; }
    .sort-select { margin-left: 0; width: 100%; }

    .page-title { font-size: 19px; }
    .btn { width: 100%; justify-content: center; }
    .modal { padding: 24px 20px; border-radius: 28px; }
    .detail-body { grid-template-columns: 1fr; }
    .modal-foot { flex-direction: column; }
    .stats-layout { grid-template-columns: 1fr !important; }
}

/* ===== iPhone 底部标签栏（与 .nav-tabs 同源，由 JS 生成） ===== */
.tabbar {
    position: fixed;
    left: 12px; right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 90;
    background: linear-gradient(160deg, rgba(255, 253, 246, 0.72), rgba(255, 247, 231, 0.55));
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 26px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px) * 0);
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    box-shadow:
        0 12px 36px rgba(184, 147, 90, 0.3),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.95);
}

.tabbar-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px;
    padding: 8px 4px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 11px;
    transition: all 0.2s ease;
    min-height: 54px;
}
.tabbar-item .tab-icon { font-size: 21px; line-height: 1; }
.tabbar-item.active {
    color: var(--primary-dark);
    background: rgba(232, 198, 111, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.tabbar-item:active { transform: scale(0.94); }

@media (max-width: 760px) {
    .tabbar { display: grid; }
}

/* ===== 桌面中等宽度 ===== */
@media (min-width: 761px) and (max-width: 960px) {
    .stats-bar { grid-template-columns: repeat(2, 1fr); }
    .search-box { width: 200px; }
    .search-box:focus-within { width: 260px; }
}
