@charset "UTF-8";

/* ================= 1. 字体引入 ================= */
@import url('/resource/css/fonts.css');

/* ================= 2. 动态颜色变量 (iOS 26 Liquid Glass) ================= */
:root {
    /* iOS 26 系统颜色 - 浅色模式 */
    --text-primary: #000000;                    /* label */
    --text-secondary: rgba(60, 60, 67, 0.6);   /* secondaryLabel */
    --text-tertiary: rgba(60, 60, 67, 0.3);    /* tertiaryLabel */
    --text-placeholder: rgba(60, 60, 67, 0.2); /* placeholderText */

    --list-bg: rgba(0, 0, 0, 0.03);
    --list-border: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-elevated: rgba(255, 255, 255, 0.82);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-highlight: rgba(255, 255, 255, 0.9);
    --glass-highlight-edge: rgba(255, 255, 255, 0.4);
    --glass-shadow: rgba(0, 0, 0, 0.06);
    --glass-glow: rgba(255, 255, 255, 0.3);
    --photo-border: rgba(0, 0, 0, 0.08);
    --no-photo-bg: rgba(0, 0, 0, 0.02);
    --card-bg: rgba(255, 255, 255, 0.72);
    --card-border: rgba(255, 255, 255, 0.6);
    --btn-text: #FFFFFF;
    --picker-highlight: rgba(118, 118, 128, 0.12);

    /* iOS 26 系统强调色 */
    --ios-blue: #007AFF;
    --ios-red: #FF3B30;
    --ios-green: #34C759;
    --ios-orange: #FF9500;
    --ios-purple: #AF52DE;
    --ios-pink: #FF2D55;
    --ios-yellow: #FFCC00;

    /* iOS 26 边缘效果渐变 */
    --edge-gradient-top: linear-gradient(to bottom, var(--glass-bg) 0%, transparent 100%);
    --edge-gradient-bottom: linear-gradient(to top, var(--glass-bg) 0%, transparent 100%);
}

@media (prefers-color-scheme: dark) {
    :root {
        /* iOS 26 系统颜色 - 深色模式 */
        --text-primary: #FFFFFF;
        --text-secondary: rgba(235, 235, 245, 0.6);  /* secondaryLabel */
        --text-tertiary: rgba(235, 235, 245, 0.3);   /* tertiaryLabel */
        --text-placeholder: rgba(235, 235, 245, 0.2);

        --list-bg: rgba(255, 255, 255, 0.05);
        --list-border: rgba(255, 255, 255, 0.08);
        --glass-bg: rgba(40, 40, 42, 0.72);
        --glass-bg-elevated: rgba(50, 50, 52, 0.82);
        --glass-border: rgba(255, 255, 255, 0.1);
        --glass-highlight: rgba(255, 255, 255, 0.08);
        --glass-highlight-edge: rgba(255, 255, 255, 0.06);
        --glass-shadow: rgba(0, 0, 0, 0.2);
        --glass-glow: rgba(255, 255, 255, 0.08);
        --photo-border: rgba(255, 255, 255, 0.08);
        --no-photo-bg: rgba(255, 255, 255, 0.04);
        --card-bg: rgba(40, 40, 42, 0.72);
        --card-border: rgba(255, 255, 255, 0.1);
        --picker-highlight: rgba(118, 118, 128, 0.24);
        --ios-blue: #0A84FF;
        --ios-red: #FF453A;
        --ios-green: #30D158;
        --ios-orange: #FF9F0A;
        --ios-purple: #BF5AF2;
        --ios-pink: #FF375F;
    }

    /* 深色模式 Liquid Glass 降低饱和度 */
    .container, .message-card, .top-nav, .alert-card, .empty-state, .back-to-top, .loading-mask, .admin-panel {
        -webkit-backdrop-filter: blur(32px) saturate(150%);
        backdrop-filter: blur(32px) saturate(150%);
    }

    #fixed-bg {
        filter: brightness(0.65);
    }
}

/* ================= 3. 全局样式 ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

/* iOS 18 无障碍：减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

::selection {
    background: rgba(10, 132, 255, 0.3);
    color: inherit;
}

html {
    scroll-behavior: smooth;
}

/* iOS 26 Liquid Spring 动画曲线
   基于 SwiftUI spring(response:dampingFraction:) 参数:
   - response: 0.55 (刚度)
   - dampingFraction: 0.825 (阻尼)
   - bouncy extraBounce: 0.15
   - smooth duration: 0.5s
*/
:root {
    /* spring(response: 0.55, damping: 0.825) → 模拟弹性 */
    --spring-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    /* smooth(duration: 0.5) → 平滑过渡 */
    --spring-smooth: cubic-bezier(0.25, 0.1, 0.25, 1);
    /* interactive → 手势交互响应 */
    --spring-interactive: cubic-bezier(0.2, 0.8, 0.2, 1.2);
    /* bouncy(extraBounce: 0.15) → 更弹跳 */
    --spring-bouncy: cubic-bezier(0.34, 1.8, 0.64, 1);

    /* iOS 26 滚动边缘效果 */
    --scroll-edge-height: 40px;
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* iOS 26 Liquid Glass materialization: 从微缩放 + 透镜折射效果 */
@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.88);
        filter: blur(4px);
    }
    50% {
        opacity: 1;
        filter: blur(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
        filter: blur(0);
    }
}

