/* ================= NOOK Design Tokens =================
   Palette: deep near-black + forest-green/olive surfaces + a bright
   lime primary accent + a warm amber/orange secondary accent. This
   direction is fixed by the product brief — do not drift toward
   blue/purple/teal or a light dashboard look.

   Two accent families only, per the NOOK brand spec: lime (primary —
   buttons, active states, progress, primary chart series) and
   amber/orange (secondary — status/priority emphasis, secondary chart
   series, used sparingly). Target mix is roughly 80–90%
   olive/near-black/neutral, 10–20% these accents — do not turn every
   chart into a rainbow, and don't add unrelated hues (no teal, no
   coral-pink, no lavender/blue) just for variety.
======================================================== */
:root {
  --bg:                 #070A05;
  --bg-elevated:        #0C1108;
  --surface:            #12190D;
  --surface-2:          #1A2311;
  --surface-elevated:   #1A2311; /* alias of --surface-2, spec's naming */
  --surface-interactive:#222C15; /* selected controls, hover/tap, active cards */
  --surface-hover:      #222C15;
  --border:             rgba(214, 240, 150, 0.10);
  --border-strong:      rgba(214, 240, 150, 0.18);

  --text-primary:   #F5F7EC;
  --text-secondary: #B9C2A6;
  --text-muted:     #98A288;

  --accent:       #C9F24B; /* lime — primary accent */
  --accent-soft:  #9CCB32;
  --accent-glow:  rgba(201, 242, 75, 0.25);
  --accent-text-on: #10160A;
  /* Diagonal lime->amber sweep used on primary buttons/FAB/active pills */
  --nook-btn-grad: linear-gradient(97deg, #E2F14F 0%, var(--accent) 48%, var(--amber, #F0B43C) 135%);

  /* Secondary accent family — warm amber/orange, used sparingly for
     emphasis, status, and secondary chart series. Same meaning always
     reads as the same color app-wide. */
  --amber:  #F0B43C; /* golden-amber — planned, due-soon, high priority */
  --orange: #EC7F39; /* deeper warm orange — active/in-progress, secondary chart data */

  /* Priority badges: critical=orange-red (danger, stays in the warm
     family rather than an unrelated coral-pink), high=amber,
     medium=muted lime/olive, low=muted neutral. Same variable names
     as before so no JS/markup changes were needed to apply the remap. */
  --critical: #F4644F;
  --high:     #F0B43C;
  --medium:   #C9F24B;
  --low:      #7C8A6E;

  /* Chart-only accents, each tied to what it represents: productivity/
     completion → lime (primary data), focus time → orange (secondary
     data, per the NOOK spec's chart guidance), rate → a softer lime
     tint (stays in-family, distinct from Completed's full-brightness
     lime). */
  --chart-completed:    #C9F24B; /* lime — productivity */
  --chart-focus:        #EC7F39; /* orange — focus/execution, secondary data */
  --chart-rate:         #DCF0A0; /* soft lime tint — rate, family-adjacent to Completed */
  --chart-productivity: #C9F24B; /* lime — productivity trend */

  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --font-display: 'Space Grotesk', 'Inter', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --shadow-glow: 0 8px 24px -8px var(--accent-glow);
  --shadow-card: 0 6px 20px -10px rgba(0, 0, 0, 0.6);

  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; overflow-x: hidden; }

body {
  margin: 0;
  background:
    radial-gradient(1100px 480px at 85% -8%, rgba(201, 242, 75, 0.10), transparent 60%),
    radial-gradient(800px 380px at -12% 24%, rgba(240, 180, 60, 0.05), transparent 55%),
    var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

button, input, select, textarea { font-family: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; }
::selection { background: var(--accent-glow); color: var(--text-primary); }

/* ================= App shell ================= */
#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  padding-bottom: 92px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 6px;
}
/* NOOK wordmark: CSS-only sliced-O logo, per the reference brand mark */
.nook-logo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: var(--accent);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
}
.nook-letter { display: inline-block; }
.nook-o {
  position: relative;
  width: 22px;
  height: 22px;
  border: 4px solid var(--accent);
  border-radius: 50%;
  display: inline-block;
  box-sizing: border-box;
}
.nook-o::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 7px;
  height: 5px;
  background: var(--bg);
}
.nook-o-2 { margin-left: -1px; }
.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}
.icon-btn:hover, .icon-btn:focus-visible { background: var(--surface); color: var(--text-primary); }

