/* Crypto Tracker — dark plum theme. All colors and sizes are tokens below; change them here. */
@font-face { font-family: Poppins; font-style: normal; font-weight: 400; font-display: swap; src: url(/vendor/fonts/poppins-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 500; font-display: swap; src: url(/vendor/fonts/poppins-latin-500-normal.woff2) format('woff2'); }
@font-face { font-family: Poppins; font-style: normal; font-weight: 600; font-display: swap; src: url(/vendor/fonts/poppins-latin-600-normal.woff2) format('woff2'); }

:root {
  color-scheme: dark;
  --font: Poppins, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #0b0a0d;
  --glow: #3b2236;
  --card: linear-gradient(160deg, #1d181c 0%, #121014 100%);
  --card-hi: radial-gradient(120% 140% at 85% 0%, #4a3242 0%, #2a1f27 38%, #151117 100%);
  --surface: #17131a;
  --surface-2: #221c22;
  --stroke: rgba(255, 255, 255, .08);
  --stroke-2: rgba(255, 255, 255, .16);
  --grid: rgba(255, 255, 255, .06);
  --text: #f4eff3;
  --muted: #a59ca3;
  --accent: #e3a6d2;
  --accent-grad: linear-gradient(90deg, #a8789c 0%, #6b4a62 55%, #4a3445 100%);
  --good: #5ee08f;
  --bad: #ff7a85;
  --warn: #f3c262;
  --r-card: 22px;
  --r-pill: 999px;
  --gap: 12px;
  --pad: 16px;
  --header-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --cols: 1;
  --strip-gap: calc(var(--pad) + 4px); /* phone: wider than the side padding, so neighbors never peek */
}
@media (min-width: 760px) { :root { --cols: 2; --gap: 16px; --pad: 20px; --strip-gap: var(--gap); } }
@media (min-width: 1200px) { :root { --cols: 3; } }
@media (min-width: 1600px) { :root { --cols: 4; } }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* Fixed background glow: its own layer, never repaints on scroll. */
.glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60vmax 50vmax at 100% 0%, color-mix(in srgb, var(--glow) 55%, transparent), transparent 70%),
    radial-gradient(55vmax 45vmax at 0% 100%, color-mix(in srgb, var(--glow) 40%, transparent), transparent 70%);
  transform: translateZ(0);
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select {
  font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--stroke);
  border-radius: 14px; padding: 11px 14px; width: 100%; outline: none;
}
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.good { color: var(--good); }
.bad { color: var(--bad); }
.error { color: var(--bad); min-height: 1.2em; margin: 4px 0 0; font-size: 13px; }

/* ---------- brand, buttons, pills ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; }
.brand img { border-radius: 8px; }
.icon-btn {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--stroke-2); transition: transform .12s var(--ease), background .2s;
}
.icon-btn:active { transform: scale(.94); }
.btn {
  border: 1px solid var(--stroke-2); background: transparent; border-radius: var(--r-pill); padding: 10px 18px;
  font-weight: 500; transition: transform .12s var(--ease);
}
.btn:active { transform: scale(.96); }
.btn.primary { background: var(--accent-grad); border-color: transparent; color: #fff; }
.btn.ghost { background: none; color: var(--muted); }
.link { background: none; border: 0; color: var(--accent); font-weight: 500; padding: 4px 0; }

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 var(--gap); }
.pill-row.tight { gap: 6px; margin: 0; }
.pill-row.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--pad)); padding-right: var(--pad); }
.pill-row.scroll::-webkit-scrollbar { display: none; }
.pill {
  position: relative; isolation: isolate; flex: none; height: 36px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--stroke-2); background: rgba(10, 8, 11, .55); color: var(--text); font-weight: 500; font-size: 13px;
  transition: transform .12s var(--ease), border-color .25s;
}
.pill.tight, .tight .pill { height: 30px; padding: 0 12px; font-size: 12px; }
/* Active state: a gradient layer that fades in (opacity only, no layout work). */
.pill::before { content: ''; position: absolute; inset: -1px; border-radius: inherit; background: var(--accent-grad); opacity: 0; transition: opacity .28s var(--ease); z-index: -1; }
.pill.on { border-color: transparent; }
.pill.on::before { opacity: 1; }
.pill:active { transform: scale(.96); }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .06); font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip.good { color: var(--good); background: color-mix(in srgb, var(--good) 13%, transparent); }
.chip.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 13%, transparent); }

