/* ================================================================ tokens */
:root {
  color-scheme: dark;

  --bg:        #191d24;
  --bg-2:      #1e232c;
  --panel:     #232935;
  --panel-2:   #2a3140;
  --line:      #343c4d;
  --line-soft: #2a3140;

  --text:  #eef1f6;
  --dim:   #98a2b6;
  --faint: #6d7688;

  --blue:     #5b7cff;
  --blue-2:   #4665ee;
  --blue-ink: #0d1330;
  --blue-wash: rgba(91, 124, 255, 0.12);

  --sand:      #e0bc8b;
  --sand-wash: rgba(224, 188, 139, 0.12);

  --green: #4fce93;
  --red:   #f0705e;

  --display: 'Space Grotesk', 'IBM Plex Sans', system-ui, sans-serif;
  --sans:    'IBM Plex Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono:    ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;

  --r-hero: 22px;
  --r-card: 14px;
  --r-ctrl: 10px;
  --pill:   999px;

  --rail: 248px;
  --tabbar: 60px;

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --bg:        #f1f3f6;
    --bg-2:      #ffffff;
    --panel:     #ffffff;
    --panel-2:   #f4f6fa;
    --line:      #dbe0e9;
    --line-soft: #e6eaf1;

    --text:  #161a22;
    --dim:   #5b6476;
    --faint: #868fa1;

    --blue:     #2c4bdc;
    --blue-2:   #2440c2;
    --blue-ink: #ffffff;
    --blue-wash: rgba(44, 75, 220, 0.09);

    --sand:      #8a5f22;
    --sand-wash: rgba(138, 95, 34, 0.10);

    --green: #1c8b5d;
    --red:   #c2412d;
  }
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.018em;
}

a { color: var(--blue); }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 6px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--panel); color: var(--text);
  padding: .7rem 1rem; border-radius: 0 0 var(--r-ctrl) 0;
}
.skip:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ================================================================ shell */
.shell { display: block; }

main {
  max-width: 1080px;
  margin: 0 auto;
  padding:
    1.1rem calc(1.15rem + var(--sar))
    calc(var(--tabbar) + var(--sab) + 2.2rem)
    calc(1.15rem + var(--sal));
}

.panel { display: none; }
.panel.active { display: block; }

/* ---- mobile top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .7rem;
  padding: calc(var(--sat) + .55rem) calc(1.15rem + var(--sar)) .55rem calc(1.15rem + var(--sal));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line-soft);
}

.mark {
  width: 34px; height: 34px; flex: none;
  border-radius: 11px;
  display: grid; place-items: center;
  background: var(--blue);
  color: var(--blue-ink);
}
.mark svg { width: 20px; height: 20px; display: block; }

.id-text { min-width: 0; margin-right: auto; }
.id-text b {
  display: block; font-family: var(--display); font-weight: 600;
  font-size: 1rem; line-height: 1.25; letter-spacing: -0.01em;
}
.addr-chip {
  display: block; font-family: var(--mono);
  font-size: .74rem; color: var(--faint); line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.round {
  width: 38px; height: 38px; flex: none;
  border-radius: var(--pill);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--dim);
  display: grid; place-items: center;
  cursor: pointer;
}
.round svg { width: 18px; height: 18px; }
.round:active { background: var(--panel-2); }
.round.spin svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- desktop rail ---- */
.rail { display: none; }

/* ---- mobile tab bar ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding-bottom: var(--sab);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  border-top: 1px solid var(--line-soft);
}
.tabbar button {
  appearance: none; background: none; border: none; cursor: pointer;
  height: var(--tabbar);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--faint); font-size: .68rem; font-weight: 500;
  letter-spacing: .01em;
}
.tabbar button svg { width: 21px; height: 21px; }
.tabbar button[aria-current='true'] { color: var(--blue); }

/* ================================================================ hero */
.hero {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-hero);
  background: var(--bg-2);
  padding: 1.4rem 1.25rem 1.3rem;
  margin-bottom: 1.9rem;
}

.seal {
  display: inline-flex; align-items: center; gap: .45rem;
  margin: 0 0 1rem;
  font-size: .8rem; font-weight: 600; line-height: 1;
  padding: .42rem .8rem .42rem .68rem;
  border-radius: var(--pill);
  border: 1px solid transparent;
}
.seal::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: currentColor; flex: none;
}
.seal.locked { color: var(--sand); background: var(--sand-wash); border-color: color-mix(in srgb, var(--sand) 35%, transparent); }
.seal.open   { color: var(--green); background: color-mix(in srgb, var(--green) 12%, transparent); border-color: color-mix(in srgb, var(--green) 35%, transparent); }

