/* ============================================================
   杏林药境 · 灵枢椭球仪 — 主样式表
   古风中医经典名方展示页面
   ============================================================ */

/* ============================================================
   基础重置
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 1920px;
    min-width: 1920px;
    overflow-x: hidden;
    font-family: '楷体', 'KaiTi', 'STKaiti', '宋体', 'SimSun', 'STSong', 'Songti SC', serif;
    color: #2a1a0e;
}

/* ============================================================
   全屏古典背景
   ============================================================ */
body {
    background:
        url('../images/bg.jpg')
        center center / cover no-repeat fixed;
    position: relative;
    /* 如果 images/bg.jpg 不存在，回退到古典暖色 */
    background-color: #3a2a15;
}

/* 古典纸张纹理叠加层 */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
        linear-gradient(160deg, rgba(250,240,210,0.72) 0%, rgba(240,225,185,0.65) 40%, rgba(220,195,155,0.55) 100%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================
   顶部导航栏
   ============================================================ */
.nav-herbal {
    position: sticky;
    top: 0;
    width: 1920px;
    background: linear-gradient(90deg,
        rgba(92,52,22,0.96) 0%,
        rgba(120,75,35,0.94) 30%,
        rgba(145,95,50,0.92) 60%,
        rgba(100,60,25,0.95) 100%
    );
    backdrop-filter: blur(12px);
    border-bottom: 2px solid rgba(210,170,100,0.6);
    box-shadow: 0 3px 20px rgba(60,30,10,0.4), 0 1px 0 rgba(220,180,100,0.3);
    z-index: 100;
    height: 68px;
    display: flex;
    align-items: center;
    padding: 0 40px;
    flex-shrink: 0;
}

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

/* Logo 区域 */
.logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-emblem {
    width: 560px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #f0d090;
}

.logo-text {
    font-size: 1.55rem;
    font-weight: 600;
    color: #f5e0b0;
    letter-spacing: 0.08em;
    text-shadow: 0 1px 8px rgba(0,0,0,0.5);
}

.logo-sub {
    font-size: 0.78rem;
    color: rgba(230,200,140,0.75);
    margin-top: 2px;
    letter-spacing: 0.12em;
}

/* 模式切换按钮组 */
.mode-switch-group {
    background: rgba(60,30,10,0.5);
    border-radius: 48px;
    padding: 5px;
    border: 1px solid rgba(200,160,80,0.35);
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.3);
}

.mode-btn {
    background: transparent;
    border: none;
    padding: 7px 24px;
    border-radius: 40px;
    font-size: 0.92rem;
    font-weight: 500;
    color: rgba(240,210,150,0.8);
    transition: all 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.05em;
}

.mode-btn.active {
    background: linear-gradient(135deg, #c8922a, #a06820);
    color: #fff8e8;
    box-shadow: 0 2px 10px rgba(180,120,30,0.5);
}

.mode-btn:hover:not(.active) {
    color: #f5d890;
    background: rgba(180,120,40,0.2);
}

.btn-return {
    background: rgba(60,30,10,0.55);
    border: 1px solid rgba(200,160,80,0.4);
    color: #f0d090;
    border-radius: 40px;
    padding: 7px 22px;
    font-size: 0.9rem;
    transition: all 0.2s;
    font-family: inherit;
    letter-spacing: 0.04em;
}

.btn-return:hover { background: rgba(160,100,30,0.5); color: #ffe8b0; }
.btn-return:active { transform: scale(0.96); }

/* ============================================================
   主内容区域
   ============================================================ */
.main-viewport {
    position: relative;
    width: 1920px;
    min-height: calc(100vh - 68px);
    z-index: 1;
}

.mode-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    transition: opacity 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    visibility: visible;
    opacity: 1;
}

.panel-hidden {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

/* ============================================================
   方阵典藏模式
   ============================================================ */
.fixed-grid-container {
    width: 100%;
    min-height: calc(100vh - 68px);
    padding: 28px 48px 40px;
    overflow-y: auto;
}

.grid-title {
    text-align: center;
    margin-bottom: 28px;
}

.grid-title h2 {
    font-size: 1.9rem;
    font-weight: 600;
    color: #5a3015;
    text-shadow: 0 1px 6px rgba(200,150,80,0.3);
    letter-spacing: 0.15em;
}

.grid-title-line {
    width: 200px;
    height: 2px;
    margin: 8px auto 0;
    background: linear-gradient(90deg, transparent, #b07830, transparent);
}

/* 分类标题 */
.category-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 18px 0 14px;
}

.category-header-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(160,100,40,0.5), transparent);
}

