/*
 * Hypnosis App - Enhanced Salt/Minimalist Style
 * 盐系极简 · 毛玻璃 · 日系白开水风
 */

:root {
    --hyp-bg: #fafafa;
    --hyp-surface: #ffffff;
    --hyp-glass: rgba(255,255,255,0.88);
    --hyp-glass-heavy: rgba(255,255,255,0.96);
    --hyp-border: rgba(0,0,0,0.06);
    --hyp-border-hover: rgba(0,0,0,0.13);
    --hyp-text: #2d2d2d;
    --hyp-text-s: #777;
    --hyp-text-m: #b0b0b0;
    --hyp-purple: #a89cc8;
    --hyp-purple-soft: rgba(168,156,200,0.13);
    --hyp-pink: #c8a0b0;
    --hyp-pink-soft: rgba(200,160,176,0.13);
    --hyp-danger: #d4a0a0;
    --hyp-danger-glow: rgba(212,160,160,0.5);
    --hyp-gold: #c8b878;
    --hyp-gold-soft: rgba(200,184,120,0.12);
    --hyp-shadow-xs: 0 1px 3px rgba(0,0,0,0.02);
    --hyp-shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
    --hyp-shadow-md: 0 8px 24px rgba(0,0,0,0.06);
    --hyp-blur: blur(20px);
    --hyp-blur-heavy: blur(30px);
    --hyp-radius: 12px;
    --hyp-radius-sm: 8px;
    --hyp-radius-lg: 16px;
    --hyp-ease: cubic-bezier(0.4,0,0.2,1);
    --hyp-ease-bounce: cubic-bezier(0.34,1.56,0.64,1);
    --hyp-ease-smooth: cubic-bezier(0.16,1,0.3,1);
    --safe-area-inset-bottom: env(safe-area-inset-bottom, 0px);

}

/* ===== 基础 ===== */
#hypnosisApp {
    background: var(--hyp-bg);
    font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', sans-serif;
    color: var(--hyp-text);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
        display: none;
    flex-direction: column;
    touch-action: none;
    overscroll-behavior: contain;
    /* 修复移动端高度遮挡关键：使用 dvh */
    height: 100dvh;
    max-height: 100dvh;
}


#hypnosisApp[style*="display: flex"],
#hypnosisApp.active {
    display: flex !important;
}

#hypnosisApp * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 自定义滚动条 */
#hypnosisApp ::-webkit-scrollbar { width: 3px; }
#hypnosisApp ::-webkit-scrollbar-track { background: transparent; }
#hypnosisApp ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 3px; }
.hyp-story-box,
.hyp-overlay-body,
.hyp-customize-page,
.hyp-grid {
    touch-action: pan-y;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

/* ===== 容器 ===== */
.hyp-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

/* ===== 顶部导航 ===== */
.hyp-nav {
    height: 56px;
    min-height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    background: var(--hyp-glass);
    backdrop-filter: var(--hyp-blur);
    -webkit-backdrop-filter: var(--hyp-blur);
    border-bottom: 1px solid var(--hyp-border);
    z-index: 10;
}

.hyp-nav-title {
    font-size: 13px;
    letter-spacing: 3px;
    font-weight: 400;
    color: var(--hyp-text-s);
    text-transform: uppercase;
}

.hyp-icon {
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: var(--hyp-text-s);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.25s var(--hyp-ease);
    user-select: none;
}

.hyp-icon:hover {
    background: rgba(0,0,0,0.04);
    color: var(--hyp-text);
}

.hyp-icon:active {
    transform: scale(0.9);
}

/* ===== 选角页面 ===== */
.hyp-page-header {
    padding: 30px 24px 10px;
    text-align: center;
}

.hyp-page-header h2 {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 4px;
    color: var(--hyp-text);
    margin-bottom: 6px;
}

.hyp-page-header p {
    font-size: 11px;
    color: var(--hyp-text-m);
    letter-spacing: 2px;
}

.hyp-grid {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 18px;
    overflow-y: auto;
    flex: 1;
}

.hyp-char-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 10px 4px;
    border-radius: var(--hyp-radius);
    transition: all 0.25s var(--hyp-ease);
}

