:root {
    --oracle-gold: #D4AF37;
    --deep-blue: #1A1B26;
    --life-red: #B22222;
    --parchment: #F5F5DC;
    --muted-parchment: rgba(245, 245, 220, 0.78);
    --accent: var(--oracle-gold);
    --accent-soft: rgba(212, 175, 55, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-padding-top: 1rem; max-width: 100%; overflow-x: hidden; background: #121522; }
body {
    margin: 0;
    min-height: 100vh;
    max-width: 100vw;
    font-family: 'Raleway', 'Noto Serif TC', sans-serif;
    background:
        radial-gradient(circle at 18% 14%, rgba(212, 175, 55, 0.12), transparent 30rem),
        repeating-linear-gradient(120deg, rgba(212, 175, 55, 0.035) 0 1px, transparent 1px 64px),
        repeating-linear-gradient(60deg, rgba(245, 245, 220, 0.024) 0 1px, transparent 1px 82px),
        linear-gradient(180deg, #121522 0%, var(--deep-blue) 42%, #0e1421 100%);
    color: var(--muted-parchment);
    overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; }
button, input, textarea { font: inherit; }
a, button, summary, input, textarea {
    touch-action: manipulation;
}

a, button, summary {
    -webkit-tap-highlight-color: rgba(212, 175, 55, 0.18);
}

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--oracle-gold);
    outline-offset: 3px;
}

a, button, summary, input, textarea {
    min-height: 2.75rem;
}

main, section, article, p, li, h1, h2, h3, h4, h5, h6, button, input, textarea { overflow-wrap: anywhere; }
section { overflow: hidden; }
details summary::-webkit-details-marker { display: none; }
details summary .plus-icon { transition: transform 0.3s ease; }
details[open] summary .plus-icon { transform: rotate(45deg); }

body[data-element="fire"] { --accent: #B22222; --accent-soft: rgba(178, 34, 34, 0.18); }
body[data-element="water"] { --accent: #2dd4bf; --accent-soft: rgba(45, 212, 191, 0.15); }
body[data-element="air"] { --accent: #93c5fd; --accent-soft: rgba(147, 197, 253, 0.16); }
body[data-element="earth"] { --accent: #74a866; --accent-soft: rgba(116, 168, 102, 0.16); }

h1, h2, h3, .display-serif { font-family: 'Playfair Display', 'Noto Serif TC', serif; }
.mono { font-family: 'Sometype Mono', monospace; }

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 18rem minmax(0, 1fr);
}

.app-shell.sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr);
}

.app-shell.sidebar-collapsed .sidebar {
    display: none;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    border-right: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(12, 15, 26, 0.9);
    backdrop-filter: blur(18px);
}

.page-main {
    min-width: 0;
    overflow: hidden;
    padding: 1rem max(1rem, env(safe-area-inset-right)) 1rem max(1rem, env(safe-area-inset-left));
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(18, 21, 34, 0.86);
    backdrop-filter: blur(18px);
}

.home-topbar-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.home-reading-stats {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
}

#reading-stats-by-spread {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: stretch;
}

.global-reading-stats {
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: rgba(18, 21, 34, 0.76);
    backdrop-filter: blur(18px);
}

.home-topbar-actions {
    order: 2;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.menu-toggle-button {
    display: inline-grid;
    width: 3.15rem;
    height: 3.15rem;
    min-height: 0;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.95);
    border-radius: 999px;
    background: var(--oracle-gold);
    color: #1A1B26;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.26);
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.24s ease;
}

.menu-toggle-button:hover,
.menu-toggle-button:focus-visible {
    border-color: rgba(250, 204, 21, 0.95);
    background: #f5d65f;
    outline: none;
}

.menu-toggle-button.is-active {
    transform: rotate(90deg);
}

.menu-toggle-bars {
    position: relative;
    display: grid;
    width: 1.25rem;
    gap: 0.25rem;
    transition: transform 0.24s ease;
}

.menu-toggle-bars span {
    display: block;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: transform 0.24s ease, opacity 0.18s ease;
}

.menu-toggle-button.is-active .menu-toggle-bars span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-toggle-button.is-active .menu-toggle-bars span:nth-child(2) {
    opacity: 0;
}

.menu-toggle-button.is-active .menu-toggle-bars span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    padding: 0.75rem 0.85rem;
    color: rgba(245, 245, 220, 0.72);
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

button.nav-link {
    width: 100%;
    appearance: none;
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.sidebar-signout {
    margin-top: 0.35rem;
    justify-content: center;
    gap: 0;
    text-align: center;
    border-color: rgba(212, 175, 55, 0.65);
    background: var(--oracle-gold);
    color: #1A1B26;
    font-weight: 800;
    padding-left: 1rem;
    padding-right: 1rem;
}

.nav-link.sidebar-signout:hover,
.nav-link.sidebar-signout:focus-visible {
    border-color: rgba(250, 204, 21, 0.9);
    background: #f5d65f;
    color: #1A1B26;
}

.nav-link.hidden {
    display: none;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    border-color: rgba(212, 175, 55, 0.26);
    background: rgba(212, 175, 55, 0.09);
    color: var(--parchment);
}

button.nav-link.sidebar-line-login {
    justify-content: center;
    border-color: rgba(6, 199, 85, 0.82);
    background: #06C755;
    color: #06170A;
    font-weight: 900;
}

button.nav-link.sidebar-line-login:hover,
button.nav-link.sidebar-line-login:focus-visible {
    border-color: rgba(33, 221, 107, 0.96);
    background: #21dd6b;
    color: #06170A;
}

.nav-link.sidebar-signout:not(.hidden),
button.nav-link.sidebar-signout:not(.hidden),
.nav-link.sidebar-signout:not(.hidden):hover,
.nav-link.sidebar-signout:not(.hidden):focus-visible {
    display: inline-flex;
    width: fit-content;
    min-width: 0;
    margin: 1rem auto 0;
    justify-content: center;
    border-color: var(--oracle-gold);
    background: var(--oracle-gold);
    color: #1A1B26;
    font-weight: 800;
    padding: 0.75rem 1.25rem;
    text-align: center;
}

.nav-icon {
    display: inline-grid;
    width: 1.85rem;
    height: 1.85rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: var(--oracle-gold);
}

.stats-chip {
    display: inline-flex;
    flex: 0 0 clamp(6.7rem, 8.7vw, 9.35rem);
    width: clamp(6.7rem, 8.7vw, 9.35rem);
    min-height: 2.65rem;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 999px;
    background: rgba(245, 245, 220, 0.05);
    padding: 0.48rem 0.78rem;
    color: rgba(245, 245, 220, 0.78);
    cursor: pointer;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    box-sizing: border-box;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.stats-chip:hover {
    border-color: rgba(212, 175, 55, 0.6);
    background: rgba(212, 175, 55, 0.1);
    color: var(--parchment);
}

.stats-chip:focus-visible {
    outline: 2px solid var(--oracle-gold);
    outline-offset: 2px;
}

.mobile-drawer {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 50;
    width: min(82vw, 22rem);
    transform: translateX(-105%);
    border-right: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(12, 15, 26, 0.96);
    transition: transform 0.24s ease;
    padding-top: max(1.25rem, env(safe-area-inset-top));
    padding-bottom: max(1.25rem, env(safe-area-inset-bottom));
}

.mobile-drawer.is-open { transform: translateX(0); }
.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.58);
}

.site-footer {
    margin-top: 1rem;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 1rem;
    background: rgba(12, 15, 26, 0.72);
    padding: 1.5rem;
    color: rgba(245, 245, 220, 0.72);
}

.site-footer a {
    color: var(--oracle-gold);
    font-weight: 700;
    text-decoration: none;
}

.site-footer a:hover {
    color: #fde047;
}

.site-footer-title {
    color: var(--oracle-gold);
    font-family: 'Playfair Display', 'Noto Serif TC', serif;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
}

.site-footer-subtitle {
    color: rgba(245, 245, 220, 0.88);
    font-weight: 700;
}

.site-footer-copy {
    max-width: 68rem;
    line-height: 1.85;
}

.site-footer-legal {
    margin-top: 1.25rem;
    border-top: 1px solid rgba(212, 175, 55, 0.16);
    padding-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.7;
    text-align: center;
}

.site-footer-legal p {
    margin: 0;
}

.account-main {
    display: grid;
    gap: 1rem;
}

.account-auth-panel {
    min-width: 0;
}

.reading-auth-panel {
    border-bottom: 1px solid rgba(212, 175, 55, 0.18);
    padding-bottom: 1.5rem;
}

.reading-signin-panel,
.reading-profile-panel {
    display: grid;
    min-width: 0;
    gap: 1rem;
    align-items: stretch;
}

.reading-signin-panel {
    grid-template-columns: minmax(0, 1fr);
}

.reading-profile-panel {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.reading-signin-panel.hidden,
.reading-profile-panel.hidden {
    display: none;
}

.reading-auth-copy,
.reading-auth-actions,
.reading-profile-link,
.reading-daily-guidance {
    min-width: 0;
}

.reading-auth-actions {
    display: grid;
    gap: 0.75rem;
}

.reading-line-login,
.reading-auth-actions button,
.reading-email-login button {
    border: 0;
    cursor: pointer;
}

.reading-line-login {
    width: 100%;
    border-radius: 0.8rem;
    background: #06C755;
    padding: 0.95rem 1.2rem;
    color: #06170A;
    font-weight: 900;
    transition: background 180ms ease, transform 180ms ease;
}

.reading-line-login:hover,
.reading-line-login:focus-visible {
    background: #21dd6b;
    transform: translateY(-1px);
}

.reading-email-login {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
}

.reading-email-login input {
    min-width: 0;
    border: 1px solid rgba(148, 163, 184, 0.72);
    border-radius: 0.8rem;
    background: rgba(3, 7, 18, 0.7);
    padding: 0.85rem 1rem;
    color: #fff;
}

.reading-email-login button {
    border-radius: 0.8rem;
    background: var(--oracle-gold);
    padding: 0.85rem 1rem;
    color: #1A1B26;
    font-weight: 900;
    transition: background 180ms ease, transform 180ms ease;
}

.reading-email-login button:hover,
.reading-email-login button:focus-visible {
    background: #fde047;
    transform: translateY(-1px);
}

.reading-profile-link,
.reading-daily-card {
    display: grid;
    gap: 1rem;
    align-items: center;
    border: 1px solid rgba(212, 175, 55, 0.26);
    border-radius: 1rem;
    background:
        linear-gradient(135deg, rgba(16, 24, 39, 0.9), rgba(26, 27, 38, 0.74)),
        rgba(16, 24, 39, 0.78);
    color: var(--parchment);
    text-decoration: none;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.reading-profile-link {
    grid-template-columns: auto minmax(0, 1fr);
    height: 100%;
    padding: 1rem;
}

.reading-profile-link:hover,
.reading-profile-link:focus-visible,
.reading-daily-card:hover,
.reading-daily-card:focus-visible {
    border-color: rgba(212, 175, 55, 0.58);
    background:
        linear-gradient(135deg, rgba(16, 24, 39, 0.96), rgba(26, 27, 38, 0.82)),
        rgba(16, 24, 39, 0.86);
    transform: translateY(-1px);
}

#reading-profile-avatar {
    width: 4.75rem;
    height: 4.75rem;
    border: 2px solid rgba(212, 175, 55, 0.82);
    border-radius: 999px;
    object-fit: cover;
}

.reading-profile-copy,
.reading-daily-copy {
    display: grid;
    min-width: 0;
    gap: 0.38rem;
}

.reading-profile-copy strong {
    color: #FFE66D;
    font-size: clamp(1.3rem, 2.4vw, 1.85rem);
    line-height: 1.15;
}

.reading-profile-copy span:not(:first-child) {
    color: rgba(245, 245, 220, 0.72);
}

.reading-daily-card {
    grid-template-columns: minmax(4.6rem, 5.6rem) minmax(0, 1fr);
    width: 100%;
    height: 100%;
    padding: 0.85rem;
    text-align: left;
    cursor: pointer;
}

.reading-daily-card[disabled] {
    cursor: default;
}

.reading-daily-image-wrap {
    display: grid;
    place-items: center;
}

.reading-daily-image-wrap img {
    width: 100%;
    border-radius: 0.55rem;
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.34);
}

.reading-daily-kicker {
    font-family: 'Sometype Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--oracle-gold);
}

.reading-daily-name {
    color: #FFE66D;
    font-family: 'Noto Serif TC', serif;
    font-size: clamp(1.15rem, 2.1vw, 1.6rem);
    font-weight: 800;
    line-height: 1.2;
}

.reading-daily-orientation {
    color: rgba(199, 210, 254, 0.92);
    font-weight: 800;
}

.reading-daily-meaning,
.reading-daily-loading {
    color: rgba(245, 245, 220, 0.74);
    line-height: 1.65;
}

.reading-daily-loading {
    display: grid;
    min-height: 7.25rem;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 1rem;
    background: rgba(16, 24, 39, 0.68);
    padding: 1rem;
    text-align: center;
}

.daily-guidance-panel {
    min-width: 0;
}

.daily-guidance-card {
    display: grid;
    width: 100%;
    gap: 1rem;
    align-items: center;
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 1rem;
    background:
        linear-gradient(135deg, rgba(16, 24, 39, 0.88), rgba(26, 27, 38, 0.74)),
        rgba(16, 24, 39, 0.78);
    padding: 1rem;
    text-align: left;
    color: #F5F5DC;
    transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.daily-guidance-card:hover {
    transform: translateY(-1px);
    border-color: rgba(212, 175, 55, 0.58);
    background:
        linear-gradient(135deg, rgba(16, 24, 39, 0.94), rgba(26, 27, 38, 0.82)),
        rgba(16, 24, 39, 0.84);
}

.daily-guidance-image-wrap {
    display: grid;
    justify-self: center;
    width: min(9rem, 42vw);
    place-items: center;
}

.daily-guidance-image-wrap img {
    width: 100%;
    border-radius: 0.72rem;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.34);
}

.daily-guidance-copy {
    display: grid;
    min-width: 0;
    gap: 0.45rem;
}

.daily-guidance-kicker {
    font-family: 'Sometype Mono', monospace;
    font-size: 0.72rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #D4AF37;
}

.daily-guidance-name {
    font-family: 'Noto Serif TC', serif;
    font-size: clamp(1.45rem, 3.2vw, 2.35rem);
    font-weight: 700;
    line-height: 1.22;
    color: #FFE66D;
}

.daily-guidance-orientation {
    color: rgba(199, 210, 254, 0.92);
    font-weight: 700;
}

.daily-guidance-meaning,
.daily-guidance-loading {
    color: rgba(245, 245, 220, 0.74);
    line-height: 1.75;
}

.daily-guidance-loading {
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 1rem;
    background: rgba(16, 24, 39, 0.7);
    padding: 1rem;
}

.profile-edit-fields {
    grid-template-columns: 1fr;
}

.profile-bio-field {
    grid-column: 1 / -1;
}

.provider-icon-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 0.75rem;
    width: 100%;
}

