/* Life OS — Flagship Apple HIG / OLED Monochrome */

:root {
  --bg: #000000;
  --surface: #111113;
  --surface-solid: #111113;
  --surface-2: rgba(255, 255, 255, 0.055);
  --surface-3: rgba(255, 255, 255, 0.11);
  --line: rgba(255, 255, 255, 0.06);
  --line-top: rgba(255, 255, 255, 0.15);
  --shadow-card: 0 12px 32px -12px rgba(0, 0, 0, 0.9);
  --shadow-float: 0 20px 48px -12px rgba(0, 0, 0, 0.95);

  --text: #ffffff;
  --muted: #8e8e93;
  --accent: #ffffff;
  --accent-bright: #ffffff;
  --accent-soft: rgba(255, 255, 255, 0.1);
  --on-accent: #000000;

  --pos: #5ce69c;
  --neg: #ff6b7a;

  --r-sheet: 32px;
  --r-card: 24px;
  --r-tile: 20px;
  --r-ctl: 14px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  --spring: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: dark;
}

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

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  touch-action: manipulation;
}

button, .btn, .pill, .nav-btn, .habit-circle, .subnav-btn, .calc-key, .cat-tile, .fin-split-box, .habit-orb, .habit-dock-card, .week-day-pill {
  touch-action: manipulation;
}

body {
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.42;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* ---------- Layout & Header ---------- */

.app-shell {
  max-width: 500px;
  margin: 0 auto;
  /* pb-28 (112px) + safe-area so scrollable lists never collide with the floating dock */
  padding: calc(20px + var(--safe-t)) 16px calc(116px + var(--safe-b));
}

header {
  padding: 2px 4px 6px;
}

header h1, #screen-title {
  font-size: 28px !important;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--text);
}

#screen-content {
  animation: viewFade 0.24s var(--spring);
}

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

.stack { display: flex; flex-direction: column; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.muted { color: var(--muted); font-size: 13px; }
h3 { font-weight: 600; letter-spacing: -0.02em; }

/* Muted currency codes & units (USD, ml, kg, min) */
.unit-muted {
  font-size: 0.74em;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-left: 2px;
}

/* ---------- OLED Charcoal Surfaces with Specular Top Edge ---------- */

.glass {
  background: var(--surface);
  border-top: 1px solid var(--line-top);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  border-radius: var(--r-card);
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.15s ease;
}
.row:last-child { border-bottom: 0; }
.glass .row:first-of-type { padding-top: 6px; }

/* ---------- Controls ---------- */

.btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  padding: 10px 15px;
  border-radius: var(--r-ctl);
  cursor: pointer;
  transition: transform 0.15s var(--spring), background 0.15s ease;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.96); }

.btn-primary {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  border: 0;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.14);
}
.btn-primary:hover { background: #f2f2f7; }

.input {
  width: 100%;
  min-width: 0;
  background: #0a0a0c;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-ctl);
  padding: 11px 14px;
  font: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.input::placeholder { color: var(--muted); opacity: 0.75; }
.input:focus {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-2);
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 999px;
  hyphens: none;
  -webkit-hyphens: none;
  word-break: normal;
  transition: all 0.18s var(--spring);
}
button.pill, label.pill { cursor: pointer; }
.pill.active {
  background: #ffffff;
  color: #000000;
  border-color: transparent;
  font-weight: 600;
}

input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03) center / 12px no-repeat;
  cursor: pointer;
  transition: all 0.2s var(--spring);
}
input[type="checkbox"]:checked {
  background-color: #ffffff;
  border-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000000' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 16px;
  padding-right: 34px;
}

/* ---------- Adaptive Text Wrap (No Hyphenation) ---------- */

.wrap-fit {
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
  line-height: 1.25;
}
.wrap-fit.sm-fit { font-size: 12.5px; }
.wrap-fit.xs-fit { font-size: 11px; line-height: 1.2; }

/* ---------- Habits (Week Strip + Hold Orb + Bottom Dock) ---------- */

.habit-ico-box {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  flex: none;
  color: #ffffff;
}

.habit-ico-box svg {
  width: 16px;
  height: 16px;
}

.habit-circle {
  appearance: none;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--spring), background 0.2s ease, border-color 0.2s ease;
}
.habit-circle:active { transform: scale(0.92); }
.habit-circle.partial { border-color: #ffffff; color: #ffffff; }
.habit-circle.done {
  background: #ffffff;
  border-color: transparent;
  color: #000000;
  font-size: 15px;
}

.habit-week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 12px;
}

.week-day-pill {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  border-radius: 18px;
  padding: 8px 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s var(--spring);
}
.week-day-pill.selected {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--text);
}
.week-day-ring {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
}
.week-day-pill.done .week-day-ring {
  background: #ffffff;
  border-color: transparent;
  color: #000000;
}
.week-day-pill.partial .week-day-ring {
  border-color: #ffffff;
  color: #ffffff;
}

