/* ==========================================================================
   Victoria's Not So Secret — Romantic Editorial Design System
   Warm Ivory Silk · Velvet Burgundy · Sea-Glass Venetian Teal
   ========================================================================== */

:root {
    /* Surfaces & Silk Canvas */
    --bg-canvas: #FAF6F1;
    --bg-canvas-warm: #F3EAE1;
    --bg-card: #FFFCF9;
    --bg-subtle: #F4EDE6;
    --bg-tile: #F5EFE9;
    --bg-glass: rgba(255, 252, 249, 0.88);
    --bg-overlay: rgba(34, 20, 24, 0.42);

    /* Editorial Inks */
    --ink-primary: #2B1C20;
    --ink-secondary: #6F5C61;
    --ink-muted: #9D8B90;
    --ink-on-dark: #FFFBF8;

    /* Borders & Hairlines */
    --border-hairline: rgba(74, 42, 48, 0.09);
    --border-medium: rgba(74, 42, 48, 0.16);

    /* Signature Semantic Cycle Palette */
    --period-heavy: #8B1A2F;
    --period-medium: #C6384B;
    --period-light: #DF6A77;
    --period-spotting: #EBB5BC;
    --period-predicted: #E7A1AA;

    --fertile-past: #186E7A;
    --fertile-active: #84B9C1;
    --fertile-deep: #247F8C;
    --today-frame: #186E7A;

    --follicular-arc: #E6D2C7;
    --luteal-arc: #D7B9B5;
    --pms-arc: #C39398;

    /* Tracking Category Indicator Pills (Clue-inspired clarity) */
    --dot-bleeding: #C6384B;
    --dot-pain: #D97642;
    --dot-mood: #4B74B8;
    --dot-wellness: #8C5E8A;

    /* Brand Accent */
    --accent: #8B1A2F;
    --accent-hover: #731325;
    --accent-soft: rgba(139, 26, 47, 0.09);
    --teal-soft: rgba(24, 110, 122, 0.10);

    /* Shadows */
    --shadow-card: 0 12px 32px -14px rgba(56, 26, 32, 0.09), 0 1px 2px rgba(56, 26, 32, 0.04);
    --shadow-float: 0 16px 40px -12px rgba(45, 22, 28, 0.16), 0 2px 8px rgba(45, 22, 28, 0.06);
    --shadow-pill: 0 10px 28px -8px rgba(45, 22, 28, 0.18), 0 0 0 1px rgba(74, 42, 48, 0.07);

    /* Typography */
    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout Radii & Spacing */
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-pill: 999px;
    --max-width: 520px;

    /* Safe Area Insets for iOS PWA */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    background-color: var(--bg-canvas);
    color: var(--ink-primary);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100dvh;
    background:
        radial-gradient(ellipse 85% 42% at 50% -6%, rgba(231, 161, 170, 0.24), transparent 70%),
        radial-gradient(ellipse 65% 38% at 95% 22%, rgba(132, 185, 193, 0.14), transparent 72%),
        var(--bg-canvas);
    background-attachment: fixed;
    overflow-x: hidden;
}

button, input, textarea, select {
    font-family: inherit;
    color: inherit;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
    outline: 2px solid var(--fertile-deep);
    outline-offset: 2px;
}

/* ==========================================================================
   Boot Splash
   ========================================================================== */

.boot-splash {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    animation: fadeIn 0.4s ease;
}

.splash-monogram {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(145deg, #9C2239, #6E1325);
    color: var(--ink-on-dark);
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 40px;
    display: grid;
    place-items: center;
    box-shadow: var(--shadow-float);
}

.splash-caption {
    margin: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 20px;
    color: var(--ink-secondary);
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Passcode Lock & First-Run Setup Screen
   ========================================================================== */

.lock-screen {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(24px + var(--safe-top)) 20px calc(28px + var(--safe-bottom));
    animation: fadeIn 0.35s ease;
}

.lock-card {
    width: 100%;
    max-width: 390px;
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    border-radius: 32px;
    padding: 34px 26px 28px;
    box-shadow: var(--shadow-float);
    text-align: center;
}

.lock-emblem {
    width: 68px;
    height: 68px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(145deg, #9C2239, #6E1325);
    color: #FAF6F1;
    display: grid;
    place-items: center;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 36px;
    position: relative;
    box-shadow: 0 12px 24px -10px rgba(139, 26, 47, 0.45);
}

.lock-emblem::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(139, 26, 47, 0.22);
}

.lock-wordmark {
    margin: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 32px;
    font-weight: 500;
    line-height: 1.05;
    color: var(--ink-primary);
}

.lock-submark {
    margin: 4px 0 0;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.lock-prompt {
    margin: 18px 0 16px;
    font-size: 14px;
    color: var(--ink-secondary);
}

.pin-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 22px;
    margin-bottom: 12px;
}

.pin-dots.shake {
    animation: shakeX 0.36s ease;
}

.pin-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.5px solid rgba(139, 26, 47, 0.35);
    background: transparent;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.pin-dot.filled {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.12);
}

.pin-error {
    min-height: 20px;
    margin: 0 0 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: #B4233C;
}

.keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 264px;
    margin: 0 auto 18px;
}