.balance {
  font-family: var(--display);
  font-size: clamp(2.9rem, 13vw, 4.6rem);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 .5rem;
}
.balance small {
  display: block;
  font-family: var(--sans);
  font-size: .95rem; font-weight: 500; color: var(--dim);
  letter-spacing: 0; margin-top: .35rem;
}

.hero-sub { color: var(--dim); margin: 0 0 1.4rem; max-width: 56ch; font-size: .93rem; }
.hero-sub b { color: var(--text); font-weight: 600; }

.track {
  position: relative;
  height: 4px; border-radius: var(--pill);
  background: var(--line-soft);
}
.track i {
  position: absolute; inset: 0 auto 0 0;
  border-radius: var(--pill);
  background: var(--blue);
  width: 0;
}
.track b {
  position: absolute; top: 50%; left: 0;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--bg-2);
  transform: translate(-50%, -50%);
}
.track-marks {
  display: flex; justify-content: space-between; gap: 1rem;
  margin-top: .6rem; font-size: .78rem; color: var(--faint);
}

.hero-actions { display: flex; flex-direction: column; gap: .55rem; margin: 1.5rem 0 0; }

.bubbles {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem; margin: 1.4rem 0 0;
}
.bubble {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-ctrl);
  padding: .7rem .85rem;
}
.bubble dt { font-size: .74rem; color: var(--dim); margin-bottom: .1rem; }
.bubble dd { margin: 0; font-family: var(--display); font-size: 1.22rem; font-weight: 600; letter-spacing: -0.02em; }
.bubble:last-child:nth-child(odd) { grid-column: 1 / -1; }

.scan-line { margin: 1.1rem 0 0; font-size: .76rem; color: var(--faint); }

