/* ============================================================
   Kernel Health — "Hunter System" theme
   Solo-Leveling inspired: deep blue-black, electric-cyan neon
   glow, thin angular borders, dot-matrix (Doto) type.
   ============================================================ */
:root {
  --bg: #000000;
  --surface: #0e0e0e;
  --surface-2: #161616;
  --surface-3: #202020;
  --text: #f4f4f4;
  --muted: #c2c2c2;        /* secondary text — kept clearly legible on black */
  --cyan: #ffffff;         /* accent (kept name; now white) */
  --cyan-bright: #ffffff;
  --line: rgba(255, 255, 255, 0.22);
  --line-strong: rgba(255, 255, 255, 0.6);
  --glow: rgba(255, 255, 255, 0.35);
  --glow-soft: rgba(255, 255, 255, 0.12);
  --danger: #e88;
  --radius: 4px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Doto', 'Courier New', monospace;
  font-weight: 500;
  letter-spacing: 0.02em;
  overscroll-behavior-y: none;
  /* ambient top glow, like the site's header bloom */
  background-image:
    radial-gradient(120% 55% at 50% -10%, rgba(255, 255, 255, 0.08), transparent 60%);
  background-attachment: fixed;
}

button { font-family: inherit; cursor: pointer; color: inherit; }

/* neon helpers */
.glow { text-shadow: 0 0 6px var(--glow), 0 0 16px var(--glow-soft); }

/* ---------- Gates (login + PIN) ---------- */
.gate {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(100% 50% at 50% 0%, rgba(255, 255, 255, 0.06), transparent 60%),
    var(--bg);
  z-index: 20;
}
.gate-card { width: 100%; max-width: 340px; text-align: center; }
.logo { font-size: 46px; filter: grayscale(1) brightness(1.4) drop-shadow(0 0 14px var(--glow)); }
.logo-img {
  height: 168px; width: auto; display: block; margin: 0 auto 6px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.18));
}
.gate-card h1 {
  font-family: 'Doto', monospace;
  font-weight: 900;
  font-size: 26px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 14px 0 22px;
  color: var(--cyan-bright);
  text-shadow: 0 0 8px var(--glow), 0 0 22px var(--glow-soft);
}
.muted { color: var(--muted); margin-top: -10px; letter-spacing: 0.08em; }

form { display: flex; flex-direction: column; gap: 12px; }
input {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  letter-spacing: 0.05em;
}
input::placeholder { color: var(--muted); }
input:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 1px var(--line-strong), 0 0 14px var(--glow-soft);
}

.btn-primary {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0.12));
  color: var(--cyan-bright);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 14px;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 0 8px var(--glow);
  box-shadow: 0 0 18px var(--glow-soft), inset 0 0 14px rgba(255, 255, 255, 0.08);
}
.btn-primary:active { box-shadow: 0 0 26px var(--glow); }
.btn-primary:disabled { opacity: 0.5; }
.btn-text {
  background: none; border: none;
  color: var(--muted);
  margin-top: 18px; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: underline;
}
.error { color: var(--danger); font-size: 13px; margin: 4px 0 0; letter-spacing: 0.05em; }

/* ---------- PIN keypad ---------- */
.pin-dots { display: flex; gap: 18px; justify-content: center; margin: 22px 0; }
.pin-dots span {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1px solid var(--line-strong);
}
.pin-dots span.filled {
  background: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 10px var(--glow), 0 0 20px var(--glow-soft);
}
.keypad {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; max-width: 260px; margin: 8px auto 0;
}
.keypad button {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--cyan-bright);
  font-family: inherit; font-weight: 700;
  font-size: 24px; padding: 16px 0; border-radius: 50%;
  aspect-ratio: 1;
  text-shadow: 0 0 6px var(--glow-soft);
}
.keypad button:active {
  border-color: var(--line-strong);
  box-shadow: 0 0 16px var(--glow-soft);
}
.keypad button.blank { background: none; border: none; pointer-events: none; }

