/* ============================================================
   stone-guidance.css — วันนี้พกหินอะไรดี
   Three pages: landing · start · result
   Prefix: .sg-
   ============================================================ */

/* ── 1. Landing — Hero ──────────────────────────────────────── */

.sg-hero {
    position: relative;
    padding: calc(var(--nav-h) + 32px) 0 var(--section-y-md);
    overflow: hidden;
    background: var(--bg-section-alt);
    text-align: center;
}

.sg-hero__inner {
    position: relative;
    z-index: 2;
    max-width: 560px;
    margin: 0 auto;
}

.sg-hero__title {
    font-family: var(--font);
    font-size: clamp(34px, 5.5vw, 58px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    line-height: 1.12;
    letter-spacing: -0.025em;
    margin: var(--sp-xs) 0 var(--sp-md);
    /* natural viewport-width wrapping — no forced <br> */
    text-wrap: balance;
    word-break: keep-all;
}

.sg-hero__intro {
    font-size: clamp(14px, 1.5vw, 16px);
    color: var(--lt-text-soft);
    line-height: 1.8;
    max-width: 440px;
    margin: 0 auto var(--sp-xl);
}

.sg-hero__cta {
    display: inline-flex;
}

/* Decorative orbs */
.sg-hero__orbs {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.sg-hero__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .18;
}

.sg-hero__orb--1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #9860c8, transparent);
    top: -120px;
    right: -80px;
}

.sg-hero__orb--2 {
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, #88c8e8, transparent);
    bottom: -60px;
    left: -40px;
}

.sg-hero__orb--3 {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, #c8a840, transparent);
    top: 50%;
    left: 58%;
}

/* ── 2. Landing — How it works ──────────────────────────────── */

/* Section rhythm */
.sg-how.lt-section,
.sg-stars.lt-section {
    padding-block: var(--section-y-md);
}

.sg-how__inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.sg-how__title {
    font-family: var(--font);
    font-size: clamp(20px, 2.8vw, 28px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    margin: var(--sp-sm) 0 var(--sp-md);
}

.sg-how__body {
    font-size: 14.5px;
    color: var(--lt-text-soft);
    line-height: 1.85;
    margin-bottom: var(--sp-2xl);
}

.sg-how__steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: var(--sp-sm);
}

.sg-how__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
    width: 150px;
    flex-shrink: 0;
    background: var(--lt-white);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-lg);
    padding: var(--sp-xl) var(--sp-md);
}

.sg-how__step-num {
    font-family: var(--font);
    font-size: 36px;
    font-weight: var(--fw-semibold);
    color: var(--lt-sage);
    line-height: 1;
}

.sg-how__step-text {
    font-size: 13px;
    color: var(--lt-text-soft);
    text-align: center;
    line-height: 1.55;
}

.sg-how__step-arrow {
    font-size: 16px;
    color: var(--lt-border);
    flex-shrink: 0;
    margin-top: 30px; /* optical align with step number block */
}

/* ── 3. Landing — Star grid ─────────────────────────────────── */

.sg-stars {
    background: var(--bg-section-alt);
}

.sg-stars__title {
    font-family: var(--font);
    font-size: clamp(20px, 2.8vw, 28px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    text-align: center;
    margin: var(--sp-sm) 0 var(--sp-xl);
}

/* 3×3 perfect grid, centred */
.sg-stars__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-sm);
    max-width: 720px;
    margin: 0 auto var(--sp-2xl);
}

/* ── Star card ── */
.sg-star-card {
    background: var(--lt-white);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-lg);
    padding: var(--sp-lg) var(--sp-sm) var(--sp-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
    text-align: center;
    transition: transform 220ms ease, box-shadow 220ms ease;
    cursor: default;
}

.sg-star-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,.07);
}

.sg-star-card__icon {
    display: block;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    /* SVG icons render crisply at 1× and 2× density */
    image-rendering: auto;
}

.sg-star-card__identity {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.sg-star-card__num {
    font-family: var(--font);
    font-size: 9.5px;
    font-weight: var(--fw-semibold);
    color: var(--lt-text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: var(--lt-stone-xlight);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-full);
    padding: 2px 8px;
    line-height: 1.6;
}

.sg-star-card__name {
    font-size: 12.5px;
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    line-height: 1.35;
    word-break: keep-all;
}

.sg-star-card__subtitle {
    font-size: 10px;
    font-style: italic;
    color: var(--lt-text-muted);
    letter-spacing: 0.06em;
    line-height: 1;
}

.sg-star-card__colors {
    display: flex;
    gap: 4px;
    align-items: center;
}

.sg-star-card__swatch {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,.07);
    flex-shrink: 0;
}

.sg-stars__cta {
    text-align: center;
    padding-top: var(--sp-sm);
}

