/* ===========================================================
   ROOT COLOR SYSTEM + DESIGN TOKENS
   =========================================================== */

   :root {
    /* Colors */
    --bg: #ffffff;
    --fg: #0f172a;
    --muted: #475569;
    --accent: #2563eb;
    --border: #cbd5e1;
    --border-light: #e2e8f0;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 40px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);

    /* Typography */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Verse specific */
    --verse-pad: 18px;
    --verse-max: 720px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0b1020;
        --fg: #e5e7eb;
        --muted: #94a3b8;
        --accent: #60a5fa;
        --border: #334155;
        --border-light: #475569;

        /* Darker shadows for dark mode */
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);
        --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.6);
    }
}

@media (max-width: 600px) {
  :root {
    --verse-pad: 16px;
  }
}

/* ===========================================================
   MOOD COLOR ACCENTS
   =========================================================== */
/* Light mode - EMOTIONS (adjectives) */
.mood-afraid:hover { color: #7c3aed; }          /* purple – fear */
.mood-angry:hover { color: #dc2626; }           /* red – intensity */
.mood-anxious:hover { color: #fb923c; }         /* orange – alertness */
.mood-ashamed:hover { color: #64748b; }         /* slate – heaviness */
.mood-awestruck:hover { color: #fbbf24; }       /* gold – wonder */
.mood-bored:hover { color: #a1a1aa; }           /* zinc – monotony */
.mood-confused:hover { color: #94a3b8; }        /* slate – uncertainty */
.mood-content:hover { color: #22c55e; }         /* green – satisfaction */
.mood-disappointed:hover { color: #71717a; }    /* gray – letdown */
.mood-doubtful:hover { color: #818cf8; }        /* indigo – uncertainty */
.mood-empathetic:hover { color: #fb923c; }      /* orange – warmth */
.mood-grateful:hover { color: #22c55e; }        /* green – renewal */
.mood-guilty:hover { color: #64748b; }          /* gray – weight */
.mood-humble:hover { color: #9ca3af; }          /* gray – modesty */
.mood-hurt:hover { color: #fb7185; }            /* rose – pain */
.mood-insecure:hover { color: #a78bfa; }        /* purple – doubt */
.mood-jealous:hover { color: #a855f7; }         /* violet – envy */
.mood-joyful:hover { color: #facc15; }          /* yellow – optimism */
.mood-lonely:hover { color: #94a3b8; }          /* grayish blue – isolation */
.mood-longing:hover { color: #c084fc; }         /* purple – yearning */
.mood-loving:hover { color: #ef4444; }          /* red – warmth */
.mood-numb:hover { color: #9ca3af; }            /* gray – emptiness */
.mood-proud:hover { color: #a855f7; }           /* violet – confidence */
.mood-sad:hover { color: #38bdf8; }             /* blue – reflection */
.mood-vulnerable:hover { color: #f0abfc; }      /* fuchsia – openness */
.mood-weary:hover { color: #78716c; }           /* stone – fatigue */

/* Light mode - STATES/VIRTUES (nouns) */
.mood-comfort:hover { color: #10b981; }         /* teal – soothing calm */
.mood-compassion:hover { color: #f472b6; }      /* pink – empathy */
.mood-courage:hover { color: #10b981; }         /* teal – strength */
.mood-despair:hover { color: #4b5563; }         /* gray – hopelessness */
.mood-faith:hover { color: #6366f1; }           /* indigo – spirituality */
.mood-forgiveness:hover { color: #93c5fd; }     /* soft blue – release */
.mood-grief:hover { color: #64748b; }           /* slate – depth */
.mood-hate:hover { color: #7c2d12; }            /* dark red – intensity */
.mood-hope:hover { color: #3b82f6; }            /* blue – hope */
.mood-mercy:hover { color: #a3e635; }           /* lime – compassion */
.mood-obedience:hover { color: #14b8a6; }       /* teal – discipline */
.mood-patience:hover { color: #fde047; }        /* yellow – steadiness */
.mood-peace:hover { color: #60a5fa; }           /* blue – calm */
.mood-relief:hover { color: #34d399; }          /* emerald – ease */
.mood-repentance:hover { color: #a78bfa; }      /* violet – renewal */
.mood-reverence:hover { color: #8b5cf6; }       /* violet – honor */
.mood-strength:hover { color: #16a34a; }        /* green – resilience */
.mood-trust:hover { color: #0ea5e9; }           /* sky – openness */
.mood-wisdom:hover { color: #6366f1; }          /* indigo – discernment */
.mood-wonder:hover { color: #fbbf24; }          /* gold – curiosity */

/* Compact click feedback */
.chips button:active {
  transform: scale(0.97);
  transition: transform 0.1s;
}

/* Dark mode hover versions */
@media (prefers-color-scheme: dark) {
  /* EMOTIONS (adjectives) */
  .mood-afraid:hover { color: #c4b5fd; }
  .mood-angry:hover { color: #f87171; }
  .mood-anxious:hover { color: #fdba74; }
  .mood-ashamed:hover { color: #94a3b8; }
  .mood-awestruck:hover { color: #fcd34d; }
  .mood-bored:hover { color: #d4d4d8; }
  .mood-confused:hover { color: #cbd5e1; }
  .mood-content:hover { color: #86efac; }
  .mood-disappointed:hover { color: #a1a1aa; }
  .mood-doubtful:hover { color: #a5b4fc; }
  .mood-empathetic:hover { color: #fdba74; }
  .mood-grateful:hover { color: #86efac; }
  .mood-guilty:hover { color: #94a3b8; }
  .mood-humble:hover { color: #d1d5db; }
  .mood-hurt:hover { color: #fda4af; }
  .mood-insecure:hover { color: #c4b5fd; }
  .mood-jealous:hover { color: #c084fc; }
  .mood-joyful:hover { color: #fde68a; }
  .mood-lonely:hover { color: #cbd5e1; }
  .mood-longing:hover { color: #d8b4fe; }
  .mood-loving:hover { color: #fca5a5; }
  .mood-numb:hover { color: #d1d5db; }
  .mood-proud:hover { color: #c084fc; }
  .mood-sad:hover { color: #38bdf8; }
  .mood-vulnerable:hover { color: #f5d0fe; }
  .mood-weary:hover { color: #d6d3d1; }

  /* STATES/VIRTUES (nouns) */
  .mood-comfort:hover { color: #6ee7b7; }
  .mood-compassion:hover { color: #f9a8d4; }
  .mood-courage:hover { color: #6ee7b7; }
  .mood-despair:hover { color: #e2e8f0; }
  .mood-faith:hover { color: #a5b4fc; }
  .mood-forgiveness:hover { color: #bfdbfe; }
  .mood-grief:hover { color: #94a3b8; }
  .mood-hate:hover { color: #fca5a5; }
  .mood-hope:hover { color: #60a5fa; }
  .mood-mercy:hover { color: #bef264; }
  .mood-obedience:hover { color: #5eead4; }
  .mood-patience:hover { color: #fef08a; }
  .mood-peace:hover { color: #93c5fd; }
  .mood-relief:hover { color: #6ee7b7; }
  .mood-repentance:hover { color: #c4b5fd; }
  .mood-reverence:hover { color: #a78bfa; }
  .mood-strength:hover { color: #4ade80; }
  .mood-trust:hover { color: #7dd3fc; }
  .mood-wisdom:hover { color: #a5b4fc; }
  .mood-wonder:hover { color: #fcd34d; }
}

/* ===========================================================
   BASE STRUCTURE
   =========================================================== */
* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Disable iOS Safari tap highlight */
}

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    font-family: 'Lora', Georgia, serif;
    background: var(--bg);
    color: var(--fg);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Ensure fixed positioning works correctly */
    position: relative;
}

.wrap {
    display: grid;
    grid-template-rows: auto 1fr auto;
    /* Explicit column prevents the implicit auto column from expanding
       to fit content (min-content), which caused <main> to be wider than
       the viewport when deep children had large intrinsic widths */
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
}


/* ===========================================================
   HEADER
   =========================================================== */
header {
    position: relative;
    text-align: center;
    padding: 40px 0 20px;  /* more breathing room top and bottom */    
    transition: opacity 0.25s ease, transform 0.25s ease;
}

header h1 {
    margin: 0;
    font-family: 'Lora', Georgia, serif;
    font-size: 28px;
    font-weight: 400;
    text-transform: lowercase;
    cursor: pointer;
    letter-spacing: 0;
}

header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: var(--font-weight-normal);
    line-height: 1.5;
}

/* ===== Ensure proper stacking and header transitions ===== */
header.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
}

/* ===========================================================
   INPUT & SEARCH ROW
   =========================================================== */
.center {
    max-width: 840px;
    margin: 0 auto;
    padding: 10px 16px 24px;
}

.row {
    display: flex;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: visible;
    max-width: 600px;
    margin: 24px auto;
    background: var(--bg);
    position: relative; /* anchor for tooltip */
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

/* soft glow around the whole bar when active */
/* .row:focus-within {
    border: 1px solid;
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
} */

.row:focus-within {
    border: 1px solid var(--accent);
    border-radius: 12px;
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.3);
}

/* Give the search button matching rounded right corners */
.row>.btn {
    border-top-right-radius: 12px; /* match .row radius */
    border-bottom-right-radius: 12px;
}

/* input field */
.input {
    flex: 1;
    padding: 10px 12px;
    font-size: 16px;
    border: none;
    background: transparent;
    color: var(--fg);
}

.input:focus {
    outline: none;
}

.row>.input {
    border-top-left-radius: 11px;
    border-bottom-left-radius: 11px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    background: var(--accent);
    color: #fff;
    border: 0;
    font-weight: var(--font-weight-medium);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
}

.btn:hover {
    background: color-mix(in srgb, var(--accent) 85%, white);
    transform: scale(1.02);
}

.btn:active {
    transform: scale(0.98);
}

.btn:focus {
    outline: none;
}

.btn:focus-visible {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Tooltip */
.tip {
    position: absolute;
    left: 50%;
    bottom: 100%; /* above the bar */
    transform: translate(-50%, -8px);
    background: var(--bg);
    color: var(--muted);
    padding: 6px 8px;
    font-size: 13px;
    line-height: 1.4;
    border-radius: 6px;
    white-space: nowrap;  /* keep it one line on wide screens */
    display: none;
    z-index: 6; /* above dropdown & row */
}

.tip.show {
    display: block;
}

/* Mobile refinement — allow wrapping, keep compact height */
@media (max-width: 480px) {
    .tip {
        position: absolute;
        left: 50%;
        bottom: 100%; /* above the bar */
        background: var(--bg);
        color: var(--muted);
        font-size: 11px;
        border-radius: 6px;
        white-space: normal;
        display: none;
        z-index: 6;
    }
}

/* Ultra-small devices (iPhone SE / small Androids) */
@media (max-width: 360px) {
    .tip {
        max-width: 68vw;
        font-size: 12.5px; /* smaller text = shorter height */
        padding: 5px 8px;
    }
}

/* Suggest dropdown */
.suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 6px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    display: none;
    z-index: 5;
    max-height: 40vh;
    overflow: auto;
}

.suggest button {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.suggest button:hover,
.suggest button.highlighted {
    background: rgba(37, 99, 235, 0.08);
}

/* Improve readability of dropdown in dark mode */
@media (prefers-color-scheme: dark) {
    .suggest {
        background: #1e293b;
        border-color: #475569;
    }

    .suggest button {
        color: #e2e8f0;
    }

    .suggest button:hover,
    .suggest button.highlighted {
        background: rgba(96, 165, 250, 0.18);
    }

    .ghost-btn:hover {
        background: rgba(96, 165, 250, 0.12); /* lighter hover in dark mode */
        color: var(--accent);
        opacity: 0.95;
    }

    .ghost-btn:active {
        background: rgba(255, 255, 255, 0.08);
    }

    .input {
        background: #0f172a;
        border-color: #334155;
    }

    .input:focus {
        box-shadow: 0 0 14px rgba(96, 165, 250, 0.4);
    }
}

/* ===========================================================
   Translation dropdown
   =========================================================== */
/* The #txSelect element uses class .tx-select-hidden (overlay on .tx-meta-btn).
   ghost-btn rules for this element were removed — they never applied. */

/* Inline translation label in the verse meta area */
.tx-meta-btn {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: none;
    border: none;
    color: var(--muted);
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    font-weight: inherit;
    padding: 2px 4px;
    border-radius: 4px;
    position: relative;
    vertical-align: baseline;
    transition: color 0.15s ease, background 0.15s ease;
    line-height: inherit;
}

.tx-meta-btn:hover {
    color: var(--accent);
    background: rgba(37, 99, 235, 0.07);
}

.tx-meta-btn svg {
    opacity: 0.6;
    flex-shrink: 0;
}

/* Desktop: slightly larger hit area */
@media (min-width: 601px) {
    .tx-meta-btn {
        padding: 3px 6px;
        font-size: 13px;
    }
    .tx-meta-btn:hover {
        background: rgba(37, 99, 235, 0.06);
    }
}

#refreshBtn:focus {
    background: transparent;
    color: var(--fg);
    outline: none;
}

/* ===========================================================
   CHIPS
   =========================================================== */
.chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    text-align: center;
}

.chips button {
    background: rgba(37, 99, 235, 0.05);
    border: 2px solid transparent;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--fg);
    font-family: system-ui, -apple-system, sans-serif;
    font-weight: var(--font-weight-bold);
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: 0.3px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 36px;
}

.chips button:hover {
    outline: none;
    transform: scale(1.05);
    background: rgba(37, 99, 235, 0.1);
}

.chips button:focus {
    outline: none;
}

.chips button:focus-visible {
    box-shadow: 0 0 0 3px var(--accent);
    border-radius: var(--radius-md);
}

.chips button.selected {
    transform: scale(1.05);
    border-color: currentColor;
    background: rgba(37, 99, 235, 0.12);
    font-weight: var(--font-weight-extrabold);
}

@media (prefers-color-scheme: dark) {
    .chips button {
        background: rgba(96, 165, 250, 0.08);
    }

    .chips button:hover {
        background: rgba(96, 165, 250, 0.15);
    }

    .chips button.selected {
        background: rgba(96, 165, 250, 0.2);
    }
}

.section {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
}

.section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Home screen appears instantly — no fade-in delay */
#s-home.section, #s-home.section.active {
    transition: none;
    transform: none;
}

/* Utility: hides a toolbar tab without inline style */
.toolbar-tab-hidden {
    display: none !important;
}

.verse-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: var(--verse-max);
    margin: 12px auto 0;
    padding: 0 var(--verse-pad);
    box-sizing: border-box;
}

.ghost-btn {
    background: transparent;
    color: var(--fg);
    font-family: inherit;
    font-weight: var(--font-weight-semibold);
    font-size: 15px;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.ghost-btn svg {
    flex-shrink: 0;
    opacity: 0.7;
    vertical-align: middle;
}

.ghost-btn:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent);
}

.ghost-btn:hover svg {
    opacity: 1;
}

.ghost-btn:active {
    background: rgba(0, 0, 0, 0.07);
}

.ghost-btn:focus {
    outline: none;
}

/* Focus ring only for keyboard/mouse — suppressed on touch to prevent lingering blue ring */
@media (pointer: fine) {
    .ghost-btn:focus-visible {
        box-shadow: 0 0 0 2px var(--accent);
        outline: none;
    }
}

/* Fine-tune spacing for "Change mood" button only */
/* #changeBtn.ghost-btn {
    padding-left: 4px;
} */

/* Left-align the "Clear all saved" button inside the drawer */
#clearSaved.ghost-btn {
    display: block; /* lets margin and text-align apply */
    text-align: left; /* text flush left */
    padding-left: 8px;
    width: fit-content; /* keeps button only as wide as its text */
}

/* Desktop bottom controls styling */
/* .verse-toolbar.bottom-controls {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
} */

/* mobile-friendly size */
@media (max-width: 600px) {
    #s-verse.section.active {
        justify-content: flex-start;
        padding-top: 40px;
        padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
        min-height: calc(100vh - 40px);
    }

    .chips button {
        min-height: 44px;
        padding: 10px var(--spacing-md);
    }

    .verse-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 16px;
    }

    .verse-toolbar>* {
        width: 100%;
        text-align: center;
    }

    .verse-toolbar>.btn-action {
        text-align: center;
    }

    /* Mobile: Icon above text layout */
    .ghost-btn {
        width: 100%;
        font-size: 13px;
        padding: 12px 8px;
        flex-direction: column;
        gap: 4px;
        justify-content: center;
    }

    .ghost-btn svg {
        width: 20px;
        height: 20px;
        opacity: 0.8;
    }

    /* No hover highlight on touch — it lingers and looks wrong */
    .ghost-btn:hover {
        background: transparent;
        color: var(--fg);
    }

    .verse-toolbar.bottom-controls {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: 0 0 max(env(safe-area-inset-bottom, 0px), 12px);
        gap: 0;
        border-top: none;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        z-index: 20;
        background: var(--bg);
    }

    @supports (backdrop-filter: blur(10px)) {
        .verse-toolbar.bottom-controls {
            background: color-mix(in srgb, var(--bg) 85%, transparent);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
        }
    }

    /* Equal-width tabs */
    .verse-toolbar.bottom-controls .btn-action {
        flex: 1;
        min-width: 0;
        width: auto;
    }

    /* Translation moved to inline meta label on mobile — hide toolbar button */
    .verse-toolbar.bottom-controls #txBtn {
        display: none;
    }

    #txSelect.ghost-btn {
        justify-content: center;
        /* margin: 0 auto; */
        text-align: center;
    }
}

/* desktop friendly */
@media (min-width: 601px) {
    .verse-toolbar.bottom-controls {
        justify-content: space-between;
    }

    /* Remove left padding so Mood icon aligns with moodLabel above it */
    .verse-toolbar.bottom-controls #changeBtn {
        padding-left: 0;
    }

    /* Translation cycling is handled by the inline #txMetaBtn on desktop */
    #txBtn {
        display: none;
    }
}

.meta {
    color: var(--muted);
    font-size: 13px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.meta-left {
    flex: 1;
    min-width: 0;
}

/* Shown only when verse is served from the bundled offline fallback */
.offline-badge {
    color: var(--muted);
    font-size: 12px;
    font-style: italic;
}

.meta a {
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

/* Mobile: Better spacing for verse reference */
@media (max-width: 600px) {
    .meta {
        font-size: 14px;
        margin-top: 16px;
        line-height: 1.6;
    }
}

#s-verse.section.active {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: calc(100vh - 60px);
    padding: 80px 20px 40px;
    overflow: hidden;
    /* Reset transform to none (not translateY(0)) so fixed children
       are not trapped in a new containing block */
    transform: none;
}

/* Desktop: slightly more breathing room */
@media (min-width: 768px) {
    #s-verse.section.active {
        padding-top: 100px;
        padding-bottom: 60px;
    }
}

.verse-wrap {
    position: relative;
    max-width: var(--verse-max);
    width: 100%;
    margin: 0 auto 12px;
    box-sizing: border-box;
}

.quote {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px var(--verse-pad) 16px;
    margin: 12px 0;
    position: relative;
    z-index: 1;
}

.verse-text {
    font-family: 'Lora', Georgia, serif;
    font-size: 18px;
    line-height: 1.7;
    margin: 8px 0;
    color: var(--fg);
    overflow-wrap: break-word;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
}

/* Mobile: Larger, more readable font */
@media (max-width: 600px) {
    .verse-text {
        font-family: 'Lora', Georgia, serif;
        font-size: 18px;
        line-height: 1.8;
        margin: 12px 0;
    }
}

.verse-text.fade {
    opacity: 0;
    transform: translateY(4px);
}

.verse-text:empty::before {
    content: "";
    display: block;
    height: 1em;
}

/* ===========================================================
   HEART/FAB + SETTINGS FAB
   =========================================================== */
.fab-settings {
    position: fixed !important;
    top: 16px !important;
    right: 16px;
    background: transparent;
    border: none;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 15;
    cursor: pointer;
}

.fab-settings svg {
    stroke: var(--accent);
    fill: none;
    width: 22px;
    height: 22px;
}

/* Active indicator for saved toolbar button */
#savedToggle.active {
    color: var(--accent);
}

/* Read in context — icon button next to heart */
.meta-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
    /* Align the save heart above the "Saved" tab in the bottom toolbar.
       The toolbar buttons span full width while the quote has padding,
       so we compensate with a negative right margin. */
    margin-right: -20px;
}

.context-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    min-width: 44px;
    min-height: 44px;
    transition: color 0.2s ease;
}

.context-btn svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.5;
}

.context-btn:hover {
    color: var(--accent);
}

/* ── Tooltip (desktop hover only) ── */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--fg);
    color: var(--bg);
    font-family: var(--font-sans, inherit);
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 30;
}

/* Small caret under tooltip */
[data-tooltip]::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 1px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--fg);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 30;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before {
    opacity: 1;
}

/* Never show tooltips on touch devices */
@media (hover: none) {
    [data-tooltip]::after,
    [data-tooltip]::before {
        display: none;
    }
}

/* Account tier row in signed-in drawer section */
.account-tier-row {
    margin-bottom: 10px;
}

/* iOS PWA install banner */
.pwa-banner {
    position: fixed;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    left: 16px;
    right: 16px;
    background: var(--surface, #ffffff);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 25;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
    color: var(--fg);
}

@media (prefers-color-scheme: dark) {
    .pwa-banner {
        background: #1c2333;
        border-color: rgba(255, 255, 255, 0.08);
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
    }
}

.pwa-icon {
    font-size: 20px;
    flex-shrink: 0;
    opacity: 0.8;
}

.pwa-banner-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.pwa-banner-body strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--fg);
}

.pwa-banner-body span {
    font-size: 12px;
    color: var(--muted);
}

.pwa-dismiss {
    background: transparent;
    border: none;
    color: var(--muted);
    font-size: 14px;
    cursor: pointer;
    padding: 4px 6px;
    opacity: 0.7;
    flex-shrink: 0;
    line-height: 1;
    border-radius: 4px;
}

.pwa-dismiss:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
    .pwa-dismiss:hover {
        background: rgba(255, 255, 255, 0.08);
    }
}

/* this is the heart on the verse — inline after translation name */
.heart {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    padding: 8px;
    margin-left: 0;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.heart svg {
    stroke: currentColor;
    fill: none;
    width: 26px;
    height: 26px;
    stroke-width: 1.5;
    transition: fill 0.2s ease, stroke 0.2s ease;
}

.heart:hover {
    transform: scale(1.1);
}

.heart.active svg {
    fill: var(--accent);
}

.heart.active {
    color: var(--accent);
}


/* ===========================================================
   LAYOUT & DRAWER
   =========================================================== */
/* Drawer is inert unless explicitly opened */
.drawer {
    position: fixed;
    inset: auto 0 0 0;
    background: var(--bg);
    border-radius: 12px 12px 0 0;
    translate: 0 105%;
    transition: translate 0.36s cubic-bezier(0.32, 0.72, 0, 1);
    max-height: 70dvh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px 16px calc(1rem + env(safe-area-inset-bottom, 0px));
    z-index: 10;
}

.drawer.open {
    translate: 0 0;
}

/* this is the heading */
#savedDrawer h3 {
    margin-top: 0;
    margin-bottom: 10px;
    text-align: left;
    padding-left: 8px;
    font-size: 1rem;
    line-height: 1.4;
}

.saved-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.saved-item:hover {
    background: rgba(37, 99, 235, 0.03);
}

.saved-item:active {
    transform: scale(0.99);
}

#savedList.empty,
.empty {
    padding-left: 8px; /* moves it right */
    text-align: left; /* keeps it left-aligned within the padding */
}

/* saved summary  */
.saved-summary {
    margin-top: 6px;
    font-size: 12px;
    font-weight: normal;
    color: var(--muted);
    line-height: 1.5;
}

/* Free tier limit warnings */
.limit-warning {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}

.limit-warning a {
    color: inherit;
    text-decoration: underline;
    font-weight: 700;
}

.limit-approaching {
    background: rgba(251, 146, 60, 0.1);
    color: #ea580c;
    border: 1px solid rgba(251, 146, 60, 0.3);
}

.limit-reached {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
    border: 1px solid rgba(220, 38, 38, 0.3);
}

@media (prefers-color-scheme: dark) {
    .limit-approaching {
        background: rgba(251, 146, 60, 0.15);
        color: #fb923c;
        border-color: rgba(251, 146, 60, 0.4);
    }

    .limit-reached {
        background: rgba(239, 68, 68, 0.15);
        color: #ef4444;
        border-color: rgba(239, 68, 68, 0.4);
    }
}

.remove-saved {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
    z-index: 1;
}

.remove-saved:hover {
    background: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.scrim {
    position: fixed;
    inset: 0;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 9;
}

.scrim.show {
    background: rgba(0, 0, 0, 0.18);
    opacity: 1;
    pointer-events: auto;
}

dialog.ctx {
    width: min(840px, 92vw);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px;
    background: var(--bg);
    color: var(--fg);
    z-index: 20;
}

.ctx h3 {
    margin: 0 0 8px;
}

.ctx-header {
    display: flex;
    align-items: baseline;
    gap: 4px;
    margin-bottom: 8px;
    padding: 0 14px;
}

.ctx-body {
    max-height: 65vh; /* slightly taller for easier reading */
    overflow-y: auto;
    line-height: 1.7; /* slightly more relaxed line spacing */
    font-size: 15.5px; /* readable but not large */
    color: var(--fg);
    padding: 0 14px 16px; /* consistent side + bottom spacing */
    margin: 0 auto;    /* keeps text nicely centered */
    text-align: left;
    scroll-behavior: smooth; /* smooth scrolling in the modal */
}

.ctx-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
    padding: 0 14px 8px;
}

.ctx .close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: 0;
    border: 0;
    color: var(--muted);
    font-size: 20px;
    cursor: pointer;
}

.ctx .bible {
    background: transparent;
    border: 0;
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.ctx .bible:hover {
    opacity: 1;
}

/* ===========================================================
   SETTINGS DRAWER
   =========================================================== */
.settings-drawer {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(320px, 88vw);
    background: var(--bg);
    border-left: 1px solid var(--border);
    padding: 28px 24px calc(2rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 20;
    transform: translateX(100%);
    transition: transform 0.36s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, sans-serif;
}

.settings-drawer.open {
    transform: translateX(0);
}

/* ── Settings drawer ── */

/* Header */
.settings-drawer h2 {
    margin: 0 0 4px 0;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.2px;
    padding-right: 40px;
}

.drawer-tagline {
    font-size: 14px;
    color: var(--muted);
    margin: 4px 0 24px 0;
    line-height: 1.5;
}

/* Close button */
.drawer-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--muted);
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.drawer-close:hover {
    background: var(--border-light);
    border-color: var(--border);
    color: var(--fg);
}
.drawer-close:active { transform: scale(0.93); }
@media (prefers-color-scheme: dark) {
    .drawer-close:hover { background: rgba(255,255,255,0.08); }
}

/* Account section */
.settings-section {
    margin-bottom: 28px;
}
.settings-heading {
    font-size: 11px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0 0 12px 0;
}
.settings-text {
    font-size: 14px;
    color: var(--fg);
    margin: 0 0 2px;
    font-weight: 500;
}
.account-stat-line {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}
.account-prompt {
    font-size: 14px;
    color: var(--muted);
    margin: 0 0 14px;
    line-height: 1.55;
}
.account-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.account-row-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.account-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--accent) 12%, var(--bg));
    border: 1.5px solid color-mix(in srgb, var(--accent) 25%, transparent);
    color: var(--accent);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: system-ui, -apple-system, sans-serif;
}
.account-meta { min-width: 0; }
.account-email {
    font-size: 14px;
    font-weight: 500;
    color: var(--fg);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.account-stat {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}

/* Shared drawer section (flush, no box) */
.drawer-section {
    margin-bottom: 28px;
}

/* Section heading with inline badge */
.drawer-section-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
}
.drawer-section-heading .settings-heading {
    margin-bottom: 0;
}

/* Upgrade feature list */
.upgrade-features {
    list-style: none;
    padding: 0;
    margin: 8px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.upgrade-features li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    line-height: 1.4;
}
.upgrade-features li::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0.5;
    flex-shrink: 0;
}
.upgrade-price {
    font-size: 12px;
    color: var(--muted);
    opacity: 0.7;
    margin: 0 0 14px;
}
.btn-upgrade {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
    min-height: 36px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-upgrade:hover { opacity: 0.88; }
.tier-badge {
    margin-left: auto;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    opacity: 0.7;
}
.tier-badge.pro {
    color: #6366f1;
    opacity: 1;
}
.tier-badge.paused {
    color: #d97706;
    opacity: 1;
}
@media (prefers-color-scheme: dark) {
    .tier-badge.paused { color: #fbbf24; }
}

/* Pro active strip */
.pro-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    margin-bottom: 8px;
    background: color-mix(in srgb, #6366f1 6%, var(--bg));
}
.pro-check-icon { color: #6366f1; flex-shrink: 0; }
.pro-card-label { font-size: 13px; color: var(--fg); font-weight: 500; }
.pro-card-subtext {
    font-size: 11px;
    color: var(--muted);
    margin: 0 0 16px;
    padding-left: 2px;
}

/* Paused subscription strip */
.paused-card {
    padding: 10px 14px;
    border: 1px solid color-mix(in srgb, #d97706 30%, transparent);
    border-radius: 12px;
    margin-bottom: 16px;
    background: color-mix(in srgb, #f59e0b 6%, var(--bg));
}
.paused-card-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #b45309;
    margin-bottom: 4px;
}
.paused-card-body {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}
.paused-card-body a { color: #b45309; text-decoration: underline; }
@media (prefers-color-scheme: dark) {
    .paused-card-label,
    .paused-card-body a { color: #fbbf24; }
}

/* ── Menu link rows ── */
.menu-links {
    margin-bottom: 4px;
}
.menu-row {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 44px;
    padding: 0 2px;
    text-decoration: none;
    color: var(--fg);
    border-radius: 8px;
    transition: background 0.15s ease;
}
.menu-row:hover { background: color-mix(in srgb, var(--accent) 5%, var(--bg)); }
.menu-row-icon { color: var(--muted); flex-shrink: 0; }
.menu-row-label { flex: 1; font-size: 14px; font-weight: 500; }
.menu-row-ext { color: var(--muted); opacity: 0.4; flex-shrink: 0; }

/* Feedback row — accent emphasis */
.menu-row-feedback .menu-row-label { color: var(--accent); font-weight: 600; }
.menu-row-feedback .menu-row-icon { color: var(--accent); opacity: 0.85; }

/* Drawer Sign In button — same size as Upgrade to Pro */
.signin-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    color: var(--muted);
    font-size: 12px;
}
.signin-divider::before,
.signin-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.email-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg);
    color: var(--fg);
    margin: 8px 0;
    box-sizing: border-box;
    font-family: inherit;
}
.email-input:focus {
    outline: none;
    border-color: var(--accent);
}
.magic-sent-msg {
    font-size: 13px;
    color: var(--muted);
    margin: 4px 0 0;
}
.signin-note {
    font-size: 12px;
    color: var(--muted);
    margin: 6px 0 0;
}

.settings-drawer .btn-primary--slim,
.settings-drawer .btn-secondary {
    padding: 8px 22px;
    font-size: 14px;
    font-weight: 600;
    min-height: 36px;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
}


/* ── Modal version line ── */
.modal-version {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 6px;
    font-size: 0.72rem;
    color: var(--muted);
    padding: 32px 0 4px;
    margin-top: auto;
    opacity: 0.6;
    line-height: 1.8;
    text-align: center;
}
.modal-version-sep {
    opacity: 0.5;
}
.modal-version-link {
    color: var(--muted);
    text-decoration: none;
}
.modal-version-link:hover {
    color: var(--accent);
    opacity: 1;
}
.modal-legal {
    display: flex;
    align-items: center;
    gap: 4px 6px;
    width: 100%;
    justify-content: center;
}

/* Mobile-first: Buttons with better touch targets */
.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 12px;
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.05);
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* Desktop: Smaller buttons */
@media (min-width: 600px) {
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 15px;
        min-height: auto;
    }

}

@media (prefers-color-scheme: dark) {
    .btn-secondary:hover {
        background: rgba(255, 255, 255, 0.05);
    }

    .saved-item:hover {
        background: rgba(96, 165, 250, 0.08);
    }

    .remove-saved:hover {
        background: rgba(239, 68, 68, 0.15);
        color: #ef4444;
    }
}

/* ========== */
.burst {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease-in, transform 2s ease-out;
    transform: scale(1);
    z-index: 3;
}

.burst.show {
    opacity: 1;
    transform: scale(1.15);
    /* tiny outward expansion */
}



.brand {
    color: var(--fg);
    font-weight: 800;
    text-decoration: none;
    opacity: 0.9;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.brand:hover {
    color: var(--accent);
    opacity: 1;
}

.brand:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

@media (prefers-color-scheme: dark) {
    .brand:hover {
        color: var(--accent);
    }
}

/* ===========================================================*/
/* Translation Button */
.tx-btn {
    position: relative;
}

.tx-select-hidden {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    cursor: pointer;
    /* iOS auto-zooms on inputs/selects with font-size < 16px */
    font-size: 16px;
}

#txLabel {
    pointer-events: none;
}


/* safari styling */
/* normalize Safari select dropdown */
select {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: none;
    font: inherit;
    color: inherit;
    /* background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke-width='2' stroke='%2394a3b8' fill='none' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); */
}

/* ===========================================================
   TOAST NOTIFICATION
   =========================================================== */
#toast {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom) + 24px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--fg);
    color: var(--bg);
    padding: 12px 20px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 9999;
    pointer-events: none;
}

#toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0px);
}

/* Toast variants */
#toast.toast-success {
    background: #10b981;
    color: white;
}

#toast.toast-error {
    background: #ef4444;
    color: white;
}

#toast.toast-info {
    background: var(--accent);
    color: white;
}

/* ===========================================================
   Top controls
   =========================================================== */
   /* Mood (x/x) group */
#moodGroup {
    display: flex;
    align-items: flex-start;
    gap: 4px; /* small space between mood and count */
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
 }
    
    #verseCounter {
        opacity: 0.85;
    }
    
    .verse-toolbar.top-controls {
       justify-content: space-between;
       margin: 8px auto 4px;
       padding: 0 var(--verse-pad);
       max-width: var(--verse-max);
   }

   /* Desktop only — keeps bottom toolbar in-flow with side padding */
   @media (min-width: 601px) {
       .verse-toolbar.bottom-controls {
           justify-content: space-between;
           align-items: stretch;
           gap: 12px;
           margin: 18px auto 0;
           padding: 0 var(--verse-pad);
           max-width: var(--verse-max);
       }
   }

/* ===========================================================
   LOADING SPINNER
   =========================================================== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(37, 99, 235, 0.1);
    border-top-color: var(--accent);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
    margin: var(--spacing-xl) auto;
}

@media (prefers-color-scheme: dark) {
    .loading-spinner {
        border-color: rgba(96, 165, 250, 0.15);
        border-top-color: var(--accent);
    }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl) 0;
    gap: var(--spacing-md);
}

.loading-text {
    color: var(--muted);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
}