/* ---------- App chrome ---------- */
#app { display: flex; flex-direction: column; height: 100%; }
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: max(16px, env(safe-area-inset-top)) 20px 12px;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 var(--glow-soft), 0 6px 22px -10px var(--glow-soft);
}
.app-header h1 {
  font-weight: 900; font-size: 24px; margin: 0;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--cyan-bright);
  text-shadow: 0 0 8px var(--glow), 0 0 22px var(--glow-soft);
}
.icon-btn { background: none; border: none; font-size: 20px; filter: grayscale(1) brightness(1.5); }

.view { flex: 1; overflow-y: auto; padding: 14px 16px 24px; }

.banner {
  margin: 0 16px 10px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  font-size: 13px; letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cyan-bright);
  box-shadow: 0 0 16px var(--glow-soft);
}
.banner.error { border-color: rgba(255, 140, 140, 0.5); background: rgba(255, 120, 120, 0.1); color: #ffd0d0; }

/* ---------- Tab bar ---------- */
.tabbar {
  display: flex;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent), var(--surface);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -1px 0 var(--glow-soft);
}
.tab {
  flex: 1; background: none; border: none;
  color: var(--muted);
  padding: 10px 0;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
}
.tab .tab-ico { display: inline-flex; opacity: 0.6; }
.tab .tab-ico svg { width: 22px; height: 22px; }
.tab.active { color: var(--cyan-bright); text-shadow: 0 0 8px var(--glow); }
.tab.active .tab-ico { opacity: 1; filter: drop-shadow(0 0 5px var(--glow)); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px; margin-bottom: 12px;
  /* clipped top-right corner — the "system window" look */
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
}
.card::before {
  /* faint inner border glow */
  content: ""; position: absolute; inset: 0;
  border-radius: var(--radius); pointer-events: none;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.04);
}
.card.tappable:active { border-color: var(--line-strong); box-shadow: 0 0 20px var(--glow-soft); }
.card-title {
  font-size: 17px; font-weight: 700; margin: 0;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--cyan-bright);
}
.chip {
  display: inline-block;
  border: 1px solid var(--line-strong);
  color: var(--cyan-bright);
  border-radius: 999px; padding: 3px 12px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  text-shadow: 0 0 6px var(--glow-soft);
}
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sub { color: var(--muted); font-size: 13px; margin: 8px 0 0; letter-spacing: 0.04em; }
.accent { color: var(--cyan); text-shadow: 0 0 8px var(--glow-soft); }
.stack { display: flex; flex-direction: column; }

.btn-outline {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-strong);
  color: var(--cyan-bright);
  border-radius: var(--radius);
  padding: 14px; font-size: 13px; font-weight: 900;
  letter-spacing: 0.16em; text-transform: uppercase;
  text-shadow: 0 0 8px var(--glow-soft);
  margin-bottom: 16px;
}
.btn-outline:active { box-shadow: 0 0 18px var(--glow-soft); }

/* ---------- Set logging ---------- */
.set-head, .set-row {
  display: grid; grid-template-columns: 40px 1fr 1fr 40px;
  gap: 8px; align-items: center;
}
.set-head { color: var(--muted); font-size: 11px; margin: 10px 0 4px; letter-spacing: 0.12em; text-transform: uppercase; }
.set-row input { padding: 10px; text-align: center; font-size: 16px; min-width: 0; }
.set-row span { color: var(--cyan); font-size: 15px; text-align: center; }
.del { background: none; border: none; color: var(--muted); font-size: 16px; padding: 6px; }
.add-set {
  background: none; border: none; color: var(--cyan);
  font-family: inherit; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase;
  margin-top: 8px; padding: 6px 0; text-shadow: 0 0 6px var(--glow-soft);
}