.hyp-char-item:hover {
    background: rgba(0,0,0,0.02);
}

.hyp-char-item:active {
    transform: scale(0.95);
}

.hyp-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
    margin-bottom: 8px;
    border: 1.5px solid rgba(0,0,0,0.04);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 22px;
    transition: all 0.25s var(--hyp-ease);
    overflow: hidden;
}

.hyp-char-item:hover .hyp-avatar {
    border-color: rgba(0,0,0,0.1);
    box-shadow: var(--hyp-shadow-sm);
}

.hyp-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hyp-char-name {
    font-size: 11px;
    color: var(--hyp-text-s);
    text-align: center;
    line-height: 1.3;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ===== 身份选择页 ===== */
.hyp-identity-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 24px;
}

.hyp-identity-page .hyp-avatar {
    width: 88px;
    height: 88px;
    font-size: 36px;
    margin-bottom: 16px;
    border: 2px solid rgba(0,0,0,0.05);
}

.hyp-identity-page h2 {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 4px;
}

.hyp-identity-label {
    font-size: 11px;
    color: var(--hyp-text-m);
    letter-spacing: 2px;
    margin-bottom: 36px;
}

.hyp-identity-cards {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 360px;
}

.hyp-identity-card {
    flex: 1;
    padding: 24px 16px;
    text-align: center;
    background: var(--hyp-surface);
    border: 1.5px solid var(--hyp-border);
    border-radius: var(--hyp-radius-lg);
    cursor: pointer;
    transition: all 0.3s var(--hyp-ease);
    box-shadow: var(--hyp-shadow-xs);
}

.hyp-identity-card:hover {
    border-color: var(--hyp-border-hover);
    box-shadow: var(--hyp-shadow-md);
    transform: translateY(-2px);
}

.hyp-identity-card:active {
    transform: translateY(0) scale(0.98);
}

.hyp-identity-card .card-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}

.hyp-identity-card .card-title {
    font-size: 14px;
    font-weight: 500;
    color: var(--hyp-text);
    margin-bottom: 6px;
}

.hyp-identity-card .card-sub {
    font-size: 10px;
    color: var(--hyp-text-m);
    letter-spacing: 1px;
}

/* ===== 自定义设置页 ===== */
.hyp-customize-page {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px 24px;
    overflow-y: auto;
}

.hyp-form-group {
    margin-bottom: 20px;
}

.hyp-form-label {
    font-size: 11px;
    color: var(--hyp-text-m);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
    display: block;
}

.hyp-form-input {
    width: 100%;
    padding: 12px 14px;
    background: var(--hyp-surface);
    border: 1.5px solid var(--hyp-border);
    border-radius: var(--hyp-radius-sm);
    font-size: 14px;
    color: var(--hyp-text);
    outline: none;
    transition: border-color 0.25s var(--hyp-ease);
    font-family: inherit;
}

.hyp-form-input:focus {
    border-color: var(--hyp-border-hover);
}

.hyp-form-input::placeholder {
    color: var(--hyp-text-m);
}

textarea.hyp-form-input {
    resize: vertical;
    min-height: 60px;
    line-height: 1.5;
}

.hyp-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    cursor: pointer;
}

.hyp-checkbox-row .label-text {
    font-size: 13px;
    color: var(--hyp-text-s);
}

.hyp-checkbox-row .label-hint {
    font-size: 10px;
    color: var(--hyp-text-m);
    margin-left: auto;
}

/* iOS 风格开关 */
.hyp-toggle {
    position: relative;
    width: 42px;
    height: 24px;
    flex-shrink: 0;
}

.hyp-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.hyp-toggle-track {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #e0e0e0;
    border-radius: 12px;
    transition: background 0.25s var(--hyp-ease);
    cursor: pointer;
}

.hyp-toggle-track::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.25s var(--hyp-ease);
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.hyp-toggle input:checked + .hyp-toggle-track {
    background: var(--hyp-purple);
}

.hyp-toggle input:checked + .hyp-toggle-track::after {
    transform: translateX(18px);
}

.hyp-start-btn {
    width: 100%;
    padding: 16px;
    background: var(--hyp-text);
    color: white;
    border: none;
    border-radius: var(--hyp-radius);
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.25s var(--hyp-ease);
    margin-top: auto;
    margin-bottom: 20px;
}

