/* Tabungan Wedding: warm passbook palette, Plus Jakarta Sans, flat surfaces with one elevated card. */

:root{
  --paper:#FBF6EE;
  --surface:#FFFDF8;
  --surface-2:#F5ECDF;
  --ink:#241E1B;
  --muted:#6B5F58;
  --line:#E6D9C8;
  --line-strong:#CFBCA5;
  --wine:#7C2D3E;
  --wine-solid:#7C2D3E;
  --wine-solid-hover:#67232F;
  --wine-panel:#6B2331;
  --wine-soft:#F4E4E6;
  --on-wine:#FFF5E9;
  --brass:#A97B3F;
  --brass-ink:#7F5A25;
  --brass-soft:#F6EBD9;
  --sage:#41654E;
  --sage-soft:#E4EDE5;
  --danger:#9C3529;
  --danger-soft:#F7E4DF;
  --focus:#3E6C86;
  --radius-lg:20px;
  --radius:14px;
  --radius-sm:10px;
  --shadow:0 1px 2px rgba(36,30,27,.05), 0 18px 36px -26px rgba(36,30,27,.4);
  --font:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme:light;
}

html[data-theme="dark"]{
  --paper:#161210;
  --surface:#211B17;
  --surface-2:#2A231E;
  --ink:#F3EAE0;
  --muted:#B5A79B;
  --line:#3A2F28;
  --line-strong:#4C3E34;
  --wine:#D58395;
  --wine-solid:#9E4557;
  --wine-solid-hover:#B35568;
  --wine-panel:#41222B;
  --wine-soft:#35252C;
  --on-wine:#FBEFE4;
  --brass:#D2A063;
  --brass-ink:#E4BE87;
  --brass-soft:#33281B;
  --sage:#96C4A4;
  --sage-soft:#25322A;
  --danger:#E79082;
  --danger-soft:#39211D;
  --focus:#9CC6DC;
  --shadow:0 1px 2px rgba(0,0,0,.4), 0 20px 40px -28px rgba(0,0,0,.8);
  color-scheme:dark;
}

*,*::before,*::after{ box-sizing:border-box; }

html{
  -webkit-text-size-adjust:100%;
  scroll-padding-top:84px;
}

body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font);
  font-size:15px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
}

[hidden]{ display:none !important; }

h1,h2,h3,p,ul,ol,dl,dd,figure{ margin:0; }
ul,ol{ padding:0; list-style:none; }
button,input,select,textarea{ font:inherit; color:inherit; }
a{ color:inherit; }
svg{ display:block; }
.tnum{ font-variant-numeric:tabular-nums; font-feature-settings:"tnum" 1; }

.skip-link{
  position:absolute; left:12px; top:-60px; z-index:100;
  background:var(--wine-solid); color:var(--on-wine);
  padding:12px 14px; border-radius:var(--radius-sm); font-weight:700;
  transition:top .15s ease;
}
.skip-link:focus{ top:12px; }

:where(a,button,input,select,textarea,[tabindex]):focus-visible{
  outline:3px solid var(--focus);
  outline-offset:2px;
}