/* ── 4. Start — Form page ───────────────────────────────────── */

.sg-start {
    /* Same stone-xlight surface as landing + result — one continuous journey */
    background: var(--lt-stone-xlight);
    padding: calc(var(--nav-h) + 48px) 0 var(--sp-3xl);
    min-height: 78vh;
}

.sg-start__inner {
    max-width: 480px;   /* up from 440 — bridges gap with 600px result container */
    margin: 0 auto;
    width: 100%;
}

.sg-start__back {
    display: inline-block;
    font-size: 13px;
    color: var(--lt-text-muted);
    text-decoration: none;
    margin-bottom: var(--sp-xl);
    transition: color var(--ease);
    letter-spacing: 0.01em;
}

.sg-start__back:hover {
    color: var(--lt-ink);
}

.sg-start__title {
    font-family: var(--font);
    font-size: clamp(22px, 3.5vw, 30px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    margin: var(--sp-sm) 0 var(--sp-md);
    line-height: 1.3;
}

.sg-start__intro {
    font-size: 13.5px;
    color: var(--lt-text-soft);
    line-height: 1.8;
    margin-bottom: var(--sp-xl);
}

/* Validation errors */
.sg-start__errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--r-md);
    padding: var(--sp-md) var(--sp-lg);
    margin-bottom: var(--sp-xl);
}

.sg-start__errors p {
    font-size: 13px;
    color: #dc2626;
    margin: 0;
    line-height: 1.6;
}

/* Form layout */
.sg-form {
    display: flex;
    flex-direction: column;
    gap: var(--sp-lg);
}

.sg-form__field {
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
}

