@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&family=ZCOOL+KuaiLe&display=swap");

@font-face {
    font-family: "ZhuqueFangsong";
    src: url("assets/ZhuqueFangsong.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* 姐姐攻略耶耶 - 可爱粉嫩主题 (新版布局) */
:root {
    --pink-100: #fff1f6;
    --pink-200: #ffd9e8;
    --pink-300: #ffb8d2;
    --pink-400: #ff8fb6;
    --pink-500: #ff6f9f;
    --peach-200: #ffe4d6;
    --peach-300: #ffc7ad;
    --cream: #fff8f2;
    --cocoa: #7c4a4a;
    --shadow: 0 18px 40px rgba(255, 111, 159, 0.2);

    /* Semantic tokens (themeable) */
    --bg-a: var(--pink-100);
    --bg-b: var(--cream);
    --bg-c: var(--peach-200);

    --glass-app: rgba(255, 255, 255, 0.86);
    --glass-soft: rgba(255, 255, 255, 0.7);
    --glass-mid: rgba(255, 255, 255, 0.8);
    --glass-strong: rgba(255, 255, 255, 0.9);
    --glass-faint: rgba(255, 255, 255, 0.6);

    --text-1: var(--cocoa);
    --text-2: #8a4a5f;
    --text-3: #8a5a6a;
    --text-muted: #b56c82;
    --text-muted-2: #b05f7a;

    --success: #5a9a5a;
    --border-success: #90EE90;

    --tint-1: rgba(255, 184, 210, 0.4);
    --choice-bg-a: rgba(255, 217, 232, 0.5);
    --choice-bg-b: rgba(255, 244, 239, 0.5);

    --accent-shadow-1: rgba(255, 111, 159, 0.3);
    --accent-shadow-2: rgba(255, 111, 159, 0.4);
    --accent-shadow-3: rgba(255, 111, 159, 0.25);
    --accent-shadow-4: rgba(255, 111, 159, 0.35);
    --focus-ring: rgba(255, 143, 182, 0.2);

    /* Themeable layout/surface tokens (keep defaults visually identical) */
    --app-bg: linear-gradient(160deg, var(--bg-a), var(--bg-b) 45%, var(--bg-c) 100%);
    --app-surface: var(--glass-app);
    --app-border: none;

    --panel-surface: var(--cream);
    --panel-border: 2px dashed var(--pink-200);
    --panel-border-soft: 1px dashed var(--pink-200);

    --modal-surface: #ffffff;
    --divider-border: 1px dashed var(--pink-200);
    --footer-border: 1px dashed var(--pink-200);
    --row-divider-border: 1px dotted var(--pink-200);

    --chip-surface: linear-gradient(135deg, var(--pink-200), var(--peach-200));
    --accent-surface: linear-gradient(135deg, var(--pink-400), var(--pink-500));
    --progress-surface: linear-gradient(90deg, var(--pink-400), var(--pink-500));

    --story-world-surface: var(--glass-soft);
    --story-world-bar: var(--pink-400);
    --content-surface: var(--glass-mid);
    --content-border: 1px dashed var(--pink-200);
    --bubble-border: 1px dashed var(--pink-300);
    --control-border: 1px dashed var(--pink-300);
    --input-border-color: var(--pink-200);
    --input-border-focus-color: var(--pink-400);
    --choice-hover-border: var(--pink-400);
    --typing-cursor-color: var(--pink-500);

    /* Decorative overlays for non-default themes */
    --theme-overlay-1: none;
    --theme-overlay-2: none;
    --theme-overlay-opacity-1: 0;
    --theme-overlay-opacity-2: 0;
}

/* Themes */
:root[data-theme="dusk"],
body[data-theme="dusk"] {
    --pink-100: #fff3ea;
    --pink-200: #ffd6c6;
    --pink-300: #ffb090;
    --pink-400: #ff7b5a;
    --pink-500: #ff5a3c;
    --peach-200: #f3d9ff;
    --peach-300: #d9b7ff;
    --cream: #fff7f1;
    --cocoa: #5a3430;
    --shadow: 0 18px 40px rgba(255, 90, 60, 0.18);

    --text-2: #7a3a3b;
    --text-3: #7d4b55;
    --text-muted: #b15b67;
    --text-muted-2: #a04a55;

    --tint-1: rgba(255, 176, 144, 0.35);
    --choice-bg-a: rgba(255, 214, 198, 0.55);
    --choice-bg-b: rgba(243, 217, 255, 0.45);
    --accent-shadow-1: rgba(255, 90, 60, 0.28);
    --accent-shadow-2: rgba(255, 90, 60, 0.38);
    --accent-shadow-3: rgba(255, 90, 60, 0.22);
    --accent-shadow-4: rgba(255, 90, 60, 0.32);
    --focus-ring: rgba(255, 123, 90, 0.22);

    /* Sunset gradient + subtle film stripes */
    --app-bg:
        radial-gradient(1100px 680px at 18% 6%, rgba(255, 123, 90, 0.55), transparent 62%),
        radial-gradient(900px 620px at 92% 0%, rgba(217, 183, 255, 0.45), transparent 58%),
        linear-gradient(160deg, #fff3ea, #fff7f1 45%, #f3d9ff 100%);
    --app-border: 1px solid rgba(255, 90, 60, 0.14);

    --panel-surface: rgba(255, 247, 241, 0.88);
    --panel-border: 2px solid rgba(255, 90, 60, 0.18);
    --panel-border-soft: 1px solid rgba(255, 90, 60, 0.14);
    --modal-surface: rgba(255, 247, 241, 0.94);

    --accent-surface: linear-gradient(135deg, #ff7b5a, #ff5a3c);
    --chip-surface: linear-gradient(135deg, rgba(255, 214, 198, 0.9), rgba(217, 183, 255, 0.75));
    --progress-surface: linear-gradient(90deg, #ff7b5a, #ff5a3c);
    --content-border: 1px solid rgba(255, 90, 60, 0.16);
    --bubble-border: 1px solid rgba(255, 90, 60, 0.16);
    --control-border: 1px solid rgba(255, 90, 60, 0.18);
    --input-border-color: rgba(255, 90, 60, 0.18);
    --input-border-focus-color: rgba(255, 123, 90, 0.65);
    --divider-border: 1px solid rgba(255, 90, 60, 0.16);
    --footer-border: 1px solid rgba(255, 90, 60, 0.16);
    --row-divider-border: 1px solid rgba(255, 90, 60, 0.12);

    --theme-overlay-1: repeating-linear-gradient(
        115deg,
        rgba(255, 255, 255, 0.16) 0px,
        rgba(255, 255, 255, 0.16) 10px,
        rgba(255, 255, 255, 0) 10px,
        rgba(255, 255, 255, 0) 26px
    );
    --theme-overlay-opacity-1: 0.22;
}

:root[data-theme="wave"],
body[data-theme="wave"] {
    --pink-100: #e7fbff;
    --pink-200: #c9f1ff;
    --pink-300: #a6e6ff;
    --pink-400: #50c6ff;
    --pink-500: #1f8cff;
    --peach-200: #ccfff0;
    --peach-300: #9bf5dd;
    --cream: #f1feff;
    --cocoa: #1d3f4a;
    --shadow: 0 18px 40px rgba(31, 140, 255, 0.18);

    --text-2: #1d4a55;
    --text-3: #245462;
    --text-muted: #3a6b77;
    --text-muted-2: #2e5f6b;

    --tint-1: rgba(80, 198, 255, 0.25);
    --choice-bg-a: rgba(201, 241, 255, 0.55);
    --choice-bg-b: rgba(204, 255, 240, 0.45);
    --accent-shadow-1: rgba(31, 140, 255, 0.28);
    --accent-shadow-2: rgba(31, 140, 255, 0.38);
    --accent-shadow-3: rgba(31, 140, 255, 0.22);
    --accent-shadow-4: rgba(31, 140, 255, 0.32);
    --focus-ring: rgba(80, 198, 255, 0.22);

    /* Ocean glass + caustics */
    --app-bg:
        radial-gradient(1200px 720px at 22% 10%, rgba(166, 230, 255, 0.82), transparent 60%),
        radial-gradient(900px 620px at 90% 18%, rgba(155, 245, 221, 0.62), transparent 58%),
        linear-gradient(160deg, #e7fbff, #f1feff 42%, #ccfff0 100%);
    --app-border: 1px solid rgba(31, 140, 255, 0.14);

    --panel-surface: rgba(241, 254, 255, 0.86);
    --panel-border: 1px solid rgba(31, 140, 255, 0.18);
    --panel-border-soft: 1px solid rgba(31, 140, 255, 0.14);
    --modal-surface: rgba(241, 254, 255, 0.92);

    --accent-surface: linear-gradient(135deg, #50c6ff, #1f8cff);
    --chip-surface: linear-gradient(135deg, rgba(201, 241, 255, 0.9), rgba(204, 255, 240, 0.86));
    --progress-surface: linear-gradient(90deg, #50c6ff, #1f8cff);
    --content-border: 1px solid rgba(31, 140, 255, 0.16);
    --bubble-border: 1px solid rgba(31, 140, 255, 0.14);
    --control-border: 1px solid rgba(31, 140, 255, 0.18);
    --input-border-color: rgba(31, 140, 255, 0.18);
    --input-border-focus-color: rgba(80, 198, 255, 0.7);
    --divider-border: 1px solid rgba(31, 140, 255, 0.14);
    --footer-border: 1px solid rgba(31, 140, 255, 0.14);
    --row-divider-border: 1px solid rgba(31, 140, 255, 0.10);

    --theme-overlay-1:
        radial-gradient(900px 520px at 18% 30%, rgba(255, 255, 255, 0.35), transparent 60%),
        radial-gradient(760px 460px at 72% 40%, rgba(255, 255, 255, 0.22), transparent 62%),
        repeating-linear-gradient(
            0deg,
            rgba(31, 140, 255, 0.10) 0px,
            rgba(31, 140, 255, 0.10) 1px,
            rgba(31, 140, 255, 0) 1px,
            rgba(31, 140, 255, 0) 18px
        );
    --theme-overlay-opacity-1: 0.22;
}

:root[data-theme="night"],
body[data-theme="night"] {
    --pink-100: #0b1020;
    --pink-200: #1a2443;
    --pink-300: #25335a;
    --pink-400: #4c6fff;
    --pink-500: #86a7ff;
    --peach-200: #0f1830;
    --peach-300: #142146;
    --cream: #121a33;
    --cocoa: #e7ecff;
    --shadow: 0 18px 46px rgba(0, 0, 0, 0.45);

    --bg-a: #070b16;
    --bg-b: #0b1020;
    --bg-c: #0f1830;

    --glass-app: rgba(14, 18, 35, 0.86);
    --glass-soft: rgba(16, 22, 44, 0.68);
    --glass-mid: rgba(16, 22, 44, 0.76);
    --glass-strong: rgba(18, 26, 56, 0.82);
    --glass-faint: rgba(16, 22, 44, 0.6);

    --text-2: #cfd8ff;
    --text-3: #b8c4f5;
    --text-muted: #93a5df;
    --text-muted-2: #a6b6ef;

    --tint-1: rgba(76, 111, 255, 0.22);
    --choice-bg-a: rgba(26, 36, 67, 0.6);
    --choice-bg-b: rgba(15, 24, 48, 0.55);
    --accent-shadow-1: rgba(76, 111, 255, 0.24);
    --accent-shadow-2: rgba(76, 111, 255, 0.34);
    --accent-shadow-3: rgba(76, 111, 255, 0.18);
    --accent-shadow-4: rgba(76, 111, 255, 0.26);
    --focus-ring: rgba(76, 111, 255, 0.26);

    /* Deep space */
    --app-bg:
        radial-gradient(1000px 620px at 18% 10%, rgba(76, 111, 255, 0.22), transparent 62%),
        radial-gradient(900px 620px at 82% 0%, rgba(134, 167, 255, 0.18), transparent 58%),
        linear-gradient(160deg, #070b16, #0b1020 48%, #0f1830 100%);
    --app-border: 1px solid rgba(134, 167, 255, 0.12);

    --panel-surface: rgba(10, 14, 28, 0.62);
    --panel-border: 1px solid rgba(134, 167, 255, 0.14);
    --panel-border-soft: 1px solid rgba(134, 167, 255, 0.12);

    --modal-surface: rgba(12, 18, 40, 0.92);
    --divider-border: 1px solid rgba(134, 167, 255, 0.12);
    --footer-border: 1px solid rgba(134, 167, 255, 0.10);
    --row-divider-border: 1px solid rgba(134, 167, 255, 0.10);

    --accent-surface: linear-gradient(135deg, #4c6fff, #86a7ff);
    --chip-surface: linear-gradient(135deg, rgba(26, 36, 67, 0.9), rgba(15, 24, 48, 0.8));
    --progress-surface: linear-gradient(90deg, #4c6fff, #86a7ff);
    --content-border: 1px solid rgba(134, 167, 255, 0.12);
    --bubble-border: 1px solid rgba(134, 167, 255, 0.12);
    --control-border: 1px solid rgba(134, 167, 255, 0.14);
    --input-border-color: rgba(134, 167, 255, 0.16);
    --input-border-focus-color: rgba(134, 167, 255, 0.55);
    --choice-hover-border: rgba(134, 167, 255, 0.55);
    --typing-cursor-color: rgba(134, 167, 255, 0.9);

    --theme-overlay-1:
        radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.16) 0 1px, transparent 2px 100%),
        radial-gradient(circle at 38% 64%, rgba(255, 255, 255, 0.12) 0 1px, transparent 2px 100%),
        radial-gradient(circle at 78% 28%, rgba(255, 255, 255, 0.14) 0 1px, transparent 2px 100%),
        radial-gradient(circle at 86% 72%, rgba(255, 255, 255, 0.12) 0 1px, transparent 2px 100%);
    --theme-overlay-opacity-1: 0.55;
    --theme-overlay-2: radial-gradient(800px 420px at 50% 110%, rgba(76, 111, 255, 0.14), transparent 60%);
    --theme-overlay-opacity-2: 0.65;
}

:root[data-theme="sakura"],
body[data-theme="sakura"] {
    --pink-100: #fff0f6;
    --pink-200: #ffd0e3;
    --pink-300: #ffb1d4;
    --pink-400: #ff7fba;
    --pink-500: #ff4aa0;
    --peach-200: #ffe6f0;
    --peach-300: #ffc7e1;
    --cream: #fff7fb;
    --cocoa: #6a3d4d;
    --shadow: 0 18px 40px rgba(255, 74, 160, 0.18);

    --text-2: #7b3a55;
    --text-3: #815066;
    --text-muted: #b4567e;
    --text-muted-2: #a84f74;

    --tint-1: rgba(255, 177, 212, 0.35);
    --choice-bg-a: rgba(255, 208, 227, 0.55);
    --choice-bg-b: rgba(255, 230, 240, 0.5);
    --accent-shadow-1: rgba(255, 74, 160, 0.28);
    --accent-shadow-2: rgba(255, 74, 160, 0.38);
    --accent-shadow-3: rgba(255, 74, 160, 0.22);
    --accent-shadow-4: rgba(255, 74, 160, 0.32);
    --focus-ring: rgba(255, 127, 186, 0.22);

    /* Petal bokeh + soft paper */
    --app-bg:
        radial-gradient(1100px 700px at 14% 10%, rgba(255, 177, 212, 0.58), transparent 62%),
        radial-gradient(900px 640px at 92% 0%, rgba(255, 230, 240, 0.72), transparent 58%),
        linear-gradient(160deg, #fff0f6, #fff7fb 45%, #ffe6f0 100%);
    --app-border: 1px solid rgba(255, 74, 160, 0.12);

    --panel-surface: rgba(255, 247, 251, 0.9);
    --panel-border: 2px dotted rgba(255, 127, 186, 0.35);
    --panel-border-soft: 1px dotted rgba(255, 127, 186, 0.28);
    --modal-surface: rgba(255, 247, 251, 0.94);

    --accent-surface: linear-gradient(135deg, #ff7fba, #ff4aa0);
    --chip-surface: linear-gradient(135deg, rgba(255, 208, 227, 0.9), rgba(255, 230, 240, 0.88));
    --progress-surface: linear-gradient(90deg, #ff7fba, #ff4aa0);
    --content-border: 1px solid rgba(255, 127, 186, 0.20);
    --bubble-border: 1px solid rgba(255, 127, 186, 0.18);
    --control-border: 1px solid rgba(255, 127, 186, 0.22);
    --input-border-color: rgba(255, 127, 186, 0.22);
    --input-border-focus-color: rgba(255, 127, 186, 0.65);
    --divider-border: 1px solid rgba(255, 127, 186, 0.18);
    --footer-border: 1px solid rgba(255, 127, 186, 0.16);
    --row-divider-border: 1px solid rgba(255, 127, 186, 0.14);

    --theme-overlay-1:
        radial-gradient(circle at 14% 28%, rgba(255, 255, 255, 0.65) 0 26px, transparent 30px 100%),
        radial-gradient(circle at 52% 14%, rgba(255, 255, 255, 0.55) 0 18px, transparent 22px 100%),
        radial-gradient(circle at 84% 36%, rgba(255, 255, 255, 0.60) 0 22px, transparent 26px 100%),
        radial-gradient(circle at 22% 78%, rgba(255, 255, 255, 0.55) 0 20px, transparent 24px 100%),
        radial-gradient(circle at 76% 82%, rgba(255, 255, 255, 0.55) 0 18px, transparent 22px 100%);
    --theme-overlay-opacity-1: 0.22;
    --theme-overlay-2:
        repeating-linear-gradient(
            90deg,
            rgba(255, 74, 160, 0.06) 0px,
            rgba(255, 74, 160, 0.06) 1px,
            rgba(255, 74, 160, 0) 1px,
            rgba(255, 74, 160, 0) 20px
        );
    --theme-overlay-opacity-2: 0.14;
}

:root[data-theme="forest"],
body[data-theme="forest"] {
    --pink-100: #eaf7ef;
    --pink-200: #cfeedd;
    --pink-300: #a9e0c3;
    --pink-400: #49c08b;
    --pink-500: #1f9b69;
    --peach-200: #e7fff4;
    --peach-300: #c9f6e4;
    --cream: #f3fbf6;
    --cocoa: #2c4536;
    --shadow: 0 18px 40px rgba(31, 155, 105, 0.18);

    --text-2: #2f5140;
    --text-3: #375b49;
    --text-muted: #4b7561;
    --text-muted-2: #406a57;

    --tint-1: rgba(73, 192, 139, 0.22);
    --choice-bg-a: rgba(207, 238, 221, 0.55);
    --choice-bg-b: rgba(231, 255, 244, 0.45);
    --accent-shadow-1: rgba(31, 155, 105, 0.28);
    --accent-shadow-2: rgba(31, 155, 105, 0.38);
    --accent-shadow-3: rgba(31, 155, 105, 0.22);
    --accent-shadow-4: rgba(31, 155, 105, 0.32);
    --focus-ring: rgba(73, 192, 139, 0.22);

    /* Canopy light */
    --app-bg:
        radial-gradient(1200px 760px at 18% 8%, rgba(73, 192, 139, 0.30), transparent 62%),
        radial-gradient(980px 700px at 90% 0%, rgba(201, 246, 228, 0.55), transparent 58%),
        linear-gradient(160deg, #eaf7ef, #f3fbf6 45%, #e7fff4 100%);
    --app-border: 1px solid rgba(31, 155, 105, 0.12);

    --panel-surface: rgba(243, 251, 246, 0.88);
    --panel-border: 1px solid rgba(31, 155, 105, 0.18);
    --panel-border-soft: 1px solid rgba(31, 155, 105, 0.14);
    --modal-surface: rgba(243, 251, 246, 0.92);

    --accent-surface: linear-gradient(135deg, #49c08b, #1f9b69);
    --chip-surface: linear-gradient(135deg, rgba(207, 238, 221, 0.92), rgba(231, 255, 244, 0.86));
    --progress-surface: linear-gradient(90deg, #49c08b, #1f9b69);
    --content-border: 1px solid rgba(31, 155, 105, 0.16);
    --bubble-border: 1px solid rgba(31, 155, 105, 0.14);
    --control-border: 1px solid rgba(31, 155, 105, 0.18);
    --input-border-color: rgba(31, 155, 105, 0.18);
    --input-border-focus-color: rgba(73, 192, 139, 0.7);
    --divider-border: 1px solid rgba(31, 155, 105, 0.14);
    --footer-border: 1px solid rgba(31, 155, 105, 0.14);
    --row-divider-border: 1px solid rgba(31, 155, 105, 0.10);

    --theme-overlay-1:
        radial-gradient(680px 460px at 14% 18%, rgba(0, 0, 0, 0.07), transparent 62%),
        radial-gradient(720px 520px at 86% 30%, rgba(0, 0, 0, 0.06), transparent 62%),
        radial-gradient(900px 560px at 46% 0%, rgba(0, 0, 0, 0.04), transparent 66%);
    --theme-overlay-opacity-1: 0.8;
    --theme-overlay-2:
        repeating-linear-gradient(
            135deg,
            rgba(31, 155, 105, 0.08) 0px,
            rgba(31, 155, 105, 0.08) 1px,
            rgba(31, 155, 105, 0) 1px,
            rgba(31, 155, 105, 0) 18px
        );
    --theme-overlay-opacity-2: 0.14;
}

* {
    box-sizing: border-box;
}

body {
    font-family: "Nunito", "Microsoft YaHei", sans-serif;
    margin: 0;
    padding: 16px;
    min-height: 100vh;
    color: var(--text-1);
    background: var(--app-bg);
    overflow-x: hidden;
    isolation: isolate;
}

/* Theme overlays (only for non-default themes, because default has no data-theme attr) */
body[data-theme]::before,
body[data-theme]::after {
    content: "";
    position: fixed;
    inset: -20vh;
    z-index: 0;
    pointer-events: none;
    transform: translateZ(0);
}

body[data-theme]::before {
    background: var(--theme-overlay-1);
    opacity: var(--theme-overlay-opacity-1);
    filter: blur(0px);
}

body[data-theme]::after {
    background: var(--theme-overlay-2);
    opacity: var(--theme-overlay-opacity-2);
    mix-blend-mode: soft-light;
}

#app {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: var(--app-surface);
    border: var(--app-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    z-index: 1;
}

/* Header */
.app-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.app-header h1 {
    margin: 0 0 8px;
    font-family: "ZCOOL KuaiLe", "STKaiti", cursive;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    color: var(--pink-500);
    letter-spacing: 1px;
}

.subtitle {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--text-muted-2);
}

.streak-display {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: var(--chip-surface);
    border-radius: 20px;
    font-weight: 700;
    color: var(--text-2);
}

.streak-icon {
    font-size: 1.2rem;
}

/* Main Layout */
.app-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

/* Main Content - Story Panel */
.main-content {
    min-width: 0;
}

.story-panel {
    background: var(--panel-surface);
    border-radius: 20px;
    padding: 24px;
    border: var(--panel-border);
}

.story-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.story-meta {
    flex: 1;
}

.story-badge {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-surface);
    color: white;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.story-title {
    margin: 0;
    font-size: 1.4rem;
    color: var(--pink-500);
    line-height: 1.3;
}

.story-thumbnail {
    font-size: 3rem;
    margin-left: 16px;
}

.story-world {
    padding: 12px 16px;
    background: var(--story-world-surface);
    border-radius: 12px;
    border-left: 4px solid var(--story-world-bar);
    margin-bottom: 20px;
    font-size: 0.95rem;
    color: var(--text-3);
    line-height: 1.6;
}

.story-content {
    min-height: 200px;
    padding: 20px;
    background: var(--content-surface);
    border-radius: 16px;
    border: var(--content-border);
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--text-1);
    font-family: "ZhuqueFangsong", "STFangsong", "FangSong", serif;
}

.story-content p {
    margin: 0 0 16px;
    text-indent: 2em;
}

.story-content p:last-child {
    margin-bottom: 0;
}

.story-loading {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

/* Story Choices */
.story-choices {
    padding: 16px;
    background: linear-gradient(135deg, var(--choice-bg-a), var(--choice-bg-b));
    border-radius: 16px;
    margin-bottom: 16px;
}

.story-choices.hidden {
    display: none;
}

.choice-prompt {
    margin: 0 0 12px;
    font-weight: 600;
    color: var(--text-2);
}

.choice-buttons {
    display: grid;
    gap: 10px;
}

.choice-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-2);
    background: var(--glass-strong);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.choice-btn:hover {
    border-color: var(--choice-hover-border);
    transform: translateX(4px);
}

.choice-btn:active {
    transform: translateX(2px);
}

/* Story Actions */
.story-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.story-btn {
    flex: 1;
    border: none;
    border-radius: 16px;
    padding: 14px 20px;
    font-weight: 700;
    color: white;
    background: var(--accent-surface);
    box-shadow: 0 8px 20px var(--accent-shadow-1);
    cursor: pointer;
    transition: all 0.2s ease;
}

.story-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px var(--accent-shadow-2);
}

.story-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.story-btn.secondary {
    background: var(--chip-surface);
    color: var(--text-2);
}

/* Story Progress */
.story-progress {
    display: flex;
    align-items: center;
    gap: 12px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--tint-1);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: var(--progress-surface);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--pink-500);
    min-width: 40px;
}

/* Story History Modal */
.story-history-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 20px;
}

.story-history-modal.hidden {
    display: none;
}

body.modal-open {
    overflow: hidden;
}

.modal-content {
    background: var(--modal-surface);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: var(--divider-border);
}

.modal-header h3 {
    margin: 0;
    color: var(--pink-500);
}

.modal-close {
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.makeup-modal {
    backdrop-filter: blur(8px);
}

.makeup-modal-content {
    max-width: 430px;
    border: var(--panel-border-soft);
    box-shadow: 0 22px 48px rgba(0, 0, 0, 0.18);
}

.makeup-modal-form {
    display: flex;
    flex-direction: column;
}

.makeup-modal-hero {
    width: 76px;
    height: 76px;
    margin: 22px auto 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--chip-surface);
    box-shadow: 0 10px 24px var(--accent-shadow-3);
}

.makeup-modal-header {
    border-bottom: none;
    padding-bottom: 8px;
}

.makeup-modal-heading {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.makeup-modal-kicker {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.makeup-modal-body {
    padding-top: 0;
}

.makeup-modal-date {
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--glass-soft);
    color: var(--text-2);
    font-size: 0.92rem;
}

.makeup-modal-note {
    margin: 0 0 14px;
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.88rem;
}

.makeup-input-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.88rem;
}

.makeup-input {
    width: 100%;
    border: var(--panel-border-soft);
    border-radius: 14px;
    padding: 13px 14px;
    background: var(--glass-strong);
    color: var(--text-2);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.makeup-input:focus {
    border-color: var(--choice-hover-border);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.makeup-input[aria-invalid="true"] {
    border-color: #e56b7a;
}

.makeup-input::placeholder {
    color: var(--text-muted);
}

.makeup-modal-hint {
    margin: 10px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    min-height: 1.4em;
}

.makeup-modal-hint.is-error {
    color: #d94b63;
}

.makeup-modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

.makeup-btn {
    margin: 0;
}

.empty-history {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
}

.history-item {
    padding: 12px;
    background: var(--cream);
    border-radius: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.history-item:hover {
    transform: translateX(4px);
}

/* Sidebar */
.sidebar {
    position: relative;
}

.sidebar-toggle {
    display: none;
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 12px;
    background: var(--chip-surface);
    color: var(--text-2);
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 12px;
}

.toggle-icon {
    margin-right: 8px;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-panel {
    background: var(--panel-surface);
    border-radius: 16px;
    padding: 16px;
    border: var(--panel-border-soft);
}

.sidebar-title {
    margin: 0 0 12px;
    font-size: 1rem;
    color: var(--pink-500);
}

/* Affection Panel */
.affection-meter {
    display: flex;
    align-items: center;
    gap: 12px;
}

.affection-track {
    flex: 1;
    height: 12px;
    background: var(--tint-1);
    border-radius: 6px;
    overflow: hidden;
}

.affection-fill {
    height: 100%;
    width: 0%;
    background: var(--progress-surface);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.affection-value {
    font-weight: 700;
    color: var(--pink-500);
    min-width: 45px;
    text-align: right;
}

/* Anniversary Panel */
.anniversary-info p {
    margin: 0 0 6px;
    font-size: 0.95rem;
    color: var(--text-3);
}

.anniversary-info .highlight {
    font-weight: 700;
    color: var(--pink-500);
    font-size: 1.1rem;
}

.countdown-text {
    font-size: 0.85rem !important;
    color: var(--text-muted) !important;
}

/* Check-in Calendar Panel */
.checkin-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.calendar-nav-btn {
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-2);
    background: var(--chip-surface);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.calendar-nav-btn:hover {
    transform: translateY(-1px);
}

.calendar-month {
    font-weight: 700;
    color: var(--pink-500);
    font-size: 0.95rem;
}

.checkin-calendar-weekdays,
.checkin-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
}

.checkin-calendar-weekdays {
    margin-bottom: 6px;
}

.checkin-calendar-weekdays span {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 700;
}

.calendar-day {
    border: var(--control-border);
    background: var(--glass-soft);
    border-radius: 10px;
    min-height: 46px;
    padding: 5px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-family: inherit;
}

.calendar-day.empty {
    border: none;
    background: transparent;
}

.calendar-day.signed {
    border-color: var(--border-success);
    background: rgba(144, 238, 144, 0.14);
}

.calendar-day.unsigned {
    color: var(--text-3);
}

.calendar-day.today {
    box-shadow: inset 0 0 0 2px var(--pink-400);
}

.calendar-day.can-makeup {
    cursor: pointer;
}

.calendar-day.can-makeup:hover {
    border-color: var(--choice-hover-border);
    transform: translateY(-1px);
}

.calendar-day:disabled {
    cursor: default;
    opacity: 0.8;
}

.day-number {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-2);
    line-height: 1;
}

.day-status {
    font-size: 0.62rem;
    color: var(--text-muted);
    line-height: 1;
}

.calendar-day.signed .day-status {
    color: var(--success);
}

.checkin-calendar-tip {
    margin: 10px 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.45;
}

/* Check-in Panel */
.checkin-tip {
    margin: 0 0 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.checkin-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkin-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--glass-soft);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.checkin-item.completed {
    border-color: var(--border-success);
    background: rgba(144, 238, 144, 0.1);
}

.checkin-icon {
    font-size: 1.3rem;
}

.checkin-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.checkin-name {
    font-weight: 600;
    color: var(--text-2);
    font-size: 0.9rem;
}

.checkin-status {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.checkin-status.done {
    color: var(--success);
}

.checkin-btn {
    border: none;
    border-radius: 10px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
    background: var(--chip-surface);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkin-btn:hover:not(:disabled) {
    transform: scale(1.05);
}

.checkin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.checkin-progress {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    padding-top: 12px;
    border-top: var(--divider-border);
    font-size: 0.9rem;
    color: var(--text-3);
}

#checkin-progress {
    font-weight: 700;
    color: var(--pink-500);
}

/* Feedback Panel */
.feedback-bubble {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--content-surface);
    border-radius: 16px;
    border: var(--bubble-border);
}

.feedback-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-image: url("assets/yeye.jpg");
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    font-size: 0;
    overflow: hidden;
}

.feedback-text {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-3);
    line-height: 1.5;
}

/* Details Panels */
.card-details, .fortune-details, .tarot-details, .audio-details, .manual-details {
    border: var(--panel-border-soft);
}

.card-summary, .fortune-summary, .tarot-summary, .audio-summary, .manual-summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--pink-500);
    padding: 4px 0;
    list-style: none;
}

.card-summary::-webkit-details-marker,
.fortune-summary::-webkit-details-marker,
.tarot-summary::-webkit-details-marker,
.audio-summary::-webkit-details-marker,
.manual-summary::-webkit-details-marker {
    display: none;
}

.card-summary::before,
.fortune-summary::before,
.tarot-summary::before,
.audio-summary::before,
.manual-summary::before {
    content: "▶ ";
    font-size: 0.8rem;
}

details[open] .card-summary::before,
details[open] .fortune-summary::before,
details[open] .tarot-summary::before,
details[open] .audio-summary::before,
details[open] .manual-summary::before {
    content: "▼ ";
}

.card-content, .fortune-content, .tarot-content, .audio-content, .manual-content {
    margin-top: 12px;
}

.manual-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#yeye-manual-textarea {
    width: 100%;
    min-height: 200px;
    resize: vertical;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--input-border-color);
    background: var(--glass-soft);
    color: var(--text-2);
    font-family: inherit;
    font-size: 0.92rem;
    line-height: 1.7;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

#yeye-manual-textarea:focus {
    outline: none;
    border-color: var(--input-border-focus-color);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6), 0 0 0 3px var(--focus-ring);
}

#yeye-manual-textarea::placeholder {
    color: var(--text-muted);
}

.primary-btn {
    align-self: flex-start;
    border: none;
    border-radius: 12px;
    padding: 10px 18px;
    font-weight: 700;
    color: white;
    background: var(--accent-surface);
    box-shadow: 0 6px 16px var(--accent-shadow-3);
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px var(--accent-shadow-4);
}

.primary-btn:active {
    transform: translateY(0);
}

.card-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: var(--row-divider-border);
}

.card-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.card-value {
    font-weight: 600;
    color: var(--text-2);
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.card-tag {
    padding: 4px 10px;
    background: var(--pink-200);
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
}

.card-tag.drink {
    background: var(--peach-200);
}

/* Fortune Panel */
.fortune-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.fortune-label {
    color: var(--text-3);
    font-size: 0.9rem;
}

.fortune-badge {
    padding: 4px 10px;
    background: var(--chip-surface);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-2);
}

.fortune-couple {
    margin: 10px 0 0;
    padding: 10px;
    background: var(--glass-faint);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-3);
    text-align: center;
}

/* Audio Panel */
.audio-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.audio-row span {
    color: var(--text-3);
}

.audio-toggle {
    border: none;
    border-radius: 10px;
    padding: 6px 14px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--glass-mid);
    border: var(--control-border);
    cursor: pointer;
}

.audio-toggle.is-on {
    background: var(--chip-surface);
    border-color: var(--choice-hover-border);
}

/* Easter Egg */
.easter-egg {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 200;
}

.easter-egg.is-active {
    opacity: 1;
    visibility: visible;
}

.easter-card {
    padding: 24px 32px;
    background: linear-gradient(135deg, var(--pink-200), var(--cream));
    border-radius: 20px;
    text-align: center;
    animation: easter-pop 0.6s ease;
}

.easter-title {
    font-family: "ZCOOL KuaiLe", cursive;
    font-size: 1.5rem;
    color: var(--pink-500);
    margin-bottom: 10px;
}

.easter-emoji {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.easter-text {
    margin: 0;
    color: var(--text-2);
    font-weight: 600;
}

/* Footer */
.app-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: var(--footer-border);
    color: var(--text-muted);
}

/* Theme Panel */
.theme-details {
    border: var(--panel-border-soft);
}

.theme-summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--pink-500);
    padding: 4px 0;
    list-style: none;
}