.habit-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 26px 16px 22px;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.habit-orb-wrap {
  position: relative;
  width: 224px;
  height: 224px;
  display: grid;
  place-items: center;
}

.habit-particles {
  position: absolute;
  inset: -34px;
  width: 292px;
  height: 292px;
  pointer-events: none;
  z-index: 2;
}

.habit-orb {
  position: relative;
  width: 204px;
  height: 204px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: radial-gradient(circle at 50% 25%, #1d1d21 0%, #0d0d0f 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), inset 0 1px 2px rgba(255, 255, 255, 0.16);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  z-index: 3;
  transition: transform 0.24s var(--spring), box-shadow 0.24s ease, background 0.3s ease;
}
.habit-orb.holding {
  transform: scale(0.94);
  box-shadow: 0 0 36px rgba(255, 255, 255, 0.22), inset 0 1px 4px rgba(255, 255, 255, 0.24);
}
.habit-orb.completed {
  background: #ffffff;
  border-color: #ffffff;
  color: #000000;
  box-shadow: 0 0 42px rgba(255, 255, 255, 0.28);
}

.habit-orb-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%) rotate(-90deg);
  pointer-events: none;
  z-index: 4;
}

.habit-orb-check {
  font-size: 42px;
  font-weight: 600;
  line-height: 1;
  margin-bottom: 4px;
}

.habit-dock {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.habit-dock-card {
  position: relative;
  min-height: 68px;
  padding: 10px 8px;
  border-radius: 18px;
  background: var(--surface);
  border-top: 1px solid var(--line-top);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-align: center;
  hyphens: none;
  -webkit-hyphens: none;
  word-break: normal;
  cursor: pointer;
  transition: transform 0.16s var(--spring), border-color 0.18s ease, background 0.18s ease;
}
.habit-dock-card:active { transform: scale(0.95); }
.habit-dock-card.active {
  border-color: rgba(255, 255, 255, 0.55);
  background: #1a1a1e;
}
.habit-dock-card.done-card::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 10px;
  font-weight: 600;
  color: #ffffff;
}
.habit-dock-card.add-card {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
  font-size: 22px;
  font-weight: 500;
  color: var(--muted);
}

/* ---------- Gym ---------- */

.muscle-svg { max-width: 100%; height: auto; }
.pr-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 2px 8px;
  border-radius: 7px;
  vertical-align: 1px;
}

/* ---------- Floating Liquid Glass Bottom Nav ---------- */

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + var(--safe-b));
  transform: translateX(-50%);
  width: min(calc(100% - 28px), 440px);
  justify-content: space-between;
  gap: 4px;
  padding: 7px;
  background: rgba(17, 17, 19, 0.82);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  backdrop-filter: blur(28px) saturate(160%);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-float);
  border-radius: 30px;
  z-index: 20;
}

.nav-btn {
  appearance: none;
  flex: 1;
  height: 46px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 23px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.18s ease, background 0.2s var(--spring), transform 0.15s var(--spring);
}
.nav-btn:active { transform: scale(0.92); }
.nav-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-btn.active {
  color: #000000;
  background: #ffffff;
}

/* ---------- Bottom Sheet ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
  z-index: 50;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet.glass {
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px 20px calc(24px + var(--safe-b));
  border-radius: var(--r-sheet) var(--r-sheet) 0 0;
  border-bottom: 0;
  background: #111113;
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.9);
  transform: translateY(100%);
  transition: transform 0.32s var(--spring);
  position: relative;
}
.sheet-backdrop.open .sheet.glass { transform: translateY(0); }
.sheet.glass::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 38px;
  height: 4px;
  margin-left: -19px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.2);
}

:focus-visible { outline: 2px solid #ffffff; outline-offset: 2px; }
.input:focus-visible { outline: none; }

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

/* ---------- Layout helpers ---------- */