/* iOS 26 Liquid Glass slide-up: 从下方浮入 */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* iOS 26 交互发光动画 */
@keyframes glow-pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0.4); }
    50% { box-shadow: 0 0 20px 10px rgba(0, 122, 255, 0.2); }
    100% { box-shadow: 0 0 0 0 rgba(0, 122, 255, 0); }
}

/* iOS 26 涟漪效果 */
@keyframes ripple {
    from {
        transform: scale(0);
        opacity: 0.5;
    }
    to {
        transform: scale(4);
        opacity: 0;
    }
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* iOS 26 滚动边缘效果（顶部/底部渐变） */
.scroll-edge-top::before,
.scroll-edge-bottom::after {
    content: '';
    position: sticky;
    display: block;
    height: var(--scroll-edge-height);
    z-index: 10;
    pointer-events: none;
}

.scroll-edge-top::before {
    top: 0;
    background: var(--edge-gradient-top);
}

.scroll-edge-bottom::after {
    bottom: 0;
    background: var(--edge-gradient-bottom);
}

/* iOS 26 触觉反馈动画（用于按钮点击） */
.haptic-feedback {
    position: relative;
    overflow: hidden;
}

.haptic-feedback::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    padding-top: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.haptic-feedback:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ios-shake {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    20% { transform: translate3d(-6px, 0, 0) scale(1); }
    40% { transform: translate3d(6px, 0, 0) scale(1); }
    60% { transform: translate3d(-4px, 0, 0) scale(1); }
    80% { transform: translate3d(4px, 0, 0) scale(1); }
}

/* iOS 26 Liquid Glass slide: 轻微弹性上浮 */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(30px + env(safe-area-inset-top)) 16px calc(80px + env(safe-area-inset-bottom));
    color: var(--text-primary);
    transition: color 0.3s var(--spring-smooth), background-color 0.3s var(--spring-smooth);
    font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #000;
    overflow-x: hidden;
}

#fixed-bg {
    position: fixed;
    top: -10%;
    left: 0;
    width: 100vw;
    height: 120%;
    z-index: -1;
    pointer-events: none;
    transition: filter 0.3s ease;
    will-change: transform;
}

form { width: 100%; }

/* ================= 4. iOS 26 Liquid Glass 容器 ================= */
.container, .message-card, .top-nav, .alert-card, .empty-state, .back-to-top, .loading-mask, .admin-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(250%);
    -webkit-backdrop-filter: blur(40px) saturate(250%);
    border: 0.5px solid var(--glass-border);
    /* Liquid Glass 多层光学效果：边缘折射 + 顶光 + 深度阴影 */
    box-shadow:
        inset 0 1px 0 var(--glass-highlight-edge),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06),
        inset 1px 0 0 rgba(255, 255, 255, 0.1),
        inset -1px 0 0 rgba(255, 255, 255, 0.1),
        0 2px 6px var(--glass-shadow),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 20px 48px rgba(0, 0, 0, 0.04);
    /* 顶部光线折射带 */
    position: relative;
}

/* Liquid Glass 顶部光线折射带（透镜效应） */
.container::before, .message-card::before, .top-nav::before, .alert-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-highlight-edge), transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

/* backdrop-filter 不支持时降级为不透明背景 */
@supports not (backdrop-filter: blur(40px)) {
    .container, .message-card, .top-nav, .alert-card, .empty-state, .back-to-top, .loading-mask, .admin-panel {
        background: rgba(255, 255, 255, 0.95);
    }
    @media (prefers-color-scheme: dark) {
        .container, .message-card, .top-nav, .alert-card, .empty-state, .back-to-top, .loading-mask, .admin-panel {
            background: rgba(40, 40, 42, 0.95);
        }
    }
}

.container, .message-card {
    width: 100%;
    max-width: 480px;
    margin: auto auto 0 auto;
    border-radius: 28px;
    padding: 20px 16px;
    animation: scale-in 0.5s var(--spring-bouncy) both;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.grid-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.grid-container .container {
    margin: 0;
    max-width: none;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-weight: 500;
    grid-column: 1 / -1;
    border-radius: 28px;
    animation: scale-in 0.4s var(--spring-interactive) both;
}

.top-nav {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 24px auto;
    border-radius: 28px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: scale-in 0.5s var(--spring-bouncy) both;
}

@media (max-width: 600px) {
    .top-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 20px;
        border-radius: 28px;
    }
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* ================= 5. 标题与文字 (iOS 26 Typography) ================= */
/* iOS 26: 标题左对齐更常见 */
.header, .login-header {
    text-align: left;
    margin-bottom: 24px;
    width: 100%;
}

.nav-header { text-align: left; }

/* Title 1: 28pt, Regular, 34pt leading, 0.36pt tracking */
.title {
    font-size: 28px;
    font-weight: 400;
    letter-spacing: 0.36px;
    line-height: 34px;
    margin-bottom: 6px;
    color: var(--text-primary);
}

/* Title 2: 22pt, Regular, 28pt leading, 0.35pt tracking */
.nav-header .title {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.35px;
    line-height: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Subheadline: 15pt, Regular, 20pt leading, -0.24pt tracking */
.subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: -0.24px;
    line-height: 20px;
}

/* Footnote: 13pt, Regular, 18pt leading, -0.08pt tracking */
.sub-text {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.08px;
    line-height: 18px;
}

/* Body: 17pt, Regular, 22pt leading, -0.41pt tracking */
.message-card .error {
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.41px;
    line-height: 22px;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 80px;
}

/* ================= 6. iOS 26 分组列表 ================= */
.list-group {
    width: 100%;
    background: var(--list-bg);
    border-radius: 10px;
    margin-bottom: 24px;
    overflow: hidden;
    text-align: left;
    border: none;
}

.list-group.hide { display: none; }
.list-group.show {
    display: block;
    animation: fade-in 0.35s ease;
}

.list-row {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 8px 16px;
    position: relative;
    border-bottom: none;
    transition: background-color 0.15s var(--spring-interactive);
}

.list-row.auto-height {
    height: auto;
    padding: 10px 16px;
}

.list-row:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 16px;
    right: 0;
    height: 0.5px;
    background-color: var(--list-border);
}