.theme-summary::-webkit-details-marker {
    display: none;
}

.theme-summary::before {
    content: "▶ ";
    font-size: 0.8rem;
}

details[open] .theme-summary::before {
    content: "▼ ";
}

.theme-content {
    margin-top: 12px;
}

.theme-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.theme-row span {
    color: var(--text-3);
}

.theme-select {
    border: none;
    border-radius: 10px;
    padding: 6px 14px;
    font-weight: 600;
    color: var(--text-2);
    background: var(--glass-mid);
    border: var(--control-border);
    cursor: pointer;
    font-family: inherit;
}

.theme-select:focus {
    outline: none;
    border-color: var(--pink-400);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* ===== Yeye Mode (Samoyed background) ===== */

/* Toggle button – sits in the top-right corner of the header */
.yeye-mode-toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: var(--control-border);
    border-radius: 20px;
    background: var(--glass-mid);
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    z-index: 10;
    font-family: inherit;
}

.yeye-mode-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-shadow-3);
}

.yeye-mode-toggle.is-active {
    background: var(--chip-surface);
    border-color: var(--choice-hover-border);
    box-shadow: 0 4px 14px var(--accent-shadow-1);
}

.yeye-mode-toggle .yeye-mode-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/*
 * Yeye-mode overlay – uses a dedicated ::before on a wrapper to avoid
 * conflicting with theme overlays on body::before / body::after.
 * The overlay element is injected by JS as #yeye-mode-overlay.
 */
