:root {
    --bg: #0e0a14;
    --surface: #17101f;
    --surface2: #1e1529;
    --border: #2d2040;
    --rose: #c96fa8;
    --rose-soft: #e896c8;
    --rose-dim: #7d3d68;
    --lavender: #9b7ec8;
    --gold: #d4a96a;
    --text: #f0e8f5;
    --text-muted: #8a7a9e;
    --fertile: #6ec9a0;
    --fertile-dim: #2d6650;
    --radius: 18px;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-weight: 300;
    overflow-y: auto;
}

/* Orb background */
body::before {
    content: '';
    position: fixed;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 111, 168, 0.12) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

#app {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 430px;
    margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────────── */
header {
    padding: calc(var(--safe-top) + 20px) 24px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.logo {
    font-family: 'Cormorant Garamond', serif;
    font-size: 28px;
    font-weight: 300;
    letter-spacing: 0.08em;
    color: var(--rose-soft);
}

.logo span {
    color: var(--text-muted);
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
    display: block;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.header-actions {
    display: flex;
    gap: 10px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s;
}

.icon-btn:hover,
.icon-btn.active {
    border-color: var(--rose-dim);
    color: var(--rose-soft);
    background: rgba(201, 111, 168, 0.1);
}
/* Spinner */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#loading-overlay.hidden {
  display: none;
}

.spinner {
  width: 80px;
  height: 80px;
  border: 8px solid var(--gold);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* ── Nav ─────────────────────────────────────────────────────── */
nav {
    display: flex;
    gap: 4px;
    padding: 0 24px 16px;
    flex-shrink: 0;
}

.nav-btn {
    flex: 1;
    padding: 10px 4px;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text-muted);
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.nav-btn .nav-icon {
    font-size: 20px;
    transition: transform 0.25s;
}

.nav-btn.active {
    color: var(--rose-soft);
    background: rgba(201, 111, 168, 0.1);
}

.nav-btn.active .nav-icon {
    transform: scale(1.15);
}

/* ── Scrollable content ──────────────────────────────────────── */
main {
    flex: 1;
    overflow-y: auto;
    padding: 0 24px calc(var(--safe-bottom) + 24px);
    scroll-behavior: smooth;
}

main::-webkit-scrollbar {
    display: none;
}

main.hidden {
    display: none;
}

/* ── Views ───────────────────────────────────────────────────── */
.view {
    display: none;
}

.view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    --card-padding: 20px;
    padding: var(--card-padding);
    margin-bottom: 14px;
    overflow: hidden;
}

.card-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 400;
    color: var(--rose-soft);
    margin-bottom: 14px;
    letter-spacing: 0.04em;
}

/* ── Status pill ─────────────────────────────────────────────── */
.status-ring {
    width: 140px;
    height: 140px;
    margin: 10px auto 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-ring svg {
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(-90deg);
}

.status-ring-inner {
    text-align: center;
    z-index: 1;
}

.status-ring-inner .day-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 48px;
    font-weight: 300;
    line-height: 1;
    color: var(--text);
}

.status-ring-inner .day-label {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 2px;
}

.phase-badge {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 500;
    margin: 0 auto;
}

.phase-menstrual {
    background: rgba(201, 111, 168, 0.2);
    color: var(--rose-soft);
    border: 1px solid var(--rose-dim);
}

.phase-follicular {
    background: rgba(155, 126, 200, 0.2);
    color: var(--lavender);
    border: 1px solid #6b539e;
}

.phase-ovulation {
    background: rgba(110, 201, 160, 0.2);
    color: var(--fertile);
    border: 1px solid var(--fertile-dim);
}

.phase-luteal {
    background: rgba(212, 169, 106, 0.2);
    color: var(--gold);
    border: 1px solid #8c6a30;
}

.phase-unknown {
    background: rgba(138, 122, 158, 0.15);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ── Prediction row ──────────────────────────────────────────── */
.pred-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.pred-row:last-child {
    border-bottom: none;
}

.pred-label {
    font-size: 13px;
    color: var(--text-muted);
}

.pred-value {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
}

.pred-value.rose {
    color: var(--rose-soft);
}

.pred-value.green {
    color: var(--fertile);
}

/* ── Calendar ────────────────────────────────────────────────── */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cal-month {
    font-family: 'Cormorant Garamond', serif;
    font-size: 22px;
    font-weight: 400;
    color: var(--text);
}

.cal-nav {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color 0.2s;
}

.cal-nav:hover {
    color: var(--rose-soft);
}

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

.cal-dow {
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    padding: 6px 0;
    text-transform: uppercase;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
    border: none;
    background: none;
    color: var(--text);
}

.cal-day:hover:not(.empty) {
    background: var(--surface2);
}

.cal-day.empty {
    cursor: default;
    color: transparent;
}

.cal-day.today {
    color: var(--rose-soft);
    font-weight: 500;
}

.cal-day.today::after {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--rose-soft);
    border-radius: 50%;
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
}

