/*
 * app.css — Health · 9irl
 *
 * Design tokens mirror 9irl.com shared stylesheet.
 * In production these variables come from https://9irl.com/assets/css/shared.css
 * and this file only contains Health-specific overrides and components.
 *
 * Included standalone here so the app runs without the main domain.
 */

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, textarea { font: inherit; }
a { color: inherit; }

/* ── Design tokens (9irl shared) ─────────────────────────────────────────── */
:root {
  /* Palette */
  --cream:           #F8F4EE;
  --cream-border:    #EDE5D8;
  --ink:             #1C1712;
  --ink-mid:         #5C4F46;
  --ink-muted:       #9C8A80;
  --accent:          #B85C38;
  --accent-soft:     #F0E6DC;
  --green:           #5A8C59;
  --red:             #C4556A;

  /* Card */
  --card-bg:         #FFFFFF;
  --card-border:     #EAE2D8;
  --card-shadow:     0 2px 8px rgba(90,55,35,0.07);
  --card-shadow-lg:  0 6px 22px rgba(90,55,35,0.13);

  /* Type */
  --font-serif:      'Cormorant Garamond', Georgia, serif;
  --font-ui:         'Outfit', system-ui, sans-serif;

  /* Layout */
  --radius:          10px;
  --radius-sm:       6px;
  --header-h:        52px;
  --tabbar-h:        64px;
  --gap:             12px;
}

/* ── Base ──────────────────────────────────────────────────────────────────── */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-ui);
  min-height: 100vh;
  overscroll-behavior: none;
}

/* Grain overlay — matches 9irl.com */
.grain {
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23g)' opacity='0.025'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 900;
}

/* ── App shell layout ──────────────────────────────────────────────────────── */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--cream-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.back-link {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.back-link:hover { color: var(--accent); }

.app-name {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.app-name-serif {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--ink);
}

.online-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}
.online-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  animation: breathe 2.8s ease-in-out infinite;
}
.online-dot.offline { background: var(--cream-border); animation: none; }
@keyframes breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.8); }
}

/* ── Main view area ─────────────────────────────────────────────────────────── */
#main-view {
  flex: 1;
  margin-top: var(--header-h);
  margin-bottom: var(--tabbar-h);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px 24px;
}

/* ── Tab bar ────────────────────────────────────────────────────────────────── */
.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tabbar-h);
  z-index: 100;
  background: var(--cream);
  border-top: 1px solid var(--cream-border);
  display: flex;
  align-items: stretch;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color: var(--ink-muted);
  transition: color 0.15s;
}
.tab[aria-selected="true"] { color: var(--accent); }
.tab:hover { color: var(--ink-mid); }
.tab[aria-selected="true"]:hover { color: var(--accent); }

.tab-icon { flex-shrink: 0; }
.tab-label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── View transitions ───────────────────────────────────────────────────────── */
.view-enter {
  animation: viewIn 0.22s ease both;
}
@keyframes viewIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Section title ──────────────────────────────────────────────────────────── */
.view-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 20px;
}

/* ── Date navigation (Log view) ─────────────────────────────────────────────── */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 10px 14px;
}

.date-nav-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--ink-muted);
  transition: background 0.15s, color 0.15s;
}
.date-nav-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.date-nav-btn:disabled { opacity: 0.3; cursor: default; }

.date-nav-center {
  text-align: center;
}
.date-nav-day {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: block;
}
.date-nav-date {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
}
.date-nav-today {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 1px;
  display: block;
}

/* ── Indicator cards (Log view) ─────────────────────────────────────────────── */
.indicator-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  margin-bottom: var(--gap);
  overflow: hidden;
  transition: box-shadow 0.18s;
}
.indicator-card:focus-within { box-shadow: var(--card-shadow); }

.ind-card-header {
  display: flex;
  align-items: center;
  padding: 14px 14px 12px;
  gap: 10px;
}

.ind-colour-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ind-card-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  flex: 1;
}

.ind-card-value {
  font-size: 0.8rem;
  color: var(--ink-muted);
  font-weight: 400;
}

.ind-card-body {
  padding: 0 14px 14px;
}

/* Scale buttons — 1-5 and 1-10 */
.scale-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.scale-btn {
  flex: 1;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--card-border);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-mid);
  background: var(--cream);
  transition: all 0.12s;
  min-width: 0;
}
.scale-btn.active {
  color: #fff;
  border-color: transparent;
}
.scale-btn:hover:not(.active) {
  border-color: var(--ink-muted);
  background: var(--accent-soft);
}

/* Scale 1-10: smaller buttons */
.scale-10 .scale-btn {
  height: 30px;
  font-size: 0.72rem;
}

