/* Yodha — design system. Dark-first, mobile-first, no build step. */

:root {
  --bg: #08080f;
  --bg-soft: #0d0d17;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-solid: #12121c;
  --surface-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.09);
  --text: #f4f4f8;
  --muted: #9b9bb0;
  --faint: #63637a;
  --indigo: #6e6bf2;
  --indigo-deep: #4f4ce0;
  --indigo-soft: rgba(110, 107, 242, 0.14);
  --gold: #e3b95c;
  --gold-soft: rgba(227, 185, 92, 0.13);
  --green: #34d399;
  --red: #f87171;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --nav-h: 68px;
  --header-h: 60px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

[data-theme="light"] {
  --bg: #f5f5f9;
  --bg-soft: #efeff5;
  --surface: rgba(255, 255, 255, 0.75);
  --surface-solid: #ffffff;
  --surface-strong: rgba(20, 20, 40, 0.06);
  --border: rgba(20, 20, 50, 0.1);
  --text: #14141d;
  --muted: #62627a;
  --faint: #9a9ab0;
  --indigo-soft: rgba(79, 76, 224, 0.1);
  --gold-soft: rgba(180, 135, 40, 0.12);
  --shadow: 0 12px 32px rgba(30, 30, 70, 0.12);
}

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

html, body { height: 100%; }
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  transition: background 0.25s ease, color 0.25s ease;
}

/* ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 320px at 15% -5%, rgba(110, 107, 242, 0.16), transparent 60%),
    radial-gradient(500px 300px at 90% 10%, rgba(227, 185, 92, 0.07), transparent 60%);
  z-index: 0;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(600px 320px at 15% -5%, rgba(110, 107, 242, 0.1), transparent 60%),
    radial-gradient(500px 300px at 90% 10%, rgba(227, 185, 92, 0.08), transparent 60%);
}

#app {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + 24px);
}

/* ---------- header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: calc(var(--header-h) + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: env(safe-area-inset-top) 20px 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.wordmark { display: flex; align-items: center; gap: 10px; }
.wordmark .logo-dot {
  width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(135deg, var(--indigo) 0%, var(--indigo-deep) 60%, #3730a3 100%);
  display: grid; place-items: center;
  box-shadow: 0 4px 14px rgba(110, 107, 242, 0.45);
}
.wordmark .logo-dot svg { width: 17px; height: 17px; }
.wordmark b { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.wordmark b em { font-style: normal; color: var(--gold); }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease;
}
.icon-btn:active { transform: scale(0.9); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- views ---------- */
main { padding: 0 16px; }
.view { display: none; animation: viewIn 0.28s ease; }
.view.active { display: block; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.section-title {
  font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--faint);
  margin: 26px 4px 12px;
}

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}

/* ---------- today view ---------- */
.date-pager {
  display: flex; align-items: center; justify-content: space-between;
  margin: 18px 2px 14px;
}
.date-pager .dlabel { text-align: center; }
.date-pager .dlabel .d1 { font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.date-pager .dlabel .d2 { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.score-hero {
  display: flex; align-items: center; gap: 18px;
  padding: 18px;
  margin-bottom: 6px;
  position: relative; overflow: hidden;
}
.score-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(240px 160px at 85% 20%, rgba(110,107,242,0.18), transparent 65%);
}
.ring-wrap { position: relative; width: 96px; height: 96px; flex: none; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-bg { stroke: var(--surface-strong); }
.ring-fg { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1); }
.ring-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 21px; font-weight: 800; letter-spacing: -0.02em;
}
.score-meta { min-width: 0; }
.score-meta .big { font-size: 15px; font-weight: 700; }
.score-meta .sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.score-meta .consistency {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 6px 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700;
  background: var(--gold-soft); color: var(--gold);
  border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
}

/* habit rows */
.habit-row {
  display: flex; align-items: center; gap: 14px;
  padding: 15px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease, background 0.2s ease;
  user-select: none;
}
.habit-row:active { transform: scale(0.985); }
.habit-row.done { border-color: color-mix(in srgb, var(--indigo) 45%, transparent); }
.habit-dot { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: 0 0 10px currentColor; }
.habit-info { flex: 1; min-width: 0; }
.habit-name { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.habit-row.done .habit-name { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 55%, transparent); }
.habit-sub { font-size: 12.5px; color: var(--faint); margin-top: 3px; display: flex; align-items: center; gap: 6px; }
.streak-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; color: var(--gold);
  background: var(--gold-soft);
  padding: 2px 8px; border-radius: 999px;
}
.streak-chip svg { width: 11px; height: 11px; }

