/* ProSyS Planner — ink / acid / violet, after aimexrex.xyz and the ProSyS VPN shop */
:root {
  --bg: #070708; --bg2: #0d0d10; --panel: rgba(19, 19, 23, .74); --panel-solid: #111114; --raise: rgba(255, 255, 255, .035);
  --ink: #e9e7df; --muted: #8d8b84; --faint: #4a4a50;
  --line: rgba(233, 231, 223, .09); --line2: rgba(233, 231, 223, .17);
  --acid: #c7ff35; --acid-tx: #c7ff35; --acid-ink: #070708; --acid-soft: rgba(199, 255, 53, .12);
  --violet: #7957ff; --violet-soft: rgba(121, 87, 255, .16);
  --mint: #2fe39a; --danger: #ff4d5e; --danger-soft: rgba(255, 77, 94, .13); --warn: #ffb02e;
  --shadow: 0 24px 70px rgba(0, 0, 0, .45);
  --r: 22px; --r-sm: 14px;
  --font: Vazirmatn, Tahoma, "Segoe UI", sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f3f2ec; --bg2: #ffffff; --panel: rgba(255, 255, 255, .86); --panel-solid: #ffffff; --raise: rgba(20, 20, 22, .03);
  --ink: #141416; --muted: #66655f; --faint: #b4b3ad;
  --line: rgba(20, 20, 22, .08); --line2: rgba(20, 20, 22, .16);
  --acid: #c7ff35; --acid-tx: #3d6a00; --acid-ink: #0b0b0c; --acid-soft: rgba(120, 190, 0, .14);
  --violet: #5b3df0; --violet-soft: rgba(91, 61, 240, .1);
  --mint: #0aa66a; --danger: #e5283b; --danger-soft: rgba(229, 40, 59, .09); --warn: #c77a00;
  --shadow: 0 18px 50px rgba(20, 20, 30, .1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font: 15px/1.7 var(--font); overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--acid); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3 { margin: 0; line-height: 1.35; }
p { margin: .3em 0; }
small { font-size: .82em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; justify-content: center; }
.acid { color: var(--acid-tx); }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ic { flex: none; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; z-index: 99; background: var(--acid); color: var(--acid-ink); padding: 8px 14px; border-radius: 10px; }
.skip:focus { inset-inline-start: 8px; }

/* atmosphere */
.noise { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }
.orb { position: fixed; border-radius: 50%; filter: blur(110px); pointer-events: none; z-index: 0; }
.orb1 { background: var(--violet); width: 38vw; height: 38vw; inset-inline-start: -10vw; top: -12vw; opacity: .22; }
.orb2 { background: var(--acid); width: 22vw; height: 22vw; inset-inline-end: -8vw; bottom: 6vh; opacity: .08; }
:root[data-theme="light"] .orb1 { opacity: .12; } :root[data-theme="light"] .orb2 { opacity: .14; }
:root[data-theme="light"] .noise { opacity: .03; }

.brand { font: 800 17px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: -1.5px; direction: ltr; display: inline-flex; align-items: center; white-space: nowrap; }
.brand i { color: var(--acid-tx); font-style: normal; font-size: 1.5em; margin: -3px 2px 0; }
.brand.big { font-size: 26px; letter-spacing: -2.5px; }

/* boot */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 22px; justify-items: center; }
.boot-bar { width: 140px; height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; background: var(--acid); border-radius: 3px; animation: slide 1s ease-in-out infinite alternate; }
@keyframes slide { to { transform: translateX(-150%); } }
.fatal { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 10px; padding: 24px; }

/* ------------------------------------------------------------ shell */
.shell { position: relative; z-index: 1; display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 26px 18px; border-inline-end: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(16px); }
.side-nav { display: grid; gap: 3px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; color: var(--muted); transition: background .2s, color .2s; border: 0; background: none; }
.nav-item:hover { color: var(--ink); background: var(--raise); }
.nav-item.active { color: var(--ink); background: var(--acid-soft); box-shadow: inset -3px 0 0 var(--acid); }
.nav-item.active .ic { color: var(--acid-tx); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.sync-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.sync-dot.offline { background: var(--danger) !important; animation: none; box-shadow: none; }
.sync-dot.on { background: var(--acid); box-shadow: 0 0 10px var(--acid); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.side-timer { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 4px 10px; padding: 14px; border-radius: var(--r-sm); background: var(--acid-soft); border: 1px solid color-mix(in srgb, var(--acid) 35%, transparent); }
.side-timer-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-timer b { grid-column: 1 / -1; font-size: 26px; font-variant-numeric: tabular-nums; color: var(--acid-tx); direction: ltr; text-align: right; }

.main { min-width: 0; padding: 0 clamp(16px, 3vw, 40px) 60px; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 22px 0 18px; position: sticky; top: 0; z-index: 5; background: linear-gradient(var(--bg) 70%, transparent); }
.top-title { flex: 1; min-width: 0; }
.top-title h1 { font-size: 24px; }
.top-date { display: flex; gap: 10px; color: var(--muted); font-size: 12.5px; flex-wrap: wrap; }
.top-clock { font-variant-numeric: tabular-nums; color: var(--acid-tx); }
.capture-btn { display: flex; align-items: center; gap: 10px; min-width: 300px; padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel); color: var(--muted); backdrop-filter: blur(12px); transition: border-color .2s; }
.capture-btn:hover { border-color: var(--acid); color: var(--ink); }
.capture-btn span { flex: 1; text-align: start; }
.capture-btn kbd { font: 12px ui-monospace, monospace; padding: 1px 7px; border-radius: 6px; border: 1px solid var(--line2); }
.tabbar { display: none; }
#view { outline: none; }
#view.enter > * { animation: up .35s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes up { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 980px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: 0 16px calc(96px + var(--safe-b)); }
  .topbar { padding: 14px 0 10px; }
  .top-title h1 { font-size: 20px; }
  .capture-btn { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(2, 1fr) 64px repeat(3, 1fr); align-items: center;
    position: fixed; inset-inline: 10px; bottom: calc(10px + var(--safe-b)); z-index: 20; height: 66px; padding: 0 6px;
    border-radius: 24px; background: color-mix(in srgb, var(--panel-solid) 88%, transparent); border: 1px solid var(--line2);
    backdrop-filter: blur(18px); box-shadow: var(--shadow);
  }
  .tabbar .nav-item { flex-direction: column; gap: 2px; padding: 6px 0; font-size: 10.5px; justify-content: center; border-radius: 16px; }
  .tabbar .nav-item.active { box-shadow: none; background: none; color: var(--acid-tx); }
  .tab-fab { width: 54px; height: 54px; margin: -26px auto 0; border-radius: 18px; border: 0; background: var(--acid); color: var(--acid-ink); display: grid; place-items: center; box-shadow: 0 10px 30px color-mix(in srgb, var(--acid) 45%, transparent); transition: transform .15s; }
  .tab-fab:active { transform: scale(.92); }
}
.in-tg .theme-btn { display: none; }

