/* Última Vez — estilos
   Layout: app de uma coluna (máx. 640px), cabeçalho fixo no topo, abas fixas embaixo,
   botão "+" flutuante e painéis que sobem de baixo (sheets). */

@font-face { font-family: "UV Display"; src: url(display-700.woff2) format("woff2"); font-weight: 700; font-display: swap }
@font-face { font-family: "UV Display"; src: url(display-800.woff2) format("woff2"); font-weight: 800; font-display: swap }
@font-face { font-family: "UV Body"; src: url(body-400.woff2) format("woff2"); font-weight: 400; font-display: swap }
@font-face { font-family: "UV Body"; src: url(body-700.woff2) format("woff2"); font-weight: 700; font-display: swap }
@font-face { font-family: "UV Num"; src: url(num-600.woff2) format("woff2"); font-weight: 600; font-display: swap }
@font-face { font-family: "UV Num"; src: url(num-700.woff2) format("woff2"); font-weight: 700; font-display: swap }

:root {
  /* claro */
  --bg: #F1F4F8; --surface: #FFFFFF; --surface-2: #E8EDF3; --surface-3: #DCE3EC;
  --ink: #0D1420; --muted: #5A6577; --faint: #8A95A6; --line: #D9E0E9;
  --ok: #1B9A5F; --warn: #B87206; --late: #CF3A48;
  --accent: #3D7BFF; --accent-ink: #FFFFFF;
  --scrim: rgba(6, 10, 16, .5);
  --shadow: 0 1px 2px rgba(13, 20, 32, .06), 0 8px 24px rgba(13, 20, 32, .07);
  --f-display: "UV Display", "Segoe UI", system-ui, sans-serif;
  --f-body: "UV Body", "Segoe UI", system-ui, sans-serif;
  --f-num: "UV Num", ui-monospace, Menlo, monospace;
  --r: 16px; --pad: 16px; --scale: 1;
  --nav-h: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #080B10; --surface: #12171F; --surface-2: #1A212B; --surface-3: #242D39;
  --ink: #E9EEF5; --muted: #8E9AAC; --faint: #5E6A7C; --line: #222B37;
  --ok: #3FCB88; --warn: #F2B33D; --late: #FF6472;
  --scrim: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark } }
:root[data-theme="dark"] {
  --bg: #080B10; --surface: #12171F; --surface-2: #1A212B; --surface-3: #242D39;
  --ink: #E9EEF5; --muted: #8E9AAC; --faint: #5E6A7C; --line: #222B37;
  --ok: #3FCB88; --warn: #F2B33D; --late: #FF6472;
  --scrim: rgba(0, 0, 0, .6);
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .3);
  color-scheme: dark }

:root[data-density="compact"] { --pad: 12px; --r: 12px }

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent }
html { font-size: calc(15px * var(--scale)); height: 100% }
body {
  margin: 0; min-height: 100%; background: var(--bg); color: var(--ink);
  font-family: var(--f-body); font-size: 1rem; line-height: 1.45;
  overscroll-behavior-y: contain;
}
button, input, select, textarea { font: inherit; color: inherit }
button { cursor: pointer; background: none; border: 0; padding: 0 }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px }
svg.i { width: 1.35em; height: 1.35em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round }
[hidden] { display: none !important }

/* ---------- cabeçalho ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); background: var(--bg); z-index: 15 }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg);
  padding: 10px max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px));
}
.top-in { max-width: 640px; margin: 0 auto; display: flex; align-items: center; gap: 4px }
.top h1 { font-family: var(--f-display); font-weight: 800; font-size: 1.45rem; letter-spacing: -.02em; margin: 0 auto 0 6px; line-height: 1.1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--ink); position: relative }
.icon-btn:hover { background: var(--surface-2) }
.icon-btn[aria-pressed="true"] { background: var(--surface-2); color: var(--accent) }
.lvl-chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 999px; background: var(--surface-2); font-family: var(--f-num); font-weight: 700; font-size: .8rem; white-space: nowrap }
.lvl-chip .bar { width: 34px; height: 5px; border-radius: 9px; background: var(--surface-3); overflow: hidden }
.lvl-chip .bar span { display: block; height: 100%; background: var(--accent) }

/* ---------- conteúdo ---------- */
main {
  max-width: 640px; margin: 0 auto;
  padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px));
  padding-block: 4px calc(var(--nav-h) + 96px + env(safe-area-inset-bottom, 0px));
  display: grid; gap: 14px;
}
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: var(--muted) }
.search input { flex: 1; min-width: 0; background: none; border: 0; padding: 11px 0; color: var(--ink); outline: none }