/* ---------- login ---------- */
.login { position: relative; z-index: 1; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-card { width: min(380px, 100%); display: grid; gap: 14px; padding: 28px; }

/* ---------- app shell ---------- */
.app { position: relative; z-index: 1; height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.topbar {
  display: flex; align-items: center; gap: 12px; height: calc(var(--header-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) var(--pad) 0; position: relative; z-index: 5;
}
.topbar .brand { flex: 1; min-width: 0; }
.topbar .brand span { overflow: hidden; text-overflow: ellipsis; }
.tabs { display: none; margin: 0; flex-wrap: nowrap; }
.sync { display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .03); border: 1px solid var(--stroke-2); border-radius: var(--r-pill); color: var(--muted); font-size: 12px; height: 42px; padding: 0 12px; }
.sync svg { width: 18px; height: 18px; }
#syncText { display: none; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 20%, transparent); }
.dot.err { background: var(--bad); }
.dot.spin { background: var(--accent); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

@media (min-width: 760px) {
  .tabs { display: flex; flex: none; }
  #syncText { display: inline; }
}

/* Phone: the panel names sit in a second row under the header. */
@media (max-width: 759px) {
  .topbar { display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: var(--header-h) auto; height: auto; padding: env(safe-area-inset-top) var(--pad) 0; align-items: center; column-gap: 12px; }
  .topbar > .tabs { display: flex; grid-column: 1 / -1; grid-row: 2; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 0 var(--pad) 12px 0; margin-right: calc(-1 * var(--pad)); }
  .topbar > .tabs::-webkit-scrollbar { display: none; }
}

/* ---------- panel strip: native scroll + snap (fluid swipes, momentum, no JS animation) ---------- */
.strip {
  display: flex; gap: var(--strip-gap); min-height: 0;
  overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad);
  overscroll-behavior-x: contain; scrollbar-width: none; padding: 0 var(--pad);
}
.strip::-webkit-scrollbar { display: none; }
.panel {
  flex: 0 0 calc((100% - (var(--cols) - 1) * var(--strip-gap)) / var(--cols));
  scroll-snap-align: start; scroll-snap-stop: always; min-width: 0;
  overflow-y: auto; overscroll-behavior-y: contain; scrollbar-width: thin; scrollbar-color: var(--stroke-2) transparent;
  contain: layout paint;
}
.panel-inner { padding: 4px 0 calc(72px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) { .panel-inner { padding-bottom: 28px; } }

/* Page dots (phones). */
.dots {
  position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 6;
  display: flex; gap: 6px; padding: 8px 12px; border-radius: var(--r-pill);
  background: rgba(20, 16, 20, .72); border: 1px solid var(--stroke); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: var(--stroke-2); transition: transform .25s var(--ease), background .25s; }
.dots button.on { background: var(--accent); transform: scale(1.35); }
@media (min-width: 760px) { .dots { display: none; } }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--stroke); border-radius: var(--r-card); padding: var(--pad); margin: 0 0 var(--gap); }
.card-title { font-size: 15px; font-weight: 500; letter-spacing: -.005em; margin: 0; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.row-between.wrap { flex-wrap: wrap; row-gap: 10px; margin-bottom: 8px; }
.section-head { display: flex; justify-content: space-between; align-items: center; margin: 4px 2px 10px; }
.stack { display: grid; gap: 0; }

/* Hero (Total holding) */
.hero { background: var(--card-hi); position: relative; overflow: hidden; }
.total { display: block; background: none; border: 0; padding: 0; margin: 14px 0 2px; font-size: clamp(30px, 8.6vw, 38px); font-weight: 600; letter-spacing: -.02em; text-align: left; }
.mix { margin-top: 14px; }
.mix-bar { display: flex; gap: 3px; height: 6px; border-radius: 99px; overflow: hidden; }
.mix-bar i { background: var(--c); min-width: 3px; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.mix-legend span { display: inline-flex; align-items: center; gap: 6px; }
.mix-legend i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }

/* Invested summary */
.vs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0 10px; }
.vs b { display: block; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.meter { height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.meter i { display: block; height: 100%; width: 100%; border-radius: 99px; background: var(--accent); transform-origin: left; transform: scaleX(0); transition: transform .6s var(--ease); }
.meter i.good { background: linear-gradient(90deg, var(--accent), var(--good)); }
.kv-rows { display: grid; margin-top: 12px; }
.kv-rows > div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--stroke); font-size: 13px; }
.kv-rows > div:first-child { border-top: 0; }
.kv-rows span { color: var(--muted); }
.kv-rows b { font-weight: 500; }

/* Coin tiles (like the reference's "My Portfolio") */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); margin-bottom: var(--gap); }
.tile {
  text-align: left; display: grid; gap: 2px; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--stroke);
  transition: transform .12s var(--ease), border-color .2s;
}
.tile:active { transform: scale(.97); }
.tile b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.tile-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.tile-foot .units { margin-left: auto; color: var(--text); }
.badge { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 5px; border-radius: 50%; font-size: 9px; font-weight: 600; letter-spacing: .02em; color: #120e12; background: var(--c); }

/* Coin cards (Invested) */
.coin-head { display: flex; align-items: center; gap: 10px; }
.coin-name { font-weight: 600; font-size: 16px; }
.coin-value { margin-left: auto; font-weight: 600; font-size: 16px; background: none; border: 0; padding: 0; }
.coin-sub { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 12px; margin-top: 6px; }
.coin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--stroke); }
.kv span { display: block; font-size: 11px; color: var(--muted); }
.kv b { font-weight: 500; font-size: 13px; }
.progress { margin-top: 14px; }
.progress .lbl { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); margin-top: 6px; }