.hyp-start-btn:hover {
    opacity: 0.85;
}

.hyp-start-btn:active {
    transform: scale(0.98);
}

/* ===== 剧情页面 ===== */
.hyp-story-box {
    flex: 1;
    padding: 16px 18px;
    padding-bottom: 20px;
    overflow-y: auto;
    background: linear-gradient(180deg, #fff 0%, var(--hyp-bg) 100%);
}




.hyp-msg-row {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    animation: hypFadeIn 0.4s var(--hyp-ease-smooth);
}

/* 旁白 */
.hyp-msg-row.narration {
    align-items: center;
    margin: 24px 0;
}

.hyp-narration-text {
    font-size: 12px;
    color: var(--hyp-text-m);
    font-style: italic;
    text-align: center;
    max-width: 85%;
    border-top: 1px solid rgba(0,0,0,0.04);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    padding: 10px 0;
    line-height: 1.7;
}

/* 气泡 */
.hyp-bubble {
    padding: 12px 16px;
    background: var(--hyp-surface);
    border: 1px solid var(--hyp-border);
    border-radius: var(--hyp-radius);
    box-shadow: var(--hyp-shadow-xs);
    font-size: 14px;
    line-height: 1.7;
    max-width: 82%;
    position: relative;
    word-break: break-word;
    transition: box-shadow 0.2s var(--hyp-ease);
}

.hyp-bubble:hover {
    box-shadow: var(--hyp-shadow-sm);
}


.hyp-bubble .bubble-name {
    font-size: 11px;
    color: var(--hyp-text-m);
    letter-spacing: 1px;
    margin-bottom: 4px;
    display: block;
}

.hyp-msg-row.user {
    align-items: flex-end;
}

.hyp-msg-row.user .hyp-bubble {
    background: #f5f5f5;
    border-color: rgba(0,0,0,0.04);
    border-bottom-right-radius: 4px;
}

.hyp-msg-row.char {
    align-items: flex-start;
}

.hyp-msg-row.char .hyp-bubble {
    border-bottom-left-radius: 4px;
}

/* 高维视角内心独白 */
.hyp-inner-thought {
    margin-top: 8px;
    padding: 8px 12px;
    background: var(--hyp-purple-soft);
    border-left: 2px solid var(--hyp-purple);
    border-radius: 0 var(--hyp-radius-sm) var(--hyp-radius-sm) 0;
    font-size: 12px;
    color: var(--hyp-text-s);
    font-style: italic;
    max-width: 82%;
    animation: hypFadeIn 0.5s var(--hyp-ease-smooth);
}

/* 系统提示 */
.hyp-system-toast {
    align-self: center;
    padding: 6px 16px;
    background: rgba(0,0,0,0.04);
    border-radius: 20px;
    font-size: 11px;
    color: var(--hyp-text-m);
    letter-spacing: 1px;
    margin: 12px 0;
}

/* ===== 选项面板 ===== */
.hyp-options-panel {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 14px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    background: var(--hyp-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--hyp-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999 !important;
    flex-shrink: 0;
    transform: translateY(0);
    transition: transform 0.3s var(--hyp-ease), opacity 0.3s var(--hyp-ease);
}

.hyp-options-panel.hidden-panel {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}



.hyp-opt-btn {
    padding: 13px 16px;
    text-align: center;
    background: var(--hyp-surface);
    border: 1.5px solid var(--hyp-border);
    border-radius: var(--hyp-radius-sm);
    font-size: 13px;
    color: var(--hyp-text-s);
    cursor: pointer;
    transition: all 0.2s var(--hyp-ease);
    box-shadow: var(--hyp-shadow-xs);
    line-height: 1.4;
    font-family: inherit;
    user-select: none;
}

.hyp-opt-btn:hover {
    border-color: var(--hyp-border-hover);
    color: var(--hyp-text);
    box-shadow: var(--hyp-shadow-sm);
}

.hyp-opt-btn:active {
    transform: scale(0.98);
    background: #f8f8f8;
}

/* 自定义输入行 */
.hyp-custom-row {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.hyp-custom-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--hyp-surface);
    border: 1.5px solid var(--hyp-border);
    border-radius: var(--hyp-radius-sm);
    font-size: 13px;
    color: var(--hyp-text);
    outline: none;
    font-family: inherit;
    transition: border-color 0.25s var(--hyp-ease);
}

.hyp-custom-input:focus {
    border-color: var(--hyp-border-hover);
}

.hyp-custom-input::placeholder {
    color: var(--hyp-text-m);
    font-size: 12px;
}

.hyp-send-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--hyp-text);
    color: white;
    border: none;
    border-radius: var(--hyp-radius-sm);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s var(--hyp-ease);
    flex-shrink: 0;
}