.page-content {
  padding: 12px 20px 24px;
  animation: fade-in 0.25s ease;
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ================= Bottom nav ================= */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: rgba(16, 20, 12, 0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  padding: 10px 6px calc(10px + env(safe-area-inset-bottom));
  z-index: 20;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
  flex: 1;
}
.nav-item svg { stroke: currentColor; }
.nav-item.active { color: var(--accent); text-shadow: 0 0 10px var(--accent-glow); }
.nav-item:not(.nav-fab-slot):hover { color: var(--text-secondary); }

.nav-fab-slot { flex: 0 0 auto; margin-top: -34px; }
.fab {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--nook-btn-grad);
  color: var(--accent-text-on);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  font-weight: 600;
  box-shadow: var(--shadow-glow), 0 4px 14px rgba(0,0,0,0.5);
  border: 4px solid var(--bg);
  transition: transform 0.15s ease;
}
.nav-fab-slot:active .fab { transform: scale(0.94); }

/* ================= Typography helpers ================= */
h1, h2, h3 { font-family: var(--font-display); margin: 0; }
.screen-title { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; }
.section-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin: 22px 0 10px; }
.muted { color: var(--text-secondary); }
.tiny { font-size: 12px; color: var(--text-muted); }

/* ================= Cards ================= */
.card {
  background:
    linear-gradient(180deg, rgba(214, 240, 150, 0.035), rgba(214, 240, 150, 0) 42%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: inset 0 1px 0 rgba(230, 245, 180, 0.05);
}
.card-elevated {
  background: var(--surface-2);
  box-shadow: var(--shadow-card);
}

/* Greeting */
.greeting-emoji { font-size: 22px; }
.greeting h1 { font-size: 24px; line-height: 1.25; }
.greeting .date { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }

/* Progress card */
/* The wave is background art only: it bleeds off the top-right of the
   progress area, stays behind the card, and never intercepts input. */
.progress-hero { position: relative; margin-top: 16px; isolation: isolate; }
.progress-hero .progress-card { position: relative; z-index: 1; margin-top: 0; }
.progress-wave {
  position: absolute;
  top: -58px; right: -22px;
  width: 280px;
  max-width: none;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.progress-card { margin-top: 16px; text-align: left; }
.progress-card .label { font-size: 13px; color: var(--text-secondary); font-weight: 500; }
.progress-ring-wrap { display: flex; align-items: center; gap: 20px; margin-top: 10px; }
.progress-ring-wrap svg { filter: drop-shadow(0 0 10px var(--accent-glow)); }
.progress-pct { font-family: var(--font-display); font-size: 40px; font-weight: 700; }
.progress-bar-track {
  flex: 1;
  height: 10px;
  background: var(--surface-2);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  border-radius: var(--radius-pill);
  transition: width 0.4s ease;
}
.progress-meta { margin-top: 12px; font-size: 13px; color: var(--text-secondary); }
.progress-meta strong { color: var(--text-primary); font-weight: 600; }

/* Focus card */
.focus-card { margin-top: 16px; }
.focus-eyebrow { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: 0.03em; }
.focus-title { font-size: 19px; font-weight: 600; margin: 8px 0 10px; }
.focus-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }

/* Full-screen Focus Mode — deliberately calm and minimal per the
   spec: no extra chrome, no competing information, just the task,
   a big timer, and the two actions that matter. */
.focus-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100dvh - 160px);
  padding-top: 4px;
}
.focus-title-lg {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  text-align: center;
  margin: 4px 0 0;
  line-height: 1.25;
}
.focus-timer {
  font-family: var(--font-display);
  font-size: 56px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin: 36px 0 32px;
  font-variant-numeric: tabular-nums;
}
.btn-start {
  width: 100%;
  padding: 13px;
  border-radius: var(--radius-md);
  background: var(--nook-btn-grad);
  color: var(--accent-text-on);
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 6px 18px -8px var(--accent-glow);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-start:hover { filter: brightness(1.06); }
.btn-start:active { transform: scale(0.98); }

/* Quick stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.stat-card {
  background:
    linear-gradient(180deg, rgba(214, 240, 150, 0.03), rgba(214, 240, 150, 0) 45%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
}
.stat-card .stat-label { font-size: 11.5px; color: var(--text-secondary); }
.stat-card .stat-value { font-family: var(--font-display); font-size: 22px; font-weight: 700; margin: 4px 0 8px; color: var(--accent); }
.stat-card svg { display: block; }

/* Badges: priority + status */
.badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.02em;
}
.badge-critical { color: var(--critical); background: rgba(221,95,53,0.14); }
.badge-high     { color: var(--high); background: rgba(229,184,75,0.14); }
.badge-medium   { color: var(--medium); background: rgba(156,178,90,0.16); }
.badge-low      { color: var(--low); background: rgba(124,138,110,0.16); }