/* Lists (Activity, Entries) — like the reference's Watchlist */
.list { list-style: none; padding: 4px var(--pad); }
.list li { display: grid; grid-template-columns: auto 1fr auto; column-gap: 12px; row-gap: 2px; align-items: center; padding: 12px 0; border-top: 1px solid var(--stroke); }
.list li:first-child { border-top: 0; }
.list li > .t { grid-column: 2; font-weight: 500; }
.list li > .s { grid-column: 2; color: var(--muted); font-size: 12px; }
.list li > .amt { grid-column: 3; grid-row: 1; text-align: right; font-weight: 500; }
.list li > .del { grid-column: 3; grid-row: 2; justify-self: end; }
.list li > .ico { grid-column: 1; grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; font-size: 13px; background: rgba(255, 255, 255, .06); color: var(--muted); }
.list li > .ico.action { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.list li > .ico.good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.list li > .ico.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.list li:not(:has(.ico)) > .t, .list li:not(:has(.ico)) > .s { grid-column: 1 / 3; }
.list li.empty { display: block; color: var(--muted); text-align: center; padding: 18px 0; }
.tag { display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, .07); color: var(--muted); margin-left: 8px; vertical-align: 2px; font-weight: 400; }
.del { background: none; border: 0; color: var(--bad); font-size: 12px; padding: 0; }

/* Banners */
.notes { display: grid; gap: 8px; margin-bottom: var(--gap); }
.notes:empty { display: none; }
.banner { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: start; padding: 12px 14px; border-radius: 18px; background: var(--card); border: 1px solid var(--stroke); border-left: 3px solid var(--muted); }
.banner.action { border-left-color: var(--accent); }
.banner.good { border-left-color: var(--good); }
.banner.warn { border-left-color: var(--warn); }
.banner.info { border-left-color: var(--accent); }
.banner strong { font-weight: 500; }
.banner p { margin: 0; grid-column: 1; color: var(--muted); font-size: 12px; }
.banner button { grid-row: 1 / span 2; grid-column: 2; background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; padding: 0 2px; }