.sg-form__label {
    font-size: 13px;
    font-weight: var(--fw-medium);
    color: var(--lt-ink);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.sg-form__required {
    color: var(--lt-sage);
    font-size: 16px;
    line-height: 1;
}

.sg-form__label-note {
    font-size: 11.5px;
    font-weight: var(--fw-regular);
    color: var(--lt-text-muted);
    font-style: italic;
}

.sg-form__input {
    height: 50px;
    padding: 0 var(--sp-lg);
    border: 1.5px solid var(--lt-border);
    border-radius: var(--r-md);
    font-size: 15px;
    color: var(--lt-ink);
    background: var(--lt-white);
    font-family: var(--font);
    transition: border-color var(--ease), box-shadow var(--ease);
    width: 100%;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.sg-form__input:focus {
    outline: none;
    border-color: var(--lt-sage);
    box-shadow: 0 0 0 3px rgba(100,140,100, .1);
}

.sg-form__input.is-error {
    border-color: #dc2626;
}

/* Birth time — plain text, no picker */
.sg-form__input--time {
    letter-spacing: 0.05em;
    font-variant-numeric: tabular-nums;
}

.sg-form__input--time::placeholder {
    letter-spacing: normal;
    color: var(--lt-text-muted);
    font-style: italic;
}

/* ── Thai-friendly date selects ── */
/* Three separate dropdowns: Day / Month(Thai name) / Year — no typing, no tab confusion */
.sg-select-date {
    display: flex;
    gap: var(--sp-sm);
}

.sg-select-date__wrap {
    position: relative;
    flex-shrink: 0;
}

/* Custom chevron arrow */
.sg-select-date__wrap::after {
    content: '';
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--lt-text-muted);
    pointer-events: none;
}

.sg-select-date__wrap--day   { width: 72px; }
.sg-select-date__wrap--month { flex: 1; min-width: 0; }
.sg-select-date__wrap--year  { width: 120px; }

.sg-select-date__sel {
    width: 100%;
    height: 50px;
    padding: 0 28px 0 14px;
    border: 1.5px solid var(--lt-border);
    border-radius: var(--r-md);
    background: var(--lt-white);
    font-family: var(--font);
    font-size: 15px;
    color: var(--lt-ink);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var(--ease), box-shadow var(--ease);
    /* prevent text overflow clipping on narrow widths */
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.sg-select-date__sel:focus {
    outline: none;
    border-color: var(--lt-sage);
    box-shadow: 0 0 0 3px rgba(100,140,100,.1);
}

/* Error state — matches .sg-form__input.is-error */
.sg-select-date.is-error .sg-select-date__sel {
    border-color: #dc2626;
}

/* Placeholder option (value="") */
.sg-select-date__sel option[value=""] {
    color: var(--lt-text-muted);
}

.sg-form__field-hint {
    font-size: 12px;
    color: var(--lt-text-muted);
    line-height: 1.55;
    margin: 0;
}

/* Submit — centred, capped width */
.sg-form__submit {
    margin: var(--sp-md) auto 0;
    width: 100%;
    max-width: 320px;
    justify-content: center;
    height: 52px;
    font-size: 16px;
    display: flex;
}

.sg-form__privacy {
    font-size: 12px;
    color: var(--lt-text-muted);
    text-align: center;
    margin: 0;
    line-height: 1.6;
}

/* ── 5. Result — identity section ───────────────────────────── */

.sg-result {
    padding: calc(var(--nav-h) + 48px) 0 var(--sp-2xl);
    background: var(--lt-stone-xlight);
}

.sg-result__inner {
    max-width: 600px;
    margin: 0 auto;
}

.sg-result__greeting {
    font-family: var(--font);
    font-size: clamp(24px, 3.5vw, 36px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    margin: var(--sp-sm) 0 var(--sp-lg);
    line-height: 1.2;
}

/* Star badge */
.sg-result__star-badge {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
    background: var(--lt-white);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-xl);
    padding: var(--sp-lg) var(--sp-xl);
    margin-bottom: var(--sp-lg);
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}

.sg-result__star-icon {
    display: block;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.sg-result__star-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.sg-result__star-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--lt-text-muted);
    font-weight: var(--fw-medium);
}

.sg-result__star-name {
    font-size: clamp(18px, 2.4vw, 24px);
    font-family: var(--font);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    line-height: 1.2;
}

.sg-result__star-subtitle {
    font-size: 11.5px;
    font-style: italic;
    color: var(--lt-text-muted);
    letter-spacing: 0.08em;
}

/* Element chip */
.sg-result__element {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    margin-bottom: var(--sp-lg);
}

.sg-result__element-label {
    font-size: 12px;
    color: var(--lt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sg-result__element-value {
    display: inline-block;
    padding: 4px 14px;
    border-radius: var(--r-full);
    font-size: 12.5px;
    font-weight: var(--fw-medium);
    border: 1.5px solid currentColor;
}

.sg-result__element--water   { color: #1e3a5c; background: #e8f0f8; border-color: #b8cce0; }
.sg-result__element--earth   { color: #5c3d1e; background: #f5f0e8; border-color: #d8c8b0; }
.sg-result__element--wood    { color: #2a5c2a; background: #e8f5e8; border-color: #a8d0a8; }
.sg-result__element--thunder { color: #2a5c2a; background: #e8f5e8; border-color: #a8d0a8; }
.sg-result__element--wind    { color: #2a5c2a; background: #e8f5e8; border-color: #a8d0a8; }
.sg-result__element--metal   { color: #2c3a5c; background: #e8eaec; border-color: #b8bcc8; }
.sg-result__element--fire    { color: #6a1a8a; background: #f5e8ff; border-color: #d0a8e8; }

/* Energy block */
.sg-result__energy {
    margin-bottom: var(--sp-xl);
    padding-top: var(--sp-lg);
    border-top: 1px solid var(--lt-border-light);
}

.sg-result__energy-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lt-text-muted);
    font-weight: var(--fw-medium);
    margin-bottom: var(--sp-sm);
}

.sg-result__energy-headline {
    font-size: clamp(15px, 1.8vw, 18px);
    font-family: var(--font);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    margin-bottom: var(--sp-md);
    line-height: 1.4;
}

.sg-result__energy-body {
    font-size: 14.5px;
    color: var(--lt-text-soft);
    line-height: 1.85;
    padding-left: var(--sp-md);
    border-left: 2.5px solid var(--lt-border-light);
}

/* Color swatches — card treatment */
.sg-result__colors {
    background: var(--lt-white);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-lg);
    padding: var(--sp-lg) var(--sp-xl);
}

.sg-result__colors-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lt-text-muted);
    font-weight: var(--fw-medium);
    margin-bottom: var(--sp-lg);
}

.sg-result__swatches {
    display: flex;
    gap: var(--sp-lg);
    flex-wrap: wrap;
}

.sg-result__swatch-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sg-result__swatch {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: block;
    border: 2px solid rgba(0,0,0,.05);
    box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

.sg-result__swatch-name {
    font-size: 11px;
    color: var(--lt-text-muted);
    text-align: center;
    line-height: 1.4;
    max-width: 64px;
}

/* ── 6. Result — Today's stone ──────────────────────────────── */

.sg-today {
    background: var(--lt-white);
}

/* Override lt-section padding to stay tight with result section */
.sg-today.lt-section {
    padding-top: var(--sp-2xl);
    padding-bottom: var(--sp-2xl);
}

.sg-today__inner {
    max-width: 600px;
    margin: 0 auto;
}

.sg-today__sub {
    font-size: 13.5px;
    color: var(--lt-text-muted);
    margin: 4px 0 var(--sp-lg);
    font-style: italic;
}

/* Card: 160px frame leaves more room for the text body */
.sg-today__card {
    display: grid;
    grid-template-columns: 160px 1fr;
    background: var(--lt-stone-xlight);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-xl);
    overflow: hidden;
    margin-bottom: var(--sp-xl);
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}

/* Stone image frame */
.sg-today__frame {
    position: relative;
    /* portrait ratio — feels natural for a stone object */
    aspect-ratio: 3 / 4;
    overflow: hidden;
    flex-shrink: 0;
}

.sg-today__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}

.sg-today__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

/* Inner vignette so icon reads against gradient */
.sg-today__placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, transparent 30%, rgba(0,0,0,.18) 100%);
}

.sg-today__placeholder-icon {
    font-size: 44px;
    opacity: .72;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.25));
}

