 /* ==================== 基础重置 ==================== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --red-main: #D9534F;
            --red-light: #F5E6E6;
            --red-dark: #B8433F;
            --white-jade: #F9F9F9;
            --green-ink: #2F4F4F;
            --green-light: #4A6B6B;
            --gold: #C9A86C;
            --gold-light: #E8D4A8;
            --text-main: #3D3D3D;
            --text-light: #6B6B6B;
            --text-red: #B8433F;
            --bg-cream: #FDF8F5;
        }

        body {
    font-family: 'FangSong', 'STFangsong', '仿宋', 'Songti SC', serif;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: var(--bg-cream);
}
.optional-tag {
    font-size: 12px;
    color: var(--text-light);
    font-weight: normal;
}


        /* ==================== 游戏容器 ==================== */
        .game-container {
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    background: linear-gradient(180deg, var(--white-jade) 0%, var(--bg-cream) 100%);
    position: relative;
    overflow: hidden;
}

/* 手机端保持卡片样式 */
@media (max-width: 500px) {
    .game-container {
        border-radius: 0;
        border: none;
        box-shadow: none;
    }
}

/* 平板和电脑端 */
@media (min-width: 501px) {
    .action-drawer {
        left: 50% !important;
        right: auto !important;
        width: 100% !important;
        max-width: 800px !important;
        transform: translateX(-50%) translateY(100%) !important;
    }
    
    .action-drawer.active {
        transform: translateX(-50%) translateY(0) !important;
    }
}


@media (min-width: 1024px) {
    .action-drawer {
        max-width: 900px;
    }
}

@media (max-width: 500px) {
    .action-drawer.active {
        transform: translateY(0);
    }
}

.generating-inline {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 30px 20px;
    margin: 20px auto;
    background: linear-gradient(135deg, var(--white-jade), var(--bg-cream));
    border: 1px solid rgba(47,79,79,0.2);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(47,79,79,0.08);
    max-width: 280px;
    text-align: center;
    position: relative;
    z-index: 1;
}


.generating-text {
    font-size: 13px;
    color: var(--text-light);
    letter-spacing: 1px;
}

.generating-timer {
    font-size: 12px;
    color: var(--text-light);
    opacity: 0.7;
}

