:root {
    --ink: #171427;
    --muted: #625c72;
    --line: rgba(90, 70, 140, 0.14);
    --field: #f3f0fa;
    --navy: #5b35e8;
    --navy-dark: #3d22b0;
    --paper: #f6f3fb;
    --footer: #120f1c;
    --error: #b4234a;
    --shadow: 0 18px 50px rgba(48, 28, 92, 0.1);
    --serif: "Fraunces", "Iowan Old Style", Palatino, serif;
    --sans: "Outfit", "Segoe UI", sans-serif;
    --display: "Syne", "Outfit", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(900px 420px at 8% -8%, rgba(124, 92, 255, 0.22), transparent 60%),
        radial-gradient(720px 380px at 100% 0%, rgba(244, 162, 74, 0.18), transparent 55%),
        var(--paper);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.55;
}
img { max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 560; letter-spacing: -0.03em; line-height: 1.12; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); margin: 0; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin: 0 0 0.6rem; }
h3 { font-size: 1.55rem; margin: 0.2rem 0 0.4rem; }
p { margin: 0 0 0.8rem; }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.skip {
    position: absolute; left: 12px; top: -40px; background: #fff; padding: 8px 12px; z-index: 5;
}
.skip:focus { top: 12px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.site-header {
    position: sticky; top: 0; z-index: 20;
    background: rgba(246, 243, 251, 0.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; gap: 22px; min-height: 78px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.logo-mark { width: 44px; height: 44px; display: block; filter: drop-shadow(0 8px 14px rgba(91, 53, 232, 0.28)); }
.brand-text {
    font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.045em; line-height: 1;
}
.brand-text span {
    background: linear-gradient(100deg, #7a4dff 10%, #c44bdc 48%, #f0a04b);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.site-nav { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.site-nav a, .more-btn {
    text-decoration: none; background: none; border: 0; padding: 0; cursor: pointer; color: #2a2438; font-weight: 500;
}
.site-nav a.is-active { color: var(--navy); box-shadow: inset 0 -2px 0 var(--navy); }
.nav-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer; }
.more { position: relative; }
.more-menu {
    display: none; position: absolute; top: calc(100% + 10px); right: 0; min-width: 230px;
    background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 8px; box-shadow: var(--shadow);
}
.more-menu a { display: block; padding: 8px 10px; border-radius: 10px; text-decoration: none; }
.more-menu a:hover, .more-menu a:focus { background: var(--field); }
.more.is-open .more-menu { display: block; }

.flash {
    margin-top: 16px; background: #f4f7ff; border: 1px solid #d9e1fb; border-radius: 14px; padding: 12px 16px;
}

.hero { text-align: center; padding: 72px 0 10px; }
.hero-panel {
    position: relative; margin-top: 28px; border-radius: 36px; overflow: hidden; color: #fff;
    background:
        radial-gradient(circle at 18% 20%, rgba(255, 224, 150, 0.28), transparent 28%),
        radial-gradient(circle at 88% 10%, rgba(160, 120, 255, 0.55), transparent 36%),
        linear-gradient(155deg, #141022 0%, #2a1b52 52%, #4a2778 100%);
    box-shadow: 0 30px 70px rgba(40, 20, 80, 0.28);
}
.hero-panel .hero { padding: 78px 28px 64px; }
.hero-panel h1, .hero-panel .eyebrow { color: #fff; }
.hero-panel .lede { color: rgba(255, 255, 255, 0.82); }
.orbit {
    position: absolute; width: 280px; height: 280px; right: -40px; top: -50px; border-radius: 50%;
    border: 1px solid rgba(255, 224, 150, 0.35);
    box-shadow: inset 0 0 0 40px rgba(255, 255, 255, 0.03);
}
.orbit::after {
    content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%;
    background: #ffe7a3; top: 36px; left: 40px; box-shadow: 0 0 18px #ffe7a3;
}
.lede { max-width: 760px; margin: 18px auto 0; color: #4d4760; font-size: 1.12rem; }
.section { padding: 64px 0; }
.section.alt { background: rgba(255, 255, 255, 0.45); }
.narrow { max-width: 760px; }
.center { text-align: center; }

.calc-card, .panel {
    border: 1px solid rgba(255,255,255,0.7); border-radius: 28px; padding: 28px;
    background: rgba(255,255,255,0.88); box-shadow: var(--shadow); backdrop-filter: blur(10px);
}
.calc-card { width: min(980px, 100%); margin: 34px auto 10px; }
fieldset.birth-fields { border: 0; margin: 0; padding: 0; }
legend { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 12px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; }
.field label, .footer-label { display: block; margin-bottom: 8px; font-size: 0.95rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input:not([type]), select, textarea {
    width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--field); padding: 0 16px;
}
textarea { height: auto; padding: 14px 16px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
    outline: 2px solid var(--navy); outline-offset: 2px;
}
.date-row, .time-row, .coord-row { display: flex; align-items: center; gap: 8px; }
.date-row input { width: 84px; text-align: center; }
.date-row .year, .time-row select { flex: 1; }
.time-row select { height: 52px; }
.error { color: var(--error); font-size: 0.92rem; margin: 6px 0 0; }
.text-btn { background: none; border: 0; padding: 8px 0 0; color: var(--navy); cursor: pointer; }
.custom-loc { margin-top: 8px; display: grid; gap: 8px; }
.custom-loc[hidden] { display: none; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 0.92rem; color: var(--muted); }
.check input { width: auto; height: auto; margin-top: 4px; }
.city-field { position: relative; }
.city-menu {
    position: absolute; left: 0; right: 0; top: 78px; z-index: 5;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.city-menu button { display: block; width: 100%; text-align: left; background: #fff; border: 0; padding: 10px 14px; cursor: pointer; }
.city-menu button:hover, .city-menu button.is-active { background: #f4f6ff; }
.actions { display: flex; justify-content: center; margin-top: 22px; }
.btn {
    appearance: none; border: 0; cursor: pointer; text-decoration: none;
    background: linear-gradient(110deg, #5b35e8 0%, #8a46e8 48%, #f0a04b 140%);
    color: #fff; border-radius: 999px; padding: 14px 28px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
    box-shadow: 0 12px 28px rgba(91, 53, 232, 0.32);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #f3f3f4; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid #ccc; }

.summary { text-align: center; color: var(--muted); margin: 28px 0 8px; }
.sign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 18px 0 8px; }
.sign-grid.one { grid-template-columns: minmax(0, 560px); justify-content: center; }
.sign-card {
    border: 1px solid rgba(255,255,255,0.8); border-radius: 22px; padding: 22px;
    background: rgba(255,255,255,0.9); border-top: 6px solid #ddd; box-shadow: var(--shadow);
}
.sign-card[data-element="Fire"] { border-top-color: #e07a3d; }
.sign-card[data-element="Earth"] { border-top-color: #3e8a62; }
.sign-card[data-element="Air"] { border-top-color: #5b7cff; }
.sign-card[data-element="Water"] { border-top-color: #7a4dff; }
.glyph { font-size: 2.6rem; margin: 0; line-height: 1; font-variant-emoji: text; font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", serif; }
.card-kicker, .footer-label, .eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.dms { color: var(--muted); }
.story { font-size: 1.08rem; }
.note { color: var(--muted); font-size: 0.95rem; }
.card-row, .tool-grid, .post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tool, .post-card, .info-card {
    display: block; text-decoration: none; border: 1px solid rgba(255,255,255,0.8); border-radius: 22px;
    padding: 22px; background: rgba(255,255,255,0.88); box-shadow: 0 10px 30px rgba(48, 28, 92, 0.06);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.tool:hover, .post-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(91, 53, 232, 0.14); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { padding-top: 8px; }
.step span { font-family: var(--serif); font-size: 1.8rem; display: block; }

.wheel-layout { display: grid; grid-template-columns: 460px 1fr; gap: 28px; align-items: start; }
.wheel { width: 100%; height: auto; }
.wheel text { font-family: "Segoe UI Symbol", "Noto Sans Symbols 2", "Apple Symbols", sans-serif; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.house-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.house-list div { border-bottom: 1px solid var(--line); padding: 8px 0; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-dow { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 4px; }
.cal-day { min-height: 92px; border-radius: 14px; padding: 10px; background: #f6f6f6; }
.cal-day strong { display: block; }
.cal-day.easy { background: #e7f6ea; }
.cal-day.tense { background: #fde8e4; }
.cal-day.quiet { background: #eef2fb; }
.cal-day small { color: #444; }

.love-score { font-family: var(--serif); font-size: clamp(4rem, 10vw, 7rem); line-height: 0.9; margin: 0; }
.chat-log { display: grid; gap: 10px; margin: 18px 0; }
.bubble { border-radius: 16px; padding: 12px 14px; max-width: 720px; }
.bubble.user { background: #eef2fb; margin-left: auto; }
.bubble.guide { background: #f6f6f6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 8px 12px; cursor: pointer; }

.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin-top: 8px; color: #333; }

.prose h2 { margin-top: 1.6rem; }
.auth-card { width: min(460px, 100%); margin: 40px auto; }

.site-footer {
    background:
        radial-gradient(500px 180px at 90% 0%, rgba(122, 77, 255, 0.35), transparent 70%),
        var(--footer);
    color: #ececec; margin-top: 56px; padding: 56px 0 24px;
}
.site-footer a { color: #ececec; }
.site-footer .brand-text { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.1fr; gap: 28px; }
.footer-grid a, .footer-legal a { display: block; text-decoration: none; margin: 0 0 6px; }
.footer-brand { margin-bottom: 12px; }
.footer-legal { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid #2a2a2e; margin-top: 28px; padding-top: 16px; color: #bdbdbd; font-size: 0.92rem; }
.footer-legal p { margin: 0; }
.footer-legal a { display: inline; }

@media (max-width: 980px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none; position: absolute; top: 78px; left: 0; right: 0; background: rgba(246,243,251,0.98);
        border-bottom: 1px solid var(--line); padding: 12px 20px 18px; flex-direction: column; align-items: flex-start;
    }
    .site-nav.is-open { display: flex; }
    .more-menu { position: static; box-shadow: none; border: 0; padding: 0 0 0 10px; }
    .grid-2, .sign-grid, .card-row, .tool-grid, .post-grid, .steps, .wheel-layout, .footer-grid, .house-list { grid-template-columns: 1fr; }
    .sign-grid.one { grid-template-columns: 1fr; }
    .footer-legal { flex-direction: column; }
    .hero { padding-top: 42px; }
}
@media print {
    .site-header, .site-footer, .calc-card form, .nav-toggle, .actions, .no-print { display: none !important; }
    .sign-card, .panel { break-inside: avoid; }
}