#yeye-mode-overlay {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    /* Samoyed paw print pattern – repeating SVG data-URI tile */
    background-image:
        /* Paw print */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23c4a882' opacity='0.18'%3E%3Cellipse cx='30' cy='38' rx='8' ry='9'/%3E%3Cellipse cx='19' cy='26' rx='5' ry='6'/%3E%3Cellipse cx='41' cy='26' rx='5' ry='6'/%3E%3Cellipse cx='14' cy='35' rx='4' ry='5'/%3E%3Cellipse cx='46' cy='35' rx='4' ry='5'/%3E%3C/g%3E%3C/svg%3E"),
        /* Bone */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23c4a882' opacity='0.12' transform='translate(40 40) rotate(30) translate(-20 -6)'%3E%3Crect x='8' y='3' width='24' height='6' rx='3'/%3E%3Ccircle cx='8' cy='3' r='5'/%3E%3Ccircle cx='8' cy='9' r='5'/%3E%3Ccircle cx='32' cy='3' r='5'/%3E%3Ccircle cx='32' cy='9' r='5'/%3E%3C/g%3E%3C/svg%3E"),
        /* Small paw (offset) */
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23d4b896' opacity='0.10' transform='translate(65 15) scale(0.7)'%3E%3Cellipse cx='15' cy='22' rx='6' ry='7'/%3E%3Cellipse cx='7' cy='12' rx='4' ry='5'/%3E%3Cellipse cx='23' cy='12' rx='4' ry='5'/%3E%3Cellipse cx='3' cy='20' rx='3' ry='4'/%3E%3Cellipse cx='27' cy='20' rx='3' ry='4'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px, 160px 160px, 200px 200px;
    background-position: 0 0, 60px 40px, 30px 80px;
}