.generating-dot {
    display: inline-block;
    animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

.generating-inline .btn-retry,
.generating-inline .btn-cancel {
    margin-top: 0;
    margin-left: 8px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    border: 1px solid rgba(47,79,79,0.3);
    background: transparent;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.generating-inline .btn-cancel:hover {
    border-color: var(--red-main);
    color: var(--red-main);
}

.story-divider {
    text-align: center;
    color: #ccc;
    margin: 20px 0;
    text-indent: 0 !important;
}


        /* ==================== 页面通用 ==================== */
        .page {
            display: none;
            flex-direction: column;
            min-height: 100vh;
            position: relative;
        }

        .page.active {
            display: flex;
        }

        /* ==================== 装饰线 ==================== */
        .decor-line {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin: 20px 0;
        }

        .decor-line::before,
        .decor-line::after {
            content: '';
            flex: 1;
            height: 1px;
            background: linear-gradient(90deg, transparent, var(--green-ink), transparent);
        }

        .decor-line svg {
            width: 20px;
            height: 20px;
            fill: var(--red-main);
        }

        /* ==================== 首页 ==================== */
        #homePage {
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 25px 20px;
        }

        .game-logo {
            width: 100px;
            height: 100px;
            margin-bottom: 25px;
            animation: float 4s ease-in-out infinite;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }

        .game-title {
            font-size: 28px;
            color: var(--text-main);
            letter-spacing: 6px;
            margin-bottom: 8px;
        }

        .game-subtitle {
            font-size: 14px;
            color: var(--text-light);
            letter-spacing: 4px;
            margin-bottom: 40px;
        }

        /* 按钮 */
        .btn {
            padding: 14px 40px;
            border: 2px solid var(--green-ink);
            border-radius: 8px;
            font-family: inherit;
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            width: 200px;
            margin-bottom: 15px;
            letter-spacing: 2px;
        }

        .btn svg {
            width: 18px;
            height: 18px;
        }

        .btn-primary {
            background: linear-gradient(135deg, var(--red-main) 0%, var(--red-dark) 100%);
            color: var(--white-jade);
            box-shadow: 0 4px 15px rgba(217, 83, 79, 0.3);
        }

        .btn-primary svg {
            fill: var(--white-jade);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(217, 83, 79, 0.4);
        }

        .btn-secondary {
            background: linear-gradient(135deg, var(--white-jade) 0%, var(--red-light) 100%);
            color: var(--text-main);
        }

        .btn-secondary svg {
            fill: var(--green-ink);
        }

        .btn-secondary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(47, 79, 79, 0.15);
        }

        .version {
            position: absolute;
            bottom: 20px;
            font-size: 12px;
            color: var(--text-light);
        }

        /* ==================== 设定页 ==================== */
        #setupPage {
            padding: 20px;
        }

        .page-header {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 1px solid rgba(47, 79, 79, 0.2);
        }

        .back-btn {
            background: none;
            border: 1px solid var(--green-ink);
            cursor: pointer;
            padding: 8px;
            border-radius: 8px;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        /* 本旬事件卡片 */
.turn-event-card {
    background: linear-gradient(135deg, var(--white-jade) 0%, var(--bg-cream) 100%);
    border: 1px solid rgba(47, 79, 79, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.turn-event-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}


        .back-btn:hover {
            background: var(--red-light);
        }

        .back-btn svg {
            width: 20px;
            height: 20px;
            fill: var(--green-ink);
        }

        .page-title {
            font-size: 20px;
            color: var(--text-main);
            margin-left: 15px;
            letter-spacing: 4px;
        }

        .setup-section {
            margin-bottom: 25px;
        }

        .section-title {
            font-size: 15px;
            color: var(--text-main);
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
            padding-left: 10px;
            border-left: 3px solid var(--red-main);
        }

        .section-title svg {
            width: 16px;
            height: 16px;
            fill: var(--red-main);
        }

        .text-input {
            width: 100%;
            background: var(--white-jade);
            border: 1px solid var(--green-ink);
            border-radius: 8px;
            padding: 12px 15px;
            font-family: inherit;
            font-size: 15px;
            color: var(--text-main);
            outline: none;
            transition: all 0.3s ease;
        }

        .text-input:focus {
            border-color: var(--red-main);
            box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.1);
        }

        .text-area {
            width: 100%;
            min-height: 100px;
            background: var(--white-jade);
            border: 1px solid var(--green-ink);
            border-radius: 8px;
            padding: 12px 15px;
            font-family: inherit;
            font-size: 14px;
            color: var(--text-main);
            outline: none;
            resize: vertical;
            line-height: 1.6;
        }

        .text-area:focus {
            border-color: var(--red-main);
            box-shadow: 0 0 0 3px rgba(217, 83, 79, 0.1);
        }

        .input-hint {
            font-size: 12px;
            color: var(--text-light);
            margin-top: 6px;
        }

        /* 出身卡片 */
        .origin-cards {
            display: flex;
            flex-direction: column;
            gap: 10px;
            max-height: 300px;
            overflow-y: auto;
        }

        .origin-card {
            background: var(--white-jade);
            border: 1px solid var(--green-ink);
            border-radius: 10px;
            padding: 12px 15px;
            cursor: pointer;
            transition: all 0.3s ease;
            position: relative;
        }

        .origin-card:hover {
            border-color: var(--red-main);
            box-shadow: 0 4px 15px rgba(217, 83, 79, 0.15);
        }

        .origin-card.selected {
            border-color: var(--red-main);
            background: linear-gradient(135deg, var(--white-jade) 0%, var(--red-light) 100%);
            border-width: 2px;
        }

        .origin-card-title {
            font-size: 15px;
            color: var(--text-main);
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .origin-card-title svg {
            width: 14px;
            height: 14px;
            fill: var(--red-main);
        }

        .origin-card-desc {
            font-size: 12px;
            color: var(--text-light);
            line-height: 1.4;
        }

        .origin-card-bonus {
            font-size: 11px;
            color: var(--red-main);
            margin-top: 6px;
            padding: 3px 8px;
            background: rgba(217, 83, 79, 0.1);
            border-radius: 4px;
            display: inline-block;
        }

        .custom-origin-input {
            margin-top: 10px;
            display: none;
        }

        .custom-origin-input.show {
            display: block;
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        .setup-scroll {
            flex: 1;
            overflow-y: auto;
            padding-bottom: 80px;
        }

        .start-btn-container {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            padding: 15px 20px;
            background: linear-gradient(0deg, var(--bg-cream) 80%, transparent);
            display: flex;
            justify-content: center;
        }

        /* ==================== 游戏主页 ==================== */
        #gamePage {
            display: none;
            flex-direction: column;
           height: 100vh;
        }

        #gamePage.active {
            display: flex;
        }

        /* 顶部时间栏 */
        .time-bar {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 15px;
            background: linear-gradient(135deg, var(--green-ink) 0%, var(--green-light) 100%);
            color: var(--white-jade);
        }

        .time-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .time-text {
            font-size: 14px;
            letter-spacing: 2px;
        }

        .weather-text {
            font-size: 12px;
            opacity: 0.8;
        }

        .header-buttons {
            display: flex;
            gap: 8px;
        }

        .icon-btn {
            width: 32px;
            height: 32px;
            background: rgba(255, 255, 255, 0.15);
            border: 1px solid rgba(255, 255, 255, 0.3);
            border-radius: 6px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
        }

        .icon-btn svg {
            width: 16px;
            height: 16px;
            fill: var(--white-jade);
        }

        .icon-btn:hover {
            background: rgba(255, 255, 255, 0.25);
        }

        /* 主内容区 */
        .main-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        /* 游戏视图（剧情+行动） */
        .game-view {
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 12px;
            overflow: hidden;
        }

        .game-view.hidden {
            display: none;
        }

        /* 剧情区域 */
        .story-area {
            flex: 1;
            background: var(--white-jade);
            border: 1px solid rgba(47, 79, 79, 0.3);
            border-radius: 12px;
            padding: 15px;
            overflow-y: auto;
            margin-bottom: 10px;
        }

        .story-content {
            font-size: 15px;
            color: var(--text-main);
            line-height: 1.9;
        }

        .story-content p {
            margin-bottom: 12px;
            text-indent: 2em;
        }

        .story-content .dialogue {
            color: var(--green-ink);
            text-indent: 0;
        }

        .story-content .guide-box {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--white-jade) 100%);
    border: 1px solid var(--gold);
    border-radius: 8px;
    padding: 12px;
    margin-top: 15px;
    text-indent: 0;
}

