/* BrickPocket v1.2 — charts, motion, app-like mobile shell and desktop panels (layered on app.css) */
:root {
  /* categorical chart palette, validated (lightness, chroma, colour-blind separation, contrast) on the dark surface */
  --cat-1: #3987e5; --cat-2: #d95926; --cat-3: #199e70; --cat-4: #c98500; --cat-5: #d55181; --cat-6: #9085e9;
  --cat-other: #5d5a63;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-in: cubic-bezier(.4, 0, 1, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --pane: 440px;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { overscroll-behavior-y: none; }
a, button, .set-card, .chip, .seg button, .round-btn, .row, .pick, .pal-row { touch-action: manipulation; }
.tabbar, .sidebar, .topbar, .btn, .chip, .seg, .set-card, .pick, .round-btn, .pal-row, .ctx, .fab, .nav-link { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* ---------- press feedback ---------- */
.set-card, .pick, .row, .fig, .nav-link, .chip, .seg button, .item, .ach, .photo, .photo-add { transition: transform .18s var(--ease), border-color .18s, box-shadow .18s, background .15s, color .15s; }
.set-card:active, .pick:active { transform: scale(.975); transition-duration: .08s; }
.chip:active, .seg button:active, .nav-link:active, .photo-add:active, .row:active { transform: scale(.96); transition-duration: .08s; }
.btn:active { transform: scale(.95); }
.round-btn { transition: transform .2s var(--spring), background .2s, color .2s; }
.round-btn:active { transform: scale(.85); }
.round-btn.bump { animation: bump .45s var(--spring); }
@keyframes bump { 35% { transform: scale(1.3); } 100% { transform: scale(1); } }
.round-btn svg { transition: transform .35s var(--spring); }
.round-btn.on svg { transform: rotate(360deg); }
.set-card .art img { transition: opacity .3s, transform .6s var(--ease); }
@media (hover: hover) { .set-card:hover .art img.ok, .pick:hover .art img.ok { transform: scale(1.04); } }
@media (pointer: coarse) { .set-card:hover, .pick:hover { transform: none; box-shadow: none; } }

/* ---------- reveal on scroll ---------- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease) var(--d, 0ms), transform .7s var(--ease) var(--d, 0ms); }
[data-reveal].in { opacity: 1; transform: none; }
.pop { animation: pop .55s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.settled [data-reveal], .settled .mini-prog i, .settled .ring-fill { transition: none !important; }
.hero-num, .kpi-line b, .stat .v { font-variant-numeric: tabular-nums; }
.kpi-line div b [data-count] { font-size: inherit; color: inherit; display: inline; }
@media (min-width: 960px) { .topbar { display: none; } }

/* progress fills grow in */
.mini-prog i, .prog i { width: var(--w); transition: width 1s var(--ease) .2s; }
[data-reveal]:not(.in) .mini-prog i { width: 0; }
.pop .prog i { animation: grow-w 1s var(--ease) both; animation-delay: calc(var(--d, 0ms) + 150ms); }
@keyframes grow-w { from { width: 0; } }
.ring-fill { stroke-dashoffset: var(--c); transition: stroke-dashoffset 1.3s var(--ease) .25s; }
[data-reveal].in .ring-fill { stroke-dashoffset: var(--off); }

/* ---------- page transitions (View Transitions API) ---------- */
.sidebar { view-transition-name: sidebar; }
.tabbar { view-transition-name: tabbar; }
.fab { view-transition-name: fab; }
.pane { view-transition-name: pane; }
::view-transition-group(sidebar), ::view-transition-group(tabbar), ::view-transition-group(fab), ::view-transition-group(pane) { animation: none; }
::view-transition-old(root) { animation: vt-out .22s var(--ease-in) both; }
::view-transition-new(root) { animation: vt-in .38s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-6px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 959px) {
  html[data-dir="fwd"]::view-transition-old(root) { animation: slide-out-l .28s var(--ease-in) both; }
  html[data-dir="fwd"]::view-transition-new(root) { animation: slide-in-r .38s var(--ease) both; }
  html[data-dir="back"]::view-transition-old(root) { animation: slide-out-r .28s var(--ease-in) both; }
  html[data-dir="back"]::view-transition-new(root) { animation: slide-in-l .38s var(--ease) both; }
}
@keyframes slide-out-l { to { opacity: 0; transform: translateX(-28px); } }
@keyframes slide-in-r { from { opacity: 0; transform: translateX(36px); } }
@keyframes slide-out-r { to { opacity: 0; transform: translateX(28px); } }
@keyframes slide-in-l { from { opacity: 0; transform: translateX(-36px); } }

/* ---------- charts ---------- */
.chart { position: relative; width: 100%; -webkit-tap-highlight-color: transparent; }
.chart svg { display: block; overflow: visible; }
.chart .axis { fill: var(--faint); font: 500 11px var(--sans); font-variant-numeric: tabular-nums; }
.chart .grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.chart .area-line, .chart .spark-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); }
.chart.in .area-line, .chart.in .spark-line { stroke-dashoffset: 0; }
.chart .area-fill { opacity: 0; transition: opacity .9s .6s; }
.chart.in .area-fill { opacity: 1; }
.chart .end-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; opacity: 0; transition: opacity .3s 1.2s; }
.chart.in .end-dot { opacity: 1; }
.chart .end-label { position: absolute; font: 600 12px var(--sans); color: var(--text); background: var(--surface-3); border: 1px solid var(--line-2); padding: 2px 7px; border-radius: 7px; opacity: 0; transition: opacity .3s 1.3s; pointer-events: none; white-space: nowrap; }
.chart.in .end-label { opacity: 1; }
.chart .cursor { stroke: var(--line-2); stroke-width: 1; transition: opacity .15s; }
.chart .cursor-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; transition: opacity .15s; }
.chart .col { fill: var(--accent); transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(0); transition: transform .8s var(--ease) calc(var(--i) * 22ms), opacity .2s; }
.chart.in .col { transform: none; }
.chart .col.dim { opacity: .35; }
.chart .peak { fill: var(--muted); font: 600 11px var(--sans); opacity: 0; transition: opacity .3s 1s; }
.chart.in .peak { opacity: 1; }
.chart.static *, .chart.static { transition: none !important; }
.chart-tip { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; padding: 6px 10px; border-radius: 10px; background: var(--surface-3); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 12px; line-height: 1.35; white-space: nowrap; opacity: 0; transition: opacity .15s, transform .08s linear; }
.chart-tip.on { opacity: 1; }
.chart-tip b { display: block; font-size: 13.5px; color: var(--text); }
.chart-tip span { color: var(--muted); }
.chart-note { font-size: 12.5px; margin: 12px 0 0; }
.card-title { font-size: 13px; font-weight: 700; letter-spacing: .02em; color: var(--muted); margin: 0 0 14px; }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; }
.donut { position: relative; flex: none; }
.donut svg { transform: scale(.82) rotate(-50deg); opacity: 0; transition: transform 1s var(--ease), opacity .5s; }
.chart.in .donut svg { transform: none; opacity: 1; }
.donut .seg { fill: none; transition: opacity .2s; cursor: pointer; }
.donut .seg.dim { opacity: .28; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; padding: 0 30px; }
.donut-center b { font-family: var(--serif); font-weight: 400; font-size: 36px; line-height: 1; font-variant-numeric: tabular-nums; }
.donut-center span { font-size: 12px; color: var(--muted); margin-top: 4px; }
.legend { list-style: none; padding: 0; margin: 0; flex: 1; min-width: 200px; }
.legend li { display: grid; grid-template-columns: 10px 1fr auto 38px; gap: 10px; align-items: center; padding: 7px 4px; font-size: 13.5px; border-bottom: 1px solid var(--line); border-radius: 6px; transition: background .15s; cursor: default; }
.legend li:last-child { border-bottom: 0; }
.legend li.on { background: var(--surface-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend .lt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.legend .lv { font-variant-numeric: tabular-nums; }
.legend .lp { text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; }
.legend.inline { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; min-width: 0; }
.legend.inline li { display: flex; gap: 7px; padding: 0; border: 0; font-size: 12.5px; }

/* horizontal bars */
.hbars { display: flex; flex-direction: column; gap: 4px; }
.hb { display: grid; grid-template-columns: minmax(84px, 38%) 1fr auto; gap: 12px; align-items: center; padding: 5px 0; font-size: 13.5px; }
.hb-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.hb.hl .hb-l { color: var(--text); font-weight: 600; }
.hb-t { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.hb-f { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .9s var(--ease) calc(var(--i) * 70ms); }
.hbars:has(.hl) .hb:not(.hl) .hb-f { opacity: .45; }
.chart.in .hb-f { width: var(--w); }
.hb-v { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; min-width: 44px; text-align: right; }

/* stacked bar */
.stackbar { display: flex; gap: 2px; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-3); }
.stackbar .sb { width: 0; flex: none; transition: width 1s var(--ease) calc(var(--i) * 90ms); }
.chart.in .stackbar .sb { width: calc(var(--w) - 2px); }
.tile-spark { margin-top: 12px; }
.seg-sm button { height: 28px; padding: 0 11px; font-size: 12.5px; }

/* hero */
.hero-split { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero-num { font-family: var(--serif); font-size: clamp(64px, 9vw, 104px); line-height: .9; letter-spacing: -.03em; }
.hero-spark { position: relative; z-index: 1; width: min(300px, 100%); text-align: right; font-size: 12px; }
.compare { margin: 0 0 16px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.compare-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 6px; font-size: 12.5px; }

/* images fade in */
.fig-avatar { position: relative; }
.fig-avatar img { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
.fig-avatar img.ok { opacity: 1; }

/* ---------- sheets (bottom sheet on phones, dialog on desktop) ---------- */
.overlay { background: rgba(0, 0, 0, calc(.6 * var(--dim, 1))); }
.overlay.closing { animation: fade-out .24s var(--ease-in) forwards; }
.sheet-head { position: sticky; }
.grab { display: none; }
@keyframes fade-out { to { opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes dialog-out { to { opacity: 0; transform: translateY(8px) scale(.97); } }
@media (max-width: 759px) {
  .sheet { animation: sheet-up .38s var(--ease); transition: transform .3s var(--ease); max-height: calc(100vh - env(safe-area-inset-top) - 24px); padding-bottom: env(safe-area-inset-bottom); }
  .sheet.set-sheet { height: calc(100vh - env(safe-area-inset-top) - 24px); }
  .overlay.closing .sheet { animation: sheet-down .26s var(--ease-in) forwards; }
  .sheet-head { padding-top: 20px; }
  .grab { display: block; position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 3px; background: var(--line-2); }
}
@media (min-width: 760px) {
  .sheet { animation: dialog-in .28s var(--ease); }
  .overlay.closing .sheet { animation: dialog-out .2s var(--ease-in) forwards; }
}

/* ---------- docked detail panel (wide desktop) ---------- */
.pane { display: none; }
@media (min-width: 1280px) {
  body.pane-open .pane { display: block; position: fixed; top: var(--tbar); right: 0; bottom: 0; width: var(--pane); z-index: 22; overflow-y: auto; overscroll-behavior: contain;
    background: var(--bg-2); border-left: 1px solid var(--line); box-shadow: -30px 0 60px -30px rgba(0,0,0,.6); animation: pane-in .34s var(--ease); }
  body.pane-open .main { margin-right: var(--pane); margin-left: var(--side); max-width: none; padding-left: 36px; padding-right: 32px; }
  body.pane-open .toasts { left: calc(var(--side) + (100vw - var(--side) - var(--pane)) / 2); }
}
@keyframes pane-in { from { transform: translateX(40px); opacity: 0; } }
.pane-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; background: rgba(14,14,18,.88); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.pane-body { padding: 20px 24px 40px; animation: fade .3s; }
.pane .detail { grid-template-columns: 1fr; gap: 20px; }
.pane .detail h2 { font-size: 30px; }
.pane .detail .art { aspect-ratio: 16 / 9; }
.pane .detail .art .art-num { font-size: 64px; }
.pane .detail .art .art-theme { bottom: 72px; }
.pane .detail > div:first-child { order: 0; }

/* ---------- command palette & quick add ---------- */
.palette-ov { position: fixed; inset: 0; z-index: 150; background: rgba(0,0,0,.5); backdrop-filter: blur(6px); display: flex; justify-content: center; align-items: flex-start; padding-top: 11vh; animation: fade .15s; }
.palette-ov.closing { animation: fade-out .18s forwards; }
.palette { width: min(660px, 92vw); max-height: 72vh; display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 20px; box-shadow: 0 40px 100px -20px rgba(0,0,0,.8); overflow: hidden; animation: dialog-in .22s var(--ease); }
.pal-head { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.pal-search { flex: 1; display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.pal-search svg { width: 20px; height: 20px; color: var(--faint); flex: none; }
.pal-search input { flex: 1; min-width: 0; height: 44px; background: none; border: 0; outline: none; font-size: 17px; }
.pal-search input::-webkit-search-cancel-button { display: none; }
.pal-cancel { display: none; }
.pal-results { overflow-y: auto; padding: 6px 8px 10px; overscroll-behavior: contain; }
.pal-group { padding: 12px 10px 6px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.pal-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 12px; cursor: pointer; transition: background .12s; }
.pal-row.on { background: var(--surface-2); }
.pal-row .grow { flex: 1; min-width: 0; }
.pal-row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-row .s { font-size: 12.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-row .round-btn { width: 32px; height: 32px; flex: none; }
.pal-row .round-btn.pal-add { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.pal-thumb { width: 60px; flex: none; border-radius: 9px; overflow: hidden; }
.pal-thumb .art-num { font-size: 19px; left: 7px; bottom: 2px; }
.pal-thumb .art-theme { display: none; }
.pal-ic { width: 38px; height: 38px; flex: none; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.pal-ic svg { width: 18px; height: 18px; }
.pal-foot { display: flex; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.pal-foot kbd { margin-right: 3px; }
@media (max-width: 759px) {
  .palette-ov { padding: 0; align-items: stretch; background: var(--bg); backdrop-filter: none; }
  .palette { width: 100%; max-height: none; height: 100%; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top); animation: sheet-up .34s var(--ease); }
  .palette-ov.closing .palette { animation: sheet-down .22s var(--ease-in) forwards; }
  .pal-cancel { display: inline-flex; }
  .pal-search input { font-size: 16px; }
  .pal-results { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
}

/* ---------- context menu ---------- */
.ctx { position: fixed; z-index: 220; min-width: 230px; padding: 6px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 24px 60px -10px rgba(0,0,0,.7); animation: ctx-in .14s var(--ease); transform-origin: top left; }
.ctx button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 10px; border: 0; background: none; border-radius: 9px; font-size: 13.5px; color: var(--text); cursor: pointer; text-align: left; }
.ctx button svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.ctx button:hover, .ctx button:focus-visible { background: var(--accent); color: var(--accent-ink); outline: none; }
.ctx button:hover svg, .ctx button:focus-visible svg { color: var(--accent-ink); }
.ctx button.danger { color: #ff8b78; }
.ctx button.danger:hover { background: var(--red); color: #fff; }
.ctx kbd { margin-left: auto; }
.ctx hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
@keyframes ctx-in { from { opacity: 0; transform: scale(.94); } }

/* ---------- sidebar search & desktop titlebar ---------- */
.side-search { display: flex; align-items: center; gap: 10px; height: 38px; margin: -8px 0 14px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); color: var(--faint); font-size: 14px; cursor: pointer; transition: border-color .15s, color .15s; }
.side-search:hover { border-color: var(--line-2); color: var(--muted); }
.side-search svg { width: 17px; height: 17px; }
.side-search kbd { margin-left: auto; }
@media (display-mode: window-controls-overlay) {
  .titlebar { display: flex; align-items: center; gap: 12px; padding: 0 12px; background: rgba(9,9,11,.85); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .tb-name { font-size: 12px; font-weight: 600; color: var(--faint); }
  .tb-search { -webkit-app-region: no-drag; app-region: no-drag; margin: 0 auto; width: min(420px, 50%); height: 26px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--faint); font-size: 12px; cursor: pointer; }
  .tb-search svg { width: 14px; height: 14px; }
  .tb-search kbd { margin-left: auto; font-size: 10px; padding: 1px 5px; }
  .sidebar .side-search { display: none; }
}

/* ---------- mobile: app shell ---------- */
@media (max-width: 959px) {
  .main { padding-top: 0; padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
  .topbar { position: sticky; top: 0; z-index: 25; margin: 0 -16px 14px; padding: calc(env(safe-area-inset-top) + 8px) 12px 8px 16px; min-height: calc(env(safe-area-inset-top) + 56px);
    background: transparent; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s, backdrop-filter .25s; }
  .topbar.scrolled { background: rgba(9, 9, 11, .78); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border-bottom-color: var(--line); }
  .topbar .brand { transition: opacity .2s, transform .25s var(--ease); }
  .topbar.scrolled .brand { opacity: 0; transform: translateY(-6px); pointer-events: none; }
  .topbar-title { position: absolute; left: 60px; right: 60px; text-align: center; font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .25s var(--ease); pointer-events: none; bottom: 16px; }
  .topbar.scrolled .topbar-title { opacity: 1; transform: none; }
  .topbar-btn { width: 40px; height: 40px; }
  .topbar-btn svg { width: 21px; height: 21px; }
  .page-title { font-size: clamp(32px, 9vw, 42px); }

  .tabbar { padding-top: 6px; }
  .tabbar a { position: relative; z-index: 1; transition: color .2s; }
  .tabbar a svg { transition: transform .35s var(--spring); }
  .tabbar a:active svg { transform: scale(.82); }
  .tabbar a.active svg { animation: tab-pop .45s var(--spring); }
  .tab-ind { position: absolute; top: 4px; left: 0; width: 58px; height: 34px; border-radius: 17px; background: var(--accent-soft); transition: transform .42s var(--spring), opacity .2s; pointer-events: none; }
  @keyframes tab-pop { 40% { transform: scale(1.18) translateY(-1px); } }

  .fab { position: fixed; right: 18px; bottom: calc(82px + env(safe-area-inset-bottom)); z-index: 29; width: 58px; height: 58px; border-radius: 20px; border: 0; display: grid; place-items: center;
    background: var(--accent); color: var(--accent-ink); box-shadow: 0 14px 34px -8px var(--accent), 0 4px 12px rgba(0,0,0,.4); cursor: pointer; transition: transform .25s var(--spring), border-radius .25s; animation: fab-in .5s var(--spring) .3s both; }
  .fab svg { width: 26px; height: 26px; }
  .fab:active { transform: scale(.88); border-radius: 29px; }
  @keyframes fab-in { from { transform: scale(0) rotate(-90deg); } }
  .scroller { margin-right: -16px; padding-right: 16px; scroll-padding-left: 0; }
  .toasts { bottom: calc(150px + env(safe-area-inset-bottom)); }
}
@media (min-width: 960px) { .fab, .ptr { display: none; } }

/* toasts */
.toast { animation: toast-in .4s var(--spring); }
.toast.out { animation: toast-out .26s var(--ease-in) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(.94); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px) scale(.96); } }

/* pull to refresh */
.ptr { position: fixed; top: calc(env(safe-area-inset-top) + 6px); left: 50%; z-index: 40; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-3); border: 1px solid var(--line-2); color: var(--muted); box-shadow: var(--shadow); opacity: 0; transform: translate(-50%, -50px); pointer-events: none; }
.ptr:not(.pulling) { transition: transform .35s var(--ease), opacity .3s; }
.ptr svg { width: 20px; height: 20px; }
.ptr.ready { color: var(--accent); }
.ptr.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1; transform: none; }
}
[data-motion="reduce"] [data-reveal] { opacity: 1; transform: none; }
[data-motion="reduce"] .chart *, [data-motion="reduce"] .pop { transition: none !important; animation: none !important; }
[data-motion="reduce"] .chart .col { transform: none; }
[data-motion="reduce"] .chart .area-line, [data-motion="reduce"] .chart .spark-line { stroke-dashoffset: 0; }
.palette .grab { display: none !important; }
@media (max-width: 759px) { .palette .pal-foot { display: none; } }