.provider-icon-button {
    display: inline-grid;
    width: 100%;
    place-items: center;
    gap: 0.45rem;
    border: 0;
    border-radius: 0.85rem;
    background: transparent;
    padding: 0.45rem 0.3rem;
    color: #F5F5DC;
    text-align: center;
    transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, opacity 180ms ease;
}

.provider-icon-button:hover {
    transform: translateY(-1px);
    background: rgba(245, 245, 220, 0.06);
}

.provider-icon-button.is-unlinked {
    opacity: 0.38;
}

.provider-icon-button.is-linked {
    opacity: 1;
}

.provider-icon {
    display: inline-grid;
    width: 2.35rem;
    height: 2.35rem;
    place-items: center;
    border-radius: 999px;
    font-family: Raleway, sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
}

.provider-icon svg {
    width: 100%;
    height: 100%;
}

.provider-icon-line {
    border-radius: 0.55rem;
}

.provider-icon-google {
    background: transparent;
}

.provider-icon-github {
    background: transparent;
    color: #f5f5dc;
}

.provider-icon-status {
    font-size: 0.68rem;
    line-height: 1.2;
    color: rgba(245, 245, 220, 0.66);
    white-space: nowrap;
}

@media (min-width: 1024px) {
    .account-main {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
    }

    .account-intro {
        grid-column: 1 / -1;
    }

    .account-auth-panel {
        grid-column: 1 / -1;
    }

    .daily-guidance-panel {
        grid-column: 1 / -1;
    }

    .daily-guidance-card {
        grid-template-columns: minmax(8rem, 11rem) minmax(0, 1fr);
        padding: 1.25rem;
    }

    .daily-guidance-image-wrap {
        width: 9.5rem;
    }

    #reading-history {
        grid-column: 1 / -1;
    }

    .profile-edit-fields {
        grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
    }
}