.sg-today__frame.no-img .sg-today__img {
    display: none;
}

/* Stone body */
.sg-today__body {
    padding: var(--sp-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--sp-sm);
}

.sg-today__stone-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--lt-text-muted);
    font-weight: var(--fw-medium);
}

/* Headline-size title — the emotional centrepiece */
.sg-today__stone-title {
    font-family: var(--font);
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    line-height: 1.15;
    margin: var(--sp-xs) 0 0;
}

/* Quote treatment — gentle left rail */
.sg-today__message {
    font-size: 13.5px;
    color: var(--lt-text-soft);
    line-height: 1.8;
    margin: var(--sp-xs) 0 0;
    padding-left: var(--sp-md);
    border-left: 2px solid var(--lt-border);
}

.sg-today__gallery-link {
    font-size: 13px;
    font-weight: var(--fw-medium);
    color: var(--lt-sage-dark);
    text-decoration: none;
    transition: opacity var(--ease);
    display: inline-block;
    margin-top: var(--sp-sm);
}

.sg-today__gallery-link:hover {
    opacity: .65;
}

/* Also-stones */
.sg-today__also-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lt-text-muted);
    font-weight: var(--fw-medium);
    margin-bottom: var(--sp-sm);
}

.sg-today__also {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-sm);
}

.sg-today__also-pill {
    padding: 5px 14px;
    border: 1px solid var(--lt-border);
    border-radius: var(--r-full);
    font-size: 12.5px;
    color: var(--lt-text-soft);
    background: var(--lt-white);
}

/* ── 7. Result — CTAs ───────────────────────────────────────── */

.sg-cta {
    background: var(--lt-stone-xlight);
    padding: var(--sp-2xl) 0;
    text-align: center;
}

.sg-cta__inner {
    max-width: 560px;
    margin: 0 auto;
}

.sg-cta__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lt-text-muted);
    font-weight: var(--fw-medium);
    margin-bottom: var(--sp-lg);
}

/* Two-button row: primary + outline */
.sg-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-md);
    justify-content: center;
}

/* Retry row — centered alone, no longer adjacent to support */
.sg-cta__retry-row {
    text-align: center;
    margin-top: var(--sp-md);
}

/* Text-link retry — visually subordinate to both buttons */
.sg-cta__retry-link {
    display: inline-block;
    font-size: 13px;
    color: var(--lt-text-muted);
    text-decoration: none;
    letter-spacing: 0.02em;
    transition: color var(--ease);
}

.sg-cta__retry-link::before {
    content: '↩ ';
}

.sg-cta__retry-link:hover {
    color: var(--lt-ink);
}

/* Support CTA — solid sage pill (intentional, not draft) */
.sg-cta__support {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 9999px;
    background: transparent;
    border: 1.5px solid var(--lt-sage);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 500;
    color: var(--lt-sage-dark);
    cursor: pointer;
    transition: background var(--ease), color var(--ease);
}
.sg-cta__support:hover {
    background: var(--lt-sage-light);
    color: var(--lt-sage-dark);
}

/* Support zone — own bordered section after disclaimer */
.sg-support {
    border-top: 1px solid var(--lt-border);
    margin-top: var(--sp-2xl);
    padding: var(--sp-xl) 0 var(--sp-md);
}
.sg-support__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
}
.sg-support__heading {
    font-size: 13px;
    color: var(--lt-text-soft);
    letter-spacing: .02em;
    margin: 0;
    text-align: center;
}

.sg-cta__disclaimer {
    font-size: 12px;
    color: var(--lt-text-muted);
    line-height: 1.65;
    margin: var(--sp-xl) auto 0;
    max-width: 420px;
    padding-top: var(--sp-lg);
    border-top: 1px solid var(--lt-border-light);
}

/* ── 8. Result — Strengths ──────────────────────────────────── */

/* Stone-xlight bg continues the identity zone */
.sg-strengths {
    background: var(--lt-stone-xlight);
}

.sg-strengths.lt-section {
    padding-block: var(--sp-2xl);
}

