/* ==========================================================================
   Kinetic · widget styles
   Widgets only read the local tone variables (--s0 --s1 --s2 --fg --mu ...)
   and the accent tokens, so every card works on tray, white and ink tones,
   in light and dark, with any brand.
   ========================================================================== */
.w { position: absolute; inset: 0; color: var(--fg); font-size: 12.5px; line-height: 1.3; }

.k-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; color: var(--mu); font-family: var(--font-mono); }
.k-row { display: flex; align-items: center; }
.k-sp { flex: 1; }
.k-lbl { font-size: 11.5px; color: var(--mu); font-weight: 500; }
.k-h { font-size: 13.5px; font-weight: 600; letter-spacing: -0.015em; }
.k-num { font-family: var(--font-num); font-weight: var(--num-w); letter-spacing: var(--num-ls); font-variant-numeric: tabular-nums; }
.k-in { background: var(--s1); border-radius: var(--r-card); box-shadow: var(--sh1); }
.k-chip { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: calc(7px * var(--rk)); font-size: 11px; font-weight: 600; white-space: nowrap; }
.k-chip.acc { background: var(--tx); color: var(--acc); }
.tone-ink .k-chip.acc { color: var(--acc3); }

/* odometer + label swap */
.roll { display: inline-flex; vertical-align: top; white-space: pre; height: 1.2em; line-height: 1.2em; }
.rs { display: inline-block; height: 1.2em; line-height: 1.2em; overflow: hidden; }
.rd { text-align: center; -webkit-mask-image: linear-gradient(transparent, #000 13%, #000 87%, transparent); mask-image: linear-gradient(transparent, #000 13%, #000 87%, transparent); }
.rc { display: block; }
.rc i { display: block; height: 1.2em; font-style: normal; }
.swap { display: inline-grid; vertical-align: top; }
.swap-i { grid-area: 1 / 1; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.swap.end { justify-items: end; }

/* ---------------- seg ---------------- */
.w-seg { display: flex; align-items: center; padding: 0 11px; }
.seg-t { position: relative; display: flex; width: 100%; height: 36px; padding: 3px; border-radius: calc(12px * var(--rk)); background: var(--s2); }
.seg-p { position: absolute; left: 3px; top: 3px; bottom: 3px; width: calc((100% - 6px) / 4); border-radius: calc(9px * var(--rk)); background: var(--s1); box-shadow: 0 1px 2px rgba(0,0,0,.07), 0 3px 8px rgba(0,0,0,.06), var(--hair); }
.seg-o { position: relative; flex: 1; font-size: 12px; font-weight: 560; color: color-mix(in oklab, var(--fg) calc(var(--p, 0) * 100%), var(--mu)); }

/* ---------------- sliders ---------------- */
.w-sliders { display: flex; align-items: center; justify-content: center; }
.sl-row { display: flex; gap: 14px; }
.sl { position: relative; width: 46px; height: 136px; border-radius: calc(16px * var(--rk)); background: var(--s2); overflow: hidden; cursor: grab; }
.sl:active { cursor: grabbing; }
.sl-f { position: absolute; inset: 0; background: var(--s1); transform-origin: 50% 100%; box-shadow: 0 -1px 2px rgba(0,0,0,.04); }
.sl-i { position: absolute; left: 50%; bottom: 11px; transform: translateX(-50%); color: var(--fg); }
.sl-v { position: absolute; left: 0; right: 0; top: 9px; text-align: center; font-size: 11px; color: var(--mu); opacity: 0; }

/* ---------------- colour picker ---------------- */
.w-color { padding: 12px; display: flex; flex-direction: column; }
.cp-sw { --on: #fff; position: relative; height: 70px; border-radius: var(--r-card); box-shadow: inset 0 0 0 1px rgba(0,0,0,.05); }
.cp-hex { position: absolute; left: 11px; bottom: 8px; font-size: 13px; color: var(--on); letter-spacing: 0.02em; font-family: var(--font-mono); font-weight: 600; }
.cp-apply { position: absolute; right: 7px; top: 7px; height: 22px; padding: 0 8px; border-radius: calc(8px * var(--rk)); font-size: 10.5px; font-weight: 650; color: var(--on); background: color-mix(in oklab, var(--on) 18%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform .3s var(--ease-spring); }
.cp-apply:hover { background: color-mix(in oklab, var(--on) 28%, transparent); }
.cp-apply:active { transform: scale(.94); }
.cp-hue { position: relative; height: 14px; margin-top: 13px; border-radius: 7px; cursor: pointer; background: linear-gradient(90deg, #f00, #ff0 16.6%, #0f0 33.3%, #0ff 50%, #00f 66.6%, #f0f 83.3%, #f00); }
.cp-knob { position: absolute; top: 50%; width: 19px; height: 19px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.28); transform: translate(-50%, -50%); }
.cp-pre { position: relative; display: flex; justify-content: space-between; margin-top: 13px; }
.cp-dot { width: 24px; height: 24px; border-radius: calc(8px * var(--rk)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); transition: transform .3s var(--ease-spring); }
.cp-dot:hover { transform: scale(1.1); }
.cp-ring { position: absolute; left: -3px; top: -3px; width: 30px; height: 30px; border-radius: calc(10px * var(--rk)); box-shadow: 0 0 0 2px var(--fg); pointer-events: none; }

/* ---------------- theme switch card ---------------- */
.w-mode { --ml: var(--tray); --md: #0E0E11; --p: 0; }
:root[data-mode="dark"] .w-mode { --ml: #E8E8E4; --md: var(--tray); }
.md-bg { position: absolute; inset: 0; background: color-mix(in oklab, var(--md) calc(var(--p) * 100%), var(--ml)); }
.md-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; color: color-mix(in oklab, #fff calc(var(--p) * 100%), #141416); }
.md-ic { position: relative; width: 24px; height: 24px; }
.md-ic span { position: absolute; inset: 0; display: grid; place-items: center; }
.md-l { font-size: 13.5px; font-weight: 600; letter-spacing: -0.015em; }
.md-sw { position: relative; width: 48px; height: 28px; border-radius: 14px; margin-top: 2px; background: color-mix(in oklab, var(--acc) calc(var(--p) * 100%), rgba(20,20,22,.16)); }
.md-k { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* ---------------- world clock ---------------- */
.w-clock { padding: 15px 16px; display: flex; flex-direction: column; cursor: pointer; }
.ck-top { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 600; }
.ck-wx { display: inline-grid; place-items: center; width: 16px; height: 16px; color: var(--warn); }
.ck-time { display: flex; align-items: baseline; gap: 5px; margin-top: 12px; font-size: calc(38px * var(--num-scale)); line-height: 1; }
.ck-ap { font-family: var(--font-ui); font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--mu); }
.ck-date { margin-top: 5px; }
.ck-wxrow { display: flex; align-items: baseline; gap: 6px; margin-top: auto; }
.ck-temp { font-size: 13px; }

/* ---------------- range calendar ---------------- */
.w-calendar { padding: 14px 12px; }
.cal-h { display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.cal-r { font-size: 11.5px; font-weight: 650; color: var(--acc); }
.cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); margin-top: 12px; font-size: 10px; font-weight: 650; color: var(--mu2); text-align: center; }
.cal-g { position: relative; height: 120px; margin-top: 6px; }
.cal-b { position: absolute; left: 0; top: 0; height: 22px; border-radius: 11px; background: var(--tx); opacity: 0; }
.cal-e { position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--acc); box-shadow: 0 3px 8px color-mix(in oklab, var(--acc) 35%, transparent); }
.cal-d {
  position: absolute; width: 22.28px; height: 24px; font-size: 11px; font-weight: 560; font-variant-numeric: tabular-nums;
  color: color-mix(in oklab, var(--acc-ink) calc(var(--q, 0) * 100%), color-mix(in oklab, var(--acc) calc(var(--b, 0) * 100%), var(--fg)));
  border-radius: 50%;
}
.cal-d:hover { background: color-mix(in oklab, var(--fg) 6%, transparent); }
.cal-d.today::after { content: ''; position: absolute; left: 50%; bottom: 1px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; transform: translateX(-50%); }

/* ---------------- focus timer ---------------- */
.w-timer { --run: 1; display: grid; place-items: center; }
.tm-svg { overflow: visible; }
.tm-tr { fill: none; stroke: var(--s2); stroke-width: 7; cursor: pointer; }
.tm-fg { fill: none; stroke: color-mix(in oklab, var(--acc) calc(var(--run) * 100%), var(--mu2)); stroke-width: 7; stroke-linecap: round; cursor: pointer; }
.tm-k { fill: #fff; stroke: color-mix(in oklab, var(--acc) calc(var(--run) * 100%), var(--mu2)); stroke-width: 2.5; cursor: grab; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.tm-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; }
.tm-t { font-size: calc(23px * var(--num-scale)); margin-top: 1px; opacity: calc(0.5 + 0.5 * var(--run)); }
.tm-b { pointer-events: auto; margin-top: 4px; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--s1); box-shadow: var(--sh1); font-size: 10.5px; font-weight: 650; color: var(--fg2); }
.tm-b .swap-i svg { margin-right: 1px; }

/* ---------------- music player ---------------- */
.w-music { padding: 14px; display: flex; flex-direction: column; }
.mu-art { position: relative; height: 128px; border-radius: var(--r-card); overflow: hidden; box-shadow: 0 8px 22px rgba(0,0,0,.32); background: #08080a; }
.mu-a { position: absolute; inset: 0; overflow: hidden; }
.mu-a i { position: absolute; display: block; border-radius: 50%; }
.mu-a .o1 { width: 92px; height: 92px; right: -22px; bottom: -30px; border: 12px solid rgba(255,255,255,.17); border-top-color: rgba(255,255,255,.34); }
.mu-a .o2 { width: 76px; height: 76px; left: 16px; top: 10px; background: rgba(255,255,255,.38); filter: blur(18px); }
.mu-a .o3 { width: 12px; height: 12px; left: 24px; bottom: 18px; background: rgba(255,255,255,.8); }
.mu-a.v1 .o1 { right: auto; left: -26px; top: -34px; bottom: auto; width: 110px; height: 110px; }
.mu-a.v1 .o3 { left: auto; right: 30px; bottom: 26px; width: 18px; height: 18px; }
.mu-a.v2 .o1 { right: 40px; bottom: -50px; width: 120px; height: 120px; border-width: 18px; }
.mu-a.v2 .o2 { left: 110px; top: 6px; }
.mu-a.v3 .o1 { right: 14px; top: 12px; bottom: auto; width: 46px; height: 46px; border-width: 8px; }
.mu-a.v3 .o3 { left: 40px; bottom: 34px; width: 8px; height: 8px; }
.mu-meta { display: flex; align-items: center; margin-top: 13px; height: 34px; }
.mu-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mu-title { font-size: 14px; font-weight: 650; letter-spacing: -0.02em; }
.mu-artist { font-size: 11.5px; color: var(--mu); margin-top: 2px; }
.mu-eq { display: flex; align-items: flex-end; gap: 2.5px; height: 14px; }
.mu-eq i { width: 3px; height: 14px; border-radius: 2px; background: var(--acc2); transform-origin: 50% 100%; }
.mu-bar { margin-top: 8px; padding: 6px 0; cursor: pointer; }
.mu-tr { position: relative; height: 4px; border-radius: 2px; background: var(--s2); }
.mu-fill { position: absolute; inset: 0; border-radius: 2px; background: var(--fg); transform-origin: 0 50%; }
.mu-knob { position: absolute; top: 50%; width: 10px; height: 10px; border-radius: 50%; background: var(--fg); transform: translate(-50%, -50%); box-shadow: 0 1px 4px rgba(0,0,0,.4); transition: width .2s, height .2s; }
.mu-bar:hover .mu-knob { width: 13px; height: 13px; }
.mu-times { display: flex; justify-content: space-between; font-size: 10px; color: var(--mu); font-variant-numeric: tabular-nums; }
.mu-ctl { display: flex; align-items: center; justify-content: center; gap: 28px; margin-top: auto; }
.mu-play { width: 38px; height: 38px; border-radius: 50%; background: var(--fg); color: var(--s0); display: grid; place-items: center; }
.mu-play span { grid-area: 1 / 1; display: grid; place-items: center; }
.mu-pl svg { margin-left: 2px; }
.mu-prev, .mu-next { color: var(--fg); padding: 4px; }

/* ---------------- voice message ---------------- */
.w-voice { padding: 13px 14px; display: flex; flex-direction: column; }
.vo-top { display: flex; align-items: center; gap: 8px; }
.vo-av { width: 24px; height: 24px; border-radius: 50%; background: #3B82F6; color: #fff; font-size: 11px; font-weight: 650; display: grid; place-items: center; }
.vo-n { font-size: 12px; font-weight: 620; line-height: 1.15; }
.vo-s { font-size: 10px; color: var(--mu); }
.vo-mic { margin-left: auto; color: var(--mu); }
.vo-row { display: flex; align-items: center; gap: 9px; margin-top: auto; }
.vo-play { width: 32px; height: 32px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; flex: none; }
.vo-play span { grid-area: 1 / 1; display: grid; place-items: center; }
.vo-pl svg { margin-left: 2px; }
.vo-wave { flex: 1; display: flex; align-items: center; justify-content: space-between; height: 30px; cursor: pointer; }
.vo-wave i { width: 2.6px; border-radius: 2px; background: color-mix(in oklab, var(--fg) calc(var(--p, 0) * 100%), var(--mu2)); }
.vo-ft { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.vo-t { font-size: 11px; color: var(--fg2); }
.vo-sp { height: 20px; padding: 0 7px; border-radius: calc(7px * var(--rk)); background: var(--s1); font-size: 10.5px; font-weight: 650; color: var(--fg); }

/* ---------------- activity rings ---------------- */
.w-rings { display: flex; flex-direction: column; align-items: center; padding-top: 15px; }
.rg-svg { cursor: pointer; }
.rg-t, .rg-f { fill: none; stroke-width: 8; stroke-linecap: round; }
.rg-t { stroke-opacity: .17; }
.rg-c0 { stroke: var(--acc); } .rg-c1 { stroke: var(--acc2); } .rg-c2 { stroke: var(--acc3); }
:root[data-mode="dark"] .tone-ink .rg-c2 { stroke: color-mix(in oklab, var(--acc) 60%, var(--dk-fg)); }
.rg-lbl { display: flex; gap: 4px; align-items: baseline; margin-top: 9px; font-size: 11px; color: var(--mu); }
.rg-v { color: var(--fg); font-size: 12px; }
.rg-days { position: relative; display: flex; margin-top: 7px; }
.rg-d { position: relative; width: 20px; height: 18px; font-size: 9.5px; font-weight: 650; color: color-mix(in oklab, var(--fg) calc(var(--p, 0) * 100%), var(--mu)); }
.rg-pill { position: absolute; left: 0; top: 0; width: 20px; height: 18px; border-radius: calc(6px * var(--rk)); background: var(--s2); }

/* ---------------- portfolio chart ---------------- */
.w-stock { padding: 13px 12px 10px; display: flex; flex-direction: column; }
.st-top { display: flex; align-items: center; justify-content: space-between; padding-left: 2px; }
.st-tabs { position: relative; display: flex; }
.st-tab { position: relative; width: 26px; height: 20px; font-size: 10px; font-weight: 650; color: color-mix(in oklab, var(--acc) calc(var(--p, 0) * 100%), var(--mu)); }
.st-pill { position: absolute; left: 0; top: 0; width: 26px; height: 20px; border-radius: calc(6px * var(--rk)); background: var(--tx); }
.st-val { display: flex; align-items: center; gap: 8px; margin-top: 7px; padding-left: 2px; }
.st-v { font-size: calc(23px * var(--num-scale)); line-height: 1; }
.st-svg { display: block; margin-top: auto; overflow: visible; cursor: crosshair; }
.st-s0 { stop-color: var(--acc); stop-opacity: .24; } .st-s1 { stop-color: var(--acc); stop-opacity: 0; }
.st-line { fill: none; stroke: var(--acc); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.st-x { stroke: var(--mu2); stroke-width: 1; stroke-dasharray: 2 3; opacity: 0; }
.st-halo { fill: var(--acc); opacity: .18; }
.st-dot { fill: var(--s0); stroke: var(--acc); stroke-width: 2; }

/* ---------------- chat ---------------- */
.w-chat { padding: 12px; display: flex; flex-direction: column; }
.ch-h { display: flex; align-items: center; gap: 8px; height: 26px; }
.ch-av { width: 24px; height: 24px; border-radius: 50%; color: #fff; font-size: 11px; font-weight: 650; display: grid; place-items: center; }
.ch-n { font-size: 12px; font-weight: 620; line-height: 1.15; }
.ch-s { display: flex; align-items: center; gap: 4px; font-size: 10px; color: var(--ok); }
.ch-on { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); }
.ch-list { position: relative; height: 82px; margin-top: 6px; overflow: hidden; }
.ch-b { position: absolute; bottom: 0; max-width: 80%; height: 24px; line-height: 24px; padding: 0 10px; border-radius: 12px; font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-b.them { left: 0; transform-origin: 0 100%; background: var(--s1); box-shadow: var(--sh1); border-bottom-left-radius: 4px; }
.ch-b.me { right: 0; transform-origin: 100% 100%; background: var(--acc); color: var(--acc-ink); border-bottom-right-radius: 4px; }
.ch-b.typing { display: flex; align-items: center; gap: 3px; padding: 0 11px; }
.ch-b.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--mu); }
.ch-in { display: flex; align-items: center; gap: 6px; height: 30px; margin-top: auto; padding: 0 4px 0 12px; border-radius: 15px; background: var(--s1); box-shadow: var(--sh1); }
.ch-txt { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 11.5px; color: var(--fg); padding: 0; }
.ch-txt::placeholder { color: var(--mu); }
.ch-send { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--acc) calc(var(--p, 0) * 100%), var(--s2)); color: color-mix(in oklab, var(--acc-ink) calc(var(--p, 0) * 100%), var(--mu)); transition: background .25s, color .25s; }

/* ---------------- notifications ---------------- */
.w-notif { padding: 10px; }
.nt-list { position: relative; height: 100%; }
.nt { position: absolute; left: 0; right: 0; top: 0; height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 10px; border-radius: calc(12px * var(--rk)); cursor: grab; transform-origin: 50% 0; }
.nt-ic { width: 22px; height: 22px; border-radius: calc(7px * var(--rk)); display: grid; place-items: center; color: #fff; flex: none; }
.nt-tx { min-width: 0; flex: 1; line-height: 1.25; }
.nt-a { display: flex; justify-content: space-between; font-size: 10.5px; }
.nt-a b { font-weight: 650; }
.nt-a span { color: var(--mu2); font-size: 9.5px; }
.nt-m { font-size: 10.5px; color: var(--fg2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------- collaborators ---------------- */
.w-crew { padding: 14px; display: flex; flex-direction: column; }
.cr-top { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 600; }
.cr-live { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.cr-avs { position: relative; height: 32px; margin-top: 16px; }
.cr-av { position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 650; box-shadow: 0 0 0 2.5px var(--s0); }
.cr-av.me { font-size: 9.5px; color: var(--acc-ink); }
.cr-ft { display: flex; align-items: baseline; gap: 5px; margin-top: auto; }
.cr-n { font-size: calc(20px * var(--num-scale)); line-height: 1; }
.cr-join { margin-left: auto; align-self: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--s1); box-shadow: var(--sh1); font-size: 10.5px; font-weight: 650; position: relative; z-index: 2; }
.cr-cur { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.cu { position: absolute; left: 0; top: 0; color: var(--c); display: flex; align-items: flex-start; }
.cu b { margin: 10px 0 0 -2px; padding: 1px 5px; border-radius: 5px; background: var(--c); color: #fff; font-size: 9px; font-weight: 650; }

/* ---------------- like ---------------- */
.w-like { display: flex; align-items: center; gap: 14px; padding: 0 18px; }
.lk-b { --pop: 1; position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--s1); box-shadow: var(--sh1); display: grid; place-items: center; color: var(--fg); }
.lk-h0, .lk-h1 { grid-area: 1 / 1; display: grid; place-items: center; scale: var(--pop); }
.lk-h1 { color: var(--acc); }
.lk-ring { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--acc); opacity: 0; pointer-events: none; }
.lk-p { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px; border-radius: 50%; background: var(--acc); opacity: 0; pointer-events: none; }
.lk-p:nth-of-type(odd) { background: var(--acc2); width: 4px; height: 4px; }
.lk-n { font-size: calc(20px * var(--num-scale)); line-height: 1; }
.lk-t .k-lbl { margin-top: 3px; }

/* ---------------- checklist ---------------- */
.w-tasks { padding: 14px; }
.tk-h { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px; }
.tk-l { display: flex; flex-direction: column; gap: 5px; margin-top: 10px; }
.tk-r { display: flex; align-items: center; gap: 9px; height: 28px; padding: 0 10px; border-radius: calc(10px * var(--rk)); text-align: left; }
.tk-b { position: relative; width: 16px; height: 16px; flex: none; border-radius: calc(5px * var(--rk)); display: grid; place-items: center; color: var(--acc-ink); box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--acc) calc(var(--b, 0) * 100%), var(--mu2)); }
.tk-f { position: absolute; inset: 0; border-radius: inherit; background: var(--acc); transform: scale(0); }
.tk-b svg { position: relative; }
.tk-t { position: relative; font-size: 11.5px; font-weight: 540; color: color-mix(in oklab, var(--mu) calc(var(--s, 0) * 100%), var(--fg)); white-space: nowrap; }
.tk-s { position: absolute; left: 0; top: 54%; height: 1.3px; width: calc(var(--s, 0) * 100%); background: var(--mu); border-radius: 1px; }

/* ---------------- kanban ---------------- */
.w-kanban { padding: 12px; }
.kb-h { display: flex; align-items: center; justify-content: space-between; height: 20px; padding: 0 2px; }
.kb-board { position: relative; height: 106px; margin-top: 6px; }
.kb-col { position: absolute; top: 0; height: 106px; border-radius: calc(10px * var(--rk)); background: color-mix(in oklab, var(--fg) 4.5%, transparent); }
.kb-col span { display: block; font-size: 9.5px; font-weight: 600; color: var(--mu); padding: 5px 7px; }
.kb-c { --l: 0; position: absolute; left: 0; top: 0; height: 22px; display: flex; align-items: center; gap: 5px; padding: 0 7px; border-radius: calc(7px * var(--rk)); font-size: 10px; font-weight: 560; white-space: nowrap; cursor: grab; box-shadow: var(--sh1), 0 calc(var(--l) * 12px) calc(var(--l) * 22px) rgba(20,20,40, calc(var(--l) * .2)); }
.kb-c:active { cursor: grabbing; }
.kb-c i { width: 5px; height: 5px; border-radius: 50%; flex: none; }

/* ---------------- command palette ---------------- */
.w-cmd { padding: 8px; }
.cm { height: 100%; border-radius: calc(15px * var(--rk)); padding: 4px 6px; }
.cm-in { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 6px; border-bottom: 1px solid var(--ln); color: var(--mu); }
.cm-q { flex: 1; min-width: 0; border: 0; outline: 0; background: none; padding: 0; font-size: 12px; font-weight: 520; color: var(--fg); }
.cm-q::placeholder { color: var(--mu2); }
.cm-k { font-size: 9.5px; font-weight: 650; color: var(--mu); background: color-mix(in oklab, var(--fg) 6%, transparent); border-radius: 5px; padding: 2px 5px; }
.cm-l { position: relative; margin-top: 4px; }
.cm-hi { --f: 0; position: absolute; left: 0; right: 0; top: 0; height: 26px; border-radius: calc(8px * var(--rk)); background: color-mix(in oklab, var(--acc) calc(var(--f) * 100%), var(--tx)); }
.cm-r { position: relative; display: flex; align-items: center; width: 100%; height: 26px; padding: 0 8px; font-size: 11.5px; font-weight: 520; text-align: left;
  color: color-mix(in oklab, var(--acc-ink) calc(var(--k, 0) * 100%), color-mix(in oklab, var(--acc) calc(var(--p, 0) * 100%), var(--fg))); }
.cm-r:disabled { cursor: default; }
.cm-e { margin-left: auto; opacity: var(--p, 0); display: grid; }

/* ---------------- upload ---------------- */
.w-upload { padding: 14px; display: flex; flex-direction: column; cursor: pointer; }
.up-ic { position: relative; width: 34px; height: 34px; }
.up-file { position: absolute; inset: 0; border-radius: calc(10px * var(--rk)); display: grid; place-items: center; color: var(--fg); }
.up-ok { position: absolute; inset: 0; border-radius: 50%; background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; box-shadow: 0 4px 12px color-mix(in oklab, var(--acc) 40%, transparent); }
.up-ring { position: absolute; left: -3px; top: -3px; transform: rotate(-90deg); }
.up-ring circle { fill: none; stroke: var(--acc); stroke-width: 2.2; stroke-linecap: round; }
.up-name { display: block; margin-top: auto; font-size: 12px; font-weight: 620; }
.up-row { display: flex; justify-content: space-between; align-items: baseline; margin-top: 3px; font-size: 10.5px; color: var(--mu); }
.up-pc { color: var(--fg); font-size: 11px; }
.up-bar { height: 5px; border-radius: 3px; background: var(--s2); margin-top: 8px; overflow: hidden; }
.up-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--acc), var(--acc2)); transform-origin: 0 50%; }
.up-drop { position: absolute; inset: 6px; border-radius: calc(16px * var(--rk)); border: 1.5px dashed var(--acc); background: color-mix(in oklab, var(--tx) 88%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 11.5px; font-weight: 650; color: var(--acc); opacity: 0; pointer-events: none; }

/* ---------------- deploy ---------------- */
.w-deploy { display: grid; place-items: center; }
.dp { --live: 0; position: relative; height: 36px; border-radius: 18px; overflow: hidden; font-size: 12px; font-weight: 620;
  background: color-mix(in oklab, var(--acc) calc(var(--live) * 100%), var(--fg));
  color: color-mix(in oklab, var(--acc-ink) calc(var(--live) * 100%), var(--s0));
  box-shadow: 0 6px 16px rgba(20,20,40,.2); }
.dp-fill { position: absolute; inset: 0; background: var(--acc); transform-origin: 0 50%; transform: scaleX(0); }
.dp-l { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; }
.dp-load { color: var(--acc-ink); }
.dp-pc { opacity: .75; font-variant-numeric: tabular-nums; }
.dp-spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; }
.dp-ck { width: 15px; height: 15px; border-radius: 50%; background: var(--acc-ink); color: var(--acc); display: grid; place-items: center; }

/* ---------------- one-time code ---------------- */
.w-otp { padding: 13px 12px; }
.ot-h { display: flex; align-items: flex-start; justify-content: space-between; padding: 0 2px; }
.ot-sub { margin-top: 2px; }
.ot-badge { position: relative; width: 22px; height: 22px; display: grid; place-items: center; }
.ot-badge > svg { position: absolute; inset: 0; }
.ot-tr { fill: none; stroke: var(--s2); stroke-width: 2.6; }
.ot-fg { fill: none; stroke: var(--acc); stroke-width: 2.6; stroke-linecap: round; }
.ot-ok { position: absolute; inset: 0; border-radius: 50%; background: var(--ok); color: #fff; display: grid; place-items: center; transform: scale(0); }
.ot-boxes { --g: 0; --r: 0; position: relative; display: flex; gap: 6px; margin-top: 19px; cursor: text; }
.ot-bx { flex: 1; height: 42px; border-radius: calc(10px * var(--rk)); display: grid; place-items: center;
  box-shadow: var(--sh1), inset 0 0 0 calc(max(var(--g), var(--r)) * 1.6px) color-mix(in oklab, var(--bad) calc(var(--r) * 100%), var(--ok)); }
.ot-d { font-size: calc(19px * var(--num-scale)); line-height: 1; }
.ot-caret { position: absolute; left: 0; top: 0; width: calc((100% - 30px) / 6); height: 42px; border-radius: calc(10px * var(--rk)); box-shadow: 0 0 0 1.5px var(--acc), 0 0 0 4.5px color-mix(in oklab, var(--acc) 18%, transparent); pointer-events: none; }
.ot-in { position: absolute; inset: 0; width: 100%; opacity: 0; border: 0; padding: 0; background: none; color: transparent; caret-color: transparent; font-size: 16px; cursor: text; }

/* ---------------- Face ID ---------------- */
.w-faceid { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fi-g { --s: 0; position: relative; width: 76px; height: 76px; cursor: pointer; color: color-mix(in oklab, var(--acc) calc(var(--s) * 100%), var(--fg)); border-radius: 18px; }
.fi-g svg { overflow: visible; }
.fi-br path, .fi-face path { fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.fi-br, .fi-face { transform-box: view-box; transform-origin: 38px 38px; }
.fi-scan { fill: var(--acc); opacity: 0; }
.fi-c { fill: none; stroke: var(--ok); stroke-width: 3.4; stroke-linecap: round; }
.fi-ck { fill: none; stroke: var(--ok); stroke-width: 3.8; stroke-linecap: round; stroke-linejoin: round; }
.fi-halo { position: absolute; inset: -8px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in oklab, var(--ok) 45%, transparent), transparent); opacity: 0; pointer-events: none; }
.fi-t { margin-top: 16px; font-size: 13.5px; font-weight: 620; letter-spacing: -0.015em; }
.fi-s { margin-top: 3px; }

/* ---------------- batteries ---------------- */
.w-battery { padding: 12px 13px; display: flex; flex-direction: column; justify-content: space-between; }
.bt { --c: 1; display: block; width: 100%; text-align: left; }
.bt-r { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 560; }
.bt-ic { color: var(--mu); display: grid; }
.bt-n { flex: 1; }
.bt-bolt { color: var(--acc); display: grid; }
.bt-p { font-size: 11px; }
.bt-bar { margin-top: 5px; height: 5px; border-radius: 3px; background: var(--s2); overflow: hidden; }
.bt-bar i { display: block; height: 100%; border-radius: 3px; transform-origin: 0 50%; background: color-mix(in oklab, var(--acc) calc(var(--c) * 100%), var(--fg)); }

/* ---------------- pricing ---------------- */
.w-price { padding: 12px; display: flex; flex-direction: column; }
.pr-t { position: relative; display: flex; height: 26px; padding: 2px; border-radius: calc(9px * var(--rk)); background: var(--s2); }
.pr-p { position: absolute; left: 2px; top: 2px; bottom: 2px; width: calc(50% - 2px); border-radius: calc(7px * var(--rk)); background: var(--s1); box-shadow: 0 1px 3px rgba(0,0,0,.1), var(--hair); }
.pr-o { position: relative; flex: 1; font-size: 11px; font-weight: 600; color: color-mix(in oklab, var(--fg) calc(var(--p, 0) * 100%), var(--mu)); }
.pr-row { display: flex; align-items: flex-end; gap: 5px; margin-top: 8px; }
.pr-v { display: inline-flex; font-size: calc(28px * var(--num-scale)); line-height: 1.2; }
.pr-u { margin-bottom: 6px; }
.pr-save { margin-left: auto; margin-bottom: 7px; height: 20px; padding: 0 7px; border-radius: calc(7px * var(--rk)); background: var(--acc); color: var(--acc-ink); font-size: 10.5px; font-weight: 650; display: inline-flex; align-items: center; }
.pr-cta { position: relative; overflow: hidden; margin-top: auto; height: 28px; border-radius: calc(9px * var(--rk)); background: var(--fg); color: var(--s0); font-size: 11.5px; font-weight: 650; display: flex; align-items: center; justify-content: center; }
.pr-sh { position: absolute; top: 0; bottom: 0; left: 0; width: 36px; background: linear-gradient(90deg, transparent, color-mix(in oklab, var(--s0) 38%, transparent), transparent); }

/* ---------------- route map ---------------- */
.w-map { padding: 12px; display: flex; flex-direction: column; }
.mp-map { height: 140px; border-radius: var(--r-card); overflow: hidden; background: color-mix(in oklab, var(--s2) 55%, var(--tx)); }
.mp-svg { display: block; cursor: crosshair; }
.mp-st path { stroke: var(--s1); stroke-width: 5; fill: none; }
.mp-st path.mj { stroke-width: 8.5; }
.mp-water { fill: color-mix(in oklab, var(--acc) 20%, var(--s1)); }
.mp-park { fill: color-mix(in oklab, var(--ok) 20%, var(--s1)); }
.mp-bld { fill: color-mix(in oklab, var(--fg) 5%, transparent); }
.mp-rt { fill: none; stroke: var(--acc); stroke-opacity: .3; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.mp-done { fill: none; stroke: var(--acc); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.mp-o { fill: var(--s1); stroke: var(--acc); stroke-width: 2.2; }
.mp-pg path { fill: var(--fg); }
.mp-pd { fill: var(--s1); }
.mp-sh { fill: rgba(0,0,0,.18); }
.mp-halo { fill: var(--acc); opacity: .16; }
.mp-car circle { fill: var(--acc); stroke: var(--s1); stroke-width: 2; }
.mp-ar { fill: var(--acc-ink); }
.mp-ft { display: flex; align-items: center; gap: 9px; margin-top: auto; padding: 0 4px; }
.mp-ic { width: 28px; height: 28px; flex: none; border-radius: calc(9px * var(--rk)); background: var(--acc); color: var(--acc-ink); display: grid; place-items: center; }
.mp-tx { flex: 1; min-width: 0; }
.mp-eta { position: relative; height: 16px; font-size: 12px; font-weight: 650; }
.mp-a, .mp-b { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; white-space: nowrap; }
.mp-b { color: var(--ok); opacity: 0; }
.mp-to { font-size: 10.5px; }
.mp-d { font-size: 11px; color: var(--mu); font-weight: 600; }

:root[data-mode="dark"] .mp-st path { stroke: color-mix(in oklab, var(--s1) 78%, var(--fg)); }
:root[data-mode="dark"] .mp-bld { fill: color-mix(in oklab, var(--fg) 3%, transparent); }
