:root {
    --red: #8b1010;
    --deep-red: #5d0707;
    --gold: #e9c36a;
    --gold-soft: #fff0ba;
    --ink: #361616;
    --muted: #7a5d48;
    --paper: #fff8eb;
    --line: rgba(126, 45, 22, 0.18);
    --shadow: 0 14px 36px rgba(70, 15, 10, 0.18);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 18% 0%, rgba(233, 195, 106, 0.26), transparent 28%),
        linear-gradient(180deg, #611010 0%, #f3dfbd 18%, #fff8eb 52%, #f1d8ad 100%);
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    line-height: 1.75;
}

a {
    color: inherit;
}

.page-shell {
    width: min(750px, 100%);
    margin: 0 auto;
    background: rgba(255, 248, 235, 0.94);
    min-height: 100vh;
    box-shadow: 0 0 44px rgba(65, 8, 8, 0.28);
}

.hero {
    position: relative;
    min-height: 430px;
    color: #fff;
    background:
        linear-gradient(180deg, rgba(65, 0, 0, 0.2), rgba(92, 7, 7, 0.92)),
        url("../images/banner.jpg") center / cover no-repeat;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 90px;
    background: linear-gradient(180deg, transparent, rgba(255, 248, 235, 0.98));
}

.hero-top {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 0;
}

.back-home,
.name-link,
.product-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(233, 195, 106, 0.68);
    border-radius: 999px;
    color: var(--gold-soft);
    background: rgba(80, 0, 0, 0.42);
    text-decoration: none;
    font-size: 14px;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 118px 28px 80px;
    text-align: center;
}

.eyebrow,
.section-title p {
    margin: 0 0 8px;
    color: #8e1a12;
    font-size: 13px;
    letter-spacing: 0.16em;
}

.hero .eyebrow {
    color: var(--gold-soft);
}

.hero h1 {
    margin: 0;
    font-size: clamp(36px, 8vw, 58px);
    line-height: 1.12;
    letter-spacing: 0;
    text-shadow: 0 5px 18px rgba(0, 0, 0, 0.36);
}

body:not([data-page="detail"]) .hero h1 {
    white-space: nowrap;
    font-size: clamp(28px, 6.2vw, 44px);
    line-height: 1.18;
}

body[data-page="detail"] .hero h1 {
    white-space: nowrap;
    font-size: clamp(23px, 5.3vw, 42px);
    line-height: 1.18;
}

.hero-content p:last-child {
    max-width: 560px;
    margin: 18px auto 0;
    color: rgba(255, 250, 232, 0.94);
    font-size: 16px;
}

.panel {
    margin: 14px 14px 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 252, 244, 0.9);
    box-shadow: var(--shadow);
}

.gender-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.gender-tab {
    min-height: 44px;
    border: 1px solid rgba(139, 16, 16, 0.18);
    border-radius: 999px;
    color: var(--red);
    background: #fff7df;
    font-size: 16px;
    cursor: pointer;
}