.chips { display: flex; gap: 8px; overflow-x: auto; margin: 0 -14px; padding: 2px 14px 4px; scrollbar-width: none }
.chips::-webkit-scrollbar { display: none }
.chip { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .92rem; white-space: nowrap }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink) }
.chip .n { font-family: var(--f-num); font-size: .78rem; opacity: .7 }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block }

.section-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 6px 2px -4px }
.section-h h2 { font-family: var(--f-display); font-weight: 700; font-size: 1.05rem; margin: 0 }
.section-h span { color: var(--muted); font-size: .85rem }

/* faixa "precisa de atenção" */
.attention { background: var(--surface); border-radius: var(--r); padding: 12px var(--pad); display: grid; gap: 10px; box-shadow: var(--shadow) }
.attention-h { display: flex; justify-content: space-between; align-items: center; gap: 10px }
.attention-h b { font-family: var(--f-display); font-size: 1rem }
.attention-h button { color: var(--accent); font-weight: 700; font-size: .9rem }
.att-row { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none }
.att-row::-webkit-scrollbar { display: none }
.att { flex: none; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; white-space: nowrap }
.att .em { font-size: 1.1rem }
.att small { color: var(--late); font-family: var(--f-num); font-weight: 700; font-size: .75rem }
.att.soon small { color: var(--warn) }

/* aviso de instalação / exemplos */
.notice { display: flex; gap: 12px; align-items: center; border-radius: var(--r); padding: 12px 14px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); font-size: .92rem }
.notice p { margin: 0; flex: 1; min-width: 0 }
.notice b { display: block; font-family: var(--f-display) }
.notice .act { display: flex; gap: 6px; flex-direction: column; align-items: flex-end }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .85rem; white-space: nowrap }
.btn-link { color: var(--muted); font-size: .82rem; padding: 2px }