/* Night theme: lighter paw prints so they show on dark backgrounds */
body[data-theme="night"] #yeye-mode-overlay {
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 60 60'%3E%3Cg fill='%23a8c4ff' opacity='0.10'%3E%3Cellipse cx='30' cy='38' rx='8' ry='9'/%3E%3Cellipse cx='19' cy='26' rx='5' ry='6'/%3E%3Cellipse cx='41' cy='26' rx='5' ry='6'/%3E%3Cellipse cx='14' cy='35' rx='4' ry='5'/%3E%3Cellipse cx='46' cy='35' rx='4' ry='5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='%23a8c4ff' opacity='0.07' transform='translate(40 40) rotate(30) translate(-20 -6)'%3E%3Crect x='8' y='3' width='24' height='6' rx='3'/%3E%3Ccircle cx='8' cy='3' r='5'/%3E%3Ccircle cx='8' cy='9' r='5'/%3E%3Ccircle cx='32' cy='3' r='5'/%3E%3Ccircle cx='32' cy='9' r='5'/%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cg fill='%23c0d4ff' opacity='0.06' transform='translate(65 15) scale(0.7)'%3E%3Cellipse cx='15' cy='22' rx='6' ry='7'/%3E%3Cellipse cx='7' cy='12' rx='4' ry='5'/%3E%3Cellipse cx='23' cy='12' rx='4' ry='5'/%3E%3Cellipse cx='3' cy='20' rx='3' ry='4'/%3E%3Cellipse cx='27' cy='20' rx='3' ry='4'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px, 160px 160px, 200px 200px;
    background-position: 0 0, 60px 40px, 30px 80px;
}

