/* Life OS — soft, calm, a little faded. One focal point at a time. */

:root {
  --bg: #F6F5F2;
  --app-bg: #FAFAF8;
  --nav-bg: rgba(250, 246, 236, 0.94);
  --nav-h: 62px;
  --panel: rgba(255, 255, 255, 0.65);
  --panel-2: rgba(255, 255, 255, 0.92);
  --line: rgba(28, 28, 28, 0.09);
  --line-soft: rgba(28, 28, 28, 0.055);
  --accent: #12807A;
  --accent-hi: #0B6A66;
  --accent-soft: rgba(18, 128, 122, 0.10);
  --glow-1: rgba(18, 128, 122, 0.10);
  --glow-2: rgba(62, 143, 116, 0.09);
  --glow-3: rgba(87, 168, 160, 0.08);
  --text: #26262C;
  --muted: #8A8994;
  --faint: #BAB9C1;
  --good: #3E8F74;
  --bad: #C0785F;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  overscroll-behavior-y: none;
  background: var(--app-bg);
  background-attachment: fixed;
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.muted { color: var(--muted); }

button {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

/* ---------- frame ---------- */

.app { min-height: 100vh; display: flex; flex-direction: column; }

#main { flex: 1; display: flex; flex-direction: column; }

.screen {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 34px 22px 120px;
}

.screen.wide {
  max-width: 1180px;
}
.screen.wide .quick-panel {
  max-width: 640px;
  margin-bottom: 20px;
}

/* ---------- bottom nav ---------- */

#nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(10px, env(safe-area-inset-bottom));
  width: min(calc(100% - 24px), 600px);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2px;
  padding: 6px 6px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.24)), var(--nav-bg);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    0 12px 36px -14px rgba(28, 28, 28, 0.3),
    0 2px 10px -4px rgba(28, 28, 28, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  z-index: 10;
}

/* ---------- companion (small corner background behind the nav) ---------- */

.companion {
  position: fixed;
  right: -16px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) - 60px);
  height: 190px;
  width: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  z-index: 1;
}
.has-companion-sm { padding-bottom: calc(var(--nav-h) + 104px); }

/* ---------- dashboard: modular cards ---------- */

.dash-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.dash-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 15px 15px 13px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  text-align: left;
  transition: transform 0.1s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.dash-card:hover { border-color: var(--tone); box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08); }
.dash-card:active { transform: scale(0.97); }
.dash-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.dash-card-ico {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tone);
  background: rgba(28, 28, 28, 0.05);
  flex: 0 0 auto;
}
.dash-card-ico svg { width: 16px; height: 16px; }
.dash-card-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.dash-card-arrow {
  margin-left: auto;
  color: var(--faint);
  font-size: 15px;
}
.dash-card-value {
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.dash-card-sub {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

/* ---------- dashboard: goal journey (weather-style spotlight) ---------- */

.goal-spot {
  display: block;
  width: 100%;
  text-align: left;
  padding: 18px 18px 12px;
  margin-bottom: 14px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(168deg, var(--tone-soft), var(--tone-faint) 55%, var(--tone-faint));
  box-shadow: 0 10px 26px var(--tone-glow);
  transition: transform 0.1s ease, box-shadow 0.15s ease;
}
.goal-spot:hover { box-shadow: 0 12px 30px var(--tone-glow); }
.goal-spot:active { transform: scale(0.99); }
.goal-spot-empty { background: var(--panel-2); box-shadow: none; }
.goal-spot-top {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.goal-spot-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--tone);
}
.goal-spot-kicker svg { width: 14px; height: 14px; }
.goal-spot-prio {
  margin-left: auto;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  color: var(--tone);
  background: var(--tone-soft);
}
.goal-spot-name {
  display: block;
  margin-top: 10px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.25;
  position: relative;
  z-index: 2;
}
.goal-spot-meta {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: var(--muted);
  position: relative;
  z-index: 2;
}
.goal-spot-body {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}
.goal-spot-num {
  flex: 0 0 auto;
  text-align: left;
}
.goal-spot-num b {
  display: block;
  font-family: var(--mono);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--tone);
}
.goal-spot-num i {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  font-style: normal;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.goal-chart {
  position: relative;
  flex: 1;
  min-width: 0;
}
.goal-chart svg {
  display: block;
  width: 100%;
  height: auto;
}
.goal-player {
  position: absolute;
  height: 38px;
  width: auto;
  transform: translate(-50%, -100%);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.12));
}
.goal-spot-hint {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  color: var(--muted);
}

.nav-item {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 7px;
  border-radius: 16px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.nav-ico {
  position: relative;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  transition: color 0.18s ease, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1.25);
}
.nav-ico svg { width: 22px; height: 22px; }
.nav-item:hover { color: var(--text); }
.nav-item:hover .nav-ico { color: var(--muted); }
.nav-item.active {
  color: var(--accent);
  background: linear-gradient(180deg, var(--accent-soft), rgba(255, 255, 255, 0));
}
.nav-item.active .nav-ico {
  color: var(--accent);
  transform: translateY(-1px) scale(1.1);
}
.nav-item.active .nav-label { font-weight: 700; }
.nav-item .nav-ico::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 16px;
  height: 3px;
  border-radius: 999px;
  background: var(--accent);
  transform: translateX(-50%) scaleX(0);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1.2);
}
.nav-item.active .nav-ico::after {
  transform: translateX(-50%) scaleX(1);
}

/* ---------- home / focus ---------- */

.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 16px 18px 92px;
}