/* Body: 17pt, Regular, -0.41pt tracking */
.list-row label {
    width: 85px;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.41px;
    color: var(--text-secondary);
    white-space: nowrap;
    flex-shrink: 0;
}

.row-content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.41px;
    text-align: right;
    color: var(--text-primary);
    line-height: 22px;
    word-break: break-all;
    overflow: hidden;
}

/* Body: 17pt, Regular, -0.41pt tracking */
input {
    flex: 1;
    border: none;
    background: none;
    font-size: 17px;
    color: var(--text-primary);
    outline: none;
    text-align: right;
    width: 100%;
    font-weight: 400;
    letter-spacing: -0.41px;
    line-height: 22px;
}

input:-moz-placeholder, input::-webkit-input-placeholder {
    color: var(--text-placeholder);
    opacity: 1;
    font-weight: 400;
}

/* 编辑模式禁用态 */
input:disabled {
    opacity: 0.5;
    color: var(--text-tertiary);
    cursor: not-allowed;
}

.disabled-row label {
    opacity: 0.5;
}

.pseudo-trigger, #area_trigger {
    width: 100%;
    text-align: right;
    color: var(--ios-blue);
    font-size: 17px;
    cursor: pointer;
}

.clickable-row, .select-row {
    transition: background-color 0.15s var(--spring-interactive);
}

.clickable-row:active, .select-row:active {
    background-color: var(--list-bg);
    transition: background-color 0.05s;
    /* Liquid Glass 交互发光：从中心向外扩散 */
    box-shadow: inset 0 0 12px var(--glass-glow);
}


/* ================= 7. 头像处理 ================= */
.avatar-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.avatar-wrapper,
.avatar-wrapper.container {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.avatar-container {
    width: 110px;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-container,
.avatar-container.container {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    outline: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.avatar-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    appearance: none;
    -webkit-appearance: none;
    transform: translateZ(0);
}

.avatar-container img,
.avatar-container img.container {
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    outline: none;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--no-photo-bg);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-tertiary);
}

.passport-input-wrap {
    justify-content: flex-end;
    padding-left: 0;
}

.passport-prefix {
    font-weight: 700;
    color: var(--text-tertiary);
    margin-right: 4px;
    flex-shrink: 0;
}

.passport-input-wrap input {
    flex: none;
    width: 60px;
    text-align: right;
}

.file-name { display: none; }

.file-thumb {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    object-fit: cover;
    margin-right: auto;
    display: none;
    border: none !important;
}

.file-btn {
    background: rgba(10, 132, 255, 0.1);
    color: var(--ios-blue);
    padding: 6px 12px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    flex-shrink: 0;
}

/* Footnote: 13pt, Regular, -0.08pt tracking */
.section-title {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.08px;
    line-height: 18px;
    color: var(--text-secondary);
    margin-top: 16px;
    margin-bottom: 8px;
    padding-left: 16px;
    text-transform: uppercase;
    width: 100%;
    animation: slide-up 0.4s var(--spring-interactive) both;
}

.visa-container {
    margin-top: 16px;
    width: 100%;
    animation: scale-in 0.4s var(--spring-interactive) both;
}

.photo-img {
    width: 100%;
    border-radius: 18px;
    border: 0.5px solid var(--photo-border);
    display: block;
    margin-bottom: 16px;
    object-fit: cover;
    animation: scale-in 0.5s var(--spring-bouncy) both;
}

.no-photo {
    width: 100%;
    background: var(--no-photo-bg);
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    font-size: 14px;
    color: var(--text-tertiary);
    margin-bottom: 16px;
    border: 1px dashed var(--photo-border);
    box-sizing: border-box;
    animation: scale-in 0.5s var(--spring-bouncy) both;
}

/* ================= 8. 按钮与文案 (iOS 26 Liquid Glass Buttons) ================= */
.btn-primary, .btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    box-sizing: border-box;
    border: none;
    /* iOS 26: Capsule shape (radius = height/2) */
    border-radius: 25px;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.41px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s var(--spring-interactive), opacity 0.2s var(--spring-interactive), background 0.2s var(--spring-interactive), box-shadow 0.2s var(--spring-interactive);
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
}

/* Glass Prominent Button (iOS 26 .buttonStyle(.glassProminent)) */
.btn-primary {
    width: 100%;
    background: var(--ios-blue);
    color: var(--btn-text);
    margin-bottom: 12px;
    /* Liquid Glass 内部高光 */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-primary:active, .btn-logout:active {
    transform: scale(0.96);
    opacity: 0.85;
    /* Liquid Glass 交互发光：从内部照亮 */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 20px rgba(0, 122, 255, 0.3);
}

/* Glass Button (iOS 26 .buttonStyle(.glass)) */
.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    box-sizing: border-box;
    border: none;
    /* iOS 26: Capsule shape */
    border-radius: 22px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.24px;
    text-decoration: none;
    cursor: pointer;
    background: var(--list-bg);
    color: var(--ios-blue);
    line-height: 1;
    /* Liquid Glass 边框 */
    border: 0.5px solid var(--list-border);
}