/* Gentle float animation for the overlay when active */
@keyframes yeye-bg-drift {
    0%   { background-position: 0 0, 60px 40px, 30px 80px; }
    50%  { background-position: 10px 8px, 50px 48px, 40px 72px; }
    100% { background-position: 0 0, 60px 40px, 30px 80px; }
}

body.yeye-mode-on #yeye-mode-overlay {
    opacity: 1;
    animation: yeye-bg-drift 20s ease-in-out infinite;
}

@keyframes yeye-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-6px) rotate(-4deg); }
}

@keyframes yeye-toggle-wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(8deg); }
    75% { transform: rotate(-6deg); }
}

@keyframes yeye-avatar-bop {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-4px) scale(1.03); }
}

@keyframes yeye-tag-drift {
    0%, 100% { transform: translateX(0); opacity: 0.42; }
    50% { transform: translateX(8px); opacity: 0.72; }
}

body.yeye-mode-on #app {
    background:
        linear-gradient(180deg, rgba(255, 252, 248, 0.96), rgba(255, 246, 236, 0.94)),
        var(--app-surface);
    box-shadow: 0 26px 80px rgba(196, 142, 92, 0.22);
}

body.yeye-mode-on #app::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 255, 255, 0.76), transparent 22%),
        radial-gradient(circle at 88% 16%, rgba(255, 216, 177, 0.32), transparent 20%),
        linear-gradient(135deg, rgba(255, 244, 230, 0.48), rgba(255, 255, 255, 0));
}