/* ================================================================ buttons */
.btn {
  appearance: none; border: 1px solid transparent; cursor: pointer;
  border-radius: var(--r-ctrl);
  padding: .78rem 1.3rem;
  font-size: .93rem; font-weight: 600;
  background: var(--blue); color: var(--blue-ink);
  transition: background .13s;
}
.btn:hover { background: var(--blue-2); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.quiet {
  background: var(--panel); color: var(--text); border-color: var(--line);
}
.btn.quiet:hover { background: var(--panel-2); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { filter: brightness(.94); }

.quiet-btn {
  appearance: none; background: none; border: none; cursor: pointer;
  color: var(--dim); font-size: .87rem; font-weight: 500;
  padding: .5rem .1rem; text-align: left;
}
.quiet-btn:hover { color: var(--text); }

.linkbtn {
  background: none; border: none; cursor: pointer;
  color: var(--blue); font-weight: 600; font-size: .87rem;
  padding: .3rem .1rem; text-decoration: none;
}
.linkbtn:hover { text-decoration: underline; }
.linkbtn.faint { color: var(--faint); }

.mobile-out { margin: 2.4rem 0 0; }

/* ================================================================ sections */
.section-head {
  display: flex; align-items: baseline; gap: .8rem;
  margin-bottom: .9rem; flex-wrap: wrap;
}
.section-head.spaced { margin-top: 2.2rem; }
.section-head h2 { font-size: 1.12rem; }
.section-head p { margin: 0; color: var(--dim); font-size: .85rem; }
.section-head .spacer { margin-left: auto; }

.card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  padding: 1.1rem 1.15rem 1.25rem;
  margin-bottom: 1.1rem;
}
.card header { display: flex; align-items: baseline; gap: .7rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card header h3 { font-size: .98rem; }
.card header p { margin: 0; color: var(--dim); font-size: .82rem; }
.card header .spacer { margin-left: auto; }

.figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
  gap: .55rem; margin: 0 0 1.6rem;
}
.figure {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-ctrl);
  padding: .8rem .9rem;
}
.figure dt { font-size: .75rem; color: var(--dim); margin-bottom: .12rem; }
.figure dd { margin: 0; font-family: var(--display); font-size: 1.3rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.figure .delta { font-family: var(--sans); font-size: .75rem; font-weight: 500; display: block; letter-spacing: 0; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.delta.flat { color: var(--faint); }

/* ================================================================ charts */
.bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: 160px; padding: 0 1px;
  border-bottom: 1px solid var(--line-soft);
}
.bar-col { flex: 1 1 0; height: 100%; display: flex; align-items: flex-end; min-width: 2px; }
.bar-col i {
  display: block; width: 100%; border-radius: 3px 3px 1px 1px;
  background: var(--blue);
}
.bar-col:hover i { background: var(--blue-2); }
.bar-col.empty-day i { background: var(--line); }
.bars-axis {
  display: flex; gap: 3px; margin-top: .5rem;
  font-size: .66rem; color: var(--faint);
}
.bars-axis b { flex: 1 1 0; min-width: 2px; font-weight: 500; text-align: center; white-space: nowrap; }

.dow-row { display: flex; align-items: center; gap: .7rem; margin-bottom: .5rem; }
.dow-row:last-child { margin-bottom: 0; }
.dow-name { width: 32px; flex: none; color: var(--dim); font-size: .81rem; }
.dow-row .track { flex: 1; height: 8px; border-radius: var(--pill); background: var(--line-soft); position: relative; }
.dow-row .track i { position: absolute; inset: 0 auto 0 0; height: 100%; border-radius: var(--pill); background: var(--blue); }
.dow-val { width: 80px; flex: none; text-align: right; font-weight: 600; font-size: .84rem; }

.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.heat span { aspect-ratio: 1; background: var(--line-soft); border-radius: 3px; }
.heat-axis { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; font-size: .6rem; color: var(--faint); margin-top: .4rem; }
.heat-axis b { font-weight: 500; text-align: center; }
.heat-key { display: flex; align-items: center; gap: .5rem; margin-top: .9rem; font-size: .74rem; color: var(--faint); }
.heat-key i {
  flex: 1; height: 6px; border-radius: var(--pill);
  background: linear-gradient(90deg, var(--line-soft), var(--blue));
}

.two-up { display: grid; grid-template-columns: 1fr; gap: 1.1rem; }

/* ================================================================ controls */
.seg {
  display: inline-flex; gap: 2px;
  background: var(--panel-2); border-radius: var(--pill); padding: 3px;
}
.seg button {
  background: none; border: none; border-radius: var(--pill);
  padding: .3rem .72rem; color: var(--dim); cursor: pointer;
  font-weight: 500; font-size: .8rem;
}
.seg button[aria-pressed='true'] { background: var(--blue); color: var(--blue-ink); font-weight: 600; }

label { display: block; font-size: .82rem; color: var(--dim); margin-bottom: .35rem; }
input[type='text'], input[type='number'], input[type='password'], select, textarea {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  padding: .7rem .8rem;
  color: var(--text);
  font-size: 16px; /* keeps iOS from zooming on focus */
}
input:focus, select:focus { border-color: var(--blue); }
input::placeholder { color: var(--faint); }
#r-dest, #r-amount { font-family: var(--mono); font-size: 15px; }
#do-release { width: 100%; margin-top: .3rem; }
.field { margin-bottom: .9rem; }
.field-row { display: grid; grid-template-columns: 1fr; gap: .9rem; }

/* ================================================================ tables */
.table-wrap {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-card);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--panel);
}
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .65rem .85rem; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
th { font-size: .76rem; color: var(--dim); font-weight: 500; }
tbody tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; }
.mono { font-family: var(--mono); font-size: .8rem; color: var(--dim); }

.tag {
  display: inline-block; font-size: .72rem; font-weight: 500;
  padding: .1rem .55rem; border-radius: var(--pill);
  border: 1px solid var(--line); color: var(--dim);
}
.tag + .tag { margin-left: .3rem; }
.tag.blue  { color: var(--blue); border-color: color-mix(in srgb, var(--blue) 38%, transparent); background: var(--blue-wash); }
.tag.up    { color: var(--green); border-color: color-mix(in srgb, var(--green) 38%, transparent); }
.tag.down  { color: var(--red); border-color: color-mix(in srgb, var(--red) 38%, transparent); }

.empty { padding: 2.4rem 1rem; text-align: center; color: var(--dim); white-space: normal; }
.empty strong { display: block; color: var(--text); font-family: var(--display); font-size: 1.05rem; margin-bottom: .25rem; }

/* stacked rows on small screens */
@media (max-width: 680px) {
  .stack table, .stack tbody, .stack tr, .stack td { display: block; width: 100%; }
  .stack thead { display: none; }
  .stack tr { padding: .55rem .9rem; border-bottom: 1px solid var(--line-soft); }
  .stack tr:last-child { border-bottom: none; }
  .stack td {
    border: none; padding: .16rem 0; white-space: normal;
    display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  }
  .stack td::before {
    content: attr(data-label);
    color: var(--dim); font-size: .8rem; flex: none;
  }
  .stack td.num { text-align: right; }
  .stack td.empty { display: block; }
  .stack td.empty::before { content: none; }
}