.home-top {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.home-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.home-top-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.home-brand { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: -0.01em; color: var(--text); }
.home-date { color: var(--muted); font-size: 13.5px; font-weight: 500; white-space: nowrap; }

.home-profile {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.home-profile:hover { border-color: var(--accent); }
.home-profile:active { transform: scale(0.97); }
.home-avatar .avatar { width: 46px; height: 46px; font-size: 19px; }
.home-profile-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-width: 0;
}
.home-profile-info b {
  font-size: 15px;
  font-weight: 700;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.home-profile-info span {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.focus {
  --bc: var(--accent);
  text-align: center;
  padding: 16px 16px 14px;
  border-radius: 20px;
  background: linear-gradient(165deg, color-mix(in srgb, var(--bc) 9%, rgba(255, 255, 255, 0.55)), rgba(255, 255, 255, 0.55) 62%);
  border: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.focus-badge {
  width: 40px;
  height: 40px;
  margin: 0 auto 8px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bc);
  background: color-mix(in srgb, var(--bc) 14%, var(--panel-2));
  border: 1px solid color-mix(in srgb, var(--bc) 35%, transparent);
}
.focus-badge svg { width: 21px; height: 21px; }

.focus-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.focus-q {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.focus-sub { color: var(--muted); font-size: 13.5px; max-width: 420px; margin: 0 auto; }

.focus-line { margin: 0 0 14px; font-size: 14px; }
.focus-line .mono { font-size: 18px; color: var(--text); }
.focus-line .focus-sub { display: inline; font-size: 13.5px; }

.focus-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  color: #FFFFFF;
  box-shadow: 0 6px 18px -8px var(--glow-1);
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--accent); }

.btn-sm { padding: 9px 18px; font-size: 13.5px; }

.back {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 4px;
  transition: color 0.15s ease;
}
.back:hover { color: var(--text); }

/* ---------- page head ---------- */

.page-head { margin-bottom: 26px; }
.page-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: -0.015em;
  margin-top: 10px;
}
.page-sub { color: var(--muted); font-size: 14px; margin-top: 6px; max-width: 480px; }

/* ---------- panels ---------- */

.panel {
  background: rgba(255, 255, 255, 0.55);
  border: none;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.panel-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- forms ---------- */

.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 7px;
}

.input, .select, .textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.textarea { resize: vertical; min-height: 84px; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.select { appearance: none; }

.quick-panel { display: flex; flex-direction: column; position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.quick-row { display: flex; gap: 10px; }
.quick-row .input { flex: 1; min-width: 0; }

/* collapsible add panels */

.quick-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  text-align: left;
}
.quick-head .panel-label { margin-bottom: 0; }
.quick-plus {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
  box-shadow: 0 4px 12px -4px var(--glow-1);
  transition: transform 0.2s ease;
}
.quick-head:hover .quick-plus { transform: scale(1.07); }
.quick-body { margin-top: 14px; display: flex; flex-direction: column; }

/* table wrap so wide tables scroll instead of breaking the screen */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: none; padding-bottom: 4px; }
.table-wrap .list { min-width: 460px; }

/* inline task editing */

.task-edit {
  flex: 0 0 auto;
  margin-left: auto;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  color: var(--faint);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}
.task-edit:hover { color: var(--text); background: var(--panel); }
.task-edit-form {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.task-edit-form .field { margin-bottom: 0; }
.task-edit-actions { display: flex; gap: 8px; align-items: center; }
.btn-danger { background: linear-gradient(135deg, #c0765f, #b76a52); color: #fff; box-shadow: 0 6px 16px -8px rgba(183, 106, 82, 0.55); }
.btn-danger:hover { filter: brightness(1.06); }
.ld-del-cell { width: 40px; text-align: center; }
.ld-del { padding: 2px 8px; font-size: 16px; line-height: 1; opacity: 0.5; }
.ld-del:hover { opacity: 1; }

/* objective read / conclusion */

.conclusion-sub { font-size: 13px; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }
.conclusion-line {
  display: flex;
  gap: 9px;
  font-size: 14px;
  line-height: 1.55;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
}
.conclusion-line:last-child { border-bottom: 0; }
.conclusion-line .c-dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 8px;
}
.conclusion-empty { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* segmented + chips */

.seg {
  display: inline-flex;
  gap: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  margin: 4px 0 16px;
  align-self: flex-start;
}
.seg-btn {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--accent); color: #FFFFFF; font-weight: 600; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-sm { margin-top: 2px; }

.chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  background: transparent;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.chip:hover { color: var(--text); border-color: var(--muted); }
.chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.chip-sm { padding: 6px 11px; font-size: 12.5px; min-width: 34px; text-align: center; }

.chip-count { margin-left: 6px; font-size: 11px; color: var(--faint); }
.chip.active .chip-count { color: var(--accent); }

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin: 4px 0 14px;
  overflow-x: auto;
  overscroll-behavior-x: none;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar .chip { flex: 0 0 auto; white-space: nowrap; }

/* ---------- pillar rating ---------- */

.pillar-rate { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0 14px; }
.pillar-rate .chips { gap: 6px; }
.pillar-rate .back { font-size: 12px; padding: 6px 10px; }
.pillar-rate-head { display: flex; align-items: center; justify-content: space-between; }

.pillar-rate-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.pillar-rate-row:last-child { border-bottom: 0; }
.pr-name { font-size: 13.5px; font-weight: 500; min-width: 0; }
.pillar-rate-row .chips { flex-wrap: nowrap; gap: 4px; }

.pillar-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pillar-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  font-size: 12.5px;
}
.pillar-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.pillar-pill-name { font-weight: 600; color: var(--text); }
.pillar-pill-rating { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }

/* ---------- money / stats ---------- */

.cash-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: none;
  border-radius: 16px;
  padding: 15px 18px;
  margin-bottom: 14px;
  font-size: 14px;
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
}
.cash-strip .mono { color: var(--text); font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.money { text-align: center; padding: 30px 0 26px; }
.money-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.money-value { font-size: 56px; line-height: 1; color: var(--text); word-break: break-word; overflow-wrap: break-word; }

.stat { background: rgba(255, 255, 255, 0.65); border: none; border-radius: 16px; padding: 16px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04); }
.stat-label { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.stat-value { font-size: 20px; color: var(--text); }

/* ---------- table ---------- */

.list { width: 100%; border-collapse: collapse; }
.list th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 6px 12px;
  border-bottom: 1px solid var(--line);
}
.list td { padding: 12px 6px; font-size: 14px; }
.list tbody tr:nth-child(even) { background: var(--line-soft); }
.list tbody tr:nth-child(even) td:first-child { border-radius: 6px 0 0 6px; }
.list tbody tr:nth-child(even) td:last-child { border-radius: 0 6px 6px 0; }
.list .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.list th.num { text-align: right; }
.list .balance {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}
.list td.total {
  font-weight: 600;
  white-space: nowrap;
}
.list td.total-pos {
  color: #16a34a;
}
.list td.total-neg {
  color: #dc2626;
}
.list tfoot td {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

/* ---------- check-in flow ---------- */

.checkin { justify-content: flex-start; padding-top: 56px; }

.checkin-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8vh;
}
.checkin-exit {
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  background: transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.checkin-exit:hover { color: var(--text); border-color: var(--muted); }
.dots { display: flex; gap: 5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.dot.on { background: var(--accent); }

/* ---------- goals ---------- */

.goal-card { padding: 20px; }
.goal-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.goal-name { font-family: var(--serif); font-size: 19px; font-weight: 500; letter-spacing: -0.01em; }
.goal-meta { font-size: 12.5px; margin-top: 5px; }
.goal-pct { font-size: 22px; color: var(--accent); }
.goal-notes { font-size: 13px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.goal-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 13px;
}
.slider-block { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.slider-block .range { flex: 1; }
.goal-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  padding: 14px 18px;
}
.goal-summary .mono { color: var(--accent); font-size: 16px; }

.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--accent) var(--pct, 0%), var(--line) var(--pct, 0%));
  outline: none;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--accent);
  box-shadow: 0 2px 10px rgba(28, 28, 28, 0.15);
  cursor: pointer;
}
.range::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--panel-2);
  border: 1px solid var(--accent);
  cursor: pointer;
}
.range::-moz-range-track { height: 4px; background: transparent; }

/* ---------- health tracker ---------- */

.tracker-panel { margin-top: 16px; }
.tracker-row {
  display: flex;
  gap: 6px;
  margin-top: 10px;
}
.tr-cell {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 10px 4px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}
.tr-cell.logged { background: rgba(255, 255, 255, 0.72); }
.tr-dow { font-size: 11px; color: var(--muted); }
.tr-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
}
.tr-dot.good { background: var(--accent); }
.tr-nums { font-size: 9.5px; color: var(--muted); text-align: center; line-height: 1.25; }
.tracker-stats {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
}

/* ---------- profile ---------- */

.profile-top { display: flex; align-items: center; gap: 20px; }
.avatar {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-fields { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.profile-fields .field { width: 100%; margin-bottom: 0; }
.profile-stats { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }

/* ---------- feedback card ---------- */

.feedback-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 18px;
  margin: 0 0 16px;
  border-radius: 14px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  text-align: center;
  transition: opacity .15s;
}
.feedback-card:active { opacity: .8; }
.feedback-label { font-size: 16px; font-weight: 600; }
.feedback-sub { font-size: 13px; opacity: .85; }

/* ---------- profile menu ---------- */

.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 16px 18px;
  margin: 0 0 8px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  font: inherit;
  font-size: 14.5px;
  color: var(--fg);
  cursor: pointer;
  text-align: left;
}
.profile-menu-item:active { opacity: .8; }
.pmi-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pmi-icon { flex: 0 0 22px; display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; color: var(--accent); }
.pmi-icon svg, .pmi-icon span { width: 20px; height: 20px; }
.pmi-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pmi-label { font-weight: 600; font-size: 14.5px; }
.pmi-sub { font-size: 12.5px; }
.profile-section { margin-bottom: 8px; }