/* ---------- cartões de tarefa ---------- */
.list { display: grid; gap: 10px }
.card-wrap { position: relative; border-radius: var(--r); overflow: hidden; background: color-mix(in srgb, var(--ok) 85%, #000) }
.card-wrap .swipe-hint { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; padding-left: 20px; color: #fff; font-weight: 700 }
.card {
  position: relative; background: var(--surface); border-radius: var(--r); padding: var(--pad);
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  touch-action: pan-y; user-select: none; -webkit-user-select: none;
  transition: transform .22s ease; box-shadow: var(--shadow);
}
.card.dragging { transition: none; z-index: 5; box-shadow: 0 18px 40px rgba(0,0,0,.35) }
.card.swiping { transition: none }
.card .ic { grid-row: span 2; width: 54px; height: 54px; position: relative; display: grid; place-items: center }
.card .ic .em { font-size: 1.55rem; line-height: 1; position: relative }
.card .ic .bg { position: absolute; inset: 5px; border-radius: 50% }
.card .ic svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg) }
.card .name { font-family: var(--f-display); font-weight: 700; font-size: 1.08rem; line-height: 1.2; overflow-wrap: anywhere; display: flex; align-items: center; gap: 6px }
.card .name .star { color: var(--warn); font-size: .85rem }
.card .sub { color: var(--muted); font-size: .84rem; grid-column: 2; display: flex; flex-wrap: wrap; gap: 2px 8px; align-items: center }
.card .sub .st { font-weight: 700 }
.st.ok { color: var(--ok) } .st.soon { color: var(--warn) } .st.late { color: var(--late) }
.card .right { grid-row: 1 / span 2; grid-column: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 8px }
.grip { width: 30px; height: 40px; display: grid; place-items: center; color: var(--faint); touch-action: none; cursor: grab }
.card .tiles-row { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px }
:root[data-density="compact"] .card .tiles-row { margin-top: 4px }

.tiles { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap }
.tile { display: inline-flex; align-items: baseline; gap: 3px; background: var(--surface-2); border-radius: 10px; padding: 5px 9px; font-family: var(--f-num); font-variant-numeric: tabular-nums }
.tile b { font-weight: 700; font-size: 1.35rem; letter-spacing: -.03em; line-height: 1.1 }
.tile i { font-style: normal; font-size: .78rem; color: var(--muted); font-weight: 600 }
.tiles.late .tile b { color: var(--late) } .tiles.soon .tile b { color: var(--warn) }
.tiles .cap { font-size: .78rem; color: var(--muted); align-self: center; margin-left: 2px }

.do-btn { height: 42px; padding: 0 14px; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex: none }
.do-btn:active { transform: scale(.96) }
.do-btn.plus { font-family: var(--f-num); font-size: 1.05rem; min-width: 56px; justify-content: center }
.do-btn.done { background: var(--surface-2); color: var(--ok) }

.empty { text-align: center; color: var(--muted); padding: 26px 18px; display: grid; gap: 18px; justify-items: center }
.empty h3 { font-family: var(--f-display); color: var(--ink); margin: 0; font-size: 1.15rem }
.tips { display: grid; gap: 14px; max-width: 340px }
.tip { display: grid; justify-items: center; gap: 6px; font-size: .92rem }
.tip svg.i { width: 1.6em; height: 1.6em; color: var(--ink) }
.btn { height: 46px; padding: 0 18px; border-radius: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px }
.btn.primary { background: var(--accent); color: var(--accent-ink) }
.btn.soft { background: var(--surface-2); color: var(--ink) }
.btn.danger { background: color-mix(in srgb, var(--late) 15%, transparent); color: var(--late) }
.btn.full { width: 100% }

/* boas-vindas */
.welcome { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; background: var(--surface); border-radius: var(--r); padding: 14px var(--pad); box-shadow: var(--shadow) }
.welcome p { margin: 0; font-size: .9rem; color: var(--muted) }
.welcome b { font-family: var(--f-display); color: var(--ink); font-size: 1.02rem; display: block }
.welcome .tiles .tile b { font-size: 1.05rem }
.welcome .x { position: absolute }

/* ---------- abas embaixo ---------- */
nav.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  padding: 0 max(4px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(4px, env(safe-area-inset-left, 0px));
}
.tabs-in { max-width: 640px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--nav-h) }
.tab { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--muted); font-size: .74rem; font-weight: 700; position: relative }
.tab[aria-current="page"] { color: var(--accent) }
.tab .pill { width: 56px; height: 30px; border-radius: 999px; display: grid; place-items: center }
.tab[aria-current="page"] .pill { background: color-mix(in srgb, var(--accent) 16%, transparent) }
.badge { position: absolute; top: 6px; left: calc(50% + 8px); min-width: 18px; height: 18px; border-radius: 9px; background: var(--late); color: #fff; font-family: var(--f-num); font-size: .68rem; display: grid; place-items: center; padding: 0 5px }
.fab {
  position: fixed; z-index: 11; right: calc(18px + env(safe-area-inset-right, 0px)); bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px));
  width: 60px; height: 60px; border-radius: 20px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center;
  box-shadow: 0 10px 28px color-mix(in srgb, var(--accent) 45%, transparent);
}
.fab svg.i { width: 1.7em; height: 1.7em }
@media (min-width: 700px) { .fab { right: calc(50% - 320px + 4px) } }

