/* 通鉴人生 — modern oriental theme: deep blue / rice gold / jade green */
:root {
    --deep-blue: #14213d;
    --deep-blue-2: #1f2a44;
    --gold: #c9a227;
    --gold-soft: #e6cf86;
    --jade: #2a7d6f;
    --jade-soft: #3fa392;
    --rice: #f5f1e6;
    --ink: #1f2a44;
    --muted: #6b7280;
    --bg: #fbfaf6;
    --white: #ffffff;
    --danger: #b23b3b;
    --radius: 12px;
    --shadow: 0 8px 30px rgba(20, 33, 61, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.7;
}
a { color: var(--jade); text-decoration: none; }
a:hover { color: var(--jade-soft); }
.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.page { padding: 32px 20px 60px; min-height: 60vh; }

/* Topbar */
.topbar { background: var(--deep-blue); color: #fff; box-shadow: var(--shadow); position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; position: relative; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
    font-family: "Noto Serif SC", serif; font-weight: 700; font-size: 22px;
    background: var(--gold); color: var(--deep-blue); width: 42px; height: 42px;
    display: flex; align-items: center; justify-content: center; border-radius: 10px;
}
.brand-logo { height: 44px; width: auto; max-width: 180px; display: block; border-radius: 8px; }
.brand-text { font-weight: 700; font-size: 18px; }
.brand-text small { display: block; font-weight: 400; font-size: 11px; color: var(--gold-soft); letter-spacing: 1px; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav a { color: #e7e9f0; font-size: 15px; }
.lang-switch { display: inline-flex; gap: 2px; align-items: center; margin-left: 6px; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 2px; }
.lang-switch a { font-size: 12px; padding: 3px 9px; border-radius: 999px; color: #cdd3e0; line-height: 1; }
.lang-switch a.active { background: var(--gold); color: var(--deep-blue); font-weight: 700; }
.nav a:hover { color: var(--gold-soft); }

/* Hamburger toggle (mobile only) */
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 42px; height: 42px; background: transparent; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: #fff; margin: 0 auto; transition: transform .25s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
    .nav-toggle { display: flex; }
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--deep-blue);
        padding: 6px 20px 14px;
        box-shadow: 0 12px 24px rgba(20,33,61,.35);
        border-top: 1px solid rgba(255,255,255,.1);
    }
    .nav.open { display: flex; animation: navdrop .2s ease; max-height: calc(100dvh - 62px); overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: 88px; overscroll-behavior: contain; }
    .nav a { padding: 13px 4px; border-bottom: 1px solid rgba(255,255,255,.08); font-size: 16px; }
    .nav a:last-child { border-bottom: none; }
    /* Let nav buttons span the drawer width. */
    .nav .btn-primary, .nav .btn-ghost { text-align: center; margin-top: 8px; }
}
@keyframes navdrop { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* Buttons */
.btn-primary, .btn-ghost, button.btn, .btn {
    display: inline-block; padding: 11px 22px; border-radius: 999px; font-size: 15px;
    cursor: pointer; border: none; font-weight: 600; transition: all .15s; text-align: center;
}
.btn-primary, .btn { background: var(--gold); color: var(--deep-blue); }
.btn-primary:hover, .btn:hover { background: var(--gold-soft); color: var(--deep-blue); }
.btn-ghost { border: 1px solid rgba(255,255,255,.4); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }
.btn-jade { background: var(--jade); color: #fff; }
.btn-jade:hover { background: var(--jade-soft); color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-lg { padding: 15px 34px; font-size: 17px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--deep-blue), var(--jade));
    color: #fff; border-radius: 18px; padding: 64px 40px; text-align: center; margin-bottom: 40px;
    position: relative; overflow: hidden;
}
.hero h1 { font-family: "Noto Serif SC", serif; font-size: 44px; margin: 0 0 6px; }
.hero .sub { font-size: 22px; color: var(--gold-soft); margin: 0 0 18px; letter-spacing: 2px; }
.hero p { max-width: 620px; margin: 0 auto 28px; font-size: 17px; color: #e7e9f0; }
.hero-free { margin: 18px auto 0; font-size: 14px; color: var(--gold-soft); }
.hero-free strong { color: #fff; }

/* Cards & grid */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
    background: var(--white); border-radius: var(--radius); padding: 24px;
    box-shadow: var(--shadow); border: 1px solid #eee;
}
.card h3 { margin-top: 0; color: var(--deep-blue); }
.feature-card { text-align: center; }
.feature-card .icon { font-size: 34px; }

/* Forms */
.form-wrap { max-width: 460px; margin: 0 auto; }
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
input, select, textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #d6d6cf; border-radius: 10px;
    font-size: 15px; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 3px rgba(42,125,111,.15); }
textarea { min-height: 110px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* Password show/hide toggle */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 60px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--jade); cursor: pointer; font-size: 13px; padding: 4px 6px; }
.pw-toggle:hover { color: var(--jade-soft); }

/* Flash */
.flash { padding: 13px 18px; border-radius: 10px; margin-bottom: 18px; font-size: 15px; }
.flash-success { background: #e6f4ea; color: #1e6b3a; border: 1px solid #a8d9b8; }
.flash-error { background: #fbeaea; color: var(--danger); border: 1px solid #e3b3b3; }
.flash-info { background: #eaf1fb; color: #2a4a7d; border: 1px solid #b3c9e3; }

/* Section titles */
.section-title { text-align: center; margin: 48px 0 24px; }
.section-title h2 { font-family: "Noto Serif SC", serif; font-size: 30px; color: var(--deep-blue); margin: 0; }
.section-title p { color: var(--muted); }

/* Pricing */
.plan { position: relative; display: flex; flex-direction: column; }
.plan.featured { border: 2px solid var(--gold); }
.plan .price { font-size: 32px; font-weight: 700; color: var(--jade); }
.plan .price small { font-size: 14px; color: var(--muted); font-weight: 400; }
.plan ul { list-style: none; padding: 0; margin: 16px 0; flex: 1; }
.plan ul li { padding: 7px 0; border-bottom: 1px dashed #eee; font-size: 14px; }
.plan ul li::before { content: "✓ "; color: var(--jade); font-weight: 700; }
.badge { position: absolute; top: -12px; right: 18px; background: var(--gold); color: var(--deep-blue); padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }

/* Plan carousel — grid on desktop, swipeable scroll-snap on mobile */
.plan-carousel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.swipe-hint { display: none; }
@media (max-width: 880px) {
    .plan-carousel { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .swipe-hint { display: block; text-align: center; color: var(--muted); font-size: 13px; margin: 4px 0 -4px; }
    .plan-carousel {
        display: flex;
        gap: 14px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding: 18px 16px 22px;
        margin: 0 -16px;
        scrollbar-width: none;
    }
    .plan-carousel::-webkit-scrollbar { display: none; }
    .plan-carousel .plan {
        flex: 0 0 80%;
        scroll-snap-align: center;
        /* Always visible inside the horizontal carousel (override scroll-reveal). */
        opacity: 1; transform: none;
    }
    .plan-carousel .plan.featured { box-shadow: 0 10px 30px rgba(201,162,39,.25); }
}

/* Dashboard stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat { background: var(--white); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); text-align: center; }
.stat .num { font-size: 30px; font-weight: 700; color: var(--jade); }
.stat .lbl { color: var(--muted); font-size: 14px; }

/* Pillars */
.pillars { display: flex; gap: 14px; flex-wrap: wrap; margin: 18px 0; }
.pillar { background: var(--rice); border: 1px solid var(--gold); border-radius: 10px; padding: 14px 22px; text-align: center; min-width: 84px; }
.pillar .label { font-size: 13px; color: var(--muted); }
.pillar .value { font-size: 24px; font-weight: 700; color: var(--deep-blue); font-family: "Noto Serif SC", serif; }

/* Five elements bar */
.elements { display: flex; gap: 10px; margin: 14px 0; }
.element { flex: 1; text-align: center; }
.element .bar { background: #eee; border-radius: 6px; height: 90px; display: flex; align-items: flex-end; overflow: hidden; }
.element .fill { width: 100%; background: var(--jade); border-radius: 6px 6px 0 0; }
.el-wood .fill { background: #4a9b5e; } .el-fire .fill { background: #d35454; }
.el-earth .fill { background: #c9a227; } .el-metal .fill { background: #9aa0a6; }
.el-water .fill { background: #3b7fb2; }

/* Result sections */
.result-section { margin-bottom: 22px; }
.result-section h3 { color: var(--jade); border-left: 4px solid var(--gold); padding-left: 12px; }
.result-section .body { white-space: pre-wrap; background: var(--white); padding: 16px 20px; border-radius: 10px; box-shadow: var(--shadow); }
.summary-box { background: linear-gradient(135deg, var(--deep-blue), var(--jade)); color: #fff; padding: 22px 26px; border-radius: var(--radius); font-size: 18px; margin-bottom: 24px; }

/* Gauges */
.gauges { display: flex; gap: 20px; margin: 20px 0; }
.gauge { flex: 1; background: var(--white); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.gauge .track { background: #eee; height: 14px; border-radius: 999px; overflow: hidden; margin-top: 8px; }
.gauge .meter { height: 100%; border-radius: 999px; }
.gauge.risk .meter { background: var(--danger); }
.gauge.opp .meter { background: var(--jade); }

/* Tables */
table.data { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.data th, table.data td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #eee; font-size: 14px; }
table.data th { background: var(--deep-blue); color: #fff; }
table.data tr:hover td { background: #faf8f0; }

/* Type chooser */
.type-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.type-option { cursor: pointer; }
.type-option input { display: none; }
.type-option span { display: block; padding: 14px; text-align: center; border: 2px solid #e0ddd2; border-radius: 10px; background: #fff; font-weight: 600; transition: all .15s; }
.type-option input:checked + span { border-color: var(--gold); background: var(--rice); color: var(--deep-blue); }

/* Disclaimer / footer */
.site-footer { background: var(--deep-blue); color: #c8ccd8; padding: 36px 0; margin-top: 60px; }
.site-footer .slogan { font-family: "Noto Serif SC", serif; color: var(--gold-soft); font-size: 18px; text-align: center; }
.site-footer .disclaimer { font-size: 12px; max-width: 760px; margin: 14px auto; text-align: center; color: #9aa0b0; }
.site-footer .business-info { text-align: center; font-size: 12px; color: #9aa0b0; line-height: 1.6; margin: 10px auto; max-width: 720px; }
.site-footer .business-info a { color: #c8ccd8; }
.site-footer .copyright { text-align: center; font-size: 13px; color: #6b7280; }

/* Locked feature */
.locked { opacity: .6; }
.lock-note { background: var(--rice); border: 1px dashed var(--gold); padding: 14px; border-radius: 10px; text-align: center; }

/* Admin */
/* ===== Business-operations console ===== */
/* Hide public chrome inside the admin console for an app-like layout. */
body.admin .topbar,
body.admin .site-footer,
body.admin .mobile-nav,
body.admin .cookie-consent { display: none !important; }
body.admin { background: #eef0f4; padding-bottom: 0; }
body.admin .page { max-width: 100%; padding: 0; }

.admin-grid { display: grid; grid-template-columns: 248px 1fr; gap: 0; min-height: 100vh; }

.admin-menu {
    background: #0f1830; color: #c8ccd8; padding: 0 0 24px;
    position: sticky; top: 0; align-self: start; height: 100vh; overflow-y: auto;
}
.admin-brand {
    display: flex; align-items: center; gap: 10px; padding: 20px 18px; color: #fff; font-weight: 700; font-size: 17px;
    border-bottom: 1px solid rgba(255,255,255,.08); position: sticky; top: 0; background: #0f1830; z-index: 2;
}
.admin-brand .ab-mark {
    font-family: "Noto Serif SC", serif; background: var(--gold); color: var(--deep-blue);
    width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 16px;
}
.admin-group { padding: 16px 18px 6px; font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #6b7490; }
.admin-menu a {
    display: flex; align-items: center; gap: 11px; padding: 11px 18px; color: #c8ccd8; font-size: 14.5px;
    border-left: 3px solid transparent; transition: background .15s, color .15s;
}
.admin-menu a .ai-icon { width: 20px; text-align: center; font-size: 16px; }
.admin-menu a:hover { background: rgba(255,255,255,.05); color: #fff; }
.admin-menu a.active { background: rgba(201,162,39,.14); color: var(--gold-soft); border-left-color: var(--gold); font-weight: 600; }
.admin-nav-close { display: none; }
.nav-badge { margin-left: auto; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 999px; padding: 0 5px; }

.admin-content { padding: 0 26px 40px; min-width: 0; }
.admin-topbar {
    display: flex; align-items: center; gap: 14px; padding: 16px 4px; margin-bottom: 8px;
    border-bottom: 1px solid #e2e4ea; position: sticky; top: 0; background: #eef0f4; z-index: 5;
}
.admin-burger { display: none; font-size: 22px; cursor: pointer; color: var(--deep-blue); }
.admin-page-title { font-weight: 700; font-size: 18px; color: var(--deep-blue); }
.admin-who { margin-left: auto; color: var(--muted); font-size: 14px; }
.admin-content h1 { font-size: 24px; margin-top: 14px; }

/* Admin dashboard — alerts, revenue hero, KPI cards */
body.admin .admin-alert { display: flex; align-items: center; gap: 10px; background: #fff7e6; border: 1px solid #f0d9a0; color: #7a5b00; border-radius: 12px; padding: 12px 16px; margin-bottom: 18px; font-size: 14px; }
body.admin .admin-alert a { color: #b8860b; font-weight: 600; }
body.admin .admin-alert .aa-ic { font-size: 18px; }
body.admin .rev-hero { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; background: linear-gradient(120deg, #14213d, #22335c); color: #fff; border-radius: 16px; padding: 22px 26px; box-shadow: 0 10px 30px rgba(20,33,61,.25); margin-bottom: 20px; }
body.admin .rev-hero .rh-label { font-size: 13px; color: #c9d2e6; letter-spacing: .5px; }
body.admin .rev-hero .rh-value { font-size: 40px; font-weight: 800; font-family: 'Noto Serif SC', serif; color: var(--gold-soft); line-height: 1.1; }
body.admin .rev-hero .rh-break { display: flex; gap: 26px; flex-wrap: wrap; }
body.admin .rev-hero .rh-break > div { display: flex; flex-direction: column; }
body.admin .rev-hero .rb-v { font-size: 22px; font-weight: 800; }
body.admin .rev-hero .rb-l { font-size: 12px; color: #aab4cd; }
body.admin .astats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 6px; }
body.admin .astat { display: flex; align-items: center; gap: 13px; background: #fff; border-radius: 14px; padding: 16px; box-shadow: var(--shadow); border-left: 4px solid var(--jade); }
body.admin .astat .ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: rgba(46,125,90,.12); flex-shrink: 0; }
body.admin .astat .v { font-size: 24px; font-weight: 800; color: var(--deep-blue); line-height: 1.1; }
body.admin .astat .l { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
body.admin .astat.gold { border-left-color: var(--gold); }
body.admin .astat.gold .ic { background: rgba(212,175,55,.16); }
body.admin .astat.blue { border-left-color: #2c4173; }
body.admin .astat.blue .ic { background: rgba(44,65,115,.12); }
body.admin .astat.red { border-left-color: var(--danger); }
body.admin .astat.red .ic { background: rgba(198,74,74,.14); }
@media (max-width: 900px) { body.admin .astats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) {
    body.admin .astats { grid-template-columns: 1fr 1fr; gap: 10px; }
    body.admin .astat { padding: 12px; gap: 10px; }
    body.admin .astat .ic { width: 38px; height: 38px; font-size: 19px; }
    body.admin .astat .v { font-size: 20px; }
    body.admin .rev-hero .rh-value { font-size: 32px; }
}
/* Admin tables scroll horizontally on small screens (no ugly vertical wrap) */
@media (max-width: 760px) {
    body.admin table.data { display: block; overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; }
    /* Opt-in card layout: <table class="data cards"> with data-label on each td */
    body.admin table.data.cards { overflow: visible; white-space: normal; box-shadow: none; background: transparent; }
    body.admin table.data.cards thead { display: none; }
    body.admin table.data.cards tbody, body.admin table.data.cards tr, body.admin table.data.cards td { display: block; }
    body.admin table.data.cards tr { background: #fff; border-radius: 12px; box-shadow: var(--shadow); margin-bottom: 12px; padding: 4px 2px; }
    body.admin table.data.cards td { border: none; border-bottom: 1px solid #f2f2f2; padding: 8px 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13.5px; text-align: right; }
    body.admin table.data.cards tr td:last-child { border-bottom: none; }
    body.admin table.data.cards td::before { content: attr(data-label); color: var(--muted); font-weight: 600; flex-shrink: 0; text-align: left; }
}

@media (max-width: 880px) {
    .admin-grid { grid-template-columns: 1fr; }
    .admin-menu {
        position: fixed; top: 0; left: 0; bottom: 0; width: 250px; z-index: 80;
        transform: translateX(-100%); transition: transform .25s ease; height: 100vh;
    }
    .admin-nav-toggle:checked ~ .admin-grid .admin-menu { transform: translateX(0); box-shadow: 8px 0 30px rgba(0,0,0,.3); }
    .admin-nav-close { display: block; position: absolute; top: 16px; right: 14px; color: #c8ccd8; cursor: pointer; font-size: 18px; }
    .admin-burger { display: block; }
}

/* ===== Interactive landing ===== */

/* Scroll reveal */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
[data-reveal].revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* Hero interactive */
.hero-interactive { position: relative; }
.hero-interactive .btn-ghost { margin-left: 10px; }
.hero-typed { min-height: 34px; font-size: 22px; color: var(--gold-soft); font-family: "Noto Serif SC", serif; margin: 0 0 8px; }
.hero-typed .caret { animation: blink 1s step-end infinite; color: var(--gold-soft); }
@keyframes blink { 50% { opacity: 0; } }

.hero-orbs { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-orbs .orb {
    position: absolute; font-family: "Noto Serif SC", serif; color: rgba(255,255,255,.10);
    font-size: 90px; animation: float 9s ease-in-out infinite;
}
.orb-1 { top: 8%; left: 6%; font-size: 120px; }
.orb-2 { top: 50%; left: 12%; animation-delay: -2s; }
.orb-3 { top: 14%; right: 10%; animation-delay: -4s; font-size: 70px; }
.orb-4 { bottom: 10%; right: 8%; animation-delay: -1s; }
.orb-5 { bottom: 16%; left: 44%; animation-delay: -6s; font-size: 60px; }
@keyframes float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-22px) rotate(8deg); } }

/* Counters */
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 36px 0; }
.counter { text-align: center; }
.counter .num { display: block; font-size: 46px; font-weight: 800; color: var(--jade); font-family: "Noto Serif SC", serif; line-height: 1; }
.counter .lbl { color: var(--muted); font-size: 14px; }

/* Module tabs */
.module-tabs { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tab-buttons { display: flex; flex-wrap: wrap; background: var(--rice); }
.tab-btn { flex: 1; padding: 16px; border: none; background: transparent; font-size: 16px; font-weight: 600; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; transition: all .2s; min-width: 110px; }
.tab-btn:hover { color: var(--deep-blue); }
.tab-btn.active { color: var(--deep-blue); background: var(--white); border-bottom-color: var(--gold); }
.tab-panels { padding: 28px; }
.tab-panel { display: none; animation: fadein .4s ease; }
.tab-panel.active { display: block; }
.tab-panel h3 { color: var(--jade); margin-top: 0; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* I Ching demo */
.divination { text-align: center; max-width: 560px; margin: 0 auto; }
.divination input { margin-bottom: 14px; text-align: center; }
.div-result { margin-top: 20px; animation: fadein .5s ease; }
.div-symbol { font-size: 90px; line-height: 1; color: var(--deep-blue); transition: transform .2s; }
.div-symbol.spinning { animation: shake .2s linear infinite; color: var(--gold); }
@keyframes shake { 0%,100% { transform: scale(1.05) rotate(-3deg); } 50% { transform: scale(1.1) rotate(3deg); } }
.div-name { font-size: 24px; font-weight: 700; color: var(--jade); font-family: "Noto Serif SC", serif; margin-top: 8px; }
.div-keyword { font-size: 17px; color: var(--gold); margin: 4px 0 10px; }
.div-cta { margin-top: 16px; border-top: 1px dashed #e0ddd2; padding-top: 16px; }
.div-cta-lead { font-size: 15px; color: var(--ink); }
.div-followup { display: flex; gap: 8px; max-width: 460px; margin: 12px auto 0; }
.div-followup input { flex: 1; }
.div-followup .btn-jade { white-space: nowrap; }
.div-gate { margin-top: 16px; background: var(--rice); border: 1px dashed var(--gold); border-radius: 12px; padding: 18px; }
.div-gate p { margin: 0 0 12px; color: var(--deep-blue); }
.div-gate .btn, .div-gate .btn-ghost { margin: 4px; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq-item { background: var(--white); border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.faq-q { width: 100%; text-align: left; padding: 18px 20px; border: none; background: transparent; font-size: 16px; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; align-items: center; color: var(--deep-blue); }
.faq-icon { font-size: 22px; color: var(--gold); transition: transform .25s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height .3s ease; padding: 0 20px; }
.faq-item.open .faq-a { max-height: 240px; padding-bottom: 18px; }
.faq-a p { margin: 0; color: var(--ink); }

/* CTA banner */
.cta-banner { text-align: center; background: linear-gradient(135deg, var(--deep-blue), var(--jade)); color: #fff; border-radius: 18px; padding: 48px 30px; margin: 50px 0 10px; }
.cta-banner h2 { font-family: "Noto Serif SC", serif; color: var(--gold-soft); margin-top: 0; }

@media (max-width: 720px) {
    .counters { grid-template-columns: repeat(2, 1fr); }
    .counter .num { font-size: 38px; }
    .hero-interactive .btn-ghost { display: inline-block; margin: 10px 0 0; color: #fff; border-color: rgba(255,255,255,.5); }
    .hero-orbs .orb { font-size: 60px; }
    .orb-1 { font-size: 80px; }
}

/* Element badge (team members) */
.el-badge { display: inline-block; font-size: 13px; font-weight: 700; color: #fff; padding: 1px 9px; border-radius: 999px; vertical-align: middle; }
.el-badge.el-wood { background: #4a9b5e; } .el-badge.el-fire { background: #d35454; }
.el-badge.el-earth { background: #c9a227; } .el-badge.el-metal { background: #9aa0a6; }
.el-badge.el-water { background: #3b7fb2; }

/* Admin mini bar chart */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.bar-fill { width: 100%; min-height: 2px; background: linear-gradient(180deg, var(--jade-soft), var(--jade)); border-radius: 4px 4px 0 0; transition: height .3s; }
.bar-lbl { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* Follow-up chat */
.chat-card { margin-top: 24px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; margin: 14px 0; max-height: 420px; overflow-y: auto; }
.chat-msg { padding: 11px 15px; border-radius: 14px; max-width: 85%; white-space: pre-wrap; line-height: 1.6; font-size: 15px; }
.chat-user { align-self: flex-end; background: var(--jade); color: #fff; border-bottom-right-radius: 4px; }
.chat-assistant { align-self: flex-start; background: var(--rice); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-typing { opacity: .65; font-style: italic; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; }
.chat-form textarea { flex: 1; min-height: 44px; resize: vertical; }
.chat-form .btn { white-space: nowrap; }

/* Annual flying-star grid */
.annual-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.annual-cell {
    border: 1px solid #e0ddd2; border-radius: 10px; padding: 12px 10px; text-align: center;
    background: #fff; min-height: 110px; display: flex; flex-direction: column; gap: 3px;
}
.annual-cell .ac-dir { font-weight: 700; color: var(--deep-blue); }
.annual-cell .ac-star { font-size: 18px; font-weight: 700; font-family: "Noto Serif SC", serif; }
.annual-cell .ac-luck { font-size: 12px; font-weight: 700; }
.annual-cell .ac-flags { font-size: 12px; font-weight: 700; color: var(--danger); }
.annual-cell .ac-advice { font-size: 11px; color: var(--muted); line-height: 1.4; }
.annual-cell.lk-good { background: #eef7f0; border-color: #a8d9b8; }
.annual-cell.lk-good .ac-luck { color: #1e6b3a; }
.annual-cell.lk-great { background: #e6f4ea; border-color: #4a9b5e; }
.annual-cell.lk-great .ac-luck { color: #1e6b3a; }
.annual-cell.lk-bad { background: #fbf0ea; border-color: #e3c3b3; }
.annual-cell.lk-bad .ac-luck { color: #b2602b; }
.annual-cell.lk-worst { background: #fbeaea; border-color: #e3b3b3; }
.annual-cell.lk-worst .ac-luck { color: var(--danger); }
.annual-cell.has-flag { box-shadow: inset 0 0 0 2px var(--gold); }

/* Live support widget */
body.admin .support-widget { display: none; }
.support-widget { position: fixed; right: 20px; bottom: 20px; z-index: 90; }
.support-bubble {
    width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
    background: var(--jade); color: #fff; font-size: 24px; box-shadow: 0 8px 24px rgba(20,33,61,.28);
    transition: transform .2s, background .2s;
}
.support-bubble:hover { background: var(--jade-soft); transform: scale(1.05); }
.support-bubble.open { background: var(--deep-blue); }
.support-panel {
    position: absolute; right: 0; bottom: 70px; width: 340px; max-width: calc(100vw - 40px);
    background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(20,33,61,.3); overflow: hidden;
    display: none; flex-direction: column; animation: modalpop .2s ease;
}
.support-panel.open { display: flex; }
.support-head { background: var(--deep-blue); color: #fff; padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.support-x { background: none; border: none; color: #fff; font-size: 16px; cursor: pointer; }
.support-log { padding: 14px; height: 320px; max-height: 50vh; overflow-y: auto; display: flex; flex-direction: column; gap: 9px; background: var(--bg); }
.sup-msg { padding: 9px 13px; border-radius: 13px; max-width: 86%; font-size: 14px; line-height: 1.55; white-space: pre-wrap; }
.sup-user { align-self: flex-end; background: var(--jade); color: #fff; border-bottom-right-radius: 4px; }
.sup-assistant { align-self: flex-start; background: #fff; color: var(--ink); border: 1px solid #eee; border-bottom-left-radius: 4px; }
.sup-typing { opacity: .6; font-style: italic; }
.support-wa { display: block; text-align: center; background: #25d366; color: #fff; padding: 9px; font-size: 14px; font-weight: 600; }
.support-wa:hover { color: #fff; opacity: .92; }
.support-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eee; }
.support-form input { flex: 1; padding: 9px 12px; }
.support-form .btn { padding: 9px 16px; }
@media (max-width: 720px) {
    .support-widget { right: 14px; bottom: 78px; }
    .support-panel { bottom: 66px; }
}

/* Modal */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200; background: rgba(20,33,61,.55);
    display: flex; align-items: center; justify-content: center; padding: 20px;
    animation: fadein .2s ease;
}
.modal {
    background: #fff; border-radius: 16px; padding: 28px; max-width: 440px; width: 100%;
    box-shadow: 0 24px 60px rgba(20,33,61,.35); position: relative; animation: modalpop .25s ease;
}
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 18px; color: var(--muted); cursor: pointer; }
@keyframes modalpop { from { opacity: 0; transform: translateY(16px) scale(.97); } to { opacity: 1; transform: none; } }
.onboard-list { list-style: none; padding: 0; margin: 14px 0; }
.onboard-list li { padding: 9px 12px; background: var(--rice); border-radius: 9px; margin-bottom: 8px; font-size: 15px; }
.onboard-progress { background: #eee; height: 10px; border-radius: 999px; overflow: hidden; margin: 14px 0 4px; }
.onboard-progress div { height: 100%; background: linear-gradient(90deg, var(--gold), var(--jade)); border-radius: 999px; transition: width .4s; }

/* Legal pages */
.legal { max-width: 820px; margin: 0 auto; }
.legal h1 { font-family: "Noto Serif SC", serif; color: var(--deep-blue); }
.legal h2 { color: var(--jade); margin-top: 28px; border-left: 4px solid var(--gold); padding-left: 12px; }
.legal ul { padding-left: 22px; }
.legal li { margin: 6px 0; }
.legal table.data { margin: 14px 0; }

/* Footer legal links */
.legal-links { text-align: center; margin: 12px 0; }
.legal-links a { color: #c8ccd8; font-size: 13px; margin: 0 10px; }
.legal-links a:hover { color: var(--gold-soft); }

/* Cookie consent banner */
.cookie-consent {
    position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 70;
    background: var(--deep-blue); color: #e7e9f0; border: 1px solid var(--gold);
    border-radius: 12px; padding: 16px 20px; box-shadow: 0 10px 40px rgba(20,33,61,.3);
    display: none; align-items: center; gap: 16px; max-width: 920px; margin: 0 auto; font-size: 14px;
}
.cookie-consent.show { display: flex; }
.cookie-consent a { color: var(--gold-soft); }
.cookie-consent .btn { white-space: nowrap; }
@media (max-width: 720px) {
    /* Sit above the mobile bottom nav. */
    .cookie-consent { flex-direction: column; align-items: stretch; text-align: center; bottom: calc(64px + env(safe-area-inset-bottom, 0)); }
}

/* Mobile sticky bottom nav (logged-in users) */
.mobile-nav { display: none; }
@media (max-width: 720px) {
    .mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        z-index: 60;
        background: var(--deep-blue);
        border-top: 1px solid rgba(255,255,255,.12);
        box-shadow: 0 -4px 20px rgba(20,33,61,.18);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }
    .mobile-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 8px 0 7px;
        color: #c8ccd8;
        font-size: 11px;
    }
    .mobile-nav a .mn-icon { font-size: 20px; line-height: 1; }
    .mobile-nav a.active { color: var(--gold-soft); }
    .mobile-nav a.active .mn-label { font-weight: 700; }
    /* Featured store tab — raised gold pill so 商城 stands out */
    .mobile-nav a.mn-featured { color: var(--deep-blue); }
    .mobile-nav a.mn-featured .mn-icon {
        background: var(--gold); color: var(--deep-blue); width: 42px; height: 42px; border-radius: 50%;
        display: flex; align-items: center; justify-content: center; margin-top: -20px;
        box-shadow: 0 4px 12px rgba(201,162,39,.5); border: 3px solid #14213d; font-size: 19px;
    }
    .mobile-nav a.mn-featured .mn-label { color: var(--gold-soft); font-weight: 700; }
    /* Keep content + footer clear of the fixed bar. */
    body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0)); }
    .site-footer { margin-bottom: calc(58px + env(safe-area-inset-bottom, 0)); }
}

/* Today's solar-calendar almanac bar (landing) */
.today-bar {
    display: block; text-decoration: none;
    background: linear-gradient(100deg, rgba(20,33,61,.96), rgba(30,48,86,.96));
    color: #f3ede0; border: 1px solid rgba(212,175,55,.35); border-radius: 14px;
    padding: 12px 20px; margin: 0 auto 22px; max-width: 860px;
    box-shadow: 0 8px 24px rgba(20,33,61,.18);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.today-bar:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(20,33,61,.28); border-color: rgba(212,175,55,.6); }
.today-bar .today-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 18px; }
.today-bar .today-label { font-size: 12px; color: var(--gold-soft); letter-spacing: 1px; margin-right: 8px; }
.today-bar .today-solar strong { font-size: 20px; font-family: 'Noto Serif SC', serif; }
.today-bar .today-week { margin-left: 8px; color: #cdd3e0; font-size: 14px; }
.today-bar .today-greg { margin-left: 8px; color: #9aa4bb; font-size: 12px; }
.today-bar .today-festival {
    display: inline-block; margin-left: 8px; font-size: 13px; font-weight: 700;
    background: var(--gold); color: var(--deep-blue); border-radius: 999px; padding: 2px 10px; vertical-align: middle;
}
.today-bar .today-term {
    display: inline-block; margin-left: 8px; font-size: 12px; color: #cfe6d6;
    border: 1px solid rgba(127,212,163,.5); border-radius: 999px; padding: 2px 9px; vertical-align: middle;
}
.today-bar .today-ganzhi { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.today-bar .gz {
    font-family: 'Noto Serif SC', serif; font-size: 15px; background: rgba(255,255,255,.08);
    border: 1px solid rgba(212,175,55,.25); border-radius: 8px; padding: 3px 9px;
}
.today-bar .gz-day { background: var(--gold); color: var(--deep-blue); font-weight: 700; border-color: var(--gold); }
.today-bar .today-zodiac, .today-bar .today-el { font-size: 13px; color: #dfe3ec; }
.today-bar .today-yiji {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px;
    margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13.5px;
}
.today-bar .yi, .today-bar .ji { font-weight: 600; }
.today-bar .yi { color: #7fd4a3; }
.today-bar .ji { color: #e6a5a5; }
.today-bar .today-cta { margin-left: auto; color: var(--gold-soft); font-size: 13px; white-space: nowrap; }
@media (max-width: 600px) {
    .today-bar .today-row { flex-direction: column; align-items: flex-start; }
    .today-bar .today-ganzhi { gap: 5px 8px; }
    .today-bar .today-cta { margin-left: 0; }
}

/* Privacy trust line (home + register) */
.trust-line { font-size: 13px; color: var(--muted); margin-top: 10px; }
.hero .trust-line { color: rgba(255,255,255,.75); }

/* Privacy assurance box (profile) */
.privacy-box { background: #f2f8f4; border: 1px solid #cfe6d6; border-radius: 12px; padding: 14px 18px; margin-bottom: 18px; font-size: 14px; color: var(--ink); }
.privacy-box strong { color: #1e6b3a; }
.privacy-box ul { margin: 8px 0 0; padding-left: 20px; }
.privacy-box li { margin-bottom: 5px; line-height: 1.6; }
.privacy-box a { color: var(--jade); font-weight: 600; }

/* Trial notes (register + hero) */
.trial-note { background: linear-gradient(120deg, #fff7e6, #fdeecb); border: 1px solid #f0d9a0; color: #7a5b00; border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; text-align: center; }
.hero-trial { display: inline-block; background: rgba(212,175,55,.18); border: 1px solid rgba(212,175,55,.5); color: var(--gold-soft); border-radius: 999px; padding: 8px 20px; margin: 4px 0 16px; font-size: 15px; }

/* Trial banner */
.trial-banner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    background: linear-gradient(120deg, #2a1f52, #3a2b6e); color: #f3ede0;
    border: 1px solid rgba(212,175,55,.4); border-radius: 14px; padding: 14px 20px; margin-bottom: 18px; }
.trial-banner .hint { color: #cfc7e6 !important; }
.trial-banner .btn { flex-shrink: 0; }
@media (max-width: 520px) { .trial-banner { flex-direction: column; align-items: flex-start; } }

/* Pricing plans */
.plan-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; align-items: stretch; margin-top: 22px; }
.plan-card {
    position: relative; display: flex; flex-direction: column; text-align: center;
    background: var(--white); border: 1px solid #eee; border-radius: 16px; padding: 26px 20px 22px;
    box-shadow: var(--shadow);
}
.plan-card.featured { border: 2px solid var(--gold); box-shadow: 0 16px 36px rgba(212,175,55,.22); }
.plan-card .plan-badge {
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--gold); color: var(--deep-blue); font-size: 12px; font-weight: 800;
    padding: 4px 16px; border-radius: 999px; white-space: nowrap; box-shadow: 0 3px 10px rgba(201,162,39,.4);
}
.plan-card .plan-name { font-size: 18px; font-weight: 700; color: var(--deep-blue); letter-spacing: .5px; }
.plan-card .plan-price { font-size: 38px; font-weight: 800; color: var(--jade); font-family: 'Noto Serif SC', serif; margin: 8px 0 2px; line-height: 1; }
.plan-card .plan-price small { font-size: 15px; color: var(--muted); font-weight: 400; }
.plan-card .plan-feats { list-style: none; padding: 0; margin: 18px 0 20px; flex: 1; text-align: left; }
.plan-card .plan-feats li { position: relative; padding: 9px 0 9px 26px; border-bottom: 1px dashed #ececec; font-size: 14px; color: var(--ink); }
.plan-card .plan-feats li:last-child { border-bottom: none; }
.plan-card .plan-feats li::before { content: "✓"; position: absolute; left: 2px; color: var(--jade); font-weight: 800; }
.plan-card .btn { margin-top: auto; }
.btn-outline { background: transparent; color: var(--jade); border: 1.5px solid var(--jade); }
.btn-outline:hover { background: rgba(46,125,90,.08); }
.plan-current { background: #edeef1 !important; color: var(--muted) !important; cursor: default; box-shadow: none; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .plan-grid { grid-template-columns: 1fr; gap: 22px; } }

/* History list (card rows) */
.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    background: var(--white); border: 1px solid #eee; border-radius: 12px; padding: 14px 16px;
    box-shadow: var(--shadow); text-decoration: none; color: inherit;
    transition: transform .12s ease, box-shadow .12s ease;
}
.history-item:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20,33,61,.12); }
.history-item .hi-main { flex: 1; min-width: 0; }
.history-item .hi-q { font-weight: 600; color: var(--deep-blue); font-size: 15px; margin-bottom: 6px; line-height: 1.4; }
.history-item .hi-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.history-item .hi-type { background: rgba(46,125,90,.12); color: var(--jade); padding: 2px 9px; border-radius: 999px; font-weight: 600; white-space: nowrap; }
.history-item .hi-scores { display: flex; gap: 6px; flex-shrink: 0; }
.history-item .hi-chip { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.history-item .hi-chip.opp { background: rgba(46,125,90,.14); color: #1e6b3a; }
.history-item .hi-chip.risk { background: rgba(198,74,74,.14); color: var(--danger); }
@media (max-width: 480px) {
    .history-item { flex-direction: column; align-items: stretch; gap: 8px; }
    .history-item .hi-scores { align-self: flex-start; }
}

/* Report store product cards */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 18px; }
@media (max-width: 860px) { .product-grid { grid-template-columns: repeat(2, 1fr); } }
.product-card { position: relative; overflow: hidden; }
.product-card .product-icon { font-size: 34px; line-height: 1; }
.product-price { font-size: 30px; font-weight: 800; color: var(--jade); font-family: 'Noto Serif SC', serif; }
@media (max-width: 560px) {
    .product-grid { gap: 10px; }
    .product-card { padding: 14px 12px; }
    .product-card .product-icon { font-size: 26px; }
    .product-card h3 { font-size: 15px; margin: 4px 0 4px; }
    .product-price { font-size: 22px; }
    .product-card p { font-size: 12.5px; line-height: 1.5; }
    .product-card .btn { padding: 9px 8px; font-size: 13px; }
}
.product-featured { border: 1.5px solid var(--gold); box-shadow: 0 10px 26px rgba(212,175,55,.18); }
.product-badge {
    position: absolute; top: 12px; right: -30px; transform: rotate(45deg);
    background: var(--gold); color: var(--deep-blue); font-size: 11px; font-weight: 800;
    padding: 3px 34px; letter-spacing: .5px;
}

/* Article / blog */
.article { max-width: 760px; margin: 0 auto; }
.article h1 { margin-bottom: 6px; }
.article-body { font-size: 16.5px; line-height: 1.95; color: var(--ink); }
.article-body h2 { margin: 26px 0 8px; color: var(--deep-blue); font-size: 21px; }
.article-body p { margin: 0 0 14px; }

/* Topic landing pages */
.topic-hero { text-align: center; padding: 20px 0 10px; }
.topic-hero .topic-icon { font-size: 52px; line-height: 1; }
.topic-hero h1 { margin: 10px 0 6px; }
.topic-hero .topic-lead { color: var(--muted); max-width: 640px; margin: 0 auto 18px; font-size: 16px; line-height: 1.8; }

/* Numerology — number medallions */
.num-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 10px; }
.num-cell {
    text-align: center; padding: 18px 10px; border-radius: 16px;
    background: linear-gradient(160deg, #ffffff, #faf6ea); border: 1px solid #ece3cf;
    box-shadow: 0 6px 16px rgba(20,33,61,.06);
}
.num-cell .num-big {
    display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 50%;
    font-family: 'Noto Serif SC', serif; font-size: 38px; font-weight: 800; color: var(--gold-soft); line-height: 1;
    background: radial-gradient(circle at 50% 32%, #2c4173, #14213d);
    border: 2px solid var(--gold);
    box-shadow: 0 8px 20px rgba(20,33,61,.3), inset 0 0 16px rgba(212,175,55,.28);
    margin-bottom: 10px;
}
.num-cell .num-label { font-size: 12px; color: var(--muted); }
.num-cell .num-title { font-size: 14px; font-weight: 700; margin-top: 2px; color: var(--deep-blue); }
@media (max-width: 560px) { .num-grid { grid-template-columns: 1fr 1fr; } }

/* Numerology — life pyramid */
.num-pyramid {
    display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 12px 0; padding: 20px 12px; border-radius: 16px;
    background: radial-gradient(130% 90% at 50% 0%, rgba(212,175,55,.14), transparent 62%), var(--rice);
}
.num-pyramid .np-row { display: flex; gap: 14px; justify-content: center; }
.num-pyramid span {
    display: flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 13px;
    font-family: 'Noto Serif SC', serif; font-weight: 800; font-size: 23px; box-shadow: 0 5px 14px rgba(20,33,61,.16);
}
.num-pyramid .np-peak {
    width: 66px; height: 66px; font-size: 28px; color: var(--deep-blue);
    background: linear-gradient(160deg, #f0d585, #c9a227);
    box-shadow: 0 8px 22px rgba(201,162,39,.5), inset 0 0 14px rgba(255,255,255,.4);
}
.num-pyramid .np-mid { background: linear-gradient(160deg, #2c4173, #14213d); color: var(--gold-soft); }
.num-pyramid .np-base { background: #fff; color: var(--deep-blue); border: 1px solid #e6dcc4; }

/* Daily tarot widget */
.daily-tarot {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap; text-decoration: none;
    max-width: 860px; margin: 0 auto 22px; padding: 14px 20px;
    background: linear-gradient(120deg, #241b3e, #3a2b5e); color: #f3ede0;
    border: 1px solid rgba(160,120,220,.45); border-radius: 14px;
    box-shadow: 0 8px 24px rgba(30,20,60,.22); transition: transform .15s ease, box-shadow .15s ease;
}
.daily-tarot:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(30,20,60,.32); }
.daily-tarot .dt-badge { font-size: 13px; font-weight: 700; color: #d9c7ff; white-space: nowrap; }
.daily-tarot .dt-symbol { font-size: 34px; line-height: 1; filter: drop-shadow(0 2px 5px rgba(0,0,0,.4)); }
.daily-tarot .dt-symbol.reversed { transform: rotate(180deg); }
.daily-tarot .dt-main { flex: 1; min-width: 180px; }
.daily-tarot .dt-face { display: flex; align-items: baseline; gap: 10px; }
.daily-tarot .dt-name { font-family: 'Noto Serif SC', serif; font-size: 20px; font-weight: 700; }
.daily-tarot .dt-face.reversed .dt-name { color: #f2b8b8; }
.daily-tarot .dt-orient { font-size: 12px; padding: 1px 9px; border-radius: 999px; background: rgba(255,255,255,.14); }
.daily-tarot .dt-key { font-size: 13px; color: #dfd6ef; margin-top: 3px; }
.daily-tarot .dt-cta { color: #e9b8ff; font-size: 13px; white-space: nowrap; margin-left: auto; }
@media (max-width: 560px) { .daily-tarot .dt-cta { margin-left: 0; } }

/* Tarot spread — decorative CSS cards */
.tarot-spread { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 12px; }
.tarot-card { text-align: center; }
.tarot-card .tc-pos { font-size: 12px; color: var(--gold); font-weight: 600; margin-bottom: 8px; letter-spacing: .5px; }

/* 3D flip (back -> front reveal) */
.tarot-card .tc-flip { perspective: 1100px; }
.tarot-card .tc-inner {
    position: relative; aspect-ratio: 2 / 3; transform-style: preserve-3d;
    transition: transform 1s cubic-bezier(.2,.75,.25,1); transform: rotateY(180deg);
}
.tarot-card .tc-flip.revealed .tc-inner { transform: rotateY(0deg); }
.tarot-card .tc-back, .tarot-card .tc-front {
    position: absolute; inset: 0; border-radius: 14px; overflow: hidden;
    -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.tarot-card .tc-back {
    transform: rotateY(180deg);
    display: flex; align-items: center; justify-content: center;
    background:
        repeating-linear-gradient(45deg, rgba(212,175,55,.10) 0 8px, transparent 8px 16px),
        linear-gradient(160deg, #241a44, #14213d);
    border: 2px solid rgba(212,175,55,.55);
    box-shadow: inset 0 0 0 4px rgba(212,175,55,.15), inset 0 0 24px rgba(120,90,200,.3);
}
.tarot-card .tc-back .tc-back-mark { font-size: 44px; color: rgba(212,175,55,.85); }
.tarot-card .tc-back img { width: 100%; height: 100%; object-fit: cover; }
.tarot-card .tc-front { transform: rotateY(0deg); }
.tarot-card .tc-frame {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    padding: 16px 12px; overflow: hidden;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(120,90,200,.35), transparent 60%),
        linear-gradient(160deg, #241a44 0%, #33265f 55%, #1a1233 100%);
    color: #f3ede0;
    border: 2px solid transparent;
    background-clip: padding-box;
    box-shadow: 0 10px 26px rgba(25,15,55,.4), inset 0 0 0 1px rgba(212,175,55,.35), inset 0 0 30px rgba(120,90,200,.25);
}
/* Golden ornate double border */
.tarot-card .tc-frame::before {
    content: ""; position: absolute; inset: 6px; border-radius: 9px;
    border: 1px solid rgba(212,175,55,.55);
    box-shadow: inset 0 0 12px rgba(212,175,55,.18);
    pointer-events: none;
}
.tarot-card .tc-frame::after {
    content: "✦"; position: absolute; top: 8px; left: 0; right: 0; text-align: center;
    color: rgba(212,175,55,.7); font-size: 11px;
}
.tarot-card .tc-symbol { font-size: 46px; line-height: 1; margin-top: 6px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.4)); }
.tarot-card.reversed .tc-symbol { transform: rotate(180deg); }
.tarot-card .tc-name { font-family: 'Noto Serif SC', serif; font-size: 19px; font-weight: 800; }
.tarot-card .tc-en { font-size: 10.5px; color: #c9bff0; letter-spacing: .5px; }
.tarot-card .tc-orient { font-size: 12px; font-weight: 700; padding: 2px 12px; border-radius: 999px; background: rgba(255,255,255,.14); }
.tarot-card.reversed .tc-orient { background: rgba(224,120,120,.3); color: #f4c2c2; }
/* Real uploaded card image */
.tarot-card .tc-frame.has-img { padding: 0; }
.tarot-card .tc-frame.has-img::before, .tarot-card .tc-frame.has-img::after { z-index: 2; }
.tarot-card .tc-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.tarot-card.reversed .tc-img { transform: rotate(180deg); }
.tarot-card .tc-caption {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 3; padding: 20px 6px 8px;
    font-size: 12.5px; font-weight: 700; color: #fff;
    background: linear-gradient(transparent, rgba(15,8,35,.88));
}
.tarot-card .tc-key { font-size: 12.5px; color: var(--ink); line-height: 1.6; margin-top: 10px; }
@media (max-width: 560px) {
    .tarot-spread:not(.celtic) { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .tarot-card .tc-symbol { font-size: 38px; }
    .tarot-card .tc-name { font-size: 16px; }
}

/* Celtic Cross layout: cross + staff */
.tarot-spread.celtic {
    display: flex; gap: 20px; align-items: center; justify-content: center; flex-wrap: wrap;
    padding: 10px 0; overflow-x: auto;
}
.tarot-spread.celtic .cross { display: grid; grid-template-columns: repeat(3, 74px); grid-template-rows: repeat(3, 111px); gap: 8px; }
.tarot-spread.celtic .staff { display: flex; flex-direction: column-reverse; gap: 8px; }
.tarot-spread.celtic .tarot-card { position: relative; width: 74px; text-align: center; }
.tarot-spread.celtic .staff .tarot-card { width: 74px; }
/* Cross positions (cards 1-6, in DOM order) */
.tarot-spread.celtic .cross .tarot-card:nth-child(1) { grid-area: 2 / 2; z-index: 1; }          /* 现状核心 */
.tarot-spread.celtic .cross .tarot-card:nth-child(2) { grid-area: 2 / 2; z-index: 3; transform: rotate(90deg); } /* 当前挑战 · 横压 */
.tarot-spread.celtic .cross .tarot-card:nth-child(3) { grid-area: 3 / 2; }                        /* 潜意识根源 · 下 */
.tarot-spread.celtic .cross .tarot-card:nth-child(4) { grid-area: 2 / 1; }                        /* 过去影响 · 左 */
.tarot-spread.celtic .cross .tarot-card:nth-child(5) { grid-area: 1 / 2; }                        /* 目标 · 上 */
.tarot-spread.celtic .cross .tarot-card:nth-child(6) { grid-area: 2 / 3; }                        /* 不久的将来 · 右 */
.tarot-spread.celtic .tc-num {
    position: absolute; top: -6px; left: -6px; z-index: 6; width: 20px; height: 20px; border-radius: 50%;
    background: var(--gold); color: var(--deep-blue); font-size: 11px; font-weight: 800;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.celtic-legend { margin: 16px 0 0; padding-left: 22px; }
.celtic-legend li { margin-bottom: 6px; font-size: 13.5px; line-height: 1.6; }
.celtic-legend li strong { color: var(--deep-blue); }

/* Print / Save-as-PDF (shared report) */
@media print {
    .topbar, .site-footer, .mobile-nav, .cookie-consent, .support-widget,
    .no-print, .chat-card { display: none !important; }
    body { background: #fff; }
    .page { padding: 0 8px; max-width: 100%; }
    .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    .summary-box { color: #14213d !important; background: #f5f1e6 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    a { color: inherit; text-decoration: none; }
    .report-shared h1 { margin-top: 0; }
}

.spinner { display: none; }
.loading .spinner { display: inline-block; }
.loading .btn-label { display: none; }

@media (max-width: 880px) {
    .grid-3, .grid-4, .stats, .type-grid { grid-template-columns: repeat(2, 1fr); }
    .admin-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 32px; }
    .gauges { flex-direction: column; }
}
@media (max-width: 520px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    /* Keep stats + tool cards as a compact 2x2 grid instead of huge stacked cards. */
    .stats, .grid-4, .type-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat { padding: 14px 10px; }
    .stat .num { font-size: 22px; }
    .stat .lbl { font-size: 12px; }
    .feature-card { padding: 16px 10px; }
    .feature-card .icon { font-size: 26px; }
    .feature-card h3 { font-size: 15px; margin: 6px 0 4px; }
    .feature-card p { font-size: 12px; }
    /* Tighter spacing so text cards (开始咨询 / 今日锦囊) aren't so tall. */
    .grid { gap: 14px; }
    .card { padding: 16px; }
    .feature-card { padding: 16px 10px; }
    .page h1 { font-size: 26px; }
    .section-title { margin-top: 26px !important; }
    .nav { gap: 10px; font-size: 14px; }
}