.hyp-send-btn:hover { opacity: 0.8; }
.hyp-send-btn:active { transform: scale(0.92); }
/* 重新生成 / 编辑按钮行 */
.hyp-regen-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 6px 0 2px;
}

.hyp-regen-btn {
    font-size: 11px;
    color: var(--hyp-text-m);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    transition: all 0.2s var(--hyp-ease);
    font-family: inherit;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.hyp-regen-btn:hover {
    color: var(--hyp-text-s);
    background: rgba(0,0,0,0.03);
}

.hyp-regen-btn:active {
    transform: scale(0.95);
}

.hyp-regen-btn .regen-icon {
    font-size: 13px;
    display: inline-block;
    transition: transform 0.3s var(--hyp-ease);
}

.hyp-regen-btn:hover .regen-icon {
    transform: rotate(180deg);
}

/* 编辑模式提示 */
.hyp-edit-hint {
    font-size: 11px;
    color: var(--hyp-purple);
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-align: center;
}

.hyp-edit-cancel {
    text-align: center;
    margin-top: 6px;
}

.hyp-edit-cancel button {
    font-size: 11px;
    color: var(--hyp-text-m);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 16px;
    font-family: inherit;
    transition: color 0.2s;
}

.hyp-edit-cancel button:hover {
    color: var(--hyp-text-s);
}

/* ===== ECG 开场动画 ===== */
.hyp-ecg-boot {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 50%, #1a1a1a 100%);

    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    animation: hypEcgBootIn 0.4s var(--hyp-ease);
}

.hyp-ecg-boot svg {
    width: 85%;
    max-width: 400px;
    height: 80px;
    margin-bottom: 30px;
}

.hyp-ecg-boot .ecg-path {
    fill: none;
    stroke: rgba(168,156,200,0.6);

    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: hypDrawEcg 2s ease-in-out 0.3s forwards;
}

.hyp-ecg-boot .boot-text {
    font-size: 11px;
    letter-spacing: 4px;
    color: rgba(200,200,200,0.5);
    text-transform: uppercase;
    opacity: 0;
    animation: hypBootText 0.6s ease 1.8s forwards;
}

.hyp-ecg-boot .boot-status {
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(200,200,200,0.3);
    margin-top: 8px;
    opacity: 0;
    animation: hypBootText 0.6s ease 2.2s forwards;
}

.hyp-ecg-boot.fade-out {
    animation: hypEcgBootOut 0.6s var(--hyp-ease) forwards;
}

/* ===== ECG 控制台 Overlay ===== */
.hyp-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--hyp-glass-heavy);
    backdrop-filter: var(--hyp-blur-heavy);
    -webkit-backdrop-filter: var(--hyp-blur-heavy);
    z-index: 50;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    animation: hypSlideUp 0.35s var(--hyp-ease-smooth);
}

.hyp-overlay-nav {
    height: 56px;
    min-height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--hyp-border);
}

.hyp-overlay-body {
    flex: 1;
    padding: 0 20px 30px;
    overflow-y: auto;
}

/* 角色信息卡 */
.hyp-profile-card {
    text-align: center;
    padding: 24px 0 20px;
    border-bottom: 1px solid var(--hyp-border);
    margin-bottom: 4px;
}

.hyp-profile-card .hyp-avatar {
    width: 72px;
    height: 72px;
    font-size: 30px;
    margin: 0 auto 12px;
}

.hyp-profile-card h3 {
    font-size: 18px;
    font-weight: 300;
    margin-bottom: 4px;
}