.category-header-line.right {
    background: linear-gradient(270deg, rgba(160,100,40,0.5), transparent);
}

.category-label {
    font-size: 1.15rem;
    font-weight: 600;
    color: #6b3810;
    letter-spacing: 0.2em;
    background: rgba(230,200,150,0.4);
    padding: 4px 20px;
    border-radius: 30px;
    border: 1px solid rgba(180,130,60,0.35);
    white-space: nowrap;
}

/* 9列药方卡片网格 */
.prescriptions-fixed-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 12px;
    width: 100%;
}

.pres-card-fixed {
    background: linear-gradient(145deg, rgba(255,250,238,0.88), rgba(248,238,218,0.82));
    border-radius: 16px 6px 16px 6px;
    border: 1px solid rgba(200,165,110,0.5);
    padding: 14px 10px 12px;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 3px 12px rgba(80,45,15,0.12), inset 0 1px 0 rgba(255,245,225,0.6);
    text-align: center;
    color: #3a2010;
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
}

.pres-card-fixed::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #c8922a, #e8b840, #c8922a);
    opacity: 0;
    transition: opacity 0.22s;
}

.pres-card-fixed:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(140,80,20,0.22), inset 0 1px 0 rgba(255,245,225,0.8);
    background: linear-gradient(145deg, rgba(255,252,240,0.96), rgba(252,242,222,0.92));
    border-color: rgba(200,145,50,0.7);
}

.pres-card-fixed:hover::before { opacity: 1; }
.pres-card-fixed:active { transform: scale(0.97) translateY(-1px); }

.pres-name-fixed {
    font-size: 1.15rem;
    font-weight: 600;
    color: #4a2810;
    letter-spacing: 0.06em;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 剂型徽标 */
.pres-type-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #6b3810;
    border: 1px solid rgba(180,130,60,0.4);
}