.btn-secondary:active {
    transform: scale(0.96);
    opacity: 0.8;
    box-shadow: inset 0 0 12px var(--glass-glow);
}

.btn-logout {
    background: var(--ios-red);
    color: var(--btn-text);
    flex-shrink: 0;
    /* Liquid Glass 内部高光 */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    box-sizing: border-box;
    border: none;
    /* iOS 26: Capsule shape */
    border-radius: 25px;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.41px;
    background: var(--ios-red);
    color: var(--btn-text);
    cursor: pointer;
    transition: transform 0.2s var(--spring-interactive), opacity 0.2s var(--spring-interactive), box-shadow 0.2s var(--spring-interactive);
    /* Liquid Glass 内部高光 */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-danger:active {
    transform: scale(0.96);
    opacity: 0.8;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 0 20px rgba(255, 59, 48, 0.3);
}

.btn-link {
    width: 100%;
    display: block;
    text-align: center;
    color: var(--ios-blue);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.24px;
    text-decoration: none;
    padding: 12px;
    opacity: 1;
}

.btn-link:active {
    transform: scale(0.98);
    opacity: 0.4;
    transition: transform 0.05s, opacity 0.05s;
}

/* Caption 1: 12pt, Regular, 0pt tracking */
footer {
    width: 100%;
    text-align: center;
    margin-top: 30px;
    margin-bottom: auto;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 16px;
    color: var(--text-tertiary);
    animation: fade-in 0.8s ease 0.2s both;
    transition: color 0.3s ease;
}

/* Footnote: 13pt, Regular, -0.08pt tracking */
.info-box {
    width: 100%;
    box-sizing: border-box;
    background: var(--list-bg);
    border-radius: 18px;
    padding: 16px;
    margin-top: 24px;
    margin-bottom: 24px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.08px;
    line-height: 18px;
    color: var(--text-primary);
    text-align: left;
    animation: slide-up 0.4s var(--spring-interactive) both;
}

/* Subheadline: 15pt, Regular, -0.24pt tracking */
.info-box strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.24px;
}

.info-box ul {
    padding-left: 18px;
    margin-bottom: 12px;
}

.info-box ul:last-child { margin-bottom: 0; }

/* ================= 9. iOS 18 弹窗与加载层 ================= */
.mask, .alert-mask, .picker-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s var(--spring-smooth), visibility 0.3s;
}

.mask.show, .alert-mask.show, .picker-mask.show, .loading-mask.show {
    visibility: visible;
    opacity: 1;
}

.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.spinner {
    width: 36px;
    height: 36px;
    margin-bottom: 12px;
    border-radius: 50%;
    border: 2.5px solid var(--list-border);
    border-top-color: var(--ios-blue);
    border-right-color: var(--ios-blue);
    animation: spin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.loading-text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ================= 9b. 上传进度条 ================= */
.upload-progress-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s var(--spring-smooth), visibility 0.3s;
}

.upload-progress-mask.show {
    visibility: visible;
    opacity: 1;
}

.upload-progress-card {
    width: 260px;
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(250%);
    -webkit-backdrop-filter: blur(40px) saturate(250%);
    border: 0.5px solid var(--glass-border);
    border-radius: 24px;
    padding: 28px 24px;
    text-align: center;
    transform: scale(0.88);
    opacity: 0;
    transition: transform 0.5s var(--spring-bounce), opacity 0.3s var(--spring-smooth);
    /* Liquid Glass 多层光学效果 */
    box-shadow:
        inset 0 1px 0 var(--glass-highlight-edge),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06),
        0 4px 12px var(--glass-shadow),
        0 16px 40px rgba(0, 0, 0, 0.1);
}

.upload-progress-mask.show .upload-progress-card {
    transform: scale(1);
    opacity: 1;
}

/* Headline: 17pt, Semibold, -0.41px tracking */
.upload-progress-title {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.41px;
    line-height: 22px;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.upload-progress-bar-track {
    width: 100%;
    height: 4px;
    background: var(--list-bg);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.upload-progress-bar-fill {
    height: 100%;
    width: 0%;
    background: var(--ios-blue);
    border-radius: 2px;
    transition: width 0.2s ease;
}

/* Footnote: 13pt, Regular, -0.08pt tracking */
.upload-progress-text {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.08px;
    line-height: 18px;
    color: var(--text-secondary);
}

/* iOS 26 Alert: Liquid Glass 风格 */
.alert-card {
    width: 280px;
    border-radius: 24px;
    text-align: center;
    overflow: hidden;
    /* iOS 26: 从按钮形态展开 */
    transform: scale(0.88);
    opacity: 0;
    transition: transform 0.5s var(--spring-bouncy), opacity 0.3s ease;
    /* Liquid Glass 背景 */
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(250%);
    -webkit-backdrop-filter: blur(40px) saturate(250%);
    border: 0.5px solid var(--glass-border);
    box-shadow:
        inset 0 1px 0 var(--glass-highlight-edge),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06),
        0 4px 12px var(--glass-shadow),
        0 16px 40px rgba(0, 0, 0, 0.1);
}

/* iOS 26 Alert 成功图标 */
.alert-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ios-green);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 24px auto 0;
    animation: alert-icon-pop 0.5s var(--spring-bouncy) both;
}

