/* EffortLog
   Type follows OpenSea (Inter), with tabular numbers,
   deep navy canvas, #2081E2 blue, hairline borders. Glass layers sit on top. */

/* Fonts are bundled so the site works without Google and the share image always renders correctly. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2-variations"), url(../fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations"), url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }

:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: var(--font);

  --brand: var(--blue);
  --brand-hover: var(--blue-hover);
  --brand-active: var(--blue-hover);
  --brand-soft: color-mix(in srgb, var(--blue) 12%, transparent);
  --brand-ring: color-mix(in srgb, var(--blue) 35%, transparent);

  --r-xs: 4px; --r-sm: 6px; --r-md: 8px; --r-card: 10px; --r-lg: 12px; --r-xl: 16px; --r-2xl: 22px; --r-pill: 999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --fast: 120ms; --std: 220ms; --slow: 420ms;

  --side-w: 252px;
  --top-h: 72px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --blue: #0a84ff;
  --blue-hover: #409cff;
  --bg: #000000;
  --bg-2: #000000;
  --glass: #1c1c1e;
  --glass-strong: rgba(30, 30, 32, 0.78);
  --glass-hi: transparent;
  --surface: #1c1c1e;
  --surface-2: #2c2c2e;
  --surface-3: #3a3a3c;
  --hover: rgba(255, 255, 255, 0.05);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.15);
  --ink: #f5f5f7;
  --body: #d1d1d6;
  --muted: #98989d;
  --subtle: #6e6e73;
  --up: #30d158;
  --down: #ff453a;
  --warn: #ff9f0a;
  --up-soft: rgba(48, 209, 88, 0.14);
  --down-soft: rgba(255, 69, 58, 0.14);
  --warn-soft: rgba(255, 159, 10, 0.14);
  --shadow-sm: none;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --scrim: rgba(0, 0, 0, 0.5);
  --grid: rgba(255, 255, 255, 0.07);
  --heat-0: #2c2c2e;
  --bar-bg: rgba(0, 0, 0, 0.72);
}

:root[data-theme="light"] {
  color-scheme: light;
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --bg: #f5f5f7;
  --bg-2: #f5f5f7;
  --glass: #ffffff;
  --glass-strong: rgba(255, 255, 255, 0.8);
  --glass-hi: transparent;
  --surface: #ffffff;
  --surface-2: #f2f2f4;
  --surface-3: #e8e8ed;
  --hover: rgba(0, 0, 0, 0.04);
  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.14);
  --ink: #1d1d1f;
  --body: #3a3a3c;
  --muted: #6e6e73;
  --subtle: #8e8e93;
  --up: #248a3d;
  --down: #d70015;
  --warn: #c93400;
  --up-soft: rgba(36, 138, 61, 0.1);
  --down-soft: rgba(215, 0, 21, 0.08);
  --warn-soft: rgba(201, 52, 0, 0.08);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.14);
  --scrim: rgba(0, 0, 0, 0.22);
  --grid: rgba(0, 0, 0, 0.07);
  --heat-0: #ebebf0;
  --bar-bg: rgba(245, 245, 247, 0.8);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--body);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "cv11", "ss01";
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--slow) var(--ease), color var(--slow) var(--ease);
}
h1, h2, h3, h4 { color: var(--ink); margin: 0; font-weight: 700; }
p { margin: 0; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--blue-hover); }
button { font: inherit; color: inherit; }
::selection { background: var(--brand-soft); color: var(--ink); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.subtle { color: var(--subtle); }
.pos { color: var(--up); }
.neg { color: var(--down); }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--brand-ring); border-radius: var(--r-md); }

/* ---------- background: plain, like macOS ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; pointer-events: none; background: var(--bg); }
.orb, .grain { display: none; }

/* ---------- surfaces ----------
   Content sits on solid cards. Only bars and sheets use frosted material. */
.glass { background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }

/* ---------- icons ---------- */
.ico { display: inline-flex; width: 20px; height: 20px; flex: none; align-items: center; justify-content: center; }
.ico svg { width: 100%; height: 100%; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 24px; height: 24px; }

/* ---------- brand ---------- */
.logo-mark { display: block; flex: none; border-radius: 11px; box-shadow: 0 6px 18px -6px rgba(32, 129, 226, .6); }
.brand-word { font-weight: 700; font-size: 18px; letter-spacing: -0.3px; color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border-radius: var(--r-lg);
  border: 1px solid transparent; background: var(--surface-2); color: var(--ink);
  font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--std) var(--ease-spring), box-shadow var(--std) var(--ease), opacity var(--fast);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 8px 22px -10px rgba(32, 129, 226, .9), inset 0 1px 0 rgba(255, 255, 255, .18); }
.btn-primary:hover { background: var(--brand-hover); color: #fff; }
.btn-primary:active { background: var(--brand-active); }
.btn-ghost { background: var(--glass); border-color: var(--border); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn-ghost:hover { border-color: var(--border-strong); background: var(--hover); }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-soft:hover { background: rgba(32, 129, 226, .2); }
.btn-danger { background: var(--down-soft); color: var(--down); }
.btn-danger:hover { background: rgba(235, 87, 87, .2); }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: var(--r-md); gap: 6px; }
.btn-sm .ico { width: 16px; height: 16px; }
.btn-xl { height: 54px; font-size: 16px; border-radius: var(--r-xl); padding: 0 26px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; border-radius: var(--r-lg); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--body); transition: transform var(--std) var(--ease-spring), border-color var(--fast), color var(--fast), background-color var(--fast);
}
.icon-btn:hover { color: var(--ink); border-color: var(--border-strong); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn.on { color: var(--brand); border-color: rgba(32, 129, 226, .4); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; font-size: 14px; }
.link-btn:hover { color: #5fa3eb; }

/* ---------- shell ---------- */
.shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }
.side {
  position: fixed; left: 14px; top: 14px; bottom: 14px; width: var(--side-w); z-index: 20;
  border-radius: var(--r-2xl); display: flex; flex-direction: column; padding: 18px 12px;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 22px; }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; scrollbar-width: none; }