.sg-strengths__inner {
    max-width: 600px;
    margin: 0 auto;
}

.sg-strengths__title {
    font-family: var(--font);
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    margin: var(--sp-xs) 0 var(--sp-xl);
    line-height: 1.35;
}

.sg-strengths__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

.sg-strengths__item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-md);
    background: var(--lt-white);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-lg);
    padding: var(--sp-md) var(--sp-lg);
}

.sg-strengths__num {
    font-family: var(--font);
    font-size: 10px;
    font-weight: var(--fw-semibold);
    color: var(--lt-sage);
    letter-spacing: 0.1em;
    min-width: 20px;
    padding-top: 3px;
    flex-shrink: 0;
}

.sg-strengths__text {
    font-size: 14.5px;
    color: var(--lt-ink);
    line-height: 1.65;
}

/* ── 9. Result — Intention stones ───────────────────────────── */

.sg-intentions {
    background: var(--lt-stone-xlight);
}

.sg-intentions.lt-section {
    padding-block: var(--sp-2xl);
}

.sg-intentions__inner {
    max-width: 600px;
    margin: 0 auto;
}

.sg-intentions__title {
    font-family: var(--font);
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    margin: var(--sp-xs) 0 var(--sp-xl);
    line-height: 1.35;
}

.sg-intentions__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-md);
}

.sg-intent-card {
    background: var(--lt-white);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-lg);
    padding: var(--sp-lg);
    display: flex;
    flex-direction: column;
    gap: var(--sp-xs);
    transition: box-shadow 200ms ease;
}

.sg-intent-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.sg-intent-card__intent {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lt-text-muted);
    font-weight: var(--fw-medium);
}

.sg-intent-card__stone {
    font-family: var(--font);
    font-size: clamp(14px, 1.8vw, 17px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    line-height: 1.3;
    display: block;
    margin-top: 2px;
}

.sg-intent-card__reason {
    font-size: 13px;
    color: var(--lt-text-soft);
    line-height: 1.7;
    margin: var(--sp-xs) 0 0;
}

/* ── 10. Result — Nourish ───────────────────────────────────── */

.sg-nourish {
    background: var(--lt-white);
}

.sg-nourish.lt-section {
    padding-block: var(--sp-2xl) var(--sp-md);  /* tight bottom — save-prompt callout follows */
}

.sg-nourish__inner {
    max-width: 600px;
    margin: 0 auto;
}

.sg-nourish__title {
    font-family: var(--font);
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    margin: var(--sp-xs) 0 var(--sp-xl);
    line-height: 1.35;
}

.sg-nourish__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
}

.sg-nourish__item {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-md);
    padding: var(--sp-md) var(--sp-lg);
    background: var(--lt-stone-xlight);
    border-radius: var(--r-md);
}

.sg-nourish__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lt-sage);
    flex-shrink: 0;
    margin-top: 8px;
}

.sg-nourish__text {
    font-size: 14.5px;
    color: var(--lt-text-soft);
    line-height: 1.75;
}

/* ── 11. Responsive ─────────────────────────────────────────── */

