/* ==========================================================================
   宠迹本 · 暖燕麦与柔和粉彩设计体系（0 外部 CDN，动效语言驱动 UX）
   ========================================================================== */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;

  /* 浅色：暖燕麦画布 + 纯白浮卡 + 深烘摩卡文字 + 柔和粉彩 Bento */
  --bg-page: #F3EFEA;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EAE4DC;
  --bg-header: rgba(243, 239, 234, 0.86);
  --bg-dock: rgba(255, 255, 255, 0.92);
  --border-card: rgba(37, 30, 27, 0.06);
  --border-strong: rgba(37, 30, 27, 0.14);
  --shadow-card: 0 6px 22px rgba(48, 36, 26, 0.045), 0 1px 3px rgba(48, 36, 26, 0.03);
  --shadow-float: 0 18px 42px rgba(48, 36, 26, 0.14), 0 4px 12px rgba(48, 36, 26, 0.06);

  --text-primary: #251E1B;
  --text-secondary: #6E625B;
  --text-muted: #9C8F87;

  /* 品牌强调色：深烘摩卡 & 暖焦糖 & 鼠尾草薄荷 */
  --mocha: #251E1B;
  --mocha-ink: #FFFFFF;
  --caramel: #C9844E;
  --caramel-soft: rgba(201, 132, 78, 0.14);
  --emerald: #4B8B62;
  --emerald-solid: #58A072;
  --emerald-soft: rgba(88, 160, 114, 0.14);
  --indigo: #7C6BB8;
  --indigo-soft: rgba(124, 107, 184, 0.14);
  --amber: #C47A2C;
  --amber-soft: rgba(196, 122, 44, 0.14);
  --danger: #D14D5F;
  --danger-soft: rgba(209, 77, 95, 0.12);

  /* Bento 柔和粉彩瓷砖色 */
  --bento-pebble-bg: #F5F2EE;
  --bento-latte-bg: #E7C5A5;
  --bento-butter-bg: #FBF0C9;
  --bento-lavender-bg: #EAE3FA;
  --bento-icon-circle: rgba(255, 255, 255, 0.88);
  --bento-ink: #251E1B;

  /* Hero 进度三联动氛围渐变 */
  --progress-zero-bg: linear-gradient(140deg, #FFFFFF 0%, #FAF5EE 100%);
  --progress-partial-bg: linear-gradient(140deg, #FFFFFF 0%, #EFF8F2 100%);
  --progress-complete-bg: linear-gradient(140deg, #F6FCEB 0%, #E1F5CF 100%);

  /* 配色联动氛围光晕、描边与滚轮遮罩底色（防硬编码暖燕麦渗色） */
  --accent-border: rgba(201, 132, 78, 0.45);
  --hero-glow-a: rgba(223, 186, 152, 0.34);
  --hero-glow-b: rgba(223, 186, 152, 0.08);
  --desktop-halo-1: rgba(223, 186, 152, 0.24);
  --desktop-halo-2: rgba(234, 227, 250, 0.34);
  --wheel-fade-zero: rgba(243, 239, 234, 0);

  --radius-card: 24px;
  --radius-sheet: 28px;
  --radius-tile: 22px;
  --radius-pill: 999px;
  --card-gap: 14px;
}

[data-theme="dark"] {
  --bg-page: #131110;
  --bg-surface: #1D1A18;
  --bg-subtle: #282320;
  --bg-header: rgba(19, 17, 16, 0.88);
  --bg-dock: rgba(34, 30, 27, 0.94);
  --border-card: rgba(255, 245, 235, 0.12);
  --border-strong: rgba(255, 245, 235, 0.22);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.36), 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-float: 0 20px 46px rgba(0, 0, 0, 0.56), 0 4px 12px rgba(0, 0, 0, 0.34);

  --text-primary: #F5EFE8;
  --text-secondary: #C5BAB0;
  --text-muted: #9E9288;

  --mocha: #F3EAE0;
  --mocha-ink: #1D1A18;
  --caramel: #E6A975;
  --caramel-soft: rgba(230, 169, 117, 0.16);
  --emerald: #74C690;
  --emerald-solid: #65B881;
  --emerald-soft: rgba(116, 198, 144, 0.16);
  --indigo: #AEA2E2;
  --indigo-soft: rgba(174, 162, 226, 0.16);
  --amber: #E5A955;
  --amber-soft: rgba(229, 169, 85, 0.17);
  --danger: #F07B89;
  --danger-soft: rgba(240, 123, 137, 0.16);

  --bento-pebble-bg: #272320;
  --bento-latte-bg: #453122;
  --bento-butter-bg: #40361F;
  --bento-lavender-bg: #312B44;
  --bento-icon-circle: rgba(255, 255, 255, 0.12);
  --bento-ink: #F5EFE8;

  --progress-zero-bg: linear-gradient(140deg, #1F1C1A 0%, #26211D 100%);
  --progress-partial-bg: linear-gradient(140deg, #1A231E 0%, #1F2D24 100%);
  --progress-complete-bg: linear-gradient(140deg, #1E2E1C 0%, #273D22 100%);

  --accent-border: rgba(230, 169, 117, 0.45);
  --hero-glow-a: rgba(230, 169, 117, 0.18);
  --hero-glow-b: rgba(230, 169, 117, 0.04);
  --desktop-halo-1: rgba(230, 169, 117, 0.08);
  --desktop-halo-2: rgba(174, 162, 226, 0.08);
  --wheel-fade-zero: rgba(19, 17, 16, 0);
}

/* ---------- 配色 2：森系抹茶 matcha (light / dark) ---------- */
[data-palette="matcha"][data-theme="light"] {
  --bg-page: #EEF2EC;
  --bg-surface: #FFFFFF;
  --bg-subtle: #E2E9DF;
  --bg-header: rgba(238, 242, 236, 0.86);
  --bg-dock: rgba(255, 255, 255, 0.92);
  --border-card: rgba(31, 45, 34, 0.07);
  --border-strong: rgba(31, 45, 34, 0.15);
  --shadow-card: 0 6px 22px rgba(24, 42, 28, 0.05), 0 1px 3px rgba(24, 42, 28, 0.03);
  --shadow-float: 0 18px 42px rgba(24, 42, 28, 0.14), 0 4px 12px rgba(24, 42, 28, 0.06);

  --text-primary: #1F2D22;
  --text-secondary: #536657;
  --text-muted: #7F9183;

  --mocha: #1F2D22;
  --mocha-ink: #FFFFFF;
  --caramel: #5C8653;
  --caramel-soft: rgba(92, 134, 83, 0.14);
  --emerald: #3D7A56;
  --emerald-solid: #4A9168;
  --emerald-soft: rgba(61, 122, 86, 0.14);
  --indigo: #5A7F8A;
  --indigo-soft: rgba(90, 127, 138, 0.14);
  --amber: #B47B2B;
  --amber-soft: rgba(180, 123, 43, 0.14);
  --danger: #C94D54;
  --danger-soft: rgba(201, 77, 84, 0.12);

  --bento-pebble-bg: #EBF1E8;
  --bento-latte-bg: #D4E4CC;
  --bento-butter-bg: #F3F0CC;
  --bento-lavender-bg: #E0ECEA;
  --bento-icon-circle: rgba(255, 255, 255, 0.9);
  --bento-ink: #1F2D22;

  --progress-zero-bg: linear-gradient(140deg, #FFFFFF 0%, #F1F6EE 100%);
  --progress-partial-bg: linear-gradient(140deg, #FFFFFF 0%, #E9F4EC 100%);
  --progress-complete-bg: linear-gradient(140deg, #EEF9EC 0%, #D9EED7 100%);

  --accent-border: rgba(92, 134, 83, 0.45);
  --hero-glow-a: rgba(145, 190, 136, 0.34);
  --hero-glow-b: rgba(145, 190, 136, 0.08);
  --desktop-halo-1: rgba(145, 190, 136, 0.24);
  --desktop-halo-2: rgba(212, 228, 204, 0.36);
  --wheel-fade-zero: rgba(238, 242, 236, 0);
}

[data-palette="matcha"][data-theme="dark"] {
  --bg-page: #111612;
  --bg-surface: #19211B;
  --bg-subtle: #232E26;
  --bg-header: rgba(17, 22, 18, 0.88);
  --bg-dock: rgba(27, 36, 29, 0.94);
  --border-card: rgba(232, 242, 230, 0.12);
  --border-strong: rgba(232, 242, 230, 0.22);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.38), 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-float: 0 20px 46px rgba(0, 0, 0, 0.58), 0 4px 12px rgba(0, 0, 0, 0.34);

  --text-primary: #E8F2E6;
  --text-secondary: #B1C4B2;
  --text-muted: #849987;

  --mocha: #E8F2E6;
  --mocha-ink: #162018;
  --caramel: #8BC17E;
  --caramel-soft: rgba(139, 193, 126, 0.16);
  --emerald: #73C996;
  --emerald-solid: #60B583;
  --emerald-soft: rgba(115, 201, 150, 0.16);
  --indigo: #8AB3BE;
  --indigo-soft: rgba(138, 179, 190, 0.16);
  --amber: #E0AB5C;
  --amber-soft: rgba(224, 171, 92, 0.17);
  --danger: #ED7D83;
  --danger-soft: rgba(237, 125, 131, 0.16);

  --bento-pebble-bg: #202A22;
  --bento-latte-bg: #293B2A;
  --bento-butter-bg: #343620;
  --bento-lavender-bg: #223232;
  --bento-icon-circle: rgba(255, 255, 255, 0.12);
  --bento-ink: #E8F2E6;

  --progress-zero-bg: linear-gradient(140deg, #1A221B 0%, #212C22 100%);
  --progress-partial-bg: linear-gradient(140deg, #19241D 0%, #1F3126 100%);
  --progress-complete-bg: linear-gradient(140deg, #1D2E20 0%, #243F28 100%);

  --accent-border: rgba(139, 193, 126, 0.45);
  --hero-glow-a: rgba(139, 193, 126, 0.18);
  --hero-glow-b: rgba(139, 193, 126, 0.04);
  --desktop-halo-1: rgba(139, 193, 126, 0.09);
  --desktop-halo-2: rgba(115, 201, 150, 0.08);
  --wheel-fade-zero: rgba(17, 22, 18, 0);
}

/* ---------- 配色 3：蜜桃樱粉 sakura (light / dark) ---------- */
[data-palette="sakura"][data-theme="light"] {
  --bg-page: #F8F0EE;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EFE3DF;
  --bg-header: rgba(248, 240, 238, 0.86);
  --bg-dock: rgba(255, 255, 255, 0.92);
  --border-card: rgba(51, 31, 35, 0.07);
  --border-strong: rgba(51, 31, 35, 0.15);
  --shadow-card: 0 6px 22px rgba(58, 30, 36, 0.05), 0 1px 3px rgba(58, 30, 36, 0.03);
  --shadow-float: 0 18px 42px rgba(58, 30, 36, 0.14), 0 4px 12px rgba(58, 30, 36, 0.06);

  --text-primary: #331F23;
  --text-secondary: #75585E;
  --text-muted: #9E8287;

  --mocha: #331F23;
  --mocha-ink: #FFFFFF;
  --caramel: #C96B78;
  --caramel-soft: rgba(201, 107, 120, 0.14);
  --emerald: #4C8C6B;
  --emerald-solid: #58A07B;
  --emerald-soft: rgba(88, 160, 123, 0.14);
  --indigo: #8E74AB;
  --indigo-soft: rgba(142, 116, 171, 0.14);
  --amber: #C47A38;
  --amber-soft: rgba(196, 122, 56, 0.14);
  --danger: #D1475B;
  --danger-soft: rgba(209, 71, 91, 0.12);

  --bento-pebble-bg: #F6EFED;
  --bento-latte-bg: #F3D1D5;
  --bento-butter-bg: #FBEBD9;
  --bento-lavender-bg: #EFE2F4;
  --bento-icon-circle: rgba(255, 255, 255, 0.9);
  --bento-ink: #331F23;

  --progress-zero-bg: linear-gradient(140deg, #FFFFFF 0%, #FBF1EF 100%);
  --progress-partial-bg: linear-gradient(140deg, #FFFFFF 0%, #EFF8F3 100%);
  --progress-complete-bg: linear-gradient(140deg, #F3FBEF 0%, #E1F3DD 100%);

  --accent-border: rgba(201, 107, 120, 0.45);
  --hero-glow-a: rgba(240, 176, 184, 0.34);
  --hero-glow-b: rgba(240, 176, 184, 0.08);
  --desktop-halo-1: rgba(240, 176, 184, 0.26);
  --desktop-halo-2: rgba(239, 226, 244, 0.34);
  --wheel-fade-zero: rgba(248, 240, 238, 0);
}

[data-palette="sakura"][data-theme="dark"] {
  --bg-page: #171113;
  --bg-surface: #22191C;
  --bg-subtle: #2F2327;
  --bg-header: rgba(23, 17, 19, 0.88);
  --bg-dock: rgba(38, 28, 31, 0.94);
  --border-card: rgba(249, 235, 239, 0.12);
  --border-strong: rgba(249, 235, 239, 0.22);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.38), 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-float: 0 20px 46px rgba(0, 0, 0, 0.58), 0 4px 12px rgba(0, 0, 0, 0.34);

  --text-primary: #F9EBEF;
  --text-secondary: #CDB4BC;
  --text-muted: #9E858C;

  --mocha: #F9EBEF;
  --mocha-ink: #22191C;
  --caramel: #E8929E;
  --caramel-soft: rgba(232, 146, 158, 0.16);
  --emerald: #78C79B;
  --emerald-solid: #65B689;
  --emerald-soft: rgba(120, 199, 155, 0.16);
  --indigo: #BEA8D9;
  --indigo-soft: rgba(190, 168, 217, 0.16);
  --amber: #E5AC66;
  --amber-soft: rgba(229, 172, 102, 0.17);
  --danger: #F27C8C;
  --danger-soft: rgba(242, 124, 140, 0.16);

  --bento-pebble-bg: #2A2023;
  --bento-latte-bg: #462A30;
  --bento-butter-bg: #423326;
  --bento-lavender-bg: #36293D;
  --bento-icon-circle: rgba(255, 255, 255, 0.12);
  --bento-ink: #F9EBEF;

  --progress-zero-bg: linear-gradient(140deg, #22191C 0%, #2C1F23 100%);
  --progress-partial-bg: linear-gradient(140deg, #1D2420 0%, #233029 100%);
  --progress-complete-bg: linear-gradient(140deg, #202E24 0%, #263D2B 100%);

  --accent-border: rgba(232, 146, 158, 0.45);
  --hero-glow-a: rgba(232, 146, 158, 0.18);
  --hero-glow-b: rgba(232, 146, 158, 0.04);
  --desktop-halo-1: rgba(232, 146, 158, 0.09);
  --desktop-halo-2: rgba(190, 168, 217, 0.08);
  --wheel-fade-zero: rgba(23, 17, 19, 0);
}

/* ---------- 配色 4：晴空海盐 sky (light / dark) ---------- */
[data-palette="sky"][data-theme="light"] {
  --bg-page: #EDF3F8;
  --bg-surface: #FFFFFF;
  --bg-subtle: #E0E9F2;
  --bg-header: rgba(237, 243, 248, 0.86);
  --bg-dock: rgba(255, 255, 255, 0.92);
  --border-card: rgba(26, 39, 54, 0.07);
  --border-strong: rgba(26, 39, 54, 0.15);
  --shadow-card: 0 6px 22px rgba(24, 42, 66, 0.05), 0 1px 3px rgba(24, 42, 66, 0.03);
  --shadow-float: 0 18px 42px rgba(24, 42, 66, 0.14), 0 4px 12px rgba(24, 42, 66, 0.06);

  --text-primary: #1A2736;
  --text-secondary: #53677D;
  --text-muted: #7B90A6;

  --mocha: #1A2736;
  --mocha-ink: #FFFFFF;
  --caramel: #3D7CB8;
  --caramel-soft: rgba(61, 124, 184, 0.14);
  --emerald: #3A8D71;
  --emerald-solid: #459E80;
  --emerald-soft: rgba(58, 141, 113, 0.14);
  --indigo: #5D70BA;
  --indigo-soft: rgba(93, 112, 186, 0.14);
  --amber: #C48231;
  --amber-soft: rgba(196, 130, 49, 0.14);
  --danger: #CF4F5F;
  --danger-soft: rgba(207, 79, 95, 0.12);

  --bento-pebble-bg: #EBF1F6;
  --bento-latte-bg: #CFE2F5;
  --bento-butter-bg: #F6EED0;
  --bento-lavender-bg: #DEE6FA;
  --bento-icon-circle: rgba(255, 255, 255, 0.9);
  --bento-ink: #1A2736;

  --progress-zero-bg: linear-gradient(140deg, #FFFFFF 0%, #EEF4FA 100%);
  --progress-partial-bg: linear-gradient(140deg, #FFFFFF 0%, #EAF7F3 100%);
  --progress-complete-bg: linear-gradient(140deg, #ECFBF5 0%, #D5F1E5 100%);

  --accent-border: rgba(61, 124, 184, 0.45);
  --hero-glow-a: rgba(139, 188, 232, 0.34);
  --hero-glow-b: rgba(139, 188, 232, 0.08);
  --desktop-halo-1: rgba(139, 188, 232, 0.25);
  --desktop-halo-2: rgba(222, 230, 250, 0.35);
  --wheel-fade-zero: rgba(237, 243, 248, 0);
}

[data-palette="sky"][data-theme="dark"] {
  --bg-page: #10151C;
  --bg-surface: #18202A;
  --bg-subtle: #222D3B;
  --bg-header: rgba(16, 21, 28, 0.88);
  --bg-dock: rgba(27, 36, 47, 0.94);
  --border-card: rgba(232, 241, 250, 0.12);
  --border-strong: rgba(232, 241, 250, 0.22);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.38), 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-float: 0 20px 46px rgba(0, 0, 0, 0.58), 0 4px 12px rgba(0, 0, 0, 0.34);

  --text-primary: #E8F1FA;
  --text-secondary: #AEC0D4;
  --text-muted: #7F93A8;

  --mocha: #E8F1FA;
  --mocha-ink: #141D27;
  --caramel: #75B1EA;
  --caramel-soft: rgba(117, 177, 234, 0.16);
  --emerald: #67C4A4;
  --emerald-solid: #55B393;
  --emerald-soft: rgba(103, 196, 164, 0.16);
  --indigo: #94A8E6;
  --indigo-soft: rgba(148, 168, 230, 0.16);
  --amber: #E4B062;
  --amber-soft: rgba(228, 176, 98, 0.17);
  --danger: #F07B89;
  --danger-soft: rgba(240, 123, 137, 0.16);

  --bento-pebble-bg: #1F2833;
  --bento-latte-bg: #24384E;
  --bento-butter-bg: #363322;
  --bento-lavender-bg: #262E46;
  --bento-icon-circle: rgba(255, 255, 255, 0.12);
  --bento-ink: #E8F1FA;

  --progress-zero-bg: linear-gradient(140deg, #18202A 0%, #1E2937 100%);
  --progress-partial-bg: linear-gradient(140deg, #182324 0%, #1D312E 100%);
  --progress-complete-bg: linear-gradient(140deg, #192B25 0%, #1E3B30 100%);

  --accent-border: rgba(117, 177, 234, 0.45);
  --hero-glow-a: rgba(117, 177, 234, 0.18);
  --hero-glow-b: rgba(117, 177, 234, 0.04);
  --desktop-halo-1: rgba(117, 177, 234, 0.09);
  --desktop-halo-2: rgba(103, 196, 164, 0.08);
  --wheel-fade-zero: rgba(16, 21, 28, 0);
}

/* ---------- 配色 5：奶油芋泥 taro (light / dark) ---------- */
[data-palette="taro"][data-theme="light"] {
  --bg-page: #F3F0F7;
  --bg-surface: #FFFFFF;
  --bg-subtle: #E7E2F0;
  --bg-header: rgba(243, 240, 247, 0.86);
  --bg-dock: rgba(255, 255, 255, 0.92);
  --border-card: rgba(39, 32, 51, 0.07);
  --border-strong: rgba(39, 32, 51, 0.15);
  --shadow-card: 0 6px 22px rgba(40, 30, 56, 0.05), 0 1px 3px rgba(40, 30, 56, 0.03);
  --shadow-float: 0 18px 42px rgba(40, 30, 56, 0.14), 0 4px 12px rgba(40, 30, 56, 0.06);

  --text-primary: #272033;
  --text-secondary: #625973;
  --text-muted: #8C829E;

  --mocha: #272033;
  --mocha-ink: #FFFFFF;
  --caramel: #7E68AF;
  --caramel-soft: rgba(126, 104, 175, 0.14);
  --emerald: #4C8E6D;
  --emerald-solid: #58A17D;
  --emerald-soft: rgba(76, 142, 109, 0.14);
  --indigo: #6E65A6;
  --indigo-soft: rgba(110, 101, 166, 0.14);
  --amber: #C48135;
  --amber-soft: rgba(196, 129, 53, 0.14);
  --danger: #CF4F63;
  --danger-soft: rgba(207, 79, 99, 0.12);

  --bento-pebble-bg: #F1EEF6;
  --bento-latte-bg: #DED5F0;
  --bento-butter-bg: #F7EED1;
  --bento-lavender-bg: #E9DFEE;
  --bento-icon-circle: rgba(255, 255, 255, 0.9);
  --bento-ink: #272033;

  --progress-zero-bg: linear-gradient(140deg, #FFFFFF 0%, #F4F1FA 100%);
  --progress-partial-bg: linear-gradient(140deg, #FFFFFF 0%, #EDF8F2 100%);
  --progress-complete-bg: linear-gradient(140deg, #F1FBEF 0%, #DCF1E1 100%);

  --accent-border: rgba(126, 104, 175, 0.45);
  --hero-glow-a: rgba(185, 170, 227, 0.34);
  --hero-glow-b: rgba(185, 170, 227, 0.08);
  --desktop-halo-1: rgba(185, 170, 227, 0.26);
  --desktop-halo-2: rgba(233, 223, 238, 0.35);
  --wheel-fade-zero: rgba(243, 240, 247, 0);
}

[data-palette="taro"][data-theme="dark"] {
  --bg-page: #14121A;
  --bg-surface: #1E1B26;
  --bg-subtle: #292534;
  --bg-header: rgba(20, 18, 26, 0.88);
  --bg-dock: rgba(33, 29, 43, 0.94);
  --border-card: rgba(240, 236, 249, 0.12);
  --border-strong: rgba(240, 236, 249, 0.22);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.38), 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-float: 0 20px 46px rgba(0, 0, 0, 0.58), 0 4px 12px rgba(0, 0, 0, 0.34);

  --text-primary: #F0ECF9;
  --text-secondary: #BEB6D4;
  --text-muted: #9188AA;

  --mocha: #F0ECF9;
  --mocha-ink: #1D1A26;
  --caramel: #B3A1E3;
  --caramel-soft: rgba(179, 161, 227, 0.16);
  --emerald: #76C79D;
  --emerald-solid: #65B88C;
  --emerald-soft: rgba(118, 199, 157, 0.16);
  --indigo: #A699DC;
  --indigo-soft: rgba(166, 153, 220, 0.16);
  --amber: #E5AF65;
  --amber-soft: rgba(229, 175, 101, 0.17);
  --danger: #F07B8E;
  --danger-soft: rgba(240, 123, 142, 0.16);

  --bento-pebble-bg: #252130;
  --bento-latte-bg: #362E4B;
  --bento-butter-bg: #393322;
  --bento-lavender-bg: #32263C;
  --bento-icon-circle: rgba(255, 255, 255, 0.12);
  --bento-ink: #F0ECF9;

  --progress-zero-bg: linear-gradient(140deg, #1E1B26 0%, #262231 100%);
  --progress-partial-bg: linear-gradient(140deg, #1B2321 0%, #21302A 100%);
  --progress-complete-bg: linear-gradient(140deg, #1E2E24 0%, #253D2C 100%);

  --accent-border: rgba(179, 161, 227, 0.45);
  --hero-glow-a: rgba(179, 161, 227, 0.18);
  --hero-glow-b: rgba(179, 161, 227, 0.04);
  --desktop-halo-1: rgba(179, 161, 227, 0.09);
  --desktop-halo-2: rgba(118, 199, 157, 0.08);
  --wheel-fade-zero: rgba(20, 18, 26, 0);
}

/* ---------- 配色 6：极简黑白 minimal (light / dark) ---------- */
[data-palette="minimal"][data-theme="light"] {
  --bg-page: #F5F5F7;
  --bg-surface: #FFFFFF;
  --bg-subtle: #E9E9ED;
  --bg-header: rgba(245, 245, 247, 0.86);
  --bg-dock: rgba(255, 255, 255, 0.92);
  --border-card: rgba(29, 29, 31, 0.07);
  --border-strong: rgba(29, 29, 31, 0.16);
  --shadow-card: 0 6px 22px rgba(0, 0, 0, 0.045), 0 1px 3px rgba(0, 0, 0, 0.03);
  --shadow-float: 0 18px 42px rgba(0, 0, 0, 0.14), 0 4px 12px rgba(0, 0, 0, 0.06);

  --text-primary: #1D1D1F;
  --text-secondary: #5C5C62;
  --text-muted: #86868B;

  --mocha: #1D1D1F;
  --mocha-ink: #FFFFFF;
  --caramel: #52525B;
  --caramel-soft: rgba(82, 82, 91, 0.12);
  --emerald: #2F855A;
  --emerald-solid: #389B69;
  --emerald-soft: rgba(47, 133, 90, 0.13);
  --indigo: #5E6070;
  --indigo-soft: rgba(94, 96, 112, 0.12);
  --amber: #B7791F;
  --amber-soft: rgba(183, 121, 31, 0.13);
  --danger: #D14343;
  --danger-soft: rgba(209, 67, 67, 0.12);

  --bento-pebble-bg: #F0F0F3;
  --bento-latte-bg: #E2E2E7;
  --bento-butter-bg: #F3EFE2;
  --bento-lavender-bg: #E6E8F0;
  --bento-icon-circle: rgba(255, 255, 255, 0.92);
  --bento-ink: #1D1D1F;

  --progress-zero-bg: linear-gradient(140deg, #FFFFFF 0%, #F1F1F4 100%);
  --progress-partial-bg: linear-gradient(140deg, #FFFFFF 0%, #EDF6F1 100%);
  --progress-complete-bg: linear-gradient(140deg, #EEF9F2 0%, #D9F0E1 100%);

  --accent-border: rgba(82, 82, 91, 0.42);
  --hero-glow-a: rgba(142, 142, 147, 0.24);
  --hero-glow-b: rgba(142, 142, 147, 0.06);
  --desktop-halo-1: rgba(161, 161, 170, 0.22);
  --desktop-halo-2: rgba(212, 212, 216, 0.3);
  --wheel-fade-zero: rgba(245, 245, 247, 0);
}

[data-palette="minimal"][data-theme="dark"] {
  --bg-page: #0E0E10;
  --bg-surface: #1A1A1E;
  --bg-subtle: #26262C;
  --bg-header: rgba(14, 14, 16, 0.88);
  --bg-dock: rgba(28, 28, 33, 0.94);
  --border-card: rgba(245, 245, 247, 0.12);
  --border-strong: rgba(245, 245, 247, 0.22);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.26);
  --shadow-float: 0 20px 46px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.36);

  --text-primary: #F5F5F7;
  --text-secondary: #BDBDC4;
  --text-muted: #8E8E98;

  --mocha: #F5F5F7;
  --mocha-ink: #1A1A1E;
  --caramel: #A1A1AA;
  --caramel-soft: rgba(161, 161, 170, 0.16);
  --emerald: #68D391;
  --emerald-solid: #56BE80;
  --emerald-soft: rgba(104, 211, 145, 0.16);
  --indigo: #9E9FB0;
  --indigo-soft: rgba(158, 159, 176, 0.16);
  --amber: #E6B55A;
  --amber-soft: rgba(230, 181, 90, 0.17);
  --danger: #F07B7B;
  --danger-soft: rgba(240, 123, 123, 0.16);

  --bento-pebble-bg: #222227;
  --bento-latte-bg: #2D2D34;
  --bento-butter-bg: #332E22;
  --bento-lavender-bg: #262732;
  --bento-icon-circle: rgba(255, 255, 255, 0.12);
  --bento-ink: #F5F5F7;

  --progress-zero-bg: linear-gradient(140deg, #1A1A1E 0%, #222227 100%);
  --progress-partial-bg: linear-gradient(140deg, #19221E 0%, #1F2F27 100%);
  --progress-complete-bg: linear-gradient(140deg, #1C2D22 0%, #233D2B 100%);

  --accent-border: rgba(161, 161, 170, 0.42);
  --hero-glow-a: rgba(161, 161, 170, 0.16);
  --hero-glow-b: rgba(161, 161, 170, 0.04);
  --desktop-halo-1: rgba(161, 161, 170, 0.08);
  --desktop-halo-2: rgba(104, 211, 145, 0.07);
  --wheel-fade-zero: rgba(14, 14, 16, 0);
}

/* ==================== 主题圆形扩散切换转场 ==================== */
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 9999;
  animation: circle-reveal-expand 0.45s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes circle-reveal-expand {
  from { clip-path: circle(0px at var(--reveal-x, 90%) var(--reveal-y, 28px)); }
  to { clip-path: circle(var(--reveal-r, 150vmax) at var(--reveal-x, 90%) var(--reveal-y, 28px)); }
}

.theme-reveal-ripple {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  clip-path: circle(0px at 90% 28px);
}

.theme-reveal-ripple.is-active {
  animation: fallback-circle-ripple 0.45s ease-out forwards;
}

@keyframes fallback-circle-ripple {
  0% { opacity: 0.92; clip-path: circle(0px at var(--reveal-x, 90%) var(--reveal-y, 28px)); }
  75% { opacity: 0.72; clip-path: circle(var(--reveal-r, 150vmax) at var(--reveal-x, 90%) var(--reveal-y, 28px)); }
  100% { opacity: 0; clip-path: circle(var(--reveal-r, 150vmax) at var(--reveal-x, 90%) var(--reveal-y, 28px)); }
}

/* ==================== 基础复位 ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: clip;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.48;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

[hidden] {
  display: none !important;
}

/* ==================== 外壳容器（390px 零溢出 + 桌面端温暖画框居中） ==================== */
.app-shell {
  width: 100%;
  max-width: 468px;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg-page);
  position: relative;
  display: flex;
  flex-direction: column;
}

.app-shell::after {
  content: "";
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 468px;
  height: 64px;
  pointer-events: none;
  z-index: 48;
  background: linear-gradient(to top, var(--bg-page) 30%, transparent);
}

@media (min-width: 540px) {
  body {
    background-image: radial-gradient(circle at 18% 12%, var(--desktop-halo-1), transparent 44%),
      radial-gradient(circle at 84% 88%, var(--desktop-halo-2), transparent 42%);
  }
  .app-shell {
    border-left: 1px solid var(--border-card);
    border-right: 1px solid var(--border-card);
    box-shadow: var(--shadow-float);
  }
}

/* ==================== 顶部极简栏与悬浮圆形工具按钮 ==================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-header);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: calc(10px + env(safe-area-inset-top)) 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-mark {
  color: var(--caramel);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.brand-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.palette-trigger-btn .palette-btn-dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--caramel);
  box-shadow: 0 0 0 1.5px var(--bg-surface);
  transition: background-color 0.25s ease;
}

.header-circle-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  background: var(--bg-surface);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(37, 30, 27, 0.06);
  transition: transform 0.24s cubic-bezier(0.34, 1.45, 0.64, 1), background-color 0.22s ease, border-color 0.22s ease;
}

.header-circle-btn:active {
  transform: scale(0.92);
}

.add-pet-circle-btn {
  background: var(--mocha);
  color: var(--mocha-ink);
  border-color: transparent;
}

.status-pulse-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-solid);
  box-shadow: 0 0 0 2px var(--bg-surface);
  transition: background-color 0.28s ease;
}

.draft-icon-btn.is-dirty .status-pulse-dot {
  background: var(--amber);
  animation: status-dot-breathe 1.8s ease-in-out infinite;
}

.draft-icon-btn.is-synced .status-pulse-dot {
  background: var(--emerald-solid);
}

@keyframes status-dot-breathe {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 2px rgba(196, 122, 44, 0.35);
  }
  50% {
    transform: scale(1.18);
    box-shadow: 0 0 0 2px var(--bg-surface), 0 0 0 6px rgba(196, 122, 44, 0);
  }
}

.icon-chip-btn {
  height: 38px;
  min-width: 44px;
  border: 1px solid var(--border-card);
  background: var(--bg-surface);
  border-radius: var(--radius-pill);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(37, 30, 27, 0.06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.24s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.icon-chip-btn:active {
  transform: scale(0.93);
}

.icon-chip-btn.is-flipping {
  animation: unit-flip 0.32s cubic-bezier(0.34, 1.45, 0.64, 1);
}

@keyframes unit-flip {
  0% { transform: scale(1); }
  45% { transform: scale(0.92) rotate(-4deg); }
  100% { transform: scale(1) rotate(0); }
}

[data-theme="light"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: grid; place-items: center; }
[data-theme="dark"] .theme-icon-sun { display: none; }
[data-theme="dark"] .theme-icon-moon { display: grid; place-items: center; }

.theme-toggle-btn:hover svg {
  transform: rotate(20deg);
  transition: transform 0.25s ease;
}

/* ==================== 柔色宠物头像胶囊横条 ==================== */
.pet-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pet-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  padding: 2px 1px;
  min-width: 0;
  flex: 1;
}

.pet-pills::-webkit-scrollbar {
  display: none;
}

.pet-pill {
  border: 1px solid var(--border-card);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 4px 12px 4px 5px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 2px 8px rgba(37, 30, 27, 0.04);
  transition: transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1), background-color 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.pet-pill-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bento-butter-bg);
  display: grid;
  place-items: center;
  font-size: 15px;
  line-height: 1;
  overflow: hidden;
  flex-shrink: 0;
}

.pet-pill-cutout-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pet-pill[data-pet-tint="1"] .pet-pill-avatar { background: var(--bento-lavender-bg); }
.pet-pill[data-pet-tint="2"] .pet-pill-avatar { background: var(--bento-latte-bg); }

.pet-pill.active {
  background: var(--mocha);
  color: var(--mocha-ink);
  border-color: transparent;
  box-shadow: 0 6px 16px rgba(37, 30, 27, 0.16);
}

.pet-pill.active .pet-pill-avatar {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .pet-pill:not(.active) .pet-pill-avatar {
  background: rgba(234, 227, 250, 0.42);
  box-shadow: inset 0 0 0 1px rgba(255, 245, 235, 0.22);
}

.pet-pill:active {
  transform: scale(0.95);
}

.pet-pill-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  font-size: 11px;
  margin-left: 1px;
}

[data-theme="dark"] .pet-pill.active .pet-pill-edit {
  background: rgba(29, 26, 24, 0.16);
}

/* ==================== 主内容容器（严格 14px 卡片净间距 + 悬浮 Dock 安全留白） ==================== */
.main-content {
  flex: 1;
  padding: 6px 16px calc(116px + env(safe-area-inset-bottom));
  touch-action: pan-y;
}

.tab-panel {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  animation: panel-enter 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

.tab-panel.is-entering-from-right {
  animation: panel-enter-right 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tab-panel.is-entering-from-left {
  animation: panel-enter-left 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes panel-enter-right {
  from {
    opacity: 0;
    transform: translateX(24px) translateY(8px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes panel-enter-left {
  from {
    opacity: 0;
    transform: translateX(-24px) translateY(8px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

.tab-panel.is-tab-refreshing .is-stagger-enter {
  animation: card-refresh-rise 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--stagger-idx, 0) * 34ms);
}

@keyframes card-refresh-rise {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.988);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-card);
  padding: 16px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-stack {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

/* ==================== 官方 Apple SF 风格图标芯片 ==================== */
.sf-icon {
  display: block;
  flex-shrink: 0;
}

[data-sf-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sf-head-chip {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--caramel-soft);
  color: var(--caramel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sf-head-chip-lg {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--bento-ink);
}

[data-theme="dark"] .sf-head-chip {
  background: var(--caramel-soft);
  color: var(--caramel);
}

[data-theme="dark"] .sf-head-chip-lg {
  background: rgba(255, 255, 255, 0.1);
  color: var(--bento-ink);
}

.field-head {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.card-hint {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.pill-muted {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.pill-emerald {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11.5px;
  font-weight: 600;
  background: var(--emerald-soft);
  color: var(--emerald);
}

/* ==================== Tab 1: 0.618 : 0.382 黄金比例主体焦点卡 ==================== */
.hero-golden-stage {
  position: relative;
  overflow: hidden;
  margin-top: 0;
  min-height: clamp(368px, 47dvh, 424px);
  padding: 14px 16px 15px;
  background: var(--progress-zero-bg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: background 0.48s ease, border-color 0.35s ease, transform 0.25s ease;
}

.hero-top-strip {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.greeting-stack {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.greeting-title {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.today-date-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.scope-switch {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  flex-shrink: 0;
}

.scope-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  box-shadow: 0 2px 6px rgba(37, 30, 27, 0.08);
  transform: translateX(calc(var(--scope-idx, 0) * 100%));
  transition: transform 0.34s cubic-bezier(0.34, 1.38, 0.64, 1);
  pointer-events: none;
}

.scope-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  transition: color 0.22s ease;
}

.scope-btn.active {
  color: var(--text-primary);
}

.mini-count-badge {
  background: var(--caramel);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  padding: 0 5px;
  border-radius: 999px;
  line-height: 1.45;
}

.hero-surface {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  pointer-events: none;
}

.hero-glow-orb {
  position: absolute;
  right: -30px;
  top: -34px;
  width: 210px;
  height: 210px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow-a) 0%, transparent 70%);
  transition: transform 0.55s ease, opacity 0.45s ease;
}

.progress-hero-card[data-progress-state="partial"] {
  background: var(--progress-partial-bg);
  border-color: rgba(88, 160, 114, 0.24);
}

.progress-hero-card[data-progress-state="partial"] .hero-glow-orb {
  background: radial-gradient(circle, rgba(88, 160, 114, 0.24) 0%, transparent 70%);
}

.progress-hero-card[data-progress-state="complete"] {
  background: var(--progress-complete-bg);
  border-color: rgba(88, 160, 114, 0.45);
}

.progress-hero-card[data-progress-state="complete"] .hero-glow-orb {
  background: radial-gradient(circle, rgba(132, 204, 22, 0.28) 0%, transparent 70%);
  animation: mascot-aura-pulse 2.2s ease-in-out infinite;
}

@keyframes mascot-aura-pulse {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.16); opacity: 1; }
}

/* 中央核心主体展示舞台 */
.hero-subject-showcase {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 184px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-pedestal-glow {
  position: absolute;
  width: 174px;
  height: 174px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--hero-glow-a) 0%, var(--hero-glow-b) 58%, transparent 74%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.hero-pedestal-glow::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  width: 112px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(37, 30, 27, 0.16) 0%, transparent 72%);
}

[data-theme="dark"] .hero-pedestal-glow {
  background: radial-gradient(circle, var(--hero-glow-a) 0%, var(--hero-glow-b) 58%, transparent 74%);
  box-shadow: inset 0 1px 0 rgba(255, 245, 235, 0.1);
}

[data-theme="dark"] .hero-pedestal-glow::after {
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45) 0%, transparent 72%);
}

.pet-mascot-stage {
  position: relative;
  width: 176px;
  height: 176px;
  border: none;
  background: transparent;
  padding: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  transform-origin: center bottom;
}

.pet-mascot-stage:active {
  transform: scale(0.95);
}

.hero-cutout-photo {
  max-width: 164px;
  max-height: 164px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 22px rgba(37, 30, 27, 0.22));
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: mascot-breathe 4.2s ease-in-out infinite;
}

[data-theme="dark"] .hero-cutout-photo {
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.56)) drop-shadow(0 0 14px rgba(230, 169, 117, 0.18));
}

.pet-mascot-stage.is-petted .hero-cutout-photo {
  animation: mascot-pet-squish 0.46s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-photo-fab {
  position: absolute;
  right: 2px;
  bottom: 4px;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-card);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(37, 30, 27, 0.12);
  transition: transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1);
}

[data-theme="dark"] .hero-photo-fab {
  background: rgba(38, 33, 29, 0.88);
  border-color: rgba(255, 245, 235, 0.16);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

.hero-photo-fab:active {
  transform: scale(0.92);
}

/* 卡片底部核心强调信息带 */
.hero-focus-footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(37, 30, 27, 0.06);
}

[data-theme="dark"] .hero-focus-footer {
  background: rgba(255, 245, 235, 0.06);
  border-color: rgba(255, 245, 235, 0.1);
}

.progress-ring-wrap {
  position: relative;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.progress-ring-wrap.is-peak-bounce {
  animation: peak-ring-bounce 0.54s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes peak-ring-bounce {
  0% { transform: scale(1); }
  45% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.progress-ring-bg {
  stroke: rgba(128, 116, 106, 0.14);
}

.progress-ring-fg {
  stroke: url(#progressRingGrad);
  transition: stroke-dashoffset 0.58s cubic-bezier(0.22, 1, 0.36, 1);
}

.progress-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.progress-pct {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.progress-fraction-mini {
  margin-top: 2px;
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.num-flip {
  display: inline-block;
}

.num-flip.is-rolling {
  animation: num-roll-up 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes num-roll-up {
  0% { opacity: 0.4; transform: translateY(6px); }
  100% { opacity: 1; transform: translateY(0); }
}

.progress-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.hero-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  width: 100%;
}

.status-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  background: var(--caramel-soft);
  color: var(--caramel);
  transition: background-color 0.35s ease, color 0.35s ease;
}

.hero-weight-pill {
  border: 1px solid var(--border-card);
  background: var(--bg-surface);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  box-shadow: 0 1px 4px rgba(37, 30, 27, 0.06);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.hero-weight-pill:active {
  transform: scale(0.95);
}

[data-theme="dark"] .hero-weight-pill {
  background: rgba(255, 245, 235, 0.1);
}

.progress-hero-card[data-progress-state="partial"] .status-tag-pill {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.progress-hero-card[data-progress-state="complete"] .status-tag-pill {
  background: rgba(88, 160, 114, 0.22);
  color: var(--emerald);
}

.progress-headline {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.24;
}

/* 38.2% 附带信息区（克制柔和退后，保持 14px 独立间隙） */
.secondary-companion-zone {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

.secondary-companion-zone .cycle-item-card,
.secondary-companion-zone .bento-sheet-card {
  box-shadow: 0 3px 12px rgba(48, 36, 26, 0.032), 0 1px 2px rgba(48, 36, 26, 0.02);
}

/* ==================== 放大动态 SVG 萌宠槽 ==================== */
.pet-mascot-svg {
  width: 142px;
  height: 156px;
  overflow: visible;
  filter: drop-shadow(0 10px 18px rgba(37, 30, 27, 0.16));
}

.mascot-body-breathe {
  transform-origin: 60px 108px;
  animation: mascot-breathe 3.8s ease-in-out infinite;
}

@keyframes mascot-breathe {
  0%, 100% { transform: scaleY(1) translateY(0); }
  50% { transform: scaleY(1.028) translateY(-1.5px); }
}

.mascot-ear-left {
  transform-origin: 34px 44px;
  animation: mascot-ear-twitch 5.4s ease-in-out infinite;
}

.mascot-ear-right {
  transform-origin: 86px 44px;
  animation: mascot-ear-twitch 5.4s ease-in-out infinite 2.2s;
}

@keyframes mascot-ear-twitch {
  0%, 88%, 100% { transform: rotate(0deg); }
  92% { transform: rotate(-7deg); }
  95% { transform: rotate(3deg); }
}

.mascot-eyes {
  transform-origin: 60px 58px;
  animation: mascot-blink 4.6s ease-in-out infinite;
}

@keyframes mascot-blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.08); }
  98% { transform: scaleY(1); }
}

.mascot-tail {
  transform-origin: 90px 104px;
  animation: mascot-tail-wag 3.2s ease-in-out infinite;
}

@keyframes mascot-tail-wag {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(8deg); }
}

.progress-hero-card[data-progress-state="complete"] .mascot-body-breathe {
  animation: mascot-happy-bob 2.1s ease-in-out infinite;
}

@keyframes mascot-happy-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.03); }
}

.pet-mascot-stage.is-petted .pet-mascot-svg {
  animation: mascot-pet-squish 0.46s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes mascot-pet-squish {
  0% { transform: scale(1, 1); }
  32% { transform: scale(1.06, 0.92) translateY(3px); }
  68% { transform: scale(0.97, 1.04) translateY(-3px); }
  100% { transform: scale(1, 1); }
}

.mascot-love-particle {
  position: absolute;
  top: 22px;
  left: 50%;
  font-size: 14px;
  pointer-events: none;
  animation: heart-float-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes heart-float-up {
  0% {
    opacity: 0;
    transform: translate(0, 6px) scale(0.92);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(var(--hx, 0px), -34px) scale(1.08);
  }
}

/* ==================== 峰值微粒子层 ==================== */
.peak-particles {
  position: absolute;
  left: 38px;
  top: 38px;
  pointer-events: none;
  z-index: 4;
}

.peak-dot {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-solid);
  animation: particle-burst 0.72s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes particle-burst {
  0% { opacity: 1; transform: translate(0, 0) scale(0.92); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.45); }
}

/* ==================== 周期照料卡片流与三步收缩画勾微粒子 ==================== */
.cycle-item-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 11px 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  transition: opacity 0.3s ease, transform 0.26s cubic-bezier(0.34, 1.38, 0.64, 1), background-color 0.25s ease;
}

.cycle-item-card.is-done-inplace {
  opacity: 0.92;
  background: var(--bg-subtle);
}

[data-theme="dark"] .cycle-item-card.is-done-inplace {
  opacity: 0.92;
  background: var(--bg-subtle);
  border-color: var(--border-card);
}

.cycle-item-card.is-done-inplace .cycle-item-title {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.cycle-item-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cycle-item-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.overdue-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
  display: inline-block;
  animation: overdue-dot-pulse 1.5s ease-in-out infinite;
}

@keyframes overdue-dot-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
}

.badge-overdue { background: var(--danger-soft); color: var(--danger); }
.badge-today { background: var(--amber-soft); color: var(--amber); }
.badge-soon { background: var(--indigo-soft); color: var(--indigo); }
.badge-ok { background: var(--emerald-soft); color: var(--emerald); }
.badge-neutral { background: var(--bg-subtle); color: var(--text-secondary); }

.cycle-item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.cycle-item-sub {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.cycle-check-wrap {
  position: relative;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.cycle-check-btn {
  min-width: 72px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--mocha);
  color: var(--mocha-ink);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  transition: width 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    min-width 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease,
    transform 0.16s ease;
}

.cycle-check-btn:active {
  transform: scale(0.94);
}

.cycle-check-btn.is-squeezing {
  min-width: 36px;
  width: 36px;
  padding: 0;
  border-color: transparent;
  background: var(--emerald-solid);
  color: #FFFFFF;
}

.cycle-check-btn.is-squeezing .btn-text-label {
  display: none;
}

.cycle-check-btn .check-svg {
  display: none;
}

.cycle-check-btn.is-ticking .check-svg,
.cycle-check-btn.is-completed-btn .check-svg {
  display: block;
}

.cycle-check-btn.is-ticking .tick-path {
  stroke-dasharray: 28;
  stroke-dashoffset: 28;
  animation: draw-tick 0.22s ease-out forwards;
}

@keyframes draw-tick {
  to { stroke-dashoffset: 0; }
}

.cycle-check-btn.is-completed-btn {
  min-width: 68px;
  background: var(--emerald-soft);
  border-color: rgba(88, 160, 114, 0.35);
  color: var(--emerald);
}

.btn-burst-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: grid;
  place-items: center;
}

.btn-burst-dot {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald-solid);
  animation: particle-burst 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* ==================== 白底圆角 Bento 快捷面板（致敬参考图 2） ==================== */
.bento-sheet-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sheet);
  padding: 7px 10px 10px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sheet-grab-handle {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--border-strong);
  margin: 0 auto;
  opacity: 0.72;
}

.bento-grid-2x2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bento-tile {
  border: 1px solid rgba(37, 30, 27, 0.04);
  border-radius: var(--radius-tile);
  padding: 8px 11px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  text-align: left;
  color: var(--bento-ink);
  transition: transform 0.24s cubic-bezier(0.34, 1.45, 0.64, 1), filter 0.2s ease;
}

.bento-tile:active {
  transform: scale(0.95);
}

.bento-pebble { background: var(--bento-pebble-bg); }
.bento-latte { background: var(--bento-latte-bg); }
.bento-butter { background: var(--bento-butter-bg); }
.bento-lavender { background: var(--bento-lavender-bg); }

.bento-tile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bento-icon-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bento-icon-circle);
  display: grid;
  place-items: center;
  color: var(--bento-ink);
  box-shadow: 0 2px 6px rgba(37, 30, 27, 0.06);
  transition: transform 0.25s cubic-bezier(0.34, 1.5, 0.64, 1);
}

.bento-icon-circle svg {
  width: 15px;
  height: 15px;
}

.bento-tile:hover .bento-icon-circle {
  transform: translateY(-2px);
}

.bento-action-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  color: var(--bento-ink);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

[data-theme="dark"] .bento-action-badge {
  background: rgba(255, 255, 255, 0.1);
}

.bento-arrow {
  font-size: 11px;
}

.bento-tile-body {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.bento-val {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.bento-label {
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.2;
  opacity: 0.78;
}

/* ==================== 今日已完成抽屉（带 3px 切割缝防粘连） ==================== */
.done-drawer {
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  box-shadow: 0 0 0 3px var(--bg-page), var(--shadow-card);
  overflow: hidden;
}

.done-drawer-trigger {
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
}

.done-drawer-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.done-check-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--emerald-soft);
  color: var(--emerald);
  display: grid;
  place-items: center;
}

.done-count-pill {
  padding: 1px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.drawer-chevron {
  transition: transform 0.28s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.done-drawer.is-open .drawer-chevron {
  transform: rotate(180deg);
}

.done-drawer-body {
  border-top: 1px solid var(--border-card);
  padding: 10px 14px 12px;
  animation: drawer-slide-down 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes drawer-slide-down {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.done-drawer-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.done-drawer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--bg-subtle);
}

/* ==================== 表单、滑动分段控件、按钮系统 ==================== */
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.form-row-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

@media (max-width: 440px) {
  .form-row-3 {
    grid-template-columns: 1fr;
  }
}

.form-row-inline {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.form-row-inline .field-input {
  flex: 1;
  min-width: 0;
}

.form-row-inline .btn {
  min-height: 44px;
  padding: 0 18px;
  flex-shrink: 0;
}

.field-label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 0;
}

.field-input,
select.field-input,
textarea.field-input {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  border-radius: 13px;
  padding: 9px 12px;
  font-size: 16px;
  line-height: 1.35;
  min-height: 44px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="date"].field-input {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  max-width: 100%;
  height: 44px;
  display: flex;
  align-items: center;
}

.field-input:focus {
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px var(--caramel-soft);
}

textarea.field-input {
  resize: vertical;
  min-height: 62px;
}

.note-quick-drawer {
  margin-top: 2px;
  padding: 6px 8px;
  border-radius: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-card);
  animation: drawer-slide-down 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.note-quick-drawer .quick-tag-chip {
  min-height: 38px;
}

.segmented-mini {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--seg-count, 3), minmax(0, 1fr));
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  flex-shrink: 0;
}

.seg-thumb {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc((100% - 6px) / var(--seg-count, 3));
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  box-shadow: 0 2px 6px rgba(37, 30, 27, 0.08);
  transform: translateX(calc(var(--seg-idx, 0) * 100%));
  transition: transform 0.3s cubic-bezier(0.34, 1.38, 0.64, 1);
  pointer-events: none;
}

.seg-mini-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: color 0.2s ease;
}

.seg-mini-btn.active {
  color: var(--text-primary);
}

.chip-scroll-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  padding: 2px 0;
}

.chip-scroll-row::-webkit-scrollbar {
  display: none;
}

.quick-tag-chip,
.filter-chip {
  border: 1px solid var(--border-card);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.16s ease;
}

.quick-tag-chip:active,
.filter-chip:active {
  transform: scale(0.94);
}

.quick-tag-chip.active,
.filter-chip.active {
  background: var(--mocha);
  color: var(--mocha-ink);
  border-color: transparent;
}

.btn {
  border: none;
  border-radius: var(--radius-pill);
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: transform 0.2s cubic-bezier(0.34, 1.45, 0.64, 1), opacity 0.18s ease, background-color 0.18s ease;
}

.btn:active {
  transform: scale(0.96);
}

.btn-block { width: 100%; }
.btn-grow { flex: 1; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; }

.btn-primary {
  background: var(--mocha);
  color: var(--mocha-ink);
}

.btn-emerald {
  background: var(--emerald-solid);
  color: #FFFFFF;
}

.btn-soft {
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: 1px solid var(--border-card);
}

.btn-outline-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border: 1px solid rgba(209, 77, 95, 0.28);
}

.icon-trash-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-trash-btn:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* ==================== Tab 2: 成长（体重与喂粮） ==================== */
.pet-summary-card {
  gap: 10px;
}

.pet-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pet-identity {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.pet-avatar-badge {
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: var(--bento-butter-bg);
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
  overflow: hidden;
}

.pet-avatar-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pet-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.stat-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.stat-tile {
  background: var(--bg-page);
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-tile-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.stat-tile-val {
  font-size: 15px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.growth-alert-box {
  border-radius: 16px;
  padding: 10px 12px;
  font-size: 12.5px;
  font-weight: 600;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.growth-alert-box.is-warn {
  background: var(--danger-soft);
  color: var(--danger);
}

.growth-alert-box.is-good {
  background: var(--emerald-soft);
  color: var(--emerald);
}

.svg-chart-wrap {
  width: 100%;
  overflow: hidden;
  border-radius: 18px;
}

/* SVG 体重曲线一笔画线动画 */
.chart-line-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: chart-stroke-draw 0.88s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes chart-stroke-draw {
  to { stroke-dashoffset: 0; }
}

.chart-area-fade {
  opacity: 0;
  animation: chart-fade-in 0.7s ease-out 0.25s forwards;
}

@keyframes chart-fade-in {
  to { opacity: 1; }
}

.chart-dot-pop {
  opacity: 0;
  animation: chart-dot-appear 0.32s ease-out forwards;
  animation-delay: calc(0.18s + var(--dot-idx, 0) * 0.055s);
}

@keyframes chart-dot-appear {
  to { opacity: 1; }
}

.weight-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}

.weight-row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-card);
}

.weight-row-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.weight-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nutrition-result-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border-radius: 18px;
  background: var(--bg-page);
  border: 1px solid var(--border-card);
}

.nutri-highlight {
  grid-column: 1 / -1;
  background: var(--bento-latte-bg);
  color: var(--bento-ink);
  border-radius: 14px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nutri-highlight strong {
  font-size: 20px;
  font-weight: 800;
}

.nutrition-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.disclaimer-text {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-muted);
  flex: 1;
  min-width: 180px;
}

/* ==================== Tab 3: 记录（病历时间轴） ==================== */
.vet-hero-card {
  background: linear-gradient(140deg, var(--bg-surface) 0%, var(--bento-pebble-bg) 100%);
}

.vet-hero-actions-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 9px;
}

.filter-card-compact {
  gap: 10px;
}

.filter-top-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-top-row #healthScopeBtn {
  min-height: 44px;
  flex-shrink: 0;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  border: 1px solid var(--border-card);
  background: var(--bg-page);
  border-radius: var(--radius-pill);
  padding: 9px 12px 9px 36px;
  font-size: 16px;
  line-height: 1.35;
  min-height: 44px;
  outline: none;
}

.search-input:focus {
  border-color: var(--caramel);
}

.filter-trigger-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-entry-btn {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 8px 11px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  transition: transform 0.16s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.filter-entry-btn span:nth-child(2) {
  flex: 1;
  min-width: 0;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.filter-entry-btn:active {
  transform: scale(0.97);
}

.filter-entry-btn.is-active {
  border-color: var(--caramel);
  background: var(--caramel-soft);
  color: var(--caramel);
}

.filter-entry-chevron {
  opacity: 0.65;
}

.filter-clear-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex-shrink: 0;
}

.active-filter-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.active-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--caramel-soft);
  color: var(--caramel);
  font-size: 12px;
  font-weight: 700;
}

.event-card-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.icon-edit-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  min-height: 44px;
  padding: 0 9px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-edit-btn:hover {
  background: var(--caramel-soft);
  color: var(--caramel);
}

.event-card-actions .icon-trash-btn {
  min-height: 44px;
  padding: 0 9px;
}

.event-tag-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 2px 0;
}

.event-tag-wrap .quick-tag-chip {
  min-height: 38px;
}

.quick-add-symptom-row {
  margin-top: 2px;
}

.health-timeline-list {
  position: relative;
  padding-left: 16px;
}

.health-timeline-list::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 12px;
  bottom: 12px;
  width: 2px;
  border-radius: 2px;
  background: var(--border-strong);
  opacity: 0.55;
}

.timeline-event-card {
  position: relative;
}

.timeline-node-dot {
  position: absolute;
  left: -16px;
  top: 20px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--caramel);
  box-shadow: 0 0 0 3px var(--bg-page);
}

.timeline-node-dot.sev-urgent {
  background: var(--danger);
}

.timeline-node-dot.sev-watch {
  background: var(--amber);
}

.event-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ==================== Tab 4: 档案（冰箱微缩图 + Bento 导出） ==================== */
.fridge-mini-preview {
  background: var(--bg-page);
  border: 1px dashed var(--border-strong);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mini-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mini-sheet-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mini-sheet-col {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mini-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--border-strong);
  opacity: 0.48;
  display: inline-block;
}

.mini-bar.w-20 { width: 20%; }
.mini-bar.w-40 { width: 40%; }
.mini-bar.w-60 { width: 60%; }
.mini-bar.w-70 { width: 70%; }
.mini-bar.w-80 { width: 80%; }

.mini-check-box {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  border: 1.5px solid var(--caramel);
  flex-shrink: 0;
  position: relative;
}

.mini-check-box.checked {
  background: var(--emerald-solid);
  border-color: var(--emerald-solid);
}

.mini-check-box.animated {
  animation: mini-box-pulse 2.2s ease-in-out infinite;
}

@keyframes mini-box-pulse {
  0%, 100% { border-color: var(--caramel); background: transparent; }
  50% { border-color: var(--emerald-solid); background: var(--emerald-soft); }
}

.inline-png-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 6px;
}

.preview-img {
  width: 100%;
  height: auto;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  display: block;
}

.preview-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.backup-title-row {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.info-dot-btn {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.info-dot-btn[aria-expanded="true"] {
  background: var(--mocha);
  color: var(--mocha-ink);
  border-color: transparent;
}

.storage-info-panel {
  border-radius: 14px;
  padding: 10px 12px;
  background: var(--bg-page);
  border: 1px solid var(--border-card);
  animation: drawer-slide-down 0.22s ease-out;
}

.storage-info-text {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.backup-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.bento-action-tile {
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 13px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  color: var(--bento-ink);
  transition: transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.bento-action-tile:active {
  transform: scale(0.95);
}

.bento-latte-soft { background: var(--bento-latte-bg); }
.bento-pebble-soft { background: var(--bento-pebble-bg); }

.bento-action-tile span {
  font-size: 14px;
  font-weight: 700;
  margin-top: 4px;
}

.bento-action-tile small {
  font-size: 11px;
  opacity: 0.72;
  font-weight: 600;
}

.import-drop-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: 16px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-page);
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.import-drop-zone.is-dragover {
  border-color: var(--caramel);
  background: var(--caramel-soft);
  transform: scale(0.99);
}

.import-drop-zone.is-dragover .import-upload-icon {
  animation: mascot-happy-bob 0.6s ease-in-out infinite;
}

.drop-zone-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.reset-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-cycle-timeline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-group-box {
  border: 1px solid var(--border-card);
  border-radius: 16px;
  padding: 10px 12px;
  background: var(--bg-page);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.plan-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.plan-cycle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
}

/* ==================== 5 秒悬浮撤销胶囊 & Toast ==================== */
.floating-undo-pill {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 432px;
  z-index: 80;
  background: #251E1B;
  color: #F5EFE8;
  border-radius: var(--radius-pill);
  padding: 9px 11px 11px 12px;
  box-shadow: var(--shadow-float);
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  animation: pill-pop-in 0.28s cubic-bezier(0.34, 1.45, 0.64, 1);
}

[data-theme="dark"] .floating-undo-pill {
  background: #2B2521;
  border: 1px solid rgba(255, 245, 235, 0.16);
}

@keyframes pill-pop-in {
  from { opacity: 0; transform: translate(-50%, 14px) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

.undo-ring-wrap {
  position: relative;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.undo-ring-bg { stroke: rgba(255, 255, 255, 0.22); }
.undo-ring-fg { stroke: var(--caramel); transition: stroke-dashoffset 0.08s linear; }

.undo-sec {
  position: absolute;
  font-size: 10px;
  font-weight: 800;
}

.undo-text {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.undo-action-btn {
  border: none;
  background: var(--caramel);
  color: #FFFFFF;
  border-radius: var(--radius-pill);
  padding: 5px 13px;
  font-size: 12.5px;
  font-weight: 700;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.undo-bar-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: var(--caramel);
  transform-origin: left center;
}

.toast-banner {
  position: fixed;
  left: 50%;
  top: calc(68px + env(safe-area-inset-top));
  transform: translateX(-50%);
  z-index: 98;
  background: rgba(37, 30, 27, 0.92);
  color: #F5EFE8;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  max-width: calc(100% - 36px);
  text-align: center;
  animation: toast-fade 0.2s ease-out;
}

[data-theme="dark"] .toast-banner {
  background: rgba(245, 239, 232, 0.94);
  color: #1D1A18;
}

@keyframes toast-fade {
  from { opacity: 0; transform: translate(-50%, -6px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==================== 底部悬浮毛玻璃胶囊 Dock + 滑块 + 小猫剪影 ==================== */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 420px;
  z-index: 55;
  background: var(--bg-dock);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-pill);
  padding: 5px;
  box-shadow: 0 12px 32px rgba(37, 30, 27, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  overflow: visible;
}

[data-theme="dark"] .bottom-nav {
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.nav-pill-slider {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc((100% - 10px) / 4);
  border-radius: var(--radius-pill);
  background: var(--mocha);
  box-shadow: 0 6px 16px rgba(37, 30, 27, 0.22);
  transform: translateX(calc(var(--active-tab-idx, 0) * 100%));
  transition: transform 0.38s cubic-bezier(0.34, 1.38, 0.64, 1);
  pointer-events: none;
  z-index: 0;
}

.slider-cat-peeker {
  display: none;
}

.nav-tab {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 6px 4px;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  transition: color 0.22s ease, transform 0.18s ease;
}

.nav-tab.active {
  color: var(--mocha-ink);
}

.nav-tab.active .nav-icon {
  animation: nav-icon-pop 0.32s cubic-bezier(0.34, 1.5, 0.64, 1);
}

@keyframes nav-icon-pop {
  0% { transform: scale(0.92); }
  55% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.nav-tab:active {
  transform: scale(0.93);
}

/* ==================== 弹窗底部抽屉 ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(24, 19, 16, 0.52);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.modal-backdrop-front {
  z-index: 96;
}

@media (min-width: 540px) {
  .modal-backdrop {
    align-items: center;
  }
}

.modal-sheet {
  width: 100%;
  max-width: 448px;
  max-height: 88dvh;
  overflow-y: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sheet);
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
  gap: 12px;
  animation: modal-spring-in 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-sheet-tall {
  max-height: 92dvh;
}

@keyframes modal-spring-in {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.modal-close-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle);
  font-size: 20px;
  line-height: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.emoji-picker-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.emoji-opt {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--bg-subtle);
  font-size: 20px;
  display: grid;
  place-items: center;
}

.emoji-opt.active {
  border-color: var(--caramel);
  background: var(--caramel-soft);
}

.modal-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-modal-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.preview-scroll-box {
  max-height: 62dvh;
  overflow-y: auto;
  padding: 4px;
  background: var(--bg-page);
  border-radius: 16px;
  border: 1px solid var(--border-card);
}

.confirm-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.empty-state-card {
  text-align: center;
  padding: 24px 16px;
  color: var(--text-secondary);
  align-items: center;
}

/* ==================== Tab 2: 成长分段子导航 & 子容器 ==================== */
.weight-sub-nav {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  border: 1px solid var(--border-card);
  box-shadow: inset 0 1px 2px rgba(37, 30, 27, 0.04);
}

.sub-nav-thumb {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  box-shadow: 0 3px 10px rgba(37, 30, 27, 0.09);
  transform: translateX(calc(var(--sub-idx, 0) * 100%));
  transition: transform 0.34s cubic-bezier(0.34, 1.38, 0.64, 1);
  pointer-events: none;
}

.sub-nav-btn {
  position: relative;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: color 0.22s ease;
}

.sub-nav-btn.active {
  color: var(--text-primary);
}

.weight-subpanel {
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
}

/* ==================== iOS 惯性双列滚轮组件 (wheel.js) ==================== */
.wheel-host-box {
  width: 100%;
}

.weight-wheel-root {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  --wheel-surface: var(--bg-page);
}

.wheel-live-readout {
  width: 100%;
  border: 1px solid var(--border-card);
  background: var(--bg-page);
  border-radius: 14px;
  padding: 8px 12px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
  color: var(--text-primary);
  transition: transform 0.16s cubic-bezier(0.34, 1.5, 0.64, 1), border-color 0.18s ease;
}

.wheel-live-readout.is-tick-snap {
  transform: scale(1.015);
  border-color: var(--caramel);
}

.wheel-readout-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.wheel-readout-unit {
  font-size: 13px;
  font-weight: 700;
  color: var(--caramel);
}

.wheel-readout-hint {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.wheel-stage {
  position: relative;
  height: 180px;
  width: 100%;
  border-radius: 18px;
  background: var(--wheel-surface);
  border: 1px solid var(--border-card);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.wheel-highlight-bar {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 70px;
  height: 40px;
  border-radius: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  box-shadow: 0 2px 8px rgba(37, 30, 27, 0.06);
  pointer-events: none;
  z-index: 1;
  transition: transform 0.14s cubic-bezier(0.34, 1.5, 0.64, 1), border-color 0.16s ease;
}

.wheel-highlight-bar.is-tick-snap {
  transform: scale(1.01, 1.03);
  border-color: var(--caramel);
}

.wheel-columns {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 18px;
}

.wheel-col {
  height: 180px;
  min-width: 68px;
  flex: 0 1 88px;
  overflow: hidden;
  position: relative;
  cursor: grab;
  touch-action: none;
  outline: none;
}

.wheel-col.is-dragging {
  cursor: grabbing;
}

.wheel-col:focus-visible {
  box-shadow: inset 0 0 0 2px var(--caramel-soft);
  border-radius: 12px;
}

.wheel-track {
  padding: 70px 0;
  will-change: transform;
}

.wheel-item {
  height: 40px;
  line-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  backface-visibility: hidden;
  transition: color 0.14s ease;
}

.wheel-item.is-center {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 800;
}

.wheel-dot {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
  padding: 0 1px;
  flex-shrink: 0;
  align-self: center;
}

.wheel-dot.is-hidden {
  display: none;
}

.wheel-stage-unit {
  font-size: 13px;
  font-weight: 700;
  color: var(--caramel);
  margin-left: 6px;
  flex-shrink: 0;
  align-self: center;
}

.wheel-fade-mask {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    var(--wheel-surface) 0%,
    var(--wheel-fade-zero) 34%,
    var(--wheel-fade-zero) 66%,
    var(--wheel-surface) 100%
  );
}

[data-theme="dark"] .wheel-fade-mask {
  background: linear-gradient(
    to bottom,
    var(--wheel-surface) 0%,
    var(--wheel-fade-zero) 34%,
    var(--wheel-fade-zero) 66%,
    var(--wheel-surface) 100%
  );
}

/* ==================== 卡夹风格拍照体重时间轴 (photo-timeline.js) ==================== */
.weight-photo-timeline-host {
  width: 100%;
  touch-action: pan-y;
}

.photo-timeline-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.timeline-quick-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  touch-action: pan-x pan-y;
  padding: 2px 1px;
}

.timeline-quick-tabs::-webkit-scrollbar {
  display: none;
}

.timeline-quick-tab {
  border: 1px solid var(--border-card);
  background: var(--bg-surface);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 30, 27, 0.04);
  transition: transform 0.2s cubic-bezier(0.34, 1.45, 0.64, 1), background-color 0.22s ease, color 0.22s ease;
}

.timeline-quick-tab:active {
  transform: scale(0.94);
}

.timeline-quick-tab.is-active {
  background: var(--mocha);
  color: var(--mocha-ink);
  border-color: transparent;
  box-shadow: 0 5px 14px rgba(37, 30, 27, 0.16);
}

.photo-timeline-viewport {
  position: relative;
  height: clamp(410px, 56dvh, 520px);
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scrollbar-width: thin;
  border-radius: var(--radius-card);
  background: var(--bg-surface);
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-card);
  padding: 16px 10px 0;
  outline: none;
}

.photo-timeline-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

.photo-axis-line {
  position: absolute;
  left: 50%;
  top: 22px;
  bottom: 32px;
  width: 2px;
  transform: translateX(-50%);
  background: var(--border-strong);
  opacity: 0.28;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.photo-timeline-item {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  opacity: 0.66;
  transform: scale(0.96);
  transform-origin: center center;
  transition: opacity 0.28s ease, transform 0.34s cubic-bezier(0.34, 1.45, 0.64, 1);
  cursor: pointer;
}

.photo-timeline-item.is-snapped {
  opacity: 1;
  transform: scale(1.015);
}

.photo-timeline-item.is-photo-left .pt-photo-slot {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}

.photo-timeline-item.is-photo-left .pt-axis-col {
  grid-column: 2;
  grid-row: 1;
}

.photo-timeline-item.is-photo-left .pt-info-slot {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  text-align: left;
  align-items: flex-start;
}

.photo-timeline-item.is-photo-right .pt-info-slot {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  text-align: right;
  align-items: flex-end;
}

.photo-timeline-item.is-photo-right .pt-axis-col {
  grid-column: 2;
  grid-row: 1;
}

.photo-timeline-item.is-photo-right .pt-photo-slot {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
}

.photo-timeline-item.is-photo-right .pt-weight-row,
.photo-timeline-item.is-photo-right .pt-info-actions {
  justify-content: flex-end;
}

.pt-photo-slot {
  min-width: 0;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-photo-card,
.pt-photo-placeholder {
  position: relative;
  width: 106px;
  height: 106px;
  max-width: 100%;
  border-radius: 22px;
  border: 1px solid var(--border-card);
  background: var(--bg-page);
  padding: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  transition: transform 0.25s cubic-bezier(0.34, 1.45, 0.64, 1), border-color 0.25s ease, box-shadow 0.25s ease;
}

.pt-photo-card.has-cutout {
  background: radial-gradient(circle at 50% 45%, var(--bento-butter-bg) 0%, var(--bg-page) 78%);
}

[data-theme="dark"] .pt-photo-card.has-cutout {
  background: radial-gradient(circle at 50% 45%, var(--hero-glow-a) 0%, var(--bg-page) 80%);
}

.photo-timeline-item.is-snapped .pt-photo-card,
.photo-timeline-item.is-snapped .pt-photo-placeholder {
  border-color: var(--accent-border);
  box-shadow: 0 10px 24px rgba(48, 36, 26, 0.12);
}

[data-theme="dark"] .photo-timeline-item.is-snapped .pt-photo-card,
[data-theme="dark"] .photo-timeline-item.is-snapped .pt-photo-placeholder {
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.5);
}

.pt-cutout-img {
  max-width: 94%;
  max-height: 94%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 6px 10px rgba(37, 30, 27, 0.18));
}

.pt-cutout-img.is-avatar-soft {
  opacity: 0.46;
  filter: saturate(0.8) blur(0.4px);
}

.pt-photo-badge {
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(37, 30, 27, 0.14);
}

[data-theme="dark"] .pt-photo-badge {
  background: rgba(29, 26, 24, 0.88);
  color: var(--text-primary);
}

.pt-photo-placeholder {
  border-style: dashed;
  border-color: var(--border-strong);
  color: var(--text-secondary);
}

.pt-photo-placeholder-overlay {
  position: absolute;
  inset: auto 8px 8px;
  width: auto;
  height: auto;
  border: none;
  border-radius: var(--radius-pill);
  background: rgba(37, 30, 27, 0.72);
  color: #FFFFFF;
  padding: 3px 8px;
  flex-direction: row;
  font-size: 11px;
  font-weight: 700;
  gap: 4px;
}

.pt-placeholder-emoji {
  font-size: 32px;
  line-height: 1;
}

.pt-placeholder-cta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--text-primary);
}

/* 中央纵轴节点与 SVG 一笔画线 */
.pt-axis-col {
  position: relative;
  height: 100%;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-axis-dot {
  position: relative;
  z-index: 2;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2.5px solid var(--border-strong);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.24s ease, background-color 0.24s ease, box-shadow 0.24s ease;
}

.photo-timeline-item.is-snapped .pt-axis-dot {
  background: var(--caramel);
  border-color: var(--bg-surface);
  box-shadow: 0 0 0 4px var(--caramel-soft);
  transform: scale(1.26);
}

.pt-branch-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 44px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  overflow: visible;
}

.pt-branch-path {
  stroke: var(--border-strong);
  stroke-width: 2;
  stroke-linecap: round;
  transition: stroke 0.25s ease;
}

.photo-timeline-item.is-snapped .pt-branch-path {
  stroke: var(--caramel);
  stroke-width: 2.4;
}

.photo-timeline-item.is-line-drawing .pt-branch-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: pt-stroke-draw 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.pt-rail-svg {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: calc(100% + 16px);
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 1;
}

.pt-rail-seg {
  stroke: var(--border-strong);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.45;
  transition: stroke 0.25s ease, opacity 0.25s ease;
}

.photo-timeline-item.is-snapped .pt-rail-seg {
  stroke: var(--caramel);
  opacity: 0.85;
}

.photo-timeline-item.is-line-drawing .pt-rail-seg {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: pt-stroke-draw 0.48s cubic-bezier(0.22, 1, 0.36, 1) 0.08s forwards;
}

@keyframes pt-stroke-draw {
  to { stroke-dashoffset: 0; }
}

/* 信息槽 */
.pt-info-slot {
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-wrap: anywhere;
}

.pt-info-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
}

.pt-weight-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.pt-weight-val {
  font-size: 16.5px;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.pt-delta-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.pt-delta-pill.is-up { background: var(--emerald-soft); color: var(--emerald); }
.pt-delta-pill.is-down { background: var(--amber-soft); color: var(--amber); }
.pt-delta-pill.is-flat { background: var(--bg-subtle); color: var(--text-secondary); }
.pt-delta-pill.is-alert { background: var(--danger-soft); color: var(--danger); }
.pt-delta-pill.is-baseline { background: var(--caramel-soft); color: var(--caramel); }

.pt-note-text {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.pt-info-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
}

.pt-action-btn {
  border: 1px solid var(--border-card);
  background: var(--bg-page);
  color: var(--text-secondary);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  transition: transform 0.16s ease, background-color 0.2s ease, color 0.2s ease;
}

.pt-action-btn:active {
  transform: scale(0.93);
}

.pt-action-photo:hover {
  background: var(--caramel-soft);
  color: var(--caramel);
}

.pt-action-delete:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* 空态与底部悬浮拍照记体重按钮 */
.pt-empty-state {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
  padding: 24px 16px 76px;
}

.pt-empty-icon {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--caramel-soft);
  color: var(--caramel);
  display: grid;
  place-items: center;
}

.pt-empty-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.pt-empty-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.timeline-fab-camera {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  z-index: 6;
  border: none;
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  background: var(--mocha);
  color: var(--mocha-ink);
  font-size: 13.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  box-shadow: 0 10px 24px rgba(37, 30, 27, 0.24);
  transition: transform 0.2s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.timeline-fab-camera:active {
  transform: translateX(-50%) scale(0.95);
}

.pt-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==================== 拍照抠图工作台 & 表单内联抠图预览条 ==================== */
.cutout-inline-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border-card);
}

.cutout-mini-preview {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background-color: var(--bg-surface);
  background-image:
    linear-gradient(45deg, rgba(128, 116, 106, 0.1) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(128, 116, 106, 0.1) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(128, 116, 106, 0.1) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(128, 116, 106, 0.1) 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  overflow: hidden;
  flex-shrink: 0;
}

.cutout-mini-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.cutout-inline-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cutout-inline-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.sync-avatar-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
}

.sync-avatar-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--caramel);
}

.cutout-source-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cutout-stage-checkerboard {
  position: relative;
  min-height: 220px;
  max-height: 280px;
  border-radius: 18px;
  border: 1px solid var(--border-card);
  background-color: var(--bg-page);
  background-image:
    linear-gradient(45deg, rgba(128, 116, 106, 0.11) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(128, 116, 106, 0.11) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(128, 116, 106, 0.11) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(128, 116, 106, 0.11) 75%);
  background-size: 18px 18px;
  background-position: 0 0, 0 9px, 9px -9px, -9px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
}

.cutout-stage-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.cutout-empty-badge {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: var(--bg-surface);
  color: var(--caramel);
  box-shadow: var(--shadow-card);
  display: grid;
  place-items: center;
}

.cutout-empty-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.cutout-preview-img {
  max-width: 100%;
  max-height: 224px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 12px 22px rgba(37, 30, 27, 0.24));
}

.cutout-stage-checkerboard.is-circle-mode {
  padding: 0;
  height: 256px;
}

.cutout-circle-cropper {
  position: relative;
  width: 100%;
  height: 256px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  border-radius: 16px;
}

.cutout-circle-cropper:active {
  cursor: grabbing;
}

.cutout-circle-bg-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.cutout-circle-overlay {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cutout-circle-ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160px;
  height: 160px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 9999px rgba(15, 14, 12, 0.56), inset 0 0 0 1px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}

.cutout-crosshair-h,
.cutout-crosshair-v {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.55);
  border-radius: 999px;
}

.cutout-crosshair-h {
  width: 16px;
  height: 1.5px;
}

.cutout-crosshair-v {
  width: 1.5px;
  height: 16px;
}

.cutout-circle-tip {
  position: absolute;
  left: 50%;
  bottom: 8px;
  transform: translateX(-50%);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: rgba(15, 14, 12, 0.68);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cutout-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cutout-control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cutout-slider-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cutout-range-input {
  width: 100%;
  accent-color: var(--caramel);
  cursor: pointer;
  outline: none;
  border-radius: 999px;
}

.cutout-range-input:focus-visible {
  box-shadow: 0 0 0 3px var(--caramel-soft);
}

/* ==================== 多主题配色选择器（顶部抽屉 + 档案页快捷色板条） ==================== */
.palette-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.palette-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 60px;
  padding: 10px;
  border-radius: 16px;
  border: 1.5px solid var(--border-card);
  background: var(--bg-page);
  text-align: left;
  color: var(--text-primary);
  transition: transform 0.2s cubic-bezier(0.34, 1.45, 0.64, 1), border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.palette-card:active {
  transform: scale(0.96);
}

.palette-card.is-selected {
  border-color: var(--caramel);
  background: var(--bg-surface);
  box-shadow: 0 6px 18px var(--caramel-soft);
}

.palette-swatch-stack {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.palette-swatch-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.palette-swatch-dot + .palette-swatch-dot {
  margin-left: -6px;
}

.palette-card-meta {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.palette-card-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.25;
  white-space: nowrap;
}

.palette-card-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.25;
  white-space: nowrap;
}

.palette-check-badge {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--caramel);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  opacity: 0;
  transform: scale(0.75);
  transition: opacity 0.2s ease, transform 0.22s cubic-bezier(0.34, 1.45, 0.64, 1);
}

.palette-card.is-selected .palette-check-badge {
  opacity: 1;
  transform: scale(1);
}

.palette-quick-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.palette-chip-btn {
  min-height: 46px;
  padding: 6px 8px;
  border-radius: 14px;
  border: 1.5px solid var(--border-card);
  background: var(--bg-page);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: transform 0.18s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.palette-chip-btn:active {
  transform: scale(0.95);
}

.palette-chip-btn.is-selected {
  border-color: var(--caramel);
  background: var(--bg-surface);
  box-shadow: 0 4px 12px var(--caramel-soft);
}

.palette-chip-orb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid var(--bg-surface);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

/* ==================== Tab 3 筛选列表底部抽屉 (#healthFilterModal) ==================== */
.filter-modal-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: 60dvh;
  padding-right: 2px;
}

.filter-modal-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.filter-section-head .btn-sm {
  min-height: 36px;
}

.filter-list-group {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border-card);
  background: var(--bg-page);
}

.filter-list-row {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--border-card);
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.filter-list-row:last-child {
  border-bottom: none;
}

.filter-list-row.active,
.filter-list-row.is-selected {
  background: var(--caramel-soft);
  color: var(--caramel);
  font-weight: 700;
}

.filter-row-left {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.filter-row-check {
  opacity: 0;
  color: var(--caramel);
  transition: opacity 0.16s ease;
}

.filter-list-row.active .filter-row-check,
.filter-list-row.is-selected .filter-row-check {
  opacity: 1;
}

.filter-symptom-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.symptom-row-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 3px 6px 3px 12px;
  border-radius: 14px;
  border: 1px solid var(--border-card);
  background: var(--bg-page);
}

.symptom-row-item.is-selected {
  border-color: var(--caramel);
  background: var(--caramel-soft);
}

.symptom-select-btn {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
}

.symptom-row-item.is-selected .symptom-select-btn {
  color: var(--caramel);
  font-weight: 700;
}

.symptom-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.symptom-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border-card);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: grid;
  place-items: center;
}

.symptom-icon-btn.is-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(209, 77, 95, 0.28);
}

.symptom-rename-form {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 4px 0;
}

.symptom-rename-form .field-input {
  flex: 1;
  min-width: 0;
}

.symptom-rename-form .btn {
  min-height: 44px;
  padding: 0 12px;
  flex-shrink: 0;
}

#healthFilterModal .modal-footer-actions .btn {
  min-height: 44px;
}

/* ==================== 无障碍减弱动态降级 ==================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tab-panel.is-entering-from-right,
  .tab-panel.is-entering-from-left,
  .tab-panel.is-tab-refreshing .is-stagger-enter {
    animation: none !important;
    transform: none !important;
    opacity: 1 !important;
  }
}