/* --- profile collapsible sections --- */
.profile-collapse { margin-bottom: 8px; }
.collapse-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: none;
  border-radius: 16px;
  background: var(--panel, #fff);
  color: var(--txt, #111);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: background 0.15s ease;
}
.collapse-head:active { background: var(--bg, #f3f3f3); }
.collapse-chevron {
  display: block;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted, #888);
  border-bottom: 2px solid var(--muted, #888);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.collapse-head.open .collapse-chevron { transform: rotate(-135deg); }
.collapse-body {
  display: none;
  padding-top: 6px;
}
.collapse-body.show { display: block; }

.home-stats { margin: 0 0 8px; }

/* ---------- health recent ---------- */

.row-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.row-item:last-child { border-bottom: none; }
.row-date { width: 60px; color: var(--muted); font-size: 13px; }
.row-mid { flex: 1; }
.row-mid b { font-family: var(--mono); font-weight: 500; font-size: 14px; }
.row-end { color: var(--muted); font-size: 13px; text-align: right; }

/* ---------- overview ---------- */

.pillar { padding: 0; overflow: hidden; }
.pillar-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
}
.pillar-row:hover .pillar-name { color: var(--accent); }
.pillar-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pillar-name { transition: color 0.15s ease; }
.pillar-core { font-size: 12px; color: var(--muted); line-height: 1.4; }
.pillar-sense {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.pillar-sense .psec-name { margin-bottom: 6px; }
.pillar-sense-text { font-size: 13px; line-height: 1.55; color: var(--text); }
.ov-wheel { padding: 18px 20px; }
.ov-summary-sub { margin-top: 16px; }
.ov-summary .ov-psych-p { margin-bottom: 9px; }
.ov-wheel-line { font-size: 14px; }
.ov-wheel-sub { margin-top: 4px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.ov-wheel-avg { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.ov-wheel-row { display: flex; align-items: center; gap: 10px; margin-top: 9px; width: 100%; text-align: left; padding: 0; }
.ov-wheel-row:first-of-type { margin-top: 12px; }
.ov-wheel-row:hover .ov-wheel-name { color: var(--accent); }
.ov-wheel-row.gap .ov-wheel-name { color: var(--bad); }
.ov-wheel-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%; }
.ov-wheel-name { flex: 0 0 auto; width: 84px; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color 0.15s ease; }
.ov-wheel-track { flex: 1; height: 6px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.ov-wheel-fill { display: block; height: 100%; border-radius: 999px; }
.ov-wheel-r { flex: 0 0 auto; width: 30px; text-align: right; font-size: 12.5px; color: var(--muted); }
.ov-wheel-gap { flex: 0 0 auto; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--bad); border: 1px solid var(--bad); border-radius: 999px; padding: 1px 6px; }
.trend-card { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.trend-pct { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-start; }
.trend-num { font-size: 44px; line-height: 1; font-weight: 700; letter-spacing: -0.03em; color: var(--accent); }
.trend-pct-label {
  margin-top: 5px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent);
}
.trend-chart { flex: 1; min-width: 0; position: relative; }
.trend-chart svg { width: 100%; height: auto; display: block; }
.trend-area { fill: var(--accent-soft); }
.trend-line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.trend-dot { stroke: #FFFFFF; stroke-width: 1.2; }
.trend-tag {
  position: absolute;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 1px 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 3;
}
.trend-mascot {
  position: absolute;
  height: 36px;
  width: auto;
  max-width: 56px;
  transform: translate(-50%, -100%);
  pointer-events: none;
  user-select: none;
  z-index: 2;
}
.trend-msg { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.5; text-align: center; }
.pillar-rating { color: var(--muted); font-size: 13px; }
.pillar-caret { color: var(--muted); font-size: 15px; }
.pillar-detail { border-top: 1px solid var(--line-soft); padding: 6px 20px 18px; }
.psec {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.psec-name {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.psec .input-sm { width: 100%; padding: 8px 10px; font-size: 13.5px; border-radius: 8px; }
.psec-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.psec-head .sec-name-input {
  flex: 1;
  min-width: 0;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 4px 2px;
  background: transparent;
  box-shadow: none;
}
.psec-head .sec-name-input:focus {
  border-bottom-color: var(--accent);
}
.sec-name-static {
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.sec-del-section {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.sec-del-section:hover { color: var(--bad); background: var(--panel-2); }
.psec-items { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sec-item { display: flex; align-items: center; gap: 8px; }
.sec-item-input { flex: 1; min-width: 0; }
.sec-del {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.sec-del:hover { color: var(--bad); background: var(--panel-2); }
.sec-task {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 17px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease;
}
.sec-task:hover { background: var(--accent-soft); }
.sec-add {
  align-self: flex-start;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  background: transparent;
  transition: border-color 0.15s ease;
}
.sec-add:hover { border-color: var(--accent); }
.sec-group {
  background: rgba(255, 255, 255, 0.65);
  border: none;
  border-radius: 14px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.sec-group-items { display: flex; flex-direction: column; gap: 6px; }
.psec-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- overview engine: goals + tasks per pillar ---------- */

.ov-block { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.ov-goal {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: none;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.15s ease;
}
.ov-goal:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08); }
.ov-goal-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.ov-goal-name { font-size: 13.5px; font-weight: 600; text-align: left; }
.ov-goal-pct { font-size: 12.5px; color: var(--accent); }
.ov-goal-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.ov-goal-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--accent);
}
.ov-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid var(--line-soft);
}
.ov-task-name { flex: 1; min-width: 0; font-size: 13.5px; }
.ov-task.done .ov-task-name { text-decoration: line-through; color: var(--faint); }
.ov-task-move { display: flex; gap: 3px; flex: 0 0 auto; }
.ov-task-add { display: flex; gap: 8px; margin-top: 10px; }
.ov-task-add .input-sm { flex: 1; min-width: 0; padding: 8px 10px; font-size: 13.5px; border-radius: 8px; }
.ov-tools { display: flex; gap: 8px; padding: 0 20px 12px; }

/* ---------- calendar ---------- */

.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 20px 12px; }
.cal-month { font-size: 15px; font-weight: 700; }
.cal-nav { display: flex; gap: 8px; }
.cal-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  padding: 0 20px 14px;
}
.cal-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 2px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--panel);
  cursor: pointer;
  text-align: center;
}
.cal-day:hover { border-color: var(--accent); }
.cal-day.today { border-color: var(--accent); background: var(--accent-soft); }
.cal-day.active { box-shadow: 0 0 0 2px var(--accent); }
.cal-dow { font-size: 10.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--faint); }
.cal-num { font-size: 16px; font-weight: 700; }
.cal-day.today .cal-num { color: var(--accent); }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin-top: 2px; }
.cal-dot.many { box-shadow: 0 0 0 3px var(--accent-soft); }
.cal-event {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--panel-2);
  margin-bottom: 8px;
}
.cal-event-main { flex: 1; min-width: 0; font-size: 13.5px; }
.cal-event-main b { font-weight: 600; }
.cal-event-main .muted { display: block; font-size: 12.5px; }
.cal-event-time { font-size: 12px; color: var(--faint); font-family: var(--mono); flex: 0 0 auto; }
.cal-del {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--faint);
  font-size: 16px;
  cursor: pointer;
}
.cal-del:hover { color: var(--bad); background: var(--panel); }
.cal-task {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--panel-2);
  margin-bottom: 6px;
}
.cal-task.done .cal-task-name { text-decoration: line-through; color: var(--faint); }
.cal-task-name { flex: 1; min-width: 0; font-size: 13.5px; }
.cal-task-move { display: flex; gap: 3px; flex: 0 0 auto; }
.cal-empty { color: var(--faint); font-size: 13px; padding: 6px 0; }
.cal-hint { color: var(--faint); font-size: 12px; }
.cal-sync { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- auto-setup plan ---------- */

.plan-meta { color: var(--faint); font-size: 12.5px; margin-bottom: 10px; }
.plan-block { margin-top: 14px; }
.plan-block-title { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); margin-bottom: 8px; }
.plan-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); margin-bottom: 8px; }
.plan-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); margin-bottom: 8px; }
.plan-tag {
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.plan-goal { background: var(--info-soft, var(--accent-soft)); color: var(--info, var(--accent)); }
.plan-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.plan-main b { font-size: 13.5px; font-weight: 600; }
.plan-main .muted { font-size: 12.5px; color: var(--faint); }
.plan-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ---------- dashboard ---------- */

.dash-list { padding: 8px 20px; }
.dash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14px;
}
.dash-row:last-child { border-bottom: none; }
.dash-row .mono { font-size: 14.5px; }