.cal-day.period {
    background: rgba(201, 111, 168, 0.25);
    color: var(--rose-soft);
}

.cal-day.period-start {
    background: var(--rose-dim);
    color: white;
}

.cal-day.fertile {
    background: rgba(110, 201, 160, 0.2);
    color: var(--fertile);
}

.cal-day.predicted {
    border: 1px dashed var(--rose-dim);
    color: var(--rose);
}

.cal-day.has-symptoms::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--lavender);
    border-radius: 50%;
    position: absolute;
    top: 3px;
    right: 3px;
}

/* ── Day-tap popup menu ─────────────────────────── */
.day-menu {
    position: absolute;
    z-index: 999;
    min-width: 190px;
    background: var(--surface1, #1e1530);
    border: 1px solid rgba(201, 111, 168, 0.18);
    border-radius: 14px;
    padding: 8px 6px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 2px;
    animation: menuPop 0.15s ease;
}

@keyframes menuPop {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.day-menu-date {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted, #8877a0);
    padding: 2px 10px 6px;
}

.day-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: none;
    border-radius: 9px;
    padding: 9px 10px;
    cursor: pointer;
    color: var(--text, #e8dff5);
    font-size: 13.5px;
    text-align: left;
    transition: background 0.12s;
}

.day-menu-item:hover,
.day-menu-item:active {
    background: rgba(201, 111, 168, 0.12);
}

.day-menu-icon {
    font-size: 15px;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* ── Log form ────────────────────────────────────────────────── */
.form-section {
    margin-bottom: 18px;
    width: 100%;
    box-sizing: border-box;
}

.form-label {
    font-size: 12px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: block;
}

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

.symptom-chip {
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.symptom-chip.selected {
    border-color: var(--lavender);
    background: rgba(155, 126, 200, 0.15);
    color: var(--lavender);
}

.mood-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mood-btn {
    flex: 1;
    min-width: 56px;
    padding: 10px 4px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    font-size: 22px;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.mood-btn span {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.mood-btn.selected {
    border-color: var(--rose-dim);
    background: rgba(201, 111, 168, 0.12);
    color: var(--rose-soft);
}

.pain-slider {
    width: 100%;
    accent-color: var(--rose);
    height: 4px;
    border-radius: 2px;
}

input[type=date] {
    box-sizing: border-box;
    display:flex;
    appearance: initial;
    -webkit-appearance: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s;
}

input[type=date]:focus,
textarea:focus {
    border-color: var(--rose-dim);
}

input[type=date]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
}

textarea {
    resize: vertical;
    min-height: 80px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s;
}

.flow-row {
    display: flex;
    gap: 8px;
}

.flow-btn {
    flex: 1;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface2);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.flow-btn .flow-dots {
    font-size: 8px;
    letter-spacing: 2px;
}

.flow-btn.selected {
    border-color: var(--rose-dim);
    background: rgba(201, 111, 168, 0.12);
    color: var(--rose-soft);
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
    width: 100%;
    padding: 15px;
    border-radius: 14px;
    border: none;
    background: linear-gradient(135deg, var(--rose-dim), #5a2a50);
    color: white;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.08em;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 6px;
}

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

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

.btn-secondary {
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid var(--rose-dim);
    background: transparent;
    color: var(--rose-soft);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(201, 111, 168, 0.1);
}

/* ── Cycle history list ──────────────────────────────────────── */
.cycle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.cycle-item:last-child {
    border-bottom: none;
}

.cycle-dates {
    font-size: 14px;
    color: var(--text);
}

.cycle-dates small {
    display: block;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 2px;
}

.cycle-delete {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 6px;
    border-radius: 8px;
    transition: color 0.2s;
}

.cycle-delete:hover {
    color: #e06a6a;
}

/* ── Cycle length histogram ───────────────────────────────────────────────────── */
/* Scroll container */
.histogram-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px; 
    scroll-snap-type: x mandatory;
    position: relative;
    
}
#cycles-histogram {
    position: relative;
}

#cycles-histogram::before,
#cycles-histogram::after {
    content: "";
    position: absolute;
    top: 0;
    height: 120px; /* match .histogram height */
    width: 20px;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.2s;
    opacity: 0;
}

#cycles-histogram::before {
    left: 0;
    background: linear-gradient(to right, var(--surface), transparent);
}

#cycles-histogram::after {
    right: 0;
    background: linear-gradient(to left, var(--surface), transparent);
}

#cycles-histogram.show-left-fade::before { opacity: 1; }
#cycles-histogram.show-right-fade::after { opacity: 1; }

/* Histogram container */
.histogram {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 120px;
    min-width: max-content;
    flex-direction: row-reverse;
    /* overflow-y: auto; */
}

/* Each bar + label */
.histogram-item {
    width: 64px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    /* justify-content: flex-end; */
    align-items: center;
    scroll-snap-align: end;
    height: 100%;
}

/* The actual bar */
.histogram-bar {
    display: block;
    margin-top: auto;
    width: 100%;
    background: linear-gradient(180deg, var(--rose-soft), var(--rose));
    border-radius: 8px 8px 4px 4px;
    transition: height 0.3s ease;
    box-shadow: 0 4px 12px rgba(201, 111, 168, 0.25);
    transform: scaleY(0);
    transform-origin: bottom;
    animation: growBar 0.6s ease forwards;
}
@keyframes growBar {
    to {
        transform: scaleY(1);
    }
}

/* Value label under bar */
.histogram-label {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Empty state */
.histogram-empty {
    color: var(--text-muted);
    font-size: 13px;
}

/* ── Toast ───────────────────────────────────────────────────── */
#toast {
    position: fixed;
    bottom: calc(var(--safe-bottom) + 80px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 22px;
    border-radius: 30px;
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    white-space: nowrap;
    z-index: 999;
}

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

/* ── Install banner ──────────────────────────────────────────── */
#install-banner {
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(201, 111, 168, 0.15), rgba(155, 126, 200, 0.1));
    border: 1px solid var(--rose-dim);
    border-radius: var(--radius);
    padding: 16px 18px;
    display: none;
    align-items: center;
    gap: 12px;
}