/* ------------------------------------------------------------ primitives */
.page { display: grid; gap: 16px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; backdrop-filter: blur(14px); min-width: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.section-head h2 { font-size: 15.5px; display: flex; align-items: center; gap: 6px; }
.section-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; }
.row-wrap { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px; border-radius: 14px; border: 1px solid var(--line2); background: var(--raise); font-weight: 700; transition: transform .12s, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--acid); color: var(--acid-ink); border-color: transparent; }
.btn.primary:hover { box-shadow: 0 8px 26px color-mix(in srgb, var(--acid) 35%, transparent); }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.mint { background: var(--mint); color: #062015; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.big { min-height: 52px; padding: 12px 26px; font-size: 16px; border-radius: 16px; }
.danger-text { color: var(--danger) !important; }
.icon-btn { width: 40px; height: 40px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid transparent; background: none; color: var(--muted); flex: none; }
.icon-btn:hover { background: var(--raise); color: var(--ink); }
.icon-btn.on { color: var(--acid-tx); }
.icon-btn.small { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn:disabled { opacity: .3; }
.link-btn { border: 0; background: none; color: var(--acid-tx); font-size: 13px; padding: 4px 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { --chip: var(--acid); display: inline-flex; align-items: center; gap: 4px; min-height: 36px; padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line2); background: var(--raise); font-size: 13.5px; white-space: nowrap; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--chip); }
.chip.on { background: color-mix(in srgb, var(--chip) 20%, transparent); border-color: var(--chip); color: var(--ink); font-weight: 700; }
.chip.small { min-height: 30px; padding: 3px 11px; font-size: 12.5px; }
.chips.recent .chip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.seg { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); gap: 2px; overflow-x: auto; max-width: 100%; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 10px; color: var(--muted); white-space: nowrap; font-size: 14px; min-height: 36px; }
.seg button.on { background: var(--panel-solid); color: var(--ink); font-weight: 700; box-shadow: 0 2px 10px rgba(0, 0, 0, .18); }