.icon{ width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.sprite{ position:absolute; width:0; height:0; overflow:hidden; }

/* ---------- Top bar ---------- */

.topbar{
  position:sticky; top:0; z-index:30;
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
.topbar__inner{
  width:min(1120px,100%);
  margin-inline:auto;
  padding:10px 16px;
  display:flex; align-items:center; gap:16px;
  min-height:60px;
}
.wordmark{ display:grid; text-decoration:none; line-height:1.15; margin-right:auto; padding:6px 0; }
.wordmark__name{ font-weight:800; font-size:16px; letter-spacing:-.015em; }
.wordmark__sub{ font-size:11.5px; color:var(--muted); font-weight:600; letter-spacing:.01em; }

.tabs{ display:none; gap:2px; }
.tab{
  display:inline-flex; align-items:center; min-height:40px;
  padding:0 12px; border-radius:var(--radius-sm);
  text-decoration:none; font-size:14px; font-weight:600; color:var(--muted);
  transition:background .15s ease, color .15s ease;
}
.tab:hover{ background:var(--surface-2); color:var(--ink); }
.tab[aria-current="page"]{ color:var(--wine); background:var(--wine-soft); }

.topbar__tools{ display:flex; align-items:center; gap:6px; }
.iconbtn{
  width:44px; height:44px; display:grid; place-items:center;
  background:transparent; border:1px solid transparent; border-radius:var(--radius-sm);
  cursor:pointer; color:var(--ink);
}
.iconbtn:hover{ background:var(--surface-2); }
.tool-link{
  display:inline-flex; align-items:center; justify-content:center; gap:7px;
  min-height:44px; min-width:44px; padding:0 10px; border-radius:var(--radius-sm);
  text-decoration:none; font-size:14px; font-weight:600; color:var(--muted);
}
.tool-link span{ display:none; }
.tool-link:hover{ background:var(--surface-2); color:var(--ink); }
.tool-link[aria-current="page"]{ color:var(--wine); background:var(--wine-soft); }

/* ---------- Bottom nav ---------- */

.bottomnav{
  position:fixed; inset:auto 0 0 0; z-index:30;
  display:grid; grid-template-columns:repeat(5,1fr);
  background:var(--surface);
  border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom);
}
.bottomnav__item{
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px;
  min-height:58px; padding:6px 2px;
  text-decoration:none; font-size:11px; font-weight:600; color:var(--muted);
  position:relative;
}
.bottomnav__item .icon{ width:21px; height:21px; }
.bottomnav__item[aria-current="page"]{ color:var(--wine); }
.bottomnav__item[aria-current="page"]::before{
  content:""; position:absolute; top:0; left:22%; right:22%; height:2px;
  background:var(--wine); border-radius:0 0 2px 2px;
}

/* ---------- Shell & type ---------- */

.shell{
  width:min(1120px,100%);
  margin-inline:auto;
  padding:20px 16px calc(84px + env(safe-area-inset-bottom));
}
.view{ display:grid; gap:18px; }

.page-head{ display:grid; gap:4px; }
.page-head h1{ font-size:clamp(22px,4.4vw,29px); line-height:1.15; letter-spacing:-.025em; font-weight:800; }
.page-head p{ color:var(--muted); font-size:14px; max-width:62ch; }
.page-head__row{ display:flex; align-items:end; justify-content:space-between; gap:16px; flex-wrap:wrap; }

h2{ font-size:17px; font-weight:750; letter-spacing:-.015em; }
.eyebrow{ font-size:12px; font-weight:700; color:var(--brass-ink); }

.card{
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius-lg);
  padding:18px;
}
.card__head{ display:flex; align-items:start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.card__head p{ color:var(--muted); font-size:13px; margin-top:2px; }
.card--flat{ background:transparent; border-style:dashed; box-shadow:none; }
.card--focus{ box-shadow:var(--shadow); }

.stack{ display:grid; gap:14px; }
.grid-2{ display:grid; gap:14px; }
.muted{ color:var(--muted); }
.small{ font-size:13px; }
.tiny{ font-size:12px; }
.nowrap{ white-space:nowrap; }

/* ---------- Balance panel (single focal point) ---------- */

.balance{
  position:relative;
  background:var(--wine-panel);
  color:var(--on-wine);
  border-radius:22px;
  padding:22px 20px 20px;
  overflow:hidden;
}
.balance::after{
  content:"";
  position:absolute; right:-40px; bottom:-70px; width:190px; height:190px;
  border:1px solid rgba(255,245,233,.22); border-radius:50%;
  pointer-events:none;
}
.balance__label{ font-size:12.5px; font-weight:600; letter-spacing:.02em; color:rgba(255,245,233,.82); }
.balance__value{ font-size:clamp(30px,7.6vw,42px); font-weight:800; letter-spacing:-.03em; line-height:1.1; margin-top:4px; }
.balance__meta{ font-size:12.5px; color:rgba(255,245,233,.82); margin-top:6px; max-width:58ch; }
.balance__foot{ display:flex; flex-wrap:wrap; gap:10px 18px; align-items:center; margin-top:16px; }
.balance__link{
  display:inline-flex; align-items:center; min-height:44px;
  padding:0 14px; border-radius:var(--radius-sm);
  background:rgba(255,245,233,.14); color:var(--on-wine);
  text-decoration:none; font-size:13.5px; font-weight:700;
  border:1px solid rgba(255,245,233,.28);
}
.balance__link:hover{ background:rgba(255,245,233,.24); }

.splitbar{ display:flex; height:8px; border-radius:4px; overflow:hidden; background:rgba(255,245,233,.16); margin-top:18px; }
.splitbar__seg{ height:100%; }
.splitbar__seg + .splitbar__seg{ box-shadow:0 0 0 1px var(--wine-panel); }
.splitlegend{ display:flex; flex-wrap:wrap; gap:6px 14px; margin-top:10px; }
.splitlegend__item{ display:inline-flex; align-items:center; gap:6px; font-size:12px; color:rgba(255,245,233,.86); }
.splitlegend__dot{ width:8px; height:8px; border-radius:2px; flex:none; }

/* ---------- Focus target ---------- */

.target-focus{ display:grid; gap:14px; }
.target-focus__top{ display:flex; align-items:start; justify-content:space-between; gap:12px; }
.target-focus__name{ font-size:18px; font-weight:800; letter-spacing:-.015em; }
.target-focus__amount{ font-size:15px; color:var(--muted); }
.progress{ display:grid; gap:6px; }
.progress__meta{ display:flex; justify-content:space-between; gap:10px; font-size:12.5px; color:var(--muted); }
.bar{ height:10px; background:var(--surface-2); border-radius:5px; overflow:hidden; border:1px solid var(--line); }
.bar__fill{ height:100%; background:var(--wine); border-radius:5px; transition:width .3s ease; }
.bar__fill--ok{ background:var(--sage); }

.facts{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px 12px; }
.fact{ display:grid; gap:2px; min-width:0; }
.fact dt{ font-size:12px; color:var(--muted); font-weight:600; }
.fact dd{ font-size:15px; font-weight:700; letter-spacing:-.01em; overflow-wrap:anywhere; }
.fact dd.is-strong{ font-size:18px; font-weight:800; }

.pace{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.pace p{ font-size:13px; color:var(--muted); }

/* ---------- Stats ---------- */

.stats{ display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.stat{
  background:var(--surface); border:1px solid var(--line);
  border-radius:var(--radius); padding:14px;
  display:grid; gap:2px; align-content:start;
}
.stat__label{ font-size:12px; color:var(--muted); font-weight:600; min-height:2.6em; text-wrap:balance; }
.stat__value{ font-size:18px; font-weight:800; letter-spacing:-.02em; }
.stat__sub{ font-size:12px; color:var(--muted); }

/* ---------- Rows / lists ---------- */

.rows{ display:grid; }
.row{
  display:flex; align-items:center; gap:12px;
  padding:12px 0; border-bottom:1px dashed var(--line);
}
.row:last-child{ border-bottom:none; padding-bottom:2px; }
.row__main{ min-width:0; flex:1; display:grid; gap:3px; }
.row__title{ font-size:14.5px; font-weight:650; overflow-wrap:anywhere; }
.row__sub{ display:flex; flex-wrap:wrap; align-items:center; gap:6px; font-size:12.5px; color:var(--muted); }
.row__amt{ font-size:14.5px; font-weight:750; white-space:nowrap; }
.row__amt--in{ color:var(--sage); }
.row__amt--out{ color:var(--ink); }
.row__action{
  flex:none; min-height:44px; padding:0 12px;
  background:transparent; border:1px solid var(--line-strong); border-radius:var(--radius-sm);
  font-size:12.5px; font-weight:600; color:var(--muted); cursor:pointer;
}
.row__action:hover{ background:var(--surface-2); color:var(--ink); }
.row--unassigned .row__title{ color:var(--brass-ink); }

.daygroup{ display:grid; gap:2px; padding-top:6px; }
.daygroup + .daygroup{ border-top:1px solid var(--line); margin-top:10px; padding-top:14px; }
.daygroup__head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.daygroup__head h3{ font-size:13px; font-weight:700; color:var(--ink); }
.daygroup__head span{ font-size:12.5px; font-weight:700; color:var(--muted); }

/* ---------- Tags ---------- */

.tag{
  display:inline-flex; align-items:center; gap:4px;
  padding:2px 8px; border-radius:999px;
  font-size:11.5px; font-weight:650; line-height:1.7; white-space:nowrap;
  border:1px solid transparent;
}
.tag--wine{ background:var(--wine-soft); color:var(--wine); border-color:color-mix(in srgb, var(--wine) 22%, transparent); }
.tag--sage{ background:var(--sage-soft); color:var(--sage); border-color:color-mix(in srgb, var(--sage) 24%, transparent); }
.tag--brass{ background:var(--brass-soft); color:var(--brass-ink); border-color:color-mix(in srgb, var(--brass) 26%, transparent); }
.tag--muted{ background:var(--surface-2); color:var(--muted); border-color:var(--line); }

/* ---------- Buttons ---------- */

.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:46px; padding:0 18px;
  border-radius:var(--radius); border:1px solid transparent;
  font-size:14.5px; font-weight:700; cursor:pointer; text-decoration:none;
  transition:background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:disabled{ opacity:.55; cursor:not-allowed; }
.btn--primary{ background:var(--wine-solid); color:var(--on-wine); }
.btn--primary:hover{ background:var(--wine-solid-hover); }
html[data-theme="dark"] .btn--primary{ color:#FFF3E7; }
.btn--ghost{ background:transparent; border-color:var(--line-strong); color:var(--ink); }
.btn--ghost:hover{ background:var(--surface-2); }
.btn--danger{ background:transparent; border-color:color-mix(in srgb, var(--danger) 45%, transparent); color:var(--danger); }
.btn--danger:hover{ background:var(--danger-soft); }
.btn--solid-danger{ background:var(--danger); border-color:var(--danger); color:#FFF7F4; }
.btn--solid-danger:hover{ filter:brightness(.94); }
.btn--small{ min-height:44px; padding:0 12px; font-size:13px; border-radius:var(--radius-sm); }
.btn--block{ width:100%; }

.actions{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.actions--end{ justify-content:flex-end; }
.textlink{
  display:inline-flex; align-items:center; min-height:44px;
  background:none; border:0; padding:0 2px; cursor:pointer;
  font-size:13.5px; font-weight:650; color:var(--wine); text-decoration:underline;
  text-decoration-thickness:1px; text-underline-offset:3px;
}

/* ---------- Forms ---------- */

.form{ display:grid; gap:14px; }
.form__row{ display:grid; gap:12px; }
.form__actions{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:2px; }
.field{ display:grid; gap:6px; min-width:0; }
.field > label,.field > .label{ font-size:13px; font-weight:650; color:var(--ink); }
.field__hint{ font-size:12px; color:var(--muted); }
.input,select.input,textarea.input{
  width:100%; min-height:46px;
  border:1px solid var(--line-strong); border-radius:12px;
  background:var(--surface); color:var(--ink);
  padding:10px 12px; font-size:15px;
  transition:border-color .15s ease, box-shadow .15s ease;
}
textarea.input{ min-height:70px; resize:vertical; }
.input:focus{ border-color:var(--wine); box-shadow:0 0 0 3px var(--wine-soft); outline:none; }
.input[aria-invalid="true"]{ border-color:var(--danger); }
.input.input--select{
  appearance:none;
  padding-right:38px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%236B5F58' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:12px 8px;
}
html[data-theme="dark"] .input.input--select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23B5A79B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.input--amount{ font-size:22px; font-weight:750; letter-spacing:-.02em; padding-left:44px; font-variant-numeric:tabular-nums; }
.amount-wrap{ position:relative; }
.amount-wrap__prefix{ position:absolute; left:14px; top:50%; transform:translateY(-50%); font-weight:700; color:var(--muted); pointer-events:none; }
.field__error{ font-size:12.5px; font-weight:600; color:var(--danger); }

.chips{ display:flex; flex-wrap:wrap; gap:8px; }
.chip{
  min-height:44px; padding:0 14px;
  border-radius:999px; border:1px solid var(--line-strong);
  background:transparent; color:var(--ink);
  font-size:13px; font-weight:650; cursor:pointer;
}
.chip:hover{ background:var(--surface-2); }
.chip[aria-pressed="true"]{ background:var(--wine-soft); border-color:var(--wine); color:var(--wine); }

.checkbox{ display:flex; gap:10px; align-items:center; min-height:44px; font-size:14px; font-weight:600; }
.checkbox input{ width:20px; height:20px; margin:0; accent-color:var(--wine); flex:none; }

/* ---------- Target cards ---------- */

.target-list{ display:grid; gap:14px; }
.target-card{ display:grid; gap:12px; }
.target-card__head{ display:flex; align-items:start; justify-content:space-between; gap:12px; }
.target-card__name{ font-size:16px; font-weight:750; }
.target-card__deadline{ font-size:12.5px; color:var(--muted); }
.target-card__facts{ display:grid; grid-template-columns:1fr 1fr; gap:10px 12px; }
.target-card__foot{ display:flex; flex-wrap:wrap; gap:8px; justify-content:space-between; align-items:center; }

/* ---------- Wallet rows ---------- */

.wallet-row{ display:grid; gap:10px; padding:14px 0; border-bottom:1px dashed var(--line); }
.wallet-row:last-child{ border-bottom:none; padding-bottom:0; }
.wallet-row__head{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.wallet-row__name{ font-weight:750; font-size:15px; }
.wallet-row__balance{ margin-left:auto; font-weight:800; font-size:16px; white-space:nowrap; }
.wallet-row__grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:8px; }
.wallet-row__cell{ display:grid; gap:1px; }
.wallet-row__cell span{ font-size:11.5px; color:var(--muted); }
.wallet-row__cell strong{ font-size:13.5px; font-weight:700; }

/* ---------- Chart ---------- */

.chart{ display:grid; gap:10px; }
.chart__row{ display:grid; grid-template-columns:78px 1fr auto; gap:10px; align-items:center; }
.chart__label{ font-size:12.5px; color:var(--muted); font-weight:600; }
.chart__track{ display:grid; gap:4px; }
.chart__bar{ height:9px; border-radius:4px; background:var(--wine); min-width:2px; }
.chart__bar--exp{ background:var(--brass); }
.chart__value{ font-size:12.5px; font-weight:700; white-space:nowrap; }

/* ---------- Empty, banner, toast ---------- */

.empty{
  display:grid; gap:8px; justify-items:start;
  border:1px dashed var(--line-strong); border-radius:var(--radius);
  padding:18px; color:var(--muted); font-size:14px;
}
.empty strong{ color:var(--ink); font-size:15px; }
.empty--center{ justify-items:center; text-align:center; }

.banner{
  border-radius:var(--radius); padding:14px 16px; font-size:13.5px;
  background:var(--danger-soft); border:1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  color:var(--ink); margin-bottom:16px;
}
.banner strong{ display:block; margin-bottom:2px; }

.toast{
  position:fixed; left:50%; bottom:calc(78px + env(safe-area-inset-bottom));
  transform:translateX(-50%);
  z-index:60; max-width:min(440px,calc(100vw - 28px));
  background:var(--ink); color:var(--paper);
  border-radius:var(--radius); padding:12px 16px;
  font-size:13.5px; font-weight:600;
  box-shadow:var(--shadow);
  animation:toast-in .16s ease;
}
html[data-theme="dark"] .toast{ background:var(--surface-2); color:var(--ink); border:1px solid var(--line-strong); }
@keyframes toast-in{ from{ opacity:0; transform:translate(-50%,6px); } to{ opacity:1; transform:translate(-50%,0); } }

/* ---------- Modal ---------- */

.modal{
  border:none; padding:0; background:transparent;
  width:min(460px,calc(100vw - 24px)); max-width:none;
}
.modal::backdrop{ background:rgba(24,18,15,.55); }
.modal__panel{
  background:var(--surface); color:var(--ink);
  border:1px solid var(--line); border-radius:20px;
  padding:20px; display:grid; gap:16px;
  max-height:min(88dvh,760px); overflow:auto;
  box-shadow:var(--shadow);
}
.modal__head{ display:flex; align-items:start; justify-content:space-between; gap:12px; }
.modal__head h2{ font-size:18px; }
.modal__close{
  flex:none; width:44px; height:44px; display:grid; place-items:center;
  background:transparent; border:1px solid var(--line-strong); border-radius:var(--radius-sm);
  font-size:18px; line-height:1; cursor:pointer; color:var(--muted);
}
.modal__close:hover{ background:var(--surface-2); }
.modal__body{ font-size:14px; color:var(--muted); display:grid; gap:10px; }
.modal__body strong{ color:var(--ink); }

/* ---------- Settings ---------- */

.settings-grid{ display:grid; gap:14px; }
.setting{ display:grid; gap:6px; padding:14px 0; border-bottom:1px dashed var(--line); }
.setting:last-child{ border-bottom:none; padding-bottom:0; }
.setting__head{ display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.setting__title{ font-weight:700; font-size:14.5px; }
.setting__desc{ font-size:13px; color:var(--muted); max-width:60ch; }
.kv{ display:grid; grid-template-columns:1fr auto; gap:6px 12px; font-size:13.5px; }
.kv dt{ color:var(--muted); }
.kv dd{ font-weight:650; }
.theme-choice{ display:flex; gap:8px; flex-wrap:wrap; }

/* ---------- Responsive ---------- */

@media (min-width:600px){
  .stats{ grid-template-columns:repeat(4,1fr); }
  .form__row{ grid-template-columns:1fr 1fr; }
  .form__row--3{ grid-template-columns:1fr 1fr 1fr; }
  .wallet-row__grid{ grid-template-columns:repeat(4,1fr); }
  .target-card__facts{ grid-template-columns:repeat(4,1fr); }
}

@media (min-width:760px){
  .tabs{ display:flex; }
  .tool-link{ padding:0 10px; }
  .tool-link span{ display:inline; }
  .bottomnav{ display:none; }
  .shell{ padding:26px 24px 48px; }
  .toast{ bottom:24px; }
  .topbar__inner{ padding:10px 24px; }
}

@media (min-width:980px){
  .view{ gap:22px; }
  .dash{ display:grid; grid-template-columns:minmax(0,1.08fr) minmax(0,.92fr); gap:20px; align-items:start; }
  .dash__side{ display:grid; gap:18px; }
  .balance{ padding:26px; }
  .card{ padding:20px; }
}

@media (min-width:1100px){
  .chart__row{ grid-template-columns:92px 1fr 92px; }
}

@media (max-width:520px){
  .modal{ width:100%; margin:auto 0 0; }
  .modal__panel{ border-radius:20px 20px 0 0; max-height:92dvh; padding:18px 16px calc(20px + env(safe-area-inset-bottom)); }
  .toast{ width:calc(100vw - 24px); }
}

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

@media print{
  .topbar,.bottomnav,.toast,.modal{ display:none !important; }
  .shell{ padding:0; }
}