@media (max-width: 680px) {

    .sg-hero {
        padding: calc(var(--nav-h) + 24px) 0 var(--section-y-sm);
    }

    /* Today's stone card → stack vertically */
    .sg-today__card {
        grid-template-columns: 1fr;
    }

    .sg-today__frame {
        aspect-ratio: 4 / 3;
    }

    .sg-today__body {
        padding: var(--sp-lg) clamp(16px, 5vw, var(--sp-xl));
    }

    /* Result star badge → tighter */
    .sg-result__star-badge {
        gap: var(--sp-md);
        padding: var(--sp-md) var(--sp-lg);
    }

    /* CTA pair → stack */
    .sg-cta__actions {
        flex-direction: column;
        align-items: center;
    }

    .sg-cta__actions .lt-btn {
        justify-content: center;
        width: 100%;
        max-width: 320px;
    }

    /* Intention cards → single column on mobile */
    .sg-intentions__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {

    /* Form submit: cap on small phones */
    .sg-form__submit {
        max-width: 100%;
    }

    /* Select date: allow year to wrap if screen very narrow */
    .sg-select-date {
        flex-wrap: wrap;
    }

    .sg-select-date__wrap--day   { width: 68px; }
    .sg-select-date__wrap--month { flex: 1; }
    .sg-select-date__wrap--year  { width: 100%; }

    /* Colors card: tighter inner padding */
    .sg-result__colors {
        padding: var(--sp-md) var(--sp-lg);
    }

    /* Energy quote rail indent */
    .sg-result__energy-body {
        padding-left: var(--sp-sm);
    }

    /* Strengths & nourish items: tighter padding */
    .sg-strengths__item,
    .sg-nourish__item {
        padding: var(--sp-sm) var(--sp-md);
    }
}

@media (max-width: 560px) {

    /* How steps → vertical */
    .sg-how__steps {
        flex-direction: column;
        align-items: center;
        gap: var(--sp-md);
    }

    .sg-how__step {
        width: 200px;
    }

    .sg-how__step-arrow {
        transform: rotate(90deg);
        margin-top: 0;
    }

    /* Star grid — 3 cols but very compact */
    .sg-stars__grid {
        gap: 8px;
    }

    .sg-star-card {
        padding: var(--sp-md) 6px var(--sp-sm);
        gap: 8px;
    }

    .sg-star-card__icon {
        width: 32px;
        height: 32px;
    }

    .sg-star-card__name {
        font-size: 11px;
    }

    .sg-star-card__num {
        font-size: 8.5px;
        padding: 1px 6px;
    }

    /* Hide Japanese subtitle on small screens */
    .sg-star-card__subtitle {
        display: none;
    }

    .sg-star-card__swatch {
        width: 11px;
        height: 11px;
    }

    .sg-result__swatches {
        gap: var(--sp-md);
    }

    .sg-result__swatch {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 380px) {

    /* 2 columns on very narrow phones; last item spans full row */
    .sg-stars__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sg-star-card:last-child {
        grid-column: 1 / -1;
    }

    .sg-star-card__subtitle {
        display: none;
    }
}

/* ═══════════════════════════════════════════════════════════
   BAZI — Four Pillars result page
   ════════════════════════════════════════════════════════════ */

/* ── Day Master badge (big character in result hero) ────────── */

.sg-dm-badge {
    display: flex;
    align-items: center;
    gap: var(--sp-lg);
}

.sg-dm-badge__char {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: var(--r-xl);
    font-family: var(--font);
    font-size: 42px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    border: 2px solid transparent;
    /* default — overridden by element variant below */
    background: var(--lt-stone-xlight);
    color: var(--lt-ink);
}

.sg-dm-badge__char--wood  { background: #e8f5eb; color: #2d6a3a; border-color: #a8d4b0; }
.sg-dm-badge__char--fire  { background: #fdf0ec; color: #b03020; border-color: #e8b0a0; }
.sg-dm-badge__char--earth { background: #f8f0e0; color: #7a5010; border-color: #d8b878; }
.sg-dm-badge__char--metal { background: #ededf3; color: #384870; border-color: #b0b8d0; }
.sg-dm-badge__char--water { background: #e8eef8; color: #1a387a; border-color: #a0b8e0; }

/* ── Polarity chip ──────────────────────────────────────────── */

.sg-polarity {
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--r-full);
    font-size: 11.5px;
    font-weight: var(--fw-medium);
    letter-spacing: 0.06em;
    border: 1.5px solid currentColor;
}

.sg-polarity--yang { color: #a06010; background: #fff8e8; border-color: #e0c080; }
.sg-polarity--yin  { color: #3a3a8a; background: #eeeefc; border-color: #b0b0e0; }

/* ── Result colors section wrapper ────────────────────────────── */

.sg-result-colors {
    background: var(--lt-stone-xlight);
}

.sg-result-colors.lt-section {
    padding-block: var(--sp-2xl);
}

.sg-result-colors__inner {
    max-width: 600px;
    margin: 0 auto;
}

.sg-result-colors__inner .sg-result__colors {
    /* full-width within the section — remove extra padding from result section styles */
    background: var(--lt-white);
}

/* ── Four Pillars section ──────────────────────────────────── */

.sg-pillars {
    background: var(--lt-white);
}

.sg-pillars.lt-section {
    padding-block: var(--sp-2xl);
}

.sg-pillars__inner {
    max-width: 600px;
    margin: 0 auto;
}

.sg-pillars__sublabel {
    font-size: 12px;
    color: var(--lt-text-muted);
    letter-spacing: 0.06em;
    margin: 4px 0 var(--sp-xl);
    font-style: italic;
}

/* Four-column pillar grid */
.sg-pillars__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-sm);
    margin-bottom: var(--sp-lg);
}

/* Individual pillar card */
.sg-pillar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-xs);
    background: var(--lt-stone-xlight);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-lg);
    padding: var(--sp-md) var(--sp-sm);
    text-align: center;
    min-height: 180px;
}

/* Highlight the Day Pillar */
.sg-pillar--day {
    background: var(--lt-white);
    border-color: var(--lt-sage);
    box-shadow: 0 0 0 2px rgba(100,140,100,.12);
}

.sg-pillar--unknown {
    opacity: .55;
    background: var(--lt-stone-xlight);
}

/* Pillar header: Chinese character + Thai label */
.sg-pillar__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    margin-bottom: var(--sp-xs);
}

.sg-pillar__zh {
    font-size: 9px;
    color: var(--lt-text-muted);
    letter-spacing: 0.08em;
    font-style: italic;
}

.sg-pillar__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lt-text-muted);
    font-weight: var(--fw-medium);
}

