        /* === 模式切换标签栏 === */
        .mode-select {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 20px;
            background: var(--overlay-bg);
            padding: 5px;
            border-radius: 12px;
        }
        .mode-btn {
            flex: 1;
            min-width: 0;
            padding: 10px;
            border: none;
            background: transparent;
            color: var(--text-muted);
            border-radius: 8px;
            cursor: pointer;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .mode-btn.active {
            background: var(--surface-color);
            color: var(--accent-color);
            box-shadow: 0 2px 10px rgba(118, 75, 162, 0.2);
        }

        /* === 时间戳子模式切换按钮 === */
        .ts-sub-btn {
            flex: 1;
            padding: 8px 12px;
            border: none;
            background: transparent;
            color: var(--text-secondary);
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.85rem;
            font-weight: 600;
            transition: all 0.3s ease;
        }
        .ts-sub-btn.active {
            background: var(--surface-color);
            color: var(--accent-color);
            box-shadow: 0 1px 6px rgba(118, 75, 162, 0.15);
        }

        /* === 操作按钮 === */
        button.action-btn {
            flex: 1;
            padding: 14px;
            border: none;
            border-radius: 12px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        .btn-calc {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
            color: white;
            box-shadow: 0 4px 15px rgba(118, 75, 162, 0.3);
        }
        .btn-calc:hover {
            transform: scale(1.02);
            box-shadow: 0 6px 20px rgba(118, 75, 162, 0.4);
        }
        .btn-reset {
            background: var(--surface-color);
            color: var(--text-secondary);
            border: 1px solid rgba(0,0,0,0.1);
        }
        .btn-reset:hover {
            background: var(--btn-hover-bg);
            color: var(--text-color);
        }

        /* === 功能区块容器（初始淡入动画） === */
        .section {
            margin-bottom: 1.5rem;
            animation: fadeIn 0.5s ease;
        }
        .is-hidden {
            display: none !important;
        }
        .field-block {
            margin-top: 15px;
        }
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* === 帮助切换按钮（右上角 ? 图标） === */
        .help-toggle {
            position: absolute;
            top: 0;
            right: 0;
            width: 40px;
            height: 40px;
            border-radius: 0 20px 0 50%;
            border: 1.5px solid rgba(102, 126, 234, 0.35);
            background: rgba(255,255,255,0.75);
            color: var(--primary-color);
            font-size: 1.05rem;
            font-weight: 700;
            cursor: pointer;
            z-index: 10;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            padding: 0;
            line-height: 1;
        }
        @media (hover: hover) {
            .help-toggle:hover {
                background: var(--primary-color);
                color: #fff;
            }
        }
        .help-toggle:active {
            background: var(--primary-color);
            color: #fff;
        }
        .help-toggle.open {
            background: var(--primary-color);
            color: #fff;
        }

        /* === 帮助面板：从右侧滑出，毛玻璃材质 === */
        .help-panel {
            position: absolute;
            left: 100%;
            top: 0;
            width: 360px;
            max-width: 85vw;
            height: 100%;
            background: var(--glass-bg);
            backdrop-filter: blur(var(--glass-blur));
            -webkit-backdrop-filter: blur(var(--glass-blur));
            border: 1px solid var(--glass-border);
            z-index: 7;
            padding: 25px 22px 20px;
            box-sizing: border-box;
            transform: translateX(-30px);
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity 0.3s ease;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: rgba(118, 75, 162, 0.34) transparent;
            scrollbar-gutter: stable;
            border-radius: 20px;
            box-shadow: 4px 0 20px rgba(0,0,0,0.15);
        }
        .help-panel::-webkit-scrollbar {
            width: 10px;
        }
        .help-panel::-webkit-scrollbar-track {
            background: transparent;
            margin: 18px 0;
        }
        .help-panel::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(102, 126, 234, 0.34), rgba(118, 75, 162, 0.34));
            border: 3px solid transparent;
            border-radius: 999px;
            background-clip: padding-box;
        }
        .help-panel::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, rgba(102, 126, 234, 0.52), rgba(118, 75, 162, 0.52));
            border: 3px solid transparent;
            background-clip: padding-box;
        }
        .help-panel.show {
            transform: translateX(15px);
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

                /* === 表单标签 === */
        label {
            display: block;
            margin-bottom: 8px;
            color: var(--label-color);
            font-weight: 500;
            font-size: 0.95rem;
        }

        /* === 日期 / 数字输入框 === */
        input[type="date"], input[type="number"], input[type="text"] {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid rgba(255,255,255,0.6);
            border-radius: 10px;
            box-sizing: border-box;
            font-size: 1rem;
            background: var(--input-bg);
            transition: all 0.3s ease;
            color: var(--text-color);
        }

        /* === 输入框聚焦态：蓝色边框 + 外发光 === */
        input:focus {
            outline: none;
            border-color: var(--primary-color);
            background: var(--surface-color);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
        }

        /* 隐藏数字输入框的原生调节箭头，使用自定义步进按钮保持明暗主题一致 */
        input[type="number"]::-webkit-inner-spin-button,
        input[type="number"]::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }
        input[type="number"] {
            -moz-appearance: textfield;
            appearance: textfield;
        }
        #math-expression {
            font-family: 'Consolas', 'Segoe UI', 'Microsoft YaHei', monospace;
        }

