/*
 * Liquid glass: one shared look for the wallet picker and the terms consent dialog (owner, 2026-10-20).
 *
 *   .glass-ovl   the overlay: a light dim plus a blur of the page behind
 *   .glass       the panel: a deep surface at ~84 % alpha (90 % light), blurred and saturated, a hairline border
 *                with a light highlight along the top, a soft large shadow, 28 px radius
 *   .glass-tile  a row or list item inside a panel: a lighter glass tile; a teal glow on hover and focus
 *   .glass-btn   a secondary button: glass outline (the primary teal button stays as it is)
 *
 * Contrast (test/launch-wallets.test.tsx and test/dialog-glass.test.ts read the numbers below): text on the panel and
 * on its tiles is at least 4.5:1 with the page behind at its darkest (black) and its lightest (white), seen through
 * the overlay. Inside a panel the muted text colours are swapped for the lighter (dark theme) or darker (light theme)
 * `--glass-muted` and `--glass-ink-2`, which keep that ratio.
 *
 * Fallbacks: `prefers-reduced-transparency` and browsers without `backdrop-filter` get a solid panel and overlay;
 * `prefers-reduced-motion` gets no animated blur or glow. Phones keep the bottom sheet (wallet.css, terms.css).
 *
 * Every dialog, sheet and popover of the app wears this glass through the shared frame (glass-sheet.css: `.gsovl`,
 * `.gsheet`, `.gpop`), so its look is tuned here once. Since 2026-10-29 (owner: "a bit darker to match the website
 * vibe") the panel is deeper (`--glass-bg`, `--glass-solid`), the sheen and the top highlight are fainter and the page
 * behind is dimmed more (`--glass-ovl`); the light theme is a touch deeper too, within the contrast above.
 *
 * The motion and sheen tokens below (`--lk-*`, named for the lock sheets where they began) and the keyframes at the end
 * are shared by the glass sheets (glass-sheet.css: the lock and trade sheets) and the glass cards on the page (lock.css).
 */
:root{
  --glass-bg:rgba(14,15,17,.84);
  --glass-accent:#4DD4C4;
  --glass-solid:#121315;
  --glass-tile:rgba(255,255,255,.045);
  --glass-tile-hover:rgba(255,255,255,.08);
  --glass-tile-deep:rgba(255,255,255,.10);
  --glass-line:rgba(255,255,255,.10);
  --glass-highlight:rgba(255,255,255,.12);
  --glass-edge:rgba(255,255,255,.03);
  --glass-ovl:rgba(5,6,8,.52);
  --glass-ovl-solid:rgba(5,6,8,.84);
  --glass-ovl-blur:blur(10px) saturate(140%);
  --glass-ink:#F3F4F4;
  --glass-ink-2:#D3D4D7;
  --glass-muted:#B4B5BB;
  --glass-shadow:0 30px 80px -20px rgba(0,0,0,.75),0 12px 32px -18px rgba(0,0,0,.55);
  --glass-shadow-pop:0 24px 56px -18px rgba(0,0,0,.7),0 6px 18px -10px rgba(0,0,0,.45);
  --glass-glow:rgba(77,212,196,.55);
  --glass-blur:blur(24px) saturate(160%);
}
:root{
  --lk-spring:cubic-bezier(.34,1.42,.64,1);
  --lk-ease:cubic-bezier(.32,.72,0,1);
  --lk-sheen:rgba(255,255,255,.045);
  --lk-tint:rgba(77,212,196,.10);
  --lk-box:rgba(255,255,255,.40);
  --lk-ring:rgba(10,10,11,.75);
  --lk-gloss:.30;
  --lk-inset:rgba(0,0,0,.28);
}
:root[data-theme="light"]{
  --lk-sheen:rgba(255,255,255,.42);
  --lk-tint:rgba(8,119,107,.07);
  --lk-box:rgba(13,22,24,.45);
  --lk-ring:rgba(255,255,255,.9);
  --lk-gloss:.14;
  --lk-inset:rgba(13,22,24,.08);
}
:root[data-theme="light"]{
  --glass-bg:rgba(246,248,248,.90);
  --glass-accent:#066A5F;
  --glass-solid:#F5F7F7;
  --glass-tile:rgba(255,255,255,.55);
  --glass-tile-hover:rgba(255,255,255,.85);
  --glass-tile-deep:rgba(13,22,24,.08);
  --glass-line:rgba(13,22,24,.12);
  --glass-highlight:rgba(255,255,255,.9);
  --glass-edge:rgba(255,255,255,.5);
  --glass-ovl:rgba(13,22,24,.26);
  --glass-ovl-solid:rgba(13,22,24,.58);
  --glass-ink:#0D1618;
  --glass-ink-2:#33403F;
  --glass-muted:#46524F;
  --glass-shadow:0 30px 80px -24px rgba(13,22,24,.40),0 10px 30px -18px rgba(13,22,24,.28);
  --glass-shadow-pop:0 22px 50px -20px rgba(13,22,24,.32),0 4px 14px -8px rgba(13,22,24,.18);
  --glass-glow:rgba(8,119,107,.45);
}