.status-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.status-not_started { border: 2px solid var(--text-muted); }
.status-in_progress { background: var(--high); }
.status-completed { background: var(--accent); }
.status-paused { background: var(--text-muted); }

/* ================= Pills / filters ================= */
.pill-row { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.pill-row::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}
.pill.active { background: var(--nook-btn-grad); color: var(--accent-text-on); border-color: var(--accent); box-shadow: 0 4px 12px -6px var(--accent-glow); }

/* ================= Search ================= */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.search-bar input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text-primary); font-size: 14.5px;
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-bar svg { color: var(--text-muted); flex-shrink: 0; }

/* ================= Task list & cards ================= */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-card {
  background:
    linear-gradient(180deg, rgba(214, 240, 150, 0.03), rgba(214, 240, 150, 0) 45%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: background 0.15s ease, transform 0.1s ease;
}
.task-card:active { transform: scale(0.99); }
.task-card.is-completed { opacity: 0.55; }
.task-card.is-completed .task-title { text-decoration: line-through; }
.task-check {
  margin-top: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--text-muted);
  transition: all 0.15s ease;
}
.task-check.checked { background: var(--nook-btn-grad); border-color: var(--accent); color: var(--accent-text-on); }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 15px; font-weight: 500; margin-bottom: 6px; word-break: break-word; }
.task-meta-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-meta-row .dot-sep { color: var(--text-muted); }
.task-time { font-size: 12.5px; color: var(--text-secondary); }

.day-group-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text-muted); margin: 18px 0 8px;
}
.day-group-label:first-child { margin-top: 4px; }

/* ================= Plan / schedule ================= */
.plan-row { display: flex; gap: 14px; }
.plan-time { width: 52px; flex-shrink: 0; font-size: 12.5px; color: var(--text-muted); padding-top: 14px; text-align: right; }
.plan-line { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.plan-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); border: 2px solid var(--border-strong); }
.plan-dot.done { background: var(--accent); border-color: var(--accent); }
.plan-dot.now { background: var(--high); border-color: var(--high); box-shadow: 0 0 0 4px rgba(229,184,75,0.18); }
.plan-thread { width: 2px; flex: 1; background: var(--border); margin: 2px 0; min-height: 24px; }
.plan-card { flex: 1; padding-bottom: 18px; }

/* ================= Buttons ================= */
.btn-primary {
  background: var(--nook-btn-grad); color: var(--accent-text-on);
  padding: 13px 20px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 15px; width: 100%;
  box-shadow: 0 6px 18px -8px var(--accent-glow);
  transition: filter 0.15s ease, transform 0.1s ease;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary {
  background: var(--surface-2); color: var(--text-primary);
  padding: 13px 20px; border-radius: var(--radius-md);
  font-weight: 600; font-size: 15px; width: 100%;
  border: 1px solid var(--border-strong);
}
.btn-ghost { color: var(--text-secondary); font-size: 14px; font-weight: 500; padding: 10px; }
.btn-danger { color: var(--critical); font-size: 14px; font-weight: 600; }

/* ================= Forms ================= */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 7px; font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 70px; }
.field-row { display: flex; gap: 10px; }
.field-row .field { flex: 1; }
.segmented { display: flex; gap: 8px; flex-wrap: wrap; }
.segmented button {
  padding: 9px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--text-secondary); font-size: 13px; font-weight: 500;
}
.segmented button.active { background: var(--nook-btn-grad); color: var(--accent-text-on); border-color: var(--accent); box-shadow: 0 4px 12px -6px var(--accent-glow); }

