@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url(/fonts/manrope-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #ffffff;
  --bg-2: #f3f5f3;
  --ink: #0b0d0b;
  --ink-2: #5c655c;
  --ink-3: #6b746b;
  --line: #e6e9e6;
  --green: #00c22d;
  --green-ink: #008a20;
  --green-soft: #e3f8e8;
  --coral: #ff4d3a;
  --coral-ink: #c9301f;
  --coral-soft: #ffe8e4;
  --on-accent: #062a10;
  --shadow: 0 10px 30px -12px rgba(11, 13, 11, .35);
  --r: 20px;
  --r-s: 14px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0d0b;
    --bg-2: #161a16;
    --ink: #f4f6f4;
    --ink-2: #a3ada3;
    --ink-3: #8a938a;
    --line: #242a24;
    --green: #16d63f;
    --green-ink: #4de86d;
    --green-soft: #0f2a16;
    --coral: #ff5a47;
    --coral-ink: #ff8a7c;
    --coral-soft: #3a1612;
    --on-accent: #061a0a;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .8);
  }
}
:root[data-theme="dark"] {
    --bg: #0b0d0b;
    --bg-2: #161a16;
    --ink: #f4f6f4;
    --ink-2: #a3ada3;
    --ink-3: #8a938a;
    --line: #242a24;
    --green: #16d63f;
    --green-ink: #4de86d;
    --green-soft: #0f2a16;
    --coral: #ff5a47;
    --coral-ink: #ff8a7c;
    --coral-soft: #3a1612;
    --on-accent: #061a0a;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .8);
  }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 500 16px/1.4 Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-feature-settings: "tnum" 1, "ss01" 1;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
.ic { width: 24px; height: 24px; flex: none; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; border-radius: 8px; }

/* ---------- shell ---------- */
.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100dvh;
  padding: calc(16px + var(--sat)) 16px calc(104px + var(--sab));
}
@media (min-width: 720px) and (max-width: 959px) {
  .app { max-width: 640px; padding-left: 24px; padding-right: 24px; }
}
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 48px; margin-bottom: 8px;
}
.top h1 { font-size: 20px; font-weight: 800; margin: 0; letter-spacing: -.02em; }
.top .me { display: flex; align-items: center; gap: 10px; font-weight: 700; padding: 4px 10px 4px 4px; border-radius: 999px; }
.top .me:hover { background: var(--bg-2); }
.iconbtn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: var(--ink); }
.iconbtn:hover { background: var(--bg-2); }

/* ---------- avatars ---------- */
.av {
  --s: 40px;
  width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: calc(var(--s) * .42); color: #fff; letter-spacing: 0;
  background: var(--c, var(--ink-3));
  text-shadow: 0 1px 0 rgba(0, 0, 0, .15);
}
.av.sm { --s: 28px; }
.av.lg { --s: 64px; }
.av.xl { --s: 88px; }
.avstack { display: flex; }
.avstack .av { margin-left: -8px; box-shadow: 0 0 0 2px var(--bg); }
.avstack .av:first-child { margin-left: 0; }

/* ---------- hero ---------- */
.hero { padding: 20px 0 8px; }
.hero .label { color: var(--ink-2); font-weight: 700; font-size: 15px; }
.hero .figure {
  font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -.035em; margin: 6px 0 2px;
  display: flex; align-items: baseline; gap: 2px;
}
.hero .figure .cents { font-size: 28px; letter-spacing: -.02em; }
.hero.owed .figure { color: var(--green-ink); }
.hero.owe .figure { color: var(--coral-ink); }
.hero.even .figure { color: var(--ink); }
.hero .sub { color: var(--ink-2); font-size: 14px; font-weight: 600; margin-top: 4px; }
.hero .sub strong { color: var(--ink); font-weight: 800; }

/* ---------- sections ---------- */
.section { margin-top: 20px; }
.section-h {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 0 0 10px; margin-top: 8px;
}
.section-h h2 { font-size: 17px; font-weight: 800; margin: 0; letter-spacing: -.01em; }
.section-h .link { color: var(--ink-2); font-weight: 700; font-size: 14px; padding: 6px 0; }
.section-h .link:hover { color: var(--ink); }