/* ---------- overlay ---------- */
.ovl.glass-ovl{background:radial-gradient(70% 55% at 50% 35%,var(--lk-tint),transparent 70%),var(--glass-ovl);
  -webkit-backdrop-filter:var(--glass-ovl-blur);backdrop-filter:var(--glass-ovl-blur)}

/* ---------- panel ---------- */
.glass{
  --muted:var(--glass-muted);--ink-2:var(--glass-ink-2);--ink:var(--glass-ink);--accent:var(--glass-accent);
  color:var(--glass-ink);
  background:linear-gradient(180deg,var(--glass-highlight),transparent 1.5px),var(--glass-bg);
  -webkit-backdrop-filter:var(--glass-blur);backdrop-filter:var(--glass-blur);
  border:1px solid var(--glass-line);border-radius:28px;
  box-shadow:inset 0 1px 0 var(--glass-highlight),var(--glass-shadow);
  background-clip:padding-box;
}
.glass :focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- tiles (rows, list items, the account row) ---------- */
.glass .glass-tile{background:var(--glass-tile);border:1px solid var(--glass-line);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.05);
  transition:border-color .18s ease,box-shadow .18s ease,background .18s ease}
.glass .glass-tile:is(a,button):not(:disabled):hover,.glass .glass-tile:is(a,button):focus-visible{
  background:var(--glass-tile-hover);border-color:var(--glass-glow);
  box-shadow:0 0 0 1px var(--glass-glow),0 8px 28px -12px var(--glow)}
.glass .glass-tile:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- secondary button: glass outline ---------- */
.glass .glass-btn{background:var(--glass-tile);color:var(--glass-ink);border:1px solid var(--glass-line);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}
.glass .glass-btn:not(:disabled):hover{border-color:var(--glass-glow);background:var(--glass-tile-hover);box-shadow:0 0 18px -8px var(--glow)}

/* ---------- a "coming soon" row: greyed, no hover ---------- */
.glass .glass-tile.is-soon,.glass .glass-tile.is-soon:hover{background:transparent;border-style:dashed;box-shadow:none;cursor:default;transform:none}
.glass .glass-tile.is-soon > *{opacity:.6}
.glass .glass-tile.is-soon img{filter:grayscale(1)}

/* ---------- accessibility fallbacks: a solid panel ---------- */
@supports not ((-webkit-backdrop-filter:blur(1px)) or (backdrop-filter:blur(1px))){
  .ovl.glass-ovl{background:var(--glass-ovl-solid)}
  .glass{background:var(--glass-solid)}
}
@media (prefers-reduced-transparency:reduce){
  .ovl.glass-ovl{background:var(--glass-ovl-solid);-webkit-backdrop-filter:none;backdrop-filter:none}
  .glass{background:var(--glass-solid);-webkit-backdrop-filter:none;backdrop-filter:none}
  .glass .glass-btn{-webkit-backdrop-filter:none;backdrop-filter:none}
}
@media (prefers-reduced-motion:reduce){
  .ovl.glass-ovl,.glass{animation:none}
  .glass .glass-tile,.glass .glass-btn{transition:none}
  .glass .glass-tile:is(a,button):not(:disabled):hover{box-shadow:0 0 0 1px var(--glass-glow)}
}

/* ---------- shared motion: rise in on a spring, glide in, pop, a halo, a drawn tick, a due pulse ---------- */
@keyframes lkrise{0%{opacity:0;transform:translateY(22px) scale(.95)}60%{opacity:1}100%{opacity:1;transform:none}}
@keyframes lkin{from{opacity:0;transform:translateY(10px) scale(.985);filter:blur(4px)}to{opacity:1;transform:none;filter:none}}
@keyframes lkup{from{transform:translateY(100%)}to{transform:none}}
@keyframes lkpop{from{opacity:0;transform:scale(.55)}to{opacity:1;transform:none}}
@keyframes lkhalo{0%{opacity:.6;transform:scale(.9)}100%{opacity:0;transform:scale(1.6)}}
@keyframes lkdraw{to{stroke-dashoffset:0}}
@keyframes lkdue{0%{box-shadow:0 0 0 0 var(--glow)}70%{box-shadow:0 0 0 7px transparent}100%{box-shadow:0 0 0 0 transparent}}