#install-banner.visible {
    display: flex;
}

#install-banner p {
    flex: 1;
    font-size: 13px;
    color: var(--text-muted);
}

#install-banner strong {
    color: var(--text);
}

/* ── Offline indicator ───────────────────────────────────────── */
#offline-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #4a3800;
    color: #f0c050;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.1em;
    padding: 6px;
    transform: translateY(-100%);
    transition: transform 0.3s;
    z-index: 1000;
}

#offline-bar.show {
    transform: translateY(0);
}

/* Pain level display */
.pain-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Overlay (background dim + blur) */
.settings-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 6, 16, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

/* Bottom sheet container */
.settings-sheet {
    width: 100%;
    max-width: 520px;
    background: linear-gradient(180deg, var(--surface), var(--surface2));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.6),
                0 0 0 1px rgba(255,255,255,0.02) inset;
    padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
    animation: slideUp 0.3s cubic-bezier(.2,.8,.2,1);
}

/* Header */
.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.settings-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.3px;
}

/* Close button */
.settings-close {
    appearance: none;
    border: none;
    background: var(--surface2);
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-close:hover {
    background: var(--rose-dim);
    color: var(--text);
    box-shadow: 0 0 0 2px rgba(201,111,168,0.2);
}

/* Groups */
.settings-group {
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) - 6px);
    padding: 10px 0;
    margin-bottom: 14px;
}

/* Row */
.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    gap: 12px;
}

.settings-row + .settings-row {
    border-top: 1px solid rgba(255,255,255,0.04);
}

/* Label block */
.settings-label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.settings-label span {
    color: var(--text);
    font-size: 0.95rem;
}

.settings-hint {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Select dropdown */
.settings-select {
    background: var(--surface2);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-select:hover {
    border-color: var(--lavender);
}

.settings-select:focus {
    border-color: var(--rose);
    box-shadow: 0 0 0 2px rgba(201,111,168,0.25);
}

/* Toggle container */
.toggle {
    position: relative;
    width: 48px;
    height: 28px;
    cursor: pointer;
}

.toggle input {
    display: none;
}

/* TRACK — make it obvious */
.toggle-track {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 999px;
    position: relative;
    transition: all 0.25s ease;

    /* visible pill */
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);

    /* groove effect */
    box-shadow:
        inset 0 2px 6px rgba(0,0,0,0.6),
        inset 0 0 0 1px rgba(255,255,255,0.03);
}

/* THUMB */
.toggle-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;

    background: #dcd6e5;
    transition: all 0.25s cubic-bezier(.2,.8,.2,1);

    box-shadow:
        0 2px 6px rgba(0,0,0,0.5);
}

/* ON state — whole rail lights up */
.toggle input:checked + .toggle-track {
    background: linear-gradient(135deg, var(--rose-dim), var(--lavender));
    border-color: transparent;

    box-shadow:
        inset 0 2px 6px rgba(0,0,0,0.5),
        0 0 10px rgba(155,126,200,0.25);
}

/* Thumb moves */
.toggle input:checked + .toggle-track::after {
    transform: translateX(20px);
    background: white;

    /* controlled glow (not nuclear) */
    box-shadow:
        0 0 8px rgba(232,150,200,0.5),
        0 2px 6px rgba(0,0,0,0.5);
}

/* Hover — subtle */
.toggle:hover .toggle-track {
    border-color: var(--lavender);
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

/* Hidden by default */
.settings-overlay {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Visible when opened */
.settings-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    animation: fadeIn 0.25s ease;
}

/* Smooth transition */
.settings-overlay {
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Animate sheet only when open */
.settings-sheet {
    transform: translateY(40px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(.2,.8,.2,1);
}

.settings-overlay.open .settings-sheet {
    transform: translateY(0);
    opacity: 1;
}