.page-hero {
    background-size: cover;
    background-position: center;
    position: relative;
    isolation: isolate;
    overflow: hidden;
}

.learn-hero {
    background-image:
        linear-gradient(135deg, rgba(10, 12, 20, 0.72), rgba(10, 12, 20, 0.91)),
        url('assets/site/Four%20Elements%20Illustration.png');
}

.learn-main {
    grid-template-columns: minmax(0, 1fr);
}

.learn-main > .panel {
    grid-column: 1 / -1;
}

.meanings-hero {
    background-image:
        linear-gradient(135deg, rgba(10, 12, 20, 0.72), rgba(10, 12, 20, 0.91)),
        url('assets/site/meanings.png');
}

.spreads-hero {
    background-image:
        linear-gradient(135deg, rgba(10, 12, 20, 0.68), rgba(10, 12, 20, 0.92)),
        url('assets/site/faq.png');
}

.account-hero {
    background-image:
        linear-gradient(135deg, rgba(10, 12, 20, 0.72), rgba(10, 12, 20, 0.91)),
        url('assets/site/Interactive%20Shuffling%20Background.png');
}

.workspace-hero {
    min-height: auto;
    background-image:
        linear-gradient(90deg, rgba(5, 8, 15, 0.95) 0%, rgba(5, 8, 15, 0.86) 42%, rgba(5, 8, 15, 0.58) 72%, rgba(5, 8, 15, 0.78) 100%),
        linear-gradient(180deg, rgba(10, 12, 20, 0.64), rgba(10, 12, 20, 0.9)),
        url('assets/site/Hero%20Banner.png');
    background-size: cover;
    background-position: center;
    position: relative;
    isolation: isolate;
}