/* === 复选框/单选框行（半透明底） === */
        .checkbox-group {
            display: flex;
            align-items: center;
            margin-top: 12px;
            padding: 10px;
            background: rgba(255,255,255,0.4);
            border-radius: 8px;
        }
        .ts-sub-switcher {
            padding: 4px;
        }
        .radio-offset {
            margin-left: 20px;
        }
        .time-input-label {
            margin-top: 15px;
        }
        .time-input-row {
            display: flex;
            gap: 4px;
            align-items: center;
            margin-top: 6px;
        }
        .time-input {
            text-align: center;
            padding: 10px 5px;
            padding-right: 30px;
        }
        .time-separator {
            font-weight: 600;
            color: #888;
        }
        .stepper-field {
            position: relative;
            width: 100%;
        }
        .stepper-field input[type="number"] {
            padding-right: 42px;
        }
        .time-stepper {
            flex: 1;
            min-width: 50px;
        }
        .time-stepper input[type="number"] {
            padding-left: 8px;
            padding-right: 26px;
        }
        .stepper-controls {
            position: absolute;
            top: 5px;
            right: 5px;
            bottom: 5px;
            width: 28px;
            display: grid;
            grid-template-rows: 1fr 1fr;
            gap: 3px;
        }
        .time-stepper .stepper-controls {
            width: 22px;
            right: 4px;
            top: 4px;
            bottom: 4px;
            gap: 2px;
        }
        .stepper-btn {
            border: 1px solid rgba(102, 126, 234, 0.25);
            border-radius: 6px;
            background: rgba(255,255,255,0.36);
            color: var(--accent-color);
            cursor: pointer;
            font-size: 0.75rem;
            font-weight: 800;
            line-height: 1;
            padding: 0;
            transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.1s ease;
        }
        .time-stepper .stepper-btn {
            border-radius: 5px;
            font-size: 0.68rem;
        }
        .stepper-btn:hover {
            background: var(--surface-color);
            border-color: var(--primary-color);
            color: var(--primary-color);
        }
        .stepper-btn:active {
            transform: scale(0.94);
        }
        .stepper-btn:focus-visible {
            outline: 2px solid var(--primary-color);
            outline-offset: 1px;
        }
        .helper-text-spaced {
            margin-bottom: 8px;
        }
        .ts-card-grid {
            display: flex;
            gap: 10px;
        }

        /* === 操作按钮组（横向排列，手机端纵向） === */
        .btn-group {
            display: flex;
            gap: 15px;
            margin-top: 25px;
        }

        /* === 结果展示卡片：默认隐藏，显示时弹入动画 === */
        .result {
            margin-top: 20px;
            padding: 1.5rem;
            background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.6));
            border: 1px solid rgba(255,255,255,0.8);
            border-radius: 12px;
            text-align: center;
            box-shadow: inset 0 2px 10px rgba(255,255,255,0.5);
            display: none;
            animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .result.visible {
            display: block;
        }

        @keyframes popIn {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }

        /* === 复选框/单选框组 === */
        .checkbox-group input {
            width: 18px;
            height: 18px;
            margin-right: 10px;
            cursor: pointer;
            accent-color: var(--primary-color);
        }
        .checkbox-group label {
            margin: 0;
            cursor: pointer;
            font-size: 0.9rem;
        }

        /* === 使用说明面板内的文字内容 === */
        .instructions {
            margin-top: 0;
            padding-top: 0;
            border-top: none;
            font-size: 0.85rem;
            color: var(--label-color);
            line-height: 1.6;
        }
        .instructions h3 {
            margin: 0 0 10px 0;
            font-size: 1rem;
            color: var(--heading-color);
        }
        .instructions h4 {
            margin: 14px 0 6px 0;
            font-size: 0.9rem;
            color: var(--heading-color);
        }
        .instructions p {
            margin: 0 0 8px 0;
            font-size: 0.85rem;
        }
        .instructions ul {
            padding-left: 20px;
            margin: 0;
        }
        .instructions li {
            margin-bottom: 5px;
        }
        .instructions-icon {
            vertical-align: -2px;
            margin-right: 2px;
        }
        .instructions-icon-lg {
            vertical-align: -3px;
            margin-right: 2px;
        }

        /* === 主题切换：滑动轨道 + 跟随系统（单行并排） === */
        /* === 主题切换：固定在页面右上角 === */
        .theme-switch-row {
            position: fixed;
            top: 16px;
            right: 20px;
            z-index: 100;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* SVG 线条图标：太阳/月亮 */
        .theme-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            color: #aaa;
            transition: color 0.3s ease;
        }
        .theme-icon-sun.active {
            color: #e6a817;
        }
        .theme-icon-moon.active {
            color: #818cf8;
        }

        /* 滑动轨道（缩小版） */
        .theme-track {
            position: relative;
            width: 44px;
            height: 22px;
            border-radius: 22px;
            background: linear-gradient(135deg, #667eea, #764ba2);
            cursor: pointer;
            transition: background 0.4s ease, box-shadow 0.4s ease;
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
            flex-shrink: 0;
        }
        .theme-track.dark {
            background: linear-gradient(135deg, #2a2a3e, #1a1a2e);
            box-shadow: inset 0 1px 2px rgba(0,0,0,0.4);
        }

        /* 胶囊滑块 */
        .theme-thumb {
            position: absolute;
            top: 3px;
            left: 3px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #fff;
            box-shadow: 0 1px 4px rgba(0,0,0,0.2);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                        box-shadow 0.3s ease;
        }
        .theme-track.dark .theme-thumb {
            transform: translateX(22px);
            box-shadow: 0 1px 4px rgba(0,0,0,0.35), 0 0 4px rgba(255,255,255,0.1);
        }

        /* 聚焦态 */
        .theme-track:focus-visible {
            outline: 2px solid var(--primary-color);
            outline-offset: 2px;
        }

        /* 跟随系统复选框：并排在轨道右侧，勾选后实时跟随系统主题 */
        .theme-auto-label {
            display: flex;
            align-items: center;
            gap: 4px;
            cursor: pointer;
            font-size: 0.78rem;
            color: var(--text-secondary);
            user-select: none;
            white-space: nowrap;
            margin-left: 6px;
        }
        .theme-auto-label input[type="checkbox"] {
            width: auto;
            height: auto;
            margin: 0;
            cursor: pointer;
            accent-color: var(--primary-color);
            vertical-align: middle;
            position: relative;
            top: 3px;
        }
        .theme-auto-text {
            color: var(--text-secondary);
            transition: color 0.3s ease;
            position: relative;
            top: 2px;
        }
        .theme-auto-label input:checked + .theme-auto-text {
            color: var(--primary-color);
            font-weight: 600;
        }