@keyframes alert-icon-pop {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.alert-icon-check {
    width: 24px;
    height: 12px;
    border-left: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(-45deg);
    margin-top: -4px;
}

.alert-icon + .alert-content {
    padding-top: 16px;
}

.alert-mask.show .alert-card, .mask.show .alert-card {
    transform: scale(1);
    opacity: 1;
}

.alert-card.error-shake {
    animation: ios-shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

/* iOS 26 Alert Buttons */
.alert-buttons {
    display: flex;
    width: 100%;
    border-top: 0.5px solid var(--list-border);
}

/* Body: 17pt, Regular, -0.41px tracking */
.alert-btn {
    flex: 1;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    color: var(--ios-blue);
    cursor: pointer;
    font-weight: 400;
    letter-spacing: -0.41px;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
    transition: background-color 0.15s ease;
}

.alert-btn:active {
    background-color: var(--list-bg);
}

/* iOS 26: 确认按钮使用 Medium (主要操作强调) */
.alert-btn:last-child {
    font-weight: 500;
}

.alert-btn:active { background: var(--list-bg); }
.alert-btn:not(:last-child) { border-right: 0.5px solid var(--list-border); }

/* Headline: 17pt, Semibold, -0.41pt tracking */
#alertTitle {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.41px;
    line-height: 22px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

/* Footnote: 13pt, Regular, -0.08pt tracking */
#alertMsg {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.08px;
    line-height: 18px;
    color: var(--text-secondary);
}

/* iOS 26 Liquid Glass Picker - 底部弹窗 */
.picker-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.picker-mask.show {
    visibility: visible;
    opacity: 1;
}

.picker-panel {
    width: 100%;
    max-height: 70vh;
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(250%);
    -webkit-backdrop-filter: blur(40px) saturate(250%);
    border-top-left-radius: 28px;
    border-top-right-radius: 28px;
    border: 0.5px solid var(--glass-border);
    border-bottom: none;
    /* Liquid Glass 多层光学效果 */
    box-shadow:
        inset 0 1px 0 var(--glass-highlight-edge),
        0 -2px 6px var(--glass-shadow),
        0 -8px 24px rgba(0, 0, 0, 0.06);
    transform: translateY(100%);
    transition: transform 0.5s var(--spring-bouncy);
    overflow: hidden;
    z-index: 10001;
}

.picker-mask.show .picker-panel {
    transform: translateY(0);
}

/* iOS 26: 标题栏 */
.picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 0.5px solid var(--list-border);
}

.picker-title {
    font-size: 17px;
    font-weight: 500;
    letter-spacing: -0.41px;
    color: var(--text-primary);
}

.picker-btn {
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.41px;
    padding: 4px 8px;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.picker-btn:active {
    opacity: 0.5;
}

.picker-btn-cancel {
    color: var(--ios-blue);
}

.picker-btn-confirm {
    color: var(--ios-blue);
    font-weight: 500;
}

/* 选项列表容器 */
.picker-group {
    background: transparent;
    overflow-y: auto;
    max-height: 50vh;
}

/* Body: 17pt, Regular, -0.41px tracking */
.picker-opt {
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.41px;
    color: var(--ios-blue);
    cursor: pointer;
    transition: background-color 0.15s ease;
    background: transparent;
}

.picker-group .picker-opt:not(:last-child) {
    border-bottom: 0.5px solid var(--list-border);
}

.picker-opt:active {
    background-color: var(--list-bg);
}

/* iOS 26: 选中状态 */
.picker-opt.selected {
    font-weight: 500;
    color: var(--ios-blue);
    background-color: var(--picker-highlight);
}

/* iOS 26: 取消按钮 */
.picker-cancel {
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(250%);
    -webkit-backdrop-filter: blur(40px) saturate(250%);
    border-radius: 28px;
    font-weight: 500;
    color: var(--ios-blue) !important;
    border-bottom: none;
    border-top: none;
    /* Liquid Glass 多层光学效果 */
    box-shadow:
        inset 0 1px 0 var(--glass-highlight-edge),
        0 4px 12px var(--glass-shadow),
        0 16px 40px rgba(0, 0, 0, 0.08);
}

.date-picker-body {
    display: flex;
    height: 216px;
    position: relative;
    overflow: hidden;
    mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 15%, black 85%, transparent);
}

.date-col {
    flex: 1;
    height: 100%;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    padding: 90px 0;
}

.date-col::-webkit-scrollbar { display: none; }

.date-item {
    height: 36px;
    line-height: 36px;
    text-align: center;
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    scroll-snap-align: center;
    opacity: 0.4;
    transition: opacity 0.2s ease;
}

.date-item.selected {
    opacity: 1;
}

.date-highlight {
    position: absolute;
    top: 90px;
    left: 10px;
    right: 10px;
    height: 36px;
    background: var(--picker-highlight);
    border-radius: 10px;
    z-index: -1;
    pointer-events: none;
}

.date-header {
    height: 54px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    border-bottom: 0.5px solid var(--list-border);
}

.date-btn {
    color: var(--ios-blue);
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
}