.key-btn {
    height: 62px;
    border-radius: 50%;
    background: var(--bg-subtle);
    border: 1px solid rgba(74, 42, 48, 0.06);
    font-size: 22px;
    font-weight: 500;
    color: var(--ink-primary);
    display: grid;
    place-items: center;
    transition: transform 0.1s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    user-select: none;
}

.key-btn:hover {
    background: #EFE4DA;
}

.key-btn:active {
    transform: scale(0.93);
    background: #E6D7CB;
}

.key-btn.key-ghost {
    background: transparent;
    border-color: transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-secondary);
}

.key-btn.key-submit {
    background: var(--accent);
    color: var(--ink-on-dark);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 18px -8px rgba(139, 26, 47, 0.55);
}

.key-btn.key-submit:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    box-shadow: none;
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--ink-secondary);
    cursor: pointer;
    user-select: none;
}

.remember-row input {
    accent-color: var(--accent);
    width: 15px;
    height: 15px;
}

.setup-length-hint {
    margin: 12px 0 0;
    font-size: 11.5px;
    color: var(--ink-muted);
}

/* ==========================================================================
   Main Authenticated Shell & Top Editorial Bar
   ========================================================================== */

.app-shell {
    max-width: var(--max-width);
    margin: 0 auto;
    min-height: 100dvh;
    padding-bottom: calc(108px + var(--safe-bottom));
    position: relative;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: calc(14px + var(--safe-top)) 16px 12px;
    background: linear-gradient(180deg, rgba(250, 246, 241, 0.96) 65%, rgba(250, 246, 241, 0));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.top-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.top-center {
    text-align: center;
}

.top-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.brand-mark {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.brand-script {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 22px;
    font-weight: 600;
    color: var(--ink-primary);
    letter-spacing: 0.01em;
}

.brand-caps {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-top: 2px;
}

.pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 14px;
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    box-shadow: 0 6px 18px -10px rgba(45, 22, 28, 0.16);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-primary);
    transition: transform 0.14s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.pill-btn:hover {
    background: #FFF;
    border-color: var(--border-medium);
}

.pill-btn:active {
    transform: scale(0.96);
}

.pill-btn.active {
    background: var(--fertile-past);
    color: #FFF;
    border-color: var(--fertile-past);
}

.icon-circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    box-shadow: 0 6px 18px -10px rgba(45, 22, 28, 0.16);
    display: grid;
    place-items: center;
    color: var(--ink-primary);
    transition: transform 0.14s ease, background-color 0.18s ease;
    position: relative;
}

.icon-circle-btn:hover {
    background: #FFF;
}

.icon-circle-btn:active {
    transform: scale(0.93);
}

.icon-circle-btn.drop-btn {
    color: var(--period-medium);
}

.icon-circle-btn.drop-btn.is-active {
    background: var(--period-medium);
    color: #FFF;
    border-color: var(--period-medium);
}

.view-container {
    padding: 4px 16px 24px;
    animation: fadeUp 0.28s ease;
}

/* ==========================================================================
   Shared Editorial Cards & Typography
   ========================================================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-card);
}

.card + .card {
    margin-top: 14px;
}

.eyebrow {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin: 0 0 6px;
}

.serif-title {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    line-height: 1.12;
    margin: 0;
    color: var(--ink-primary);
}

.serif-title em {
    font-style: italic;
    font-weight: 500;
}

.section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.section-head h2 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--ink-primary);
}

.text-link {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.text-link:hover {
    text-decoration: underline;
}

/* ==========================================================================
   View 1: Cycle Wheel & Today Hero
   ========================================================================== */

