﻿/* 全局样式覆盖 - 使用本地字体 */
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
            overflow: hidden;
            background: #fff4f9;
            color: white;
        }

        .app-screen {
            height: 100vh;
            height: 100dvh;
            min-height: 100svh;
        }

        .pb-safe {
            padding-bottom: env(safe-area-inset-bottom, 0px);
        }

        .glass {
            background: rgba(255, 255, 255, 0.1);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
        }

        #page-auth {
            background:
                linear-gradient(150deg, #fff7ec 0%, #ffddea 34%, #e9ddff 66%, #dff5ff 100%);
        }

        .login-card {
            overflow: hidden;
            isolation: isolate;
            background: rgba(16, 16, 18, 0.28);
            border: 1px solid rgba(255, 255, 255, 0.22);
            box-shadow:
                0 18px 44px rgba(92, 59, 76, 0.24),
                inset 0 1px 0 rgba(255, 255, 255, 0.12);
        }

        .login-card::before {
            content: "";
            position: absolute;
            inset: 0;
            z-index: -2;
            background: url("./assets/background/login.jpg") center / cover no-repeat;
            opacity: 0.68;
            transform: scale(1.03);
        }

        .login-card::after {
            content: "";
            position: absolute;
            inset: 0;
            z-index: -1;
            background:
                radial-gradient(circle at 50% 16%, rgba(255, 182, 215, 0.12), transparent 34%),
                linear-gradient(180deg, rgba(10, 10, 12, 0.08), rgba(10, 10, 12, 0.38));
        }

        /* 输入框样式 */
        .input-field {
            background: rgba(0, 0, 0, 0.4);
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: white;
            border-radius: 12px;
            padding: 12px;
            width: 100%;
            outline: none;
            text-align: center;
            transition: all 0.3s ease;
        }

        .input-field:focus {
            border-color: #f472b6;
            background: rgba(0, 0, 0, 0.6);
            box-shadow: 0 0 15px rgba(244, 114, 182, 0.3);
        }

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

        .identity-choice {
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 48px;
            border-radius: 14px;
            border: 1px solid rgba(255, 255, 255, 0.16);
            background: rgba(0, 0, 0, 0.36);
            color: rgba(255, 255, 255, 0.72);
            font-size: 14px;
            font-weight: 700;
            transition: all 0.2s ease;
        }

        .identity-choice input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
        }

        .identity-dot {
            width: 18px;
            height: 18px;
            border-radius: 50%;
            border: 2px solid rgba(255, 255, 255, 0.42);
            background: rgba(0, 0, 0, 0.24);
            box-shadow: inset 0 0 0 4px transparent;
        }

        .identity-choice.active {
            color: white;
            border-color: rgba(244, 114, 182, 0.72);
            background: rgba(236, 72, 153, 0.36);
            box-shadow: 0 8px 24px rgba(236, 72, 153, 0.18);
        }

        .identity-choice.active .identity-dot {
            border-color: #fff;
            background: #ec4899;
            box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.95);
        }

        .login-password-field {
            letter-spacing: 0.32em;
        }

        #checkin-box {
            background: linear-gradient(135deg,
                    rgba(255, 247, 236, 0.76) 0%,
                    rgba(255, 221, 234, 0.72) 42%,
                    rgba(223, 245, 255, 0.72) 100%);
            border: 1px solid rgba(255, 255, 255, 0.68);
            box-shadow:
                0 12px 28px rgba(118, 85, 101, 0.18),
                inset 0 1px 0 rgba(255, 255, 255, 0.52);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
        }

        #checkin-box h3 {
            color: #db3f92;
            font-weight: 800;
            text-shadow: 0 1px 8px rgba(255, 255, 255, 0.72);
        }

        #checkin-box p {
            color: #6f6170;
            font-weight: 600;
        }

        #checkin-box button {
            min-width: 72px;
            border-radius: 16px;
            background: linear-gradient(135deg, #ff7fb5 0%, #ffb86b 58%, #7fd8ff 100%);
            border: 1px solid rgba(255, 255, 255, 0.62);
            color: #fff;
            font-weight: 800;
            box-shadow:
                0 8px 18px rgba(255, 126, 180, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.45);
            text-shadow: 0 1px 7px rgba(146, 58, 95, 0.32);
        }

        #diary-send-btn {
            background: linear-gradient(135deg, #ff7fb5 0%, #ffb86b 58%, #7fd8ff 100%);
            border: 1px solid rgba(255, 255, 255, 0.62);
            box-shadow:
                0 8px 18px rgba(255, 126, 180, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.45);
        }

        .timeline-frame {
            position: relative;
            isolation: isolate;
            background: url("./assets/background/home1.jpg?v=clean-16-10-1") center / cover no-repeat;
            box-shadow: none;
        }

        .timeline-frame::before {
            content: none;
        }

        .timeline-frame::after {
            content: none;
        }

        .timeline-frame > * {
            position: relative;
            z-index: 1;
        }

        .timeline-bubble {
            backdrop-filter: none !important;
            -webkit-backdrop-filter: none !important;
            box-shadow: 0 8px 18px rgba(70, 48, 58, 0.12);
        }

        .timeline-bubble-blue {
            background: rgba(222, 241, 255, 0.92);
        }

        .timeline-bubble-pink {
            background: rgba(255, 232, 244, 0.92);
        }

        .timeline-bubble-alert {
            background: rgba(255, 226, 226, 0.92);
        }

        .home-top-area {
            padding: env(safe-area-inset-top, 0px) 0 0;
            background: rgba(255, 246, 250, 0.86);
        }

        .home-top-panel {
            position: relative;
            overflow: visible;
            border-radius: 0 0 24px 24px;
            padding: 12px 58px 12px 16px;
            background: rgba(255, 246, 250, 0.88);
            border: 0;
            box-shadow: 0 12px 30px rgba(126, 76, 94, 0.16);
            color: #4b3b42;
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
        }

        .home-top-panel::before {
            content: "";
            position: absolute;
            inset: 0;
            background:
                radial-gradient(circle at 12% 6%, rgba(255, 154, 201, 0.28), transparent 30%),
                radial-gradient(circle at 88% 0%, rgba(160, 210, 255, 0.24), transparent 32%);
            pointer-events: none;
        }

        
        .home-timer-row,
        .home-nav-row,
        .home-extra-menu {
            position: relative;
            z-index: 1;
        }

        .home-timer-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            min-height: 64px;
            margin-bottom: 0;
        }

        .home-timer-copy {
            flex: 1 1 0;
            min-width: 0;
        }

        .home-timer-copy span {
            display: block;
            font-size: 12px;
            color: rgba(75, 59, 66, 0.62);
            margin-bottom: 3px;
        }

        .home-timer-copy strong {
            display: flex;
            align-items: baseline;
            gap: 7px;
            color: #db3f92;
            font-size: 48px;
            line-height: 1;
            letter-spacing: 0;
        }

        .home-timer-days {
            width: max-content;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        .home-timer-days:active {
            transform: scale(0.98);
        }

        .home-timer-copy strong span {
            display: inline;
            margin-bottom: 0;
            color: inherit;
            font-size: inherit;
            line-height: inherit;
        }

        .home-timer-copy small,
        .home-timer-suffix {
            font-size: 13px;
            color: rgba(75, 59, 66, 0.6);
            font-weight: 700;
        }

        .home-timer-copy small {
            font-size: 14px;
        }

        .home-timer-clock {
            flex: 0 0 190px;
            align-self: stretch;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 0;
            padding: 2px 30px 0 0;
        }

        .home-time-separator {
            color: rgba(219, 63, 146, 0.65);
            font-weight: 800;
            font-size: 16px;
            margin: 0 3px;
            align-self: flex-start;
            padding-top: 4px;
        }

        .home-nav-row {
            position: absolute;
            right: 16px;
            top: 50%;
            z-index: 40;
            display: block;
            transform: translateY(-50%);
        }

        .home-tabs {
            position: absolute;
            right: 0;
            top: 46px;
            bottom: auto;
            width: 150px;
            display: grid;
            grid-template-columns: 1fr;
            gap: 6px;
            padding: 4px;
            border-radius: 16px;
            background: rgba(255, 246, 250, 0.9);
            border: 1px solid rgba(255, 255, 255, 0.72);
            box-shadow: 0 14px 30px rgba(126, 76, 94, 0.18);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
        }

        .home-tab,
        .home-extra-tab,
        .home-menu-toggle {
            min-height: 34px;
            border-radius: 13px;
            color: rgba(75, 59, 66, 0.64);
            font-size: 12px;
            font-weight: 800;
            text-align: center;
            transition: all 0.2s ease;
        }

        .home-tab.is-active {
            color: white;
            background: linear-gradient(135deg, rgba(236, 72, 153, 0.92), rgba(248, 113, 113, 0.86));
            box-shadow: 0 8px 16px rgba(236, 72, 153, 0.24);
        }

        .home-menu-toggle {
            width: 38px;
            height: 38px;
            flex: 0 0 38px;
            background: rgba(255, 255, 255, 0.52);
            color: rgba(75, 59, 66, 0.72);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 18px;
            box-shadow: 0 8px 18px rgba(126, 76, 94, 0.14);
        }

        .home-menu-toggle[aria-expanded="true"] {
            background: rgba(255, 214, 232, 0.8);
            color: #db3f92;
        }

        .home-extra-menu {
            position: absolute;
            right: 0;
            top: 174px;
            bottom: auto;
            width: 150px;
            margin-top: 0;
            display: grid;
            grid-template-columns: 1fr;
            gap: 6px;
            padding: 4px;
            border-radius: 16px;
            background: rgba(255, 246, 250, 0.88);
            border: 1px solid rgba(255, 255, 255, 0.7);
            box-shadow: 0 14px 30px rgba(126, 76, 94, 0.16);
            backdrop-filter: blur(18px);
            -webkit-backdrop-filter: blur(18px);
        }

        .home-extra-tab {
            background: rgba(255, 255, 255, 0.42);
        }

        .home-extra-tab.is-danger {
            color: #db3f92;
            background: rgba(255, 214, 232, 0.72);
        }

        @media (max-width: 390px) {
            .home-timer-row {
                min-height: 54px;
            }

            .home-timer-copy strong {
                font-size: 44px;
            }

            .home-timer-clock {
                flex-basis: 158px;
                padding-right: 24px;
            }
        }

        .soft-input {
            background: rgba(255, 255, 255, 0.64);
            border: 1px solid rgba(219, 63, 146, 0.18);
            color: #4b3b42;
            border-radius: 14px;
            outline: none;
        }

        /* 按钮样式 */
        .btn-primary {
            background: linear-gradient(135deg, #ff7fb5 0%, #ffb86b 52%, #7fd8ff 100%);
            color: white;
            font-weight: bold;
            padding: 12px;
            border-radius: 16px;
            width: 100%;
            border: 1px solid rgba(255, 255, 255, 0.56);
            box-shadow:
                0 10px 22px rgba(255, 126, 180, 0.28),
                inset 0 1px 0 rgba(255, 255, 255, 0.45);
            text-shadow: 0 1px 8px rgba(146, 58, 95, 0.28);
            transition: transform 0.1s;
        }

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

        /* 实用工具类 */
        .hidden {
            display: none !important;
        }

        .fade-in {
            animation: fadeIn 0.6s cubic-bezier(0.22, 1, 0.36, 1);
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* 滚动条隐藏 */
        ::-webkit-scrollbar {
            width: 0px;
            background: transparent;
        }

        /* 震动动画 */
        @keyframes shake {

            0%,
            100% {
                transform: translateX(0);
            }

            25% {
                transform: translateX(-5px);
            }

            75% {
                transform: translateX(5px);
            }
        }

        .animate-shake {
            animation: shake 0.3s ease-in-out;
        }

        /* 翻牌时钟样式 */
        .flip-clock-container {
            perspective: 1000px;
        }

        .flip-card {
            position: relative;
            display: inline-block;
            width: 18px;
            height: 28px;
            background: rgba(255, 255, 255, 0.76);
            border: 1px solid rgba(255, 255, 255, 0.86);
            border-radius: 8px;
            color: #db3f92;
            font-weight: 800;
            text-align: center;
            line-height: 26px;
            font-size: 17px;
            overflow: hidden;
            box-shadow: 0 5px 12px rgba(126, 76, 94, 0.12);
        }

        .flip-card::after {
            content: "";
            position: absolute;
            top: 50%;
            left: 0;
            right: 0;
            height: 1px;
            background: rgba(219, 63, 146, 0.12);
            z-index: 10;
        }

        .flip-unit {
            display: flex;
            flex-direction: column;
            align-items: center;
            margin: 0 2px;
        }

        .flip-label {
            font-size: 10px;
            color: rgba(75, 59, 66, 0.5);
            margin-top: 3px;
            font-weight: 700;
        }

.ai-chat-btn {
            position: fixed;
            bottom: calc(85px + env(safe-area-inset-bottom, 0px));
            left: 16px;
            width: 48px;
            height: 48px;
            background: rgba(255, 255, 255, 0.12);
            backdrop-filter: blur(10px);
            border: 2px solid rgba(96, 165, 250, 0.75);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
            text-decoration: none;
            z-index: 9999;
            transition: all 0.3s ease;
            box-shadow: 0 4px 16px rgba(37, 99, 235, 0.28);
        }

        .ai-chat-btn img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
        }

        .ai-chat-btn:active {
            transform: scale(0.9);
        }