body.yeye-mode-on #app::after {
    content: "耶耶耶耶";
    position: absolute;
    left: 24px;
    top: 18px;
    z-index: 0;
    pointer-events: none;
    font-family: "ZCOOL KuaiLe", "STKaiti", cursive;
    font-size: clamp(2.2rem, 6vw, 4rem);
    letter-spacing: 0.18em;
    color: rgba(255, 255, 255, 0.24);
    transform: rotate(-8deg);
}

body.yeye-mode-on #app > * {
    position: relative;
    z-index: 1;
}

body.yeye-mode-on .app-header {
    padding: 18px 20px 14px;
    margin-bottom: 20px;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(255, 250, 246, 0.84), rgba(255, 236, 214, 0.68));
    border: 1px solid rgba(212, 165, 122, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
    overflow: hidden;
}

body.yeye-mode-on .app-header::before {
    content: "☁️  🐾  ☁️";
    position: absolute;
    left: 18px;
    top: 10px;
    pointer-events: none;
    font-size: 0.95rem;
    opacity: 0.46;
    animation: yeye-tag-drift 6s ease-in-out infinite;
}

body.yeye-mode-on .subtitle {
    font-size: 1.03rem;
    color: var(--text-2);
    letter-spacing: 0.02em;
}

body.yeye-mode-on .yeye-mode-toggle.is-active {
    transform: translateY(-1px) scale(1.01);
}

body.yeye-mode-on .yeye-mode-toggle.is-active .yeye-mode-icon {
    animation: yeye-toggle-wiggle 1.2s ease-in-out infinite;
}

body.yeye-mode-on .story-panel,
body.yeye-mode-on .sidebar-panel,
body.yeye-mode-on .feedback-bubble,
body.yeye-mode-on .story-choices,
body.yeye-mode-on .makeup-modal-content {
    position: relative;
    overflow: hidden;
    border-color: rgba(212, 165, 122, 0.22);
    box-shadow: 0 16px 32px rgba(196, 142, 92, 0.12);
}

body.yeye-mode-on .story-panel,
body.yeye-mode-on .sidebar-panel,
body.yeye-mode-on .story-choices {
    background-image:
        radial-gradient(circle at 100% 0, rgba(255, 224, 189, 0.2), transparent 28%),
        linear-gradient(135deg, rgba(255, 252, 248, 0.92), rgba(255, 245, 235, 0.7));
}

body.yeye-mode-on .story-panel::after,
body.yeye-mode-on .sidebar-panel::after,
body.yeye-mode-on .story-choices::after {
    content: "🐾";
    position: absolute;
    right: 14px;
    top: 12px;
    pointer-events: none;
    font-size: 1.1rem;
    opacity: 0.12;
    transform: rotate(-14deg);
}

body.yeye-mode-on .story-thumbnail {
    animation: yeye-float 4.2s ease-in-out infinite;
    filter: drop-shadow(0 10px 18px rgba(196, 142, 92, 0.2));
}

body.yeye-mode-on .feedback-avatar {
    width: 56px;
    height: 56px;
    border: 3px solid rgba(255, 255, 255, 0.72);
    box-shadow: 0 12px 22px rgba(196, 142, 92, 0.2);
    animation: yeye-avatar-bop 3.4s ease-in-out infinite;
}

body.yeye-mode-on .feedback-text {
    color: var(--text-2);
    font-size: 1rem;
}