/* ---------- menu lateral ---------- */
.drawer-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 30 }
.drawer {
  position: fixed; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); background: var(--surface); z-index: 31; overflow-y: auto;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(18px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
  display: grid; align-content: start; gap: 6px;
}
.drawer .brand { font-family: var(--f-display); font-weight: 800; font-size: 1.5rem; padding: 4px 8px 10px }
.drawer .lvl { background: var(--surface-2); border-radius: 14px; padding: 14px; display: grid; gap: 8px; margin-bottom: 8px }
.drawer .lvl .big { font-family: var(--f-num); font-weight: 700; font-size: 1.5rem }
.drawer .lvl .bar { height: 8px; border-radius: 9px; background: var(--surface-3); overflow: hidden }
.drawer .lvl .bar span { display: block; height: 100%; background: var(--accent) }
.drawer .lvl small { color: var(--muted) }
.d-item { display: flex; align-items: center; gap: 14px; padding: 13px 10px; border-radius: 12px; font-weight: 700; text-align: left; width: 100% }
.d-item:hover { background: var(--surface-2) }
.d-item small { margin-left: auto; color: var(--muted); font-family: var(--f-num); font-weight: 600 }

/* ---------- painéis (sheets) ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 40; display: flex; align-items: flex-end; justify-content: center }
.sheet {
  background: var(--surface); width: 100%; max-width: 640px; max-height: calc(100% - env(safe-area-inset-top, 0px) - 24px); overflow-y: auto; overscroll-behavior: contain;
  border-radius: 22px 22px 0 0; display: grid; gap: 18px; align-content: start;
  padding: 10px max(18px, env(safe-area-inset-right, 0px)) calc(24px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px));
}
.sheet.tall { min-height: 70% }
.handle { width: 40px; height: 5px; border-radius: 3px; background: var(--surface-3); justify-self: center }
.sheet-h { display: flex; align-items: center; gap: 10px }
.sheet-h h2 { font-family: var(--f-display); font-weight: 800; font-size: 1.4rem; margin: 0; flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.15 }
.sheet-h .em { font-size: 2rem }
.label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700 }
.field { display: grid; gap: 7px }
.input, .field select, .field textarea {
  width: 100%; min-width: 0; background: var(--surface-2); border: 1px solid transparent; border-radius: 12px; padding: 12px 13px; color: var(--ink); outline: none;
}
.input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent) }
.field textarea { resize: vertical; min-height: 70px }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap }
.row > .input { flex: 1 }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); border-radius: 12px; padding: 4px; gap: 4px }
.seg button { padding: 9px 6px; border-radius: 9px; font-weight: 700; font-size: .88rem; color: var(--muted); display: grid; justify-items: center; gap: 2px }
.seg button small { font-weight: 400; font-size: .72rem }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow) }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 6px }
.pick-grid button { height: 44px; border-radius: 12px; background: var(--surface-2); font-size: 1.4rem; display: grid; place-items: center }
.pick-grid button[aria-pressed="true"] { outline: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--surface-2)) }
.icon-groups { display: grid; gap: 12px; max-height: 280px; overflow-y: auto; padding-right: 4px }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; align-items: center }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 3px solid transparent; position: relative }
.sw[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 3px var(--surface) }
.sw-custom { width: 34px; height: 34px; border-radius: 50%; overflow: hidden; border: 2px dashed var(--faint); position: relative; display: grid; place-items: center; color: var(--muted) }
.sw-custom input { position: absolute; inset: -8px; width: 60px; height: 60px; opacity: 0; cursor: pointer }
.icon-preview { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 1.9rem; flex: none }

.big-tiles .tile { padding: 8px 12px; border-radius: 14px }
.big-tiles .tile b { font-size: 2.3rem }
.big-tiles .tile i { font-size: .95rem }
.status-line { font-size: .95rem; color: var(--muted) }
.status-line b { font-weight: 700 }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px }
.stat { background: var(--surface-2); border-radius: 12px; padding: 10px 12px }
.stat b { display: block; font-family: var(--f-num); font-weight: 700; font-size: 1.05rem; font-variant-numeric: tabular-nums }
.stat span { font-size: .78rem; color: var(--muted) }
.chart { background: var(--surface-2); border-radius: 14px; padding: 12px 12px 6px; display: grid; gap: 4px }
.chart svg { width: 100%; height: auto; display: block }
.hist { list-style: none; margin: 0; padding: 0; display: grid }
.hist li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 11px 0; border-top: 1px solid var(--line); align-items: start }
.hist .when { font-weight: 700 }
.hist .gap { font-family: var(--f-num); font-size: .8rem; color: var(--muted); text-align: right }
.hist .note { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; overflow-wrap: anywhere }
.hist .ops { grid-column: 1 / -1; display: flex; gap: 14px }
.hist .ops button { color: var(--muted); font-size: .82rem; text-decoration: underline; text-underline-offset: 2px }
.actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px }
.collapse summary { cursor: pointer; color: var(--accent); font-weight: 700; list-style: none; padding: 4px 0 }
.collapse summary::-webkit-details-marker { display: none }

/* ideias / listas de configurações */
.group { display: grid; gap: 8px }
.group-h { display: flex; align-items: center; gap: 10px; margin: 8px 2px 2px; font-family: var(--f-display); font-weight: 700; font-size: 1.05rem }
.group-h .bar { width: 4px; height: 20px; border-radius: 2px }
.line-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; background: var(--surface); border-radius: 14px; padding: 10px 12px; text-align: left; width: 100%; box-shadow: var(--shadow) }
.line-item .circ { grid-row: span 2; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 1.3rem }
.line-item b { font-family: var(--f-display); font-weight: 700; overflow-wrap: anywhere }
.line-item small { color: var(--muted); grid-column: 2 }
.line-item .end { grid-row: span 2; grid-column: 3; color: var(--muted); display: flex; align-items: center; gap: 6px }
.line-item .end.added { color: var(--ok) }
.set-card { background: var(--surface); border-radius: var(--r); padding: 14px var(--pad); display: grid; gap: 14px; box-shadow: var(--shadow) }
.set-card h3 { font-family: var(--f-display); margin: 0; font-size: 1.05rem }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px }
.set-row p { margin: 0; flex: 1; min-width: 0 }
.set-row p small { display: block; color: var(--muted); font-size: .84rem }
.switch { width: 50px; height: 30px; border-radius: 15px; background: var(--surface-3); position: relative; flex: none; transition: background .15s }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3) }
.switch[aria-checked="true"] { background: var(--accent) }
.switch[aria-checked="true"]::after { transform: translateX(20px) }
.page-title { font-family: var(--f-display); font-weight: 800; font-size: 1.3rem; margin: 6px 2px 0 }
.page-sub { color: var(--muted); margin: -8px 2px 0; font-size: .92rem }
.steps { margin: 0; padding-left: 1.3em; display: grid; gap: 8px }
.kbd { font-family: var(--f-num); font-size: .85em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px }