.gender-tab.active {
    color: #fff8df;
    border-color: rgba(233, 195, 106, 0.72);
    background: linear-gradient(135deg, #9e1816, #5d0707);
}

.zodiac-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.zodiac-card {
    display: block;
    min-height: 86px;
    padding: 10px 8px;
    border: 1px solid rgba(126, 45, 22, 0.15);
    border-radius: 8px;
    background: linear-gradient(180deg, #fffdf6, #ffe8be);
    color: inherit;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
}

.zodiac-card.active {
    border-color: rgba(139, 16, 16, 0.64);
    background: linear-gradient(180deg, #fff1c6, #c51d17);
    color: #fff8df;
}

.zodiac-icon {
    display: block;
    font-size: 28px;
    line-height: 1;
}

.zodiac-name {
    display: block;
    margin-top: 6px;
    font-weight: 700;
}

.zodiac-tag {
    display: inline-block;
    min-height: 20px;
    margin-top: 4px;
    padding: 0 7px;
    border-radius: 999px;
    color: #8d2017;
    background: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.section-nav {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1px;
    margin: 14px;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(93, 7, 7, 0.12);
    box-shadow: var(--shadow);
}

.section-nav a {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff8df;
    background: rgba(93, 7, 7, 0.92);
    text-decoration: none;
    font-size: 13px;
}

.section-title h2 {
    margin: 0;
    color: var(--deep-red);
    font-size: 24px;
    line-height: 1.3;
}

.fortune-score {
    display: grid;
    grid-template-columns: 112px 1fr;
    gap: 16px;
    align-items: center;
    margin-top: 16px;
}

.score-ring {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--deep-red);
    background:
        radial-gradient(circle, #fff9e7 0 54%, transparent 55%),
        conic-gradient(var(--gold) 0 78%, rgba(139, 16, 16, 0.16) 78% 100%);
}

.score-ring strong {
    font-size: 32px;
    line-height: 1;
}

.score-ring span,
.daily-score span {
    color: var(--muted);
    font-size: 12px;
}

.score-line {
    display: grid;
    grid-template-columns: 58px 1fr 36px;
    gap: 8px;
    align-items: center;
    margin: 8px 0;
    font-size: 14px;
}

.bar {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(139, 16, 16, 0.1);
}

.bar i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #b71916, var(--gold));
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0 12px;
}

.tag-row span,
.daily-tips span,
.product-badge {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    color: #8d2017;
    background: #fff0c4;
    font-size: 13px;
}

.fortune-copy {
    color: #513629;
}

.fortune-copy h3 {
    margin: 18px 0 6px;
    color: var(--red);
    font-size: 18px;
}

.fortune-copy p {
    margin: 0 0 10px;
    text-align: justify;
}

.home-intro-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.home-intro-grid div {
    padding: 14px;
    border: 1px solid rgba(126, 45, 22, 0.14);
    border-radius: 8px;
    background: #fffaf0;
}

.home-intro-grid strong {
    display: block;
    color: var(--deep-red);
    font-size: 18px;
    margin-bottom: 4px;
}

.home-intro-grid p {
    margin: 0;
    color: #513629;
}

.basis-box {
    margin: 16px 0 12px;
    padding: 14px;
    border: 1px solid rgba(139, 16, 16, 0.16);
    border-radius: 8px;
    background: #fff5d7;
}

.basis-box strong {
    display: block;
    color: var(--deep-red);
    margin-bottom: 4px;
}

.basis-box p {
    margin: 0;
}

.theory-list {
    margin: 0;
    padding-left: 20px;
}

.theory-list li {
    margin: 6px 0;
    text-align: justify;
}

.theory-list b {
    color: var(--deep-red);
}

.age-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.age-card {
    padding: 12px;
    border: 1px solid rgba(126, 45, 22, 0.14);
    border-radius: 8px;
    background: #fffaf0;
}

.age-card strong {
    display: block;
    color: var(--red);
    font-size: 16px;
}

.age-card span {
    display: block;
    margin: 2px 0 6px;
    color: var(--muted);
    font-size: 13px;
}

.age-card p {
    margin: 0;
    font-size: 14px;
}

.note-text {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
}

.month-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 16px;
}

.month-item {
    padding: 12px;
    border: 1px solid rgba(126, 45, 22, 0.14);
    border-radius: 8px;
    background: #fffaf0;
}

.month-item strong {
    display: block;
    color: var(--red);
    margin-bottom: 4px;
}

.daily-card {
    display: grid;
    grid-template-columns: 1fr 92px;
    gap: 16px;
    align-items: center;
    margin-top: 14px;
}

.daily-date {
    margin: 0 0 4px;
    color: var(--muted);
    font-size: 13px;
}

.daily-card h3 {
    margin: 0 0 8px;
    color: var(--red);
}

.daily-card p {
    margin: 0;
}

.daily-score {
    width: 92px;
    height: 92px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--deep-red);
    background: linear-gradient(180deg, #fff4cd, #e8bd5a);
}

.daily-score strong {
    font-size: 30px;
    line-height: 1;
}

.daily-tips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.product-card {
    display: grid;
    grid-template-columns: 210px 1fr;
    gap: 18px;
    margin-top: 16px;
}

.product-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid rgba(126, 45, 22, 0.16);
    background: #fff;
}

.product-info h3 {
    margin: 12px 0 8px;
    color: var(--deep-red);
    font-size: 24px;
}

.product-info p {
    margin: 0 0 10px;
}

.product-info ul {
    margin: 8px 0 14px;
    padding-left: 20px;
}

.product-info li {
    margin: 6px 0;
}

.product-info strong {
    color: var(--deep-red);
}

.product-note {
    padding: 10px 12px;
    border-left: 3px solid var(--gold);
    background: #fff8ea;
    font-size: 14px;
}

.product-link {
    color: #fff8df;
    background: linear-gradient(135deg, #9e1816, #5d0707);
}

.faq-list {
    margin-top: 14px;
}

details {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

details:last-child {
    border-bottom: 0;
}

summary {
    color: var(--red);
    font-weight: 700;
    cursor: pointer;
}

details p {
    margin: 8px 0 0;
    color: #513629;
}

.footer {
    padding: 28px 14px 36px;
    text-align: center;
    color: #7e5c45;
    font-size: 13px;
}

.footer p {
    margin: 4px 0;
}

@media (max-width: 640px) {
    .hero {
        min-height: 390px;
    }

    .hero-content {
        padding: 96px 22px 72px;
    }

    body:not([data-page="detail"]) .hero h1 {
        font-size: clamp(19px, 5.8vw, 32px);
    }

    body[data-page="detail"] .hero h1 {
        font-size: clamp(21px, 6.1vw, 34px);
    }

    .zodiac-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .section-nav {
        grid-template-columns: repeat(5, minmax(64px, 1fr));
        overflow-x: auto;
    }

    .fortune-score,
    .daily-card,
    .product-card {
        grid-template-columns: 1fr;
    }

    .score-ring,
    .daily-score {
        margin: 0 auto;
    }

    .month-list {
        grid-template-columns: 1fr;
    }

    .age-grid {
        grid-template-columns: 1fr;
    }

    .home-intro-grid {
        grid-template-columns: 1fr;
    }
}