.workspace-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(90deg, rgba(212, 175, 55, 0.032) 0 1px, transparent 1px 72px),
        repeating-linear-gradient(0deg, rgba(245, 245, 220, 0.024) 0 1px, transparent 1px 72px);
    z-index: -1;
}

.workspace-hero h1,
.workspace-hero h2 {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-all;
    text-shadow: 0 4px 22px rgba(0, 0, 0, 0.72), 0 1px 2px rgba(0, 0, 0, 0.82);
}

.workspace-hero > div > p:not(.mono) {
    color: rgba(255, 252, 232, 0.94);
    font-weight: 500;
    text-shadow: 0 3px 18px rgba(0, 0, 0, 0.82), 0 1px 2px rgba(0, 0, 0, 0.92);
}

.alchemy-line {
    background: linear-gradient(90deg, transparent, var(--oracle-gold), transparent);
    height: 1px;
    opacity: 0.78;
}

.panel {
    border: 1px solid rgba(212, 175, 55, 0.18);
    background: linear-gradient(145deg, rgba(26, 27, 38, 0.92), rgba(14, 20, 33, 0.86));
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.24);
}

.step-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    color: rgba(245, 245, 220, 0.72);
    background: rgba(245, 245, 220, 0.045);
}

.spreads-page {
    --teaching-border: rgba(212, 175, 55, 0.2);
}

.spreads-page .panel {
    overflow: hidden;
}

.content-grid {
    display: grid;
    gap: 1.25rem;
    align-items: start;
}

.content-grid.ask-better-layout,
.ask-better-layout .question-compare {
    grid-template-columns: minmax(0, 1fr);
}

.insight-box,
.safety-note {
    border: 1px solid var(--teaching-border);
    border-radius: 1rem;
    background: rgba(245, 245, 220, 0.045);
    padding: 1.25rem;
}

.insight-box li {
    padding-left: 0.85rem;
    position: relative;
}

.insight-box li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72rem;
    width: 0.28rem;
    height: 0.28rem;
    border-radius: 999px;
    background: var(--oracle-gold);
}

.spread-article-list {
    display: grid;
    gap: 1rem;
}

.spread-teaching-card {
    display: grid;
    gap: 1.25rem;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(12, 15, 26, 0.78), rgba(26, 27, 38, 0.66));
    padding: 1rem;
}

.spread-teaching-visual {
    min-width: 0;
    border: 1px solid rgba(245, 245, 220, 0.08);
    border-radius: 0.9rem;
    background:
        repeating-linear-gradient(90deg, rgba(212, 175, 55, 0.035) 0 1px, transparent 1px 48px),
        repeating-linear-gradient(0deg, rgba(245, 245, 220, 0.025) 0 1px, transparent 1px 48px),
        rgba(5, 8, 15, 0.38);
    padding: 1rem;
}

.spread-diagram {
    min-height: 15rem;
    display: grid;
    place-items: center;
    gap: 0.8rem;
    width: 100%;
}

.diagram-card {
    display: grid;
    width: clamp(3.35rem, 18vw, 4.75rem);
    aspect-ratio: 2 / 3.35;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.42);
    border-radius: 0.62rem;
    background-image:
        linear-gradient(180deg, rgba(26, 27, 38, 0.18), rgba(26, 27, 38, 0.72)),
        url('assets/site/Card%20Back%20Pattern.png');
    background-size: cover;
    background-position: center;
    color: #f9e7a2;
    font-family: 'Sometype Mono', monospace;
    font-weight: 800;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(245, 245, 220, 0.04);
}

.spread-diagram.cause-effect,
.spread-diagram.timeline,
.spread-diagram.mind-body-spirit {
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, auto);
}

.spread-diagram.relationship-spread {
    grid-template-columns: repeat(2, auto);
    grid-template-rows: repeat(2, auto);
}

.spread-diagram.choice-spread {
    grid-template-columns: repeat(2, auto);
    grid-template-rows: repeat(3, auto);
    align-content: center;
}

.spread-diagram.choice-spread .diagram-card:first-child {
    grid-column: 1 / -1;
    justify-self: center;
}

.spread-diagram.choice-spread .diagram-card:nth-child(2) { grid-column: 1; grid-row: 2; }
.spread-diagram.choice-spread .diagram-card:nth-child(3) { grid-column: 2; grid-row: 2; }
.spread-diagram.choice-spread .diagram-card:nth-child(4) { grid-column: 1; grid-row: 3; }
.spread-diagram.choice-spread .diagram-card:nth-child(5) { grid-column: 2; grid-row: 3; }

.spread-teaching-copy {
    min-width: 0;
    color: rgba(245, 245, 220, 0.78);
}

.mini-section {
    margin-top: 1rem;
}