/* ================= 10. 通用辅助类 ================= */
.hidden-input { display: none; }
.text-danger { color: var(--ios-red) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.font-regular { font-weight: 400 !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-16 { margin-bottom: 16px !important; }
.p-0 { padding: 0 !important; }
.overflow-hidden { overflow: hidden !important; border-radius: 18px; }
.glass-panel {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(40px) saturate(250%);
    -webkit-backdrop-filter: blur(40px) saturate(250%);
    border: 0.5px solid var(--glass-border) !important;
    box-shadow:
        inset 0 1px 0 var(--glass-highlight-edge),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06),
        0 2px 6px var(--glass-shadow),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 20px 48px rgba(0, 0, 0, 0.04) !important;
}

.empty-state-sub {
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.6;
}

.date-title { font-weight: 500; font-size: 17px; }
.alert-content { padding: 24px 20px 20px; }
.result-wrapper { width: 100%; margin-top: 24px; animation: fade-in 0.4s ease; }
#resultWrapper { width: 100%; }
.tabular-nums { font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }

/* ================= 11. 后台管理扩展布局 ================= */
.back-to-top {
    position: fixed;
    bottom: 40px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ios-blue);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.back-to-top:active { transform: scale(0.9); }

.admin-top-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
}

.admin-top-nav.has-error {
    border-color: rgba(255, 55, 95, 0.3);
    box-shadow: 0 10px 30px rgba(255, 55, 95, 0.08);
}

.admin-nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.nav-logout-btn { padding: 0 40px; }

.sort-trigger {
    color: var(--ios-blue);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1;
    user-select: none;
    padding: 6px 14px;
    background: rgba(10, 132, 255, 0.1);
    border-radius: 20px;
    white-space: nowrap;
}

.sort-trigger:active { opacity: 0.5; }
.trigger-error { color: var(--ios-red) !important; background: rgba(255, 55, 95, 0.1); }

.error-banner {
    width: 100%;
    min-height: 54px;
    padding: 0 16px;
    background-color: rgba(255, 55, 95, 0.08);
    border: 0.5px solid rgba(255, 55, 95, 0.15);
    color: var(--ios-red);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    animation: slide-up 0.4s var(--spring-interactive) both;
}

@media (max-width: 600px) {
    .nav-right {
        width: 100%;
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
        justify-content: flex-start;
    }
    .nav-filters {
        width: 100%;
        display: flex;
        justify-content: center;
        gap: 6px;
        overflow: hidden;
    }
    .sort-trigger {
        flex: 0 1 auto;
        min-width: 0;
        justify-content: center;
        padding: 5px 10px !important;
        font-size: 12px !important;
        text-align: center;
        white-space: nowrap;
    }
    .nav-right .btn-logout.nav-logout-btn {
        width: 100% !important;
        max-width: none !important;
        height: 50px !important;
        border-radius: 14px !important;
        font-size: 17px !important;
        padding: 0 !important;
        margin: 0 !important;
        display: flex !important;
        justify-content: center !important;
    }

    /* 管理后台单卡片布局 */
    .container.admin-container {
        max-width: none;
    }

    .admin-filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filters-bar .btn-logout {
        width: 100%;
        height: 44px;
        border-radius: 22px;
        font-size: 15px;
    }
}

/* ================= 12. 动态页面背景类 ================= */
#fixed-bg.bg-custom {
    background: url('/resource/images/background/myname_wide.jpg') no-repeat center center/cover;
}

@media (max-width: 1024px) {
    #fixed-bg.bg-custom {
        background: url('/resource/images/background/myname_narrow.jpg') no-repeat center center/cover;
    }
}

#fixed-bg.bg-home {
    background: url('/resource/images/background/3189.jpg') no-repeat center center/cover;
}

#fixed-bg.bg-251004 {
    background: url('/resource/images/background/swallow_wide.jpg') no-repeat center center/cover;
}

@media (max-width: 1024px) {
    #fixed-bg.bg-251004 {
        background: url('/resource/images/background/happy_narrow.jpg') no-repeat center center/cover;
    }
}

/* ================= Wide-screen adaptation ================= */

@media (min-width: 768px) {
    .container,
    .message-card {
        max-width: 700px;
        padding: 32px 28px;
    }

    body {
        padding-top: 40px;
    }

    footer {
        margin-top: 40px;
    }
}

/* ================= 13. Upload Closed State ================= */
.closed-state {
    text-align: center;
    padding: 40px 20px 32px;
    margin-bottom: 24px;
}

.closed-icon {
    color: var(--text-tertiary);
    margin-bottom: 16px;
    opacity: 0.6;
}

/* Title 2: 22pt, Regular, 28pt leading, 0.35pt tracking */
.closed-title {
    font-size: 22px;
    font-weight: 400;
    letter-spacing: 0.35px;
    line-height: 28px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Subheadline: 15pt, Regular, 20pt leading, -0.24pt tracking */
.closed-desc {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.24px;
    line-height: 20px;
    color: var(--text-secondary);
    max-width: 280px;
    margin: 0 auto;
}

/* ================= 14. Admin Upload Control ================= */
.admin-panel {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto 24px auto;
    border-radius: 28px;
    padding: 24px;
    animation: scale-in 0.5s var(--spring-bouncy) both;
}

.admin-panel .section-title {
    padding-left: 0;
    margin-top: 0;
    margin-bottom: 16px;
}

.admin-panel .list-group:last-of-type {
    margin-bottom: 0;
}

.admin-panel .btn-primary {
    margin-top: 16px;
}

/* 管理后台 — 单卡片布局 */
.container.admin-container {
    max-width: 1100px;
    margin: 0 auto;
    /* 覆盖基类 scale-in：大卡片 scale+blur 太重，改用轻量 fade-in */
    animation: fade-in 0.4s var(--spring-smooth) both;
    /* 覆盖基类 overflow:hidden → clip：hidden 在 backdrop-filter 大元素上会创建多余的滚动容器导致双滚动条 */
    overflow: clip;
}

.admin-filters-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    width: 100%;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 0.5px solid var(--list-border);
}