.hyp-profile-info {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.hyp-profile-tag {
    font-size: 11px;
    color: var(--hyp-text-m);
    padding: 4px 10px;
    background: rgba(0,0,0,0.02);
    border-radius: 20px;
    border: 1px solid var(--hyp-border);
}

.hyp-phase-badge {
    display: inline-block;
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--hyp-text-m);
    margin-top: 6px;
}

/* 分区标题 */
.hyp-section-title {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--hyp-text-m);
    margin: 22px 0 12px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hyp-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--hyp-border);
}

/* 数值条 */
.hyp-stat-item {
    margin-bottom: 14px;
}

.hyp-stat-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    margin-bottom: 5px;
    color: var(--hyp-text-s);
}

.hyp-stat-header .stat-val {
    font-variant-numeric: tabular-nums;
    min-width: 28px;
    text-align: right;
}

.hyp-progress-bg {
    height: 5px;
    background: rgba(0,0,0,0.04);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
    cursor: crosshair;
}

.hyp-progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s var(--hyp-ease);
    background: #ccc;
}

.hyp-progress-fill.purple { background: linear-gradient(90deg, var(--hyp-purple), rgba(168,156,200,0.65)); }
.hyp-progress-fill.pink { background: linear-gradient(90deg, var(--hyp-pink), rgba(200,160,176,0.65)); }
.hyp-progress-fill.danger {
    background: linear-gradient(90deg, var(--hyp-danger), rgba(212,130,130,0.8));
    box-shadow: 0 0 10px var(--hyp-danger-glow);
}
.hyp-progress-fill.gold { background: linear-gradient(90deg, var(--hyp-gold), rgba(200,184,120,0.65)); }


/* 敏感度区域 */
.hyp-sens-item {
    margin-bottom: 12px;
}

.hyp-sens-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    margin-bottom: 5px;
    color: var(--hyp-text-s);
}

.hyp-sens-header .orgasm-tag {
    font-size: 9px;
    color: var(--hyp-danger);
    letter-spacing: 1px;
    animation: hypPulse 1s ease infinite;
}

/* 滑动条 */
.hyp-range-wrap {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
}

.hyp-range-wrap input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    background: rgba(0,0,0,0.04);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.hyp-range-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border: 1.5px solid rgba(0,0,0,0.15);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.15s var(--hyp-ease);
}

.hyp-range-wrap input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    border-color: rgba(0,0,0,0.25);
}

/* 功能网格 */
.hyp-func-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.hyp-func-card {
    border: 1.5px solid var(--hyp-border);
    border-radius: var(--hyp-radius-sm);
    padding: 16px 6px;
    text-align: center;
    font-size: 11px;
    color: var(--hyp-text-s);
    cursor: pointer;
    background: var(--hyp-surface);
    transition: all 0.25s var(--hyp-ease);
    line-height: 1.3;
}

.hyp-func-card .func-icon {
    font-size: 20px;
    display: block;
    margin-bottom: 6px;
}

.hyp-func-card:hover {
    border-color: var(--hyp-border-hover);
    box-shadow: var(--hyp-shadow-sm);
}

.hyp-func-card:active {
    transform: scale(0.96);
}

.hyp-func-card.active {
    border-color: var(--hyp-text);
    background: var(--hyp-text);
    color: white;
}

.hyp-func-card.disabled {
    opacity: 0.4;
    pointer-events: none;
}
.hyp-func-card.readonly {
    opacity: 0.7;
    cursor: default;
    border-style: dashed;
}

.hyp-func-card.readonly:hover {
    border-color: var(--hyp-border);
    box-shadow: none;
    transform: none;
}

.hyp-func-card.readonly:active {
    transform: none;
}

/* 功能详情面板 */
.hyp-func-detail {
    margin-top: 12px;
    padding: 16px;
    background: rgba(0,0,0,0.02);
    border-radius: var(--hyp-radius);
    border: 1px solid var(--hyp-border);
    animation: hypFadeIn 0.3s var(--hyp-ease);
}


.hyp-func-detail .detail-title {
    font-size: 12px;
    font-weight: 500;
    color: var(--hyp-text);
    margin-bottom: 6px;
}

