/* ========================================
   玄机小栈 (Mystic Lite) — 样式表
   东方馆（新中式）+ 西方馆（星空感）
   ======================================== */

/* === 重置 & 基础 === */
.mystic-wrapper {
    max-width: 680px;
    margin: 0 auto;
    padding: 30px 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    line-height: 1.7;
    box-sizing: border-box;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
}

.mystic-wrapper * {
    box-sizing: border-box;
}

/* === 东方馆主题 === */
.mystic-theme-eastern {
    background: linear-gradient(180deg, #faf6f0 0%, #f0e8d8 100%);
    color: #3d2e1e;
    border: 1px solid #d4c5a9;
}

.mystic-theme-eastern .mystic-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: none;
    margin-bottom: 0;
}

.mystic-theme-eastern .mystic-title {
    font-size: 24px;
    font-weight: 700;
    color: #8b2500;
    margin: 0 0 6px;
    letter-spacing: 4px;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
}

.mystic-theme-eastern .mystic-subtitle {
    font-size: 14px;
    color: #8a7a5a;
    margin: 0;
    letter-spacing: 2px;
}

.mystic-theme-eastern .mystic-btn-primary {
    background: #8b2500;
    color: #fff;
    border: none;
}

.mystic-theme-eastern .mystic-btn-primary:hover {
    background: #a03000;
}

.mystic-theme-eastern .mystic-btn-secondary {
    background: transparent;
    color: #8b2500;
    border: 1px solid #8b2500;
}

.mystic-theme-eastern .mystic-btn-secondary:hover {
    background: rgba(139, 37, 0, 0.08);
}

.mystic-theme-eastern .mystic-result-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #d4c5a9;
}

.mystic-theme-eastern .mystic-input,
.mystic-theme-eastern .mystic-select {
    border-color: #c4b48a;
    background: #fffdf7;
    color: #3d2e1e;
}

.mystic-theme-eastern .mystic-input:focus,
.mystic-theme-eastern .mystic-select:focus {
    border-color: #8b2500;
    box-shadow: 0 0 0 3px rgba(139, 37, 0, 0.1);
}