body.yeye-mode-on .checkin-item {
    position: relative;
    overflow: hidden;
    padding: 12px 14px;
    border-color: rgba(212, 165, 122, 0.2);
    background:
        linear-gradient(135deg, rgba(255, 252, 247, 0.98), rgba(255, 242, 227, 0.78)),
        var(--glass-soft);
    box-shadow: 0 8px 18px rgba(196, 142, 92, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

body.yeye-mode-on .checkin-item::after {
    content: "🐶";
    position: absolute;
    right: 10px;
    top: -5px;
    pointer-events: none;
    font-size: 1.25rem;
    opacity: 0.12;
    transform: rotate(8deg);
}

body.yeye-mode-on .checkin-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 24px rgba(196, 142, 92, 0.12);
}

body.yeye-mode-on .checkin-item.completed {
    background:
        linear-gradient(135deg, rgba(255, 247, 232, 0.98), rgba(231, 255, 239, 0.7));
}

body.yeye-mode-on .checkin-btn,
body.yeye-mode-on .story-btn,
body.yeye-mode-on .primary-btn,
body.yeye-mode-on .calendar-nav-btn {
    box-shadow: 0 10px 24px rgba(196, 142, 92, 0.16);
}

body.yeye-mode-on .checkin-btn:hover:not(:disabled),
body.yeye-mode-on .story-btn:hover:not(:disabled),
body.yeye-mode-on .primary-btn:hover,
body.yeye-mode-on .calendar-nav-btn:hover {
    transform: translateY(-2px) rotate(-1deg);
}

body.yeye-mode-on .tarot-reading,
body.yeye-mode-on .fortune-couple,
body.yeye-mode-on .makeup-modal-date {
    background:
        linear-gradient(135deg, rgba(255, 248, 239, 0.98), rgba(255, 236, 214, 0.76));
    border: 1px dashed rgba(212, 165, 122, 0.32);
}

body.yeye-mode-on .manual-summary,
body.yeye-mode-on .fortune-summary,
body.yeye-mode-on .tarot-summary,
body.yeye-mode-on .audio-summary,
body.yeye-mode-on .theme-summary,
body.yeye-mode-on .card-summary,
body.yeye-mode-on .sidebar-title {
    letter-spacing: 0.02em;
}

/* Animations */
@keyframes easter-pop {
    0% { transform: scale(0.8); opacity: 0; }
    60% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

/* Typing animation for story text */
.typing-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: var(--typing-cursor-color);
    margin-left: 2px;
    animation: blink 0.7s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 900px) {
    .app-layout {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .sidebar-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .sidebar-content {
        display: none;
    }

    .sidebar-content.is-open {
        display: flex;
    }

    .story-panel {
        padding: 16px;
    }

    .sidebar {
        align-self: start;
    }
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    #app {
        padding: 14px;
        border-radius: 18px;
    }

    .app-header h1 {
        font-size: 1.6rem;
    }

    .yeye-mode-toggle {
        position: relative;
        margin: 0 auto 8px;
        font-size: 0.8rem;
        padding: 5px 12px;
    }

    body.yeye-mode-on .app-header {
        padding: 14px 12px 12px;
    }

    .story-header {
        flex-direction: column;
        gap: 12px;
    }

    .story-thumbnail {
        margin-left: 0;
        align-self: flex-end;
    }

    .story-actions {
        flex-direction: column;
    }

    .checkin-item {
        padding: 8px 10px;
    }

    .checkin-name {
        font-size: 0.85rem;
    }

    .calendar-day {
        min-height: 42px;
    }

    .day-status {
        font-size: 0.58rem;
    }

    .makeup-modal {
        align-items: flex-start;
        overflow-y: auto;
        padding-top: max(18px, env(safe-area-inset-top));
        padding-bottom: 18px;
    }

    .makeup-modal-content {
        margin: 0 auto;
        max-height: none;
    }

    .makeup-modal-actions {
        flex-direction: column;
    }
}

/* Hidden utility */
.hidden {
    display: none !important;
}

/* ============================================
   Tarot Panel
   ============================================ */
.tarot-hint {
    font-size: 0.9rem;
    color: var(--text-3);
    margin-bottom: 10px;
}

.tarot-question {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-1, #ddd);
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 10px;
    background: var(--glass-faint, #fff);
    color: var(--text-1, #333);
}

.tarot-draw-btn {
    width: 100%;
}

.tarot-result {
    margin-top: 16px;
}

.tarot-cards-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.tarot-card {
    width: 100px;
    text-align: center;
    transition: transform 0.3s;
}

.tarot-card img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.tarot-card.tarot-reversed img {
    transform: rotate(180deg);
}

.tarot-card-name {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 6px;
    color: var(--text-1);
}

.tarot-card-pos {
    font-size: 0.75rem;
    color: var(--text-3);
}

.tarot-reading {
    padding: 12px;
    background: var(--glass-faint, #fafafa);
    border-radius: 10px;
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* ============================================
   Chat Widget
   ============================================ */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: inherit;
}

.chat-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--pink-400, #f472b6);
    background: white;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(236, 72, 153, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chat-fab img {
    width: 56px;
    height: 56px;
    max-width: 56px;
    max-height: 56px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.chat-panel {
    display: none;
    flex-direction: column;
    width: 360px;
    height: 500px;
    background: var(--card-surface, #fff);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    overflow: hidden;
    position: absolute;
    bottom: 0;
    right: 0;
    transition: width 0.3s, height 0.3s;
}

.chat-panel.is-open {
    display: flex;
}

.chat-panel.is-expanded {
    width: min(90vw, 700px);
    height: min(85vh, 800px);
    position: fixed;
    bottom: 20px;
    right: 20px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--pink-400, #f472b6), var(--pink-500, #ec4899));
    color: white;
    flex-shrink: 0;
}

.chat-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.chat-header-btns {
    display: flex;
    gap: 8px;
}

.chat-header-btns button {
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.chat-header-btns button:hover {
    opacity: 1;
    background: rgba(255,255,255,0.15);
}

.chat-messages {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--glass-faint, #fafafa);
}

.chat-welcome {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-3, #999);
}

.chat-welcome-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 12px;
}

.chat-welcome p {
    font-size: 0.9rem;
}

.chat-msg {
    display: flex;
    gap: 8px;
    max-width: 85%;
    animation: chatFadeIn 0.2s ease-out;
}

.chat-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-msg-assistant {
    align-self: flex-start;
}

.chat-msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.chat-msg-avatar-spacer {
    width: 32px;
    flex-shrink: 0;
}

.chat-msg-bubble {
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
}

.chat-msg-user p,
.chat-msg-user .chat-msg-bubble {
    background: linear-gradient(135deg, var(--pink-400, #f472b6), var(--pink-500, #ec4899));
    color: white;
    border-radius: 14px 14px 4px 14px;
    padding: 10px 14px;
}

.chat-msg-assistant .chat-msg-bubble {
    background: var(--card-surface, #fff);
    color: var(--text-1, #333);
    border: 1px solid var(--border-1, #eee);
    border-radius: 14px 14px 14px 4px;
}

.chat-msg-img {
    max-width: 200px;
    max-height: 200px;
    border-radius: 12px;
    object-fit: cover;
}

.chat-typing .chat-msg-bubble {
    color: var(--text-3, #999);
    font-style: italic;
}

.chat-input-area {
    padding: 12px;
    border-top: 1px solid var(--border-1, #eee);
    background: var(--card-surface, #fff);
    flex-shrink: 0;
}

.chat-attach-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    padding: 6px;
    background: var(--glass-faint, #f5f5f5);
    border-radius: 8px;
}

.chat-preview-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.chat-remove-img {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-3);
}

.chat-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-attach-btn {
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.chat-attach-btn:hover {
    opacity: 1;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-1, #ddd);
    border-radius: 20px;
    font-size: 0.9rem;
    outline: none;
    background: var(--glass-faint, #f9f9f9);
    color: var(--text-1, #333);
    transition: border-color 0.2s;
}

.chat-input:focus {
    border-color: var(--pink-400, #f472b6);
}

.chat-send-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--pink-400, #f472b6), var(--pink-500, #ec4899));
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
    white-space: nowrap;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

/* Mobile chat — keep a smaller fixed panel with viewport padding */
@media (max-width: 768px) {
    .chat-widget.is-chat-open .chat-panel.is-open,
    .chat-widget.is-chat-open .chat-panel.is-expanded {
        position: fixed;
        top: auto;
        left: auto;
        right: 12px;
        bottom: max(12px, env(safe-area-inset-bottom, 0px));
        width: min(360px, calc(100vw - 24px));
        height: min(560px, calc(100vh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
        height: min(560px, calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
        max-width: calc(100vw - 24px);
        max-height: calc(100vh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
        margin: 0;
        border: 1px solid var(--border-1, #eee);
        border-radius: 20px;
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
        transition: none;
    }

    .chat-expand-btn {
        display: none;
    }

    .chat-attach-btn {
        display: block !important;
    }

    .chat-input {
        font-size: 16px;
    }
}

/* ============================================
   Chat tool renders — tarot & blackjack
   ============================================ */
.chat-msg-tool {
    align-self: center;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    animation: chatFadeIn 0.2s ease-out;
}

/* Tarot in chat */
.chat-tarot-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    width: min(100%, 280px);
    margin: 0 auto;
    padding: 10px;
    background: var(--glass-faint, #f5f5f5);
    border-radius: 12px;
}

.chat-tarot-card {
    text-align: center;
    min-width: 0;
}

.chat-tarot-card img {
    width: 100%;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.chat-tarot-card.tarot-reversed img {
    transform: rotate(180deg);
}

.chat-tarot-card span {
    display: block;
    font-size: 0.7rem;
    margin-top: 4px;
    color: var(--text-2, #666);
    overflow-wrap: anywhere;
}

/* Blackjack in chat */
.chat-blackjack {
    background: var(--card-surface, #fff);
    border: 1px solid var(--border-1, #eee);
    border-radius: 12px;
    padding: 14px;
    min-width: 240px;
}

.bj-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.bj-label {
    font-size: 0.8rem;
    color: var(--text-3, #999);
    min-width: 70px;
}

.bj-cards {
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.bj-score {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2, #666);
    margin-left: auto;
}

.bj-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.bj-btn {
    flex: 1;
    padding: 8px 0;
    border: 1px solid var(--pink-400, #f472b6);
    border-radius: 8px;
    background: white;
    color: var(--pink-500, #ec4899);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.bj-btn:hover {
    background: var(--pink-400, #f472b6);
    color: white;
}

/* Feed result */
.chat-feed-result {
    background: var(--card-surface, #fff);
    border: 1px solid var(--border-1, #eee);
    border-radius: 12px;
    padding: 12px 16px;
    text-align: center;
}

.feed-score {
    font-size: 1rem;
    margin-bottom: 4px;
}

.feed-reward {
    font-size: 0.85rem;
    color: var(--pink-500, #ec4899);
    font-weight: 600;
}

/* Tarot prompt modal */
.chat-tarot-modal {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 248, 252, 0.72);
    backdrop-filter: blur(8px);
}

.chat-tarot-prompt {
    width: min(100%, 320px);
    padding: 16px;
    background: var(--card-surface, #fff);
    border: 1px solid var(--border-1, #eee);
    border-radius: 16px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
}

.tarot-prompt-label {
    font-size: 0.82rem;
    color: var(--text-2, #666);
    margin: 0 0 10px;
    line-height: 1.5;
}

.tarot-prompt-actions {
    display: flex;
    justify-content: flex-start;
    gap: 8px;
}

.tarot-prompt-input {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-1, #ddd);
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    background: var(--card-surface, #fff);
    color: var(--text-1, #333);
}

.tarot-prompt-input:focus {
    border-color: var(--pink-400, #f472b6);
}

.tarot-prompt-go {
    min-width: 72px;
    white-space: nowrap;
}

.tarot-prompt-cancel {
    border: 1px solid var(--border-1, #ddd);
    border-radius: 12px;
    background: var(--glass-faint, #f5f5f5);
    color: var(--text-2, #666);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
}

/* Quick actions bar */
.chat-quick-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 4px;
}

.chat-quick-btn {
    padding: 4px 10px;
    border: 1px solid var(--pink-400, #f472b6);
    border-radius: 14px;
    background: white;
    color: var(--pink-500, #ec4899);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.chat-quick-btn:hover {
    background: var(--pink-400, #f472b6);
    color: white;
}

.chat-dogfood {
    font-size: 0.78rem;
    color: var(--text-3, #999);
    margin-left: auto;
}

.bj-result {
    text-align: center;
    margin-top: 10px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--pink-400, #f472b6), var(--pink-500, #ec4899));
    color: white;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================================
   耶耶的小窝（电子宠物）
   ============================================================ */
.pet-details {
    padding: 0;
}
.pet-summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--text-1);
    padding: 14px 16px;
    list-style: none;
}
.pet-summary::-webkit-details-marker { display: none; }
.pet-content {
    padding: 0 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 舞台 */
.pet-stage {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--glass-soft);
    border: var(--panel-border-soft);
    border-radius: 16px;
    cursor: pointer;
    user-select: none;
}
.pet-stage::after {
    content: attr(data-emote);
    position: absolute;
    top: 6px;
    right: 10px;
    font-size: 0.9rem;
}
.pet-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--pink-300);
    flex-shrink: 0;
}
.pet-bubble {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-2);
    background: var(--glass-strong);
    border: var(--bubble-border);
    border-radius: 12px;
    padding: 8px 10px;
    line-height: 1.5;
}

/* 状态动画 */
@keyframes pet-wag {
    0%, 100% { transform: rotate(-3deg); }
    50% { transform: rotate(3deg); }
}
@keyframes pet-breathe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.04); }
}
@keyframes pet-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes pet-shiver {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-1.5px); }
    75% { transform: translateX(1.5px); }
}
@keyframes pet-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.pet-anim-happy { animation: pet-wag 1.6s ease-in-out infinite; }
.pet-anim-beaming { animation: pet-bounce 0.9s ease-in-out infinite; }
.pet-anim-sleeping, .pet-anim-nap { animation: pet-breathe 3.2s ease-in-out infinite; filter: brightness(0.92); }
.pet-anim-hungry { animation: pet-shiver 1.2s ease-in-out infinite; }
.pet-anim-missing { filter: saturate(0.85); }
.pet-anim-idle { animation: pet-breathe 4.5s ease-in-out infinite; }
.pet-anim-rare { animation: pet-spin 0.8s ease-in-out 1 !important; }

/* 互动反馈 */
.pet-reaction {
    font-size: 0.82rem;
    color: var(--text-muted-2);
    line-height: 1.5;
    min-height: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 0 4px;
}
.pet-reaction.is-visible {
    max-height: 80px;
    opacity: 1;
    padding: 2px 4px;
}

/* 状态条（定性文案，不显示裸数字） */
.pet-bars { display: flex; flex-direction: column; gap: 6px; }
.pet-bar-row { display: flex; align-items: center; gap: 8px; }
.pet-bar-icon { font-size: 0.85rem; }
.pet-bar-track {
    flex: 1;
    height: 8px;
    background: var(--tint-1);
    border-radius: 999px;
    overflow: hidden;
}
.pet-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--progress-surface);
    transition: width 0.6s ease;
}
.pet-bar-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 74px;
    text-align: right;
}

.pet-bond-line {
    font-size: 0.8rem;
    color: var(--text-3);
    text-align: center;
    margin: 0;
}

/* 按钮行 */
.pet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pet-action-btn {
    flex: 1;
    min-width: 72px;
    padding: 8px 10px;
    border: var(--control-border);
    border-radius: 999px;
    background: var(--glass-strong);
    color: var(--text-2);
    font-size: 0.82rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pet-action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--accent-shadow-3);
}
.pet-action-btn:disabled { opacity: 0.5; cursor: default; }

/* 日记本 */
.pet-diary-toggle, .pet-push-btn {
    padding: 8px 10px;
    border: var(--control-border);
    border-radius: 12px;
    background: var(--glass-faint);
    color: var(--text-2);
    font-size: 0.82rem;
    cursor: pointer;
}
.pet-push-btn { background: var(--chip-surface); font-weight: 600; }
.pet-push-btn:disabled { opacity: 0.7; cursor: default; }
.pet-diary-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 260px;
    overflow-y: auto;
}
.pet-diary-entry {
    background: var(--glass-soft);
    border: var(--panel-border-soft);
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.6;
}
.pet-diary-entry.is-new { border: 1px dashed var(--pink-400); }
.pet-diary-entry p { margin: 4px 0 0; white-space: pre-wrap; }
.pet-diary-meta { font-size: 0.72rem; color: var(--text-muted); }
.pet-diary-empty { font-size: 0.8rem; color: var(--text-muted); text-align: center; margin: 4px 0; }

/* 初见仪式 */
.pet-onboard {
    background: var(--chip-surface);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
}
.pet-onboard-text {
    font-size: 0.88rem;
    color: var(--text-1);
    line-height: 1.7;
    white-space: pre-line;
    margin: 0 0 12px;
}

/* FAB 红点 */
.chat-fab.has-pet-dot::after {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff4d6d;
    border: 2px solid #fff;
}

/* 聊天 header 状态行 */
.pet-chat-sub {
    font-size: 0.7rem;
    opacity: 0.85;
    margin-left: 8px;
}

/* 日记本按钮未读小红点 */
.pet-diary-toggle { position: relative; }
.pet-diary-toggle.has-dot::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d6d;
    box-shadow: 0 0 0 2px var(--glass-strong);
}