.toggle {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  border: 2px solid var(--faint);
  background: transparent;
  display: grid; place-items: center;
  cursor: pointer;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
  color: #fff;
}
.toggle svg { width: 20px; height: 20px; opacity: 0; transform: scale(0.4); transition: opacity 0.15s ease, transform 0.25s cubic-bezier(0.34, 1.8, 0.64, 1); }
.toggle:active { transform: scale(0.85); }
.habit-row.done .toggle {
  background: linear-gradient(135deg, var(--indigo), var(--indigo-deep));
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(110, 107, 242, 0.5);
  animation: pop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.habit-row.done .toggle svg { opacity: 1; transform: scale(1); }
@keyframes pop {
  0% { transform: scale(0.7); }
  55% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* today's win */
.win-card { padding: 16px; margin-top: 6px; }
.win-card label { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.win-card textarea {
  width: 100%; margin-top: 10px;
  background: transparent; border: none; outline: none; resize: none;
  color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5;
  min-height: 52px;
}
.win-card textarea::placeholder { color: var(--faint); }

.add-habit-btn {
  width: 100%; margin-top: 12px;
  padding: 15px; border-radius: var(--radius);
  border: 1.5px dashed var(--border);
  background: transparent; color: var(--muted);
  font-family: var(--font); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: border-color 0.2s, color 0.2s, transform 0.12s;
}
.add-habit-btn:active { transform: scale(0.98); }
.add-habit-btn:hover { border-color: var(--indigo); color: var(--text); }

/* ---------- heatmap ---------- */
.heatmap-scroll { overflow-x: auto; padding: 4px 4px 8px; -webkit-overflow-scrolling: touch; }
.heatmap-inner { min-width: max-content; }
.heatmap { display: flex; gap: 4px; }
.hm-col { display: flex; flex-direction: column; gap: 4px; }
.hm-cell {
  width: 13px; height: 13px; border-radius: 4px;
  background: var(--surface-strong);
  cursor: pointer;
  transition: transform 0.12s ease;
}
.hm-cell:hover { transform: scale(1.25); }
.hm-cell.l1 { background: color-mix(in srgb, var(--indigo) 28%, transparent); }
.hm-cell.l2 { background: color-mix(in srgb, var(--indigo) 48%, transparent); }
.hm-cell.l3 { background: color-mix(in srgb, var(--indigo) 72%, transparent); }
.hm-cell.l4 { background: var(--indigo); box-shadow: 0 0 8px rgba(110,107,242,0.5); }
.hm-cell.l5 { background: var(--gold); box-shadow: 0 0 10px rgba(227,185,92,0.55); }
.hm-cell.future { opacity: 0.25; cursor: default; }
.hm-cell.selected { outline: 2px solid var(--gold); outline-offset: 1px; }
.hm-legend { display: flex; align-items: center; justify-content: flex-end; gap: 5px; font-size: 11.5px; color: var(--faint); margin-top: 10px; }
.hm-legend .hm-cell { cursor: default; width: 11px; height: 11px; }
.hm-months { display: flex; gap: 4px; font-size: 10.5px; color: var(--faint); margin-bottom: 6px; }
.hm-months span { flex: none; }

.streak-row {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px; margin-bottom: 9px;
}
.streak-row .habit-dot { width: 10px; height: 10px; }
.streak-row .nm { flex: 1; font-size: 15px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.streak-num { text-align: right; }
.streak-num .c { font-size: 17px; font-weight: 800; color: var(--gold); }
.streak-num .l { font-size: 11px; color: var(--faint); margin-top: 1px; }

/* ---------- stats ---------- */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { padding: 16px; }
.stat-card .v { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.stat-card .v small { font-size: 15px; font-weight: 700; color: var(--muted); }
.stat-card .k { font-size: 12.5px; color: var(--muted); margin-top: 5px; line-height: 1.4; }
.stat-card .v.gold { color: var(--gold); }
.stat-card .v.indigo { color: var(--indigo); }

.bar-row { margin-bottom: 14px; }
.bar-row .top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 7px; }
.bar-row .top .n { font-weight: 600; }
.bar-row .top .p { color: var(--muted); font-weight: 700; }
.bar-track { height: 9px; border-radius: 99px; background: var(--surface-strong); overflow: hidden; }
.bar-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--indigo-deep), var(--indigo));
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-fill.gold { background: linear-gradient(90deg, #b78a35, var(--gold)); }

.weekday-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; align-items: end; }
.wd-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wd-bar-wrap { height: 90px; display: flex; align-items: flex-end; width: 100%; }
.wd-bar {
  width: 100%; border-radius: 7px 7px 4px 4px; min-height: 5px;
  background: linear-gradient(180deg, var(--indigo), var(--indigo-deep));
  transition: height 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.wd-bar.best { background: linear-gradient(180deg, var(--gold), #b78a35); box-shadow: 0 0 12px rgba(227,185,92,0.4); }
.wd-lbl { font-size: 10.5px; color: var(--faint); font-weight: 700; }

/* ---------- settings ---------- */
.set-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; margin-bottom: 10px; gap: 12px;
}
.set-row .t { font-size: 15.5px; font-weight: 600; }
.set-row .d { font-size: 13px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.set-row.danger .t { color: var(--red); }

.switch { position: relative; width: 52px; height: 30px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 99px;
  background: var(--surface-strong); border: 1px solid var(--border);
  transition: background 0.25s ease;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.switch input:checked + .track { background: var(--indigo); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(22px); }

.btn {
  font-family: var(--font);
  border: none; cursor: pointer; border-radius: 14px;
  padding: 13px 20px; font-size: 15px; font-weight: 700;
  transition: transform 0.12s ease, opacity 0.2s ease, box-shadow 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--indigo), var(--indigo-deep));
  color: #fff; box-shadow: 0 8px 22px rgba(110, 107, 242, 0.4);
  width: 100%;
}
.btn-ghost {
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); width: 100%;
}
.btn-danger { background: rgba(248, 113, 113, 0.12); color: var(--red); border: 1px solid rgba(248,113,113,0.3); width: 100%; }

.about-card { padding: 18px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.6; }
.about-card b { color: var(--text); }

/* ---------- bottom nav ---------- */
nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(20px) saturate(1.5);
  -webkit-backdrop-filter: blur(20px) saturate(1.5);
  border-top: 1px solid var(--border);
}
.nav-inner {
  max-width: 560px; margin: 0 auto; height: var(--nav-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.nav-tab {
  background: none; border: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  color: var(--faint); font-family: var(--font); font-size: 11px; font-weight: 600;
  transition: color 0.2s ease;
  position: relative;
}
.nav-tab svg { width: 22px; height: 22px; transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-tab.active { color: var(--text); }
.nav-tab.active svg { transform: translateY(-1px); color: var(--indigo); }
.nav-tab.active::before {
  content: ""; position: absolute; top: 0;
  width: 26px; height: 3px; border-radius: 0 0 4px 4px;
  background: linear-gradient(90deg, var(--indigo), var(--gold));
}

/* ---------- modals ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(4, 4, 10, 0.6);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: none; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.22s ease;
}
.overlay.open { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%; max-width: 560px;
  max-height: 92dvh; overflow-y: auto;
  background: var(--surface-solid);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: 24px 24px 0 0;
  padding: 14px 20px calc(24px + env(safe-area-inset-bottom));
  animation: sheetUp 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes sheetUp { from { transform: translateY(60px); opacity: 0.5; } to { transform: none; opacity: 1; } }
.sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--surface-strong); margin: 0 auto 16px; }
.sheet h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 6px; }
.sheet p.sub { color: var(--muted); font-size: 14px; line-height: 1.55; margin: 0 0 18px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); margin-bottom: 8px; }
.field input[type="text"] {
  width: 100%; padding: 14px 16px;
  border-radius: 14px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  font-family: var(--font); font-size: 16px; outline: none;
  transition: border-color 0.2s ease;
}
.field input[type="text"]:focus { border-color: var(--indigo); }
.swatch-row { display: flex; gap: 10px; flex-wrap: wrap; }
.swatch {
  width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid transparent; cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
}
.swatch:active { transform: scale(0.88); }
.swatch.sel { border-color: #fff; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px currentColor; transform: scale(1.08); }
.sheet .row-btns { display: flex; gap: 10px; margin-top: 20px; }
.sheet .row-btns .btn { flex: 1; }

/* onboarding */
#onboarding {
  position: fixed; inset: 0; z-index: 60;
  background:
    radial-gradient(700px 420px at 50% -10%, rgba(110, 107, 242, 0.28), transparent 65%),
    radial-gradient(500px 380px at 85% 110%, rgba(227, 185, 92, 0.12), transparent 60%),
    var(--bg);
  display: none; align-items: center; justify-content: center;
  padding: 28px 22px;
  overflow-y: auto;
}
#onboarding.open { display: flex; animation: fadeIn 0.3s ease; }
.ob-inner { max-width: 420px; width: 100%; text-align: center; animation: viewIn 0.4s ease; }
.ob-logo {
  width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 22px;
  background: linear-gradient(135deg, var(--indigo), var(--indigo-deep) 65%, #2e2b8f);
  display: grid; place-items: center;
  box-shadow: 0 16px 44px rgba(110, 107, 242, 0.5);
}
.ob-logo svg { width: 40px; height: 40px; }
.ob-inner h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 10px; }
.ob-inner h1 em { font-style: normal; background: linear-gradient(120deg, var(--indigo), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ob-inner .tag { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0 0 30px; }
.ob-card {
  text-align: left; padding: 18px; margin-bottom: 12px; cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease;
}
.ob-card:active { transform: scale(0.98); }
.ob-card:hover { border-color: color-mix(in srgb, var(--indigo) 55%, transparent); }
.ob-card .t { font-size: 16.5px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.ob-card .t .n { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-size: 15px; flex: none; }
.ob-card .d { font-size: 13.5px; color: var(--muted); margin-top: 7px; line-height: 1.5; }
.ob-fine { margin-top: 22px; font-size: 12.5px; color: var(--faint); line-height: 1.6; }

/* share modal */
.share-preview { border-radius: 16px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 16px; background: #0b0b14; }
.share-preview canvas { width: 100%; height: auto; display: block; }
.share-type-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.share-type {
  padding: 13px; border-radius: 14px; text-align: center; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface);
  font-size: 14px; font-weight: 700; font-family: var(--font); color: var(--muted);
  transition: all 0.2s ease;
}
.share-type.sel { border-color: var(--indigo); color: var(--text); background: var(--indigo-soft); }

/* empty states */
.empty {
  text-align: center; padding: 44px 24px;
  color: var(--muted);
}
.empty .art {
  width: 84px; height: 84px; border-radius: 28px; margin: 0 auto 18px;
  background: var(--indigo-soft); display: grid; place-items: center;
  border: 1px dashed color-mix(in srgb, var(--indigo) 45%, transparent);
}
.empty .art svg { width: 38px; height: 38px; color: var(--indigo); }
.empty .t { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.empty .d { font-size: 14px; line-height: 1.6; margin-bottom: 20px; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 28px);
  transform: translateX(-50%) translateY(20px);
  background: var(--surface-solid); color: var(--text);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 12px 22px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); z-index: 70;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  max-width: 88vw; text-align: center;
  display: flex; align-items: center; gap: 8px;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; }

/* confirm modal */
.confirm-icon {
  width: 60px; height: 60px; border-radius: 20px; margin: 6px auto 16px;
  background: rgba(248, 113, 113, 0.12); display: grid; place-items: center;
  border: 1px solid rgba(248, 113, 113, 0.3);
}
.confirm-icon svg { width: 26px; height: 26px; color: var(--red); }
.confirm-body { text-align: center; }
.confirm-body p { color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.habit-edit-link {
  background: none; border: none; padding: 4px;
  color: var(--faint); cursor: pointer; border-radius: 8px;
  display: grid; place-items: center;
}
.habit-edit-link svg { width: 16px; height: 16px; }
.habit-edit-link:hover { color: var(--text); }

@media (min-width: 600px) {
  .overlay { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; border-bottom: 1px solid var(--border); }
}

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