/* =============================================
   FLOW — Period Tracker  |  app.css
   ============================================= */

/* --- Custom Properties --- */
:root {
  --wife:       #8B5CF6;
  --wife-light: #EDE9FE;
  --wife-mid:   #C4B5FD;
  --daughter:   #EC4899;
  --daughter-light: #FCE7F3;
  --daughter-mid:   #F9A8D4;
  --primary:    #7C3AED;
  --primary-dark: #5B21B6;
  --bg:         #FAF5FF;
  --surface:    #FFFFFF;
  --surface2:   #F5F3FF;
  --border:     #E9D5FF;
  --text:       #1F2937;
  --text-muted: #9CA3AF;
  --text-sub:   #6B7280;
  --success:    #10B981;
  --warning:    #F59E0B;
  --danger:     #EF4444;
  --radius:     16px;
  --radius-sm:  8px;
  --nav-height: 72px;
  --shadow:     0 2px 16px rgba(124,58,237,.10);
  --shadow-lg:  0 8px 32px rgba(124,58,237,.18);
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  height: 100%;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

/* --- App Shell --- */
#app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* --- Views --- */
.view {
  display: none;
  flex-direction: column;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-height) + 8px);
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.view.active { display: flex; }

.view-header {
  background: var(--surface);
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.view-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.view-header h1 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -.3px;
}
.view-header .subtitle {
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.refresh-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface2);
  color: var(--primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.refresh-btn svg { width: 18px; height: 18px; }
.refresh-btn:active { background: var(--border); }
.refresh-btn.spinning svg { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* --- Bottom Navigation --- */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  transition: color var(--transition);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .3px;
  padding: 8px 0;
}
.nav-btn svg { width: 22px; height: 22px; transition: transform var(--transition); }
.nav-btn.active { color: var(--primary); }
.nav-btn.active svg { transform: scale(1.12); }
.nav-btn.log-btn {
  color: var(--surface);
  background: linear-gradient(135deg, var(--wife), var(--daughter));
  border-radius: 50%;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  margin: 0 12px;
  box-shadow: 0 4px 16px rgba(139,92,246,.4);
  font-size: .72rem;
}
.nav-btn.log-btn svg { width: 26px; height: 26px; }

/* --- Cards --- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin: 0 16px 12px;
}
.card-sm { padding: 12px 16px; }
.card.wife { border-top: 4px solid var(--wife); }
.card.daughter { border-top: 4px solid var(--daughter); }

.person-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.person-badge.wife   { background: var(--wife-light);     color: var(--wife); }
.person-badge.daughter { background: var(--daughter-light); color: var(--daughter); }

/* --- Dashboard --- */
.dashboard-scroll { padding: 16px 0 0; }

.person-card {
  background: var(--surface);
  border-radius: var(--radius);
  margin: 0 16px 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.person-card-header {
  padding: 14px 18px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.person-card-header .name {
  font-size: 1.05rem;
  font-weight: 700;
}
.person-card-header.wife .name  { color: var(--wife); }
.person-card-header.daughter .name { color: var(--daughter); }

.person-card-body {
  padding: 4px 18px 16px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.stat-box {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 10px 8px;
  text-align: center;
}
.stat-box .stat-val {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
}
.stat-box .stat-label {
  font-size: .68rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}
.stat-box.wife-tint   .stat-val { color: var(--wife); }
.stat-box.daughter-tint .stat-val { color: var(--daughter); }

.cycle-bar {
  height: 8px;
  background: var(--surface2);
  border-radius: 4px;
  margin: 0 18px 14px;
  overflow: hidden;
}
.cycle-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width .6s ease;
}
.cycle-bar-fill.wife     { background: linear-gradient(90deg, var(--wife-mid), var(--wife)); }
.cycle-bar-fill.daughter { background: linear-gradient(90deg, var(--daughter-mid), var(--daughter)); }

.phase-label {
  font-size: .78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
}
.phase-menstrual  { background: #FEE2E2; color: #DC2626; }
.phase-follicular { background: #ECFDF5; color: #059669; }
.phase-ovulation  { background: #FEF9C3; color: #D97706; }
.phase-luteal     { background: #EEF2FF; color: #4338CA; }
.phase-unknown    { background: var(--surface2); color: var(--text-muted); }

.quick-actions {
  display: flex;
  gap: 10px;
  padding: 12px 18px 14px;
  border-top: 1px solid var(--border);
}
.quick-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 2px solid;
  font-size: .8rem;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  transition: background var(--transition), color var(--transition);
}
.quick-btn.wife   { border-color: var(--wife);     color: var(--wife); }
.quick-btn.wife:hover   { background: var(--wife-light); }
.quick-btn.daughter { border-color: var(--daughter); color: var(--daughter); }
.quick-btn.daughter:hover { background: var(--daughter-light); }
.quick-btn.active { color: var(--surface) !important; }
.quick-btn.wife.active   { background: var(--wife)     !important; }
.quick-btn.daughter.active { background: var(--daughter) !important; }

.section-title {
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 10px 20px 6px;
}

/* --- Activity Feed --- */
.activity-list { padding: 0 16px; }
.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: none; }
.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.activity-dot.wife     { background: var(--wife); }
.activity-dot.daughter { background: var(--daughter); }
.activity-text { flex: 1; }
.activity-text .main { font-size: .88rem; font-weight: 600; }
.activity-text .sub  { font-size: .78rem; color: var(--text-muted); margin-top: 1px; }

/* --- Calendar --- */
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 53px;
  z-index: 9;
}
.cal-month-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.cal-nav-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--surface2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 700;
  transition: background var(--transition);
}
.cal-nav-btn:hover { background: var(--border); }

.person-toggles {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.toggle-pill {
  flex: 1;
  padding: 8px 12px;
  border-radius: 20px;
  border: 2px solid;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all var(--transition);
}
.toggle-pill.wife { border-color: var(--wife); color: var(--wife); background: transparent; }
.toggle-pill.wife.on { background: var(--wife); color: #fff; }
.toggle-pill.daughter { border-color: var(--daughter); color: var(--daughter); background: transparent; }
.toggle-pill.daughter.on { background: var(--daughter); color: #fff; }

.calendar-grid {
  padding: 12px 12px 0;
}
.cal-day-names {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.cal-day-name {
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-muted);
  padding: 4px 0;
}
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}
.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  font-size: .9rem;
  font-weight: 500;
  transition: background var(--transition);
  min-height: 40px;
}
.cal-day:empty { cursor: default; }
.cal-day .day-num { line-height: 1; z-index: 1; }
.cal-day.today .day-num {
  width: 26px;
  height: 26px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.cal-day.other-month { color: var(--text-muted); opacity: .5; }

/* Period highlighting */
.cal-day.period-wife     { background: var(--wife-light); }
.cal-day.period-daughter { background: var(--daughter-light); }
.cal-day.period-both     {
  background: linear-gradient(135deg, var(--wife-light) 50%, var(--daughter-light) 50%);
}
.cal-day.period-wife .day-num     { color: var(--wife); font-weight: 700; }
.cal-day.period-daughter .day-num { color: var(--daughter); font-weight: 700; }
/* Predicted */
.cal-day.predict-wife     { background: #F3EFFE; }
.cal-day.predict-daughter { background: #FDF2F8; }

/* Note dots */
.note-dots {
  display: flex;
  gap: 2px;
  position: absolute;
  bottom: 4px;
}
.note-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
}
.note-dot.wife     { background: var(--wife); }
.note-dot.daughter { background: var(--daughter); }

/* Day detail panel */
.day-detail-panel {
  margin: 12px 12px 0;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.day-detail-header {
  padding: 12px 16px;
  background: var(--surface2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.day-detail-header .date-label { font-weight: 700; font-size: .95rem; }
.day-detail-body { padding: 12px 16px; }
.day-detail-empty { font-size: .85rem; color: var(--text-muted); padding: 8px 0; }

/* --- Log View --- */
.log-view { padding: 16px 16px 0; }

.segment-control {
  display: flex;
  background: var(--surface2);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
  margin-bottom: 16px;
}
.seg-btn {
  flex: 1;
  padding: 10px 8px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.seg-btn.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: 0 1px 6px rgba(0,0,0,.1);
}

.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-sub);
  margin-bottom: 6px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.form-input, .form-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: .95rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--primary);
}
textarea.form-input {
  resize: vertical;
  min-height: 80px;
  font-family: inherit;
}

.flow-selector {
  display: flex;
  gap: 8px;
}
.flow-btn {
  flex: 1;
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  color: var(--text-muted);
  transition: all var(--transition);
}
.flow-btn.active {
  border-color: var(--primary);
  background: var(--surface2);
  color: var(--primary);
}

.type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.type-btn {
  padding: 10px 6px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: var(--surface);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  color: var(--text-sub);
  transition: all var(--transition);
}
.type-btn.active {
  border-color: var(--primary);
  background: var(--surface2);
  color: var(--primary);
}

.submit-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 4px;
  letter-spacing: .3px;
}
.submit-btn.wife-btn {
  background: linear-gradient(135deg, #7C3AED, var(--wife));
  color: #fff;
  box-shadow: 0 4px 16px rgba(139,92,246,.4);
}
.submit-btn.daughter-btn {
  background: linear-gradient(135deg, #DB2777, var(--daughter));
  color: #fff;
  box-shadow: 0 4px 16px rgba(236,72,153,.4);
}
.submit-btn:active { transform: scale(.98); }

/* --- Notes View --- */
.notes-filters {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.notes-filters::-webkit-scrollbar { display: none; }
.filter-chip {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}
.filter-chip.active {
  border-color: var(--primary);
  background: var(--surface2);
  color: var(--primary);
}

.notes-list { padding: 12px 16px 0; }
.note-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.note-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.note-icon.wife     { background: var(--wife-light); }
.note-icon.daughter { background: var(--daughter-light); }
.note-body { flex: 1 }
.note-body .note-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.note-body .note-type-tag {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
  padding: 2px 8px;
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text-sub);
}
.note-body .note-date { font-size: .75rem; color: var(--text-muted); }
.note-body .note-content { font-size: .88rem; line-height: 1.45; color: var(--text); }

.severity-dots {
  display: flex;
  gap: 3px;
  margin-top: 4px;
}
.sev-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}
.sev-dot.filled.wife     { background: var(--wife); }
.sev-dot.filled.daughter { background: var(--daughter); }

.fab {
  position: fixed;
  bottom: calc(var(--nav-height) + 16px);
  right: max(calc(50% - 240px + 16px), 16px);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wife), var(--daughter));
  color: #fff;
  border: none;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  z-index: 50;
  transition: transform var(--transition);
}
.fab:active { transform: scale(.92); }

/* --- Settings --- */
.settings-section { padding: 12px 16px 0; }
.settings-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.settings-card-title {
  font-size: .75rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 12px 16px 8px;
  border-bottom: 1px solid var(--border);
}
.settings-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row label {
  font-size: .9rem;
  font-weight: 600;
  flex: 1;
  color: var(--text);
}
.settings-row .settings-input {
  width: 140px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  font-size: .88rem;
  text-align: right;
  background: var(--surface2);
  color: var(--text);
}
.settings-row .settings-input:focus {
  outline: none;
  border-color: var(--primary);
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--text-muted);
  padding: 10px 16px;
}
.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}
.sync-dot.connected  { background: var(--success); }
.sync-dot.syncing    { background: var(--warning); animation: pulse .8s infinite; }
.sync-dot.error      { background: var(--danger); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .3; }
}

.wide-btn {
  width: 100%;
  padding: 13px 16px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 8px;
}
.wide-btn.primary { background: var(--primary); color: #fff; }
.wide-btn.outline {
  background: transparent;
  border: 2px solid var(--border);
  color: var(--text-sub);
}
.wide-btn.danger  { background: #FEF2F2; color: var(--danger); border: 2px solid #FECACA; }
.wide-btn:active  { transform: scale(.98); }

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.modal-sheet {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  max-height: 90dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  padding: 0 0 env(safe-area-inset-bottom, 16px);
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 16px;
}
.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  padding: 0 20px 16px;
  color: var(--text);
}
.modal-body { padding: 0 20px 20px; }

/* --- Toasts --- */
#toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(calc(100vw - 32px), 440px);
}
.toast {
  background: #1F2937;
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: .88rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  animation: toast-in .3s ease;
  pointer-events: all;
}
.toast.success { background: #065F46; }
.toast.error   { background: #991B1B; }
.toast.warning { background: #92400E; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* --- Utility --- */
.hidden { display: none !important; }
.mt-8   { margin-top: 8px; }
.mt-12  { margin-top: 12px; }
.mt-16  { margin-top: 16px; }
.flex   { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.text-muted { color: var(--text-muted); font-size: .85rem; }
.text-center { text-align: center; }
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state p { font-size: .9rem; line-height: 1.5; }

/* --- Scrollbar (desktop preview) --- */
@media (min-width: 480px) {
  .view::-webkit-scrollbar { width: 4px; }
  .view::-webkit-scrollbar-track { background: transparent; }
  .view::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
}

/* --- Desktop frame --- */
@media (min-width: 480px) {
  body { background: #E9D5FF; display: flex; align-items: center; justify-content: center; min-height: 100vh; overflow: auto; }
  #app {
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    margin: 20px auto;
    height: min(900px, 95dvh);
  }
}