.mini-section h5 {
    color: #fde68a;
    font-weight: 800;
}

.mini-section ul {
    margin-top: 0.65rem;
    display: grid;
    gap: 0.45rem;
    color: rgba(245, 245, 220, 0.72);
    font-size: 0.95rem;
    line-height: 1.65;
}

.mini-section li {
    padding-left: 1rem;
    position: relative;
}

.mini-section li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72rem;
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.9);
}

.spread-table,
.position-list,
.choice-guide-grid,
.question-compare,
.flow-steps {
    display: grid;
    gap: 0.75rem;
}

.spread-table {
    margin-top: 1rem;
}

.spread-table div,
.position-list div,
.choice-guide-grid div,
.flow-steps article,
.question-compare > div {
    min-width: 0;
    border: 1px solid rgba(212, 175, 55, 0.16);
    border-radius: 0.85rem;
    background: rgba(245, 245, 220, 0.045);
    padding: 0.95rem;
}

.spread-table b,
.choice-guide-grid b,
.position-list b {
    display: block;
    color: #fde68a;
    font-weight: 800;
}

.spread-table span,
.choice-guide-grid p,
.position-list p {
    display: block;
    margin-top: 0.35rem;
    color: rgba(245, 245, 220, 0.68);
    font-size: 0.92rem;
    line-height: 1.65;
}

.position-list span,
.flow-steps span {
    display: inline-grid;
    min-width: 2rem;
    height: 2rem;
    margin-bottom: 0.55rem;
    place-items: center;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.13);
    color: var(--oracle-gold);
    font-family: 'Sometype Mono', monospace;
    font-size: 0.8rem;
    font-weight: 800;
}

.beginner-score,
.notice-text {
    margin-top: 1rem;
    border-left: 3px solid var(--oracle-gold);
    color: rgba(245, 245, 220, 0.76);
    background: rgba(212, 175, 55, 0.08);
    padding: 0.8rem 1rem;
    line-height: 1.7;
}

.spread-eyebrow {
    display: inline-flex;
    width: fit-content;
    min-height: auto;
    text-decoration: none;
    transition: color 0.2s ease;
}

.spread-eyebrow:hover,
.spread-eyebrow:focus-visible,
.spread-title-link:hover,
.spread-title-link:focus-visible {
    color: #fde047;
}

.spread-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.choice-guide-grid a {
    display: inline-flex;
    margin-top: 0.7rem;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.14);
    padding: 0.35rem 0.65rem;
    color: #c7d2fe;
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.choice-guide-grid a:hover,
.choice-guide-grid a:focus-visible {
    background: rgba(212, 175, 55, 0.16);
    color: #fde047;
    transform: translateY(-1px);
}

.question-compare h4,
.flow-steps h4 {
    color: #fde68a;
    font-weight: 800;
}

.question-compare ul {
    margin-top: 0.8rem;
    display: grid;
    gap: 0.5rem;
    color: rgba(245, 245, 220, 0.72);
    font-size: 0.95rem;
    line-height: 1.65;
}

.question-compare li {
    padding-left: 1rem;
    position: relative;
}

.question-compare li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.72rem;
    width: 0.3rem;
    height: 0.3rem;
    border-radius: 999px;
    background: var(--oracle-gold);
}

.flow-steps p {
    margin-top: 0.45rem;
    color: rgba(245, 245, 220, 0.68);
    font-size: 0.92rem;
    line-height: 1.65;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 0.42fr);
    }

    .reading-signin-panel {
        grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.82fr);
    }

    .spread-table {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .position-list,
    .choice-guide-grid,
    .flow-steps,
    .question-compare {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .position-list.three {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .position-list.choice-positions > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1180px) {
    .spread-teaching-card {
        grid-template-columns: minmax(20rem, 0.36fr) minmax(0, 1fr);
        padding: 1.25rem;
    }
}

.spread-card {
    min-height: 11.5rem;
    border-color: rgba(212, 175, 55, 0.22);
    background: linear-gradient(145deg, rgba(26, 27, 38, 0.96), rgba(31, 36, 54, 0.72));
}

.spread-card[aria-pressed="true"] {
    border-color: var(--oracle-gold);
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.16), rgba(26, 27, 38, 0.86));
    box-shadow: 0 18px 50px rgba(212, 175, 55, 0.1);
}

.ritual-stage {
    background-image:
        linear-gradient(135deg, rgba(26, 27, 38, 0.76), rgba(8, 11, 20, 0.9)),
        url('assets/site/Interactive%20Shuffling%20Background.png');
    background-size: cover;
    background-position: center;
}

.placeholder-card {
    background-image:
        linear-gradient(180deg, rgba(26, 27, 38, 0.25), rgba(26, 27, 38, 0.8)),
        url('assets/site/Card%20Back%20Pattern.png');
    background-size: cover;
    background-position: center;
}

.cut-pile {
    border: 0;
    background: transparent;
    min-width: 0;
    padding: 0;
    width: min(100%, 8.25rem);
}

.cut-card-back {
    aspect-ratio: 2 / 3.5;
    width: 100%;
    display: grid;
    place-items: center;
    border: 1px solid rgba(212, 175, 55, 0.26);
    border-radius: 0.75rem;
    background-image:
        linear-gradient(180deg, rgba(26, 27, 38, 0.18), rgba(26, 27, 38, 0.72)),
        url('assets/site/Card%20Back%20Pattern.png');
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(245, 245, 220, 0.04);
}

#cut-stage {
    justify-items: center;
}

.cut-pile[aria-pressed="true"] {
    color: var(--parchment);
    transform: translateY(-2px);
}

.cut-pile[aria-pressed="true"] .cut-card-back {
    border-color: var(--oracle-gold);
    box-shadow: 0 0 34px rgba(212, 175, 55, 0.16);
}

.spread-layout {
    width: 100%;
}

.card-image,
.placeholder-card {
    width: 100%;
    border-radius: 0.65rem;
}