.hyp-func-detail .detail-desc {
    font-size: 11px;
    color: var(--hyp-text-m);
    line-height: 1.6;
    margin-bottom: 12px;
}

.hyp-func-detail .hyp-form-input {
    margin-bottom: 8px;
}

.hyp-func-detail .exec-btn {
    width: 100%;
    padding: 11px;
    background: var(--hyp-text);
    color: white;
    border: none;
    border-radius: var(--hyp-radius-sm);
    font-size: 12px;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.2s var(--hyp-ease);
    font-family: inherit;
}

.hyp-func-detail .exec-btn:hover { opacity: 0.8; }
.hyp-func-detail .exec-btn:active { transform: scale(0.98); }

/* 上帝模式 / 金手指面板 */
.hyp-god-panel {
    margin-top: 12px;
    padding: 16px;
    background: var(--hyp-gold-soft);
    border: 1.5px dashed var(--hyp-gold);
    border-radius: var(--hyp-radius);
    animation: hypFadeIn 0.3s var(--hyp-ease);
}

.hyp-god-panel .god-title {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--hyp-gold);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hyp-god-panel .hyp-form-input {
    border-color: rgba(200,184,120,0.3);
    margin-bottom: 8px;
}

/* 上帝视角 - 被催眠者看到的指令 */
.hyp-god-view {
    margin-top: 12px;
    padding: 14px;
    background: rgba(168,156,200,0.06);
    border: 1px solid rgba(168,156,200,0.15);
    border-radius: var(--hyp-radius);
}

.hyp-god-view .gv-title {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--hyp-purple);
    margin-bottom: 8px;
}

.hyp-god-view .gv-item {
    font-size: 12px;
    color: var(--hyp-text-s);
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    line-height: 1.5;
}

.hyp-god-view .gv-item:last-child {
    border-bottom: none;
}

/* ===== 结束确认弹窗 ===== */
.hyp-modal-mask {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 80;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: hypFadeIn 0.25s var(--hyp-ease);
}

.hyp-modal {
    width: 85%;
    max-width: 320px;
    background: var(--hyp-surface);
    border-radius: var(--hyp-radius-lg);
    padding: 28px 24px;
    box-shadow: var(--hyp-shadow-md);
    text-align: center;
    animation: hypModalIn 0.35s var(--hyp-ease-bounce);
}

.hyp-modal h3 {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 8px;
}

.hyp-modal p {
    font-size: 12px;
    color: var(--hyp-text-s);
    line-height: 1.6;
    margin-bottom: 24px;
}

.hyp-modal-btns {
    display: flex;
    gap: 10px;
}

.hyp-modal-btns button {
    flex: 1;
    padding: 12px;
    border: 1.5px solid var(--hyp-border);
    border-radius: var(--hyp-radius-sm);
    background: var(--hyp-surface);
    font-size: 13px;
    color: var(--hyp-text-s);
    cursor: pointer;
    transition: all 0.2s var(--hyp-ease);
    font-family: inherit;
}

.hyp-modal-btns button:hover {
    border-color: var(--hyp-border-hover);
}

.hyp-modal-btns button.primary {
    background: var(--hyp-text);
    color: white;
    border-color: var(--hyp-text);
}

/* ===== 加载指示器 ===== */
.hyp-typing {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px;
    max-width: 60px;
}

.hyp-typing span {
    width: 5px;
    height: 5px;
    background: var(--hyp-text-m);
    border-radius: 50%;
    animation: hypTyping 1.2s ease infinite;
}

.hyp-typing span:nth-child(2) { animation-delay: 0.15s; }
.hyp-typing span:nth-child(3) { animation-delay: 0.3s; }

/* ===== 动画 ===== */
@keyframes hypFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hypSlideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hypModalIn {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes hypPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes hypTyping {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30% { opacity: 1; transform: translateY(-3px); }
}

@keyframes hypDrawEcg {
    to { stroke-dashoffset: 0; }
}

@keyframes hypBootText {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hypEcgBootIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hypEcgBootOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* ===== 数值变化闪烁 ===== */
.hyp-stat-flash {
    animation: hypStatFlash 0.6s ease;
}

@keyframes hypStatFlash {
    0% { background: rgba(168,156,200,0.15); }
    100% { background: transparent; }
}