/* === 西方馆主题 === */
.mystic-theme-western {
    background: linear-gradient(135deg, #0f0c29 0%, #1a1040 40%, #24243e 100%);
    color: #e0dde8;
    border: 1px solid #3a3560;
}

.mystic-theme-western .mystic-header {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: none;
    margin-bottom: 0;
}

.mystic-theme-western .mystic-title {
    font-size: 24px;
    font-weight: 700;
    color: #c8b8ff;
    margin: 0 0 6px;
    letter-spacing: 4px;
    text-shadow: 0 0 20px rgba(160, 130, 255, 0.3);
}

.mystic-theme-western .mystic-subtitle {
    font-size: 14px;
    color: #8a85a8;
    margin: 0;
    letter-spacing: 1px;
}

.mystic-theme-western .mystic-btn-primary {
    background: linear-gradient(135deg, #6c5ce7, #a855f7);
    color: #fff;
    border: none;
}

.mystic-theme-western .mystic-btn-primary:hover {
    background: linear-gradient(135deg, #7c6cf7, #b865ff);
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
}

.mystic-theme-western .mystic-btn-secondary {
    background: transparent;
    color: #c8b8ff;
    border: 1px solid #6c5ce7;
}

.mystic-theme-western .mystic-btn-secondary:hover {
    background: rgba(108, 92, 231, 0.15);
}

.mystic-theme-western .mystic-result-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mystic-theme-western .mystic-input {
    border-color: #4a4570;
    background: rgba(255, 255, 255, 0.06);
    color: #e0dde8;
}

.mystic-theme-western .mystic-input::placeholder {
    color: #6a658a;
}

.mystic-theme-western .mystic-input:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

/* === 公共组件 === */

/* 按钮 */
.mystic-btn {
    display: inline-block;
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 2px;
    line-height: 1;
}

.mystic-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mystic-btn-send {
    padding: 10px 20px;
    font-size: 14px;
    letter-spacing: 1px;
    flex-shrink: 0;
}

/* 表单 */
.mystic-form-group {
    margin-bottom: 16px;
}

.mystic-form-row {
    display: flex;
    gap: 12px;
}

.mystic-form-row .mystic-form-group {
    flex: 1;
}

.mystic-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.mystic-input,
.mystic-select {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.mystic-hint {
    font-size: 12px;
    opacity: 0.6;
    margin-top: 4px;
}

.mystic-step {
    margin-bottom: 20px;
}

.mystic-instruction {
    text-align: center;
    font-size: 14px;
    margin-bottom: 16px;
    opacity: 0.8;
}

/* === 塔罗洗牌动画 === */
.mystic-shuffle-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
}

.mystic-shuffle-card {
    position: absolute;
    width: 48px;
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #2d1b69, #4a2c8a);
    border: 2px solid #6c5ce7;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(200, 184, 255, 0.5);
    font-size: 16px;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    transform: translate(0, 0) rotate(0deg);
}

.mystic-shuffle-card.mystic-scatter {
    transform: translate(var(--sx), var(--sy)) rotate(var(--sr));
}

.mystic-shuffle-overlay.mystic-shuffle-fade {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 牌入场动画 */
.mystic-card-back.mystic-card-entering {
    opacity: 0;
    transform: translate(var(--enter-x, 0), var(--enter-y, -60px)) rotate(var(--enter-r, -15deg)) scale(0.7);
}

.mystic-card-back.mystic-card-enter-active {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg) scale(1);
    transition: all 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    transition-delay: var(--enter-delay, 0s);
}

/* 入场完成前禁用交互 */
.mystic-card-spread.mystic-animating .mystic-card-back {
    pointer-events: none;
}

/* === 塔罗牌堆 === */
.mystic-card-spread {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
    gap: 6px;
    max-width: 500px;
    margin: 0 auto 16px;
    position: relative;
}

.mystic-card-back {
    aspect-ratio: 2/3;
    background: linear-gradient(135deg, #2d1b69, #4a2c8a);
    border: 2px solid #6c5ce7;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.mystic-card-back::after {
    content: "✦";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: rgba(200, 184, 255, 0.5);
}

.mystic-card-back:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(108, 92, 231, 0.4);
    border-color: #a855f7;
}

.mystic-card-back.selected {
    border-color: #f5c542;
    box-shadow: 0 0 12px rgba(245, 197, 66, 0.5);
    transform: translateY(-6px);
}

.mystic-card-back.selected::after {
    content: "★";
    color: #f5c542;
}

.mystic-card-back.disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.mystic-deck-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.mystic-selected-count {
    font-size: 14px;
    opacity: 0.7;
}

/* 翻牌展示 */
.mystic-reveal-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.mystic-reveal-card {
    width: 120px;
    text-align: center;
    animation: mystic-card-appear 0.6s ease-out both;
}

.mystic-reveal-card:nth-child(2) { animation-delay: 0.3s; }
.mystic-reveal-card:nth-child(3) { animation-delay: 0.6s; }

@keyframes mystic-card-appear {
    from {
        opacity: 0;
        transform: scale(0.6) rotateY(90deg);
    }
    to {
        opacity: 1;
        transform: scale(1) rotateY(0);
    }
}

.mystic-card-position {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.mystic-card-face {
    aspect-ratio: 2/3;
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.mystic-theme-western .mystic-card-face {
    background: linear-gradient(135deg, #2d1b69, #4a2c8a);
    border: 2px solid #6c5ce7;
}

.mystic-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.mystic-card-face.mystic-reversed .mystic-card-img {
    transform: rotate(180deg);
}

.mystic-card-name {
    display: block;
    font-size: 14px;
    font-weight: 600;
}

.mystic-card-orientation {
    display: block;
    font-size: 12px;
    opacity: 0.7;
    margin-top: 2px;
}

.mystic-card-orientation.reversed {
    color: #e74c3c;
}

/* === 八字四柱展示 === */
.mystic-pillars-display {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.mystic-pillar {
    text-align: center;
    padding: 12px 16px;
    border-radius: 10px;
    min-width: 72px;
    animation: mystic-pillar-appear 0.5s ease-out both;
}

.mystic-pillar:nth-child(2) { animation-delay: 0.15s; }
.mystic-pillar:nth-child(3) { animation-delay: 0.3s; }
.mystic-pillar:nth-child(4) { animation-delay: 0.45s; }

@keyframes mystic-pillar-appear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mystic-theme-eastern .mystic-pillar {
    background: rgba(139, 37, 0, 0.06);
    border: 1px solid #d4c5a9;
}

.mystic-pillar-label {
    display: block;
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.mystic-pillar-gan {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
}

.mystic-pillar-zhi {
    display: block;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    margin-top: 4px;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
}

.mystic-theme-eastern .mystic-pillar-gan {
    color: #8b2500;
}

.mystic-theme-eastern .mystic-pillar-zhi {
    color: #5a4020;
}

/* 五行统计 */
.mystic-wuxing-display {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.mystic-wuxing-item {
    text-align: center;
    font-size: 14px;
}

.mystic-wuxing-element {
    display: block;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}

.mystic-wuxing-count {
    font-size: 12px;
    opacity: 0.7;
}

.mystic-wuxing-dots {
    display: flex;
    justify-content: center;
    gap: 3px;
    margin-top: 4px;
}

.mystic-wuxing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d4c5a9;
}

.mystic-wuxing-dot.filled {
    background: #8b2500;
}

/* === 加载动画 === */
.mystic-loading {
    text-align: center;
    padding: 40px 0;
}

.mystic-loading-spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
}

.mystic-spinner-stars {
    border: 3px solid rgba(108, 92, 231, 0.2);
    border-top-color: #6c5ce7;
    border-radius: 50%;
    animation: mystic-spin 1s linear infinite;
}

/* === 八字罗盘加载动画 === */
.mystic-luopan {
    width: 90px;
    height: 90px;
    margin: 0 auto 16px;
    position: relative;
}

.mystic-luopan-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
}

.mystic-luopan-ring span {
    position: absolute;
    left: 50%;
    top: 50%;
    font-size: 11px;
    font-weight: 700;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
    transform: translate(-50%, -50%) rotate(var(--char-deg)) translateY(var(--ring-r)) rotate(calc(-1 * var(--char-deg)));
}

.mystic-luopan-outer {
    animation: mystic-spin 3s linear infinite;
}

.mystic-luopan-outer span {
    --ring-r: -42px;
    color: #8b2500;
}

.mystic-luopan-inner {
    animation: mystic-spin 4s linear infinite reverse;
}

.mystic-luopan-inner span {
    --ring-r: -28px;
    color: #5a4020;
    font-size: 10px;
}

.mystic-luopan-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    font-weight: 700;
    color: #8b2500;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
    text-shadow: 0 0 8px rgba(139, 37, 0, 0.4), 0 0 16px rgba(139, 37, 0, 0.2);
    animation: mystic-luopan-glow 2s ease-in-out infinite alternate;
}

@keyframes mystic-luopan-glow {
    from { text-shadow: 0 0 6px rgba(139, 37, 0, 0.3), 0 0 12px rgba(139, 37, 0, 0.15); }
    to   { text-shadow: 0 0 12px rgba(139, 37, 0, 0.6), 0 0 24px rgba(139, 37, 0, 0.3); }
}

@keyframes mystic-spin {
    to { transform: rotate(360deg); }
}

.mystic-loading-text {
    font-size: 14px;
    opacity: 0.7;
    letter-spacing: 1px;
}

/* === 结果区域 === */
.mystic-result {
    margin-bottom: 20px;
}

.mystic-result-card {
    padding: 24px;
    border-radius: 12px;
}

.mystic-ai-text {
    font-size: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}

/* === 对话区域 === */
.mystic-chat-area {
    margin-top: 20px;
}

.mystic-chat-history {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px 0;
}

.mystic-chat-bubble {
    margin-bottom: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
    max-width: 85%;
}

.mystic-chat-bubble.user {
    margin-left: auto;
    text-align: right;
}

.mystic-theme-eastern .mystic-chat-bubble.user {
    background: rgba(139, 37, 0, 0.08);
}

.mystic-theme-eastern .mystic-chat-bubble.assistant {
    background: rgba(255, 255, 255, 0.6);
}

.mystic-theme-western .mystic-chat-bubble.user {
    background: rgba(108, 92, 231, 0.2);
}

.mystic-theme-western .mystic-chat-bubble.assistant {
    background: rgba(255, 255, 255, 0.06);
}

.mystic-chat-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.mystic-chat-input {
    flex: 1;
}

/* 快捷标签 */
.mystic-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.mystic-quick-tag {
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
    background: transparent;
    line-height: 1;
    font-family: inherit;
}

.mystic-theme-eastern .mystic-quick-tag {
    color: #8b2500;
    border-color: #c4b48a;
}

.mystic-theme-eastern .mystic-quick-tag:hover {
    background: rgba(139, 37, 0, 0.08);
    border-color: #8b2500;
}

.mystic-theme-western .mystic-quick-tag {
    color: #c8b8ff;
    border-color: #4a4570;
}

.mystic-theme-western .mystic-quick-tag:hover {
    background: rgba(108, 92, 231, 0.15);
    border-color: #6c5ce7;
}

/* === 每日一牌 === */
.mystic-daily-card-back {
    width: 140px;
    height: 210px;
    margin: 20px auto;
    background: linear-gradient(135deg, #2d1b69, #4a2c8a);
    border: 2px solid #6c5ce7;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.mystic-daily-card-back:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(108, 92, 231, 0.5);
    border-color: #a855f7;
}

.mystic-daily-card-symbol {
    font-size: 36px;
    color: rgba(200, 184, 255, 0.6);
    transition: all 0.3s ease;
}

.mystic-daily-card-back:hover .mystic-daily-card-symbol {
    color: rgba(200, 184, 255, 0.9);
    text-shadow: 0 0 12px rgba(200, 184, 255, 0.5);
}

.mystic-daily-card-back.mystic-daily-flipping {
    animation: mystic-daily-flip 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes mystic-daily-flip {
    0% { transform: rotateY(0); }
    50% { transform: rotateY(90deg); opacity: 0.5; }
    100% { transform: rotateY(180deg); opacity: 0; }
}

.mystic-daily-hint {
    font-size: 14px;
    opacity: 0.6;
    margin-top: 8px;
    text-align: center;
    letter-spacing: 1px;
}

.mystic-daily-reveal-area {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.mystic-daily-single-card {
    width: 140px;
    text-align: center;
    animation: mystic-card-appear 0.6s ease-out both;
}

.mystic-theme-daily .mystic-card-face {
    background: linear-gradient(135deg, #2d1b69, #4a2c8a);
    border: 2px solid #6c5ce7;
}

/* === Tab 导航 === */
.mystic-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 12px 0 20px;
    margin-bottom: 20px;
}

.mystic-tab-sep {
    margin: 0 12px;
    opacity: 0.3;
    font-size: 12px;
    user-select: none;
}

.mystic-tab {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    padding: 6px 2px;
    position: relative;
    transition: all 0.3s ease;
    font-family: inherit;
    letter-spacing: 2px;
}

.mystic-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.mystic-tab.active::after {
    width: 100%;
}

/* 东方馆 Tab */
.mystic-tabs-eastern {
    border-bottom: 1px solid #d4c5a9;
}

.mystic-tabs-eastern .mystic-tab {
    color: #8a7a5a;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
}

.mystic-tabs-eastern .mystic-tab:hover {
    color: #8b2500;
}

.mystic-tabs-eastern .mystic-tab.active {
    color: #8b2500;
    font-weight: 700;
}

.mystic-tabs-eastern .mystic-tab::after {
    background: linear-gradient(90deg, transparent, #8b2500, transparent);
}

/* 西方馆 Tab */
.mystic-tabs-western {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mystic-tabs-western .mystic-tab {
    color: #8a85a8;
}

.mystic-tabs-western .mystic-tab:hover {
    color: #c8b8ff;
}

.mystic-tabs-western .mystic-tab.active {
    color: #c8b8ff;
    font-weight: 700;
    text-shadow: 0 0 12px rgba(200, 184, 255, 0.3);
}

.mystic-tabs-western .mystic-tab::after {
    background: linear-gradient(90deg, transparent, #6c5ce7, #a855f7, transparent);
    box-shadow: 0 0 8px rgba(108, 92, 231, 0.4);
}

.mystic-tabs-western .mystic-tab-sep {
    color: #6c5ce7;
}

/* Tab Panel */
.mystic-tab-panel {
    display: none;
    animation: mystic-fadeIn 0.35s ease-out;
}

.mystic-tab-panel.active {
    display: block;
}

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

/* === 星座模块 === */
.mystic-zodiac-card-display {
    text-align: center;
    padding: 20px 0;
    animation: mystic-fadeIn 0.5s ease-out;
}

.mystic-zodiac-symbol {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 8px;
    text-shadow: 0 0 20px rgba(200, 184, 255, 0.4), 0 0 40px rgba(108, 92, 231, 0.2);
}

.mystic-zodiac-name {
    font-size: 22px;
    font-weight: 700;
    color: #c8b8ff;
    letter-spacing: 4px;
    margin-bottom: 4px;
}

.mystic-zodiac-name-en {
    font-size: 13px;
    opacity: 0.5;
    letter-spacing: 2px;
    margin-bottom: 12px;
}

.mystic-zodiac-meta {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.mystic-zodiac-tag {
    padding: 4px 12px;
    font-size: 12px;
    border-radius: 12px;
    background: rgba(108, 92, 231, 0.15);
    color: #c8b8ff;
    border: 1px solid rgba(108, 92, 231, 0.3);
}

/* === 梅花易数模块 === */
.mystic-meihua-modes {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 20px;
}

.mystic-meihua-mode {
    background: none;
    border: 1px solid #c4b48a;
    color: #8a7a5a;
    padding: 10px 24px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
    letter-spacing: 4px;
}

.mystic-meihua-mode:hover {
    border-color: #8b2500;
    color: #8b2500;
}

.mystic-meihua-mode.active {
    background: #8b2500;
    color: #fff;
    border-color: #8b2500;
}

.mystic-meihua-input-area {
    margin-bottom: 16px;
}

/* 卦象展示 */
.mystic-hexagram-display {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 20px;
}

.mystic-hexagram-col {
    text-align: center;
    min-width: 80px;
    animation: mystic-pillar-appear 0.5s ease-out both;
}

.mystic-hexagram-col:nth-child(2) { animation-delay: 0.15s; }
.mystic-hexagram-col:nth-child(3) { animation-delay: 0.3s; }

.mystic-hexagram-label {
    font-size: 12px;
    opacity: 0.6;
    margin-bottom: 10px;
    letter-spacing: 2px;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
}

.mystic-hexagram-lines {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.mystic-hexagram-line {
    width: 52px;
    height: 6px;
    position: relative;
}

/* 阳爻 — 实线 */
.mystic-hexagram-line.yang {
    background: #5a4020;
    border-radius: 2px;
}

/* 阴爻 — 断线 */
.mystic-hexagram-line.yin {
    background: transparent;
    display: flex;
    justify-content: space-between;
}

.mystic-hexagram-line.yin::before,
.mystic-hexagram-line.yin::after {
    content: '';
    width: 22px;
    height: 6px;
    background: #5a4020;
    border-radius: 2px;
}

/* 动爻高亮 */
.mystic-hexagram-line.dong {
    position: relative;
}

.mystic-hexagram-line.dong.yang {
    background: #c0392b;
}

.mystic-hexagram-line.dong.yin::before,
.mystic-hexagram-line.dong.yin::after {
    background: #c0392b;
}

.mystic-hexagram-line.dong::after {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #c0392b;
    font-weight: 700;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
}

.mystic-hexagram-line.dong.yang::after {
    content: '动';
}

.mystic-hexagram-line.dong.yin .mystic-dong-mark {
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #c0392b;
    font-weight: 700;
}

.mystic-hexagram-name {
    font-size: 14px;
    font-weight: 700;
    color: #8b2500;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
    letter-spacing: 1px;
}

/* 体用关系 */
.mystic-tiyong-display {
    text-align: center;
    padding: 12px 16px;
    border: 1px dashed #c4b48a;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #5a4020;
    line-height: 1.8;
    font-family: "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
}

/* === 西方馆 select 样式 === */
.mystic-theme-western .mystic-select {
    border-color: #4a4570;
    background: rgba(255, 255, 255, 0.06);
    color: #e0dde8;
}

.mystic-theme-western .mystic-select:focus {
    border-color: #6c5ce7;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.2);
}

/* === 响应式 === */
@media (max-width: 600px) {
    .mystic-wrapper {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .mystic-title {
        font-size: 20px !important;
        letter-spacing: 2px !important;
    }

    .mystic-form-row {
        flex-direction: column;
        gap: 0;
    }

    .mystic-reveal-cards {
        gap: 10px;
    }

    .mystic-reveal-card {
        width: 90px;
    }

    .mystic-pillars-display {
        gap: 8px;
    }

    .mystic-pillar {
        padding: 8px 10px;
        min-width: 60px;
    }

    .mystic-pillar-gan,
    .mystic-pillar-zhi {
        font-size: 22px;
    }

    .mystic-card-spread {
        grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
        gap: 4px;
    }

    .mystic-daily-card-back,
    .mystic-daily-single-card {
        width: 110px;
        height: 165px;
    }

    .mystic-luopan {
        width: 76px;
        height: 76px;
    }

    .mystic-luopan-outer span {
        --ring-r: -35px;
        font-size: 10px;
    }

    .mystic-luopan-inner span {
        --ring-r: -23px;
        font-size: 9px;
    }

    .mystic-luopan-center {
        font-size: 14px;
    }

    .mystic-shuffle-card {
        width: 38px;
    }

    /* Tab 响应式 */
    .mystic-tabs {
        gap: 0;
    }

    .mystic-tab {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .mystic-tab-sep {
        margin: 0 6px;
    }

    /* 星座响应式 */
    .mystic-zodiac-symbol {
        font-size: 42px;
    }

    .mystic-zodiac-name {
        font-size: 18px;
    }

    /* 梅花响应式 */
    .mystic-hexagram-display {
        gap: 16px;
    }

    .mystic-hexagram-col {
        min-width: 64px;
    }

    .mystic-hexagram-line {
        width: 42px;
    }

    .mystic-hexagram-line.yin::before,
    .mystic-hexagram-line.yin::after {
        width: 18px;
    }

    .mystic-meihua-modes {
        gap: 8px;
    }

    .mystic-meihua-mode {
        padding: 8px 16px;
        font-size: 15px;
    }
}