/* ================= Modal / bottom sheet ================= */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(4,6,3,0.7);
  display: flex; align-items: flex-end; justify-content: center;
  z-index: 40; animation: backdrop-in 0.18s ease;
}
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  background: var(--bg-elevated);
  border-top-left-radius: 24px; border-top-right-radius: 24px;
  width: 100%; max-width: 480px;
  max-height: 88vh; overflow-y: auto;
  padding: 10px 20px 28px;
  border-top: 1px solid var(--border-strong);
  animation: sheet-in 0.22s ease;
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0.6; } to { transform: translateY(0); opacity: 1; } }
.modal-handle { width: 40px; height: 4px; background: var(--border-strong); border-radius: 999px; margin: 6px auto 14px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-title { font-family: var(--font-display); font-size: 19px; font-weight: 700; }
.modal-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ================= Empty states ================= */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-secondary); }
.empty-state .emoji { font-size: 34px; margin-bottom: 10px; }
.empty-state h3 { font-size: 17px; color: var(--text-primary); margin-bottom: 6px; }
.empty-state p { font-size: 14px; margin: 0 0 18px; }
.empty-state .btn-primary { width: auto; padding: 12px 22px; display: inline-block; }

.error-banner {
  background: rgba(221,95,53,0.1);
  border: 1px solid rgba(221,95,53,0.3);
  color: var(--critical);
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; margin-bottom: 14px;
}

/* ================= Statistics page ================= */
.stat-summary-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.chart-card { margin-top: 16px; }
.chart-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.range-select {
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill); padding: 6px 12px; font-size: 12.5px; color: var(--text-secondary);
  display: flex; align-items: center; gap: 6px;
}
.category-bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.category-bar-row .cat-name { width: 78px; flex-shrink: 0; color: var(--text-secondary); }
.category-bar-track { flex: 1; height: 8px; background: var(--surface-2); border-radius: var(--radius-pill); overflow: hidden; }
.category-bar-fill { height: 100%; background: var(--nook-btn-grad); border-radius: var(--radius-pill); }
.category-bar-count { width: 22px; text-align: right; color: var(--text-muted); font-size: 12px; }

/* ================= Account page ================= */
.account-header { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.account-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--accent);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 3px rgba(201, 242, 75, 0.06), 0 0 14px -4px var(--accent-glow);
}
.list-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 4px; border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row .row-label { font-size: 14.5px; }
.category-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background:
    linear-gradient(180deg, rgba(214, 240, 150, 0.03), rgba(214, 240, 150, 0) 45%),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 8px 8px 8px 14px; font-size: 13px;
}
.category-chip button { color: var(--text-muted); display: flex; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* ================= Toast ================= */
.toast-root {
  position: fixed; top: 66px; left: 0; right: 0;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 60; pointer-events: none;
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  box-shadow: var(--shadow-card);
  animation: toast-in 0.2s ease;
}
.toast.toast-error { border-color: rgba(221,95,53,0.4); color: var(--critical); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ================= NOOK breathing loader ================= */
.breathing-loader-wrap {
  /* Center the loader in the usable area between the header and bottom nav. */
  min-height: clamp(320px, calc(100dvh - 390px), 620px);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 17px;
  color: var(--text-secondary);
}
.breathing-loader-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.loader-ellipsis { display: inline-block; width: 1em; overflow: hidden; vertical-align: bottom; animation: nook-ellipsis 1.2s steps(4,end) infinite; }
.button-loader {
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: nook-button-spin .65s linear infinite;
}
.btn-primary:disabled { opacity: .75; cursor: wait; }
@keyframes nook-button-spin { to { transform: rotate(360deg); } }
@keyframes nook-ellipsis { 0% { width: 0; } 100% { width: 1em; } }
@media (max-height: 700px) {
  .breathing-loader-wrap { min-height: clamp(260px, calc(100vh - 340px), 420px); }
}
@media (prefers-reduced-motion: reduce) {
  .button-loader, .loader-ellipsis { animation: none !important; }
}

.page-loader { display: flex; justify-content: center; }