.side-nav::-webkit-scrollbar { display: none; }
.nav-group { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--subtle); padding: 16px 12px 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 12px; border-radius: var(--r-lg);
  color: var(--muted); font-weight: 500; font-size: 14.5px; transition: color var(--fast), background-color var(--fast);
}
.nav-item:hover { color: var(--ink); background: var(--hover); }
.nav-item.active { color: var(--ink); background: var(--brand-soft); }
.nav-item.active .ico { color: var(--brand); }
.nav-item.active::before { content: ""; position: absolute; left: -12px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.nav-count { margin-left: auto; font-family: var(--mono); font-size: 11.5px; color: var(--muted); background: var(--surface-2); padding: 1px 7px; border-radius: var(--r-pill); }
.nav-count.alert { color: #fff; background: var(--warn); }
.side-foot { padding-top: 10px; border-top: 1px solid var(--border); }
.side-user { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; border-radius: var(--r-lg); border: 0; background: none; cursor: pointer; text-align: left; }
.side-user:hover { background: var(--hover); }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-name { color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-sub { color: var(--muted); font-size: 12px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #3b9bff, #7c4dff); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .3px;
}
.avatar-xl { width: 72px; height: 72px; font-size: 26px; }

.main { flex: 1; min-width: 0; margin-left: calc(var(--side-w) + 28px); padding: 0 28px 60px 0; }
.top {
  position: sticky; top: 0; z-index: 15; height: calc(var(--top-h) + 14px); padding-top: 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.top::before { content: ""; position: absolute; inset: 0 -28px 0 -28px; background: linear-gradient(var(--bg) 30%, transparent); opacity: .85; z-index: -1; pointer-events: none; }
.top-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.top-brand { display: none; }
.top-title { font-size: 24px; letter-spacing: -0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-right { display: flex; align-items: center; gap: 10px; }
.search-btn {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px 0 14px; width: 260px; border-radius: var(--r-lg);
  color: var(--muted); cursor: pointer; font-size: 14px; transition: border-color var(--fast);
}
.search-btn:hover { border-color: var(--border-strong); }
.search-text { flex: 1; text-align: left; }
kbd { font-family: var(--mono); font-size: 11px; color: var(--muted); border: 1px solid var(--border-strong); border-radius: var(--r-xs); padding: 1px 6px; }
.add-btn { padding: 0 18px 0 14px; }

.view { position: relative; outline: none; padding-top: 6px; }
.view-enter { animation: view-in var(--slow) var(--ease-out) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.tabbar { display: none; }

/* ---------- layout helpers ---------- */
.stack { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; }
.span-2 { grid-column: span 2; }

/* ---------- panels ---------- */
.panel { border-radius: var(--r-xl); padding: 22px; min-width: 0; }
.panel-tight { padding: 8px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-title { font-size: 17px; font-weight: 600; letter-spacing: -0.1px; }
.panel-sub { color: var(--muted); font-size: 13px; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.section-title { font-size: 20px; font-weight: 600; margin: 8px 0 -4px; letter-spacing: -0.2px; }

/* ---------- hero numbers ---------- */
.hero { border-radius: var(--r-2xl); padding: 28px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -160px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(closest-side, rgba(32, 129, 226, .22), transparent); pointer-events: none; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.hero-label { color: var(--muted); font-weight: 500; font-size: 14px; }
.hero-value { font-size: clamp(38px, 5.4vw, 60px); font-weight: 600; color: var(--ink); line-height: 1.05; letter-spacing: -2px; margin-top: 6px; }
.hero-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); margin-top: 12px; }
.hero-delta.up { color: var(--up); background: var(--up-soft); }
.hero-delta.down { color: var(--down); background: var(--down-soft); }
.hero-delta.flat { color: var(--muted); background: var(--surface-2); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 26px; border-top: 1px solid var(--border); }
.stats > .stat { padding: 18px 18px 2px 0; }
.stats > .stat + .stat { padding-left: 18px; border-left: 1px solid var(--border); }
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.stat-value { color: var(--ink); font-size: 24px; font-weight: 600; letter-spacing: -0.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { color: var(--subtle); font-size: 12.5px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.tile { border-radius: var(--r-xl); padding: 18px; }

/* ---------- segmented / filters ---------- */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); position: relative; flex-wrap: wrap; }
.seg button { border: 0; background: none; height: 34px; padding: 0 12px; border-radius: var(--r-md); color: var(--muted); font-weight: 600; font-size: 13px; cursor: pointer; transition: color var(--fast), background-color var(--std) var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border); }
:root[data-theme="dark"] .seg button.on { background: var(--surface-3); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter {
  height: 38px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--glass); color: var(--body);
  font-weight: 500; font-size: 13.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: all var(--fast) var(--ease);
}
.filter:hover { border-color: var(--border-strong); color: var(--ink); }
.filter.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.filter .cnt { font-family: var(--mono); font-size: 11.5px; opacity: .7; }

/* ---------- pills and dots ---------- */
.pill {
  --c: var(--muted);
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  font-size: 12.5px; font-weight: 600; white-space: nowrap; color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.pill-plain::before { display: none; }
.dot { --c: var(--muted); width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 16%, transparent); }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: var(--r-sm); font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--muted); }

/* ---------- list rows (OpenSea table feel) ---------- */
.list { display: flex; flex-direction: column; }
.list-head, .lrow { display: grid; grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .9fr); align-items: center; gap: 16px; padding: 0 16px; }
.list-head { height: 40px; color: var(--muted); font-size: 12.5px; font-weight: 500; border-bottom: 1px solid var(--border); }
.lrow {
  min-height: 72px; border-radius: var(--r-lg); cursor: pointer; position: relative;
  transition: background-color var(--fast) var(--ease), transform var(--std) var(--ease);
}
.lrow + .lrow::before { content: ""; position: absolute; left: 16px; right: 16px; top: 0; height: 1px; background: var(--border); }
.lrow:hover { background: var(--hover); }
.lrow:hover::before, .lrow:hover + .lrow::before { opacity: 0; }
.lrow-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.lrow-thumb { width: 44px; height: 44px; border-radius: var(--r-lg); flex: none; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 16px; }
.lrow-name { color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lrow-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cell-r { text-align: right; justify-self: end; }
.cell-money { color: var(--ink); font-weight: 600; font-size: 14.5px; }
.list-head .cell-r { justify-self: end; }

/* ---------- cards (used sparingly) ---------- */
.card {
  border-radius: var(--r-xl); padding: 18px; cursor: pointer; position: relative;
  transition: transform var(--std) var(--ease), border-color var(--std), box-shadow var(--std);
}
.card:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow), 0 0 0 1px rgba(32, 129, 226, .1); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card-title { color: var(--ink); font-weight: 600; font-size: 16px; }
.card-text { color: var(--body); font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 14px; }
.card-foot { display: flex; gap: 8px; margin-top: 16px; }

/* ---------- horizontal bars ---------- */
.bars { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; }
.bar-label { color: var(--ink); font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 9px; min-width: 0; }
.bar-label span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-value { color: var(--ink); font-size: 13.5px; font-weight: 600; text-align: right; }
.bar-value small { color: var(--muted); font-weight: 500; margin-left: 6px; font-family: var(--font); }
.bar-track { grid-column: 1 / -1; height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.bar-fill { --c: var(--brand); height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--c) 70%, transparent), var(--c)); transition: width 1.1s var(--ease-out); }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; height: 260px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart text { font-family: var(--mono); font-size: 11px; fill: var(--subtle); }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .col { transition: opacity var(--fast); }
.chart .col-group.dim .col { opacity: .35; }
.chart-tip {
  position: absolute; pointer-events: none; z-index: 5; min-width: 150px; padding: 10px 12px; border-radius: var(--r-lg);
  background: var(--glass-strong); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  font-size: 13px; color: var(--body); opacity: 0; transform: translateY(4px); transition: opacity var(--fast), transform var(--fast);
}
.chart-tip.show { opacity: 1; transform: none; }
.chart-tip b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.tip-row { display: flex; justify-content: space-between; gap: 14px; align-items: center; }
.tip-row i { width: 8px; height: 8px; border-radius: 2px; display: inline-block; margin-right: 6px; }
.tip-row .num { color: var(--ink); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.draw-line { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.grow-col { transform-box: fill-box; transform-origin: bottom; animation: grow .8s var(--ease-out) both; }
@keyframes grow { from { transform: scaleY(0); } }
.fade-area { animation: fade-in 1.2s var(--ease) both .2s; }
@keyframes fade-in { from { opacity: 0; } }

/* heatmap */
.heat { display: grid; grid-auto-flow: column; grid-template-rows: repeat(7, auto); grid-auto-columns: minmax(11px, 1fr); gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.heat i { width: 100%; aspect-ratio: 1; border-radius: 4px; background: var(--heat-0); display: block; animation: pop-in .5s var(--ease-out) both; }
.heat i[data-l="1"] { background: rgba(32, 129, 226, .30); }
.heat i[data-l="2"] { background: rgba(32, 129, 226, .52); }
.heat i[data-l="3"] { background: rgba(32, 129, 226, .78); }
.heat i[data-l="4"] { background: #2081e2; box-shadow: 0 0 10px rgba(32, 129, 226, .5); }
.heat-legend { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 10px; justify-content: flex-end; }
.heat-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
@keyframes pop-in { from { opacity: 0; transform: scale(.4); } }

/* ---------- insight list ---------- */
.insights { display: flex; flex-direction: column; gap: 10px; }
.insight { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface-2); border: 1px solid var(--border); }
:root[data-theme="dark"] .insight { background: rgba(255, 255, 255, .025); }
.insight-ico { width: 34px; height: 34px; border-radius: var(--r-md); flex: none; display: flex; align-items: center; justify-content: center; }
.insight-ico .ico { width: 18px; height: 18px; }
.insight.good .insight-ico { color: var(--up); background: var(--up-soft); }
.insight.warn .insight-ico { color: var(--warn); background: var(--warn-soft); }
.insight.bad .insight-ico { color: var(--down); background: var(--down-soft); }
.insight.info .insight-ico { color: var(--brand); background: var(--brand-soft); }
.insight-text { color: var(--ink); font-size: 14.5px; line-height: 1.5; }
.insight-text small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.insight-text b { font-weight: 600; }
.note { font-size: 13px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; margin-top: 14px; }
.note .ico { width: 16px; height: 16px; margin-top: 2px; }

/* focus cards */
.focus { display: flex; flex-direction: column; gap: 12px; }
.focus-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--border); cursor: pointer; transition: border-color var(--fast), background-color var(--fast); }
.focus-item:hover { border-color: var(--border-strong); background: var(--hover); }
.focus-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.focus-tag { font-size: 12px; font-weight: 700; letter-spacing: .3px; padding: 4px 9px; border-radius: var(--r-sm); white-space: nowrap; }
.focus-tag.go { color: var(--up); background: var(--up-soft); }
.focus-tag.chase { color: var(--brand); background: var(--brand-soft); }
.focus-tag.think { color: var(--warn); background: var(--warn-soft); }
.focus-tag.wake { color: var(--muted); background: var(--surface-2); }
.focus-why { margin: 6px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.focus-why li { font-size: 13.5px; color: var(--body); padding-left: 14px; position: relative; }
.focus-why li::before { content: ""; position: absolute; left: 2px; top: 9px; width: 4px; height: 4px; border-radius: 50%; background: var(--subtle); }

/* ---------- timeline ---------- */
.tl { position: relative; display: flex; flex-direction: column; }
.tl-month { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .3px; padding: 18px 0 8px 54px; position: sticky; top: calc(var(--top-h) + 14px); z-index: 2; }
.tl-month:first-child { padding-top: 0; }
.tl-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; padding: 10px 0; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 19.5px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.tl-item:first-of-type::before { top: 24px; }
.tl-node { position: relative; z-index: 1; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--muted); }
:root[data-theme="dark"] .tl-node { background: var(--surface); }
.tl-node .ico { width: 18px; height: 18px; }
.tl-node.k-money { color: var(--up); border-color: color-mix(in srgb, var(--up) 35%, transparent); }
.tl-node.k-spend { color: var(--down); border-color: color-mix(in srgb, var(--down) 30%, transparent); }
.tl-node.k-start { color: var(--brand); border-color: rgba(32, 129, 226, .4); }
.tl-node.k-person { color: #6b8afd; }
.tl-node.k-mile { color: #fbbf24; border-color: rgba(251, 191, 36, .45); box-shadow: 0 0 16px rgba(251, 191, 36, .18); }
.tl-node.k-stop { color: var(--down); }
.tl-body { min-width: 0; padding-top: 2px; }
.tl-title { color: var(--ink); font-weight: 500; font-size: 14.5px; }
.tl-title a { color: inherit; }
.tl-title a:hover { color: var(--brand); }
.tl-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: flex; gap: 10px; flex-wrap: wrap; }
.tl-text { color: var(--body); font-size: 14px; margin-top: 6px; white-space: pre-wrap; word-break: break-word; }
.tl-right { text-align: right; padding-top: 2px; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.tl-item.clickable { cursor: pointer; border-radius: var(--r-lg); }
.tl-item.clickable:hover .tl-title { color: var(--brand); }

/* ---------- people board ---------- */
.board { display: grid; grid-template-columns: repeat(6, minmax(220px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; }
.col-lane { border-radius: var(--r-xl); padding: 12px; min-height: 200px; display: flex; flex-direction: column; gap: 10px; scroll-snap-align: start; }
.lane-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 6px; }
.lane-title { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.lane-count { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pcard { padding: 14px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); cursor: pointer; transition: transform var(--std) var(--ease), box-shadow var(--std), border-color var(--std); }
:root[data-theme="dark"] .pcard { background: rgba(255, 255, 255, .035); }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.pcard-name { color: var(--ink); font-weight: 600; font-size: 14.5px; }
.pcard-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.pcard-due { margin-top: 10px; font-size: 12.5px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }
.pcard-due.late { color: var(--warn); }
.pcard-due .ico { width: 14px; height: 14px; }
.lane-empty { color: var(--subtle); font-size: 13px; padding: 10px 6px; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 56px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-art { width: 64px; height: 64px; border-radius: 20px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 8px; animation: float 4s ease-in-out infinite; }
.empty-art .ico { width: 28px; height: 28px; }
.empty h3 { font-size: 19px; font-weight: 600; }
.empty p { color: var(--muted); max-width: 420px; }
.empty .btn { margin-top: 12px; }
.empty-text { color: var(--muted); font-size: 14px; padding: 8px 0; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* ---------- welcome ---------- */
.welcome { border-radius: var(--r-2xl); padding: 34px; position: relative; overflow: hidden; }
.welcome h2 { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.8px; line-height: 1.15; }
.welcome p { color: var(--body); font-size: 16px; margin-top: 10px; max-width: 560px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 26px; }
.step { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; padding: 18px; border-radius: var(--r-xl); border: 1px solid var(--border); background: var(--hover); cursor: pointer; transition: transform var(--std) var(--ease), border-color var(--std); text-align: left; }
.step:hover { transform: translateY(-2px); border-color: rgba(32, 129, 226, .45); }
.step-n { font-family: var(--mono); color: var(--brand); font-size: 13px; font-weight: 600; }
.step-t { color: var(--ink); font-weight: 600; font-size: 16px; margin-top: 6px; }
.step-d { color: var(--muted); font-size: 13.5px; margin-top: 4px; }

/* ---------- goals ---------- */
.goal { border-radius: var(--r-xl); padding: 20px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: transform var(--std) var(--ease), border-color var(--std); }
.goal:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.goal-title { color: var(--ink); font-weight: 600; font-size: 16px; }
.goal-nums { display: flex; align-items: baseline; gap: 8px; }
.goal-now { font-size: 28px; font-weight: 600; color: var(--ink); letter-spacing: -0.8px; }
.goal-of { color: var(--muted); font-size: 14px; }
.progress { height: 10px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; position: relative; }
.progress-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #1868b7, #3b9bff); transition: width 1.2s var(--ease-out); position: relative; overflow: hidden; }
.progress-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); transform: translateX(-100%); animation: sheen 2.6s ease-in-out infinite 1.2s; }
.progress-fill.done { background: linear-gradient(90deg, #16935a, #34c77b); }
.progress-pace { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .45; border-radius: 2px; }
@keyframes sheen { to { transform: translateX(100%); } }
.goal-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { color: var(--ink); font-weight: 600; font-size: 14.5px; }
.field-label .opt { color: var(--subtle); font-weight: 500; margin-left: 6px; font-size: 13px; }
.field-hint { color: var(--muted); font-size: 13px; }
.input, .select, .textarea {
  width: 100%; height: 50px; padding: 0 16px; border-radius: var(--r-lg); border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; outline: none;
  transition: border-color var(--fast), box-shadow var(--std);
}
:root[data-theme="dark"] .input, :root[data-theme="dark"] .select, :root[data-theme="dark"] .textarea { background: rgba(4, 17, 29, .55); }
.input::placeholder, .textarea::placeholder { color: var(--subtle); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input-lg { height: 56px; font-size: 17px; }
.textarea { height: auto; min-height: 110px; padding: 14px 16px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%238a939b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
input[type="date"].input { padding-right: 12px; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .6; cursor: pointer; }
:root[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1); }
.money-input { display: flex; align-items: stretch; border-radius: var(--r-xl); border: 1px solid var(--border-strong); background: var(--surface); overflow: hidden; transition: border-color var(--fast), box-shadow var(--std); }
:root[data-theme="dark"] .money-input { background: rgba(4, 17, 29, .55); }
.money-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.money-input select { border: 0; background: var(--surface-2); color: var(--ink); font: inherit; font-weight: 600; font-size: 15px; padding: 0 12px 0 16px; outline: none; cursor: pointer; }
.money-input input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font-family: var(--mono); font-size: 30px; font-weight: 600; height: 72px; padding: 0 18px; outline: none; letter-spacing: -0.5px; }
.money-input input::placeholder { color: var(--subtle); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-error { color: var(--down); background: var(--down-soft); padding: 10px 14px; border-radius: var(--r-md); font-size: 14px; font-weight: 500; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; }
.form-actions .grow { flex: 1; }

/* chips: big, tappable radio/checkbox choices */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: var(--r-lg);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--body); font-weight: 500; font-size: 14.5px;
  transition: all var(--fast) var(--ease); user-select: none;
}
:root[data-theme="dark"] .chip span { background: rgba(255, 255, 255, .03); }
.chip:hover span { border-color: var(--muted); color: var(--ink); }
.chip input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--ink); box-shadow: inset 0 0 0 1px var(--brand); animation: chip-pop .28s var(--ease-spring); }
.chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-ring); }
.chip .cdot { width: 9px; height: 9px; border-radius: 50%; }
.chips-lg .chip span { min-height: 52px; font-size: 15px; padding: 10px 18px; }
.chips-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chips-col .chip span { width: 100%; }
@keyframes chip-pop { 50% { transform: scale(1.04); } }

/* switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.switch-row + .switch-row { border-top: 1px solid var(--border); }
.switch-text { min-width: 0; }
.switch-title { color: var(--ink); font-weight: 600; font-size: 15px; }
.switch-desc { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.switch { position: relative; width: 52px; height: 30px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--surface-3); border: 1px solid var(--border-strong); transition: background-color var(--std) var(--ease); }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform var(--std) var(--ease-spring); }
.switch input:checked + i { background: var(--brand); border-color: var(--brand); }
.switch input:checked + i::after { transform: translateX(22px); }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--brand-ring); }

details.more { border-top: 1px solid var(--border); padding-top: 4px; }
details.more > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; color: var(--brand); font-weight: 600; font-size: 14.5px; padding: 12px 0; user-select: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .ico { width: 18px; height: 18px; transition: transform var(--std) var(--ease); }
details.more[open] > summary .ico { transform: rotate(180deg); }
details.more .more-body { display: flex; flex-direction: column; gap: 20px; padding: 8px 0 4px; animation: view-in var(--std) var(--ease-out); }

/* ---------- modal / sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade-in var(--std) var(--ease) both; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.scrim.out { animation: fade-out var(--std) var(--ease) both; }
@keyframes fade-out { to { opacity: 0; } }
.sheet {
  width: 100%; max-width: 620px; border-radius: var(--r-2xl); background: var(--glass-strong); border: 1px solid var(--border-strong);
  -webkit-backdrop-filter: blur(28px) saturate(160%); backdrop-filter: blur(28px) saturate(160%);
  box-shadow: var(--shadow-lg), inset 0 1px 0 var(--glass-hi); animation: sheet-in var(--slow) var(--ease-spring) both; margin-bottom: 6vh;
}
.sheet-wide { max-width: 820px; }
.scrim.out .sheet { animation: sheet-out var(--std) var(--ease) both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(24px) scale(.97); } }
@keyframes sheet-out { to { opacity: 0; transform: translateY(12px) scale(.98); } }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 22px 24px 0; }
.sheet-title { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.sheet-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.sheet-body { padding: 22px 24px 24px; }
.sheet-close { width: 40px; height: 40px; border-radius: var(--r-md); border: 0; background: var(--surface-2); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--muted); flex: none; transition: color var(--fast), transform var(--std) var(--ease-spring); }
.sheet-close:hover { color: var(--ink); transform: rotate(90deg); }

.add-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.add-tile {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-xl); border: 1px solid var(--border);
  background: var(--hover); cursor: pointer; text-align: left; transition: transform var(--std) var(--ease), border-color var(--std), background-color var(--std);
  animation: rise var(--slow) var(--ease-out) both;
}
.add-tile:hover { transform: translateY(-2px); border-color: rgba(32, 129, 226, .5); background: var(--brand-soft); }
.add-tile:active { transform: scale(.98); }
.add-ico { width: 48px; height: 48px; border-radius: 14px; flex: none; display: flex; align-items: center; justify-content: center; color: var(--c, var(--brand)); background: color-mix(in srgb, var(--c, var(--brand)) 15%, transparent); }
.add-ico .ico { width: 22px; height: 22px; }
.add-name { color: var(--ink); font-weight: 600; font-size: 16px; }
.add-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* confirm */
.confirm-text { color: var(--body); font-size: 15px; }

/* ---------- search palette ---------- */
.palette { max-width: 640px; }
.palette-input { display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--border); }
.palette-input input:focus-visible { box-shadow: none; }
.palette-input input { flex: 1; height: 64px; border: 0; background: none; outline: none; font: inherit; font-size: 18px; color: var(--ink); }
.palette-input .ico { color: var(--muted); }
.palette-list { max-height: 56vh; overflow-y: auto; padding: 8px; }
.palette-group { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--subtle); padding: 12px 12px 6px; }
.palette-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-lg); cursor: pointer; }
.palette-item.sel, .palette-item:hover { background: var(--brand-soft); }
.palette-item .ico { color: var(--muted); }
.palette-item-t { color: var(--ink); font-weight: 500; font-size: 14.5px; }
.palette-item-s { color: var(--muted); font-size: 12.5px; }
.palette-empty { padding: 28px; text-align: center; color: var(--muted); }