.wheel-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 16px 22px;
    margin-bottom: 14px;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.92), rgba(255, 252, 249, 0.72)),
        var(--bg-card);
    border: 1px solid var(--border-hairline);
    border-radius: 32px;
    box-shadow: var(--shadow-card);
}

.wheel-stage {
    position: relative;
    width: min(328px, 100%);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
}

.wheel-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.wheel-tick-btn {
    cursor: pointer;
    transition: opacity 0.16s ease;
}

.wheel-center {
    position: absolute;
    inset: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
    padding: 10px;
}

.wheel-center > * {
    pointer-events: auto;
}

.wheel-day-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.wheel-day-pill.phase-menstrual {
    background: rgba(198, 56, 75, 0.12);
    color: var(--period-heavy);
}

.wheel-day-pill.phase-ovulation {
    background: rgba(24, 110, 122, 0.12);
    color: var(--fertile-past);
}

.wheel-day-pill.phase-follicular {
    background: rgba(180, 134, 118, 0.16);
    color: #7D5447;
}

.wheel-day-pill.phase-luteal {
    background: rgba(162, 106, 122, 0.15);
    color: #7B4556;
}

.wheel-headline {
    margin: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.05;
    color: var(--ink-primary);
}

.wheel-subline {
    margin: 7px 0 14px;
    font-size: 12.5px;
    color: var(--ink-secondary);
    max-width: 190px;
    line-height: 1.38;
}

.wheel-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--ink-on-dark);
    font-size: 12.5px;
    font-weight: 600;
    box-shadow: 0 10px 22px -10px rgba(139, 26, 47, 0.6);
    transition: transform 0.14s ease, background-color 0.18s ease;
}

.wheel-cta:hover {
    background: var(--accent-hover);
}

.wheel-cta:active {
    transform: scale(0.96);
}

.wheel-preview-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
    font-size: 12px;
    color: var(--ink-secondary);
}

.wheel-preview-reset {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--fertile-past);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background: var(--teal-soft);
}

.wheel-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 10px;
    font-size: 11.5px;
    color: var(--ink-secondary);
}

.legend-dot-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-swatch {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

/* Two Editorial Stat Pills */
.stat-pair {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.stat-tile {
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    border-radius: 22px;
    padding: 15px 16px;
    box-shadow: var(--shadow-card);
    text-align: left;
    transition: transform 0.15s ease;
}

.stat-tile:hover {
    transform: translateY(-1px);
}

.stat-tile-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-tile-value {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--ink-primary);
    line-height: 1.1;
}

.stat-tile-meta {
    font-size: 12px;
    color: var(--ink-secondary);
    margin-top: 3px;
}

/* Stationery Love Note Card */
.love-note-card {
    position: relative;
    background: linear-gradient(155deg, #FFFDFB 0%, #FBF3EC 100%);
    border: 1px solid rgba(139, 26, 47, 0.14);
    border-radius: 26px;
    padding: 22px 22px 20px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    margin-bottom: 14px;
}

.love-note-card::before {
    content: '“';
    position: absolute;
    top: -12px;
    right: 16px;
    font-family: var(--font-serif);
    font-size: 112px;
    line-height: 1;
    color: rgba(139, 26, 47, 0.07);
    pointer-events: none;
}

.love-note-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.love-note-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.love-note-body {
    margin: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 20px;
    line-height: 1.45;
    color: var(--ink-primary);
    position: relative;
    z-index: 1;
}

.love-note-sig {
    margin: 12px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-secondary);
    letter-spacing: 0.04em;
    text-align: right;
}

/* Personal Messages / Keepsake Notes from Him */
.message-spotlight {
    position: relative;
    background: linear-gradient(155deg, #FFFDFB 0%, #F7EAE6 100%);
    border: 1px solid rgba(139, 26, 47, 0.18);
    border-radius: 26px;
    padding: 20px 22px 18px;
    box-shadow: var(--shadow-card);
    margin-bottom: 14px;
}

.message-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.message-seal-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--accent);
}

.message-date {
    font-size: 11.5px;
    color: var(--ink-muted);
    font-weight: 500;
}

.message-title {
    margin: 0 0 6px;
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--ink-primary);
    line-height: 1.15;
}

.message-body {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.58;
    color: var(--ink-primary);
    white-space: pre-wrap;
}

.message-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(139, 26, 47, 0.1);
}