.choice-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: start;
    justify-items: center;
}

.choice-slot {
    width: min(100%, 15rem);
}

.choice-slot-current {
    grid-column: 1 / -1;
}

.result-card-grid {
    margin: 0 auto 1.75rem;
}

.result-card-grid .choice-slot-current {
    justify-self: center;
}

.result-card-image {
    width: 100%;
    border-radius: 0.75rem;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.32);
}

.result-analysis-grid {
    margin: 0 auto 1.5rem;
}

.result-analysis-slot {
    width: min(100%, 36rem);
}

.result-analysis-grid.choice-layout {
    gap: 1.25rem;
}

.shuffle-focus-note {
    margin-top: 0.75rem;
    color: rgba(245, 245, 220, 0.7);
    font-size: 0.95rem;
    line-height: 1.7;
}

.is-shuffling #shuffle-stage {
    position: relative;
    overflow: hidden;
}

.is-shuffling #shuffle-stage::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 22% 35%, rgba(212, 175, 55, 0.2), transparent 22%),
        radial-gradient(circle at 76% 62%, rgba(147, 197, 253, 0.13), transparent 24%);
    animation: shuffleGlow 1.25s ease-in-out infinite alternate;
}

.result-analysis-card {
    min-height: 13rem;
}

.result-analysis-card-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.25rem;
    gap: 1rem;
    align-items: center;
}

.result-analysis-thumb {
    width: 5.25rem;
    aspect-ratio: 2 / 3.5;
    object-fit: cover;
    border-radius: 0.45rem;
    border: 1px solid rgba(212, 175, 55, 0.22);
    justify-self: end;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.is-shuffling .placeholder-card {
    transform-origin: center;
    animation: shufflePulse 0.48s ease-in-out infinite alternate;
}
.tarot-result-card { animation: tarotReveal 0.42s ease both; }
.tarot-result-card:hover {
    border-color: color-mix(in srgb, var(--accent) 54%, transparent);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28), 0 0 34px var(--accent-soft);
}

.result-share-panel {
    margin-top: 1.5rem;
    border: 1px solid rgba(212, 175, 55, 0.22);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(12, 15, 26, 0.92), rgba(26, 27, 38, 0.82));
    padding: 1.25rem;
}

.result-share-copy {
    width: 100%;
    min-height: 8rem;
    resize: vertical;
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 0.85rem;
    background: rgba(5, 8, 15, 0.68);
    color: rgba(245, 245, 220, 0.86);
    font-size: 0.9rem;
    line-height: 1.75;
    margin: 1rem 0;
    padding: 0.9rem 1rem;
}

.result-share-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.line-oracle-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.result-share-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 0.75rem;
}

.result-share-btn {
    align-items: center;
    min-height: 2.75rem;
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 0.85rem;
    background: rgba(245, 245, 220, 0.05);
    color: var(--parchment);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 800;
    justify-content: center;
    padding: 0.7rem 0.85rem;
    text-align: center;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.result-share-btn:hover,
.result-share-btn:focus-visible {
    border-color: var(--oracle-gold);
    background: rgba(212, 175, 55, 0.14);
    color: #fde047;
    transform: translateY(-1px);
}

.result-share-btn[disabled] {
    cursor: wait;
    opacity: 0.68;
    transform: none;
}

.line-oracle-link {
    border-color: rgba(6, 199, 85, 0.72);
    background: #06C755;
    color: #05240f;
}

.line-oracle-link:hover,
.line-oracle-link:focus-visible {
    border-color: #86efac;
    background: #2ee273;
    color: #05240f;
}

.social-share-btn {
    width: 3.25rem;
    min-height: 3.25rem;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    letter-spacing: 0;
}

.social-share-line {
    border-color: rgba(6, 199, 85, 0.72);
    background: #06C755;
    color: #05240f;
    font-size: 0.72rem;
}

.social-share-facebook {
    border-color: rgba(24, 119, 242, 0.72);
    background: #1877F2;
    color: white;
    font-size: 1.55rem;
    font-weight: 900;
}

.social-share-threads {
    border-color: rgba(245, 245, 220, 0.72);
    background: #f5f5dc;
    color: #121522;
    font-size: 1.55rem;
    font-weight: 900;
}

.result-share-status {
    min-height: 1.4rem;
    color: rgba(245, 245, 220, 0.7);
    font-size: 0.8rem;
    margin-top: 0.75rem;
    text-align: center;
}

.result-replay-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.result-replay-actions .result-share-btn {
    min-width: min(10rem, 100%);
    padding-inline: 1.25rem;
}

.result-replay-primary {
    border-color: rgba(212, 175, 55, 0.86);
    background: var(--oracle-gold);
    color: #1A1B26;
}

.result-replay-primary:hover,
.result-replay-primary:focus-visible {
    border-color: #fde047;
    background: #f5d65f;
    color: #1A1B26;
}

.floating-oracle-link {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    z-index: 45;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.25rem;
    height: 4.25rem;
    min-height: 0;
    border: 1px solid rgba(212, 175, 55, 0.34);
    border-radius: 999px;
    background: rgba(12, 15, 26, 0.88);
    color: var(--parchment);
    padding: 0.36rem;
    text-decoration: none;
    box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34), 0 0 28px rgba(212, 175, 55, 0.12);
    backdrop-filter: blur(16px);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.floating-oracle-link img {
    width: 100%;
    height: 100%;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(245, 245, 220, 0.2);
    object-fit: cover;
}

.floating-oracle-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.floating-oracle-link:hover,
.floating-oracle-link:focus-visible {
    border-color: var(--oracle-gold);
    box-shadow: 0 22px 58px rgba(0, 0, 0, 0.42), 0 0 38px rgba(212, 175, 55, 0.2);
    transform: translateY(-2px);
}

.oracle-chat-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(5, 7, 14, 0.56);
    backdrop-filter: blur(6px);
}