/* menu de ordenação */
.menu-list { display: grid; gap: 2px }
.menu-list button { display: flex; justify-content: space-between; align-items: center; padding: 13px 10px; border-radius: 12px; font-weight: 700; text-align: left }
.menu-list button[aria-checked="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent) }

/* toast */
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 60; bottom: calc(var(--nav-h) + 90px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--bg); border-radius: 14px; padding: 11px 14px; display: flex; gap: 16px; align-items: center;
  max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0,0,0,.3); font-weight: 700; font-size: .92rem;
}
.toast button { color: var(--accent); font-weight: 800; filter: brightness(1.25) }
.toast.lvlup { background: var(--accent); color: var(--accent-ink) }

@media (prefers-reduced-motion: no-preference) {
  :root:not([data-motion="off"]) .sheet { animation: sheet-up .22s cubic-bezier(.2, .8, .2, 1) }
  :root:not([data-motion="off"]) .drawer { animation: drawer-in .2s ease-out }
  :root:not([data-motion="off"]) .toast { animation: toast-in .2s ease-out }
  :root:not([data-motion="off"]) .pop { animation: pop .35s ease-out }
}
:root[data-motion="off"] .card { transition: none }
@keyframes sheet-up { from { transform: translateY(40px); opacity: .5 } }
@keyframes drawer-in { from { transform: translateX(-30px); opacity: .4 } }
@keyframes toast-in { from { transform: translate(-50%, 12px); opacity: 0 } }
@keyframes pop { 40% { transform: scale(1.12) } }