/* ---------- rows ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 12px 0; border-top: 1px solid var(--line); min-height: 64px;
  transition: background .15s var(--ease);
}
.row:first-child { border-top: 0; }
.row[role="button"], button.row, a.row { cursor: pointer; }
a.row:active, button.row:not([disabled]):active { transform: scale(.995); }
a.row:hover, button.row:not([disabled]):hover { background: var(--bg-2); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--r-s); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 800; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .d { color: var(--ink-2); font-size: 13.5px; font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .amt { font-weight: 800; font-size: 17px; letter-spacing: -.02em; text-align: right; white-space: nowrap; }
.row .amt small { display: block; font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: 0; margin-top: 2px; }
.pos { color: var(--green-ink); }
.neg { color: var(--coral-ink); }
.muted { color: var(--ink-3); }
.row.settled .t, .row.settled .amt { color: var(--ink-3); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; background: var(--bg-2); color: var(--ink-2); white-space: nowrap;
}
.chip.ok { background: var(--green-soft); color: var(--green-ink); }
.chip.due { background: var(--coral-soft); color: var(--coral-ink); }
.chip .ic { width: 14px; height: 14px; }

/* ---------- empty ---------- */
.empty { padding: 36px 16px; text-align: center; color: var(--ink-2); }
.empty .big { font-size: 40px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); margin-bottom: 6px; }
.empty p { margin: 0 0 16px; font-weight: 600; }
.boot-err { padding: 48px 16px; text-align: center; }
.boot-err p { color: var(--ink-2); font-weight: 600; margin: 8px 0 16px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 999px; font-weight: 800; font-size: 16px;
  background: var(--ink); color: var(--bg); transition: transform .12s var(--ease), opacity .15s;
  width: 100%;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--green); color: var(--on-accent); }