/* Yes/No toggle */
.yn-buttons {
  display: flex;
  gap: 8px;
}
.yn-btn {
  flex: 1;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--card-border);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink-mid);
  background: var(--cream);
  transition: all 0.12s;
  letter-spacing: 0.04em;
}
.yn-btn.active-yes {
  background: var(--green);
  border-color: transparent;
  color: #fff;
}
.yn-btn.active-no {
  background: var(--ink-mid);
  border-color: transparent;
  color: #fff;
}
.yn-btn:hover:not(.active-yes):not(.active-no) {
  border-color: var(--ink-muted);
  background: var(--accent-soft);
}

/* Number input */
.number-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.number-input {
  width: 100px;
  height: 36px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--cream);
  padding: 0 10px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
  text-align: center;
  transition: border-color 0.15s;
  -moz-appearance: textfield;
}
.number-input::-webkit-outer-spin-button,
.number-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.number-input:focus {
  outline: none;
  border-color: var(--accent);
}
.number-unit {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

/* Note row */
.note-row {
  padding: 0 14px 12px;
}
.note-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--ink-muted);
  letter-spacing: 0.03em;
  transition: color 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.note-toggle:hover { color: var(--accent); }
.note-area {
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--cream);
  font-size: 0.82rem;
  color: var(--ink);
  line-height: 1.5;
  resize: none;
  min-height: 60px;
  transition: border-color 0.15s;
}
.note-area:focus {
  outline: none;
  border-color: var(--accent);
}
.note-area.hidden { display: none; }

/* ── Empty states ───────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}
.empty-state-title {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--ink-mid);
  margin-bottom: 8px;
}
.empty-state-body {
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 18px;
  height: 40px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 0.15s;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1.5px solid var(--accent);
}
.btn-primary:hover { background: #a34e2e; border-color: #a34e2e; }

.btn-ghost {
  background: transparent;
  color: var(--ink-mid);
  border: 1.5px solid var(--card-border);
}
.btn-ghost:hover { border-color: var(--ink-muted); color: var(--ink); }

.btn-danger {
  background: var(--red);
  color: #fff;
  border: 1.5px solid var(--red);
}
.btn-danger:hover { background: #b04460; }

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 0.75rem;
}

/* FAB — add indicator */
.fab {
  position: fixed;
  bottom: calc(var(--tabbar-h) + 16px);
  right: 20px;
  z-index: 90;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(184,92,56,0.4);
  transition: transform 0.15s, box-shadow 0.15s;
  border: none;
  cursor: pointer;
}
.fab:hover { transform: scale(1.07); box-shadow: 0 6px 20px rgba(184,92,56,0.5); }
.fab:active { transform: scale(0.96); }

/* ── Indicators list (Indicators view) ──────────────────────────────────────── */
.indicators-list { margin-bottom: 80px; }

.ind-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: var(--gap);
  transition: box-shadow 0.15s;
}
.ind-list-item.inactive { opacity: 0.5; }

.ind-list-colour {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ind-list-info { flex: 1; min-width: 0; }
.ind-list-name {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ind-list-type {
  font-size: 0.67rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 2px;
}

.ind-list-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  transition: background 0.12s, color 0.12s;
  cursor: pointer;
  border: none;
  background: none;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--accent); }
.icon-btn.danger:hover { background: #FCE8ED; color: var(--red); }

/* Active toggle */
.toggle {
  position: relative;
  width: 36px; height: 20px;
  flex-shrink: 0;
}
.toggle input {
  opacity: 0;
  width: 0; height: 0;
  position: absolute;
}
.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--cream-border);
  border-radius: 10px;
  transition: background 0.2s;
  cursor: pointer;
}
.toggle input:checked + .toggle-track { background: var(--green); }
.toggle-thumb {
  position: absolute;
  width: 14px; height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px; left: 3px;
  transition: transform 0.2s;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle input:checked ~ .toggle-thumb { transform: translateX(16px); }

/* Reorder buttons */
.reorder-btns {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-shrink: 0;
}
.reorder-btn {
  width: 20px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-muted);
  border-radius: 3px;
  transition: background 0.1s;
  cursor: pointer;
  border: none;
  background: none;
}
.reorder-btn:hover:not(:disabled) { background: var(--accent-soft); color: var(--accent); }
.reorder-btn:disabled { opacity: 0.2; cursor: default; }