.admin-filters-bar .btn-logout {
    flex-shrink: 0;
    height: 36px;
    padding: 0 24px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 18px;
}

.admin-form {
    width: 100%;
    margin-bottom: 20px;
}

.admin-form:last-of-type {
    margin-bottom: 0;
}

/* 管理面板响应式网格 */
.admin-panels-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 900px) {
    .admin-panels-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

.admin-panel-item {
    min-width: 0;
}

.admin-token-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.token-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--list-bg);
    border-radius: 10px;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.41px;
    color: var(--text-primary);
}

.token-card.is-expired {
    opacity: 0.5;
}

.token-card .token-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.token-expired-badge {
    color: var(--ios-red);
    font-weight: 500;
}

/* 记录列表响应式网格 */
.records-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 900px) {
    .records-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.record-card {
    width: 100%;
    padding-bottom: 16px;
    border-bottom: 0.5px solid var(--list-border);
    /* 用 fade-in 替代 slide-up 避免 scale 在大列表中的性能问题 */
    animation: fade-in 0.35s var(--spring-smooth) both;
}

.record-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.record-card .list-group {
    margin-bottom: 12px;
}

.record-card .section-title {
    margin-top: 12px;
    padding-left: 0;
}

.token-item {
    min-height: auto !important;
    padding: 14px 16px !important;
    gap: 12px;
}

.token-item.is-expired {
    opacity: 0.5;
}

.token-info {
    flex: 1;
    min-width: 0;
}

/* Subheadline: 15pt, Regular, -0.24pt tracking */
.token-note {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.24px;
    line-height: 20px;
    word-break: break-all;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.token-expired-badge {
    color: var(--ios-red);
    font-size: 12px;
    margin-left: 6px;
    font-weight: 500;
}

/* Caption 1: 12pt, Regular, 0pt tracking */
.token-url {
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 16px;
    color: var(--text-tertiary);
    font-family: SFMono-Regular, Menlo, monospace;
    word-break: break-all;
}

/* Caption 2: 11pt, Regular, 0.07pt tracking */
.token-expire {
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.07px;
    line-height: 13px;
    color: var(--text-tertiary);
    margin-top: 3px;
}

.token-actions {
    display: flex;
    gap: 0;
    flex-shrink: 0;
    align-items: center;
}

.token-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    font-size: 15px;
    font-weight: 400;
    border: none;
    cursor: pointer;
    background: none;
    color: var(--ios-blue);
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
}

.token-btn:active {
    opacity: 0.5;
}

.token-btn.danger {
    color: var(--ios-red);
}

.token-btn + .token-btn {
    border-left: 0.5px solid var(--glass-border);
}

.token-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: none;
}

/* ================= 15. Token Countdown ================= */
.token-countdown {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 6px 14px;
    background: rgba(10, 132, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--ios-blue);
    animation: fade-in 0.4s ease;
}

.token-countdown.urgent {
    background: rgba(255, 55, 95, 0.1);
    color: var(--ios-red);
    animation: pulse-urgent 1.5s ease-in-out infinite;
}

.token-countdown.expired {
    background: rgba(255, 55, 95, 0.15);
    color: var(--ios-red);
    animation: none;
}

@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ================= 16. Event List Page ================= */
.event-card {
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(40px) saturate(250%);
    -webkit-backdrop-filter: blur(40px) saturate(250%);
    border: 0.5px solid var(--glass-border);
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 16px;
    animation: scale-in 0.5s var(--spring-bouncy) both;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    /* Liquid Glass 多层光学效果 */
    box-shadow:
        inset 0 1px 0 var(--glass-highlight-edge),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06),
        inset 1px 0 0 rgba(255, 255, 255, 0.1),
        inset -1px 0 0 rgba(255, 255, 255, 0.1),
        0 2px 6px var(--glass-shadow),
        0 8px 24px rgba(0, 0, 0, 0.06),
        0 20px 48px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s var(--spring-interactive), box-shadow 0.3s var(--spring-interactive);
}

.event-card:active {
    transform: scale(0.98);
    box-shadow:
        inset 0 1px 0 var(--glass-highlight-edge),
        inset 0 -1px 0 rgba(0, 0, 0, 0.06),
        inset 0 0 16px var(--glass-glow),
        0 2px 6px var(--glass-shadow),
        0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Event Card 顶部光线折射带 */
.event-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--glass-highlight-edge), transparent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.event-card .card-bg {
    position: absolute;
    top: -10%;
    left: 0;
    width: 100%;
    height: 120%;
    z-index: 0;
    opacity: 0.35;
    border-radius: 28px;
    object-fit: cover;
    pointer-events: none;
}

.event-card .card-header,
.event-card .card-desc,
.event-card .schedule-hint,
.event-card .card-actions {
    position: relative;
    z-index: 1;
}

.event-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

/* Title 2: 22pt, Regular, 28pt leading, 0.35pt tracking */
.event-card .card-title {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: 0.35px;
    line-height: 28px;
    flex: 1;
}

/* Caption 1: 12pt, Regular, 0pt tracking */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 16px;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-open {
    background: rgba(48, 209, 88, 0.15);
    color: #30d158;
}

.status-closed,
.status-expired {
    background: rgba(255, 69, 58, 0.15);
    color: var(--ios-red);
}