.oracle-chat-panel {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 5rem);
    z-index: 90;
    display: flex;
    width: min(26rem, calc(100vw - 2rem));
    max-height: min(42rem, calc(100vh - 7rem));
    overflow: hidden;
    flex-direction: column;
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 1.25rem;
    background: rgba(13, 16, 28, 0.96);
    color: var(--parchment);
    box-shadow: 0 28px 78px rgba(0, 0, 0, 0.52), 0 0 42px rgba(212, 175, 55, 0.14);
}

.oracle-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(245, 245, 220, 0.1);
    background: rgba(245, 245, 220, 0.03);
}

.oracle-chat-header-main {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
}

.oracle-chat-avatar {
    width: 2.75rem;
    height: 2.75rem;
    flex: 0 0 auto;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 999px;
    object-fit: cover;
}

.oracle-chat-kicker {
    margin: 0 0 0.12rem;
    color: rgba(212, 175, 55, 0.88);
    font-family: 'Sometype Mono', monospace;
    font-size: 0.68rem;
    letter-spacing: 0.18em;
}

.oracle-chat-header h2 {
    margin: 0;
    color: var(--oracle-gold);
    font-size: 1.05rem;
    line-height: 1.3;
}

.oracle-chat-header p:last-child {
    margin: 0.12rem 0 0;
    color: rgba(245, 245, 220, 0.64);
    font-size: 0.78rem;
}

.oracle-chat-close {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    min-height: 0;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(245, 245, 220, 0.12);
    border-radius: 999px;
    background: rgba(245, 245, 220, 0.05);
    color: rgba(245, 245, 220, 0.78);
    font-size: 1.35rem;
    line-height: 1;
}

.oracle-chat-body {
    flex: 1 1 auto;
    min-height: 16rem;
    overflow-y: auto;
    padding: 1rem;
}

.oracle-chat-message {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.9rem;
}

.oracle-chat-message.is-user {
    justify-content: flex-end;
}

.oracle-chat-message-avatar {
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border: 1px solid rgba(212, 175, 55, 0.32);
    border-radius: 999px;
    object-fit: cover;
}

.oracle-chat-bubble {
    max-width: min(19rem, 78vw);
    border: 1px solid rgba(245, 245, 220, 0.1);
    border-radius: 1rem;
    padding: 0.78rem 0.9rem;
    background: rgba(245, 245, 220, 0.06);
    color: rgba(245, 245, 220, 0.86);
    font-size: 0.92rem;
    line-height: 1.75;
}

.oracle-chat-message.is-assistant .oracle-chat-bubble {
    border-top-left-radius: 0.28rem;
}

.oracle-chat-message.is-user .oracle-chat-bubble {
    border-color: rgba(212, 175, 55, 0.46);
    border-top-right-radius: 0.28rem;
    background: rgba(212, 175, 55, 0.18);
    color: #fff7d6;
}

.oracle-chat-link {
    color: #f5d56a;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-color: rgba(245, 213, 106, 0.48);
    text-underline-offset: 0.18em;
    transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.oracle-chat-link:hover {
    color: #fff1a8;
    text-decoration-color: rgba(255, 241, 168, 0.86);
}

.oracle-chat-typing {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    min-width: 4rem;
}

.oracle-chat-typing span {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.76);
    animation: oracleTyping 1s infinite ease-in-out;
}

.oracle-chat-typing span:nth-child(2) { animation-delay: 0.14s; }
.oracle-chat-typing span:nth-child(3) { animation-delay: 0.28s; }

@keyframes oracleTyping {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.46; }
    40% { transform: translateY(-0.24rem); opacity: 1; }
}

.oracle-chat-prompts {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.1rem 1rem 0.8rem;
    border-top: 1px solid rgba(245, 245, 220, 0.06);
    scrollbar-width: none;
}

.oracle-chat-prompts::-webkit-scrollbar {
    display: none;
}

.oracle-chat-prompts button {
    flex: 0 0 auto;
    max-width: min(15rem, 72vw);
    min-height: 2.35rem;
    border: 1px solid rgba(212, 175, 55, 0.38);
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.1);
    color: rgba(245, 245, 220, 0.88);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.25;
    padding: 0.48rem 0.8rem;
    white-space: nowrap;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.oracle-chat-prompts button:hover {
    border-color: rgba(212, 175, 55, 0.7);
    background: rgba(212, 175, 55, 0.18);
    color: #fff7d6;
}

.oracle-chat-prompts button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.oracle-chat-input {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    border-top: 1px solid rgba(245, 245, 220, 0.1);
    background: rgba(6, 8, 15, 0.72);
}

.oracle-chat-input textarea {
    min-height: 2.75rem;
    max-height: 7rem;
    resize: vertical;
    border: 1px solid rgba(245, 245, 220, 0.18);
    border-radius: 0.85rem;
    background: rgba(5, 8, 18, 0.84);
    color: var(--parchment);
    padding: 0.75rem 0.85rem;
    line-height: 1.55;
    outline: none;
}

.oracle-chat-input textarea:focus {
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.12);
}

.oracle-chat-input button,
.oracle-chat-login a {
    align-self: end;
    min-height: 2.75rem;
    border: 1px solid rgba(212, 175, 55, 0.64);
    border-radius: 0.85rem;
    background: var(--oracle-gold);
    color: #151520;
    font-weight: 700;
    padding: 0 1rem;
}

.oracle-chat-input button:disabled,
.oracle-chat-input textarea:disabled {
    cursor: not-allowed;
    opacity: 0.52;
}

.oracle-chat-footnote,
.oracle-chat-login {
    margin: 0;
    padding: 0 1rem 1rem;
    color: rgba(245, 245, 220, 0.52);
    font-size: 0.78rem;
    line-height: 1.6;
}