.btn.ghost { background: var(--bg-2); color: var(--ink); }
.btn.danger { background: var(--coral-soft); color: var(--coral-ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; width: auto; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after {
  content: ""; position: absolute; width: 20px; height: 20px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: 520px; margin: 0 auto;
  padding: 8px 24px calc(10px + var(--sab));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar[hidden] { display: none; }
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11.5px; font-weight: 800; color: var(--ink-3); padding: 6px 0; border-radius: 12px;
}
.tab.active { color: var(--ink); }
.fab {
  width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: var(--on-accent);
  display: flex; align-items: center; justify-content: center; margin: -22px auto 0;
  box-shadow: 0 10px 24px -8px rgba(0, 194, 45, .7); transition: transform .15s var(--ease);
}
.fab .ic { width: 28px; height: 28px; }
.fab:hover { transform: translateY(-2px); }
.fab:active { transform: scale(.94); }

/* ---------- sheet (dialog) ---------- */
.sheet {
  border: 0; padding: 0; margin: 0; background: transparent; color: inherit;
  width: 100%; max-width: 100%; max-height: 100dvh;
  position: fixed; inset: auto 0 0 0;
}
.sheet::backdrop { background: rgba(0, 0, 0, .45); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.sheet[open] { animation: rise .32s var(--ease); }
.sheet[open]::backdrop { animation: fade .25s ease-out; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-body {
  background: var(--bg); color: var(--ink);
  border-radius: 28px 28px 0 0; max-width: 520px; margin: 0 auto;
  padding: 10px 20px calc(20px + var(--sab)); max-height: 92dvh; overflow: auto;
  box-shadow: 0 -10px 40px -20px rgba(0, 0, 0, .5);
}
@media (min-width: 720px) {
  .sheet { inset: 0; margin: auto; width: 480px; height: fit-content; }
  .sheet-body { border-radius: 28px; max-height: 88vh; }
}
.grab { width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 2px auto 14px; }
.sheet h2 { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.sheet .lead { color: var(--ink-2); font-weight: 600; margin: 0 0 18px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }

/* ---------- forms ---------- */
.field { margin: 14px 0; }
.field label, .field .lbl { display: block; font-size: 13px; font-weight: 800; color: var(--ink-2); margin-bottom: 8px; letter-spacing: .01em; }
.input {
  width: 100%; height: 52px; padding: 0 16px; border-radius: var(--r-s); border: 2px solid var(--line);
  background: var(--bg); font-weight: 700; font-size: 17px; transition: border-color .15s;
}
.input::placeholder { color: var(--ink-3); font-weight: 600; }
.input:focus { outline: none; border-color: var(--ink); }
.input.err { border-color: var(--coral); }
.amount {
  display: flex; align-items: baseline; justify-content: center; gap: 2px; padding: 10px 0 6px;
}
.amount .cur { font-size: 34px; font-weight: 800; color: var(--ink-3); }
.amount input {
  width: auto; max-width: 70%; min-width: 3ch; border: 0; background: none; text-align: left;
  font-size: 58px; font-weight: 800; letter-spacing: -.035em; padding: 0; outline: none; color: var(--ink);
  -moz-appearance: textfield;
}
.amount input::-webkit-outer-spin-button, .amount input::-webkit-inner-spin-button { -webkit-appearance: none; }
.amount input::placeholder { color: var(--ink-3); }
.pick { display: flex; gap: 10px; }
.pick .p {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px;
  border-radius: var(--r-s); border: 2px solid var(--line); font-size: 13px; font-weight: 800; color: var(--ink-2);
  transition: border-color .15s, background .15s, transform .12s var(--ease);
}
.pick .p .av { opacity: .55; transition: opacity .15s; }
.pick .p[aria-pressed="true"], .pick .p[aria-checked="true"] { border-color: var(--ink); color: var(--ink); background: var(--bg-2); }
.pick .p[aria-pressed="true"] .av, .pick .p[aria-checked="true"] .av { opacity: 1; }
.pick .p:active { transform: scale(.97); }
.seg { display: flex; background: var(--bg-2); border-radius: 999px; padding: 4px; }
.seg button {
  flex: 1; height: 40px; border-radius: 999px; font-weight: 800; font-size: 14px; color: var(--ink-2);
  transition: background .15s, color .15s, box-shadow .15s;
}
.seg button[aria-checked="true"] { background: var(--bg); color: var(--ink); box-shadow: 0 2px 8px -2px rgba(0,0,0,.2); }
.splits { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.splits .sr { display: flex; align-items: center; gap: 10px; }
.splits .sr .n { flex: 1; font-weight: 800; }
.splits .sr .input { width: 130px; height: 44px; text-align: right; }
.splits .sr .pct { width: 110px; }
.remain { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 800; color: var(--ink-2); margin-top: 10px; }
.remain.bad { color: var(--coral-ink); }
.remain.good { color: var(--green-ink); }
.err-msg { color: var(--coral-ink); font-weight: 700; font-size: 14px; margin: 6px 0 0; min-height: 1.2em; }
.actions { display: flex; gap: 10px; margin-top: 18px; }
.actions .btn { flex: 1; }

/* ---------- export ---------- */
.dates { display: flex; gap: 12px; }
.dates .field { flex: 1; margin: 6px 0; }
.input[type="date"] { -webkit-appearance: none; appearance: none; min-width: 0; }
.input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.btn.disabled { opacity: .45; pointer-events: none; }

/* ---------- pin / who ---------- */
.gate { min-height: calc(100dvh - 60px); display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 8px; }
.gate .mark { width: 72px; height: 72px; border-radius: 22px; background: var(--green); color: #fff; font-size: 40px; font-weight: 800; display: grid; place-items: center; margin-bottom: 8px; letter-spacing: -.04em; }
.gate h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.gate p { color: var(--ink-2); font-weight: 600; margin: 0 0 18px; }
.gate form { width: 100%; max-width: 320px; }
.pin { text-align: center; font-size: 30px; letter-spacing: .4em; height: 64px; font-weight: 800; }
.who { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 360px; margin-top: 8px; }
.who button {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 22px 10px;
  border-radius: var(--r); background: var(--bg-2); font-weight: 800; font-size: 17px;
  transition: transform .12s var(--ease), background .15s;
}
.who button:hover { background: var(--line); }
.who button:active { transform: scale(.96); }

/* ---------- detail ---------- */
.detail-hero { padding: 8px 0 12px; text-align: left; }
.detail-hero .t { font-size: 24px; font-weight: 800; letter-spacing: -.025em; }
.detail-hero .figure { font-size: 44px; font-weight: 800; letter-spacing: -.035em; margin: 4px 0; }
.detail-hero .meta { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-weight: 700; font-size: 14px; }
.share-row .st { display: flex; align-items: center; gap: 8px; }
.share-row .tick {
  width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--ink-3); display: grid; place-items: center; color: transparent; flex: none;
  transition: background .2s var(--ease), border-color .2s, color .2s;
}
.share-row.paid .tick { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.share-row.paid .tick .ic { width: 18px; height: 18px; }
.share-row.just-paid .tick { animation: pop .45s var(--ease); }
@keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.18); } 100% { transform: scale(1); } }
.share-row.covered .tick { border-style: dashed; }
.timeline { margin-top: 8px; }
.timeline .ev { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.timeline .ev:first-child { border-top: 0; }
.timeline .ev .when { color: var(--ink-3); font-weight: 700; white-space: nowrap; min-width: 92px; }
.timeline .ev .what { font-weight: 600; color: var(--ink-2); }
.timeline .ev .what b { color: var(--ink); font-weight: 800; }
details.acc summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-weight: 800; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary .ic { transition: transform .2s var(--ease); }
details.acc[open] summary .ic { transform: rotate(90deg); }
.note { background: var(--bg-2); border-radius: var(--r-s); padding: 12px 14px; font-weight: 600; color: var(--ink-2); margin-top: 8px; white-space: pre-wrap; }
.inline-confirm { display: flex; align-items: center; gap: 10px; background: var(--coral-soft); color: var(--coral-ink); padding: 12px 14px; border-radius: var(--r-s); font-weight: 800; margin-top: 10px; }
.inline-confirm .btn { height: 36px; font-size: 14px; width: auto; padding: 0 14px; }

/* ---------- methods ---------- */
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.methods button {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: var(--r-s); background: var(--bg-2); font-weight: 800; font-size: 16px;
  transition: transform .12s var(--ease), background .15s;
}
.methods button:hover { background: var(--line); }
.methods button:active { transform: scale(.97); }
.methods .ic { width: 30px; height: 30px; }
.m-cash_app .ic { color: #00c22d; } .m-zelle .ic { color: #6d1ed4; } .m-cash .ic { color: var(--ink); } .m-other .ic { color: var(--ink-2); }

/* ---------- history ---------- */
.search { position: relative; margin-bottom: 10px; }
.search .ic { position: absolute; left: 14px; top: 14px; color: var(--ink-3); }
.search .input { padding-left: 46px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { height: 34px; padding: 0 14px; border-radius: 999px; background: var(--bg-2); font-weight: 800; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chips .av { --s: 20px; font-size: 10px; }
.month { margin-top: 22px; }
.month .mh { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 6px; }
.month .mh h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); }
.month .mh .tot { font-weight: 800; color: var(--ink-2); font-size: 14px; }
.row.deleted .t { text-decoration: line-through; color: var(--ink-3); }

/* ---------- desktop ---------- */
.side { display: none; }
.row .when { display: none; }
@media (min-width: 960px) {
  body { background: var(--bg); }
  .shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100dvh; }
  .shell.full { grid-template-columns: minmax(0, 1fr); }
  .shell.full .app { max-width: 720px; margin: 0 auto; }
  .side {
    display: flex; flex-direction: column; gap: 10px; position: sticky; top: 0; height: 100dvh;
    padding: 28px 20px 24px; border-right: 1px solid var(--line); background: var(--bg-2);
  }
  .side[hidden] { display: none; }
  .brand { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; padding: 4px 8px 18px; }
  .brand .mark { width: 34px; height: 34px; border-radius: 10px; background: var(--green); color: var(--on-accent); display: grid; place-items: center; font-size: 20px; }
  .sidenav { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
  .sidelink { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; font-weight: 800; color: var(--ink-2); }
  .sidelink:hover { background: var(--line); color: var(--ink); }
  .sidelink.active { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.06); }
  .side .btn { margin-top: 4px; }
  .side-foot { margin-top: auto; }
  .side .me { display: flex; align-items: center; gap: 10px; font-weight: 800; padding: 8px 12px 8px 8px; border-radius: 999px; width: 100%; text-align: left; }
  .side .me:hover { background: var(--line); }
  .side .me small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 700; }
  .app { max-width: none; margin: 0; padding: 36px 48px 64px; box-shadow: none; min-height: auto; }
  .app > * { max-width: 1120px; }
  .tabbar { display: none; }
  .top .me, .top .iconbtn[href="#/history"] { display: none; }
  .top { height: 40px; margin-bottom: 16px; }
  .top h1 { font-size: 28px; }
  .home-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .hero { padding-top: 8px; }
  .hero .figure { font-size: 76px; }
  .hero .figure .cents { font-size: 36px; }
  .home-top .section { margin-top: 0; }
  .row { min-height: 68px; }
  .row.x { display: grid; grid-template-columns: 40px minmax(0, 1fr) 120px 130px minmax(130px, auto); align-items: center; }
  .row.x .when { display: block; color: var(--ink-2); font-weight: 700; font-size: 14px; }
  .row.x .d-date { display: none; }
  .row.x .chip { justify-self: end; }
  .row.x .amt { text-align: right; }
  .detail-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(280px, 2fr); gap: 48px; align-items: start; }
  .detail-grid .section:first-child { margin-top: 0; }
  .detail-hero .figure { font-size: 60px; }
  .hist-head { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 8px; }
  .hist-head .search { margin-bottom: 0; }
  .hist-head .chips { padding-bottom: 0; margin-bottom: 0; flex-wrap: wrap; }
  .sheet { width: 540px; }
  .sheet-body { padding: 14px 28px 28px; }
  .grab { display: none; }
  .toast { bottom: 32px; }
  .gate { min-height: calc(100dvh - 72px); width: 100%; }
}
@media (min-width: 1280px) {
  .app { padding: 48px 64px 72px; }
}

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + var(--sab)); transform: translate(-50%, 20px);
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 800; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .25s var(--ease); z-index: 30; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- skeleton ---------- */
.sk { background: linear-gradient(90deg, var(--bg-2) 25%, var(--line) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: sh 1.2s linear infinite; border-radius: 10px; }
@keyframes sh { to { background-position: -200% 0; } }
.sk.line { height: 16px; margin: 10px 0; }
.sk.fig { height: 56px; width: 60%; margin: 10px 0; }

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