.heart-react-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    border-radius: var(--radius-pill);
    background: rgba(139, 26, 47, 0.07);
    border: 1px solid rgba(139, 26, 47, 0.16);
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    transition: transform 0.14s ease, background-color 0.16s ease, color 0.16s ease;
}

.heart-react-btn:active {
    transform: scale(0.94);
}

.heart-react-btn.loved {
    background: var(--accent);
    border-color: var(--accent);
    color: #FFFBF8;
}

.author-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(139, 26, 47, 0.08);
    border: 1px solid rgba(139, 26, 47, 0.18);
    margin-bottom: 14px;
    font-size: 12.5px;
    color: var(--period-heavy);
    font-weight: 600;
}

.author-lock-card {
    background: linear-gradient(155deg, #FFFDFB 0%, #F6EFE9 100%);
    border: 1px dashed rgba(74, 42, 48, 0.22);
    border-radius: 24px;
    padding: 20px;
    margin-top: 14px;
    text-align: center;
}

.author-lock-card h3 {
    margin: 8px 0 6px;
    font-family: var(--font-serif);
    font-size: 23px;
    font-weight: 600;
}

.author-lock-card p {
    margin: 0 0 14px;
    font-size: 13px;
    color: var(--ink-secondary);
    line-height: 1.5;
}

.author-unlock-row {
    display: flex;
    gap: 8px;
    max-width: 310px;
    margin: 0 auto;
}

.sent-messages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
}

.sent-message-item {
    background: var(--bg-subtle);
    border: 1px solid var(--border-hairline);
    border-radius: 18px;
    padding: 14px 16px;
}

.sent-message-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--ink-muted);
}

.sent-message-loved {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(139, 26, 47, 0.1);
    padding: 2px 9px;
    border-radius: 99px;
}

.author-role-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--accent);
    background: rgba(139, 26, 47, 0.11);
    padding: 2px 8px;
    border-radius: 99px;
}

/* Victoria's Letters & Reply Thread */
.letters-hero {
    background: linear-gradient(155deg, #FFFDFB 0%, #F7EAE6 100%);
    border: 1px solid rgba(139, 26, 47, 0.14);
    border-radius: 26px;
    padding: 22px 20px;
    box-shadow: var(--shadow-card);
    margin-bottom: 14px;
}

.letters-hero h1 {
    margin: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 30px;
    font-weight: 600;
    line-height: 1.1;
    color: var(--ink-primary);
}

.letters-hero p {
    margin: 7px 0 0;
    font-size: 13.5px;
    color: var(--ink-secondary);
}

.reply-thread {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed rgba(74, 42, 48, 0.14);
}

.reply-bubble {
    padding: 10px 13px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.48;
    position: relative;
}

.reply-bubble.from-victoria {
    background: rgba(139, 26, 47, 0.08);
    border: 1px solid rgba(139, 26, 47, 0.14);
    margin-left: 14px;
}

.reply-bubble.from-partner {
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    margin-right: 14px;
}

.reply-bubble-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-muted);
}

.reply-bubble.from-victoria .reply-bubble-head {
    color: var(--accent);
}

.reply-bubble p {
    margin: 0;
    color: var(--ink-primary);
    white-space: pre-wrap;
}

.reply-form {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    align-items: flex-end;
}

.reply-form .input-field {
    padding: 10px 13px;
    font-size: 13.5px;
    border-radius: 18px;
}

.reply-send-btn {
    padding: 10px 16px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    color: var(--ink-on-dark);
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
    transition: transform 0.12s ease, opacity 0.15s ease;
}

.reply-send-btn:active {
    transform: scale(0.95);
}

.author-subtle-footer {
    margin-top: 22px;
    text-align: center;
}

.author-subtle-trigger {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
}

.author-subtle-trigger:hover {
    color: var(--ink-secondary);
    background: rgba(74, 42, 48, 0.05);
}

/* Today's Check-in Card */
.today-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.mini-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 600;
    background: var(--bg-subtle);
    color: var(--ink-primary);
    border: 1px solid var(--border-hairline);
}

.mini-tag.bleeding {
    background: rgba(198, 56, 75, 0.12);
    color: var(--period-heavy);
    border-color: rgba(198, 56, 75, 0.22);
}

.mini-tag.pain {
    background: rgba(217, 118, 66, 0.12);
    color: #A14C1F;
    border-color: rgba(217, 118, 66, 0.22);
}