/* ---------- toast ---------- */
#toasts { position: fixed; z-index: 80; left: 50%; bottom: 28px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 14px; border-radius: var(--r-xl);
  background: var(--glass-strong); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); color: var(--ink); font-weight: 500; font-size: 14.5px;
  animation: toast-in var(--slow) var(--ease-spring) both;
}
.toast.out { animation: toast-out var(--std) var(--ease) both; }
.toast-ico { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--up-soft); color: var(--up); }
.toast-ico .ico { width: 16px; height: 16px; }
.toast.err .toast-ico { background: var(--down-soft); color: var(--down); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- detail page ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; font-size: 14px; cursor: pointer; background: none; border: 0; padding: 0; }
.back:hover { color: var(--ink); }
.back .ico { width: 18px; height: 18px; }
.detail-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.detail-thumb { width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 28px; font-weight: 700; flex: none; box-shadow: var(--shadow); }
.detail-name { font-size: clamp(26px, 3.4vw, 36px); letter-spacing: -0.8px; line-height: 1.15; }
.detail-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; color: var(--muted); font-size: 14px; }
.detail-desc { color: var(--body); font-size: 15px; margin-top: 14px; max-width: 720px; white-space: pre-wrap; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.status-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.status-pick button { --c: var(--muted); height: 34px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--border); background: none; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; transition: all var(--fast); }
.status-pick button::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.status-pick button:hover { color: var(--ink); border-color: var(--border-strong); }
.status-pick button.on { color: var(--c); border-color: color-mix(in srgb, var(--c) 50%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.kv-item { display: flex; flex-direction: column; gap: 2px; }
.kv-k { color: var(--muted); font-size: 13px; }
.kv-v { color: var(--ink); font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }

.mini-list { display: flex; flex-direction: column; }
.mini { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-radius: var(--r-md); cursor: pointer; }
.mini + .mini { border-top: 1px solid var(--border); }
.mini:hover { background: var(--hover); }
.mini-main { flex: 1; min-width: 0; }
.mini-t { color: var(--ink); font-weight: 500; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-s { color: var(--muted); font-size: 12.5px; }
.mini-r { font-weight: 600; font-size: 14px; color: var(--ink); white-space: nowrap; text-align: right; }
.mini-btn { opacity: 0; transition: opacity var(--fast); }
.mini:hover .mini-btn { opacity: 1; }

/* graveyard */
.grave { border-radius: var(--r-xl); padding: 18px; border: 1px dashed var(--border-strong); cursor: pointer; transition: border-color var(--std), transform var(--std) var(--ease); }
.grave:hover { border-color: var(--muted); transform: translateY(-2px); }
.grave-name { color: var(--ink); font-weight: 600; font-size: 15.5px; }
.grave-dates { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.grave-facts { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 12px; font-size: 13px; color: var(--body); }
.grave-lesson { margin-top: 12px; font-size: 14px; color: var(--ink); padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); }
:root[data-theme="dark"] .grave-lesson { background: rgba(255, 255, 255, .04); }
.grave-lesson span { color: var(--muted); font-size: 12px; display: block; margin-bottom: 2px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }

/* share screen */
.share-preview { border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.share-preview canvas { display: block; width: 100%; height: auto; }
.link-box { display: flex; gap: 8px; align-items: center; }
.link-box input { font-family: var(--mono); font-size: 13.5px; }
.money-switches { border-radius: var(--r-xl); padding: 4px 18px; border: 1px solid rgba(32, 129, 226, .35); background: var(--brand-soft); }
.public-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.public-row + .public-row { border-top: 1px solid var(--border); }
.public-row .grow { flex: 1; min-width: 0; }

/* money-hidden mode */
body.money-off .m { filter: blur(9px); user-select: none; transition: filter var(--std); }
body.money-off .m:hover { filter: blur(6px); }

/* ---------- auth ---------- */
.auth-body .ambient .orb-a { animation-duration: 18s; }
.auth { position: relative; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 460px; border-radius: 26px; padding: 34px 30px; display: flex; flex-direction: column; gap: 20px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-title { font-size: 30px; letter-spacing: -0.8px; line-height: 1.15; }
.auth-sub { color: var(--muted); font-size: 15px; margin-top: -10px; }
.problem-list { margin: 0; padding-left: 20px; color: var(--ink); display: flex; flex-direction: column; gap: 10px; }

/* ---------- public share page ---------- */
.share-body { min-height: 100vh; }
.share-wrap { position: relative; z-index: 1; max-width: 920px; margin: 0 auto; padding: 22px 20px 60px; display: flex; flex-direction: column; gap: 20px; }
.share-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.share-brand { display: flex; align-items: center; gap: 10px; }
.share-actions { display: flex; gap: 10px; align-items: center; }
.owner-note { border-radius: var(--r-xl); padding: 14px 16px; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; border-color: rgba(32, 129, 226, .35); }
.owner-note .ico { color: var(--brand); margin-top: 1px; }
.owner-note strong { color: var(--ink); display: block; }
.owner-note span { color: var(--body); }
.share-hero { border-radius: var(--r-2xl); padding: 30px; position: relative; overflow: hidden; }
.share-hero::after { content: ""; position: absolute; right: -140px; top: -180px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(closest-side, rgba(32, 129, 226, .25), transparent); pointer-events: none; }
.share-id { display: flex; align-items: center; gap: 18px; }
.share-name { font-size: clamp(28px, 4.4vw, 44px); letter-spacing: -1px; line-height: 1.1; }
.share-headline { color: var(--muted); font-size: 16px; margin-top: 4px; }
.share-bio { color: var(--body); font-size: 15.5px; margin-top: 18px; max-width: 640px; }
.share-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin-top: 26px; border-top: 1px solid var(--border); }
.share-stats .stat { padding: 18px 16px 0 0; }
.share-stats .stat-value { font-size: 26px; }
.stat-feature .stat-value, .stat-value.pos { color: var(--up); }
.share-stats .stat-feature { grid-column: span 2; }
.share-stats .stat-feature .stat-value { font-size: 30px; }
.share-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.share-item { display: flex; gap: 14px; align-items: flex-start; padding: 16px 4px; }
.share-item + .share-item { border-top: 1px solid var(--border); }
.share-item .dot { margin-top: 7px; }
.share-item-main { flex: 1; min-width: 0; }
.share-item-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.share-item-name { color: var(--ink); font-weight: 600; font-size: 16px; }
.share-item-meta { display: flex; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-top: 4px; }
.share-item-desc { color: var(--body); font-size: 14.5px; margin-top: 8px; }
.share-item-money { color: var(--ink); font-weight: 600; font-size: 15px; white-space: nowrap; padding-top: 2px; }
.mile-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mile { display: grid; grid-template-columns: 110px 22px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; position: relative; }
.mile-date { color: var(--muted); font-size: 13px; font-family: var(--mono); text-align: right; }
.mile-node { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-3); border: 2px solid var(--brand); justify-self: center; position: relative; z-index: 1; }
.mile::before { content: ""; position: absolute; left: calc(110px + 12px + 10.5px); top: 0; bottom: 0; width: 1px; background: var(--border); }
.mile-money .mile-node { border-color: var(--up); }
.mile-milestone .mile-node { border-color: #fbbf24; background: #fbbf24; }
.mile-end .mile-node { border-color: var(--muted); }
.mile-text { color: var(--ink); font-size: 14.5px; }
.share-foot { text-align: center; color: var(--subtle); font-size: 13px; padding-top: 10px; }


/* ---------- sub-efforts in lists ---------- */
.row-toggle { width: 28px; height: 28px; flex: none; border-radius: var(--r-md); border: 1px solid var(--border); background: var(--surface-2); color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform var(--std) var(--ease-spring), color var(--fast), border-color var(--fast); }
.row-toggle:hover { color: var(--ink); border-color: var(--border-strong); }
.row-toggle .ico { transition: transform var(--std) var(--ease-out); }
.row-toggle.open .ico { transform: rotate(90deg); }
.row-toggle.open { color: var(--brand); border-color: rgba(32, 129, 226, .45); background: var(--brand-soft); }
.row-toggle-sp { width: 28px; flex: none; }
.lrow-main { position: relative; }
.row-branch { position: absolute; top: -20px; height: calc(50% + 20px); width: 18px; border-left: 2px solid color-mix(in srgb, var(--c) 55%, transparent); border-bottom: 2px solid color-mix(in srgb, var(--c) 55%, transparent); border-bottom-left-radius: 10px; }
.lrow-thumb-sm { width: 36px; height: 36px; border-radius: 10px; font-size: 14px; }
.lrow-child { min-height: 62px; }
.row-in { animation: rise .45s var(--ease-out) both; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); font-weight: 500; }
.crumbs a:hover { color: var(--brand); }
.crumbs .ico { width: 14px; height: 14px; opacity: .6; }

/* ---------- home band ---------- */
.band-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.band-cell { display: flex; gap: 12px; align-items: flex-start; padding: 6px 16px 4px 0; min-width: 0; }
.band-cell + .band-cell { padding-left: 16px; border-left: 1px solid var(--border); }
.band-ico { width: 34px; height: 34px; border-radius: 10px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); }
.band-ico .ico { width: 18px; height: 18px; }
@media (max-width: 1240px) { .band-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 16px; } .band-cell:nth-child(4) { border-left: 0; padding-left: 0; } }
@media (max-width: 860px) { .band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .band-cell:nth-child(odd) { border-left: 0; padding-left: 0; } .band-cell:nth-child(4) { border-left: 1px solid var(--border); padding-left: 16px; } }

/* ---------- tree: branches ---------- */
.tree-bar .seg + .seg { margin-left: 4px; }
.tree-stage {
  position: relative; height: calc(100vh - 230px); min-height: 540px; border-radius: var(--r-2xl); overflow: hidden;
  cursor: grab; touch-action: none; user-select: none;
  background-image: radial-gradient(circle, var(--grid) 1.2px, transparent 1.3px); background-size: 24px 24px; background-color: var(--glass);
}
.tree-stage.dragging { cursor: grabbing; }
.tree-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.tree-links { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; }
.tree-nodes { position: absolute; left: 0; top: 0; }
.tn {
  --c: #2081e2;
  position: absolute; left: 0; top: 0; border-radius: 14px; cursor: pointer; will-change: transform, opacity;
  background: linear-gradient(135deg, color-mix(in srgb, var(--c) 16%, var(--surface)), color-mix(in srgb, var(--c) 6%, var(--surface)));
  border: 1px solid color-mix(in srgb, var(--c) 42%, transparent);
  box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--c) 70%, transparent), inset 0 1px 0 var(--glass-hi);
  transition: box-shadow var(--std) var(--ease), border-color var(--std);
}
:root[data-theme="dark"] .tn { background: linear-gradient(135deg, color-mix(in srgb, var(--c) 20%, #0d1721), color-mix(in srgb, var(--c) 7%, #0b1520)); }
.tn:hover { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 16px 34px -12px color-mix(in srgb, var(--c) 80%, transparent); z-index: 3; }
.tn-in { padding: 11px 14px 10px; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 4px; position: relative; overflow: hidden; border-radius: inherit; }
.tn-in::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c); }
.tn-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tn-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 10px var(--c); }
.tn-gico { width: 12px; height: 12px; border-radius: 4px; flex: none; }
.tn-name { color: var(--ink); font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tn-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.tn-meta span:first-child { overflow: hidden; text-overflow: ellipsis; }
.tn-money { color: var(--ink); font-weight: 600; }
.tn-bar { height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--c) 14%, transparent); overflow: hidden; margin-top: 3px; }
.tn-bar i { display: block; height: 100%; border-radius: inherit; background: var(--c); }
.tn-group { border-radius: 16px; }
.tn-group .tn-name { font-size: 15px; }
.tn-person { border-radius: 999px; }
.tn-person .tn-in::before { display: none; }
.tn-person-in { flex-direction: row; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; }
.tn-av { width: 34px; height: 34px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #04111d)); }
.tn-ptext { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.tn-root { border-radius: 24px; cursor: default; border: 1px solid rgba(32, 129, 226, .55);
  background: radial-gradient(120% 90% at 0% 0%, rgba(32, 129, 226, .28), transparent 60%), radial-gradient(120% 90% at 100% 100%, rgba(124, 77, 255, .2), transparent 60%), var(--glass-strong);
  box-shadow: 0 0 0 6px rgba(32, 129, 226, .08), 0 30px 60px -20px rgba(32, 129, 226, .55); }
.tn-root:hover { box-shadow: 0 0 0 6px rgba(32, 129, 226, .12), 0 30px 60px -20px rgba(32, 129, 226, .65); }
.tr-root { padding: 20px 22px; height: 100%; display: flex; flex-direction: column; }
.tr-name { color: var(--ink); font-weight: 700; font-size: 20px; letter-spacing: -0.3px; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-big { color: var(--up); font-size: 30px; font-weight: 600; letter-spacing: -0.8px; margin-top: 8px; line-height: 1.1; white-space: nowrap; }
.tr-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.tr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 8px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.tr-grid div { display: flex; flex-direction: column; min-width: 0; }
.tr-grid b { color: var(--ink); font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tr-grid span { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.tr-root-big { padding: 0; }
.tr-root-big .tr-big { font-size: clamp(34px, 6vw, 52px); letter-spacing: -1.5px; }
.tr-root-big .tr-name { font-size: 24px; }
.tr-root-big .tr-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: 20px; padding-top: 18px; }
.tr-root-big .tr-grid b { font-size: 22px; }
.tr-root-big .tr-grid span { font-size: 13px; }
.tn-toggle {
  position: absolute; top: 50%; right: -14px; transform: translateY(-50%); min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px;
  border: 1px solid var(--c); background: var(--surface); color: var(--ink); font-family: var(--mono); font-size: 11.5px; font-weight: 600; cursor: pointer; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .4); transition: transform var(--std) var(--ease-spring), background-color var(--fast);
}
:root[data-theme="dark"] .tn-toggle { background: #0d1721; }
.tn.side-left .tn-toggle { right: auto; left: -14px; }
.tn-toggle:hover { transform: translateY(-50%) scale(1.12); }
.tn.is-closed .tn-toggle { background: var(--c); color: #fff; }
.tree-tip { max-width: 260px; }
.tree-tools { position: absolute; right: 14px; bottom: 14px; z-index: 5; display: flex; gap: 4px; padding: 6px; border-radius: 16px; align-items: center; }
.tree-tools .icon-btn { width: 38px; height: 38px; background: transparent; border: 0; }
.tree-tools .icon-btn:hover { background: var(--hover); }
.tree-tools .icon-btn svg { width: 19px; height: 19px; }
.tree-tools-sep { width: 1px; height: 22px; background: var(--border-strong); margin: 0 4px; }
.tree-legend { padding: 0 4px; }
.tree-legend .grad-bar { width: 64px !important; border-radius: 4px; }
:root[data-theme="dark"] .tree-legend .grad-bar { background: linear-gradient(90deg, #1f4d2c, #30d158); }
:root[data-theme="light"] .tree-legend .grad-bar { background: linear-gradient(90deg, #b9e3c4, #248a3d); }

/* ---------- tree: outline ---------- */
.ol { display: flex; flex-direction: column; }
.ol-node { position: relative; }
.ol-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 0; border-radius: var(--r-lg); position: relative; animation: rise .45s var(--ease-out) both; }
.ol-body { flex: 1; min-width: 0; cursor: pointer; border-radius: var(--r-lg); }
.ol-body .tn-in { padding: 10px 14px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--c) 13%, transparent), transparent); transition: border-color var(--fast), background-color var(--fast); }
.ol-body:hover .tn-in { border-color: var(--c); }
.ol-body .tn-person-in { padding: 6px 14px 6px 6px; border-radius: 999px; }
.ol-body .tn-in::before { top: 9px; bottom: 9px; }
.ol-toggle { width: 34px; height: 34px; flex: none; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: var(--surface); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; position: relative; color: var(--ink); z-index: 1; }
:root[data-theme="dark"] .ol-toggle { background: #0d1721; }
.ol-chev { width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-1px, -1px); transition: transform var(--std) var(--ease-out); }
.ol-node.closed > .ol-row .ol-chev { transform: rotate(-45deg); }
.ol-cnt { position: absolute; top: -7px; right: -9px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--c); color: #fff; font-family: var(--mono); font-size: 10.5px; font-weight: 600; display: none; align-items: center; justify-content: center; }
.ol-node.closed > .ol-row .ol-cnt { display: inline-flex; }
.ol-spacer { width: 34px; flex: none; }
.ol-kids { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .38s var(--ease-out), opacity .3s; margin-left: 16px; padding-left: 0; border-left: var(--w) solid color-mix(in srgb, var(--c) 55%, transparent); border-bottom-left-radius: 12px; }
.ol-node.closed > .ol-kids { grid-template-rows: 0fr; opacity: 0; }
.ol-inner { overflow: hidden; min-height: 0; padding-left: 22px; }
.ol-kids > .ol-inner > .ol-node > .ol-row::before { content: ""; position: absolute; left: -22px; top: 50%; width: 22px; border-top: var(--w) solid color-mix(in srgb, var(--c) 55%, transparent); }
.tree-hero .tr-root { padding: 0; }
@media (max-width: 860px) {
  .tree-stage { height: calc(100vh - 290px); min-height: 440px; border-radius: var(--r-xl); }
  .tr-root-big .tr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tree-bar > .row { width: 100%; flex-wrap: nowrap; }
  .tree-bar > .row .seg { flex: 1; }
  .ol-kids { margin-left: 16px; }
  .ol-inner { padding-left: 12px; }
  .ol-row { gap: 6px; }
  .ol-kids > .ol-inner > .ol-node > .ol-row::before { left: -12px; width: 12px; }
}

/* ---------- entrance animation ---------- */
.rise { animation: rise .6s var(--ease-out) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: rise .55s var(--ease-out) both; }
.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 50ms; }
.stagger > *:nth-child(3) { animation-delay: 100ms; }
.stagger > *:nth-child(4) { animation-delay: 150ms; }
.stagger > *:nth-child(5) { animation-delay: 200ms; }
.stagger > *:nth-child(6) { animation-delay: 250ms; }
.stagger > *:nth-child(7) { animation-delay: 300ms; }
.stagger > *:nth-child(8) { animation-delay: 350ms; }
.stagger > *:nth-child(n+9) { animation-delay: 400ms; }
.share-wrap > .rise:nth-child(3) { animation-delay: 60ms; }
.share-wrap > .rise:nth-child(4) { animation-delay: 120ms; }
.share-wrap > .rise:nth-child(5) { animation-delay: 180ms; }
.share-wrap > .rise:nth-child(6) { animation-delay: 240ms; }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-btn { width: 200px; }
}
@media (max-width: 1080px) {
  :root { --side-w: 220px; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .list-head, .lrow { grid-template-columns: minmax(0, 2.4fr) minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr); }
  .col-hide-md { display: none; }
}
@media (max-width: 860px) {
  .side { display: none; }
  .main { margin-left: 0; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
  .top { height: 64px; padding-top: 8px; gap: 8px; }
  .top::before { inset: 0 -16px; }
  .top-brand { display: block; }
  .top-title { font-size: 20px; }
  .search-btn { width: 44px; padding: 0; justify-content: center; }
  .search-btn .search-text, .search-btn kbd { display: none; }
  .add-btn { display: none; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > .stat:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats > .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero, .panel, .welcome, .share-hero { padding: 18px; border-radius: var(--r-xl); }
  .hero-value { letter-spacing: -1.2px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .list-head { display: none; }
  .lrow { grid-template-columns: minmax(0, 1fr) auto !important; padding: 10px 8px; gap: 10px; }
  .lrow > .hide-sm, .lrow > .col-hide-md { display: none; }
  .seg { display: flex; flex-wrap: nowrap; width: 100%; }
  .seg button { flex: 1; padding: 0 6px; white-space: nowrap; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px 6px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .filter { flex: none; }
  .mini { flex-wrap: wrap; }
  .mini > .mini-main { flex: 1 1 calc(100% - 60px); }
  .mini > .btn { margin-left: 46px; }
  .row-between > .row { width: 100%; }
  .row-between > .row > .btn { flex: 1; }
  .lrow + .lrow::before { left: 8px; right: 8px; }
  .board { grid-template-columns: repeat(6, 82vw); }
  .add-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .form-row { grid-template-columns: minmax(0, 1fr); }
  .chips-col { grid-template-columns: minmax(0, 1fr); }
  .scrim { padding: 0; align-items: flex-end; }
  .sheet { border-radius: 24px 24px 0 0; margin: 0; max-height: 94vh; overflow-y: auto; animation-name: sheet-up; padding-bottom: env(safe-area-inset-bottom); }
  .scrim.out .sheet { animation-name: sheet-down; }
  .sheet-head { padding: 18px 18px 0; position: sticky; top: 0; z-index: 2; background: var(--glass-strong); padding-bottom: 12px; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  .sheet-body { padding: 10px 18px 22px; }
  .form-actions { position: sticky; bottom: 0; background: var(--glass-strong); margin: 0 -18px -22px; padding: 12px 18px 18px; -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  .form-actions .btn { flex: 1; }
  .mile { grid-template-columns: 84px 22px minmax(0, 1fr); }
  .mile::before { left: calc(84px + 12px + 10.5px); }
  .share-actions .btn span:last-child { display: none; }
  .share-actions .btn { width: 44px; padding: 0; }
  .tl-month { padding-left: 54px; top: 64px; }
  .mini-btn { opacity: 1; }
  #toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }

  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 30; left: 12px; right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom)); height: 68px; border-radius: 22px; padding: 0 6px; align-items: center;
    background: var(--glass-strong);
  }
  .tab { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: 56px; border-radius: 16px; color: var(--muted); font-size: 11px; font-weight: 600; background: none; border: 0; cursor: pointer; }
  .tab.active { color: var(--brand); }
  .tab .ico { width: 22px; height: 22px; }
  .tab-add { width: 56px; height: 56px; border-radius: 18px; background: var(--brand); color: #fff; margin: 0 auto; box-shadow: 0 10px 24px -8px rgba(32, 129, 226, .9); transition: transform var(--std) var(--ease-spring); }
  .tab-add:active { transform: scale(.92); }
  .tab-add .ico { width: 26px; height: 26px; }
}
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@media (max-width: 520px) {
  .tiles { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .stat-value { font-size: 20px; }
  .icon-btn { width: 42px; height: 42px; }
  .top-right { gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
  .orb { animation: none; }
}


/* ================= calm pass: no glow, no coloured shadows ================= */
body { font-feature-settings: "cv11"; letter-spacing: -0.005em; }
.logo-mark { box-shadow: none; }
.brand-word { letter-spacing: -0.4px; }
.btn { font-weight: 500; transition: background-color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--std) var(--ease), opacity var(--fast); }
.btn:active { transform: scale(0.98); }
.btn-primary { box-shadow: none; }
.btn-primary:hover { background: var(--blue-hover); }
.btn-ghost { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.icon-btn { background: var(--surface); }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn.on { color: var(--blue); border-color: var(--border-strong); }

.side { background: var(--surface); }
.nav-item { font-weight: 500; }
.nav-item.active { background: var(--surface-2); color: var(--ink); }
.nav-item.active::before { display: none; }
.nav-item.active .ico { color: var(--blue); }
.nav-count.alert { background: var(--down); }
.avatar { background: linear-gradient(180deg, #a1a1a6, #7c7c80); }

.top::before { background: var(--bar-bg); opacity: 1; -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
.search-btn { background: var(--surface-2); border-color: transparent; }
.search-btn:hover { border-color: var(--border); }

.hero::after, .share-hero::after { display: none; }
.hero-value { font-weight: 600; letter-spacing: -0.035em; }
.stat-value, .goal-now, .tr-big { letter-spacing: -0.02em; }
.eyebrow { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 500; color: var(--muted); }
.nav-group { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; }
.palette-group { text-transform: none; letter-spacing: 0; font-size: 12px; }
.grave-lesson span { text-transform: none; letter-spacing: 0; font-size: 12px; }

.dot { box-shadow: none; }
.lrow-thumb, .detail-thumb { color: var(--c-ink, #fff); }
.detail-thumb { box-shadow: none; }
.bar-fill { background: var(--c); }
.progress-fill { background: var(--blue); }
.progress-fill::after { display: none; }
.progress-fill.done { background: var(--up); }
.heat i[data-l="1"] { background: color-mix(in srgb, var(--blue) 28%, var(--heat-0)); }
.heat i[data-l="2"] { background: color-mix(in srgb, var(--blue) 50%, var(--heat-0)); }
.heat i[data-l="3"] { background: color-mix(in srgb, var(--blue) 75%, var(--heat-0)); }
.heat i[data-l="4"] { background: var(--blue); box-shadow: none; }
.heat i { animation: none; }
.empty-art { animation: none; }

.card:hover { transform: none; border-color: var(--border-strong); box-shadow: var(--shadow); }
.goal:hover, .grave:hover, .step:hover, .pcard:hover { transform: none; }
.pcard:hover { box-shadow: none; }
.step:hover { border-color: var(--border-strong); background: var(--surface-2); }
.add-tile { background: var(--surface-2); border-color: transparent; }
.add-tile:hover { transform: none; background: var(--surface-3); border-color: transparent; }
:root[data-theme="dark"] .pcard, :root[data-theme="dark"] .insight { background: var(--surface-2); }
.insight { background: var(--surface-2); border-color: transparent; }
.filter { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
.seg { background: var(--surface-2); border-color: transparent; }
:root[data-theme="dark"] .seg button.on { background: var(--surface-3); }
.chip span { background: var(--surface); }
:root[data-theme="dark"] .chip span { background: var(--surface-2); border-color: transparent; }
.chip input:checked + span { animation: none; }
:root[data-theme="dark"] .input, :root[data-theme="dark"] .select, :root[data-theme="dark"] .textarea, :root[data-theme="dark"] .money-input { background: var(--surface-2); border-color: transparent; }
.input:focus, .select:focus, .textarea:focus, .money-input:focus-within { box-shadow: 0 0 0 4px var(--brand-ring); }
.money-input input { font-family: var(--font); font-weight: 600; letter-spacing: -0.02em; }
.switch i::after { box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.switch input:checked + i { background: var(--up); border-color: var(--up); }
.money-switches { border-color: var(--border); background: var(--surface-2); }

.tl-node.k-mile { box-shadow: none; border-color: color-mix(in srgb, var(--warn) 40%, transparent); color: var(--warn); }
:root[data-theme="dark"] .tl-node { background: var(--surface-2); }
.toast, .chart-tip { background: var(--glass-strong); }
.sheet { background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(30px); backdrop-filter: saturate(180%) blur(30px); box-shadow: var(--shadow-lg); animation: sheet-in .34s var(--ease-out) both; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.scrim { -webkit-backdrop-filter: none; backdrop-filter: none; }
.sheet-close:hover { transform: none; background: var(--surface-3); }
.rise { animation-duration: .45s; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes view-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* tree */
.tree-stage { background-color: var(--surface); background-image: radial-gradient(circle, var(--grid) 1px, transparent 1.1px); }
.tn, :root[data-theme="dark"] .tn { background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
:root[data-theme="dark"] .tn { background: var(--surface-2); border-color: transparent; }
.tn:hover { border-color: var(--c); box-shadow: var(--shadow); }
.tn-dot { box-shadow: none; }
.tn-in::before { width: 3px; }
.tn-bar { background: var(--surface-3); }
.tn-av { background: var(--c); }
.tn-root, .tn-root:hover { border: 1px solid var(--border-strong); background: var(--surface); box-shadow: var(--shadow); }
:root[data-theme="dark"] .tn-root { background: var(--surface-2); border-color: var(--border-strong); }
.tn-toggle { box-shadow: none; border-color: var(--border-strong); background: var(--surface); color: var(--muted); }
:root[data-theme="dark"] .tn-toggle { background: var(--surface-3); }
.tn-toggle:hover { transform: translateY(-50%); color: var(--ink); }
.tn.is-closed .tn-toggle { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tree-tools { background: var(--glass-strong); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); box-shadow: var(--shadow); }
.tree-tools .icon-btn { background: transparent; }
.ol-body .tn-in { background: var(--surface); border-color: var(--border-strong); }
:root[data-theme="dark"] .ol-body .tn-in { background: var(--surface-2); border-color: transparent; }
.ol-toggle, :root[data-theme="dark"] .ol-toggle { background: var(--surface-2); border-color: transparent; color: var(--muted); }
.ol-cnt { background: var(--ink); color: var(--bg); }
.row-toggle.open { color: var(--blue); border-color: var(--border-strong); background: var(--surface-2); }
.band-ico, .insight.info .insight-ico { background: var(--surface-2); color: var(--muted); }
.stat-feature .stat-value, .stat-value.pos { color: var(--up); }
.owner-note { border-color: var(--border); }

/* ---------- print (PDF) ---------- */
@media print {
  @page { margin: 14mm; }
  :root, :root[data-theme="dark"] {
    --bg: #fff; --glass: #fff; --glass-strong: #fff; --surface: #fff; --surface-2: #f2f5f8; --surface-3: #e5eaf1;
    --border: #e3e8ee; --border-strong: #d0d7df; --ink: #04111d; --body: #26323d; --muted: #5d6974; --subtle: #8a939b; --grid: #eef1f5;
    --up: #16935a;
  }
  body { background: #fff; }
  .ambient, .no-print, .owner-note { display: none !important; }
  .glass { -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .share-wrap { padding: 0; max-width: none; }
  .panel, .share-hero { break-inside: avoid; }
  .share-item, .mile { break-inside: avoid; }
  .rise, .stagger > * { animation: none !important; }
  .chart .grow-col, .chart .draw-line, .chart .fade-area { animation: none !important; stroke-dashoffset: 0 !important; }
  .share-hero::after { display: none; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
