:root {
  --navy: #060E1A;
  --nav: #0A1626;
  --panel: #0F1E33;
  --panel2: #16294A;
  --text: #F3F7FC;
  --muted: #8FA4BC;
  --line: rgba(255, 255, 255, .07);
  --danger: #FF7A7A;
  --warn: #FFC266;
  --ok: #3DDC97;
  --cyan: #32D5F5;
  --blue: #168BFF;
  --grad: linear-gradient(135deg, #1468E0, #1AA6E8 55%, #2CCFEA);
  --r-md: 16px;
  --r-lg: 22px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--navy); color: var(--text); }
body {
  font-family: Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 15px; line-height: 1.4;
  padding: calc(var(--safe-t) + 4px) 0 calc(88px + var(--safe-b));
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
svg { width: 22px; height: 22px; fill: currentColor; flex: none; }
a { color: var(--cyan); }
main { max-width: 720px; margin: 0 auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 14px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

/* ---------- Cabeçalhos ---------- */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 38px; height: 38px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; font-weight: 900; font-size: 20px; color: #fff; }
.brand b { font-size: 20px; display: block; line-height: 1.1; }
.brand span { font-size: 11px; color: var(--muted); }
.iconbtn { width: 44px; height: 44px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; }
.pagehead { display: flex; align-items: center; gap: 10px; min-height: 52px; }
.pagehead h1 { font-size: 22px; margin: 0; letter-spacing: -.2px; line-height: 1.15; }
.pagehead p { margin: 0; font-size: 12.5px; color: var(--muted); }
.pagehead .grow { flex: 1; min-width: 0; }

/* ---------- Cartão do dia ---------- */
.hero { border-radius: 28px; background: var(--grad); padding: 18px; color: #fff; }
.hero .d { font-size: 13px; font-weight: 600; opacity: .85; }
.hero h2 { font-size: 27px; margin: 2px 0 4px; letter-spacing: -.3px; }
.hero p { margin: 0; font-size: 12.5px; opacity: .9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.metric { background: rgba(255, 255, 255, .15); border-radius: 14px; padding: 10px; min-width: 0; }
.metric b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric span { font-size: 11px; opacity: .85; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Secções ---------- */
.sec { display: flex; justify-content: space-between; align-items: flex-end; padding-top: 6px; gap: 8px; }
.sec b { font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; color: rgba(243, 247, 252, .9); }
.sec span { font-size: 11px; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Grelha de valências ---------- */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { height: 104px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 6px; text-decoration: none; color: var(--text); min-width: 0; }
.tile:active, .row:active, .alert:active { transform: scale(.98); }
.tile b { font-size: 13px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile span { font-size: 11px; font-weight: 500; color: var(--c); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bubble { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); margin-bottom: 6px; }
.bubble.sm { width: 36px; height: 36px; border-radius: 11px; margin: 0; }
.bubble.sm svg { width: 20px; height: 20px; }

/* ---------- Alertas ---------- */
.alert { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; text-align: left; width: 100%; }
.alert .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.alert .ic svg { width: 19px; height: 19px; }
.alert b { display: block; font-size: 14px; font-weight: 600; }
.alert span { font-size: 12px; color: var(--muted); }
.alert.danger { --c: var(--danger); }
.alert.warn { --c: var(--warn); }
.alert.info { --c: var(--cyan); }
.allclear { display: flex; align-items: center; gap: 10px; color: var(--ok); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; font-size: 14px; }

/* ---------- Registos ---------- */
.row { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; padding-right: 12px; cursor: pointer; min-height: 60px; }
.row .stripe { width: 4px; align-self: stretch; background: var(--c); flex: none; }
.row.done .stripe { background: rgba(143, 164, 188, .4); }
.rbody { flex: 1; min-width: 0; padding: 10px 0; }
.rt { font-size: 14.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row.done .rt { text-decoration: line-through; color: var(--muted); }
.rs { font-size: 12px; color: var(--muted); }
.rs.late { color: var(--warn); }
.rn { font-size: 12.5px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: pre-line; }
.check { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--muted); display: grid; place-items: center; flex: none; margin-left: 4px; }
.check.on { background: var(--c); border-color: var(--c); color: var(--navy); }
.check svg { width: 18px; height: 18px; }
.amt { font-weight: 700; font-size: 14.5px; color: var(--text); white-space: nowrap; }
.amt.pos { color: var(--ok); }
.badge { font-size: 11.5px; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.badge.ok { color: var(--ok); background: rgba(61, 220, 151, .14); }
.badge.soon { color: var(--warn); background: rgba(255, 194, 102, .14); }
.badge.expired { color: var(--danger); background: rgba(255, 122, 122, .14); }
.daylabel { font-size: 12px; font-weight: 600; color: var(--muted); margin: 6px 2px 0; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; font-size: 14px; }
.empty b { display: block; color: var(--text); margin-bottom: 2px; }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 18px; border-radius: 14px; font-weight: 600; background: var(--panel2); border: 1px solid var(--line); }
.btn.primary { background: var(--c, var(--blue)); color: var(--navy); border: 0; }
.btn.grad { background: var(--grad); color: #fff; border: 0; }
.btn.danger { color: var(--danger); }
.btn.block { width: 100%; }
.btn.sm { height: 36px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn:disabled { opacity: .45; }
.btnrow { display: flex; gap: 8px; flex-wrap: wrap; }
.btnrow .btn { flex: 1; }

/* ---------- Cartões ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; }
.card h3 { margin: 0 0 8px; font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--cyan); }
.card p { margin: 0 0 10px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; font-size: 14px; }
.kv span { color: var(--muted); }

/* ---------- Finanças ---------- */
.monthnav { display: flex; align-items: center; justify-content: space-between; }
.monthnav b { font-size: 16px; }
.totals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.totals div { background: var(--panel2); border-radius: 12px; padding: 10px; min-width: 0; }
.totals b { display: block; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.totals span { font-size: 11px; color: var(--muted); }
.catbar { margin-top: 10px; }
.catbar .lbl { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 3px; }
.catbar .bar { height: 7px; border-radius: 4px; background: var(--panel2); overflow: hidden; }
.catbar .bar i { display: block; height: 100%; background: #FFB547; border-radius: 4px; }

/* ---------- Pesquisa e separadores ---------- */
.search { display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; height: 48px; }
.search input { flex: 1; background: none; border: 0; outline: none; height: 100%; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 12px; border-radius: 10px; background: var(--panel2); color: var(--muted); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; }
.chip svg { width: 17px; height: 17px; }
.chip.on { color: var(--c, var(--cyan)); background: color-mix(in srgb, var(--c, var(--cyan)) 20%, transparent); border-color: color-mix(in srgb, var(--c, var(--cyan)) 40%, transparent); }

/* ---------- Barra inferior ---------- */
#tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--nav); border-top: 1px solid var(--line); display: flex; justify-content: space-around; align-items: center; height: calc(72px + var(--safe-b)); padding-bottom: var(--safe-b); z-index: 20; }
#tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); text-decoration: none; min-width: 64px; }
#tabbar a .pill { width: 60px; height: 30px; border-radius: 15px; display: grid; place-items: center; }
#tabbar a.on { color: var(--cyan); }
#tabbar a.on .pill { background: var(--panel2); }
#tabbar a.add { color: var(--text); }
#tabbar a.add .pill { width: 52px; height: 36px; border-radius: 18px; background: var(--grad); color: #fff; }

/* ---------- Folha (editor) ---------- */
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 40; display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
.sheet { width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; background: var(--panel); border-radius: 26px 26px 0 0; border: 1px solid var(--line); padding: 10px 18px calc(18px + var(--safe-b)); animation: up .2s ease-out; }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--panel2); margin: 0 auto 10px; }
.sheet h2 { margin: 0 0 12px; font-size: 19px; }
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field input, .field select, .field textarea { background: var(--navy); border: 1px solid #22385A; border-radius: 12px; padding: 12px; outline: none; width: 100%; min-height: 48px; }
.field textarea { min-height: 84px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--cyan); }
.field .err { color: var(--danger); font-size: 12px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--navy); border-radius: 12px; padding: 3px; border: 1px solid #22385A; }
.seg button { height: 40px; border-radius: 9px; color: var(--muted); font-weight: 600; }
.seg button.on { background: var(--panel2); color: var(--text); }
.seg button.on.neg { color: #FFB547; }
.seg button.on.pos { color: var(--ok); }
.sheet .actions { display: flex; gap: 8px; margin-top: 6px; }
.sheet .actions .btn { flex: 1; }
.sheet .extra { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }

/* ---------- Aviso e banner ---------- */
#toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translateX(-50%) translateY(20px); opacity: 0; pointer-events: none; background: #E8EEF6; color: #0A1626; padding: 12px 16px; border-radius: 12px; display: flex; gap: 16px; align-items: center; font-size: 14px; z-index: 60; transition: .2s; max-width: calc(100% - 32px); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
#toast.show { opacity: 1; transform: translateX(-50%); pointer-events: auto; }
#toast button { color: #1468E0; font-weight: 700; }
.banner { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid color-mix(in srgb, var(--cyan) 40%, transparent); border-radius: var(--r-md); padding: 10px 12px; font-size: 13.5px; }
.banner .grow { flex: 1; }

@keyframes up { from { transform: translateY(40px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }

@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
  .overlay { align-items: center; }
  .sheet { border-radius: 26px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---------- Cofre ---------- */
.iconbtn.sm { width: 40px; height: 40px; flex: none; }
.iconbtn.sm svg { width: 19px; height: 19px; }
.inrow { display: flex; gap: 6px; align-items: center; }
.inrow input, .inrow select { flex: 1; min-width: 0; }
.lockcard { display: flex; flex-direction: column; align-items: center; gap: 6px; padding-top: 24px; }
.lockcard .bubble svg { width: 30px; height: 30px; }
.meter { height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; margin: -4px 0 10px; }
.meter i { display: block; height: 100%; width: 0; transition: .2s; }
.filerow { display: flex; align-items: center; gap: 6px; background: var(--navy); border: 1px solid #22385A; border-radius: 12px; padding: 6px 6px 6px 12px; font-size: 13.5px; }
.filerow .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.checkline { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); margin: -2px 0 12px; }
.checkline input { width: 20px; height: 20px; flex: none; accent-color: #C084FC; }
img.preview { width: 100%; border-radius: 12px; margin-top: 10px; border: 1px solid var(--line); }

/* ---------- Relatórios ---------- */
.months { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; margin-top: 14px; align-items: end; }
.months > div { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.months .mb { height: 70px; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.months .mb i { width: 40%; border-radius: 3px 3px 0 0; min-height: 1px; }
.months .mb i.r { background: var(--ok); }
.months .mb i.d { background: #FFB547; }
.months span { font-size: 10px; color: var(--muted); }
details summary { cursor: pointer; color: var(--cyan); }
details p { margin: 8px 0 0; }

/* ---------- Projetos, objetivos, hábitos, pessoas ---------- */
.rright { display: flex; gap: 6px; align-items: center; flex: none; }
.pbar { height: 6px; border-radius: 3px; background: var(--panel2); overflow: hidden; margin-top: 6px; }
.pbar i { display: block; height: 100%; border-radius: 3px; }
.dots { display: flex; gap: 4px; margin-top: 6px; }
.dots i { width: 14px; height: 14px; border-radius: 4px; background: var(--panel2); }
.dots i.on { background: #B085FF; }
.bigpct { font-size: 34px; font-weight: 800; letter-spacing: -.5px; }
.ckrow { display: flex; align-items: center; gap: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 6px 8px 12px; }
.ckrow .grow { flex: 1; min-width: 0; font-size: 14.5px; cursor: pointer; }
.ckrow.done .grow { text-decoration: line-through; color: var(--muted); }
.ckadd { display: flex; gap: 8px; }
.ckadd input { flex: 1; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 0 14px; height: 48px; outline: none; }
.ckadd input:focus { border-color: var(--cyan); }
.ckadd .btn { width: 52px; padding: 0; }
.grid.tools .tile { height: 88px; }
.grid.tools .tile .bubble { width: 34px; height: 34px; margin-bottom: 4px; }
.grid.tools .tile .bubble svg { width: 19px; height: 19px; }

/* ---------- Diário ---------- */
.btn.big { height: 60px; font-size: 16px; }
.diary-today { cursor: pointer; }
.moods { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 6px 0 14px; }
.moods button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; border-radius: 12px; background: var(--navy); border: 1px solid #22385A; font-size: 11.5px; color: var(--muted); }
.moods button span { font-size: 24px; filter: grayscale(.6); }
.moods button.on { border-color: var(--c); color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.moods button.on span { filter: none; }
.moodgrid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; }
.moodgrid i { aspect-ratio: 1; border-radius: 5px; cursor: default; }
.moodgrid i[data-act] { cursor: pointer; }
.moodface { font-size: 24px; width: 36px; text-align: center; flex: none; }
.facts { background: var(--navy); margin-bottom: 12px; padding: 12px; }
.facts ul { margin: 6px 0 10px; padding-left: 18px; font-size: 13px; color: var(--muted); }
.facts li { margin-bottom: 3px; }

/* ---------- Classificações do dia ---------- */
.ratings { display: flex; flex-direction: column; gap: 8px; margin: 6px 0 14px; }
.rating { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--navy); border: 1px solid #22385A; border-radius: 12px; padding: 6px 6px 6px 12px; }
.rating .rl { font-size: 13.5px; flex: 1; min-width: 0; }
.rating .rv { display: flex; gap: 4px; flex: none; }
.rating .rv button { width: 34px; height: 34px; border-radius: 9px; background: var(--panel2); color: var(--muted); font-weight: 700; font-size: 13px; }
.rating .rv button.on { background: var(--c); color: var(--navy); }
.score { display: inline-grid; place-items: center; min-width: 40px; height: 28px; padding: 0 8px; border-radius: 9px; font-weight: 800; font-size: 13px; color: var(--navy); background: var(--c); flex: none; }

/* ---------- Agenda ---------- */
.agrow { min-height: 56px; }
.agrow .agt { width: 50px; flex: none; text-align: center; line-height: 1.15; padding: 8px 0; }
.agrow .agt b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.agrow .agt small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.agrow.agnow { border-color: color-mix(in srgb, var(--c) 60%, transparent); background: color-mix(in srgb, var(--c) 10%, var(--panel)); }
.badge.agb { color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent); margin-left: 4px; }
.aghero { display: flex; align-items: center; gap: 14px; }
.aghero > b { font-size: 34px; line-height: 1; color: var(--cyan); }
.agempty { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; }
.agwrow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-md); padding: 8px 12px; min-height: 52px; }
.agwrow.today { border-color: rgba(50, 213, 245, .45); }
.agwd { width: 34px; flex: none; text-align: center; line-height: 1.1; }
.agwd b { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.agwd span { font-size: 18px; font-weight: 700; }
.agwrow.today .agwd span { color: var(--cyan); }
.agwev { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.agwchip { font-size: 12px; padding: 3px 8px; border-radius: 8px; background: color-mix(in srgb, var(--c) 16%, transparent); border-left: 3px solid var(--c); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agwchip i { font-style: normal; font-weight: 700; margin-right: 5px; font-variant-numeric: tabular-nums; }
.agmgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.agmh { font-size: 11px; color: var(--muted); text-align: center; text-transform: uppercase; padding-bottom: 2px; }
.agmc { position: relative; aspect-ratio: 1 / 1.05; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 5px 2px; min-width: 0; }
.agmc.out { opacity: .4; }
.agmc.today { border-color: var(--cyan); }
.agmc .n { font-size: 13px; font-weight: 600; }
.agmc.today .n { color: var(--cyan); }
.agmc .bars { display: flex; flex-direction: column; gap: 2px; width: 70%; margin-top: 4px; }
.agmc .bars i { height: 3px; border-radius: 2px; background: var(--c); }
.agmc .more { position: absolute; bottom: 2px; font-size: 9.5px; color: var(--muted); }
.aggrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.agtpl { text-align: left; background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 12px; padding: 8px 9px; min-height: 54px; min-width: 0; }
.agtpl b { display: block; font-size: 13px; line-height: 1.2; overflow-wrap: anywhere; }
.agtpl span { font-size: 11px; color: var(--muted); }
.agtpl.on { background: color-mix(in srgb, var(--c) 22%, var(--panel2)); border-color: var(--c); }
.agdot { width: 9px; height: 9px; border-radius: 50%; background: var(--c); display: inline-block; }
.agsum { background: var(--navy); border: 1px dashed #22385A; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; white-space: pre-line; }
.agsum.err { color: var(--warn); }
.agdests .btn.agdef { background: color-mix(in srgb, var(--cyan) 22%, var(--panel2)); border-color: rgba(50, 213, 245, .5); }
.agmgr summary { cursor: pointer; list-style: none; }
.agmgr summary::-webkit-details-marker { display: none; }
.agmgr summary::before { content: "▸ "; color: var(--muted); }
.agmgr[open] summary::before { content: "▾ "; }
.agsw { width: 34px; height: 34px; border-radius: 50%; background: var(--c); border: 3px solid transparent; }
.agsw.on { border-color: var(--text); }
@media (max-width: 380px) { .aggrid { grid-template-columns: repeat(2, 1fr); } }