/* ── Insights view ──────────────────────────────────────────────────────────── */
.range-pills {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}
.range-pill {
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border: 1.5px solid var(--card-border);
  color: var(--ink-muted);
  background: var(--card-bg);
  transition: all 0.15s;
  cursor: pointer;
}
.range-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.range-pill:hover:not(.active) { border-color: var(--ink-muted); color: var(--ink); }

.chart-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 16px 16px 8px;
  margin-bottom: 16px;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--ink-mid);
}
.legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.chart-wrap {
  position: relative;
  width: 100%;
  height: 200px;
}
#chart-canvas {
  display: block;
}

.insights-section-title {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 20px 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.insights-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--accent-soft);
}

/* Correlation pairs */
.corr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  margin-bottom: 8px;
}
.corr-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 12px;
}
.corr-pair {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  color: var(--ink-mid);
  margin-bottom: 8px;
}
.corr-pair-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.corr-value {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 4px;
}
.corr-value.positive { color: var(--green); }
.corr-value.negative { color: var(--red); }
.corr-label {
  font-size: 0.68rem;
  color: var(--ink-muted);
  line-height: 1.4;
}

/* Summary table */
.summary-table {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}
.summary-row {
  display: grid;
  grid-template-columns: 1fr 60px 60px 60px 60px;
  gap: 0;
  padding: 10px 14px;
  border-bottom: 1px solid var(--cream-border);
  align-items: center;
}
.summary-row:last-child { border-bottom: none; }
.summary-row.header {
  background: var(--cream);
  padding: 7px 14px;
}
.summary-row.header span {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-align: right;
}
.summary-row.header span:first-child { text-align: left; }

.summary-ind-name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.summary-val {
  font-size: 0.78rem;
  color: var(--ink-mid);
  text-align: right;
}

/* Insufficient data notice */
.insight-notice {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.82rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* ── Modal ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.modal-overlay.hidden {
  pointer-events: none;
  visibility: hidden;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28,23,18,0.4);
  opacity: 0;
  transition: opacity 0.25s;
}
.modal-overlay:not(.hidden) .modal-backdrop { opacity: 1; }

.modal-sheet {
  position: relative;
  background: var(--cream);
  border-radius: 16px 16px 0 0;
  padding: 20px 20px 32px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.32,0.72,0,1);
}
.modal-overlay:not(.hidden) .modal-sheet { transform: translateY(0); }

.modal-handle {
  width: 40px; height: 4px;
  background: var(--cream-border);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 20px;
}

/* Form */
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 7px;
}
.form-label .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.68rem;
  color: var(--ink-muted);
  opacity: 0.7;
}

.form-input {
  width: 100%;
  height: 42px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  padding: 0 12px;
  font-size: 0.9rem;
  color: var(--ink);
  transition: border-color 0.15s;
}
.form-input:focus {
  outline: none;
  border-color: var(--accent);
}
.form-input::placeholder { color: var(--ink-muted); }

.type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.type-btn {
  padding: 10px 8px;
  border: 1.5px solid var(--card-border);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-mid);
  background: var(--card-bg);
  transition: all 0.12s;
  cursor: pointer;
}
.type-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}
.type-btn:hover:not(.active) { border-color: var(--ink-muted); }

/* Colour picker */
.colour-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.colour-swatch {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: transform 0.12s, border-color 0.12s;
  flex-shrink: 0;
}
.colour-swatch.selected {
  border-color: var(--ink);
  transform: scale(1.15);
}
.colour-swatch:hover:not(.selected) { transform: scale(1.08); }

/* Modal actions */
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}
.modal-actions .btn { flex: 1; }

/* Delete confirm */
.delete-confirm-body {
  padding: 8px 0 4px;
  font-size: 0.88rem;
  color: var(--ink-mid);
  line-height: 1.6;
}
.delete-confirm-body strong { color: var(--ink); }

/* ── Data footer note ────────────────────────────────────────────────────────── */
.data-notice {
  margin-top: 32px;
  padding: 14px;
  border-top: 1px solid var(--cream-border);
  font-size: 0.67rem;
  color: var(--ink-muted);
  line-height: 1.6;
  text-align: center;
}

/* Export button row */
.export-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

/* ── Utility ─────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (min-width: 600px) {
  #main-view { padding: 24px 24px 32px; }

  .corr-grid { grid-template-columns: 1fr 1fr 1fr; }
  .chart-wrap { height: 260px; }

  .modal-sheet {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 16px;
    margin-bottom: 40px;
  }
  .modal-overlay {
    justify-content: center;
    align-items: center;
  }

  .fab { right: 24px; }
}

@media (max-width: 360px) {
  .corr-grid { grid-template-columns: 1fr; }
  .summary-row { grid-template-columns: 1fr 52px 52px 52px 52px; }
}