/* ---------- Habits ---------- */
.habit { display: flex; align-items: center; gap: 12px; }
.habit .ico { font-size: 22px; width: 30px; text-align: center; filter: drop-shadow(0 0 6px var(--glow-soft)); }
.check {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: none;
  color: var(--bg); font-size: 15px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.check.done {
  background: var(--cyan); border-color: var(--cyan);
  box-shadow: 0 0 12px var(--glow), 0 0 24px var(--glow-soft);
  color: #000000;
}
.card.done { border-color: var(--line-strong); box-shadow: 0 0 18px var(--glow-soft); }

/* ---------- Sections, chips, buttons ---------- */
.section {
  color: var(--muted); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  margin: 18px 0 8px;
}
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip.mini { padding: 2px 8px; font-size: 10px; margin-top: 4px; align-self: flex-start; }
.btn-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.btn-2col .btn-outline, .btn-2col .btn-primary { margin-bottom: 0; }
.card.slim { padding: 12px 14px; clip-path: none; }

select {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 12px; color: var(--text); font-family: inherit; font-size: 15px; letter-spacing: 0.04em;
}
select:focus { outline: none; border-color: var(--line-strong); box-shadow: 0 0 12px var(--glow-soft); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid2 > *:first-child:nth-last-child(odd) { grid-column: 1 / -1; }

/* single-column labelled form field (no horizontal scroll) */
input, select, textarea { min-width: 0; max-width: 100%; }
.fld { display: block; text-align: left; margin-bottom: 10px; color: var(--muted); font-size: 12px; letter-spacing: 0.05em; }
.fld input, .fld select, .fld textarea { display: block; width: 100%; margin-top: 4px; }
textarea {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px; color: var(--text); font-family: inherit; font-size: 15px;
  letter-spacing: 0.04em; resize: vertical;
}
textarea:focus { outline: none; border-color: var(--line-strong); box-shadow: 0 0 12px var(--glow-soft); }
.sheet-card { overflow-x: hidden; }

/* ---------- AI actions (amber = spends credits) ---------- */
.btn-ai {
  display: block; width: 100%; margin-bottom: 12px;
  background: linear-gradient(180deg, rgba(245, 166, 35, 0.22), rgba(245, 166, 35, 0.08));
  color: #f7b955;
  border: 1px solid rgba(245, 166, 35, 0.7);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase;
  text-shadow: 0 0 8px rgba(245, 166, 35, 0.45);
  box-shadow: 0 0 16px rgba(245, 166, 35, 0.16);
}
.btn-ai:active { box-shadow: 0 0 24px rgba(245, 166, 35, 0.34); }
.btn-ai .credits {
  display: block; margin-top: 5px; font-size: 10px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: #f5a623; opacity: 0.9; text-shadow: none;
}

/* ---------- Fridge (RAG use-by) ---------- */
.check.on { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 12px var(--glow), 0 0 24px var(--glow-soft); color: #000; }
.check.on::after { content: "✓"; }
.section-row { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 8px; }
.rag {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  background: #6a6a6a; box-shadow: 0 0 8px currentColor;
}
.rag-red { background: #e5484d; color: #e5484d; }
.rag-amber { background: #f5a623; color: #f5a623; }
.rag-green { background: #46a758; color: #46a758; }
.rag-none { background: #6a6a6a; box-shadow: none; }
.rag-used { background: #3a3a3a; box-shadow: none; }
.fridge-item .row { gap: 10px; }
.fridge-item.used { opacity: 0.5; }
.fridge-item.used .stack > span:first-child { text-decoration: line-through; }

/* sheets reuse .gate; give scroll room */
.sheet-card { max-width: 380px; max-height: 90vh; overflow-y: auto; }
.pick-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}
.pick-row input { width: 18px; height: 18px; accent-color: var(--cyan); }
.pick-row span:nth-child(2) { flex: 1; }

/* ---------- Set check-off ---------- */
.set-row { grid-template-columns: 32px 1fr 1fr 32px; }
.setcheck {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid var(--line-strong); background: none; color: #000000; font-size: 14px;
}
.setcheck.done { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 10px var(--glow-soft); }
.set-done input { opacity: 0.55; }

/* ---------- 1RM / progress ---------- */
.tappable-title { cursor: pointer; }
.prog-arrow { color: var(--muted); font-weight: 400; }
.prog { font-size: 12px; margin-top: 2px; }
.prog .warn, .warn { color: var(--danger); }
.stat-big {
  text-align: center; font-size: 40px; font-weight: 900;
  color: var(--cyan-bright); text-shadow: 0 0 12px var(--glow); margin: 6px 0;
}
.stat-big span { font-size: 13px; color: var(--muted); text-shadow: none; letter-spacing: 0.1em; text-transform: uppercase; }
.spark { width: 100%; height: auto; display: block; margin: 8px 0 4px; }
.spark polyline { fill: none; stroke: var(--cyan); stroke-width: 2; }
.spark circle { fill: var(--cyan); }
.prog-list { margin-top: 10px; text-align: left; }
.prog-row {
  display: grid; grid-template-columns: 1fr auto auto auto; gap: 10px; align-items: center;
  padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.prog-row .sub { margin: 0; }

/* ---------- Nutrition totals ---------- */
.card.totals { text-align: center; }
.kcal { font-size: 40px; font-weight: 900; color: var(--cyan-bright); text-shadow: 0 0 12px var(--glow); }
.kcal span { font-size: 16px; color: var(--muted); text-shadow: none; }
.macros { display: flex; justify-content: space-around; margin-top: 12px; }
.macros div { display: flex; flex-direction: column; }
.macros b { font-size: 18px; color: var(--cyan); }
.macros span { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Calendar ---------- */
.cal-head { margin: 4px 0 14px; }
.nav-btn {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--cyan-bright);
  width: 40px; height: 36px; border-radius: var(--radius); font-size: 20px;
}
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-grid.dow { margin-bottom: 6px; }
.cal-dow { text-align: center; color: var(--muted); font-size: 11px; }
.cal-cell {
  aspect-ratio: 1; border: 1px solid var(--line); border-radius: 6px;
  background: var(--surface-2); position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  font-size: 13px;
}
.cal-cell.empty { border: none; background: none; }
.cal-cell.today { border-color: var(--line-strong); box-shadow: 0 0 12px var(--glow-soft); }
.cal-cell b { font-weight: 500; }
.rag-key { width: 22px; height: 8px; border-radius: 3px; display: inline-block; vertical-align: middle;
  background: linear-gradient(90deg, rgb(138,42,38), rgb(156,118,46), rgb(46,106,58)); }
.cal-ics { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; align-items: center; line-height: 1; max-width: 100%; }
.cal-ics svg { display: block; opacity: 0.92; }
.cal-ics span { line-height: 1; }
.cal-extra { font-size: 8px; color: var(--muted); font-style: normal; }
.cal-dots { display: flex; gap: 3px; height: 6px; }
.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot.w { background: #ffffff; box-shadow: 0 0 6px var(--glow); }
.dot.h { background: #8f8f8f; }
.dot.m { background: #545454; }
.dot.b { background: #6E8CA8; }
.dot.g { background: #C2A667; }
.legend { display: flex; gap: 16px; justify-content: center; margin-top: 16px; color: var(--muted); font-size: 12px; }
.legend span { display: flex; align-items: center; gap: 6px; }

/* ---------- Health placeholder ---------- */
.construction { text-align: center; margin-top: 60px; }
.c-ico { font-size: 56px; filter: grayscale(1) brightness(1.4) drop-shadow(0 0 16px var(--glow)); margin-bottom: 12px; }

/* ---------- Muscle heatmap ---------- */
.bodymap { width: 100%; max-width: 320px; height: auto; display: block; margin: 2px auto 4px; }
.heat-legend { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; }
.heat-bar { flex: 1; height: 8px; margin: 0 10px; border-radius: 4px;
  background: linear-gradient(90deg, #2b2b2b, rgb(59,111,224), rgb(240,160,32), rgb(226,59,59)); }
.heat-sub { display: flex; justify-content: space-around; color: var(--muted); font-size: 11px; letter-spacing: 0.16em; margin-top: 2px; }
.heat-list { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
/* exercise-picker filter chips */
.chip.fp { cursor: pointer; opacity: 0.5; padding: 3px 10px; }
.chip.fp.sel { opacity: 1; border-color: var(--line-strong); color: #fff; box-shadow: 0 0 10px var(--glow-soft); }
.ep-parts { margin: 10px 0 2px; }
.heat-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text); }
.heat-row i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.heat-row b { color: #fff; margin-left: 2px; }

/* ---------- Day detail ---------- */
.dd-row { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }

/* ---------- Habit icon picker ---------- */
.icon-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.icon-opt { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 0; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.icon-opt.sel { border-color: var(--line-strong); color: #fff; box-shadow: 0 0 10px var(--glow-soft); }
.del-habit { border: 1px solid rgba(255, 140, 140, 0.55) !important; color: #e88 !important; background: none; }
.habit .ico svg { display: block; }

/* ---------- Macro ratio ---------- */
.ratio-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; margin: 10px 0 8px; }
.ratio-bar span { display: block; height: 100%; }
.ratio-legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.ratio-legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 5px; }

/* ---------- Micronutrients ---------- */
.micro { margin: 10px 0; }
.micro-bar { height: 8px; background: var(--surface-3); border-radius: 4px; overflow: hidden; margin-top: 4px; }
.micro-bar span { display: block; height: 100%; background: #fff; }
/* goal progress states: green when a target is met, amber when a ceiling is exceeded */
.micro-bar.goal-good span { background: #6f9e6f; }
.micro-bar.goal-over span { background: #c99a4e; }
/* build-a-meal suggestion lists */
.gm-stats { display: flex; justify-content: space-around; margin-top: 12px; }
.gm-stat { display: flex; flex-direction: column; align-items: center; }
.gm-stat b { font-size: 20px; color: var(--cyan-bright); }
.gm-stat span { font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 2px; }
.water-btns { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.water-btns .btn-outline { margin: 0; padding: 12px 4px; font-size: 13px; }
.meal-list { text-align: left; margin: 4px 0 12px; padding-left: 20px; color: var(--text); font-size: 14px; }
.meal-list li { margin: 3px 0; letter-spacing: 0.02em; }

/* ---------- Habit history: 7-day strip + heatmap ---------- */
.hrow7 { display: flex; gap: 5px; margin-top: 8px; }
.hd { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); background: transparent; }
.hd.on { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 8px var(--glow-soft); }
.hd.today { outline: 1px solid var(--line-strong); outline-offset: 1px; }
.hgrid {
  display: grid; grid-template-rows: repeat(7, 12px); grid-auto-flow: column;
  grid-auto-columns: 12px; gap: 3px; margin-top: 8px;
  overflow-x: auto; padding-bottom: 4px; justify-content: start;
}
.hcell { width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); background: var(--surface-2); }
.hcell.on { background: var(--cyan); border-color: var(--cyan); box-shadow: 0 0 6px var(--glow-soft); }
.hcell.today { outline: 1px solid var(--line-strong); outline-offset: 1px; }
.hcell.future { border-color: transparent; background: transparent; pointer-events: none; }
.hcell[data-cell] { cursor: pointer; }
/* auto-complete habit markers */
.tr-up { color: #46a758; font-style: normal; }
.tr-down { color: #e5814d; font-style: normal; }
.auto-tag { color: var(--muted); font-size: 11px; letter-spacing: 0.06em; white-space: nowrap; }
.stack > .sub.auto-tag { margin-top: 3px; }
.check.auto { border-style: dashed; }
.check.auto.on { border-style: solid; }
/* filling progress ring for a >= auto habit that isn't met yet (--p = 0..100) */
.check.auto.prog {
  position: relative; border-style: solid; border-color: var(--line);
  background: conic-gradient(var(--cyan) calc(var(--p) * 1%), var(--surface-3) 0);
}
.check.auto.prog::after {
  content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--bg);
}

/* ---------- 5-tab sizing ---------- */
.tab { font-size: 9px; letter-spacing: 0.08em; }
.tab span:last-child { white-space: nowrap; }

.center-note { text-align: center; color: var(--muted); margin-top: 48px; white-space: pre-line; letter-spacing: 0.05em; }
.spinner {
  width: 26px; height: 26px; margin: 48px auto;
  border: 2px solid var(--surface-3); border-top-color: var(--cyan);
  border-radius: 50%; animation: spin 0.8s linear infinite;
  box-shadow: 0 0 14px var(--glow-soft);
}
@keyframes spin { to { transform: rotate(360deg); } }