.type-wan { background: rgba(200,160,100,0.22); }
.type-san { background: rgba(160,190,140,0.22); color: #3a5a28; border-color: rgba(100,150,70,0.4); }
.type-gao { background: rgba(180,140,200,0.18); color: #5a3a70; border-color: rgba(140,100,180,0.35); }
.type-dan { background: rgba(200,100,80,0.15); color: #6a2a20; border-color: rgba(180,80,60,0.35); }
.type-tang { background: rgba(100,160,200,0.15); color: #1a4a6a; border-color: rgba(60,120,180,0.3); }

.pres-origin {
    font-size: 0.68rem;
    color: rgba(80,50,25,0.6);
    margin-top: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================================
   详情视图
   ============================================================ */
.detail-view-container {
    width: 100%;
    min-height: calc(100vh - 68px);
    padding: 36px 80px 60px;
    overflow-y: auto;
}

.detail-card {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(255,250,238,0.9);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(200,165,110,0.4);
    box-shadow: 0 8px 40px rgba(80,45,15,0.18);
    overflow: hidden;
}

.detail-header {
    background: linear-gradient(135deg, rgba(140,85,30,0.95), rgba(100,58,18,0.95));
    padding: 32px 48px 28px;
    position: relative;
    overflow: hidden;
}

.detail-header::before {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(220,180,100,0.2);
}

.detail-header::after {
    content: '';
    position: absolute;
    bottom: -30px; left: 60px;
    width: 140px; height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(220,180,100,0.15);
}

.detail-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 2.6rem;
    font-weight: 700;
    color: #faf0d0;
    letter-spacing: 0.12em;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
    position: relative;
    z-index: 1;
}

.detail-subtitle {
    font-size: 1rem;
    color: rgba(240,210,150,0.85);
    margin-top: 8px;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

/* --- 制法与功效合并段（药材图片上方） --- */
.detail-intro {
    padding: 28px 48px 10px;
}

.detail-intro-label {
    font-size: 1.05rem;
    font-weight: 600;
    color: #6b3810;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
}

.detail-intro-text {
    font-size: 0.98rem;
    color: #2c1808;
    line-height: 1.8;
    margin-bottom: 10px;
}

.detail-body {
    padding: 36px 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-block {
    background: rgba(255,248,228,0.7);
    border-radius: 16px;
    padding: 18px 22px;
    border-left: 4px solid #c8922a;
    box-shadow: 0 2px 8px rgba(80,45,15,0.08);
}

.detail-block.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #8a5020;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.detail-label-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(200,145,42,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
}

.detail-block p {
    font-size: 0.95rem;
    color: #2c1a0e;
    line-height: 1.75;
}

/* 毒性警告 */
.toxic-warning {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(220,80,50,0.08), rgba(240,140,80,0.06));
    border: 1px solid rgba(200,80,50,0.3);
    border-left: 4px solid #c0392b;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #7a2a1a;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.detail-footnote {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    color: rgba(80,55,30,0.5);
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid rgba(200,165,110,0.2);
}

/* ============================================================
   椭球仪模式 (Three.js)
   ============================================================ */
#threeCanvas {
    width: 100%;
    height: calc(100vh - 68px);
    display: block;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.globe-label {
    font-weight: 600;
    cursor: pointer;
    pointer-events: auto;
    font-family: '楷体', serif;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s, opacity 0.4s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-user-drag: none;
}

/* 小竹简标签 */
.globe-label-slip {
    background: linear-gradient(135deg, #c8a060 0%, #b08840 8%, #d4b878 20%, #c09850 50%, #b89048 70%, #a07838 92%, #c8a058 100%);
    color: #2a1506;
    writing-mode: vertical-rl;
    text-orientation: upright;
    white-space: normal;
    padding: 20px 14px;
    font-size: 1.2rem;
    letter-spacing: 0.12em;
    border-radius: 8px 8px 40% 40%;
    min-height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(140,90,30,0.5);
    box-shadow:
        2px 3px 8px rgba(40,20,5,0.35),
        inset 1px 0 2px rgba(255,240,200,0.2),
        inset -1px 0 2px rgba(0,0,0,0.15);
    position: relative;
}

/* 竹节纹理上下饰线 */
.globe-label-slip::before,
.globe-label-slip::after {
    content: '';
    position: absolute;
    left: 10%; right: 10%;
    height: 1px;
    background: rgba(80,45,15,0.25);
}
.globe-label-slip::before { top: 8px; }
.globe-label-slip::after { bottom: 8px; }

.globe-label-slip:hover {
    background: linear-gradient(135deg, #e0c080 0%, #c8a060 20%, #f0d898 50%, #d0a860 70%, #c09848 100%);
    box-shadow:
        4px 6px 16px rgba(60,25,5,0.5),
        0 0 18px rgba(200,150,50,0.4),
        inset 1px 0 2px rgba(255,250,230,0.3);
    transform: scale(1.12);
}

.globe-label-slip i {
    display: block;
    font-style: normal;
    font-size: 0.85rem;
    opacity: 0.6;
    letter-spacing: 0.04em;
}

.globe-label:hover {
    background: rgba(200,145,42,0.92);
    color: #fff5d8;
    transform: scale(1.1);
    border-color: rgba(240,200,100,0.8);
    box-shadow: 0 0 18px rgba(201,138,62,0.65);
    opacity: 1 !important;
}

.globe-label small {
    font-size: 0.72rem;
    opacity: 0.8;
    margin-left: 5px;
}

/* ============================================================
   底部浮动栏
   ============================================================ */

/* 音乐控制栏 */
.music-bar {
    position: fixed;
    bottom: 22px;
    right: 24px;
    background: rgba(60,30,8,0.82);
    backdrop-filter: blur(16px);
    border-radius: 50px;
    padding: 8px 20px;
    z-index: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(200,160,80,0.35);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.music-icon {
    font-size: 1.05rem;
    color: #e0b870;
    animation: musicPulse 2s ease-in-out infinite;
}

@keyframes musicPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.9); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateX(-50%) translateY(-30px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.music-icon.paused { animation: none; opacity: 0.45; }

#autoplayHint {
    animation: fadeInDown 0.6s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    transition: opacity 0.3s ease;
}
#autoplayHint:hover {
    background: rgba(80,40,15,0.92) !important;
}

.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 90px;
    height: 3px;
    border-radius: 2px;
    background: rgba(200,160,80,0.3);
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #c8922a;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.music-btn {
    background: rgba(200,145,42,0.25);
    border: 1px solid rgba(200,160,80,0.35);
    color: #e0c070;
    border-radius: 30px;
    padding: 4px 14px;
    font-size: 0.82rem;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.05em;
}

.music-btn:hover { background: rgba(200,145,42,0.45); color: #ffe090; }

.helper-note {
    position: fixed;
    bottom: 22px;
    left: 24px;
    background: rgba(40,20,5,0.72);
    backdrop-filter: blur(8px);
    border-radius: 40px;
    padding: 6px 18px;
    font-size: 0.78rem;
    color: rgba(220,185,120,0.8);
    z-index: 500;
    pointer-events: none;
    border: 1px solid rgba(200,160,80,0.2);
    letter-spacing: 0.04em;
}

/* 音乐状态文字 */
.music-status {
    font-size: 0.72rem;
    color: rgba(220,185,120,0.6);
    letter-spacing: 0.03em;
}

/* ============================================================
   装饰性角落回纹
   ============================================================ */
.corner-deco {
    position: fixed;
    pointer-events: none;
    z-index: 1;
    opacity: 0.25;
}
.corner-deco svg { width: 120px; height: 120px; }
.corner-tl { top: 68px; left: 0; }
.corner-tr { top: 68px; right: 0; transform: scaleX(-1); }

/* ============================================================
   滚动条美化
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(220,190,140,0.15);
}
::-webkit-scrollbar-thumb {
    background: rgba(180,130,60,0.45);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(180,130,60,0.65);
}

/* 方阵模式面板定位 */
#fixedPanel {
    position: absolute;
    min-height: 100%;
}

/* ============================================================
   药材图片网格（二级目录）
   ============================================================ */
.herb-grid-section {
    padding: 24px 48px 8px;
}

.herb-grid-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #6b3810;
    letter-spacing: 0.1em;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.herb-icon {
    font-size: 1.2rem;
}

.herb-image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
}

.herb-card {
    text-align: center;
    transition: transform 0.2s;
}

.herb-card:hover {
    transform: translateY(-3px);
}

.herb-img-wrap {
    width: 120px;
    height: 120px;
    border-radius: 16px;
    overflow: hidden;
    margin: 0 auto 8px;
    border: 2px solid rgba(180,140,70,0.4);
    box-shadow: 0 3px 12px rgba(80,45,15,0.12);
    background: rgba(40,28,15,0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.herb-card:hover .herb-img-wrap {
    border-color: rgba(200,145,50,0.7);
    box-shadow: 0 5px 18px rgba(140,80,20,0.2);
}

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

.herb-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: #c8922a;
    background: linear-gradient(135deg, rgba(45,32,18,1), rgba(60,42,22,1));
    font-family: '楷体', 'STKaiti', '宋体', serif;
}

.herb-name-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #3a1e0a;
    letter-spacing: 0.06em;
}

/* ============================================================
   经方奥秘入口按钮（二级目录底部）
   ============================================================ */
.mystery-entry {
    padding: 20px 48px 8px;
    text-align: center;
}

.mystery-enter-btn {
    background: linear-gradient(135deg, rgba(180,120,40,0.92), rgba(140,85,25,0.92));
    border: 2px solid rgba(220,180,100,0.6);
    color: #fff5d8;
    border-radius: 50px;
    padding: 14px 40px;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: inherit;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 16px rgba(140,80,20,0.3);
    display: inline-flex;
    align-items: center;
    gap: 12px;
}

.mystery-enter-btn:hover {
    background: linear-gradient(135deg, rgba(200,140,50,0.95), rgba(160,100,30,0.95));
    border-color: rgba(240,200,120,0.8);
    box-shadow: 0 6px 24px rgba(180,100,30,0.4);
    transform: translateY(-2px);
}

.mystery-enter-btn:active {
    transform: scale(0.97);
}

.mystery-enter-btn .fa-book {
    font-size: 1.15rem;
}

.mystery-enter-btn .fa-chevron-right {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ============================================================
   经方奥秘面板（三级目录）
   ============================================================ */
#mysteryPanel {
    position: absolute;
    min-height: 100%;
    overflow-y: auto;
}

/* -- 头部 -- */
.mystery-header {
    background: linear-gradient(135deg, rgba(40,20,8,0.96), rgba(55,30,12,0.96), rgba(35,18,8,0.98));
    padding: 24px 60px 20px;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(200,150,60,0.3);
    text-align: center;
}

.mystery-header::before {
    content: '';
    position: absolute;
    top: -30%; right: -10%;
    width: 500px; height: 500px;
    border-radius: 50%;
    border: 2px solid rgba(220,180,80,0.08);
}

.mystery-header::after {
    content: '';
    position: absolute;
    bottom: -20%; left: 5%;
    width: 300px; height: 300px;
    border-radius: 50%;
    border: 1px solid rgba(220,180,80,0.06);
}

.mystery-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 60px;
    text-align: left;
}

.mystery-back-btn {
    display: inline-block;
    background: rgba(200,150,60,0.2);
    border: 1px solid rgba(200,160,80,0.35);
    color: #e0c080;
    border-radius: 30px;
    padding: 7px 20px;
    font-size: 0.88rem;
    font-family: inherit;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
    margin-left: 16px;
}

.mystery-back-btn:hover {
    background: rgba(200,150,60,0.4);
    color: #ffe8b0;
}

.mystery-title-area {
    position: relative;
    z-index: 1;
}

.mystery-pres-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 2rem;
    font-weight: 700;
    color: #faf0d0;
    letter-spacing: 0.12em;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.mystery-subtitle {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
    font-size: 0.95rem;
    color: rgba(230,195,120,0.8);
}

/* 经方奥秘头部剂型徽标 — 深色底高对比 */
.mystery-type-badge {
    background: rgba(255,255,255,0.22) !important;
    color: #ffffff !important;
    border-color: rgba(255,255,255,0.5) !important;
    font-weight: 600;
}

.mystery-origin {
    opacity: 0.7;
    letter-spacing: 0.05em;
}

/* -- 内容区 -- */
.mystery-container {
    width: 100%;
    min-height: calc(100vh - 68px);
    padding-bottom: 60px;
}

.mystery-principle {
    max-width: 1100px;
    margin: 30px auto 0;
    padding: 0 60px;
}

.mystery-section-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #5a2e10;
    letter-spacing: 0.1em;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mystery-section-icon {
    font-size: 1.25rem;
}

.mystery-principle-text {
    font-size: 1.05rem;
    line-height: 2;
    color: #2c1808;
    background: rgba(255,248,228,0.75);
    padding: 24px 30px;
    border-radius: 16px;
    border-left: 4px solid #c8922a;
    box-shadow: 0 2px 10px rgba(80,45,15,0.08);
    margin-bottom: 0;
}

/* -- 四角色卡片 -- */
.mystery-roles-title-wrap {
    max-width: 1100px;
    margin: 30px auto 0;
    padding: 0 60px;
}

.mystery-roles-grid {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mystery-role-card {
    background: rgba(255,248,228,0.8);
    border-radius: 20px;
    padding: 24px 26px;
    position: relative;
    border: 1px solid rgba(200,160,80,0.3);
    box-shadow: 0 3px 14px rgba(80,45,15,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
    overflow: hidden;
}

.mystery-role-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80,45,15,0.15);
}

.mystery-role-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 4px;
    height: 100%;
}

.role-monarch::before { background: linear-gradient(180deg, #c0392b, #e74c3c); }
.role-minister::before { background: linear-gradient(180deg, #d4a017, #e8b830); }
.role-assistant::before { background: linear-gradient(180deg, #2980b9, #5dade2); }
.role-guide::before { background: linear-gradient(180deg, #27ae60, #58d68d); }

.role-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    padding: 3px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.role-monarch .role-badge { background: rgba(192,57,43,0.15); color: #a02a20; border: 1px solid rgba(192,57,43,0.3); }
.role-minister .role-badge { background: rgba(200,160,40,0.15); color: #8a6a20; border: 1px solid rgba(200,160,40,0.3); }
.role-assistant .role-badge { background: rgba(41,128,185,0.15); color: #1a5a8a; border: 1px solid rgba(41,128,185,0.3); }
.role-guide .role-badge { background: rgba(39,174,96,0.15); color: #1a6a3a; border: 1px solid rgba(39,174,96,0.3); }

.role-title {
    font-size: 0.82rem;
    color: rgba(100,60,30,0.6);
    letter-spacing: 0.08em;
    margin-bottom: 6px;
}

.role-herb-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #3a1e0a;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.role-subtitle {
    font-size: 0.88rem;
    color: rgba(120,70,30,0.7);
    letter-spacing: 0.05em;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(200,160,80,0.2);
}

.role-detail {
    font-size: 0.95rem;
    line-height: 1.75;
    color: #2c1808;
}

/* -- 禁忌 -- */
.mystery-contra {
    max-width: 1100px;
    margin: 30px auto 0;
    padding: 16px 24px;
    background: linear-gradient(135deg, rgba(220,80,50,0.08), rgba(240,140,80,0.06));
    border: 1px solid rgba(200,80,50,0.25);
    border-left: 4px solid #c0392b;
    border-radius: 12px;
    font-size: 0.92rem;
    color: #7a2a1a;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