/* ---------- more ---------- */

.more-list { padding: 6px 0; }
.more-group { margin-bottom: 24px; }
.more-group:last-child { margin-bottom: 0; }
.more-group-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 4px 8px;
}
.more-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
}
.more-row:last-child { border-bottom: none; }
.more-row:hover { background: var(--panel-2); }
.more-row b { display: block; font-size: 15.5px; font-weight: 600; margin-bottom: 2px; }
.more-row span span { font-size: 13px; }
.more-arrow { color: var(--muted); }

/* ---------- focus wheel ---------- */

.home-hero {
  margin-top: 2px;
  border-radius: 22px;
  border: none;
  background:
    radial-gradient(120% 90% at 50% 0%, color-mix(in srgb, var(--accent) 6%, rgba(255, 255, 255, 0.55)), transparent 60%),
    rgba(255, 255, 255, 0.55);
  padding: 10px 8px 6px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.wheel-block { margin-top: 0; }

.wheel-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.wheel-title { font-size: 13px; letter-spacing: 0.18em; color: var(--text); }
.wheel-reset {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-transform: none;
  letter-spacing: 0;
  background: var(--panel-2);
  transition: border-color 0.15s ease;
}
.wheel-reset:hover { border-color: var(--accent); }

.wheel {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overscroll-behavior-x: none;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 8px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wheel::-webkit-scrollbar { display: none; }

.wheel-scroll { display: flex; align-items: center; gap: 8px; width: 100%; }
.wheel-arrow {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.wheel-arrow:hover { color: var(--text); border-color: var(--muted); }
.wheel-arrow:active { background: var(--panel-2); }

.wheel-item {
  --bc: var(--accent);
  position: relative;
  flex: 0 0 auto;
  scroll-snap-align: center;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  column-gap: 10px;
  row-gap: 3px;
  align-items: center;
  min-width: 148px;
  max-width: 176px;
  padding: 10px 12px;
  background: linear-gradient(175deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.45));
  border: none;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: left;
  transition: border-color 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  animation: cardIn 0.35s ease both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.wheel-item:active { transform: scale(0.97); }
.wheel-item:hover { border-color: var(--muted); }
.wheel-item.active {
  border-color: transparent;
  background: linear-gradient(145deg, color-mix(in srgb, var(--bc) 90%, #fff), color-mix(in srgb, var(--bc) 52%, #fff));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--bc) 42%, transparent), 0 2px 6px color-mix(in srgb, var(--bc) 25%, transparent);
  color: #fff;
}
.wheel-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; grid-column: 2; }
.wheel-item .wheel-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.wheel-item .wheel-meta { font-size: 11.5px; color: var(--muted); }
.wheel-item.active .wheel-name { color: #fff; }
.wheel-item.active .wheel-meta { color: rgba(255, 255, 255, 0.85); }
.wheel-badge {
  grid-column: 1;
  grid-row: 1 / span 2;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bc);
  background: color-mix(in srgb, var(--bc) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--bc) 30%, transparent);
}
.wheel-badge svg { width: 18px; height: 18px; }
.wheel-item.active .wheel-badge {
  background: rgba(255, 255, 255, 0.92);
  color: var(--bc);
  border-color: transparent;
}

.wheel-bar {
  grid-column: 1 / span 2;
  grid-row: 3;
  width: 100%;
  height: 5px;
  margin-top: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--bc) 16%, transparent);
  overflow: hidden;
}
.wheel-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--bc);
  transition: width 0.4s ease;
}
.wheel-item.active .wheel-bar { background: rgba(255, 255, 255, 0.32); }
.wheel-item.active .wheel-bar-fill { background: #fff; }

.wheel-sug {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  animation: sugPulse 1.8s ease-in-out infinite;
}
@keyframes sugPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--good) 55%, transparent); }
  50% { box-shadow: 0 0 0 6px transparent; }
}
.wheel-hint { text-align: center; font-size: 11px; color: var(--faint); margin-top: 2px; }
.hint-key {
  margin-left: 6px;
  padding: 2px 8px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hint-key:hover { border-color: var(--accent); }

/* ---------- tasks / kanban ---------- */

.task-filters { margin-top: 14px; }

.board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 4px;
}

.st-dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: var(--muted);
}
.st-dot.doing { background: var(--accent); }
.st-dot.blocked { background: var(--bad); }
.st-dot.done { background: var(--good); }

.kanban-col {
  background: linear-gradient(var(--line) 0 0) top/100% 3px no-repeat, rgba(255, 255, 255, 0.55);
  border: none;
  border-radius: 16px;
  padding: 14px;
  min-height: 120px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: background 0.15s ease;
}
.kanban-col.st-doing { background: linear-gradient(var(--accent) 0 0) top/100% 3px no-repeat, rgba(255, 255, 255, 0.55); }
.kanban-col.st-blocked { background: linear-gradient(var(--bad) 0 0) top/100% 3px no-repeat, rgba(255, 255, 255, 0.55); }
.kanban-col.st-done { background: linear-gradient(var(--good) 0 0) top/100% 3px no-repeat, rgba(255, 255, 255, 0.55); }
.kanban-col.drag-over { background: rgba(255, 255, 255, 0.72); }

.col-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.col-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.col-name {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}
.col-count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  background: rgba(28, 28, 28, 0.05);
  padding: 1px 8px;
  border-radius: 999px;
}

.col-body { display: flex; flex-direction: column; gap: 8px; }
.col-empty { text-align: center; color: var(--faint); font-size: 12px; padding: 10px 0; }

.goal-max-hint { text-align: center; font-size: 13px; padding: 10px 0 14px; }

.task-card {
  background: rgba(255, 255, 255, 0.72);
  border: none;
  border-radius: 12px;
  padding: 12px 13px;
  box-shadow: 0 1px 3px rgba(28, 28, 28, 0.06);
  transition: box-shadow 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}
.task-card:hover { box-shadow: 0 3px 10px rgba(28, 28, 28, 0.08); }
.task-card.dragging { opacity: 0.45; }

.task-cover {
  height: 120px;
  margin: -12px -13px 11px;
  border-radius: 9px 9px 0 0;
  background-size: cover;
  background-position: center;
  background-color: var(--panel);
}
.task-cover.empty {
  height: auto;
  margin: 0;
  background: none;
}

.task-row { display: flex; align-items: flex-start; gap: 8px; }
.task-grip {
  flex: 0 0 auto;
  width: 18px;
  height: 20px;
  margin-top: 3px;
  border-radius: 6px;
  cursor: grab;
  color: var(--faint);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}
.task-grip::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 8px 0 currentColor, -7px 0 0 currentColor, -7px 8px 0 currentColor, 7px 0 0 currentColor, 7px 8px 0 currentColor;
}
.task-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  margin-top: 5px;
}
.task-dot.good { background: var(--good); }
.task-dot.bad { background: var(--bad); }
.task-dot.st-doing { background: var(--accent); }
.task-dot.st-blocked { background: var(--bad); }
.task-dot.st-done { background: var(--good); }

.task-name { font-size: 14px; font-weight: 500; line-height: 1.35; text-align: left; flex: 1; min-width: 0; cursor: pointer; }