.mini-tag.mood {
    background: rgba(75, 116, 184, 0.12);
    color: #2E528F;
    border-color: rgba(75, 116, 184, 0.22);
}

.mini-tag.wellness {
    background: rgba(140, 94, 138, 0.12);
    color: #673C65;
    border-color: rgba(140, 94, 138, 0.22);
}

.quick-actions-row {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.quick-action-pill {
    flex: 1;
    min-width: 96px;
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-hairline);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background-color 0.15s ease, transform 0.12s ease;
}

.quick-action-pill:hover {
    background: #EFE4DA;
}

.quick-action-pill:active {
    transform: scale(0.97);
}

/* ==========================================================================
   View 2: Clue-Inspired Continuous Editorial Calendar
   ========================================================================== */

.calendar-shell {
    margin: 0 -6px;
}

.filter-strip {
    display: flex;
    gap: 7px;
    overflow-x: auto;
    padding: 4px 6px 12px;
    scrollbar-width: none;
}

.filter-strip::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-secondary);
    transition: all 0.15s ease;
}

.filter-chip.active {
    background: var(--ink-primary);
    color: var(--ink-on-dark);
    border-color: var(--ink-primary);
}

.calendar-sticky-head {
    position: sticky;
    top: calc(64px + var(--safe-top));
    z-index: 30;
    background: rgba(250, 246, 241, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 6px 6px 8px;
    border-bottom: 1px solid var(--border-hairline);
}

.weekday-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: var(--ink-muted);
}

.calendar-legend-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 8px 4px;
    flex-wrap: wrap;
}

.calendar-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 11px;
    color: var(--ink-secondary);
}

.jump-today-btn {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--fertile-past);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: var(--teal-soft);
}

.month-block {
    padding: 18px 4px 14px;
    border-bottom: 1px solid var(--border-hairline);
}

.month-block:last-child {
    border-bottom: none;
}

.month-heading {
    text-align: center;
    margin: 0 0 14px;
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--ink-primary);
    letter-spacing: 0.01em;
}

.month-heading span {
    font-weight: 400;
    color: var(--ink-muted);
    margin-left: 5px;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    row-gap: 6px;
    column-gap: 0;
}

.cal-day-cell {
    position: relative;
    height: 68px;
    padding: 3px 2px 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: transparent;
    transition: opacity 0.2s ease;
}

.cal-day-cell.dimmed {
    opacity: 0.24;
}

.cal-day-surface {
    position: absolute;
    inset: 2px 2.5px;
    border-radius: 10px;
    background: var(--bg-tile);
    pointer-events: none;
    transition: background-color 0.14s ease, border-color 0.14s ease;
}

.cal-day-cell:hover .cal-day-surface {
    background: #EDE3DA;
}

.cal-day-cell.is-today .cal-day-surface {
    border: 2.5px solid var(--today-frame);
    background: #FFFDFB;
    z-index: 4;
}

.cal-day-cell.is-selected .cal-day-surface {
    box-shadow: 0 0 0 2px var(--accent);
}

/* Clue-style tiny vertical rounded category indicator bars at top-left */
.cal-indicators {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 6px 0;
    height: 15px;
}

.cal-pip {
    width: 4.5px;
    height: 10px;
    border-radius: 99px;
    display: block;
}

.cal-pip.bleeding { background: var(--dot-bleeding); }
.cal-pip.pain { background: var(--dot-pain); }
.cal-pip.mood { background: var(--dot-mood); }
.cal-pip.wellness { background: var(--dot-wellness); }

/* Bottom ribbon strip for day number + connected status pills */
.cal-ribbon {
    position: relative;
    z-index: 3;
    height: 32px;
    margin: 0 2.5px 2px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 8px 0 6px;
    font-size: 14.5px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    color: var(--ink-primary);
}

/* Connected pill geometry across adjacent days in the same week row */
.cal-ribbon.has-pill {
    color: #FFFFFF;
    font-weight: 600;
}