.pad { padding: 18px; }
.mb { margin-bottom: 12px; }
.mb-s { margin-bottom: 8px; }
.mb-xs { margin-bottom: 4px; }
.mt { margin-top: 10px; }
.mt-xs { margin-top: 4px; }
.flex { display: flex; }
.between { justify-content: space-between; }
.center { align-items: center; }
.baseline { align-items: baseline; }
.start { align-items: flex-start; }
.wrap { flex-wrap: wrap; }
.gap { gap: 8px; }
.c { text-align: center; }
.fw { font-weight: 600; }
.sm { font-size: 12px; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.overdue { color: var(--neg); }
.pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pills.tight { margin-top: 0; }
.pills.mb { margin-bottom: 12px; }
.big { font-size: 28px; font-weight: 600; letter-spacing: -0.025em; margin-top: 2px; }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.empty { color: var(--muted); padding: 28px 8px; text-align: center; line-height: 1.5; }
.center-row { display: flex; justify-content: center; margin-top: 14px; }
.sheet h3 { margin: 0 0 6px; font-size: 20px; }

.btn-icon { padding: 8px 11px; min-width: 38px; }
.btn-danger { color: var(--neg); }
.btn[disabled] { opacity: 0.35; pointer-events: none; }
.pill-check { gap: 8px; }

/* ---------- Tasks ---------- */

.task-main { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; cursor: pointer; }
.task-main span { overflow-wrap: break-word; word-break: normal; }
.is-done { text-decoration: line-through; opacity: 0.42; }

/* ---------- Progress bars & rings ---------- */

.bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: #ffffff;
  border-radius: 99px;
  transition: width 0.45s var(--spring);
}
.bar.thin { height: 4px; margin-top: 6px; }
.cats { margin-top: 16px; display: flex; flex-direction: column; gap: 13px; }

.ring-wrap { position: relative; width: 120px; height: 120px; flex: none; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 8; }
.ring-fill { fill: none; stroke: #ffffff; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.5s var(--spring); }
.ring-fill.rf1 { stroke: #a1a1aa; }
.ring-fill.rf2 { stroke: #52525b; }
.ring-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

/* ---------- Today Daily Score Card ---------- */

.today-top {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 16px;
  align-items: center;
}
.today-metrics {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}
.mini-metric-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mini-metric-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}
.today-sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.today-more-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 2px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.today-more-link:hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); }
.today-water-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.today-quick-dock {
  margin-top: 12px;
}

/* ---------- Gym helpers ---------- */

.stats3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.chip-line {
  padding: 10px 8px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
  font-size: 13px;
  overflow-wrap: break-word;
}

/* ---------- Finance mini-app ---------- */

.subnav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  margin-bottom: 12px;
  background: #111113;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.subnav-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 4px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.18s var(--spring);
}
.subnav-btn.active {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
}

.fin-hero {
  text-align: center;
  padding: 18px;
}
.fin-balance {
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 2px 0 12px;
}
.month-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.fin-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #09090b;
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 18px;
}
.fin-split-box {
  padding: 10px 8px;
  border-radius: 13px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s var(--spring);
}
.fin-split-box.active {
  background: #1c1c20;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cat-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px;
  border-radius: var(--r-tile);
  background: var(--surface);
  border-top: 1px solid var(--line-top);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: transform 0.16s var(--spring);
}
.cat-tile:active { transform: scale(0.96); }
.cat-tile.add-tile {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: none;
  justify-content: center;
  color: var(--muted);
}
.cat-ico {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex: none;
}
.cat-meta { min-width: 0; flex: 1; }
.cat-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.22;
  white-space: normal;
  overflow-wrap: break-word;
}
.cat-name.compact { font-size: 12px; }
.cat-amt { font-size: 13px; margin-top: 2px; color: var(--text); }

.donut-wrap { position: relative; width: 204px; height: 204px; margin: 4px auto 14px; }
.donut-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
}

.op-day-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 12px 2px 6px;
  border-bottom: 1px solid var(--line);
  margin-top: 8px;
}
.op-day-num { font-size: 20px; font-weight: 600; margin-right: 8px; letter-spacing: -0.02em; }

.swatch-row { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--spring);
}
.swatch.active { border-color: #fff; transform: scale(1.1); }

.ico-pick {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1.5px solid transparent;
  display: grid;
  place-items: center;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s var(--spring);
}
.ico-pick.active { border-color: #ffffff; background: rgba(255, 255, 255, 0.14); }

/* Calculator keypad */
.calc-pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.calc-box {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px 12px;
}
.calc-display {
  background: #0a0a0c;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 13px 14px;
  text-align: center;
  margin-bottom: 10px;
}
.calc-val { font-size: 28px; font-weight: 600; letter-spacing: -0.03em; }
.calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-key {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-size: 20px;
  font-weight: 500;
  height: 52px;
  border-radius: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.12s var(--spring), background 0.12s ease;
}
.calc-key:active { transform: scale(0.94); background: var(--surface-3); }
.calc-key.op {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.11);
}
.calc-key.ok {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
  border: 0;
  grid-row: span 2;
  height: auto;
}

/* ---------- Sync & Toast ---------- */

#sync-btn[data-state="offline"] { color: #f4b860; border-color: rgba(244, 184, 96, 0.3); }

#toast {
  position: fixed;
  left: 50%;
  top: calc(16px + var(--safe-t));
  bottom: auto;
  transform: translate(-50%, -18px) scale(0.94);
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border-radius: 999px;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s var(--spring);
  z-index: 80;
}
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