.story-content .guide-box .guide-title {
    font-size: 13px;
    color: var(--gold);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.story-content .guide-box ul {
    font-size: 12px;
    color: var(--text-main);
    padding-left: 20px;
    margin: 0;
}

.story-content .guide-box li {
    margin-bottom: 4px;
}


        .story-loading {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px;
            color: var(--text-light);
        }

        .story-loading-spinner {
            width: 35px;
            height: 35px;
            border: 2px solid var(--red-light);
            border-top-color: var(--red-main);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 12px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* 状态栏 */
        .status-bar {
            display: flex;
            justify-content: space-around;
            padding: 8px 10px;
            background: linear-gradient(135deg, var(--red-light) 0%, var(--white-jade) 100%);
            border-radius: 8px;
            margin-bottom: 10px;
            border: 1px solid rgba(47, 79, 79, 0.2);
        }

        .status-item {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 12px;
            color: var(--text-main);
        }

        .status-item svg {
            width: 14px;
            height: 14px;
        }

        /* 行动区域 */
        .action-area {
            background: var(--white-jade);
            border: 1px solid var(--green-ink);
            border-radius: 10px;
            padding: 12px;
        }

        .action-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .action-title {
            font-size: 14px;
            color: var(--text-main);
            letter-spacing: 2px;
        }

        .action-points {
            display: flex;
            gap: 4px;
        }

        .action-point {
            width: 10px;
            height: 10px;
            background: var(--red-main);
            border-radius: 50%;
        }

        .action-point.used {
            background: #ccc;
        }

        .action-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 8px;
            margin-bottom: 10px;
        }

        .action-btn {
            background: var(--white-jade);
            border: 1px solid var(--green-ink);
            border-radius: 8px;
            padding: 10px 5px;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
        }

        .action-btn svg {
            width: 20px;
            height: 20px;
            fill: var(--green-ink);
        }

        .action-btn span {
            font-size: 11px;
            color: var(--text-main);
            font-family: inherit;
        }

        .action-btn:hover {
            border-color: var(--red-main);
            background: var(--red-light);
        }

        .action-btn:hover svg {
            fill: var(--red-main);
        }

        .action-btn.danger {
            border-color: var(--red-main);
            background: rgba(217, 83, 79, 0.1);
        }

        .action-btn.danger svg {
            fill: var(--red-main);
        }

        .action-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .end-turn-btn {
            width: 100%;
            padding: 10px;
            background: linear-gradient(135deg, var(--green-ink) 0%, var(--green-light) 100%);
            border: none;
            border-radius: 8px;
            color: var(--white-jade);
            font-family: inherit;
            font-size: 14px;
            letter-spacing: 2px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .end-turn-btn:hover {
            box-shadow: 0 4px 15px rgba(47, 79, 79, 0.3);
        }

        .end-turn-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        /* ==================== 面板视图（Tab切换） ==================== */
        .panel-view {
            flex: 1;
            display: none;
            flex-direction: column;
            overflow: hidden;
        }

        .panel-view.active {
            display: flex;
        }

        .panel-header {
            display: flex;
            align-items: center;
            padding: 12px 15px;
            background: linear-gradient(135deg, var(--red-light) 0%, var(--white-jade) 100%);
            border-bottom: 1px solid rgba(47, 79, 79, 0.2);
        }

        .panel-actions {
    margin-left: auto;
}

.panel-action-btn {
    padding: 6px 14px;
    background: var(--white-jade);
    border: 1px solid var(--green-ink);
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
}

.panel-action-btn:hover {
    background: var(--red-light);
    border-color: var(--red-main);
    color: var(--red-main);
}

        .panel-back-btn {
            background: none;
            border: 1px solid var(--green-ink);
            cursor: pointer;
            padding: 6px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 10px;
        }

        .panel-back-btn svg {
            width: 16px;
            height: 16px;
            fill: var(--green-ink);
        }

        .panel-title {
            font-size: 16px;
            color: var(--text-main);
            letter-spacing: 2px;
        }

        .panel-content {
            flex: 1;
            overflow-y: auto;
            padding: 15px;
        }

        /* 底部导航 */
        .bottom-nav {
            display: flex;
            justify-content: space-around;
            padding: 10px 5px;
            background: linear-gradient(180deg, var(--white-jade) 0%, var(--red-light) 100%);
            border-top: 1px solid rgba(47, 79, 79, 0.2);
        }

        .nav-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 6px 12px;
            border-radius: 8px;
            color: var(--text-light);
            transition: all 0.3s ease;
        }

        .nav-btn.active {
            color: var(--red-main);
            background: rgba(217, 83, 79, 0.1);
        }

        .nav-btn svg {
            width: 20px;
            height: 20px;
            fill: currentColor;
        }

        .nav-btn span {
            font-size: 10px;
            font-family: inherit;
        }

        /* 秘密卡片 */
.secret-card {
    background: linear-gradient(135deg, var(--white-jade) 0%, #FFF8F0 100%);
    border: 1px solid rgba(47, 79, 79, 0.2);
    border-left: 3px solid var(--red-main);
    border-radius: 0 10px 10px 0;
    padding: 15px;
    margin-bottom: 12px;
}

.secret-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.secret-title {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}

.secret-date {
    font-size: 11px;
    color: var(--text-light);
}

.secret-content {
    font-size: 13px;
    color: var(--text-main);
    line-height: 1.6;
    margin-bottom: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

.secret-target {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.secret-actions {
    display: flex;
    gap: 8px;
}

.secret-action-btn {
    flex: 1;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid;
}

.secret-action-btn:nth-child(1) {
    background: rgba(217, 83, 79, 0.1);
    border-color: var(--red-main);
    color: var(--red-main);
}

.secret-action-btn:nth-child(2) {
    background: rgba(47, 79, 79, 0.1);
    border-color: var(--green-ink);
    color: var(--green-ink);
}

.secret-action-btn:nth-child(3) {
    background: rgba(201, 168, 108, 0.1);
    border-color: var(--gold);
    color: var(--gold);
}

.secret-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}


        /* ==================== 角色面板 ==================== */
        .char-header {
            text-align: center;
            padding: 20px;
            background: linear-gradient(135deg, var(--red-light) 0%, var(--white-jade) 100%);
            border-radius: 12px;
            margin-bottom: 15px;
        }

        .char-name {
            font-size: 22px;
            color: var(--text-main);
            letter-spacing: 4px;
            margin-bottom: 5px;
        }

        .char-identity {
            font-size: 13px;
            color: var(--text-light);
            margin-bottom: 8px;
        }

        .char-master {
            font-size: 12px;
            color: var(--red-main);
            padding: 4px 12px;
            background: rgba(217, 83, 79, 0.1);
            border-radius: 20px;
            display: inline-block;
        }

        .stat-section {
            background: var(--white-jade);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 12px;
            border: 1px solid rgba(47, 79, 79, 0.15);
        }

        .stat-section-title {
            font-size: 14px;
            color: var(--text-main);
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px dashed rgba(47, 79, 79, 0.2);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .stat-section-title svg {
            width: 14px;
            height: 14px;
            fill: var(--red-main);
        }

        .stat-row {
            display: flex;
            align-items: center;
            margin-bottom: 10px;
        }

        .stat-row:last-child {
            margin-bottom: 0;
        }

        .stat-label {
            width: 70px;
            font-size: 13px;
            color: var(--text-main);
        }

        .stat-bar {
            flex: 1;
            height: 8px;
            background: rgba(47, 79, 79, 0.1);
            border-radius: 4px;
            overflow: hidden;
            margin: 0 10px;
        }

        .stat-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        .stat-fill.beauty { background: linear-gradient(90deg, #E91E63, #F8BBD9); }
        .stat-fill.scheme { background: linear-gradient(90deg, var(--green-ink), var(--green-light)); }
        .stat-fill.prestige { background: linear-gradient(90deg, var(--gold), var(--gold-light)); }
        .stat-fill.bedskill { background: linear-gradient(90deg, #9C27B0, #E1BEE7); }

        .stat-value {
            width: 55px;
            font-size: 11px;
            color: var(--text-light);
            text-align: right;
        }

        .stat-level {
            font-size: 11px;
            color: var(--red-main);
            margin-top: 3px;
        }

        .resource-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 10px;
        }

        .resource-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px;
            background: var(--bg-cream);
            border-radius: 8px;
        }

        .resource-item svg {
            width: 18px;
            height: 18px;
        }

        .resource-item span {
            font-size: 13px;
            color: var(--text-main);
        }

        .body-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px;
        }

        .body-item {
            display: flex;
            justify-content: space-between;
            padding: 8px 10px;
            background: var(--bg-cream);
            border-radius: 6px;
            font-size: 12px;
        }

        .body-label {
            color: var(--text-light);
        }

        .body-value {
            color: var(--text-main);
        }

        .body-value.good { color: var(--green-ink); }
        .body-value.warning { color: var(--gold); }
        .body-value.danger { color: var(--red-main); }
        /* ==================== 四季景色 ==================== */
.season-spring .time-bar {
    background: linear-gradient(135deg, #4A6B4A 0%, #7FA37F 100%);
}
.season-spring .story-area {
    border-color: rgba(127, 163, 127, 0.3);
}

.season-summer .time-bar {
    background: linear-gradient(135deg, #8B6914 0%, #C9A86C 100%);
}
.season-summer .story-area {
    border-color: rgba(201, 168, 108, 0.3);
}

.season-autumn .time-bar {
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 100%);
}
.season-autumn .story-area {
    border-color: rgba(205, 133, 63, 0.3);
}

.season-winter .time-bar {
    background: linear-gradient(135deg, #4A5568 0%, #718096 100%);
}
.season-winter .story-area {
    border-color: rgba(113, 128, 150, 0.3);
}


        /* 地点列表 */
.location-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-item {
    padding: 15px;
    background: var(--white-jade);
    border: 1px solid var(--green-ink);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.location-item:hover {
    background: var(--red-light);
    border-color: var(--red-main);
}

.location-item.current {
    background: var(--gold-light);
    border-color: var(--gold);
    cursor: default;
}

.location-name {
    font-size: 15px;
    color: var(--text-main);
}

.location-badge {
    font-size: 11px;
    color: var(--gold);
    background: rgba(201, 168, 108, 0.2);
    padding: 3px 8px;
    border-radius: 10px;
}

/* 商店 */
.shop-money {
    padding: 12px;
    background: var(--gold-light);
    border-radius: 8px;
    margin-bottom: 15px;
    text-align: center;
    font-size: 14px;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.shop-item {
    background: var(--white-jade);
    border: 1px solid rgba(47, 79, 79, 0.2);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.shop-item.disabled {
    opacity: 0.5;
}

.shop-item-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.shop-item-name {
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.shop-item-desc {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.4;
}

.shop-item-price {
    font-size: 12px;
    color: var(--gold);
    margin-bottom: 8px;
}

.shop-buy-btn {
    width: 100%;
    padding: 6px;
    background: var(--green-ink);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
}

.shop-buy-btn:hover:not(:disabled) {
    background: var(--green-light);
}

.shop-buy-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* API状态显示 */
.api-status {
    font-size: 12px;
    padding: 6px 15px;
    border-radius: 15px;
    margin-bottom: 20px;
}

.api-status.green {
    background: rgba(46, 125, 50, 0.1);
    color: #2E7D32;
    border: 1px solid rgba(46, 125, 50, 0.3);
}

.api-status.orange {
    background: rgba(255, 152, 0, 0.1);
    color: #F57C00;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.api-status.red {
    background: rgba(211, 47, 47, 0.1);
    color: #D32F2F;
    border: 1px solid rgba(211, 47, 47, 0.3);
}

        /* ==================== 关系面板 ==================== */
        .relation-section {
            margin-bottom: 20px;
        }

        .relation-section-title {
            font-size: 14px;
            color: var(--text-main);
            margin-bottom: 10px;
            padding-left: 10px;
            border-left: 3px solid var(--red-main);
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .relation-section-title svg {
            width: 14px;
            height: 14px;
            fill: var(--red-main);
        }

        .npc-card {
            background: var(--white-jade);
            border: 1px solid rgba(47, 79, 79, 0.2);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .npc-card:hover {
            border-color: var(--red-main);
            box-shadow: 0 2px 10px rgba(217, 83, 79, 0.15);
        }

        .npc-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }

        .npc-card-actions {
    display: flex;
    gap: 5px;
}

.npc-edit-btn,
.npc-delete-btn {
    width: 28px;
    height: 28px;
    border: 1px solid var(--green-ink);
    border-radius: 5px;
    background: var(--white-jade);
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.npc-edit-btn:hover {
    background: var(--gold-light);
}

.npc-delete-btn {
    border-color: var(--red-main);
}

.npc-delete-btn:hover {
    background: var(--red-light);
}


        .npc-basic {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .npc-avatar {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, var(--red-light) 0%, var(--bg-cream) 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid var(--green-ink);
        }

        .npc-avatar svg {
            width: 18px;
            height: 18px;
            fill: var(--green-ink);
        }

        .npc-avatar.female svg {
            fill: var(--red-main);
        }

        .npc-name {
            font-size: 14px;
            color: var(--text-main);
        }

        .npc-role {
            font-size: 11px;
            color: var(--text-light);
        }

        .npc-relation-tag {
            font-size: 10px;
            padding: 3px 8px;
            border-radius: 10px;
            background: var(--red-light);
            color: var(--red-main);
        }

        .npc-status {
            font-size: 11px;
            color: var(--text-light);
            padding: 6px 8px;
            background: var(--bg-cream);
            border-radius: 6px;
        }

        .npc-favor-bar {
            display: flex;
            align-items: center;
            gap: 6px;
            margin-top: 8px;
        }

        .npc-favor-label {
            font-size: 10px;
            color: var(--text-light);
            width: 30px;
        }

        .npc-favor-track {
            flex: 1;
            height: 4px;
            background: rgba(47, 79, 79, 0.1);
            border-radius: 2px;
        }

        .npc-favor-fill {
            height: 100%;
            border-radius: 2px;
            background: linear-gradient(90deg, var(--red-main), var(--red-light));
        }

        .item-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.item-card {
    background: var(--white-jade);
    border: 1px solid rgba(47,79,79,0.2);
    border-radius: 10px;
    padding: 12px;
    text-align: center;
}

.item-icon {
    font-size: 28px;
    margin-bottom: 6px;
}

.item-name {
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 4px;
}

.item-desc {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.item-count {
    font-size: 12px;
    color: var(--gold);
    margin-bottom: 8px;
}

.item-use-btn {
    padding: 5px 15px;
    background: var(--green-ink);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    cursor: pointer;
}


        /* ==================== NPC详情页 ==================== */
        .npc-detail-header {
            text-align: center;
            padding: 20px;
            background:            linear-gradient(135deg, var(--red-light) 0%, var(--white-jade) 100%);
            border-radius: 12px;
            margin-bottom: 15px;
        }

        .npc-detail-avatar {
            width: 70px;
            height: 70px;
            background: linear-gradient(135deg, var(--white-jade) 0%, var(--bg-cream) 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 12px;
            border: 2px solid var(--green-ink);
        }

        .npc-detail-avatar svg {
            width: 35px;
            height: 35px;
            fill: var(--green-ink);
        }

        .npc-detail-name {
            font-size: 20px;
            color: var(--text-main);
            letter-spacing: 3px;
            margin-bottom: 5px;
        }

        .npc-detail-role {
            font-size: 13px;
            color: var(--text-light);
            margin-bottom: 10px;
        }

        .npc-detail-tags {
            display: flex;
            justify-content: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .npc-tag {
            font-size: 11px;
            padding: 4px 10px;
            border-radius: 12px;
            background: rgba(47, 79, 79, 0.1);
            color: var(--green-ink);
        }

        .npc-detail-section {
            background: var(--white-jade);
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 12px;
            border: 1px solid rgba(47, 79, 79, 0.15);
        }

        .npc-detail-section-title {
            font-size: 13px;
            color: var(--text-main);
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px dashed rgba(47, 79, 79, 0.2);
        }

        .npc-detail-row {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
            font-size: 13px;
        }

        .npc-detail-label {
            color: var(--text-light);
        }

        .npc-detail-value {
            color: var(--text-main);
        }

        .npc-relation-bars {
            margin-top: 10px;
        }

        .npc-relation-bar {
            margin-bottom: 10px;
        }

        .npc-relation-bar-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 4px;
            font-size: 12px;
        }

        .npc-relation-bar-track {
            height: 8px;
            background: rgba(47, 79, 79, 0.1);
            border-radius: 4px;
            overflow: hidden;
        }

        .npc-relation-bar-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 0.5s ease;
        }

        .npc-relation-bar-fill.favor {
            background: linear-gradient(90deg, var(--red-main), #F8BBD9);
        }

        .npc-relation-bar-fill.bindng {
            background: linear-gradient(90deg, #9C27B0, #E1BEE7);
        }

        .npc-relation-bar-fill.jealousy {
            background: linear-gradient(90deg, #455A64, #90A4AE);
        }

/* ===== 剧本模式 ===== */
.storyline-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 15px;
    background: var(--white-jade);
    border: 1px solid rgba(201, 168, 108, 0.3);
    border-radius: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.storyline-card:hover,
.storyline-card:active {
    border-color: var(--gold);
    box-shadow: 0 2px 12px rgba(201, 168, 108, 0.2);
    transform: translateY(-1px);
}

.storyline-card-icon {
    font-size: 36px;
    min-width: 50px;
    text-align: center;
}

.storyline-card-body {
    flex: 1;
    min-width: 0;
}

.storyline-card-title {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-main);
}

.storyline-card-subtitle {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 3px;
}

.storyline-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.storyline-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(217, 83, 79, 0.1);
    color: var(--red-main);
    border: 1px solid rgba(217, 83, 79, 0.2);
}

.storyline-card-diff {
    font-size: 11px;
    color: var(--gold);
    margin-top: 4px;
}

.mode-switch-btn.active {
    background: var(--gold) !important;
    color: white !important;
}

/* ===== 自定义面板 ===== */
.customize-row {
    margin-bottom: 10px;
}

.customize-row label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.npc-customize-card {
    border: 1px solid rgba(47, 79, 79, 0.15);
    border-radius: 8px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: opacity 0.3s;
}

.npc-customize-card.removed {
    opacity: 0.4;
    text-decoration: line-through;
}

.npc-customize-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: var(--bg-cream);
    cursor: pointer;
    user-select: none;
}

.npc-customize-header:active {
    background: rgba(201, 168, 108, 0.15);
}

.npc-customize-arrow {
    margin-left: auto;
    font-size: 10px;
    color: var(--text-light);
    transition: transform 0.2s;
}

.npc-customize-body {
    padding: 12px;
    border-top: 1px solid rgba(47, 79, 79, 0.1);
}
        /* 手机弹窗修复 */
@media (max-height: 700px) {
    .modal { max-height: 90vh; }
    .modal-content { max-height: 70vh; }
}

/* PC端抽屉修复 */
@media (min-width: 501px) {
    .action-drawer .action-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


        /* ==================== 情报面板 ==================== */
        .intel-card {
            background: var(--white-jade);
            border: 1px solid rgba(47, 79, 79, 0.2);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 10px;
        }

        .intel-header {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 6px;
        }

        .intel-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .intel-dot.male { background: var(--green-ink); }
        .intel-dot.female { background: var(--red-main); }

        .intel-name {
            font-size: 13px;
            color: var(--text-main);
        }

        .intel-status {
            font-size: 12px;
            color: var(--text-light);
            line-height: 1.5;
        }

        .rumor-section {
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px dashed rgba(47, 79, 79, 0.2);
        }

        .rumor-title {
            font-size: 13px;
            color: var(--text-main);
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .rumor-title svg {
            width: 14px;
            height: 14px;
            fill: var(--gold);
        }

        .rumor-item {
            font-size: 12px;
            color: var(--text-light);
            padding: 8px 10px;
            background: var(--bg-cream);
            border-radius: 6px;
            margin-bottom: 6px;
            border-left: 2px solid var(--gold);
            line-height: 1.5;
        }

        
        .event-list {
            margin-top: 10px;
        }

        .event-item {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 0;
            border-bottom: 1px dashed rgba(47, 79, 79, 0.1);
            font-size: 12px;
        }

        .event-item:last-child {
            border-bottom: none;
        }

        .event-time {
            color: var(--red-main);
            min-width: 50px;
        }

        .event-desc {
            color: var(--text-main);
        }

        /* ==================== 弹窗 ==================== */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(47, 79, 79, 0.7);
            z-index: 100;
            justify-content: center;
            align-items: center;
            backdrop-filter: blur(3px);
        }

        .modal-overlay.active {
            display: flex;
        }

        .modal {
            width: 90%;
            max-width: 360px;
            max-height: 80vh;
            background: linear-gradient(180deg, var(--white-jade) 0%, var(--bg-cream) 100%);
            border-radius: 15px;
            overflow: hidden;
            border: 2px solid var(--green-ink);
            animation: modalIn 0.3s ease;
        }

        @keyframes modalIn {
            from { opacity: 0; transform: translateY(20px) scale(0.95); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 15px;
            background: linear-gradient(135deg, var(--green-ink) 0%, var(--green-light) 100%);
        }

        .modal-title {
            font-size: 15px;
            color: var(--white-jade);
            letter-spacing: 2px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .modal-title svg {
            width: 18px;
            height: 18px;
            fill: var(--gold-light);
        }

        .modal-close {
            background: rgba(255, 255, 255, 0.15);
            border: none;
            cursor: pointer;
            padding: 5px;
            border-radius: 5px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-close svg {
            width: 16px;
            height: 16px;
            fill: var(--white-jade);
        }

        .modal-content {
            padding: 15px;
            overflow-y: auto;
            max-height: 60vh;
        }

        .modal-footer {
            padding: 12px 15px;
            border-top: 1px solid rgba(47, 79, 79, 0.2);
            display: flex;
            justify-content: center;
        }

        /* 行动选项弹窗 */
        .action-option {
            background: var(--white-jade);
            border: 1px solid var(--green-ink);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .action-option:hover {
            border-color: var(--red-main);
            background: var(--red-light);
        }

        .action-option.danger {
            border-color: var(--red-main);
        }

        .action-option.danger:hover {
            background: rgba(217, 83, 79, 0.2);
        }

        .action-option-title {
            font-size: 14px;
            color: var(--text-main);
            margin-bottom: 4px;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .action-option-title svg {
            width: 14px;
            height: 14px;
            fill: var(--green-ink);
        }

        .action-option.danger .action-option-title svg {
            fill: var(--red-main);
        }

        .action-option-desc {
            font-size: 12px;
            color: var(--text-light);
        }

        .action-option-risk {
            font-size: 11px;
            color: var(--red-main);
            margin-top: 5px;
        }

        /* 设置弹窗 */
        .setting-group {
            margin-bottom: 15px;
        }

        .setting-label {
            font-size: 13px;
            color: var(--text-main);
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .setting-label svg {
            width: 14px;
            height: 14px;
            fill: var(--red-main);
        }

        .setting-input {
            width: 100%;
            background: var(--white-jade);
            border: 1px solid var(--green-ink);
            border-radius: 6px;
            padding: 10px 12px;
            font-family: inherit;
            font-size: 13px;
            color: var(--text-main);
            outline: none;
        }

        .setting-input:focus {
            border-color: var(--red-main);
        }

        .setting-note {
            font-size: 11px;
            color: var(--text-light);
            margin-top: 4px;
        }

        /* 存档弹窗 */
        .save-slot {
            background: var(--white-jade);
            border: 1px solid rgba(47, 79, 79, 0.2);
            border-radius: 10px;
            padding: 12px;
            margin-bottom: 8px;
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .save-slot:hover {
            border-color: var(--red-main);
        }

        .save-slot-icon {
            width: 40px;
            height: 40px;
            background: var(--red-light);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .save-slot-icon svg {
            width: 20px;
            height: 20px;
            fill: var(--green-ink);
        }

        .save-slot-info {
            flex: 1;
        }

        .save-slot-title {
            font-size: 13px;
            color: var(--text-main);
        }

        .save-slot-time {
            font-size: 11px;
            color: var(--text-light);
        }

        .save-slot-actions {
            display: flex;
            gap: 5px;
        }

        .save-action-btn {
            padding: 5px 10px;
            background: var(--red-light);
            border: 1px solid var(--green-ink);
            border-radius: 5px;
            font-size: 11px;
            font-family: inherit;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .save-action-btn:hover {
            background: var(--red-main);
            color: var(--white-jade);
            border-color: var(--red-main);
        }

        

        /* ==================== 数值飘字 ==================== */
        .float-number {
            position: fixed;
            font-size: 16px;
            font-weight: bold;
            pointer-events: none;
            animation: floatUp 1.5s ease-out forwards;
            z-index: 300;
        }

        .float-number.positive { color: var(--green-ink); }
        .float-number.negative { color: var(--red-main); }

        @keyframes floatUp {
            0% { opacity: 1; transform: translateY(0); }
            100% { opacity: 0; transform: translateY(-40px); }
        }

        /* ==================== 加载 ==================== */
        .loading-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(253, 248, 245, 0.95);
            z-index: 200;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }

        .loading-overlay.active {
            display: flex;
        }

        .loading-spinner {
            width: 45px;
            height: 45px;
            border: 3px solid var(--red-light);
            border-top-color: var(--red-main);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin-bottom: 15px;
        }

        .loading-text {
            font-size: 14px;
            color: var(--text-main);
            letter-spacing: 2px;
        }

        /* ==================== 滚动条 ==================== */
        ::-webkit-scrollbar {
            width: 5px;
        }

        ::-webkit-scrollbar-track {
            background: rgba(47, 79, 79, 0.05);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--red-light);
            border-radius: 3px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--red-main);
        }

        /* ==================== 新增样式 - 第一期改动 ==================== */

/* 底部抽屉 */
.action-drawer-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(47, 79, 79, 0.5);
    z-index: 80;
}

.action-drawer-overlay.active {
    display: block;
}

.action-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, var(--white-jade) 0%, var(--bg-cream) 100%);
    border-top: 2px solid var(--green-ink);
    border-radius: 20px 20px 0 0;
    padding: 15px 15px 25px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 85;
    max-height: 70vh;
    overflow-y: auto;
}

.action-drawer.active {
    transform: translateY(0);
}

.drawer-handle {
    width: 40px;
    height: 4px;
    background: var(--green-ink);
    border-radius: 2px;
    margin: 0 auto 15px;
    opacity: 0.3;
}

.open-drawer-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--green-ink) 0%, var(--green-light) 100%);
    border: none;
    border-radius: 10px;
    color: var(--white-jade);
    font-family: inherit;
    font-size: 14px;
    letter-spacing: 2px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.open-drawer-btn svg {
    width: 18px;
    height: 18px;
    fill: var(--white-jade);
}

/* 本旬机会卡片 */
.opportunity-card {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--white-jade) 100%);
    border: 1px solid var(--gold);
    border-radius: 10px;
    padding: 12px 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.opportunity-card::before {
    content: '限时';
    position: absolute;
    top: 8px;
    right: -20px;
    background: var(--red-main);
    color: white;
    font-size: 10px;
    padding: 2px 25px;
    transform: rotate(45deg);
}

.opportunity-card:hover {
    box-shadow: 0 4px 15px rgba(201, 168, 108, 0.3);
    transform: translateY(-2px);
}

.opportunity-title {
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.opportunity-title svg {
    width: 16px;
    height: 16px;
    fill: var(--gold);
}

.opportunity-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.5;
}

.no-opportunity {
    display: none;
}

/* 内宅份例 */
.position-card {
    background: linear-gradient(135deg, var(--red-light) 0%, var(--white-jade) 100%);
    border: 1px solid rgba(47, 79, 79, 0.2);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 12px;
}

.position-title {
    font-size: 14px;
    color: var(--text-main);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px dashed rgba(47, 79, 79, 0.2);
    display: flex;
    align-items: center;
    gap: 6px;
}

.position-title svg {
    width: 14px;
    height: 14px;
    fill: var(--gold);
}

.position-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.position-item {
    background: var(--white-jade);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.position-label {
    font-size: 11px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.position-value {
    font-size: 14px;
    color: var(--text-main);
    font-weight: 500;
}

.position-value.highlight {
    color: var(--red-main);
}

/* 羁绊值进度条 */
.bindng-bar {
    margin-top: 6px;
}

.bindng-bar-header {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    margin-bottom: 3px;
}

.bindng-bar-label {
    color: var(--text-light);
}

.bindng-bar-value {
    color: #9C27B0;
}

.bindng-bar-track {
    height: 4px;
    background: rgba(156, 39, 176, 0.1);
    border-radius: 2px;
}

.bindng-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9C27B0, #E1BEE7);
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* 宠爱值显示 */
.favor-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--red-main);
    margin-top: 6px;
}

.favor-display svg {
    width: 12px;
    height: 12px;
    fill: var(--red-main);
}

/* 侍寝选项分级 */
.bed-option {
    background: var(--white-jade);
    border: 1px solid var(--green-ink);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bed-option:hover:not(.locked) {
    border-color: var(--red-main);
    background: var(--red-light);
}

.bed-option.locked {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f5f5f5;
}

.bed-option-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.bed-option-title {
    font-size: 14px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.bed-option-title svg {
    width: 14px;
    height: 14px;
    fill: var(--green-ink);
}

.bed-option.locked .bed-option-title svg {
    fill: #999;
}

.bed-option-lock {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: #999;
}

.bed-option-lock svg {
    width: 12px;
    height: 12px;
    fill: #999;
}

.bed-option-desc {
    font-size: 12px;
    color: var(--text-light);
}

.bed-option-require {
    font-size: 10px;
    color: var(--red-main);
    margin-top: 5px;
}

/* 特殊回忆 */
.memory-section {
    margin-top: 15px;
}

.memory-card {
    background: linear-gradient(135deg, #FFF8E7 0%, var(--white-jade) 100%);
    border: 1px solid var(--gold);
    border-left: 3px solid var(--gold);
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.memory-time {
    font-size: 10px;
    color: var(--gold);
    margin-bottom: 4px;
}

.memory-content {
    font-size: 12px;
    color: var(--text-main);
    line-height: 1.5;
}

.memory-with {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 5px;
}

/* 子嗣卡片扩展 */
.child-card {
    background: var(--white-jade);
    border: 1px solid rgba(47, 79, 79, 0.2);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 10px;
}

.child-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.child-name {
    font-size: 14px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.child-name svg {
    width: 14px;
    height: 14px;
}

.child-name svg.male {
    fill: var(--green-ink);
}

.child-name svg.female {
    fill: var(--red-main);
}

.child-age {
    font-size: 11px;
    color: var(--text-light);
}

.child-info {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    font-size: 11px;
    margin-bottom: 8px;
}

.child-info-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 8px;
    background: var(--bg-cream);
    border-radius: 4px;
}

.child-direction {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.direction-tag {
    font-size: 10px;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(47, 79, 79, 0.1);
    color: var(--green-ink);
}

.direction-tag.active {
    background: var(--green-ink);
    color: var(--white-jade);
}

/* 性格选择（开局） */
.personality-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.personality-tag {
    padding: 8px 15px;
    border: 1px solid var(--green-ink);
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white-jade);
}

.personality-tag:hover {
    border-color: var(--red-main);
    background: var(--red-light);
}

.personality-tag.selected {
    background: var(--red-main);
    color: var(--white-jade);
    border-color: var(--red-main);
}

/* 嫉妒警告 */
.jealousy-warning {
    background: rgba(217, 83, 79, 0.1);
    border: 1px solid var(--red-main);
    border-radius: 8px;
    padding: 10px 12px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--red-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.jealousy-warning svg {
    width: 14px;
    height: 14px;
    fill: var(--red-main);
}

/* 结局展示 */
.ending-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 200;
    justify-content: center;
    align-items: center;
}

.ending-overlay.active {
    display: flex;
}

.ending-card {
    max-width: 500px;
width: 95%;

    background: linear-gradient(180deg, var(--white-jade) 0%, var(--bg-cream) 100%);
    border-radius: 15px;
    overflow: hidden;
    text-align: center;
    animation: endingIn 0.8s ease;
}

@keyframes endingIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.ending-header {
    padding: 30px 20px;
    background: linear-gradient(135deg, var(--green-ink) 0%, var(--green-light) 100%);
}

.ending-type {
    font-size: 12px;
    color: var(--gold-light);
    letter-spacing: 3px;
    margin-bottom: 10px;
}

.ending-title {
    font-size: 24px;
    color: var(--white-jade);
    letter-spacing: 5px;
}

.ending-content {
    padding: 25px 20px;
}

.ending-desc {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.8;
    margin-bottom: 20px;
}

.ending-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.ending-stat {
    font-size: 12px;
    color: var(--text-light);
    padding: 8px;
    background: var(--bg-cream);
    border-radius: 6px;
}

.ending-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--red-main) 0%, var(--red-dark) 100%);
    border: none;
    border-radius: 8px;
    color: var(--white-jade);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}