.task-cover-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task-cover-bar .btn-file { font-size: 12.5px; }
.task-cover-thumb {
  width: 52px;
  height: 40px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: var(--panel);
  border: 1px solid var(--line);
}
.task-cover-clear {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--bad);
  padding: 4px 10px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  transition: border-color 0.15s ease;
}
.task-cover-clear:hover { border-color: var(--bad); }

.btn-file {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  background: transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.btn-file:hover { border-color: var(--accent); color: var(--accent); }

.task-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tag {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--panel);
  border-radius: 999px;
  padding: 2px 8px;
}
.tag-goal { color: var(--accent); }

.task-due { margin-top: 7px; font-size: 11px; color: var(--faint); }
.task-due.overdue { color: var(--bad); font-weight: 600; }
.task-due.today { color: var(--accent); font-weight: 600; }
.task-money { margin-top: 6px; font-size: 11px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.task-money-plan { color: var(--faint); }
.task-money-actual { color: var(--accent); font-weight: 600; }
.task-log-money { font-size: 10px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--accent); cursor: pointer; font-weight: 600; white-space: nowrap; }
.task-log-money:hover { background: var(--accent); color: #fff; }
.tag-task-link { display: inline-block; margin-left: 4px; font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--panel-2); color: var(--accent); font-weight: 500; white-space: nowrap; }

.task-move {
  display: flex;
  gap: 4px;
  margin-top: 9px;
}
.move-btn {
  flex: 1;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  padding: 4px 2px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--panel);
  transition: color 0.15s ease, background 0.15s ease;
}
.move-btn:hover { color: var(--text); }
.move-btn.st-doing { color: var(--accent); }
.move-btn.st-blocked { color: var(--bad); }
.move-btn.st-done { color: var(--good); }
.move-btn.cur { background: var(--accent); color: #FFFFFF; }
.move-btn.st-doing.cur { background: var(--accent); color: #FFFFFF; }
.move-btn.st-blocked.cur { background: var(--bad); color: #FFFFFF; }
.move-btn.st-done.cur { background: var(--good); color: #FFFFFF; }

/* ---------- home ritual strip (the small dashboard bit) ---------- */

.home-dash { padding: 12px 12px 10px; }
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.dash-head .panel-label { margin-bottom: 0; }
.dash-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-2);
  transition: border-color 0.15s ease;
}
.dash-more:hover { border-color: var(--accent); }

.home-stats {
  display: flex;
  gap: 6px;
}
.home-stat {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.65);
  border: none;
  border-radius: 12px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  transition: background 0.15s ease;
}
.home-stat b { font-size: 12px; color: var(--text); }
.home-stat:hover { background: rgba(255, 255, 255, 0.85); }

.checkin-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 8px;
  padding: 8px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  transition: border-color 0.15s ease, color 0.15s ease;
}
.checkin-link:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- finance ---------- */

.fchart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 84px;
  margin-top: 12px;
}
.fbar {
  flex: 1;
  min-width: 0;
  background: var(--accent-soft);
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid var(--accent);
  transition: background 0.15s ease;
}
.fbar:hover { background: rgba(58, 61, 66, 0.2); }

.cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
}
.cat-name { width: 34%; font-size: 13px; }
.cat-bar {
  flex: 1;
  height: 6px;
  background: var(--line-soft);
  border-radius: 999px;
  overflow: hidden;
}
.cat-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.cat-amt { font-size: 12.5px; color: var(--muted); width: 74px; text-align: right; }

.finance-insight {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
}

/* ---------- goals ---------- */

#new-goal { margin-bottom: 12px; border: 1px dashed var(--line); }
#new-goal:hover { border-color: var(--accent); color: var(--accent); }

.goal-edit { display: flex; flex-direction: column; gap: 6px; }
.goal-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 6px;
}

/* ---------- overview note ---------- */

.pillar-note { margin-top: 16px; }
.pillar-note .textarea { margin-bottom: 8px; }

/* ---------- health extras ---------- */

.habit-grid { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.habit-head { margin-bottom: 2px; }
.mini-list { margin-top: 12px; }

/* ---------- profile ---------- */

.avatar-col { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.profile-username {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: -4px;
}
.avatar-img {
  background-size: cover;
  background-position: center;
  color: transparent;
}
.avatar-pick {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 240px;
}
.avatar-preset-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  padding: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.avatar-preset-btn.active { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.avatar-preset-btn:active { transform: scale(0.92); }
.avatar-preset-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-preset-btn.avatar-plain { background: var(--accent-soft); color: var(--accent); }
.avatar-preset-btn.avatar-photo { background: var(--accent-soft); color: var(--accent); }
.avatar-preset-btn.avatar-photo svg { width: 60%; height: 60%; }

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}
@media (max-width: 560px) {
  .field-grid { grid-template-columns: 1fr; }
  .profile-top { flex-direction: column; align-items: center; gap: 18px; }
  .profile-fields { width: 100%; }
}
.input-ro {
  background: var(--panel-2);
  color: var(--muted);
  cursor: default;
}
.rating-read {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  margin-left: auto;
  flex-shrink: 0;
}
.rr-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.15s ease;
}
.rr-dot.on { background: var(--accent); }


/* ---------- empty + loading states ---------- */

.empty-state { padding: 30px 22px; text-align: center; }
.empty-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-mark svg { width: 22px; height: 22px; }
.empty-title {
  font-family: var(--serif);
  font-size: 16.5px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}
.empty-hint { font-size: 13.5px; line-height: 1.5; max-width: 300px; margin: 0 auto; }

.skeleton { padding: 26px 22px; }
.sk {
  border-radius: 14px;
  background: linear-gradient(100deg, var(--line-soft) 40%, var(--panel-2) 50%, var(--line-soft) 60%);
  background-size: 200% 100%;
  animation: skShimmer 1.3s ease-in-out infinite;
}
@keyframes skShimmer {
  0% { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}
.sk-brand { width: 92px; height: 24px; margin-bottom: 14px; }
.sk-date { width: 170px; height: 14px; margin-bottom: 28px; }
.sk-card { height: 150px; margin-bottom: 18px; }
.sk-tall { height: 210px; }

/* ---------- motion: screen transitions + press feedback ---------- */

#main.view-in > .screen,
#main.view-in > .home {
  animation: screenIn 0.22s ease both;
}
@keyframes screenIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

button:active { transform: scale(0.96); }
.nav-item:active { transform: scale(0.93); }
.more-row:active,
.settings-row:active {
  transform: scale(0.985);
  background: var(--accent-soft);
}
.pillar-row:active,
.quick-head:active,
.row-item:active { background: var(--panel-2); }
.home-profile:active,
.dash-cal:active,
.dash-more:active { transform: scale(0.93); }
.back:active { opacity: 0.6; }

/* ---------- profile: geo anchor ---------- */

.geo-row { display: flex; gap: 8px; }
.geo-row .input { flex: 1; min-width: 0; }
.geo-tag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 14px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px dashed var(--line);
  font-size: 12px;
  color: var(--muted);
}
.map-link {
  margin-left: auto;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 12px;
}
.map-link:hover { text-decoration: underline; }

/* ---------- more ---------- */

.more-row.featured { background: var(--panel); margin-bottom: 6px; }
.more-row.featured b { color: var(--accent); }
.more-row.featured:hover { background: var(--panel-2); }

/* ---------- about ---------- */

.about-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
}
.about-mark {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-hi));
  box-shadow: 0 4px 18px rgba(58, 61, 66, 0.24);
}
.about-name {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.version-badge {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--accent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 9px;
}
.about-tag { color: var(--muted); font-size: 13px; margin-top: 4px; line-height: 1.5; }

.about-section { padding: 16px 18px; }
.about-p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0 0 12px; }
.about-p:last-child { margin-bottom: 0; }
.about-p.muted { color: var(--faint); font-size: 12px; }