/* ================================================================ notices */
.notice {
  padding: .75rem .9rem; border-radius: var(--r-ctrl);
  margin-bottom: .9rem; font-size: .88rem;
  overflow-wrap: anywhere;
}
.notice.error { background: color-mix(in srgb, var(--red) 12%, transparent); border: 1px solid color-mix(in srgb, var(--red) 40%, transparent); color: var(--red); }
.notice.ok    { background: color-mix(in srgb, var(--green) 12%, transparent); border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); color: var(--green); }

.callout {
  border-radius: var(--r-card);
  padding: 1.1rem 1.15rem;
  margin-bottom: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--sand);
}
.callout.open { border-left-color: var(--green); }
.callout h3 { font-size: 1rem; margin-bottom: .3rem; }
.callout p { margin: 0 0 .3rem; color: var(--dim); max-width: 60ch; }
.countdown {
  font-family: var(--display); font-size: 1.9rem; font-weight: 600;
  color: var(--text); letter-spacing: -0.025em; margin-top: .5rem;
}

/* ================================================================ sheet */
.scrim {
  position: fixed; inset: 0; z-index: 80;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(6, 8, 13, .6);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.scrim[hidden] { display: none; }

.sheet {
  width: 100%; max-height: 92vh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  padding: .7rem 1.25rem calc(1.25rem + var(--sab));
  text-align: center;
  animation: rise .24s cubic-bezier(.32, .72, 0, 1);
}
@keyframes rise { from { transform: translateY(18px); opacity: .6; } }

.grabber {
  display: block; width: 38px; height: 4px; border-radius: var(--pill);
  background: var(--line); margin: 0 auto 1.1rem;
}
.sheet h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.sheet p.lede { color: var(--dim); margin: 0 0 1.2rem; font-size: .9rem; }

.qr-holder {
  width: 200px; height: 200px; margin: 0 auto 1.1rem;
  background: #fff; border-radius: 16px; padding: 12px;
  display: grid; place-items: center;
}
.qr-holder canvas, .qr-holder img { width: 100% !important; height: 100% !important; display: block; }
.qr-holder.hidden { display: none; }

.addr-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-ctrl);
  padding: .85rem 1rem;
  margin: 0 auto .55rem;
  max-width: 22rem;
  font-family: var(--mono);
  font-size: .93rem;
  line-height: 1.65;
  letter-spacing: .01em;
  text-align: center;
  word-break: break-all;
  cursor: pointer;
  user-select: all;
  -webkit-user-select: all;
}
.addr-box:hover { border-color: var(--blue); }
.addr-box .edge { color: var(--blue); font-weight: 600; }

.addr-verify { margin: 0 0 1.1rem; font-size: .78rem; color: var(--faint); }
.addr-verify b { font-family: var(--mono); color: var(--dim); font-weight: 600; }

.sheet .btn { width: 100%; margin-bottom: .55rem; }
.sheet-note { color: var(--faint); font-size: .8rem; margin: .8rem 0 0; }

body.sheet-open { overflow: hidden; }

/* ---- deposit detail ---- */
.sheet.detail { text-align: left; }

.sr-title {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.detail-head {
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: .3rem;
}
.detail-amount {
  margin: 0;
  font-family: var(--display);
  font-size: 2.1rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1;
}
.detail-amount small { font-family: var(--sans); font-size: .95rem; font-weight: 500; color: var(--dim); margin-left: .4rem; }
.detail-tags { margin: .55rem 0 0; }

.detail-rows { margin: 0; }
.detail-rows > div {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 1.25rem; padding: .6rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.detail-rows > div:last-child { border-bottom: none; }
.detail-rows dt { color: var(--dim); font-size: .84rem; flex: none; }
.detail-rows dd {
  margin: 0; text-align: right; min-width: 0;
  overflow-wrap: anywhere; font-size: .89rem;
}
.detail-rows dd.mono { font-family: var(--mono); font-size: .8rem; color: var(--text); }
.detail-rows dd button.copy {
  display: block; margin-left: auto; margin-top: .2rem;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--blue); font-size: .78rem; font-weight: 600;
}
.detail-rows dd button.copy:hover { text-decoration: underline; }

#detail-links { margin-top: 1.1rem; display: flex; flex-direction: column; gap: .5rem; }
.extlink {
  display: flex; align-items: center; justify-content: space-between; gap: .8rem;
  padding: .72rem .9rem;
  border: 1px solid var(--line); border-radius: var(--r-ctrl);
  background: var(--panel); color: var(--text);
  font-size: .9rem; font-weight: 500; text-decoration: none;
}
.extlink:hover { border-color: var(--blue); color: var(--blue); }
.extlink span:last-child { color: var(--faint); font-size: .8rem; }
.extlink:hover span:last-child { color: var(--blue); }

#close-detail { display: block; width: 100%; margin-top: 1rem; text-align: center; }

/* rows that open a record */
tbody tr.pick { cursor: pointer; }
tbody tr.pick:hover { background: var(--panel-2); }
tbody tr.pick:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }

/* ================================================================ toast */
#toast {
  position: fixed; left: 50%; z-index: 90;
  bottom: calc(var(--tabbar) + var(--sab) + 1rem);
  transform: translateX(-50%) translateY(10px);
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line);
  padding: .7rem 1.15rem; border-radius: var(--pill);
  font-size: .88rem; font-weight: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .18s, transform .18s;
  max-width: 90vw; text-align: center;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .3);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ================================================================ login */
body.login-page {
  display: grid; place-items: center; min-height: 100svh;
  padding: calc(var(--sat) + 1.25rem) 1.25rem calc(var(--sab) + 1.25rem);
}
.login-card {
  width: min(390px, 100%);
  padding: 2rem 1.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-hero);
}
.login-card .mark { width: 46px; height: 46px; border-radius: 14px; margin-bottom: 1.1rem; }
.login-card .mark svg { width: 26px; height: 26px; }
.login-card h1 { font-size: 1.5rem; margin-bottom: .25rem; letter-spacing: -0.03em; }
.login-card p.lede { color: var(--dim); margin: 0 0 1.6rem; font-size: .92rem; }
.login-card .btn { width: 100%; margin-top: .3rem; }

/* ================================================================ desktop */
@media (min-width: 900px) {
  body { font-size: 15px; }

  .topbar { display: none; }
  .tabbar { display: none; }
  .mobile-out { display: none; }

  .shell {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, 1fr);
    align-items: start;
  }

  .rail {
    display: flex; flex-direction: column;
    position: sticky; top: 0;
    height: 100vh; height: 100svh;
    padding: 1.5rem 1rem 1.4rem calc(1.4rem + var(--sal));
    border-right: 1px solid var(--line-soft);
  }
  .rail-id { display: flex; align-items: center; gap: .6rem; margin-bottom: 2rem; padding: 0 .35rem; }

  .rail-nav { display: flex; flex-direction: column; gap: 2px; }
  .rail-nav button {
    display: flex; align-items: center; gap: .7rem;
    background: none; border: none; cursor: pointer;
    padding: .6rem .7rem; border-radius: var(--r-ctrl);
    color: var(--dim); font-size: .92rem; font-weight: 500; text-align: left;
  }
  .rail-nav button svg { width: 19px; height: 19px; flex: none; }
  .rail-nav button:hover { background: var(--panel); color: var(--text); }
  .rail-nav button[aria-current='true'] { background: var(--blue-wash); color: var(--blue); font-weight: 600; }

  .rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; padding: 0 .7rem; }

  main { padding: 2.4rem 2.2rem 5rem; margin: 0; max-width: 1000px; }

  .hero { padding: 1.9rem 2rem 1.8rem; margin-bottom: 2.4rem; }
  .seal { margin-bottom: 1.2rem; }
  .balance { font-size: clamp(3.4rem, 5.4vw, 4.6rem); }
  .hero-actions { margin-top: 1.7rem; }
  .hero-actions .btn { flex: 0 0 auto; }
  .bubbles { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .6rem; margin-top: 1.7rem; }
  .bubble:last-child:nth-child(odd) { grid-column: auto; }

  .two-up { grid-template-columns: 1fr 1fr; gap: 1.1rem; }
  .figures { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
  .balance small { display: inline; font-size: .95rem; margin: 0 0 0 .55rem; }
  .hero-actions { flex-direction: row; gap: .6rem; }
  #release-form, #release-gate { max-width: 640px; }
  #do-release { width: auto; }
  .bars { height: 190px; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .card { padding: 1.25rem 1.4rem 1.4rem; }

  .scrim { align-items: center; padding: 1.5rem; }
  .sheet {
    width: min(430px, 100%);
    border-radius: 20px;
    border-bottom: 1px solid var(--line);
    padding: 1.6rem 1.6rem 1.5rem;
    animation: none;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  }
  .grabber { display: none; }

  #toast { bottom: 1.6rem; }
}

@media (min-width: 1400px) {
  main { max-width: 1120px; }
}