/* Stem and branch sections within a pillar */
.sg-pillar__stem,
.sg-pillar__branch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    justify-content: center;
}

/* Divider between stem and branch */
.sg-pillar__divider {
    width: 28px;
    height: 1px;
    background: var(--lt-border);
    margin: 2px 0;
    flex-shrink: 0;
}

/* The Chinese character — large and element-coloured */
.sg-pillar__char {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    display: block;
}

.sg-pillar__char--wood  { color: #2d6a3a; }
.sg-pillar__char--fire  { color: #b03020; }
.sg-pillar__char--earth { color: #7a5010; }
.sg-pillar__char--metal { color: #384870; }
.sg-pillar__char--water { color: #1a387a; }
.sg-pillar__char--unknown { color: var(--lt-text-muted); font-size: 28px; }

/* Small element badge below the char */
.sg-pillar__el-badge {
    font-size: 9.5px;
    font-weight: var(--fw-medium);
    padding: 2px 7px;
    border-radius: var(--r-full);
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.sg-pillar__el-badge--wood  { background: #e8f5eb; color: #2d6a3a; }
.sg-pillar__el-badge--fire  { background: #fdf0ec; color: #b03020; }
.sg-pillar__el-badge--earth { background: #f8f0e0; color: #7a5010; }
.sg-pillar__el-badge--metal { background: #ededf3; color: #384870; }
.sg-pillar__el-badge--water { background: #e8eef8; color: #1a387a; }

/* "← Day Master" annotation on Day Pillar */
.sg-pillar__dm-note {
    font-size: 9px;
    color: var(--lt-sage-dark);
    font-weight: var(--fw-medium);
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.sg-pillar__unknown-note {
    font-size: 10px;
    color: var(--lt-text-muted);
    font-style: italic;
    margin-top: var(--sp-xs);
}

/* "Add birth time to unlock Hour Pillar" note */
.sg-pillars__no-hour-note {
    font-size: 12px;
    color: var(--lt-text-muted);
    text-align: center;
    padding: var(--sp-sm) var(--sp-lg);
    background: var(--lt-stone-xlight);
    border-radius: var(--r-md);
    border: 1px solid var(--lt-border-light);
    line-height: 1.55;
}

/* ── Element balance section ────────────────────────────────── */

.sg-balance {
    background: var(--lt-stone-xlight);
}

.sg-balance.lt-section {
    padding-block: var(--sp-2xl);
}

.sg-balance__inner {
    max-width: 600px;
    margin: 0 auto;
}

.sg-balance__title {
    font-family: var(--font);
    font-size: clamp(18px, 2.2vw, 22px);
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    margin: var(--sp-xs) 0 var(--sp-md);
    line-height: 1.35;
}

.sg-balance__chars-note {
    font-size: 12px;
    color: var(--lt-text-muted);
    margin: 0 0 var(--sp-xl);
    font-style: italic;
}

.sg-balance__bars {
    display: flex;
    flex-direction: column;
    gap: var(--sp-md);
    margin-bottom: var(--sp-xl);
}

.sg-balance__row {
    display: grid;
    grid-template-columns: 80px 1fr 24px auto;
    align-items: center;
    gap: var(--sp-sm);
}

.sg-balance__row--missing {
    /* Subtle missing-row highlight */
}

.sg-balance__el-name {
    font-size: 13px;
    font-weight: var(--fw-medium);
    white-space: nowrap;
}

.sg-balance__track {
    background: var(--lt-border-light);
    border-radius: var(--r-full);
    height: 10px;
    overflow: hidden;
    position: relative;
}

.sg-balance__fill {
    height: 100%;
    border-radius: var(--r-full);
    transition: width 600ms ease;
}

.sg-balance__fill--wood  { background: linear-gradient(90deg, #3d7a4a, #7dbc8c); }
.sg-balance__fill--fire  { background: linear-gradient(90deg, #b03020, #e87820); }
.sg-balance__fill--earth { background: linear-gradient(90deg, #7a5010, #c8981c); }
.sg-balance__fill--metal { background: linear-gradient(90deg, #384870, #a0b0c0); }
.sg-balance__fill--water { background: linear-gradient(90deg, #1a387a, #7898c0); }

.sg-balance__count {
    font-family: var(--font);
    font-size: 14px;
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    text-align: right;
    min-width: 16px;
}

.sg-balance__count--missing {
    color: var(--lt-text-muted);
}

.sg-balance__tag {
    font-size: 9.5px;
    font-weight: var(--fw-semibold);
    letter-spacing: 0.06em;
    padding: 2px 8px;
    border-radius: var(--r-full);
    white-space: nowrap;
}

.sg-balance__tag--missing {
    background: #fef2f2;
    color: #c02020;
    border: 1px solid #fecaca;
}

.sg-balance__tag--weak {
    background: #fff8e8;
    color: #a06010;
    border: 1px solid #f0d090;
}

/* Missing element summary chips */
.sg-balance__summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    background: var(--lt-white);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-lg);
    padding: var(--sp-md) var(--sp-lg);
}

.sg-balance__summary-label {
    font-size: 12px;
    color: var(--lt-text-muted);
    font-weight: var(--fw-medium);
    letter-spacing: 0.04em;
}

.sg-balance__missing-pill {
    font-size: 12px;
    font-weight: var(--fw-medium);
    padding: 4px 12px;
    border-radius: var(--r-full);
    border: 1.5px solid;
    letter-spacing: 0.04em;
}

/* ── Landing: 5-element preview grid ──────────────────────── */

.sg-element-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--sp-sm);
    max-width: 720px;
    margin: 0 auto var(--sp-2xl);
}

.sg-element-card {
    background: var(--lt-white);
    border: 1px solid var(--lt-border-light);
    border-radius: var(--r-lg);
    padding: var(--sp-lg) var(--sp-sm) var(--sp-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-sm);
    text-align: center;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.sg-element-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,.07);
}

.sg-element-card__icon {
    font-size: 28px;
    line-height: 1;
}

.sg-element-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.sg-element-card__name {
    font-size: 12.5px;
    font-weight: var(--fw-semibold);
    color: var(--lt-ink);
    line-height: 1.35;
}

.sg-element-card__desc {
    font-size: 10.5px;
    color: var(--lt-text-muted);
    line-height: 1.5;
    word-break: keep-all;
}

.sg-element-card__colors {
    display: flex;
    gap: 4px;
    align-items: center;
}

.sg-element-card__swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1.5px solid rgba(0,0,0,.07);
    flex-shrink: 0;
}

/* ── Bazi responsive ────────────────────────────────────────── */

@media (max-width: 680px) {
    /* Pillar grid: 4 narrow cols — squeeze chars a bit */
    .sg-pillar__char {
        font-size: 26px;
    }

    .sg-pillar {
        padding: var(--sp-sm) 6px;
        min-height: 160px;
    }

    .sg-dm-badge__char {
        width: 60px;
        height: 60px;
        font-size: 34px;
    }

    .sg-balance__row {
        grid-template-columns: 72px 1fr 20px auto;
    }

    .sg-balance__el-name {
        font-size: 12px;
    }

    /* Element grid: 3 cols + last 2 centred */
    .sg-element-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    /* Pillars: 2 × 2 grid on very small phones */
    .sg-pillars__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sg-pillar {
        min-height: 140px;
    }

    .sg-pillar__char {
        font-size: 30px;
    }

    /* Element grid: 2 cols */
    .sg-element-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sg-balance__row {
        grid-template-columns: 64px 1fr 18px auto;
        gap: 6px;
    }
}

/* -- Save prompt (guest banner) — embedded callout, not page-end footer -- */
.sg-save-prompt {
    /* Lives inside the body flow now — no full-bleed dark bar */
    padding: var(--sp-md) 0;
    background: transparent;
}
.sg-save-prompt__inner {
    background: var(--bg-section-alt);
    border-left: 4px solid var(--lt-sage);
    border-radius: 14px;
    padding: 18px 22px;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    box-shadow: 0 1px 3px rgba(40,40,31,.04);
}
.sg-save-prompt__icon { font-size: 1.5rem; flex-shrink: 0; }
.sg-save-prompt__text {
    flex: 1; min-width: 200px;
    display: flex; flex-direction: column; gap: .15rem;
}
.sg-save-prompt__text strong { color: var(--lt-ink); font-size: .95rem; }
.sg-save-prompt__text span   { color: var(--lt-text-soft); font-size: .83rem; }
.sg-save-prompt__actions { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.sg-save-prompt__btn { padding: .5rem 1.25rem !important; font-size: .88rem !important; }
.sg-save-prompt__login {
    font-size: .83rem; color: var(--lt-text-soft);
    text-decoration: none; white-space: nowrap;
    transition: color var(--ease);
}
.sg-save-prompt__login:hover { color: var(--lt-sage-dark); }

@media (max-width: 560px) {
    .sg-save-prompt__inner { flex-direction: column; align-items: flex-start; }
    .sg-save-prompt__actions { width: 100%; }
    .sg-save-prompt__btn { flex: 1; text-align: center; }
}