.cal-ribbon.conn-left {
    margin-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.cal-ribbon.conn-right {
    margin-right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.cal-ribbon.pill-heavy { background: var(--period-heavy); }
.cal-ribbon.pill-medium { background: var(--period-medium); }
.cal-ribbon.pill-light { background: var(--period-light); }
.cal-ribbon.pill-spotting {
    background: var(--period-spotting);
    color: var(--period-heavy);
    background-image: radial-gradient(rgba(139, 26, 47, 0.26) 1.5px, transparent 1.5px);
    background-size: 7px 7px;
}
.cal-ribbon.pill-predicted { background: var(--period-predicted); }
.cal-ribbon.pill-fertile-past { background: var(--fertile-past); }
.cal-ribbon.pill-fertile-active { background: var(--fertile-active); }

.cal-ov-icon {
    margin-right: auto;
    width: 15px;
    height: 15px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.cal-note-dot {
    position: absolute;
    top: 6px;
    right: 7px;
    z-index: 5;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--ink-muted);
    opacity: 0.65;
}

/* ==========================================================================
   View 3: Insights & Analysis
   ========================================================================== */

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 14px;
}

.metric-card {
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    border-radius: 22px;
    padding: 16px;
    box-shadow: var(--shadow-card);
}

.metric-value {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 600;
    line-height: 1.05;
    color: var(--ink-primary);
    margin: 4px 0;
}

.metric-value small {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-secondary);
}

.metric-sub {
    font-size: 12px;
    color: var(--ink-secondary);
    margin: 0;
}

.hormone-chart-wrap {
    margin-top: 12px;
    background: var(--bg-subtle);
    border-radius: 18px;
    padding: 14px 12px 10px;
}

.hormone-legend {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 8px;
    font-size: 11.5px;
    color: var(--ink-secondary);
}

.cycle-bar-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.cycle-bar-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cycle-bar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
    color: var(--ink-secondary);
}

.cycle-bar-meta strong {
    color: var(--ink-primary);
    font-weight: 600;
}

.cycle-track {
    position: relative;
    height: 14px;
    border-radius: var(--radius-pill);
    background: var(--bg-subtle);
    overflow: hidden;
}

.cycle-seg {
    position: absolute;
    top: 0;
    bottom: 0;
    border-radius: var(--radius-pill);
}

.cycle-seg.period { background: var(--period-medium); }
.cycle-seg.fertile { background: var(--fertile-active); }
.cycle-seg.ov-dot {
    width: 8px;
    height: 8px;
    top: 3px;
    background: #FFF;
    border: 2px solid var(--fertile-past);
    border-radius: 50%;
    transform: translateX(-50%);
}

.symptom-freq-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.symptom-freq-item {
    display: grid;
    grid-template-columns: 120px 1fr 30px;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}

.freq-bar-bg {
    height: 8px;
    border-radius: var(--radius-pill);
    background: var(--bg-subtle);
    overflow: hidden;
}

.freq-bar-fill {
    height: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--period-light), var(--accent));
}

/* ==========================================================================
   View 4: For Him (Partner Care Dashboard)
   ========================================================================== */

.partner-hero {
    background: linear-gradient(145deg, #2E1D22 0%, #4A2530 100%);
    color: #FAF6F1;
    border-radius: 28px;
    padding: 24px 22px;
    box-shadow: var(--shadow-float);
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
}

.partner-hero::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(231, 161, 170, 0.22), transparent 68%);
    top: -70px;
    right: -60px;
    pointer-events: none;
}

.partner-hero .eyebrow {
    color: rgba(250, 246, 241, 0.68);
}

.partner-hero-title {
    margin: 0;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 32px;
    font-weight: 500;
    line-height: 1.1;
}

.partner-hero-sub {
    margin: 8px 0 16px;
    font-size: 13.5px;
    color: rgba(250, 246, 241, 0.84);
    line-height: 1.5;
}

.partner-countdown-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.partner-stat-pill {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 16px;
    padding: 10px 10px;
    text-align: center;
}

.partner-stat-pill span {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(250, 246, 241, 0.68);
}

.partner-stat-pill strong {
    display: block;
    margin-top: 3px;
    font-family: var(--font-serif);
    font-size: 20px;
    font-weight: 600;
}

.care-checklist {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.care-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--bg-subtle);
    border: 1px solid var(--border-hairline);
    text-align: left;
    transition: background-color 0.15s ease, opacity 0.15s ease;
}

.care-item.checked {
    opacity: 0.65;
    background: #F3ECE5;
}

.care-item.checked .care-text strong {
    text-decoration: line-through;
}

.care-check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    flex-shrink: 0;
    margin-top: 1px;
    display: grid;
    place-items: center;
    color: #FFF;
    background: transparent;
    transition: background-color 0.15s ease;
}

.care-item.checked .care-check {
    background: var(--accent);
}