.oracle-chat-login {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.oracle-chat-login a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.theme-major { border-color: rgba(250, 204, 21, 0.36); }
.theme-wands { border-color: rgba(248, 113, 113, 0.42); }
.theme-cups { border-color: rgba(45, 212, 191, 0.42); }
.theme-swords { border-color: rgba(147, 197, 253, 0.42); }
.theme-pentacles { border-color: rgba(74, 222, 128, 0.42); }

.symbol-hotspot {
    border-color: rgba(212, 175, 55, 0.2);
    background: rgba(245, 245, 220, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.symbol-hotspot:hover {
    border-color: var(--accent);
    box-shadow: 0 0 24px var(--accent-soft);
    transform: translateY(-1px);
}

.modal-tab { transition: color 0.2s ease, border-color 0.2s ease; }
.section-bg { background-size: cover; background-position: center; position: relative; z-index: 0; }
.section-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(26, 27, 38, 0.83);
    border-radius: 1rem;
    z-index: -1;
}

@media (max-width: 1023px) {
    .app-shell { display: block; }
    .sidebar { display: none; }
    .app-shell.sidebar-collapsed .sidebar { display: none; }
    .page-main {
        width: 100vw;
        max-width: 100vw;
        overflow: hidden;
        padding: 0.75rem max(0.75rem, env(safe-area-inset-right)) 0.75rem max(0.75rem, env(safe-area-inset-left));
    }
    .topbar {
        width: 100%;
        max-width: 100%;
    }
    .topbar { position: sticky; }
    .topbar #menu-toggle {
        position: fixed;
        right: max(1rem, env(safe-area-inset-right));
        left: auto;
        top: max(1rem, env(safe-area-inset-top));
        z-index: 44;
    }
    .topbar .display-serif {
        display: inline-block;
        max-width: calc(100% - 5.75rem);
    }
    .home-topbar-row {
        display: block;
        padding-right: 5.75rem;
    }
    .home-reading-stats {
        width: 100%;
        margin-top: 0.75rem;
    }
    #reading-stats-by-spread {
        gap: 0.45rem;
    }
    .stats-chip {
        flex: 1 1 min(8rem, calc(50% - 0.45rem));
        width: auto;
        min-height: 2.45rem;
        padding: 0.44rem 0.58rem;
        font-size: 0.78rem;
    }
    .home-topbar-actions {
        margin-left: 0;
    }
}

@media (max-width: 640px) {
    body, .app-shell, .page-main, main, .workspace-hero, .workspace-hero > div, #reading-section {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }
    .workspace-hero * { min-width: 0; }
    main p, main li, main span, main button, main input, main textarea,
    #auth-panel p, #reading-section p, .spread-card span {
        overflow-wrap: anywhere;
        word-break: break-all;
    }
    .workspace-hero { min-height: auto; padding: 1.25rem; }
    .workspace-hero,
    .global-reading-stats,
    #reading-section {
        width: 100%;
        max-width: 100%;
    }
    .workspace-hero #reading-section {
        width: 100%;
        max-width: 100%;
    }
    .workspace-hero h2 { font-size: 2rem; line-height: 1.16; }
    .spreads-hero h2 {
        font-size: 2rem;
        line-height: 1.18;
        word-break: break-all;
    }
    .spreads-page h3,
    .spreads-page h4 {
        word-break: break-all;
    }
    .spread-teaching-visual {
        padding: 0.75rem;
    }
    .spread-diagram {
        min-height: 12.5rem;
        gap: 0.6rem;
    }
    .spread-card { min-height: 10rem; }
    .reading-profile-panel {
        grid-template-columns: 1fr;
    }
    .reading-profile-link,
    .reading-daily-card,
    .reading-email-login {
        grid-template-columns: minmax(0, 1fr);
    }
    .reading-profile-link {
        text-align: center;
        justify-items: center;
    }
    .reading-daily-image-wrap {
        width: min(8rem, 42vw);
        justify-self: center;
    }
    .reading-daily-copy {
        text-align: center;
    }
    .cut-pile { width: min(100%, 6.6rem); }
    .choice-layout { gap: 1rem; }
    .choice-slot { width: min(100%, 10.5rem); }
    .result-analysis-card-inner {
        grid-template-columns: minmax(0, 1fr) 4.5rem;
        gap: 0.75rem;
    }
    .result-analysis-thumb { width: 4.5rem; }
    .result-share-actions {
        grid-template-columns: 1fr;
    }
    .floating-oracle-link {
        left: calc(100vw - 4.35rem);
        right: auto;
        width: 3.55rem;
        height: 3.55rem;
        min-height: 3.55rem;
        border-color: rgba(212, 175, 55, 0.72);
        background: rgba(12, 15, 26, 0.96);
        padding: 0.34rem;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.48), 0 0 0 2px rgba(212, 175, 55, 0.18), 0 0 30px rgba(212, 175, 55, 0.24);
    }
    .floating-oracle-link img {
        width: 100%;
        height: 100%;
    }
    .oracle-chat-panel {
        left: 0.75rem;
        right: 0.75rem;
        bottom: 0;
        width: auto;
        max-height: min(88vh, 42rem);
        border-bottom-right-radius: 0;
        border-bottom-left-radius: 0;
    }
    .oracle-chat-body {
        min-height: 14rem;
    }
    .oracle-chat-input {
        grid-template-columns: 1fr;
    }
    .oracle-chat-input button {
        width: 100%;
    }
    .section-bg::before { border-radius: 0.875rem; }
}

@keyframes tarotReveal {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shufflePulse {
    from { transform: translateX(-7px) translateY(0) rotate(-6deg); box-shadow: 0 0 0 rgba(250, 204, 21, 0); }
    to { transform: translateX(7px) translateY(-8px) rotate(6deg); box-shadow: 0 16px 40px rgba(250, 204, 21, 0.18); }
}

@keyframes shuffleGlow {
    from { opacity: 0.35; transform: scale(1); }
    to { opacity: 0.85; transform: scale(1.04); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