.input { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line2); background: color-mix(in srgb, var(--bg2) 70%, transparent); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--acid); box-shadow: 0 0 0 3px var(--acid-soft); }
textarea.input { resize: vertical; line-height: 1.8; }
.input.num { font-variant-numeric: tabular-nums; }
.input::placeholder, .note-body::placeholder { color: var(--faint); }
.field { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field-label { font-size: 13px; color: var(--muted); font-weight: 700; }
.hint { color: var(--muted); font-size: 12px; }
.copy-row { display: flex; gap: 8px; }
.user-list { display: grid; gap: 8px; }
.user-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); flex-wrap: wrap; }
.user-main { display: grid; min-width: 0; }
.copy-row .input { font-size: 12.5px; }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.money-field { display: grid; gap: 4px; }
.money-hint { color: var(--acid-tx); min-height: 1.2em; }
.date-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: start; cursor: pointer; }
.both-dates { display: inline-flex; flex-direction: column; line-height: 1.35; }
.both-dates small { color: var(--muted); font-size: 11.5px; direction: ltr; text-align: start; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 0 8px; border-radius: 999px; background: var(--raise); border: 1px solid var(--line); font-size: 11.5px; color: var(--muted); line-height: 20px; }
.tag.time { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.tag.acid { color: var(--acid-tx); border-color: color-mix(in srgb, var(--acid) 40%, transparent); }
details.more > summary, details.preview > summary, details.overdue > summary { cursor: pointer; color: var(--muted); font-size: 13.5px; padding: 6px 0; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row span { display: grid; }
.switch-row small { color: var(--muted); }
input[role="switch"] { appearance: none; width: 48px; height: 28px; border-radius: 99px; background: var(--line2); position: relative; flex: none; cursor: pointer; transition: background .2s; }
input[role="switch"]::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: inset-inline-start .2s; }
input[role="switch"]:checked { background: var(--acid); }
input[role="switch"]:checked::after { inset-inline-start: 23px; background: var(--acid-ink); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 14px 16px; display: grid; gap: 2px; min-width: 0; }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-value { font-size: 23px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-sub { color: var(--muted); font-size: 11.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stat.acid .stat-value { color: var(--acid-tx); }
.stat.danger .stat-value { color: var(--danger); }
.stat.warn { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.delta { font-size: 11px; font-weight: 700; padding: 0 6px; border-radius: 99px; white-space: nowrap; }
.delta.bad { color: var(--danger); background: var(--danger-soft); }
.delta.good { color: var(--mint); background: color-mix(in srgb, var(--mint) 14%, transparent); }
.banner { width: 100%; text-align: start; border: 1px dashed color-mix(in srgb, var(--warn) 60%, transparent); background: color-mix(in srgb, var(--warn) 10%, transparent); padding: 12px 16px; border-radius: 16px; }

.empty { text-align: center; padding: 26px 12px; color: var(--muted); display: grid; gap: 8px; justify-items: center; }
.empty-emoji { font-size: 38px; }
.skeleton-list { display: grid; gap: 14px; }
.skeleton { height: 110px; border-radius: var(--r); background: linear-gradient(90deg, var(--raise), var(--line), var(--raise)); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; }
.skeleton.tall { height: 300px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------ home */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 4px 0 6px; }
.eyebrow { color: var(--muted); font-size: 13px; margin: 0; }
.hero-title { font-size: clamp(22px, 3.4vw, 34px); letter-spacing: -.5px; }
.capture-inline { display: none; }
@media (max-width: 980px) { .capture-inline { display: inline-flex; } }
.grid-home { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.grid-home .col { display: grid; gap: 16px; }
.grid-2col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .grid-home, .grid-2col { grid-template-columns: 1fr; } }
.win { color: var(--acid-tx); font-weight: 700; margin-top: 10px; }
.habit-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.habit-chip { position: relative; flex: none; width: 84px; display: grid; justify-items: center; gap: 2px; padding: 12px 6px 8px; border-radius: 18px; border: 1px solid var(--line2); background: var(--raise); }
.habit-chip.done { background: var(--acid-soft); border-color: var(--acid); }
.habit-emoji { font-size: 26px; }
.habit-name { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.streak { position: absolute; top: -8px; inset-inline-end: -4px; font-style: normal; font-size: 10.5px; background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 99px; padding: 0 6px; }
.focus-live { display: flex; justify-content: space-between; align-items: center; border-color: var(--acid); }
.focus-live b { font-size: 24px; color: var(--acid-tx); font-variant-numeric: tabular-nums; }
.pick-list { display: grid; gap: 8px; }
.pick { text-align: start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--raise); }
.pick:hover { border-color: var(--acid); }

/* timer */
.timer-card { overflow: hidden; }
.timer-card.running { border-color: color-mix(in srgb, var(--acid) 45%, transparent); background: radial-gradient(120% 120% at 100% 0%, var(--acid-soft), transparent 60%), var(--panel); }
.timer-card.running.snapp { border-color: color-mix(in srgb, var(--mint) 45%, transparent); }
.timer-card.paused { border-color: color-mix(in srgb, var(--muted, #888) 45%, transparent); }
.timer-top { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.timer-kind { font-weight: 700; }
.timer-top .muted { margin-inline-start: auto; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 0 var(--danger); animation: rec 1.6s infinite; flex: none; }
@keyframes rec { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--danger) 60%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.timer-title { font-size: 21px; margin: 10px 0 0; word-break: break-word; }
.timer-clock { font-size: clamp(46px, 8vw, 68px); font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; color: var(--acid-tx); direction: ltr; text-align: right; letter-spacing: -1px; margin: 4px 0; }
.snapp .timer-clock { color: var(--mint); }
.timer-earn { font-size: 14px; }
.timer-earn b { font-variant-numeric: tabular-nums; }
.timer-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.timer-start { display: flex; gap: 10px; margin: 14px 0 10px; }
.timer-start .input { min-height: 52px; font-size: 16px; }
.timer-alt { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* items */
.items { display: grid; gap: 6px; }
.item { --pr: transparent; display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 14px; border: 1px solid transparent; background: var(--raise); box-shadow: inset -3px 0 0 var(--pr); }
.item:hover { border-color: var(--line2); }
.item.done .item-title { text-decoration: line-through; color: var(--muted); }
.item.event { background: var(--violet-soft); }
.check { flex: none; width: 26px; height: 26px; margin-top: 2px; border-radius: 9px; border: 2px solid var(--line2); background: none; display: grid; place-items: center; color: var(--acid-ink); transition: background .15s, border-color .15s, transform .1s; }
.check:hover { border-color: var(--acid); }
.check:active { transform: scale(.85); }
.check[aria-checked="true"] { background: var(--acid); border-color: var(--acid); }
.check.small { width: 20px; height: 20px; border-radius: 6px; margin: 0; }
.item-main { flex: 1; min-width: 0; text-align: start; border: 0; background: none; padding: 0; display: grid; gap: 4px; }
.item-title { word-break: break-word; }
.item-meta { display: flex; gap: 5px; flex-wrap: wrap; }
.item-meta:empty { display: none; }
.subtasks { display: grid; gap: 4px; margin-bottom: 6px; }
.subtask { display: flex; align-items: center; gap: 8px; }
.subtask span { flex: 1; }
.subtask span.done { text-decoration: line-through; color: var(--muted); }

/* entries / transactions */
.entries, .tx-list { display: grid; gap: 6px; }
.entry, .tx { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; background: var(--raise); }
.entry:hover, .tx:hover { border-color: var(--line2); }
.entry.running { border-color: color-mix(in srgb, var(--acid) 40%, transparent); }
.entry-bar { width: 4px; align-self: stretch; border-radius: 4px; flex: none; }
.entry-main, .tx-main { flex: 1; min-width: 0; display: grid; }
.entry-main b, .tx-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-main small, .tx-main small { color: var(--muted); font-variant-numeric: tabular-nums; }
.entry-side { display: grid; justify-items: end; text-align: end; }
.entry-side b { direction: ltr; }
.entry-side small { color: var(--muted); }
.entries-day { display: flex; align-items: baseline; gap: 10px; padding: 10px 4px 2px; font-size: 13px; }
.entries-day small { color: var(--muted); }
.entries-day .mono { margin-inline-start: auto; color: var(--muted); }
.tx-emoji { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 19px; flex: none; }
.tx-amount { direction: ltr; white-space: nowrap; }
.tx.in .tx-amount { color: var(--mint); }
.tx.pending { border: 1px dashed color-mix(in srgb, var(--warn) 55%, transparent); }
.dur-out { display: block; color: var(--acid-tx); font-variant-numeric: tabular-nums; margin: -6px 0 12px; min-height: 1.4em; }
.proj-list { display: grid; gap: 6px; }
.proj { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--raise); text-align: start; }
.proj .muted { margin-inline-start: auto; font-size: 13px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.report-preview img { width: 100%; border-radius: 16px; border: 1px solid var(--line); margin-top: 8px; display: block; }

/* day nav */
.day-nav { display: flex; align-items: center; gap: 6px; }
.day-nav-label { border: 1px solid var(--line); background: var(--panel); border-radius: 14px; padding: 6px 14px; min-width: 170px; display: grid; justify-items: center; text-align: center; }
.day-nav-label small { color: var(--muted); font-size: 11.5px; }

/* calendar */
.calendar { user-select: none; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { display: grid; justify-items: center; }
.cal-title small { color: var(--muted); font-size: 11.5px; }
.cal-names, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-names span { text-align: center; color: var(--muted); font-size: 12px; padding: 4px 0; }
.cal-day { min-width: 0; height: clamp(44px, 11vw, 64px); border: 1px solid transparent; background: var(--raise); border-radius: 12px; display: grid; place-items: center; align-content: center; gap: 0; position: relative; padding: 2px; }
.cal-day b { font-size: 16px; line-height: 1.2; }
.cal-day small { font-size: 10px; color: var(--muted); line-height: 1; }
.cal-day:hover { border-color: var(--line2); }
.cal-day.holiday b { color: var(--danger); }
.cal-day.today { border-color: var(--acid); }
.cal-day.sel { background: var(--acid); color: var(--acid-ink); }
.cal-day.sel small, .cal-day.sel.holiday b { color: var(--acid-ink); }
.cal-dots { position: absolute; bottom: 4px; display: flex; gap: 2px; }
.cal-dots span { width: 4px; height: 4px; border-radius: 50%; background: var(--violet); }
.cal-dots span.done { background: var(--mint); }
.cal-day.sel .cal-dots span { background: var(--acid-ink); }
.holiday-note { color: var(--danger); font-size: 13px; margin: -4px 0 10px; }
.quick-days { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.plan-month { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 980px) { .plan-month { grid-template-columns: 1fr; } }
.quick-add { padding: 12px 14px; }
.quick-row { display: flex; align-items: center; gap: 10px; }
.quick-row .ic { color: var(--acid-tx); }
.quick-row .input { border: 0; background: none; box-shadow: none; padding-inline: 0; }
.parse-hint { font-size: 13px; color: var(--muted); padding-inline-start: 30px; min-height: 0; }
.parse-hint b { color: var(--ink); }
.week { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.week-day.today { border-color: color-mix(in srgb, var(--acid) 45%, transparent); }
.week-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.week-head small { color: var(--muted); flex: 1; }

/* sheets */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); backdrop-filter: blur(4px); display: grid; place-items: center; opacity: 0; transition: opacity .2s; padding: 16px; }
.overlay.in { opacity: 1; }
.sheet { width: min(560px, 100%); max-height: min(88vh, 900px); display: flex; flex-direction: column; background: var(--panel-solid); border: 1px solid var(--line2); border-radius: 26px; box-shadow: var(--shadow); transform: translateY(16px) scale(.98); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.sheet.wide { width: min(680px, 100%); }
.overlay.in .sheet { transform: none; }
.sheet-grip { display: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 6px; }
.sheet-head h2 { font-size: 17px; }
.sheet-body { padding: 8px 20px 16px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-actions { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 20px calc(16px + var(--safe-b)); border-top: 1px solid var(--line); flex-wrap: wrap; }
.sheet-actions .btn.primary { min-width: 120px; }
@media (max-width: 640px) {
  .overlay { place-items: end stretch; padding: 0; }
  .sheet, .sheet.wide { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; transform: translateY(100%); }
  .sheet-grip { display: block; width: 42px; height: 5px; border-radius: 5px; background: var(--line2); margin: 10px auto 0; }
}
.in-tg .sheet-actions { display: none; }
.in-tg .sheet-body { padding-bottom: calc(24px + var(--safe-b)); }
.confirm-msg { font-size: 16px; }
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-item { display: grid; justify-items: center; gap: 6px; padding: 18px 8px; border-radius: 18px; background: var(--raise); border: 1px solid var(--line); font-size: 13.5px; }
.more-item .ic { color: var(--acid-tx); }

/* quick capture */
.capture-input { font-size: 17px; min-height: 90px; }
.capture-preview { margin-top: 12px; display: grid; gap: 10px; }
.intent { display: grid; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--acid-soft); border: 1px solid color-mix(in srgb, var(--acid) 35%, transparent); }
.intent small { color: var(--muted); }
.plan-chips { display: inline-flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.intent-alt { display: flex; gap: 6px; flex-wrap: wrap; }

/* toasts */
#toasts { position: fixed; z-index: 80; inset-inline: 0; top: 14px; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { pointer-events: auto; background: var(--panel-solid); border: 1px solid var(--line2); color: var(--ink); padding: 10px 18px; border-radius: 14px; box-shadow: var(--shadow); transform: translateY(-14px); opacity: 0; transition: .25s; max-width: 520px; }
.toast.in { transform: none; opacity: 1; }
.toast.ok { border-color: color-mix(in srgb, var(--acid) 50%, transparent); }
.toast.err { border-color: var(--danger); }

/* charts */
.chart { margin: 0; }
.bars { width: 100%; height: 150px; display: block; overflow: visible; }
.bar rect { transition: opacity .15s; opacity: .85; }
.bar:hover rect, .bar:focus rect, .bar.hi rect { opacity: 1; }
.bar.hi rect { stroke: var(--ink); stroke-width: 2; }
.bar:focus { outline: none; }
.chart-x { display: grid; margin-top: 6px; font-size: 10.5px; color: var(--muted); text-align: center; overflow: hidden; }
.chart-x span { white-space: nowrap; overflow: hidden; }
.donut-row { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; }
@media (max-width: 560px) { .donut-row { grid-template-columns: 1fr; justify-items: center; } }
.donut-wrap { position: relative; width: 180px; height: 180px; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center b { font-size: 18px; font-variant-numeric: tabular-nums; }
.donut-center small { color: var(--muted); }
.legend { display: grid; gap: 2px; width: 100%; }
.legend-row { display: grid; grid-template-columns: auto 1fr auto auto auto; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; border: 1px solid transparent; background: none; text-align: start; font-size: 13.5px; }
.legend-row:hover, .legend-row.on { background: var(--raise); border-color: var(--line2); }
.legend-row small { color: var(--muted); }

/* money */
.money-quick { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: none; }
.quick-tile { --c: var(--acid); flex: none; display: grid; justify-items: center; gap: 4px; min-width: 92px; padding: 12px 10px; border-radius: 18px; border: 1px solid var(--line2); background: var(--panel); font-size: 12.5px; }
.quick-tile:hover { border-color: var(--c); }
.quick-tile .ic { color: var(--acid-tx); }
.qt-emoji { font-size: 24px; }
.habit-money-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.habit-money { --c: var(--acid); padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%), var(--panel); display: grid; gap: 4px; }
.hm-top { display: flex; align-items: center; gap: 8px; }
.hm-top .delta { margin-inline-start: auto; }
.hm-emoji { font-size: 22px; }
.hm-amount { font-size: 22px; font-weight: 700; }
.hm-meta { font-size: 12.5px; }
.budgets { display: grid; gap: 12px; }
.budget-top { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 4px; }
.bar { height: 8px; border-radius: 8px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 8px; background: var(--acid); }
.budget.warn .bar i { background: var(--warn); }
.budget.over .bar i { background: var(--danger); }
.goal-done .bar i { background: var(--mint); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.cat { --c: var(--acid); display: grid; justify-items: center; gap: 2px; padding: 12px 6px; border-radius: 16px; border: 1px solid var(--line); background: var(--raise); font-size: 13px; }
.cat:hover { border-color: var(--c); }
.cat span { font-size: 22px; }
.cat small { color: var(--muted); font-size: 11px; }
.pending-card { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
pre.raw { white-space: pre-wrap; font-size: 12.5px; background: var(--raise); padding: 10px; border-radius: 12px; }

/* ideas board */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.column { background: var(--raise); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-height: 240px; scroll-snap-align: start; transition: border-color .15s; }
.column.over { border-color: var(--acid); }
.col-head { display: flex; align-items: center; gap: 8px; }
.col-head .count { font-size: 12px; color: var(--muted); background: var(--panel-solid); padding: 0 8px; border-radius: 99px; }
.col-head .icon-btn { margin-inline-start: auto; }
.col-hint { display: block; margin: 2px 0 10px; }
.col-body { display: grid; gap: 8px; }
.idea { background: var(--panel-solid); border: 1px solid var(--line); border-radius: 16px; padding: 4px; cursor: grab; }
.idea.hot { box-shadow: inset -3px 0 0 var(--danger); }
.idea.drag { opacity: .4; }
.idea-main { display: grid; gap: 4px; width: 100%; text-align: start; border: 0; background: none; padding: 8px 10px 4px; }
.idea-main p { color: var(--muted); font-size: 13px; margin: 0; white-space: pre-line; }
.idea-main small { color: var(--muted); }
.idea-move { display: flex; justify-content: space-between; padding: 0 4px 2px; }
@media (max-width: 980px) { .board { grid-template-columns: repeat(4, 82%); } }

/* notes */
.search { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 180px; max-width: 360px; border: 1px solid var(--line2); border-radius: 14px; padding-inline-start: 12px; background: var(--panel); }
.search .input { border: 0; background: none; box-shadow: none; min-height: 42px; }
.search .ic { color: var(--muted); }
.note-grid { columns: 3 260px; column-gap: 14px; }
.note-card { break-inside: avoid; display: grid; gap: 6px; margin-bottom: 14px; padding: 16px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); position: relative; transition: border-color .15s, transform .15s; }
.note-card:hover { border-color: var(--line2); transform: translateY(-2px); }
.note-card p { margin: 0; white-space: pre-line; color: var(--muted); font-size: 14px; }
.note-card.poem { background: radial-gradient(120% 100% at 0% 0%, var(--violet-soft), transparent 60%), var(--panel); text-align: center; }
.note-card.poem p { color: var(--ink); line-height: 2.1; font-size: 15px; }
.note-card small { color: var(--faint); font-size: 11.5px; }
.note-card .pin { position: absolute; top: 10px; inset-inline-end: 12px; }
.note-mood { font-size: 20px; }
.note-editor { max-width: 820px; margin: 0 auto; width: 100%; }
.editor-bar { display: flex; align-items: center; gap: 10px; justify-content: space-between; position: sticky; top: 70px; z-index: 3; padding: 4px 0; background: var(--bg); }
.save-status { color: var(--muted); }
.paper { background: var(--panel); border: 1px solid var(--line); border-radius: 26px; padding: clamp(18px, 4vw, 44px); display: grid; gap: 14px; }
.paper.poem { background: radial-gradient(90% 60% at 50% 0%, var(--violet-soft), transparent 70%), var(--panel); }
.paper-date { color: var(--muted); font-size: 12.5px; text-align: center; }
.note-title { font-size: 22px; font-weight: 700; border: 0; background: none; box-shadow: none !important; text-align: center; }
.note-body { width: 100%; min-height: 240px; border: 0; outline: none; background: none; resize: none; font-size: 16.5px; line-height: 2.05; overflow: hidden; }
.note-body.poem { text-align: center; font-size: 18.5px; line-height: 2.4; letter-spacing: .1px; }
.paper-foot { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 12px; }
.poem-card-img { width: 100%; border-radius: 18px; display: block; }
.mood-row { display: flex; justify-content: center; gap: 8px; }
.mood { font-size: 26px; width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: none; filter: grayscale(.8); opacity: .6; }
.mood.on { filter: none; opacity: 1; border-color: var(--acid); background: var(--acid-soft); }

/* habits */
.habit-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.habit-card.done { border-color: color-mix(in srgb, var(--acid) 45%, transparent); }
.habit-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.habit-big { width: 60px; height: 60px; border-radius: 18px; border: 2px solid var(--line2); background: var(--raise); display: grid; place-items: center; align-content: center; font-size: 26px; flex: none; }
.habit-big small { font-size: 11px; color: var(--muted); }
.habit-big[aria-pressed="true"] { border-color: var(--acid); background: var(--acid-soft); }
.habit-info { flex: 1; display: grid; }
.habit-info small { color: var(--muted); }
.heat { display: grid; grid-template-columns: repeat(21, 1fr); gap: 3px; direction: ltr; }
.heat-cell { aspect-ratio: 1; border-radius: 4px; border: 0; background: var(--line); padding: 0; min-width: 0; }
.heat-cell.part { background: color-mix(in srgb, var(--acid) 40%, transparent); }
.heat-cell.full { background: var(--acid); }

/* focus */
.focus { justify-items: center; text-align: center; }
.focus-ring { position: relative; display: grid; place-items: center; margin: 10px 0; }
.ring-center { position: absolute; display: grid; gap: 2px; }
.ring-time { font-size: 52px; font-variant-numeric: tabular-nums; direction: ltr; }
.ring-center small { color: var(--muted); }
.focus .input { max-width: 420px; text-align: center; }
.chips.center { justify-content: center; }
.switch-row.buddy { max-width: 420px; width: 100%; text-align: start; border-top: 0; }
.tips { text-align: start; max-width: 520px; width: 100%; }
.tips ul { margin: 8px 0 0; padding-inline-start: 18px; color: var(--muted); line-height: 2; }

/* login */
.login { position: relative; z-index: 1; min-height: 100vh; max-width: 620px; margin: 0 auto; padding: 48px 20px; display: grid; align-content: center; gap: 18px; }
.login h1 { font-size: clamp(34px, 7vw, 56px); letter-spacing: -1px; }
.lead { color: var(--muted); font-size: 17px; }
.login-features { display: grid; gap: 8px; margin: 6px 0 10px; }
.login-features div { padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.login .btn.big { justify-self: start; }
.login-status { color: var(--acid-tx); min-height: 1.6em; }

@media (max-width: 640px) {
  .grid2 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat-value { font-size: 19px; }
  .card { padding: 15px; border-radius: 20px; }
  .day-nav-label { min-width: 0; flex: 1; }
  .day-nav { width: 100%; }
  .toolbar .seg { width: 100%; }
  .toolbar .seg button { flex: 1; }
  .note-grid { columns: 1; }
  .timer-start { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* dong */
.dong-list { display: grid; gap: 10px; }
.dong-card { display: flex; align-items: center; gap: 14px; }
.dong-card.settled { opacity: .7; }
.dong-emoji { font-size: 30px; width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; background: var(--raise); flex: none; }
.dong-main { flex: 1; min-width: 0; display: grid; }
.dong-side { display: grid; justify-items: end; }
.pos { color: var(--mint) !important; }
.neg { color: var(--danger) !important; }
.members, .transfers { display: grid; gap: 6px; }
.member { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 8px 10px; border-radius: 14px; border: 1px solid transparent; background: var(--raise); }
.member:hover { border-color: var(--line2); }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--violet-soft); color: var(--ink); font-weight: 700; flex: none; }
.member-main { flex: 1; min-width: 0; display: grid; }
.member-side { display: grid; justify-items: end; }
.member-side small { color: var(--muted); font-size: 11px; }
.transfer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; border-radius: 14px; border: 1px dashed var(--line2); background: none; width: 100%; }
.transfer:hover { border-color: var(--acid); }
.transfer .arrow { color: var(--muted); }
.dong-actions { margin-top: 14px; }
.claim { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-top: 1px solid var(--line); }
.split-box { display: grid; gap: 6px; margin: 4px 0 6px; }
.split-row { display: grid; grid-template-columns: auto 1fr minmax(90px, 140px) 90px; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; background: var(--raise); }
.split-row.off { opacity: .5; }
.split-row:not(:has(.split-input)) { grid-template-columns: auto 1fr 90px; }
.split-input { min-height: 38px; padding: 6px 10px; }
.split-amt { text-align: end; color: var(--muted); }
.split-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.split-hint.ok { color: var(--mint); } .split-hint.bad { color: var(--danger); }
.invite-box { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--raise); }
/* home widgets */
.widgets { display: grid; gap: 16px; min-width: 0; }
.widgets > * { min-width: 0; }
@media (min-width: 981px) {
  .widgets { display: block; columns: 2 400px; column-gap: 16px; }
  .widgets > * { break-inside: avoid; margin-bottom: 16px; }
  .widgets > section, .widgets > button, .widgets > a { display: block; width: 100%; }
}
.layout-list { display: grid; gap: 6px; margin: 8px 0; }
.layout-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 6px 10px; border-radius: 12px; background: var(--raise); }
.layout-row.off span { color: var(--muted); text-decoration: line-through; }
.whatnow { border-color: color-mix(in srgb, var(--violet) 45%, transparent); background: radial-gradient(120% 120% at 100% 0%, var(--violet-soft), transparent 60%), var(--panel); }
.whatnow-title { font-size: 20px; margin: 2px 0 8px; }
.whatnow-actions { margin-top: 12px; }
.energy-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.energy { display: grid; justify-items: center; gap: 2px; padding: 10px 0; border-radius: 14px; border: 1px solid var(--line2); background: var(--raise); font-size: 22px; }
.energy small { font-size: 11px; color: var(--muted); }
.energy.on { border-color: var(--acid); background: var(--acid-soft); }
.memory { display: grid; gap: 4px; padding: 12px; border-radius: 14px; background: var(--raise); margin-top: 6px; }
.memory.poem { text-align: center; }
.memory p { margin: 0; white-space: pre-line; color: var(--muted); }
.forecast { display: block; margin-top: 10px; }
.timer-note { display: flex; gap: 8px; margin-top: 10px; }
.timer-note .input { min-height: 40px; }
.timer-notes { white-space: pre-line; font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.approved-badge { color: var(--mint); font-size: 13px; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.slot { padding: 8px 0; border-radius: 10px; border: 1px solid var(--line2); background: var(--raise); font-variant-numeric: tabular-nums; }
.slot.busy { opacity: .35; text-decoration: line-through; }
.slot:hover:not(.busy) { border-color: var(--acid); }
.challenge { display: grid; gap: 6px; padding: 12px; border-radius: 14px; background: var(--raise); }
.challenge-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.price-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.capture-mode { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.capture-mode kbd { font: 11px ui-monospace, monospace; padding: 0 6px; border: 1px solid var(--line2); border-radius: 5px; }
.block-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }

/* loans */
.people { display: grid; gap: 12px; }
.person-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.person-net { display: grid; justify-items: end; gap: 2px; }
.loan-list { display: grid; gap: 6px; margin-bottom: 10px; }
.loan { display: flex; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; background: var(--raise); }
.loan:hover { border-color: var(--line2); }
.loan.late { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.loan.settled, .loan.forgiven { opacity: .6; }
.loan-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.loan-amount { white-space: nowrap; }
.loan-bar { height: 5px; display: block; }
.inst-list { display: grid; gap: 4px; }
.inst { display: grid; grid-template-columns: 70px 1fr auto 24px; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--raise); font-size: 13.5px; }
.inst.paid { opacity: .55; }
.inst.late { color: var(--danger); }
.loans .stat-value { white-space: normal; font-size: 18px; line-height: 1.5; }

.rates { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); font-size: 13.5px; }
.goal-list { display: grid; gap: 14px; }
.goal { display: grid; gap: 6px; }
.goal-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tx.bill.late { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.tx.bill.soon { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }
.budget-rows { display: grid; gap: 8px; }
.budget-row { display: grid; grid-template-columns: 1fr auto minmax(130px, 170px); gap: 10px; align-items: center; }
.budget-row .money-hint { display: none; }
.budget-left { padding: 10px 14px; border-radius: 14px; background: var(--raise); margin-bottom: 12px; }

.routine-list { display: grid; gap: 6px; }
.routine { display: flex; align-items: center; gap: 6px; }
.routine-main { flex: 1; display: flex; align-items: center; gap: 10px; text-align: start; padding: 10px 12px; border-radius: 14px; border: 1px solid transparent; background: var(--raise); }
.routine-main:hover { border-color: var(--line2); }
.routine-main > span:nth-child(2) { flex: 1; }
.routine-emoji { font-size: 22px; }
.runner { display: grid; gap: 18px; text-align: center; }
.runner-progress { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.runner-progress i { display: block; height: 100%; background: var(--acid); transition: width .3s; }
.runner-step h3 { font-size: 26px; margin: 8px 0 18px; }
.runner-emoji { font-size: 56px; }
.runner-list { display: grid; gap: 4px; text-align: start; color: var(--muted); font-size: 14px; }
.runner-list .now { color: var(--ink); font-weight: 700; }
.insights { margin: 10px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: 13.5px; line-height: 2; }

/* university */
.timetable { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tt-day { display: grid; gap: 6px; align-content: start; }
.tt-class { --c: var(--violet); display: grid; padding: 8px 10px; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, transparent); border-inline-start: 3px solid var(--c); font-size: 13px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.course { --c: var(--violet); display: grid; gap: 6px; padding: 12px; border-radius: 16px; background: var(--raise); border-top: 3px solid var(--c); }
.course-top, .course-bottom { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grade-list { display: flex; flex-wrap: wrap; gap: 4px; }
.sched { display: grid; gap: 8px; }
.sched-row { display: grid; gap: 6px; padding: 8px; border-radius: 12px; background: var(--raise); position: relative; }
.sched-row .icon-btn { position: absolute; top: 4px; inset-inline-end: 4px; }
.hard-banner { padding: 12px 16px; border-radius: 16px; background: color-mix(in srgb, var(--violet) 16%, transparent); border: 1px solid color-mix(in srgb, var(--violet) 45%, transparent); display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.wizard-step { display: grid; gap: 8px; padding: 12px; border-radius: 14px; background: var(--raise); margin-bottom: 10px; }
.wizard-step b { font-size: 14.5px; }
.live-test { padding: 14px; border-radius: 14px; border: 1px dashed var(--line2); text-align: center; }
.live-test.ok { border-color: var(--mint); background: color-mix(in srgb, var(--mint) 12%, transparent); }
.hookurl { display: block; word-break: break-all; padding: 8px; border-radius: 10px; background: var(--panel-solid); font-size: 12px; }

/* people, points, calendar */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.person-card { display: flex; align-items: center; gap: 10px; text-align: start; }
.person-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.person-hero > div { flex: 1; }
.avatar.big { width: 56px; height: 56px; font-size: 22px; }
.profile { display: grid; gap: 12px; }
.points-mini { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-color: color-mix(in srgb, var(--warn) 40%, transparent); }
.paycal { display: grid; gap: 10px; }
.paycal-day { display: grid; gap: 4px; }
.paycal-day > b { font-size: 13px; color: var(--muted); }
.paycal-ev { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 12px; background: var(--raise); font-size: 14px; }
.paycal-ev.out b { color: var(--danger); } .paycal-ev.in b { color: var(--mint); } .paycal-ev.save b { color: var(--warn); }
.whatif-out { display: grid; gap: 10px; margin-top: 10px; }
input[type=range] { width: 100%; accent-color: var(--acid); }
.exam-side { display: grid; justify-items: end; gap: 4px; }
.untracked { border-color: color-mix(in srgb, var(--warn) 45%, transparent); }

/* timer: who is this for */
.timer-proj { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.timer-proj .chips { flex: 1; min-width: 0; }
.proj-switch { background: none; border: 1px dashed var(--line2); border-radius: 999px; padding: 2px 10px; color: inherit; font: inherit; cursor: pointer; }
.proj-switch:hover { border-color: var(--acid); }

/* calendar: sessions (timer entries) as time blocks */
.sessions { display: grid; gap: 6px; }
.session { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; text-align: start; padding: 8px 10px; border-radius: 12px; border: 1px solid var(--line); border-inline-start: 4px solid var(--c); background: var(--raise); color: inherit; font: inherit; cursor: pointer; }
.session.running { border-color: var(--acid); }
.session-time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.session-main { min-width: 0; display: grid; }
.session-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-main small { color: var(--muted); font-size: 11px; }
.session-dur { font-size: 13px; }
.sessions.compact { margin-top: 6px; }
.sessions.compact .session { padding: 5px 8px; }
.cal-worked { display: block; position: absolute; top: 3px; inset-inline-start: 6px; height: 3px; width: max(4px, calc((100% - 12px) * var(--w))); border-radius: 2px; background: var(--mint); opacity: .9; }
.cal-day.sel .cal-worked { background: var(--acid-ink); }

/* ------------------------------------------------------------ teams */
.tm-av { --c: #7957ff; position: relative; display: inline-grid; place-items: center; border-radius: 50%; flex: none; font-weight: 800; color: #0b0b0c; background: var(--c); box-shadow: 0 0 0 2px var(--bg); line-height: 1; }
.tm-av.none { background: var(--raise); color: var(--muted); border: 1px dashed var(--line2); box-shadow: none; }
.tm-av.more { width: 28px; height: 28px; font-size: 11px; background: var(--panel-solid); color: var(--muted); border: 1px solid var(--line2); }
.tm-av.online::after { content: ""; position: absolute; bottom: -1px; inset-inline-end: -1px; width: 9px; height: 9px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--bg); }
.tm-stack { display: inline-flex; padding-inline-start: 8px; }
.tm-stack > * { margin-inline-start: -8px; }
.tm-bar { position: relative; height: 8px; border-radius: 99px; background: var(--line); overflow: visible; flex: 1; min-width: 60px; }
.tm-bar i { display: block; height: 100%; border-radius: 99px; transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.tm-bar b { position: absolute; top: -4px; width: 2px; height: 16px; background: var(--ink); opacity: .55; border-radius: 2px; }
.due { display: inline-flex; align-items: center; gap: 3px; font-size: 11.5px; color: var(--muted); padding: 1px 7px; border-radius: 99px; background: var(--raise); white-space: nowrap; }
.due.soon { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }
.due.today { color: #fff; background: var(--warn); }
.due.late { color: #fff; background: var(--danger); }

/* hero */
.tm-hero { --c: #7957ff; position: relative; overflow: hidden; border-radius: 26px; padding: 18px; border: 1px solid color-mix(in srgb, var(--c) 40%, var(--line)); background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 60%), var(--panel); display: grid; gap: 14px; }
.tm-hero-main { display: grid; grid-template-columns: auto auto 1fr auto; gap: 12px; align-items: center; }
.tm-hero-main h2 { font-size: 22px; }
.tm-hero-main:not(:has(a)) { grid-template-columns: auto 1fr auto; }
.tm-hero-emoji { font-size: 30px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; background: color-mix(in srgb, var(--c, #7957ff) 22%, transparent); border: 1px solid color-mix(in srgb, var(--c, #7957ff) 40%, transparent); flex: none; }
.tm-hero-stats { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.tm-ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; align-content: center; position: relative; background: conic-gradient(var(--c, var(--acid)) calc(var(--p) * 1%), var(--line) 0); transition: background .4s; }
.tm-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--panel-solid); }
.tm-ring > * { position: relative; line-height: 1.2; text-align: center; }
.tm-ring b { font-size: 20px; } .tm-ring small { font-size: 10.5px; color: var(--muted); }
.tm-ring.small { width: 50px; height: 50px; } .tm-ring.small::before { inset: 5px; } .tm-ring.small b { font-size: 12.5px; }
.tm-hero-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm-hero-foot .btn:first-of-type { margin-inline-start: auto; }
.tm-tabs { width: 100%; position: sticky; top: 6px; z-index: 5; backdrop-filter: blur(14px); background: color-mix(in srgb, var(--panel-solid) 80%, transparent); }
.tm-tabs button { flex: 1; }
.tm-dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-inline-start: 4px; border-radius: 99px; background: var(--violet); color: #fff; font-size: 10.5px; font-weight: 800; }
@media (max-width: 640px) { .tm-hero-stats { grid-template-columns: 1fr; justify-items: center; } .tm-hero-stats .stats { width: 100%; } }

/* filters + board */
.tm-board-wrap { display: grid; gap: 12px; min-width: 0; }
.tm-filters { display: grid; gap: 8px; min-width: 0; }
.tm-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tm-scroll::-webkit-scrollbar { display: none; }
.tm-who { padding-inline-start: 4px; }
.tm-search { flex: 1; min-width: 180px; min-height: 40px; }
.tm-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tm-board { display: grid; grid-template-columns: repeat(var(--cols), minmax(250px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; scroll-snap-type: x proximity; align-items: start; }
@media (max-width: 980px) { .tm-board { grid-template-columns: repeat(var(--cols), 84%); } }
.tm-col { background: var(--raise); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 200px; scroll-snap-align: start; transition: border-color .15s, background .15s; }
.tm-col.over { border-color: var(--acid); background: var(--acid-soft); }
.tm-col[data-status="doing"] { border-top: 3px solid var(--violet); }
.tm-col[data-status="review"] { border-top: 3px solid var(--warn); }
.tm-col[data-status="done"] { border-top: 3px solid var(--mint); }
.tm-col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; }
.tm-col-head .count { font-size: 12px; color: var(--muted); background: var(--panel-solid); padding: 0 8px; border-radius: 99px; }
.tm-col-head .icon-btn { margin-inline-start: auto; }
.tm-col-body { display: grid; gap: 8px; }
.tm-col-empty { text-align: center; padding: 22px 6px; border: 1px dashed var(--line2); border-radius: 14px; }
.tm-wip { font-size: 12px; color: var(--warn); background: color-mix(in srgb, var(--warn) 10%, transparent); border-radius: 10px; padding: 6px 9px; margin: 0 0 8px; }
.tm-card { --pri: transparent; --proj: transparent; position: relative; display: grid; gap: 7px; padding: 11px 12px; border-radius: 16px; background: var(--panel-solid); border: 1px solid var(--line); box-shadow: inset -3px 0 0 var(--pri); cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; animation: tm-in .25s ease both; }
.tm-card:hover { transform: translateY(-2px); border-color: var(--line2); box-shadow: inset -3px 0 0 var(--pri), 0 10px 24px rgba(0, 0, 0, .18); }
.tm-card.mine { border-color: color-mix(in srgb, var(--acid) 35%, var(--line)); }
.tm-card.late { background: linear-gradient(0deg, var(--danger-soft), var(--danger-soft)), var(--panel-solid); }
.tm-card.blocked { opacity: .78; }
.tm-card.drag { opacity: .35; transform: rotate(2deg); }
.tm-proj { justify-self: start; font-size: 11px; padding: 0 8px; border-radius: 99px; color: var(--ink); background: color-mix(in srgb, var(--proj) 22%, transparent); border: 1px solid color-mix(in srgb, var(--proj) 45%, transparent); }
.tm-card-title { font-size: 14px; line-height: 1.55; }
.tm-labels { display: flex; flex-wrap: wrap; gap: 4px; }
.tm-label { --c: var(--violet); font-size: 11px; padding: 0 7px; border-radius: 6px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--ink); }
.tm-mini { display: flex; gap: 8px; align-items: center; font-size: 11px; color: var(--muted); }
.tm-mini .tm-bar { height: 5px; }
.tm-card-foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tm-meta { font-size: 11.5px; color: var(--muted); display: inline-flex; gap: 2px; align-items: center; }
.tm-next { margin-inline-start: auto; border: 1px solid var(--line2); background: var(--raise); border-radius: 99px; font-size: 11.5px; padding: 2px 10px; min-height: 26px; transition: background .15s, transform .1s; }
.tm-next:hover { background: var(--acid); color: var(--acid-ink); border-color: transparent; }
.tm-next:active { transform: scale(.94); }
@keyframes tm-in { from { opacity: 0; transform: translateY(4px); } }
.tm-confetti { position: fixed; z-index: 200; pointer-events: none; }
.tm-confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; background: var(--c); animation: tm-burst .85s cubic-bezier(.2, .7, .3, 1) forwards; transform: rotate(var(--a)) translateY(0); }
@keyframes tm-burst { to { transform: rotate(var(--a)) translateY(-70px) rotate(240deg); opacity: 0; } }

/* task sheet */
.tm-title-input { font-size: 17px; font-weight: 700; }
.tm-task-head { display: grid; gap: 8px; margin-bottom: 14px; }
.tm-status { font-size: 12px; padding: 2px 10px; border-radius: 99px; background: var(--raise); border: 1px solid var(--line2); white-space: nowrap; }
.tm-status[data-s="doing"] { background: var(--violet-soft); border-color: var(--violet); }
.tm-status[data-s="review"] { background: color-mix(in srgb, var(--warn) 14%, transparent); border-color: var(--warn); }
.tm-status[data-s="done"] { background: color-mix(in srgb, var(--mint) 14%, transparent); border-color: var(--mint); }
.tm-blocker { font-size: 13px; padding: 7px 11px; border-radius: 12px; background: var(--danger-soft); }
.tm-blocker.ok { background: color-mix(in srgb, var(--mint) 12%, transparent); }
.tm-sec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 6px; }
.tm-sec h3 { font-size: 14px; margin-bottom: 10px; }
.tm-checks { display: grid; gap: 6px; }
.tm-check { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--raise); cursor: pointer; }
.tm-check input { width: 18px; height: 18px; accent-color: var(--mint); }
.tm-check span { flex: 1; }
.tm-check.done span { text-decoration: line-through; color: var(--muted); }
.tm-time { display: grid; gap: 10px; }
.tm-log { display: flex; align-items: center; gap: 8px; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.tm-history { margin: 0; padding-inline-start: 18px; font-size: 13px; display: grid; gap: 3px; }
.tm-task-foot { margin-top: 10px; }
.tm-reacts { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tm-react { display: inline-flex; gap: 4px; align-items: center; border: 1px solid var(--line2); background: var(--raise); border-radius: 99px; padding: 1px 9px; min-height: 28px; font-size: 13px; transition: transform .15s; }
.tm-react b { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tm-react.on { border-color: var(--violet); background: var(--violet-soft); }
.tm-react.pop, .tm-react-add button.pop { animation: tm-pop .35s ease; }
@keyframes tm-pop { 40% { transform: scale(1.35); } }
.tm-react-add { display: inline-flex; gap: 0; opacity: .5; transition: opacity .15s; }
.tm-react-add:hover, .tm-reacts:focus-within .tm-react-add { opacity: 1; }
.tm-react-add button { border: 0; background: none; font-size: 15px; padding: 2px 4px; border-radius: 8px; filter: grayscale(.6); transition: transform .12s, filter .12s; }
.tm-react-add button:hover { transform: scale(1.25); filter: none; }
@media (hover: none) { .tm-react-add { opacity: .8; } }
.tm-comments { display: grid; gap: 12px; }
.tm-thread { display: grid; gap: 10px; max-height: 420px; overflow-y: auto; }
.tm-comment { display: flex; gap: 8px; align-items: flex-start; }
.tm-bubble { flex: 1; min-width: 0; padding: 7px 12px 8px; border-radius: 4px 16px 16px 16px; background: var(--raise); border: 1px solid var(--line); }
.tm-comment.mine .tm-bubble { background: var(--violet-soft); border-color: color-mix(in srgb, var(--violet) 35%, transparent); }
.tm-bubble-head { display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.tm-bubble-head .icon-btn { margin-inline-start: auto; width: 24px; height: 24px; }
.tm-bubble p { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 14px; }
.tm-at { background: var(--acid-soft); color: var(--acid-tx); border-radius: 5px; padding: 0 3px; }
.tm-compose { display: grid; gap: 8px; }
.tm-compose .row-wrap { justify-content: space-between; flex-wrap: nowrap; }
.tm-mention { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }

/* ideas wall */
.tm-wall-wrap { display: grid; gap: 12px; }
.tm-composer { display: flex; align-items: center; gap: 12px; width: 100%; text-align: start; padding: 12px 14px; border-radius: 20px; border: 1px dashed var(--line2); background: var(--panel); color: var(--muted); transition: border-color .15s; }
.tm-composer:hover { border-color: var(--acid); }
.tm-composer > span:nth-child(2) { flex: 1; }
.tm-wall { columns: 3 260px; column-gap: 12px; }
.tm-idea { --c: var(--violet); break-inside: avoid; margin-bottom: 12px; display: grid; gap: 8px; padding: 14px; border-radius: 20px; cursor: pointer; border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, transparent), transparent 55%), var(--panel-solid); transition: transform .15s, box-shadow .15s; animation: tm-in .3s ease both; }
.tm-idea:hover { transform: translateY(-3px) rotate(-.3deg); box-shadow: 0 14px 30px rgba(0, 0, 0, .22); }
.tm-idea.pinned { box-shadow: 0 0 0 2px color-mix(in srgb, var(--c) 60%, transparent); }
.tm-idea.st-parked { opacity: .65; }
.tm-idea-top { display: flex; align-items: center; gap: 6px; }
.tm-kind { font-size: 11.5px; font-weight: 700; padding: 1px 9px; border-radius: 99px; background: color-mix(in srgb, var(--c) 25%, transparent); }
.tm-idea-top .tag { margin-inline-start: auto; }
.tm-idea-title { font-size: 15.5px; line-height: 1.55; }
.tm-idea p { margin: 0; color: var(--muted); font-size: 13.5px; white-space: pre-line; overflow-wrap: anywhere; }
.tm-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--acid-tx); direction: ltr; justify-self: start; overflow-wrap: anywhere; }
.tm-idea-foot { display: flex; align-items: center; gap: 6px; }
.tm-idea-foot .tm-meta { margin-inline-start: auto; }
.tm-idea-full { --c: var(--violet); display: grid; gap: 10px; padding: 16px; border-radius: 20px; margin-bottom: 14px; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 18%, transparent), transparent 60%), var(--raise); border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); }
.tm-idea-full h2 { font-size: 19px; }
.tm-idea-body { white-space: pre-line; overflow-wrap: anywhere; }
.tm-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.tm-swatch { width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; background: var(--c); box-shadow: inset 0 0 0 2px var(--bg); transition: transform .12s; }
.tm-swatch.on { border-color: var(--ink); transform: scale(1.12); }
.tm-pick { display: grid; gap: 6px; }
.tm-pick-row { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; text-align: start; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--raise); }
.tm-pick-row:hover { border-color: var(--acid); }
.tm-pick-row small { grid-column: 2; }

/* projects */
.tm-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.tm-project { --c: var(--violet); display: grid; gap: 12px; padding: 16px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c); }
.tm-project.done { opacity: .7; }
.tm-project-head { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.tm-project-head small { display: block; }
.tm-project-emoji { font-size: 24px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 14px; background: color-mix(in srgb, var(--c) 20%, transparent); }
.tm-project .tm-bar { height: 10px; }
.tm-health { font-size: 11.5px; padding: 2px 9px; border-radius: 99px; background: var(--raise); white-space: nowrap; }
.tm-health.ok { background: color-mix(in srgb, var(--mint) 14%, transparent); }
.tm-health.risk { background: color-mix(in srgb, var(--warn) 16%, transparent); }
.tm-health.late { background: var(--danger-soft); color: var(--danger); }
.tm-project-stats { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); align-items: center; }
.tm-project-stats b { color: var(--ink); font-size: 15px; }
.tm-project-foot { display: flex; align-items: center; gap: 8px; justify-content: space-between; flex-wrap: wrap; }

/* people */
.tm-load { display: grid; gap: 10px; }
.tm-load-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 6px 8px; border-radius: 12px; }
.tm-load-row.over { background: var(--danger-soft); }
.tm-load-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 90px; }
.tm-load-bar { display: flex; height: 12px; border-radius: 99px; background: var(--line); overflow: hidden; }
.tm-load-bar i { display: block; height: 100%; transition: width .5s; }
.tm-load-bar i.doing { background: var(--violet); } .tm-load-bar i.open { background: var(--line2); }
.tm-load-nums { display: flex; gap: 8px; font-size: 12px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .tm-load-row { grid-template-columns: 1fr; gap: 6px; } .tm-load-nums { justify-content: flex-start; } }
.tm-invite { display: grid; gap: 8px; background: var(--raise); }
.tm-danger { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }

/* activity */
.tm-feed { display: grid; gap: 16px; }
.tm-feed-day { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.tm-timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; position: relative; }
.tm-timeline::before { content: ""; position: absolute; inset-inline-start: 15px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tm-timeline li { --c: var(--line2); display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; font-size: 14px; position: relative; }
.tm-tl-dot { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--panel-solid); border: 2px solid var(--c); font-size: 14px; }

/* my teams */
.tm-h { font-size: 17px; }
.tm-teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tm-team { --c: var(--violet); display: grid; gap: 10px; padding: 16px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--c) 35%, var(--line)); background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--c) 20%, transparent), transparent 60%), var(--panel); transition: transform .15s, box-shadow .15s; }
.tm-team:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.tm-team-head { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; }
.tm-team-head small { display: block; }
.tm-team-stats { display: flex; gap: 12px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.tm-mine { display: grid; gap: 6px; }
.tm-mine-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); }
.tm-mine-row.late { border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.tm-mine-main { display: grid; flex: 1; min-width: 0; }
.tm-mine-main b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-intro { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 32px 20px; }
.tm-intro-art { font-size: 56px; width: 100px; height: 100px; display: grid; place-items: center; border-radius: 32px; background: var(--violet-soft); animation: tm-float 3s ease-in-out infinite; }
@keyframes tm-float { 50% { transform: translateY(-6px) rotate(-3deg); } }
.tm-intro-list { list-style: none; padding: 0; margin: 4px 0 8px; display: grid; gap: 6px; text-align: start; }
.tm-intro-list li { padding: 8px 12px; border-radius: 12px; background: var(--raise); }

/* member portal (/t/<token>) */
.portal { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 0 16px 60px; }
.portal-top { display: flex; align-items: center; gap: 10px; padding: 14px 0; }
.portal-top .brand { margin-inline-end: auto; }
@media (prefers-reduced-motion: reduce) { .tm-card, .tm-idea, .tm-intro-art, .tm-confetti i { animation: none !important; } .tm-card:hover, .tm-idea:hover, .tm-team:hover { transform: none; } }

/* ---------------------------------------------------------------- v1.8 interaction */
/* undo / action toasts */
.toast { display: flex; align-items: center; gap: 12px; }
.toast.has-action { padding-inline-end: 8px; }
.toast-action { border: 0; border-radius: 10px; padding: 8px 12px; min-height: 36px; background: var(--acid); color: var(--acid-ink, #070708); font: inherit; font-weight: 700; cursor: pointer; white-space: nowrap; }
/* empty states: things to try */
.empty-examples { display: grid; gap: 6px; justify-items: center; margin-top: 4px; }
.empty-examples .chips { justify-content: center; }
/* grouped navigation */
.nav-group { display: grid; gap: 3px; margin-top: 8px; }
.nav-group-title { font-size: 11.5px; color: var(--muted); padding: 4px 14px 0; letter-spacing: .02em; }
.more-group { margin-bottom: 14px; }
.more-title { font-size: 13px; color: var(--muted); margin: 0 0 8px; font-weight: 600; }
/* drag a plan item onto a day */
.item[draggable="true"] { cursor: grab; }
.item.dragging { opacity: .45; }
.drop-on { outline: 2px dashed var(--acid); outline-offset: 2px; background: color-mix(in srgb, var(--acid) 12%, transparent) !important; }
/* swipe on touch: done / tomorrow */
.item { position: relative; touch-action: pan-y; transition: transform .15s; }
.item[data-swipe="done"] { box-shadow: inset -3px 0 0 var(--pr), 0 0 0 2px var(--mint); }
.item[data-swipe="later"] { box-shadow: inset -3px 0 0 var(--pr), 0 0 0 2px var(--violet); }
.item[data-swipe="done"]::after, .item[data-swipe="later"]::after { position: absolute; inset-block: 0; display: grid; place-items: center; font-size: 12px; color: var(--muted); pointer-events: none; }
.item[data-swipe="done"]::after { content: '✅ انجام'; inset-inline-end: -84px; }
.item[data-swipe="later"]::after { content: '➡️ فردا'; inset-inline-start: -84px; }
/* AI in the quick capture */
.ai-chip { border-style: dashed; }
.ai-wait { display: flex; align-items: center; gap: 10px; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line2); border-top-color: var(--acid); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ai-items { display: grid; gap: 6px; margin: 8px 0; }
.ai-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 12px; background: var(--raise); }
.ai-item small { color: var(--muted); }
.ai-answer { padding: 10px 12px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line2); }
.ai-answer p { white-space: pre-wrap; margin: 6px 0 0; line-height: 1.9; }
/* accessibility: comfortable tap targets on touch screens */
@media (pointer: coarse) {
  .btn, .chip, .icon-btn, .nav-item, .toast-action, .cal-day { min-height: 44px; }
  .icon-btn { min-width: 44px; }
  .chip.small { min-height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .orb, .noise { display: none; } .spinner { animation: none; } }

/* settings: devices, admin usage rows; dong: groups I joined */
.list { display: grid; gap: 6px; margin: 8px 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.row-between:last-child { border-bottom: 0; }
.row-between .tag { margin-inline-start: 6px; }
.dong-main small + small { display: block; }
.dong-main .row-wrap { margin-top: 6px; }