.care-text strong {
    display: block;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink-primary);
}

.care-text span {
    display: block;
    font-size: 12.5px;
    color: var(--ink-secondary);
    margin-top: 2px;
}

.upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upcoming-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 15px;
    background: var(--bg-subtle);
}

.upcoming-row-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.upcoming-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.upcoming-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-primary);
}

.upcoming-date {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-secondary);
}

/* Editable Love Notes Studio */
.note-editor-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-label {
    display: block;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-secondary);
    margin-bottom: 6px;
}

.input-field, .textarea-field, .select-field {
    width: 100%;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid var(--border-medium);
    background: #FFFDFB;
    font-size: 14px;
    color: var(--ink-primary);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.textarea-field {
    resize: vertical;
    min-height: 76px;
    line-height: 1.48;
}

.input-field:focus, .textarea-field:focus, .select-field:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(139, 26, 47, 0.12);
}

/* ==========================================================================
   Floating Glassmorphic Pill Bottom Navigation (Clue-inspired Luxury)
   ========================================================================== */

.bottom-nav-wrap {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(14px + var(--safe-bottom));
    z-index: 50;
    display: flex;
    justify-content: center;
    padding: 0 14px;
    pointer-events: none;
}

.bottom-nav {
    pointer-events: auto;
    width: 100%;
    max-width: 444px;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    align-items: center;
    padding: 7px 8px;
    border-radius: 36px;
    background: var(--bg-glass);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: var(--shadow-pill);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 7px 4px;
    border-radius: 26px;
    color: var(--ink-secondary);
    font-size: 10.5px;
    font-weight: 600;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.nav-item:active {
    transform: scale(0.94);
}

.nav-item.active {
    background: rgba(139, 26, 47, 0.09);
    color: var(--accent);
}

.nav-item.nav-track {
    padding: 0;
    background: transparent !important;
}

.nav-track-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(145deg, #9C2239, #771528);
    color: #FFFBF8;
    display: grid;
    place-items: center;
    box-shadow: 0 10px 22px -8px rgba(139, 26, 47, 0.62);
    transition: transform 0.15s ease;
}

.nav-item.nav-track:hover .nav-track-circle {
    transform: translateY(-1px) scale(1.03);
}

.nav-item.nav-track span {
    margin-top: 2px;
    color: var(--ink-primary);
}

/* ==========================================================================
   Slide-Up Editorial Bottom Sheets (Daily Tracker & Settings)
   ========================================================================== */

.sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: var(--bg-overlay);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.sheet-panel {
    width: 100%;
    max-width: 540px;
    max-height: 90dvh;
    background: var(--bg-canvas);
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -14px 48px rgba(34, 18, 22, 0.22);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 640px) {
    .sheet-backdrop {
        align-items: center;
        padding: 20px;
    }
    .sheet-panel {
        border-radius: 30px;
        max-height: 86dvh;
    }
}

.sheet-handle {
    width: 42px;
    height: 4px;
    border-radius: 99px;
    background: rgba(74, 42, 48, 0.2);
    margin: 10px auto 4px;
    flex-shrink: 0;
}

.sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 20px 14px;
    border-bottom: 1px solid var(--border-hairline);
    flex-shrink: 0;
}

.sheet-date-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-arrow-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    display: grid;
    place-items: center;
    color: var(--ink-primary);
}

.sheet-title-wrap h3 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 23px;
    font-weight: 600;
    line-height: 1.1;
}

.sheet-title-wrap p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--ink-secondary);
}

.sheet-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: grid;
    place-items: center;
    color: var(--ink-secondary);
}

.sheet-body {
    overflow-y: auto;
    padding: 18px 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    -webkit-overflow-scrolling: touch;
}

.sheet-footer {
    padding: 14px 20px calc(16px + var(--safe-bottom));
    background: var(--bg-card);
    border-top: 1px solid var(--border-hairline);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

/* Flow Selector Grid */
.track-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-secondary);
    margin: 0 0 10px;
}

.group-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.flow-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 7px;
}

.flow-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 11px 4px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1.5px solid var(--border-hairline);
    font-size: 11.5px;
    font-weight: 600;
    color: var(--ink-secondary);
    transition: all 0.15s ease;
}

.flow-btn.selected {
    background: rgba(198, 56, 75, 0.11);
    border-color: var(--period-medium);
    color: var(--period-heavy);
    box-shadow: 0 6px 14px -8px rgba(139, 26, 47, 0.35);
}