.status-not_started {
    background: rgba(255, 159, 10, 0.15);
    color: #ff9f0a;
}

/* Subheadline: 15pt, Regular, 20pt leading, -0.24pt tracking */
.event-card .card-desc {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: -0.24px;
    line-height: 20px;
    display: block;
    margin-bottom: 12px;
}

/* Footnote: 13pt, Regular, -0.08pt tracking */
.event-card .schedule-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    margin-bottom: 16px;
    padding: 7px 14px;
    background: rgba(10, 132, 255, 0.1);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: -0.08px;
    line-height: 18px;
    color: var(--ios-blue);
    transition: background 0.3s, color 0.3s;
}

.event-card .schedule-hint.urgent {
    background: rgba(255, 55, 95, 0.1);
    color: var(--ios-red);
    animation: pulse-urgent 1.5s ease-in-out infinite;
}

.event-card .schedule-hint.expired {
    background: rgba(255, 55, 95, 0.15);
    color: var(--ios-red);
    animation: none;
}

.event-card .card-actions {
    display: flex;
    flex-direction: row;
    gap: 12px;
    margin-top: 20px;
    width: 100%;
}

/* iOS 26 Glass Button for event cards */
.event-card .card-actions a {
    flex: 1;
    height: 44px;
    border: none;
    /* iOS 26: Capsule shape */
    border-radius: 22px;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1;
    text-decoration: none;
    transition: transform 0.2s var(--spring-interactive), opacity 0.2s var(--spring-interactive), box-shadow 0.2s var(--spring-interactive);
    background: var(--list-bg);
    color: var(--ios-blue);
    white-space: nowrap;
    /* Liquid Glass 边框 */
    border: 0.5px solid var(--list-border);
}

.event-card .card-actions a:active {
    transform: scale(0.98);
    opacity: 0.8;
}

/* ================= 17. Upload Records List ================= */
.list-row:has(.record-info) {
    align-items: stretch;
}

.record-info {
    flex: 1;
    min-width: 0;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 10px 0;
    text-align: left;
}

/* Callout: 16pt, Regular, -0.32pt tracking */
.record-id {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: -0.32px;
    line-height: 21px;
    color: var(--text-primary);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: left;
}

/* Subheadline: 15pt, Regular, -0.24pt tracking */
.record-time {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.24px;
    line-height: 20px;
    color: var(--text-secondary);
    white-space: nowrap;
    text-align: left;
}

.token-actions:has(.token-btn) {
    align-self: stretch;
    display: flex;
    align-items: center;
}

@media (max-width: 480px) {
    #recordsList .record-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 6px 0;
    }
    #recordsList .record-id {
        font-size: 15px;
        flex: none;
        width: 100%;
    }
    #recordsList .record-time {
        font-size: 12px;
        white-space: normal;
    }
    #recordsList .token-actions {
        gap: 2px;
    }
    #recordsList .token-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* ================= 18. iOS 26 增强特性 ================= */

/* iOS 26 按压态优化 */
.pressed-scale {
    transition: transform 0.15s var(--spring-interactive);
}

.pressed-scale:active {
    transform: scale(0.97);
}

.pressed-opacity {
    transition: opacity 0.15s ease;
}

.pressed-opacity:active {
    opacity: 0.7;
}

/* iOS 26 输入框聚焦效果 */
input:focus,
.picker-trigger:focus {
    outline: none;
}

/* iOS 26 链接按压效果 */
a:active,
.btn-link:active {
    opacity: 0.4;
    transition: opacity 0.05s;
}

/* iOS 26 禁用态 */
[disabled],
.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* iOS 26 选中文本样式 */
::selection {
    background: rgba(0, 122, 255, 0.3);
    color: inherit;
}

/* iOS 26 平滑滚动 */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* iOS 26 触摸优化 */
@media (hover: none) and (pointer: coarse) {
    /* 触摸设备优化 */
    .btn-primary:active,
    .btn-secondary:active,
    .btn-danger:active {
        transform: scale(0.96);
        transition-duration: 0.1s;
    }

    .list-row:active,
    .clickable-row:active {
        background-color: var(--list-bg);
        transition-duration: 0.05s;
    }
}

/* ================= iOS 26 页面转场 (View Transitions API) ================= */
/*
   iOS 26 Liquid Glass navigation: 源页面向后微缩+模糊退出，
   目标页面从轻微放大中弹性进入，形成"纵深推进"的连贯感。
   Safari 18.2+ / Chrome 126+ / Edge 126+ 支持。
   不支持时降级为标准无动画导航 (Firefox 待定)。

   命名视图过渡元素 — 跨页面的共享 header 实现 morphing 效果。
   详情: https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API
*/
@supports (view-transition-name: none) {
  @media (prefers-reduced-motion: no-preference) {
    @view-transition {
      navigation: auto;
    }
  }

  /* iOS 26 Liquid Glass: 源页面退出 — 缩小 + 模糊 + 淡出 */
  ::view-transition-old(root) {
    animation: vt-page-out 0.35s cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  /* iOS 26 Liquid Glass: 目标页面进入 — 弹性放大 + 去模糊 + 淡入 */
  ::view-transition-new(root) {
    animation: vt-page-in 0.5s var(--spring-bouncy) 0.05s both;
  }
}

@keyframes vt-page-out {
  from {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
    filter: blur(4px);
  }
}

@keyframes vt-page-in {
  from {
    opacity: 0;
    transform: scale(1.03) translateY(4px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
    filter: blur(0);
  }
}