/* ---------- legal pages (privacy, terms) ---------- */

.legal-page { padding: 18px; }
.legal-page h3 { font-size: 15px; font-weight: 600; margin: 20px 0 6px; color: var(--fg); }
.legal-page h3:first-child { margin-top: 0; }
.legal-page p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0 0 10px; }
.legal-page p:last-child { margin-bottom: 0; }
.legal-page strong { color: var(--fg); font-weight: 600; }
.legal-page ul { margin: 0 0 10px 18px; padding: 0; }
.legal-page li { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0 0 4px; }
.legal-updated { font-size: 12px !important; margin-bottom: 14px !important; }

.key-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 4px 0 14px;
}
.key-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
}
.key-k {
  flex: 0 0 auto;
  min-width: 56px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  background: var(--panel-2);
  border-radius: 8px;
  padding: 4px 8px;
}
.key-k.mono { font-size: 11.5px; }
.key-v { display: flex; flex-direction: column; font-size: 13px; line-height: 1.35; }
.key-v .muted { font-size: 11.5px; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 13.5px;
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 6px 24px rgba(28, 28, 28, 0.12);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 60;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 720px) {
  .board { display: flex; overflow-x: auto; overscroll-behavior-x: none; padding-bottom: 10px; }
  .kanban-col { flex: 0 0 250px; }
}

@media (prefers-reduced-motion: reduce) {
  .wheel-item { animation: none; }
  .wheel-sug { animation: none; }
  .sk { animation: none; }
  #main.view-in > .screen,
  #main.view-in > .home { animation: none; }
  button:active,
  .nav-item:active,
  .home-profile:active,
  .dash-cal:active,
  .dash-more:active { transform: none; }
}

@media (max-width: 520px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .money-value { font-size: 44px; }
  .wheel-arrow { display: none; }
  .nav-item { min-width: 0; max-width: none; font-size: 12px; padding: 8px 4px; }
}

@media (max-width: 380px) {
  .home { padding: 14px 12px 96px; }
  .focus-q { font-size: clamp(21px, 5.4vw, 26px); }
  .wheel-item { min-width: 124px; }
  .dash-cards { grid-template-columns: 1fr; }
  .goal-spot-num b { font-size: 32px; }
  .goal-spot-body { gap: 10px; }
}

/* ---------- calendar: week/month toggle ---------- */

.cal-seg { display: flex; gap: 4px; padding: 0 20px 12px; }
.cal-seg .seg-btn { padding: 7px 18px; }

.cal-m-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 0 14px 16px;
}
.cal-m-dow {
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--faint);
  padding: 4px 0 6px;
}
.cal-m-cell {
  aspect-ratio: 1 / 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--panel);
  color: var(--muted);
  padding: 2px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.cal-m-cell:hover { border-color: var(--accent); }
.cal-m-cell.today { border-color: var(--accent); background: var(--accent-soft); }
.cal-m-cell.today .cal-num { color: var(--accent); }
.cal-m-cell.active { box-shadow: 0 0 0 2px var(--accent); }
.cal-m-cell.empty { background: transparent; border-color: transparent; }
.cal-m-dots { display: flex; gap: 2px; min-height: 5px; }
.cal-m-dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.cal-m-dots i.ev { background: var(--good); }
.cal-m-dots i.goal { background: var(--faint); }

.cal-goal {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--panel-2);
  margin-bottom: 6px;
}
.cal-goal.done .cal-goal-name { text-decoration: line-through; color: var(--faint); }
.cal-goal-name { flex: 1; min-width: 0; font-size: 13.5px; }
.cal-goal-meta { flex: 0 0 auto; font-size: 12px; color: var(--muted); }
.cal-goal-edit {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  transition: border-color 0.15s ease;
}
.cal-goal-edit:hover { border-color: var(--accent); }

/* ---------- diary ---------- */

.diary-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 8px 4px;
}
.diary-lock-icon {
  width: 56px;
  height: 56px;
  margin: 6px auto 14px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hi), var(--accent));
  box-shadow: 0 8px 22px -10px var(--glow-1);
}
.diary-lock-icon svg { width: 26px; height: 26px; }
.diary-code {
  width: 100%;
  max-width: 280px;
  margin: 14px auto 6px;
  text-align: center;
  font-family: var(--mono);
  letter-spacing: 0.22em;
  font-size: 18px;
}
.diary-hint { font-size: 12.5px; color: var(--faint); line-height: 1.5; max-width: 300px; margin: 0 auto; }
.diary-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.diary-link {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bad);
  padding: 6px 12px;
  border: 1px dashed var(--line);
  border-radius: 999px;
  margin-top: 10px;
  background: transparent;
  transition: border-color 0.15s ease;
}
.diary-link:hover { border-color: var(--bad); }

.diary-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }

.diary-entry {
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: border-color 0.15s ease;
}
.diary-entry-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  text-align: left;
}
.diary-entry-date { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); }
.diary-entry-title { font-family: var(--serif); font-size: 18px; font-weight: 500; margin-top: 3px; }
.diary-entry-excerpt {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  margin-top: 8px;
  white-space: pre-line;
}
.diary-entry-del {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--faint);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background 0.15s ease;
}
.diary-entry-del:hover { color: var(--bad); background: var(--panel); }
.diary-entry-media {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.diary-media-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: var(--panel);
  border: 1px solid var(--line-soft);
}
.diary-media-thumb.video {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--accent-soft);
}
.diary-entry-full { margin-top: 12px; }
.diary-entry-full .diary-media-thumb { cursor: pointer; }
.diary-entry-media .photo { cursor: pointer; }
.diary-entry-body {
  margin-top: 12px;
  font-size: 14.5px;
  line-height: 1.65;
  white-space: pre-line;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.diary-empty { text-align: center; color: var(--faint); font-size: 13px; padding: 26px 10px; }

.diary-form { display: flex; flex-direction: column; }
.diary-media-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.diary-media-item {
  position: relative;
  width: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--panel);
}
.diary-media-item img, .diary-media-item video {
  width: 100%;
  height: 64px;
  object-fit: cover;
  display: block;
}
.diary-media-item input {
  width: 100%;
  padding: 4px 6px;
  font-size: 10px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: var(--panel-2);
}
.diary-media-del {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(28, 28, 28, 0.62);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.diary-storage {
  font-size: 11px;
  color: var(--faint);
  margin-top: 6px;
  line-height: 1.5;
}

@media (max-width: 420px) {
  .diary-entry-media { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- task attachments ---------- */

.task-card { cursor: pointer; }
.task-card.editing { cursor: auto; }

.task-files { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.task-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 3px 10px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 11.5px;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.task-file:hover { border-color: var(--accent); color: var(--text); }
.task-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }

.task-attach-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.task-attach-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 6px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  font-size: 12px;
}
.task-attach-name { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-attach-rm {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--faint);
  font-size: 14px;
  line-height: 1;
  transition: color 0.15s ease, background 0.15s ease;
}
.task-attach-rm:hover { color: var(--bad); background: var(--panel-2); }
.attach-hint { font-size: 11.5px; margin-top: 6px; }

.file-ico {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
}
.file-ico.file-img { color: #0E8F97; background: rgba(14, 143, 151, 0.12); }
.file-ico.file-vid { color: var(--accent); background: var(--accent-soft); }
.file-ico.file-aud { color: #3E8F74; background: rgba(62, 143, 116, 0.14); }
.file-ico.file-pdf { color: #C0785F; background: rgba(192, 120, 95, 0.14); }
.file-ico.file-doc { color: #0E8F97; background: rgba(14, 143, 151, 0.12); }
.file-ico.file-xls { color: var(--accent); background: var(--accent-soft); }
.file-ico.file-txt { color: #1D8C86; background: rgba(29, 140, 134, 0.12); }
.file-ico.file-fil { color: #5AA8A0; background: rgba(90, 168, 160, 0.14); }

/* ---------- task detail overlay ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(20, 20, 24, 0.45);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  animation: overlayIn 0.18s ease both;
}
@keyframes overlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.overlay-card {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  background: #FCFBF9;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 30px 70px -30px rgba(28, 28, 28, 0.5);
  overflow: hidden;
  animation: overlayCardIn 0.22s ease both;
}
@keyframes overlayCardIn {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.overlay-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.overlay-title { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overlay-close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  color: var(--muted);
  transition: color 0.15s ease, background 0.15s ease;
}
.overlay-close:hover { color: var(--bad); background: var(--panel); }
.overlay-body { padding: 14px 16px 18px; overflow-y: auto; }
.td-img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 12px; background: var(--panel); }
.td-media { width: 100%; max-height: 60vh; border-radius: 12px; background: var(--panel); }
.td-doc { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 6px 0; }
.overlay-meta { margin-top: 12px; font-size: 12px; }

/* ---------- ledger → finance ---------- */

.ledger-nav { display: flex; justify-content: flex-start; margin-bottom: 14px; }

/* ---------- focus wheel: edge fade + focus pull ---------- */

.wheel {
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 16px, #000 calc(100% - 16px), transparent 100%);
}
.wheel-item {
  transition: border-color 0.15s ease, background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease, opacity 0.3s ease;
}
.wheel.focusing .wheel-item:not(.active) { opacity: 0.5; transform: scale(0.965); }

@media (prefers-reduced-motion: reduce) {
  .overlay, .overlay-card { animation: none; }
  .wheel.focusing .wheel-item:not(.active) { opacity: 1; transform: none; }
}

/* ---------- auth screens (login / onboarding) ---------- */

.auth-screen { min-height: 88vh; display: flex; align-items: center; justify-content: center; padding: 24px 18px 40px; }
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 24px 20px 22px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
}
.auth-card .about-mark { margin: 0 auto 6px; }
.auth-q { font-size: 27px; text-align: center; }
.auth-sub { text-align: center; font-size: 13px; margin: 2px 0 16px; }
.auth-card .field { text-align: left; }
.auth-card .field label { font-size: 12.5px; }
.auth-submit {
  width: 100%;
  margin-top: 8px;
}
.auth-name-field { margin-bottom: 2px; }
.auth-error {
  margin: 12px 0 0;
  padding: 9px 12px;
  border-radius: 10px;
  background: rgba(192, 120, 95, 0.12);
  color: #a4553a;
  font-size: 12.5px;
  line-height: 1.45;
  text-align: center;
}
.auth-switch { text-align: center; font-size: 13px; margin: 14px 0 0; }
.auth-legal { text-align: center; font-size: 12px; margin: 12px 0 0; }
.auth-legal a { color: var(--muted-fg); text-decoration: underline; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-transform: none;
  letter-spacing: 0;
}
.link-btn:active { opacity: 0.7; }

/* ---------- settings ---------- */

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  font-size: 14.5px;
}
.settings-row:last-child { border-bottom: none; }
.settings-row.danger { color: var(--bad); }
.settings-row > .muted { font-size: 12.5px; }
.settings-body { padding: 4px 0 12px; border-bottom: 1px solid var(--line-soft); }
.settings-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.panel-sub { font-size: 13px; color: var(--muted); line-height: 1.55; margin-bottom: 14px; }

/* ---------- settings: mood theme ---------- */

.mood-group { margin-bottom: 14px; }
.mood-group:last-child { margin-bottom: 0; }
.mood-group-head { display: flex; align-items: baseline; gap: 8px; margin: 0 2px 8px; }
.mood-group-name { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.mood-group-note { font-size: 12px; color: var(--faint); }
.mood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.mood-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px 8px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.65);
  transition: box-shadow 0.15s ease, transform 0.1s ease, border-color 0.15s ease;
}
.mood-tile:hover { border-color: var(--line); }
.mood-tile:active { transform: scale(0.96); }
.mood-tile.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.mood-swatch { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06); }
.mood-name { font-size: 11px; color: var(--muted); }
.mood-tile.active .mood-name { color: var(--accent); font-weight: 600; }

/* ---------- overview: the short read ---------- */

.ov-psych { padding: 16px 18px; }
.ov-psych-p { font-size: 13.5px; line-height: 1.6; color: var(--text); margin-bottom: 10px; }
.ov-psych-p:last-child { margin-bottom: 0; }

/* ---------- dashboard calendar icon ---------- */

.home-top-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

.dash-head { gap: 8px; }
.dash-cal {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-left: auto;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  border: 1px solid var(--line);
  background: var(--panel-2);
  transition: border-color 0.15s ease;
}
.dash-cal:hover { border-color: var(--accent); }
.dash-cal svg { width: 15px; height: 15px; }

/* ---------- home: am I moving? ---------- */

.home-kicker {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4px 0 14px;
}

.glance {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.glance-item {
  flex: 1;
  min-width: 0;
  background: var(--panel);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.glance-label {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.glance-value { font-size: 17px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.glance-sub { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nudge {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border-radius: 16px;
  padding: 13px 16px;
  margin-top: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: left;
  transition: transform 0.1s ease;
}
.nudge:active { transform: scale(0.99); }
.nudge-ico {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bad);
  color: #fff;
}
.nudge-ico svg { width: 17px; height: 17px; }
.nudge-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.nudge-main b { font-size: 14px; font-weight: 600; }
.nudge-main .muted { font-size: 12.5px; color: var(--faint); }

/* ---------- money: week strip ---------- */

.week-strip {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}
.week-stat {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: var(--panel);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.week-stat .muted { font-size: 10.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.week-stat b { font-size: 16px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-stat .ws-in { color: #16a34a; }
.week-stat .ws-out { color: #dc2626; }
.week-stat .ws-pos { color: #16a34a; }
.week-stat .ws-neg { color: #dc2626; }
.week-stat.expanded {
  flex: 0 0 auto;
  min-width: 0;
  align-self: flex-start;
  z-index: 10;
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: visible;
}
.week-stat.expanded b {
  white-space: normal;
  overflow: visible;
  text-overflow: unset;
  word-break: break-word;
}

/* ---------- pillars: weekly check-in strip ---------- */

.checkin-closed {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--good);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 14px;
  color: #fff;
}
.checkin-closed-mark {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}
.checkin-closed-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.checkin-closed-body b { font-size: 14px; font-weight: 600; }
.checkin-closed-body .muted { font-size: 12.5px; color: rgba(255, 255, 255, 0.85); }

.checkin-open { margin-bottom: 14px; }
.checkin-open-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.checkin-count { font-size: 12.5px; color: var(--accent); }
.checkin-dots { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.checkin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
  transition: background 0.2s ease;
}
.checkin-dot.on { background: var(--accent); }

/* ---------- plan generator ---------- */

.plan-themes { display: flex; flex-direction: column; gap: 8px; }
.plan-theme {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.plan-theme.active { border-color: var(--accent); background: var(--accent-soft); }
.plan-theme b { font-size: 14px; font-weight: 600; }
.plan-theme .muted { font-size: 12.5px; color: var(--faint); }

.plan-sep {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 16px 0 8px;
}
.plan-task { background: var(--accent-soft); color: var(--accent); }

.plan-dots { display: flex; gap: 6px; margin-bottom: 14px; }

/* ---------- home: am I moving? tabbed card ---------- */

.dash-panel { padding: 12px 16px 4px; }
.dash-tabs { display: flex; width: 100%; margin: 0 0 8px; align-self: stretch; }
.dash-tabs .seg-btn { flex: 1; padding: 9px 10px; }
.dash-panel .dash-row { cursor: pointer; }
.dash-panel .dash-row[data-goto]:hover span:first-child { color: var(--accent); }
.dash-panel .dash-row .muted { font-size: 12.5px; }

/* ---------- pillars: clean list + single-pillar window ---------- */

.pillar-meta { padding: 2px 20px 4px; font-size: 12.5px; }

.pillar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 6px 20px 18px;
}
.pillar-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 14px;
  text-align: left;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--panel-2);
  min-width: 0;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.pillar-card:hover { border-color: var(--accent); }
.pillar-card:active { transform: scale(0.98); }
.pillar-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.pillar-card-name {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.pillar-card-rate {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.pillar-card-ring {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--pct) * 1%), var(--line-soft) 0);
}
.pillar-card-ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--panel-2);
}
.pillar-card-num { font-size: 12px; color: var(--muted); }
.pillar-card-meta { font-size: 12px; color: var(--muted); }

.pillar-window { padding: 0; overflow: hidden; }
.pillar-window-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.pillar-window-count { color: var(--muted); font-size: 12.5px; }
.pillar-window-name { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 12px 0 2px; padding: 0 20px; }
.pillar-window .pillar-core { padding: 0 20px; }
.pillar-window-section { margin-top: 16px; padding: 0 20px; }
.pillar-window-section .psec-name { margin-bottom: 8px; }
.pillar-window-section .textarea { width: 100%; box-sizing: border-box; margin-bottom: 8px; }
.pillar-window-empty { padding: 14px 20px 0; font-size: 13px; }
.pillar-window .ov-block { margin-left: 20px; margin-right: 20px; }
.pillar-window-sense { margin: 14px 20px 0; padding-top: 14px; border-top: 1px dashed var(--line); }
.pillar-window-sense .psec-name { margin-bottom: 6px; }
.pillar-window-nav { display: flex; gap: 10px; padding: 18px 20px 20px; }
.pillar-window-nav .btn { flex: 1; }
.pillar-window-section.rating-block { padding-bottom: 20px; }

/* ---------- mobile: <= 430px ---------- */

@media (max-width: 430px) {
  .screen { padding: 20px 16px 100px; }
  .panel { padding: 16px 14px; border-radius: 14px; }

  .home { padding: 16px 14px 100px; }

  .focus-q { font-size: clamp(22px, 5.5vw, 26px); }

  .pillar-grid { padding: 6px 14px 18px; gap: 8px; }
  .pillar-card { padding: 12px; border-radius: 12px; }
  .pillar-card-name { font-size: 13.5px; }
  .pillar-card-meta { font-size: 11px; }
  .pillar-window-name { font-size: 20px; }
  .pillar-window-head { padding: 14px 16px 0; }
  .pillar-window .pillar-core { padding: 0 16px; }
  .pillar-window-section { padding: 0 16px; }
  .pillar-window-empty { padding: 14px 16px 0; }
  .pillar-window .ov-block { margin-left: 16px; margin-right: 16px; }
  .pillar-window-sense { margin: 14px 16px 0; }
  .pillar-window-nav { padding: 16px; }
  .pillar-meta { padding: 2px 14px 4px; }

  .dash-cards { gap: 10px; }
  .dash-panel { padding: 10px 14px 4px; }

  .goal-grid { gap: 8px; }
  .goal-card { padding: 12px; border-radius: 12px; }

  .money-value { font-size: 38px; }
  .money-panel { padding: 14px; }

  .week-strip { gap: 8px; }
  .week-stat { padding: 10px 12px; }

  .glance { gap: 8px; }
  .glance-item { padding: 10px 12px; }
  .glance-value { font-size: 15px; }

  .filter-bar { gap: 6px; }
  .filter-btn { padding: 6px 10px; font-size: 12px; }

  .btn { padding: 8px 16px; font-size: 13px; }
  .btn-lg { padding: 10px 18px; }

  .input, .textarea, select {
    font-size: 14px;
    padding: 9px 12px;
  }

  .auth-screen { padding: 16px 14px 40px; }
  .auth-card { padding: 20px 16px 18px; }
  .auth-q { font-size: 24px; }

  .overlay { padding: 10px; }
  .overlay-card { max-height: 92vh; border-radius: 14px; }
  .overlay-head { padding: 12px 14px; }
  .overlay-body { padding: 12px 14px 16px; }

  .settings-row { padding: 12px 0; font-size: 13.5px; }

  .ov-psych { padding: 14px 16px; }
  .ov-psych-p { font-size: 13px; }

  .nudge { padding: 11px 14px; }

  .diary-entry { padding: 12px 14px; }
  .diary-entry-title { font-size: 16px; }
  .diary-entry-body { font-size: 13.5px; }

  .checkin-closed { padding: 12px 14px; }

  .wheel-item { min-width: 120px; padding: 10px 12px; }

  .plan-theme { padding: 10px 12px; }

  .companion { right: -8px; bottom: 60px; height: 120px; width: auto; }
  .companion img { height: 120px; width: auto; }

  .nav { padding: 8px 12px 6px; gap: 4px; }
  .nav-item { font-size: 11px; padding: 6px 4px; }

  .mood-grid { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .mood-tile { padding: 8px 4px 6px; }

  .seg-btn { padding: 6px 14px; font-size: 12px; }

  h1, h2, h3 { word-break: break-word; overflow-wrap: break-word; }
  .wide, .screen.wide { max-width: 100%; }

  .task-card { padding: 10px 12px; }
  .task-card .task-title { font-size: 13.5px; }
}

/* ---------- mobile: <= 380px ---------- */

@media (max-width: 380px) {
  .screen { padding: 16px 12px 100px; }
  .panel { padding: 14px 12px; border-radius: 12px; }

  .home { padding: 14px 12px 100px; }

  .focus-q { font-size: clamp(20px, 5.4vw, 24px); }

  .pillar-grid { padding: 4px 12px 16px; gap: 6px; }
  .pillar-card { padding: 10px; border-radius: 10px; }
  .pillar-card-name { font-size: 12.5px; }
  .pillar-card-ring { width: 22px; height: 22px; }
  .pillar-window-name { font-size: 18px; }

  .dash-cards { grid-template-columns: 1fr; }

  .goal-spot-num b { font-size: 28px; }
  .goal-spot-body { gap: 8px; }

  .money-value { font-size: 32px; }

  .auth-q { font-size: 22px; }

  .wheel-item { min-width: 110px; padding: 8px 10px; }
  .wheel-item b { font-size: 13px; }

  .nav-item { font-size: 10px; padding: 5px 3px; }

  .mood-grid { grid-template-columns: repeat(2, 1fr); }
  .mood-tile { padding: 6px 3px 5px; }

  .overlay-card { border-radius: 12px; }
  .overlay-head { padding: 10px 12px; }
  .overlay-body { padding: 10px 12px 14px; }

  .checkin-dots { gap: 4px; }

  .companion { right: -4px; bottom: 56px; height: 100px; width: auto; }
  .companion img { height: 100px; width: auto; }

  .nav { padding: 6px 10px 4px; gap: 2px; }
  .nav-item { font-size: 10px; padding: 4px 2px; }

  .diary-entry-media { grid-template-columns: 1fr 1fr; }
  .diary-entry-title { font-size: 15px; }
  .diary-entry-body { font-size: 13px; }

  .glance-item { padding: 8px 10px; }
  .glance-value { font-size: 14px; }
  .glance-sub { font-size: 10.5px; }

  .week-stat { padding: 8px 10px; }
  .week-stat b { font-size: 14px; }

  .settings-row { padding: 10px 0; font-size: 13px; }

  .task-card { padding: 8px 10px; }
  .task-card .task-title { font-size: 12.5px; }

  .btn { padding: 7px 14px; font-size: 12px; }

  .filter-btn { padding: 5px 8px; font-size: 11px; }

  .seg-btn { padding: 5px 12px; font-size: 11px; }

  .plan-theme { padding: 8px 10px; }
}