.flow-btn.selected.flow-heavy {
    background: var(--period-heavy);
    border-color: var(--period-heavy);
    color: #FFF;
}

.flow-btn.selected.flow-medium {
    background: var(--period-medium);
    border-color: var(--period-medium);
    color: #FFF;
}

.flow-btn.selected.flow-light {
    background: var(--period-light);
    border-color: var(--period-light);
    color: #FFF;
}

.chip-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.track-chip {
    padding: 9px 14px;
    border-radius: var(--radius-pill);
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-primary);
    transition: all 0.14s ease;
}

.track-chip:hover {
    border-color: var(--border-medium);
}

.track-chip.selected {
    color: #FFF;
    border-color: transparent;
    font-weight: 600;
}

.track-chip.cat-pain.selected { background: var(--dot-pain); }
.track-chip.cat-mood.selected { background: var(--dot-mood); }
.track-chip.cat-energy.selected { background: #6A5D8F; }
.track-chip.cat-cravings.selected { background: #9E5972; }
.track-chip.cat-intimacy.selected { background: var(--fertile-past); }

.lh-hint {
    margin: 8px 0 0;
    font-size: 12px;
    color: var(--fertile-past);
    background: var(--teal-soft);
    padding: 8px 12px;
    border-radius: 12px;
}

.period-streak-btn {
    margin-top: 10px;
    width: 100%;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(198, 56, 75, 0.08);
    border: 1px dashed rgba(198, 56, 75, 0.35);
    color: var(--period-heavy);
    font-size: 12.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

/* Primary & Secondary Buttons */
.btn-primary {
    padding: 12px 22px;
    border-radius: var(--radius-pill);
    background: linear-gradient(145deg, #9C2239, #771528);
    color: var(--ink-on-dark);
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 10px 22px -10px rgba(139, 26, 47, 0.55);
    transition: transform 0.13s ease, opacity 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    opacity: 0.95;
}

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

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 11px 18px;
    border-radius: var(--radius-pill);
    background: var(--bg-subtle);
    border: 1px solid var(--border-hairline);
    color: var(--ink-primary);
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.btn-secondary:hover {
    background: #EFE4DA;
}

.btn-danger-ghost {
    padding: 10px 14px;
    border-radius: var(--radius-pill);
    color: #B4233C;
    font-size: 13px;
    font-weight: 600;
}

.btn-danger-ghost:hover {
    background: rgba(180, 35, 60, 0.08);
}

/* Settings Specific */
.settings-section {
    background: var(--bg-card);
    border: 1px solid var(--border-hairline);
    border-radius: 22px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.settings-section h4 {
    margin: 0;
    font-family: var(--font-serif);
    font-size: 21px;
    font-weight: 600;
}

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

.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13.5px;
    color: var(--ink-primary);
}

.toggle-row small {
    display: block;
    font-size: 11.5px;
    color: var(--ink-secondary);
}

.switch {
    position: relative;
    width: 44px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: #DDD2CA;
    border-radius: 99px;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: #FFF;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.18);
    transition: transform 0.2s ease;
}

.switch input:checked + .slider {
    background: var(--accent);
}

.switch input:checked + .slider::before {
    transform: translateX(18px);
}

.device-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 12px;
    background: var(--bg-subtle);
    font-size: 12.5px;
}

.device-badge {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--fertile-past);
    background: var(--teal-soft);
    padding: 2px 8px;
    border-radius: 99px;
}

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

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.toast-root {
    position: fixed;
    top: calc(16px + var(--safe-top));
    left: 50%;
    transform: translateX(-50%);
    z-index: 120;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    background: #2B1C20;
    color: #FAF6F1;
    padding: 12px 18px;
    border-radius: var(--radius-pill);
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    box-shadow: var(--shadow-float);
    animation: toastIn 0.25s ease;
}

.toast.error {
    background: #9B1E35;
}

/* ==========================================================================
   Animations & Responsive Refinements
   ========================================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideUp {
    from { transform: translateY(32px); opacity: 0.7; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes shakeX {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-7px); }
    40%, 80% { transform: translateX(7px); }
}

@media (max-width: 374px) {
    .cal-day-cell { height: 62px; }
    .cal-ribbon { font-size: 13px; padding: 0 5px; }
    .wheel-headline { font-size: 26px; }
    .settings-grid-3 { grid-template-columns: 1fr; }
}