/* ---------- charts ---------- */
.chart { position: relative; height: 300px; margin: 0 calc(-1 * var(--pad) + 6px); touch-action: pan-y; }
.chart.compact { height: 190px; }
.chart.tall { height: max(320px, calc(100dvh - 330px)); margin: 0; }
.chart-card .pill-row.tight { margin: 4px 0 10px; }
.chart-note { margin: 6px 0 0; }
.chart-tip {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; display: grid; gap: 2px; padding: 8px 12px; border-radius: 12px;
  background: rgba(24, 19, 24, .92); border: 1px solid var(--stroke-2); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); font-size: 12px; white-space: nowrap;
}
.chart-tip .tt { color: var(--muted); font-size: 11px; }
.chart-tip .tv { font-weight: 600; }
.chart-tip em { font-style: normal; font-weight: 500; font-size: 11px; margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); }
.chart-tip em.good { color: var(--good); }
.chart-tip em.bad { color: var(--bad); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 8px 0 0; }
.legend .item { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sw { display: inline-block; width: 14px; height: 2px; border-radius: 2px; }
.sw.avg { background: #8fb8ff; }
.sw.stop { background: var(--warn); }
.sw.buy { background: var(--good); width: 8px; height: 8px; border-radius: 50%; }

/* ---------- forms and tables ---------- */
.form-grid { display: grid; gap: 10px; margin-top: 12px; }
.form-grid label, .field { display: grid; gap: 6px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.form-grid label { margin-top: 0; }
details summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; font-size: 20px; color: var(--muted); transition: transform .25s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
.rates { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.rates legend { margin-bottom: 8px; }
.rates label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 11px 14px; background: rgba(255, 255, 255, .03); border: 1px solid var(--stroke); border-radius: 14px; cursor: pointer; }
.rates label:has(input:checked) { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.rates input { width: auto; accent-color: var(--accent); margin: 0; }
.rates .v { color: var(--muted); }
.table-wrap { overflow-x: auto; margin: 8px calc(-1 * var(--pad)) 0; padding: 0 var(--pad); }
.ladder-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ladder-table th { text-align: left; color: var(--muted); font-weight: 400; font-size: 11px; padding: 4px 4px 8px; }
.ladder-table td { padding: 9px 4px; border-top: 1px solid var(--stroke); white-space: nowrap; }
.ladder-table td:last-child, .ladder-table th:last-child { text-align: right; }
.st { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .06); color: var(--muted); }
.st.placed { color: var(--text); }
.st.tracking, .st.sold, .st.on { color: var(--good); background: color-mix(in srgb, var(--good) 12%, transparent); }
.st.ready { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.st.blocked { color: var(--bad); }

/* Switches */
.toggles { display: grid; margin: 6px 0 2px; }
.toggle-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 11px 0; border-top: 1px solid var(--stroke); cursor: pointer; }
.toggles .toggle-row:first-child { border-top: 0; }
.sub-card > .toggle-row:first-child { border-top: 0; padding-top: 0; }
.toggle-row.small { font-size: 12px; color: var(--muted); }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 99px; background: rgba(255, 255, 255, .12); position: relative; flex: none; padding: 0; border: 0; cursor: pointer; transition: background .25s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.switch:checked { background: var(--accent-grad); }
.switch:checked::after { transform: translateX(18px); }
.inline-row { display: flex; gap: 12px; }
.inline-row label { flex: 1; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.devices { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.devices li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--stroke); border-radius: 14px; font-size: 13px; }
.devices li .muted { font-size: 11px; }
.devices button { background: none; border: 0; color: var(--bad); font-size: 12px; padding: 0; }
.sub-card { padding: 14px 0; border-top: 1px solid var(--stroke); }
.sub-card:first-child { border-top: 0; padding-top: 4px; }

/* ---------- menu drawer (slides with transform only) ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 20; background: rgba(5, 3, 6, .55); opacity: 0; pointer-events: none;
  transition: opacity .22s var(--ease);
}
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 21; width: min(300px, 85vw);
  display: flex; flex-direction: column; gap: 8px; padding: calc(14px + env(safe-area-inset-top)) 14px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #151116 0%, #0e0c10 100%); border-right: 1px solid var(--stroke);
  border-radius: 0 26px 26px 0; transform: translateX(-104%); transition: transform .22s var(--ease); touch-action: pan-y;
}
.drawer.dragging { transition: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 14px; }
.drawer-nav, .drawer-foot { display: grid; gap: 4px; }
.drawer-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--stroke); }
.drawer-item {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px; padding: 13px 16px; border: 0; border-radius: 16px;
  background: none; color: var(--muted); font-size: 15px; text-align: left; transition: color .2s, transform .12s var(--ease);
}
.drawer-item::before { content: ''; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #6b4a62 0%, rgba(74, 52, 69, .35) 70%, transparent 100%); opacity: 0; transition: opacity .25s var(--ease); z-index: -1; }
.drawer-item.on { color: var(--text); }
.drawer-item.on::before { opacity: 1; }
.drawer-item:active { transform: scale(.98); }
.app.drawer-open .scrim { opacity: 1; pointer-events: auto; }
.app.drawer-open .drawer { transform: translateX(0); transition-duration: .3s; }

/* ---------- options sheet (full screen, slides up) ---------- */
.sheet {
  position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; background: var(--bg);
  transform: translateY(100%); visibility: hidden; transition: transform .24s var(--ease), visibility 0s .24s;
}
.sheet::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70vmax 50vmax at 100% 0%, color-mix(in srgb, var(--glow) 45%, transparent), transparent 70%); }
.app.sheet-open .sheet { transform: translateY(0); visibility: visible; transition: transform .32s var(--ease), visibility 0s; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: calc(12px + env(safe-area-inset-top)) var(--pad) 12px; }
.sheet-head h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px var(--pad) calc(24px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) {
  .sheet-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 0 var(--gap); align-content: start; max-width: 1200px; width: 100%; margin: 0 auto; }
}
.opt .card-title { margin-bottom: 6px; }

/* ---------- first-load motion ---------- */
.rise { opacity: 0; }
body.loaded .rise { animation: rise .26s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition-duration: 0s !important; scroll-behavior: auto !important; }
}
