/* =========================================================
   Ritmo — visual minimalista: cinza quente, preto e laranja
   ========================================================= */
:root {
  --bg: #ECEAE5;
  --surface: #F8F7F4;
  --surface-2: #E6E3DD;
  --ink: #141413;
  --ink-2: #3A3936;
  --muted: #8A877F;
  --line: #E1DDD5;
  --dark: #161615;
  --dark-2: #242422;
  --on-dark: #F5F4F0;
  --on-dark-muted: #9A978F;
  --accent: #F26B2A;
  --accent-soft: #FCE3D5;
  --blue: #3D6FDB;
  --pink: #E04A7E;
  --green: #2E9E68;
  --purple: #8B5CF6;
  --yellow: #E5A23A;
  --sky: #A9C3CF;
  --shadow: 0 1px 2px rgba(20, 20, 19, .04), 0 10px 28px -10px rgba(20, 20, 19, .12);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F0E;
    --surface: #1A1A19;
    --surface-2: #262624;
    --ink: #F2F1ED;
    --ink-2: #CFCDC7;
    --muted: #8D8B85;
    --line: #2E2D2A;
    --dark: #262624;
    --dark-2: #31312E;
    --accent-soft: #3A2216;
    --sky: #7E9AA6;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px -10px rgba(0, 0, 0, .5);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased;
  min-height: 100dvh; overflow-x: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.fill { fill: currentColor; stroke: none; }
.wxi { width: 28px; height: 28px; flex: none; color: currentColor; }

.app { max-width: 460px; margin: 0 auto; position: relative; }
#main { padding: calc(14px + env(safe-area-inset-top)) 16px calc(120px + env(safe-area-inset-bottom)); }
body.editing #main { padding-bottom: 40px; }
body.editing .tabbar { display: none; }

/* ---------- tipografia ---------- */
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.035em; line-height: 1.08; }
h2 { font-size: 19px; font-weight: 750; letter-spacing: -.02em; line-height: 1.2; }
h3 { font-size: 16.5px; font-weight: 750; letter-spacing: -.015em; display: flex; align-items: center; gap: 8px; }
.eyebrow { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; display: flex; align-items: center; gap: 6px; }
.eyebrow.on-dark, .on-dark-muted { color: var(--on-dark-muted); }
.muted { color: var(--muted); }
.thin { font-weight: 400; }
.small { font-size: 13px; }
.center { text-align: center; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.big small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.huge { font-size: 46px; font-weight: 800; letter-spacing: -.05em; line-height: 1; margin: 6px 0 4px; }
.serif, .serif-h { font-family: 'Fraunces', Georgia, serif; }
.serif-h { font-weight: 600; letter-spacing: -.02em; font-size: 36px; }
.empty { color: var(--muted); font-size: 14px; padding: 14px 4px; text-align: center; }
.hint { color: var(--muted); font-size: 13px; margin: 14px 2px 8px; }

/* ---------- estrutura ---------- */
.top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 8px 2px 18px; }
.top > div:first-child { min-width: 0; }
.top .eyebrow { margin-bottom: 6px; }
.row { display: flex; align-items: center; gap: 8px; }
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card.dark { background: var(--dark); color: var(--on-dark); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 4px 10px; }
.group-lbl { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin: 12px 6px 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.grid2 > .card { margin-bottom: 0; }
.grid2.tight { gap: 10px; margin-bottom: 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.grid3 > .card { margin-bottom: 0; }
.link { font-size: 13px; font-weight: 700; color: var(--muted); }
.tag { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; flex: none; }

/* ---------- botões ---------- */
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); flex: none; }
.icon-btn.dark { background: var(--ink); color: var(--bg); }
.icon-btn.sm { width: 34px; height: 34px; box-shadow: none; background: transparent; color: var(--muted); }
.icon-btn.sm .ic { width: 17px; height: 17px; }
.icon-btn.sm.on { color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 0 18px; border-radius: 999px; font-weight: 700; font-size: 14px; background: var(--surface-2); white-space: nowrap; }
.btn .ic { width: 17px; height: 17px; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-accent { background: var(--accent); color: #fff; }
.btn.danger { color: #C9372C; }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn-block { width: 100%; min-height: 52px; margin-top: 10px; }
.btn[disabled] { opacity: .7; cursor: default; }
.back { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; color: var(--muted); font-size: 14px; padding: 6px 8px 6px 0; margin-top: 4px; }
.pill { padding: 9px 13px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.inline-link { font-size: 13px; font-weight: 700; color: var(--accent); }
.row-btns { display: flex; gap: 8px; margin-top: 12px; }
.row-btns.three { margin: 0 0 12px; }
.row-btns.three .btn { flex: 1; padding: 0 8px; }
.row-btns.stack { flex-direction: column; }
.mini { flex: none; min-width: 40px; height: 38px; border-radius: 999px; background: var(--surface-2); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; }
.mini.dark { background: var(--ink); color: var(--bg); flex: 1; }
.mini.wide { flex: 1; }
.mini .ic { width: 15px; height: 15px; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(14px + env(safe-area-inset-bottom));
  width: min(428px, calc(100% - 24px));
  display: flex; justify-content: space-between; padding: 7px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-radius: 999px; box-shadow: 0 10px 34px -8px rgba(0, 0, 0, .25), 0 0 0 1px var(--line);
  z-index: 20;
}
.tab { flex: 1; height: 50px; border-radius: 999px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: 10.5px; font-weight: 700; transition: background .2s, color .2s; }
.tab.on { background: var(--ink); color: var(--bg); }
.tab .ic { width: 21px; height: 21px; }

/* ---------- hoje ---------- */
.score-card { display: flex; align-items: center; gap: 18px; padding: 18px 18px 18px 16px; }
.score-ring { position: relative; flex: none; }
.ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-label b { font-size: 24px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
.ring-label span { font-size: 11px; font-weight: 600; opacity: .65; margin-top: 3px; }
.score-info { min-width: 0; }
.score-info h2 { margin: 6px 0 12px; font-size: 17.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 5px 9px 5px 7px; border-radius: 999px; background: rgba(255, 255, 255, .08); color: var(--on-dark-muted); }
.chip .ic { width: 14px; height: 14px; }
.chip.ok { background: var(--accent); color: #fff; }

.habit { display: flex; flex-direction: column; }
.habit-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.habit-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.habit-ic .ic { width: 17px; height: 17px; }
.habit .big { font-size: 27px; }
.drops { display: flex; flex-wrap: wrap; gap: 4px; margin: 10px 0 0; }
.drops i { width: 12px; height: 16px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: var(--surface-2); }
.drops i.on { background: var(--blue); }
.habit .row-btns { margin-top: auto; padding-top: 12px; }
.pbar { height: 7px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 12px; }
.pbar i { display: block; height: 100%; border-radius: 99px; background: var(--ink); transition: width .4s; }
.pbar.on-dark { background: rgba(255, 255, 255, .12); }
.pbar.on-dark i { background: var(--accent); }

.notice { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); box-shadow: none; cursor: pointer; padding: 14px 16px; }
.notice > .ic:first-child { color: var(--accent); }
.notice p { flex: 1; font-size: 13.5px; }

.ai-card { display: flex; align-items: center; gap: 14px; cursor: pointer; }
.ai-card p { font-size: 13px; color: var(--muted); margin-top: 2px; }
.ai-card > div { flex: 1; }
.ai-card > .ic { color: var(--muted); }
.ai-ic { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(135deg, var(--accent), #F5A15F); }
.ai-ic.big { width: 50px; height: 50px; border-radius: 17px; }

.perf-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.perf-head > div:first-child { flex: 1; }
.perf-mini { background: var(--surface-2); border-radius: 14px; padding: 8px 12px; display: flex; flex-direction: column; }
.perf-mini span { font-size: 11px; font-weight: 600; color: var(--muted); }
.perf-mini b { font-size: 15px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; }
.delta .ic { width: 13px; height: 13px; stroke-width: 2.4; }
.delta.up { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.delta.down { background: var(--accent-soft); color: var(--accent); }
.delta.neutral { background: var(--surface-2); color: var(--ink-2); }

.bars { display: flex; gap: 8px; height: 150px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-val { font-size: 11px; font-weight: 700; color: var(--muted); }
.bar-track { flex: 1; width: 100%; max-width: 34px; border-radius: 10px; background: repeating-linear-gradient(to top, var(--surface-2) 0 3px, transparent 3px 6px); position: relative; overflow: hidden; }
.bar-fill { position: absolute; left: 0; right: 0; bottom: 0; background: var(--ink); border-radius: 10px; transition: height .5s; }
.bar-fill.hi { background: var(--accent); }
.bar-lbl { font-size: 12px; font-weight: 700; color: var(--muted); }
.bar-lbl.hi { color: var(--ink); }

.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 4px; }
.quick button { background: var(--surface); box-shadow: var(--shadow); border-radius: 20px; padding: 14px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }

/* ---------- clima (inspirado em widget) ---------- */
.wx { padding: 0; overflow: hidden; background: var(--dark); color: var(--on-dark); }
.wx-sky { background: var(--sky); color: #121212; padding: 18px; border-radius: var(--r-lg); }
.wx-empty { background: var(--sky); color: #121212; padding: 18px; }
.wx-empty .eyebrow { color: rgba(0, 0, 0, .55); }
.wx-msg { font-weight: 600; margin-top: 4px; }
.wx-top { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; }
.wx-temp { font-size: 58px; font-weight: 500; letter-spacing: -.05em; line-height: .95; }
.wx-icon .wxi { width: 50px; height: 50px; }
.wx-place { flex: 1; display: flex; flex-direction: column; font-size: 13px; font-weight: 600; min-width: 0; padding-top: 2px; }
.wx-place b { font-size: 17px; font-weight: 700; }
.wx-place span { opacity: .75; }
.wx-feel { font-size: 13px; font-weight: 600; opacity: .7; margin-top: 12px; }
.rain-alert { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; background: rgba(255, 255, 255, .55); border-radius: 14px; padding: 9px 12px; font-size: 13px; }
.rain-alert .ic { color: var(--blue); margin-top: 1px; }
.wx-hours { display: flex; justify-content: space-between; margin-top: 16px; }
.wx-hours > div { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 13px; }
.wx-hours span { font-weight: 700; font-size: 12.5px; }
.wx-hours b { font-weight: 600; font-size: 15px; }
.wx-hours small { font-size: 10.5px; font-weight: 700; color: var(--blue); }
.wx-days { padding: 10px 18px 14px; }
.wx-day { display: grid; grid-template-columns: 1fr 34px 62px 36px 36px; align-items: center; gap: 4px; padding: 7px 0; font-size: 15px; }
.wx-day .wxi { width: 26px; height: 26px; color: #B8C7CF; }
.wx-day-rain { font-size: 12.5px; color: var(--on-dark-muted); display: flex; align-items: center; gap: 2px; }
.wx-day-rain .ic { width: 12px; height: 12px; }
.wx-lo { color: var(--on-dark-muted); text-align: right; }
.wx-hi { text-align: right; font-weight: 600; }

/* ---------- listas de tarefas ---------- */
.list-card { padding: 6px 8px 6px 14px; }
.task, .food, .tx { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.task:last-of-type, .food:last-of-type, .tx:last-of-type { border-bottom: 0; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 650; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-top: 1px; }
.task-time { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.check { width: 26px; height: 26px; border-radius: 50%; border: 1.8px solid var(--muted); display: grid; place-items: center; flex: none; color: transparent; transition: .15s; }
.check .ic { width: 15px; height: 15px; stroke-width: 2.6; }
.task.done .check { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.task.done .task-title { text-decoration: line-through; color: var(--muted); }
button.task-main { text-align: left; display: block; padding: 2px 0; }
.meta-ic { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.meta-ic .ic { width: 13px; height: 13px; flex: none; }
.task-meta { white-space: nowrap; overflow: hidden; }
.task.appt { gap: 12px; }
.appt-time { flex: none; width: 58px; padding: 8px 0; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; }
.appt-time b { font-size: 15px; font-variant-numeric: tabular-nums; }
.appt-time small { font-size: 11px; color: var(--muted); font-weight: 600; }
.task.appt:not(.done) .appt-time { background: var(--ink); color: var(--bg); }
.task.appt.done .appt-time b { color: var(--muted); }
.section-head h3 .ic { width: 18px; height: 18px; color: var(--muted); }
.count { font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 2px 8px; border-radius: 99px; margin-left: 2px; }
.day-head { display: flex; flex-direction: column; margin: 20px 4px 0; }
.kind-seg { margin-bottom: 14px; }
.kind-seg .seg-opt span .ic { width: 16px; height: 16px; }
.desc-input { min-height: 84px; padding: 12px 14px !important; resize: vertical; line-height: 1.45; }
.det-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.det-tags .tag { display: inline-flex; align-items: center; gap: 5px; }
.det-tags .tag .ic { width: 14px; height: 14px; }
.tag.ok { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.det-title { font-size: 26px; font-weight: 800; letter-spacing: -.03em; margin: 12px 0 14px; line-height: 1.15; }
.det-rows { display: flex; flex-direction: column; border-radius: 18px; background: var(--bg); padding: 4px 14px; }
.det-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.det-row:last-child { border-bottom: 0; }
.det-row > .ic { color: var(--muted); margin-top: 2px; }
.det-row div { display: flex; flex-direction: column; min-width: 0; }
.det-row span, .det-desc > span { font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.det-row b { font-size: 15px; overflow-wrap: anywhere; }
.det-link { font-size: 13px; font-weight: 700; color: var(--accent); margin-top: 2px; }
.det-desc { margin-top: 14px; padding: 14px; border-radius: 18px; background: var(--bg); }
.det-desc p { margin-top: 6px; font-size: 15px; line-height: 1.5; overflow-wrap: anywhere; }
.det-actions { display: flex; gap: 8px; margin-top: 16px; }
.det-actions .btn:not(.danger) { flex: 1; }
.det-actions .btn.danger { width: 48px; padding: 0; background: var(--surface-2); }
.add-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 0; color: var(--muted); font-weight: 700; font-size: 14px; }
.add-row .ic { width: 18px; height: 18px; }

/* ---------- agenda ---------- */
.cal { padding: 16px 12px; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-dow span { font-size: 12px; font-weight: 700; color: var(--muted); padding-bottom: 8px; }
.cal-grid { row-gap: 4px; }
.day { aspect-ratio: 1; max-height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-radius: 50%; font-weight: 650; font-size: 15px; position: relative; margin: 0 auto; width: 100%; max-width: 46px; }
.day.past { color: var(--muted); }
.day.today span { color: var(--accent); font-weight: 800; }
.day.sel { background: var(--ink); color: var(--bg); }
.day.sel.today span { color: var(--bg); }
.dots { display: flex; gap: 2px; height: 5px; }
.dots b { width: 5px; height: 5px; border-radius: 50%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 14px 6px 2px; border-top: 1px solid var(--line); margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend.inline { border: 0; padding: 0; margin: 0; }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; min-width: 0; }
.field > span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.field input, .field select, .field textarea, .search input, .composer input, .select-sm {
  width: 100%; min-height: 46px; border-radius: 14px; border: 1.5px solid transparent; background: var(--surface-2); padding: 0 14px; font-size: 16px; outline: none; transition: border-color .15s;
}
.field input:focus, .field select:focus, .composer input:focus, .search input:focus { border-color: var(--ink); }
.field .row input { flex: 1; }
.time-big { font-size: 28px !important; font-weight: 700; min-height: 60px !important; text-align: center; }
.select-sm { width: auto; min-height: 36px; font-size: 13px; font-weight: 700; padding: 0 10px; border-radius: 999px; max-width: 55%; }
.seg { display: flex; gap: 6px; }
.seg.wrap { flex-wrap: wrap; }
.seg-opt input { position: absolute; opacity: 0; pointer-events: none; }
.seg-opt span { display: inline-flex; align-items: center; gap: 6px; padding: 10px 13px; border-radius: 999px; background: var(--surface-2); font-size: 13px; font-weight: 700; cursor: pointer; border: 1.5px solid transparent; }
.seg-opt input:checked + span { background: var(--ink); color: var(--bg); }
.seg-opt input:focus-visible + span { border-color: var(--accent); }
.seg:not(.wrap) .seg-opt { flex: 1; }
.seg:not(.wrap) .seg-opt span { width: 100%; justify-content: center; }
.pill-seg { background: var(--surface-2); border-radius: 999px; padding: 4px; gap: 2px; }
.pill-seg button { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); }
.pill-seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.small-seg { margin-top: 12px; justify-content: space-between; }
.small-seg button { flex: 1; }
.sugg { display: flex; gap: 6px; overflow-x: auto; margin: 0 -18px 14px; padding: 0 18px 2px; scrollbar-width: none; }
.sugg::-webkit-scrollbar { display: none; }
.switch-row { display: flex; align-items: center; gap: 12px; justify-content: space-between; padding: 12px 0 2px; cursor: pointer; }
.switch-row span { display: flex; flex-direction: column; }
.switch-row b { font-size: 14px; }
.switch-row small { font-size: 12.5px; color: var(--muted); }
.switch { appearance: none; -webkit-appearance: none; width: 50px; height: 30px; border-radius: 99px; background: var(--surface-2); position: relative; cursor: pointer; flex: none; transition: background .2s; box-shadow: inset 0 0 0 1px var(--line); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.switch:checked { background: var(--ink); }
.switch:checked::after { transform: translateX(20px); }
.days { display: flex; gap: 6px; justify-content: space-between; }
.days label { flex: 1; }
.days input { position: absolute; opacity: 0; }
.days span { display: grid; place-items: center; aspect-ratio: 1; max-width: 44px; margin: 0 auto; border-radius: 50%; background: var(--surface-2); font-weight: 800; font-size: 14px; cursor: pointer; }
.days input:checked + span { background: var(--ink); color: var(--bg); }

/* ---------- treino ---------- */
.stat { display: flex; flex-direction: column; padding: 14px; gap: 2px; }
.stat b { font-size: 26px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.stat span { font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.25; }
.stat.dark span { color: var(--on-dark-muted); }
.stat .ic { color: var(--accent); width: 18px; height: 18px; margin-bottom: 4px; }
.heatmap { display: flex; gap: 4px; justify-content: space-between; }
.hm-dow, .hm-col { display: flex; flex-direction: column; gap: 4px; }
.hm-dow span { height: 14px; font-size: 9.5px; font-weight: 700; color: var(--muted); line-height: 14px; width: 10px; }
.hm-col { flex: 1; max-width: 18px; }
.hm-col i, .hm-legend i { display: block; aspect-ratio: 1; width: 100%; min-height: 10px; border-radius: 4px; background: var(--surface-2); }
.l1 { background: color-mix(in srgb, var(--ink) 28%, var(--surface-2)) !important; }
.l2 { background: color-mix(in srgb, var(--ink) 62%, var(--surface-2)) !important; }
.l3 { background: var(--ink) !important; }
.lf { background: transparent !important; box-shadow: inset 0 0 0 1px var(--line); }
.hm-col i.now { box-shadow: 0 0 0 2px var(--accent); }
.hm-legend { display: flex; align-items: center; justify-content: flex-end; gap: 4px; margin-top: 10px; font-size: 11px; color: var(--muted); font-weight: 600; }
.hm-legend i { width: 12px; min-height: 12px; }
.set-form { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 10px; }
.set-form .full { grid-column: 1 / -1; }
.routine { display: flex; flex-wrap: wrap; gap: 6px; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-x { font-size: 10.5px; font-weight: 700; fill: var(--muted); }
.chart-tag { font-size: 12px; font-weight: 800; fill: var(--ink); }
.sheet-table { padding: 8px 6px 8px 14px; overflow-x: auto; }
.sheet-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sheet-table th { text-align: left; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px 6px 8px 0; border-bottom: 1px solid var(--line); }
.sheet-table td { padding: 9px 6px 9px 0; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; vertical-align: middle; }
.sheet-table tr:last-child td { border-bottom: 0; }
.sheet-table td:nth-child(2) { font-weight: 650; }
.sheet-table td:last-child { width: 34px; padding-right: 0; }
.place-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 7px; vertical-align: middle; background: var(--ink); }
.place-dot.casa { background: var(--accent); }
.bw-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }

/* ---------- dieta ---------- */
.kcal-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kcal-card .huge { font-size: 52px; }
.gauge { position: relative; flex: none; }
.gauge .ring-label b { font-size: 22px; }
.macro { padding: 14px 12px; }
.macro .mval { font-size: 22px; font-weight: 800; letter-spacing: -.04em; margin-top: 6px; }
.macro .mval small { font-size: 11.5px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.macro .pbar { margin: 8px 0 6px; height: 6px; }
.macro .eyebrow { font-size: 10.5px; }
.info-card { background: transparent; box-shadow: none; border: 1.5px dashed var(--line); }
.food-ic { width: 40px; height: 40px; border-radius: 13px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.food-ic .ic { width: 18px; height: 18px; }
.tags { display: flex; gap: 4px; margin-top: 3px; }
.tags span { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: var(--surface-2); color: var(--ink-2); }
.food-time { font-size: 12px; color: var(--muted); font-weight: 600; }
.food-kcal { font-size: 16px; text-align: right; line-height: 1; display: flex; flex-direction: column; align-items: flex-end; }
.food-kcal small { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.food-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.food-pick { text-align: left; background: var(--surface-2); border-radius: 14px; padding: 10px 12px; display: flex; flex-direction: column; border: 1.5px solid transparent; }
.food-pick:active { border-color: var(--ink); }
.food-pick b { font-size: 13.5px; }
.food-pick span { font-size: 11.5px; color: var(--muted); font-weight: 600; }
.water-card h3 .ic { color: var(--blue); }

/* ---------- mais ---------- */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile { background: var(--surface); box-shadow: var(--shadow); border-radius: var(--r-lg); padding: 16px; text-align: left; display: flex; flex-direction: column; gap: 2px; min-height: 138px; }
.tile b { font-size: 16px; margin-top: auto; }
.tile > span:last-child { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tile-ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-2); margin-bottom: 18px; }
.t-n .tile-ic { background: #F4EBD9; color: #7A5A1E; }
.t-f .tile-ic { background: #DCE9DF; color: #22643F; }
.t-a .tile-ic { background: var(--accent-soft); color: var(--accent); }
.t-i { background: var(--dark); color: var(--on-dark); }
.t-i .tile-ic { background: linear-gradient(135deg, var(--accent), #F5A15F); color: #fff; }
.t-i > span:last-child { color: var(--on-dark-muted); }
.t-w .tile-ic { background: #DCE5EE; color: #2E5E8C; }
.quote { margin-top: 12px; }
.quote .serif { font-size: 22px; line-height: 1.3; margin-top: 8px; letter-spacing: -.01em; }

/* ---------- notas (papel) ---------- */
.search { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border-radius: 16px; padding-left: 14px; margin-bottom: 16px; }
.search input { background: transparent; padding-left: 0; }
.search .ic { color: var(--muted); }
.notes-grid { columns: 2; column-gap: 12px; }
.note-card {
  --paper: #F4EBD9; --ink-n: #2A261F; --pl: rgba(60, 40, 10, .13);
  break-inside: avoid; position: relative; display: block; margin: 10px 0 14px; padding: 22px 15px 13px;
  background-color: var(--paper); color: var(--ink-n); border-radius: 6px 6px 6px 22px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .05), 0 12px 22px -14px rgba(0, 0, 0, .35);
  transform: rotate(var(--rot)); cursor: pointer; transition: transform .2s;
}
.note-card:hover { transform: rotate(0deg) translateY(-2px); }
.note-card h3 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; font-size: 18px; line-height: 1.15; margin-bottom: 8px; display: block; }
.note-card p { font-size: 13.5px; line-height: 22px; }
.note-card ul { list-style: none; font-size: 13.5px; }
.note-card li { display: flex; align-items: center; gap: 7px; line-height: 22px; }
.note-card li i { width: 11px; height: 11px; border-radius: 50%; border: 1.4px solid currentColor; flex: none; opacity: .6; }
.note-card li.d { text-decoration: line-through; opacity: .55; }
.note-card li.d i { background: currentColor; }
.note-card time { display: block; margin-top: 10px; font-size: 11px; font-weight: 700; opacity: .5; text-transform: uppercase; letter-spacing: .06em; }
.tape { position: absolute; top: -9px; left: 50%; width: 58px; height: 18px; transform: translateX(-50%) rotate(-3deg); background: rgba(255, 255, 255, .55); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); border-left: 2px dotted rgba(0, 0, 0, .06); border-right: 2px dotted rgba(0, 0, 0, .06); }
.note-pin { position: absolute; top: 10px; right: 10px; opacity: .6; }
.note-pin .ic { width: 15px; height: 15px; }
.c-creme { --paper: #F4EBD9; --ink-n: #2A261F; --pl: rgba(80, 55, 10, .14); }
.c-salvia { --paper: #DCE5D2; --ink-n: #1F2A1C; --pl: rgba(20, 60, 20, .13); }
.c-rosa { --paper: #F3DCD6; --ink-n: #2E1D1A; --pl: rgba(110, 30, 20, .12); }
.c-ceu { --paper: #D6E2EA; --ink-n: #18232B; --pl: rgba(20, 50, 80, .13); }
.c-lilas { --paper: #E3DDF0; --ink-n: #221D2E; --pl: rgba(50, 30, 100, .13); }
.c-noite { --paper: #1E1E1C; --ink-n: #F1EEE6; --pl: rgba(255, 255, 255, .1); }
.paper-pautado { background-image: repeating-linear-gradient(to bottom, transparent 0 21px, var(--pl) 21px 22px); background-position: 0 6px; }
.paper-pontilhado { background-image: radial-gradient(var(--pl) 1.1px, transparent 1.3px); background-size: 16px 16px; }
.paper-quadriculado { background-image: linear-gradient(var(--pl) 1px, transparent 1px), linear-gradient(90deg, var(--pl) 1px, transparent 1px); background-size: 18px 18px; }
.note-card.paper-pontilhado, .note-card.paper-quadriculado { background-blend-mode: normal; }

.note-editor {
  --paper: #F4EBD9; background: var(--paper); color: var(--ink-n);
  margin: calc(-14px - env(safe-area-inset-top)) -16px -40px; min-height: 100dvh;
  padding: calc(14px + env(safe-area-inset-top)) 20px 30px; display: flex; flex-direction: column;
}
.note-editor .back, .note-editor .icon-btn.sm { color: var(--ink-n); opacity: .7; }
.note-editor .icon-btn.sm.on { color: var(--accent); opacity: 1; }
.ne-bar { display: flex; align-items: center; justify-content: space-between; }
.ne-title { font-family: 'Fraunces', Georgia, serif; font-size: 32px; font-weight: 600; letter-spacing: -.02em; background: none; border: 0; outline: none; margin-top: 18px; width: 100%; color: inherit; }
.ne-title::placeholder, .ne-body::placeholder, .cl-item input::placeholder { color: currentColor; opacity: .35; }
.ne-date { font-size: 12px; font-weight: 700; opacity: .5; text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 14px; }
.ne-body, .ne-list { flex: 1; min-height: 52vh; }
.ne-body { width: 100%; border: 0; outline: none; resize: none; background-color: transparent; color: inherit; font-size: 17px; line-height: 32px; padding: 0; background-attachment: local; }
.ne-body.paper-pautado { background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--pl) 31px 32px); background-position: 0 0; }
.ne-body.paper-pontilhado { background-size: 20px 20px; }
.ne-list { border-radius: 10px; }
.ne-list.paper-pautado { background-image: repeating-linear-gradient(to bottom, transparent 0 47px, var(--pl) 47px 48px); background-position: 0 0; }
.cl-item { display: flex; align-items: center; gap: 12px; height: 48px; }
.cl-check { width: 24px; height: 24px; border-radius: 50%; border: 1.6px solid currentColor; display: grid; place-items: center; flex: none; opacity: .65; color: inherit; }
.cl-item.add .cl-check { border-style: dashed; opacity: .35; }
.cl-check .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.cl-item.d .cl-check { background: var(--ink-n); color: var(--paper); opacity: 1; }
.cl-item input { flex: 1; background: none; border: 0; outline: none; font-size: 17px; color: inherit; min-width: 0; height: 100%; }
.cl-item.d input { text-decoration: line-through; opacity: .5; }
.cl-item .icon-btn.sm { opacity: .4; }
.ne-tools { position: sticky; bottom: calc(12px + env(safe-area-inset-bottom)); margin-top: 18px; background: color-mix(in srgb, var(--paper) 85%, #fff 15%); border-radius: 22px; padding: 12px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .35); display: flex; flex-direction: column; gap: 10px; }
.c-noite .ne-tools { background: #2A2A27; }
.swatches { display: flex; gap: 10px; justify-content: center; }
.sw { width: 30px; height: 30px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15); }
.sw.on { box-shadow: 0 0 0 2px var(--ink-n), inset 0 0 0 1px rgba(0, 0, 0, .15); }
.c-noite .sw.on { box-shadow: 0 0 0 2px #fff; }
.papers { display: flex; gap: 6px; }
.paper-btn { flex: 1; height: 38px; border-radius: 10px; font-size: 11.5px; font-weight: 700; color: inherit; background-color: rgba(255, 255, 255, .45); --pl: rgba(0, 0, 0, .14); border: 1.5px solid transparent; }
.c-noite .paper-btn { background-color: rgba(255, 255, 255, .06); --pl: rgba(255, 255, 255, .16); }
.paper-btn.paper-pautado { background-image: repeating-linear-gradient(to bottom, transparent 0 7px, var(--pl) 7px 8px); }
.paper-btn.paper-pontilhado { background-size: 7px 7px; }
.paper-btn.paper-quadriculado { background-size: 8px 8px; }
.paper-btn.on { border-color: currentColor; }

/* ---------- finanças ---------- */
.bal-card .huge { font-size: 40px; }
.bal-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--on-dark-muted); font-weight: 600; }
.bal-row span { display: flex; flex-direction: column; }
.bal-row .ic { width: 14px; height: 14px; display: inline; vertical-align: -2px; }
.bal-row b { color: var(--on-dark); font-size: 16px; }
.bal-card .small { margin-top: 8px; }
.fbars { display: flex; gap: 10px; height: 150px; align-items: stretch; }
.fb-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fb-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.fb-pair i { width: 40%; max-width: 14px; border-radius: 6px 6px 3px 3px; min-height: 3px; }
.fb-pair .in { background: var(--ink); opacity: .35; }
.fb-pair .out { background: var(--accent); opacity: .45; }
.fb-col.cur .in, .fb-col.cur .out { opacity: 1; }
.fb-col span { font-size: 12px; font-weight: 700; color: var(--muted); }
.fb-col.cur span { color: var(--ink); }
.cat-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 10px; padding: 6px 0; font-size: 13.5px; font-weight: 600; }
.cat-row .pbar { margin: 0; }
.cat-row .pbar i { background: var(--accent); }
.cat-row b { font-size: 13px; font-variant-numeric: tabular-nums; }
.status { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); }
.status.soon { background: color-mix(in srgb, var(--yellow) 20%, transparent); color: #9A6411; }
.status.late { background: var(--accent-soft); color: var(--accent); }
.status.paid { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.tx-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.tx-ic .ic { width: 17px; height: 17px; }
.tx-ic.in { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); }
.tx-ic.out { background: var(--accent-soft); color: var(--accent); }
.tx b { font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx b.in { color: var(--green); }

/* ---------- premium, anúncios e app ---------- */
:root { --ad-h: 0px; }
.native #main { padding-bottom: calc(120px + env(safe-area-inset-bottom) + var(--ad-h)); }
.native .tabbar { bottom: calc(14px + env(safe-area-inset-bottom) + var(--ad-h)); }
.native .toast { bottom: calc(96px + env(safe-area-inset-bottom) + var(--ad-h)); }
.tab { position: relative; }
.tab-lock { position: absolute; top: 7px; right: calc(50% - 17px); width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }
.pro { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 3px 7px; border-radius: 6px; background: var(--accent); color: #fff; vertical-align: 2px; margin-left: 4px; }
.pro.light { background: rgba(255, 255, 255, .25); }
.pro.big { font-size: 12px; padding: 5px 10px; margin: 0 0 12px; }
.lock-card { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 18px; }
.lock-card h2 { font-size: 21px; }
.lock-ic { position: relative; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.lock-ic .ic { width: 26px; height: 26px; }
.lock-ic b { position: absolute; right: -6px; bottom: -6px; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; }
.lock-ic b .ic { width: 13px; height: 13px; }
.lock-ic.sm { width: 42px; height: 42px; border-radius: 14px; }
.lock-ic.sm .ic { width: 20px; height: 20px; }
.perks { list-style: none; display: flex; flex-direction: column; gap: 10px; width: 100%; margin: 6px 0 4px; }
.perks li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; font-weight: 600; }
.perks li > .ic:first-child { width: 34px; height: 34px; padding: 8px; border-radius: 11px; background: var(--surface-2); }
.perks li span { flex: 1; }
.perks li > .ic:last-child:not(:first-child) { color: var(--green); }
.locked-mini { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.locked-mini > div { flex: 1; min-width: 0; }
.locked-mini p { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.locked-mini > .ic { color: var(--muted); }
.premium-hero { text-align: center; padding: 18px 8px 22px; display: flex; flex-direction: column; align-items: center; }
.premium-hero h1 { font-size: 34px; }
.premium-hero p { color: var(--muted); margin-top: 8px; max-width: 320px; }
.ghost-btn { background: transparent; color: var(--muted); margin-top: 4px; }
.t-p { background: linear-gradient(140deg, var(--accent), #F5A15F); color: #fff; }
.t-p .tile-ic { background: rgba(255, 255, 255, .22); color: #fff; }
.t-p > span:last-child { color: rgba(255, 255, 255, .85); }
.app-banner { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 12px; }
.app-banner img { border-radius: 12px; flex: none; }
.app-banner > div { flex: 1; min-width: 0; }
.app-banner b { font-size: 14.5px; }
.app-banner p { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* ---------- leitor de códigos ---------- */
.scan-cta { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; background: var(--accent); color: #fff; border-radius: var(--r-lg); padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 12px 26px -14px rgba(242, 107, 42, .8); }
.scan-cta > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.scan-cta small { font-size: 12.5px; opacity: .85; font-weight: 600; }
.scan-cta-ic { width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .2); display: grid; place-items: center; flex: none; }
.scan-cta-ic .ic { width: 24px; height: 24px; }
.type-link { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; margin: -2px 0 12px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 6px; }
.type-link .ic { width: 16px; height: 16px; }
.scanner { position: fixed; inset: 0; z-index: 65; background: #0B0B0A; color: #fff; display: flex; flex-direction: column; padding: calc(10px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom)); }
.scanner[hidden] { display: none; }
.scan-top { display: flex; align-items: center; justify-content: space-between; height: 48px; max-width: 460px; width: 100%; margin: 0 auto; }
.scan-top span { width: 44px; }
.scan-x { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .12); display: grid; place-items: center; color: #fff; }
.scan-view { position: relative; flex: 1; min-height: 0; max-width: 460px; width: 100%; margin: 10px auto; border-radius: 28px; overflow: hidden; background: #1C1C1A; }
.scan-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; left: 50%; top: 50%; width: 80%; aspect-ratio: 1.25; transform: translate(-50%, -50%); border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .45); }
.scan-frame i { position: absolute; width: 34px; height: 34px; border: 4px solid var(--accent); }
.scan-frame .c1 { top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: 22px; }
.scan-frame .c2 { top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: 22px; }
.scan-frame .c3 { bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: 22px; }
.scan-frame .c4 { bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: 22px; }
.scan-line { position: absolute; left: 8%; right: 8%; height: 2px; background: var(--accent); box-shadow: 0 0 14px var(--accent); animation: scanline 2s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { top: 12%; } 50% { top: 86%; } }
.scan-msg { text-align: center; font-weight: 700; font-size: 15px; margin-top: 4px; }
.scan-hint { text-align: center; font-size: 13px; color: #A7A49C; max-width: 360px; margin: 6px auto 14px; }
.scan-hint b { color: #fff; }
.scan-actions { display: flex; gap: 10px; max-width: 460px; width: 100%; margin: 0 auto; }
.scan-actions .btn { flex: 1; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.scan-result { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tag.accent { background: var(--accent); color: #fff; }
.raw-code { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.raw-code summary { cursor: pointer; font-weight: 700; }
.raw-code .btn { margin-top: 8px; }
.raw-code code { user-select: all; display: block; margin-top: 8px; padding: 10px; border-radius: 10px; background: var(--bg); word-break: break-all; font-size: 11.5px; }
.nfce-status { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-top: 0; }
.nfce-status.ok { background: color-mix(in srgb, var(--green) 14%, transparent); color: var(--green); font-weight: 700; }
.nfce-status.warn { background: var(--accent-soft); color: var(--ink-2); }
.nfce-status a:not(.btn) { color: var(--accent); font-weight: 700; }
.nfce-open { display: flex; width: 100%; margin-top: 10px; }
.code-input { min-height: 110px !important; padding: 12px 14px !important; font-family: ui-monospace, Consolas, monospace; font-size: 14px !important; resize: vertical; }

/* ---------- alarme ---------- */
.clock-card { padding: 26px 18px 20px; display: flex; flex-direction: column; align-items: center; }
.digital { font-size: 44px; font-weight: 700; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.analog { position: relative; width: min(250px, 72vw); aspect-ratio: 1; margin: 30px 0 30px; }
.analog svg { width: 100%; height: 100%; overflow: visible; }
.analog .num { position: absolute; font-size: 12px; font-weight: 700; color: var(--muted); }
.n12 { top: -24px; left: 50%; transform: translateX(-50%); }
.n6 { bottom: -24px; left: 50%; transform: translateX(-50%); }
.n3 { right: -20px; top: 50%; transform: translateY(-50%); }
.n9 { left: -20px; top: 50%; transform: translateY(-50%); }
.face { fill: var(--surface); stroke: var(--line); stroke-width: 1; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .12)); }
.mk { stroke: var(--line); stroke-width: 1.2; }
.mk.big { stroke: var(--muted); stroke-width: 2; }
.hand { stroke: var(--ink); stroke-linecap: round; }
.hand.h { stroke-width: 4.5; }
.hand.m { stroke-width: 3; }
.hand.s { stroke: var(--accent); stroke-width: 1.6; }
.pivot { fill: var(--ink); stroke: var(--accent); stroke-width: 2; }
.alarm { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; }
.alarm-time { font-size: 36px; font-weight: 600; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.alarm.off .alarm-time { color: var(--muted); }

.ringing { position: fixed; inset: 0; z-index: 60; background: var(--dark); color: var(--on-dark); display: grid; place-items: center; padding: 24px; }
.ringing[hidden] { display: none; }
.ring-box { text-align: center; display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 360px; }
.ring-time { font-size: 84px; font-weight: 700; letter-spacing: -.04em; line-height: 1; margin: 12px 0 8px; font-variant-numeric: tabular-nums; }
.ring-label-txt { font-size: 18px; color: var(--on-dark-muted); font-weight: 600; }
.pulse { width: 120px; height: 120px; border-radius: 50%; background: var(--accent); margin: 50px 0; animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { transform: scale(.85); box-shadow: 0 0 0 0 rgba(242, 107, 42, .5); } 50% { transform: scale(1); box-shadow: 0 0 0 30px rgba(242, 107, 42, 0); } }
.ring-actions { display: flex; gap: 12px; width: 100%; }
.ring-actions .btn { flex: 1; min-height: 58px; font-size: 16px; }
.ring-actions .btn:not(.btn-accent) { background: var(--dark-2); color: var(--on-dark); }

/* ---------- assistente ---------- */
.chat { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.msg { max-width: 88%; padding: 12px 15px; border-radius: 20px; font-size: 14.5px; line-height: 1.5; }
.msg.ai { background: var(--surface); box-shadow: var(--shadow); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.me { background: var(--ink); color: var(--bg); border-bottom-right-radius: 6px; align-self: flex-end; }
.msg .btn { margin-top: 10px; }
.ai-ul { margin: 8px 0 4px 18px; }
.ai-ul li { margin: 3px 0; }
.ai-ul.tips { list-style: none; margin-left: 0; font-size: 13.5px; color: var(--ink-2); }
.ai-ul.tips li { padding-left: 14px; position: relative; }
.ai-ul.tips li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.ai-plan { margin: 10px 0 6px; border-left: 2px solid var(--line); padding-left: 12px; }
.ai-part { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 10px 0 4px; }
.ai-row { display: flex; gap: 10px; align-items: baseline; padding: 3px 0; }
.ai-row b { font-variant-numeric: tabular-nums; font-size: 13.5px; min-width: 42px; }
.ai-row span { flex: 1; }
.ai-row em { font-style: normal; font-size: 10.5px; font-weight: 800; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; }
.sug-list { display: none; }
.chips-row { display: flex; gap: 6px; overflow-x: auto; margin: 0 -16px 10px; padding: 2px 16px; scrollbar-width: none; }
.chips-row::-webkit-scrollbar { display: none; }
.chips-row .pill { background: var(--surface); box-shadow: var(--shadow); }
.composer { display: flex; gap: 8px; align-items: center; position: sticky; bottom: calc(92px + env(safe-area-inset-bottom)); background: var(--bg); padding: 6px 0; }
.composer input { flex: 1; background: var(--surface); box-shadow: var(--shadow); border-radius: 999px; min-height: 48px; padding: 0 18px; }

/* ---------- widgets ---------- */
.widget-stage { background: linear-gradient(160deg, #C9C3B8, #9F9A90); border-radius: 32px; padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.widget-stage.solo { background: none; padding: 0; }
.w-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wdg { background: #F6F5F1; color: #141413; border-radius: 26px; padding: 16px; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .4); }
.wdg.dark { background: #161615; color: #F5F4F0; }
.wdg .muted { color: #8A877F; }
.w-date { display: flex; flex-direction: column; aspect-ratio: 1; }
.w-date b { font-size: 60px; font-weight: 800; letter-spacing: -.06em; line-height: .9; }
.w-date > span { font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.w-wx { margin-top: auto; display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: 16px; }
.w-wx .wxi { width: 24px; height: 24px; }
.w-score { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; gap: 8px; }
.w-score .ring-label { position: absolute; inset: 0 0 26px 0; }
.w-score .ring-label b { font-size: 20px; }
.w-score p { font-size: 11.5px; font-weight: 700; color: #9A978F; display: flex; align-items: center; gap: 3px; }
.w-score p .ic { width: 13px; height: 13px; }
.w-tasks-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.w-tasks-head span { font-size: 12px; color: #9A978F; font-weight: 600; }
.w-task { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid rgba(255, 255, 255, .08); font-size: 14px; }
.w-task i { width: 4px; height: 18px; border-radius: 3px; flex: none; }
.w-task span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-task b { font-variant-numeric: tabular-nums; font-size: 13px; }
.w-weather { background: #A9C3CF; }
.w-weather .wx-temp { font-size: 48px; }
.w-weather .wx-icon .wxi { width: 42px; height: 42px; }
.w-weather .wx-place span { display: flex; align-items: center; gap: 4px; }
.w-weather .wx-place .ic { width: 14px; height: 14px; }
.w-dots { background: #E8E6E1; }
.w-dots-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 14px; }
.w-dots-head b { font-size: 56px; font-weight: 800; letter-spacing: -.06em; line-height: .85; }
.w-dots-head div { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; line-height: 1.2; }
.dots-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; justify-items: center; }
.dots-grid .dl { font-size: 10.5px; font-weight: 600; color: #8A877F; }
.dots-grid i { width: 100%; max-width: 30px; aspect-ratio: 1; border-radius: 50%; }
.dots-grid i.p { background: #141413; }
.dots-grid i.t { background: var(--accent); }
.dots-grid i.f { box-shadow: inset 0 0 0 1.5px #C8C4BC; }
.w-motto { text-align: center; font-size: 10.5px; letter-spacing: .2em; color: #8A877F; margin-top: 14px; font-weight: 600; }
.steps ol { margin: 10px 0 10px 18px; font-size: 14px; }
.steps li { margin: 6px 0; }
body.widget-mode #main { padding-bottom: 30px; }

/* ---------- ajustes ---------- */
.form-card .switch-row { margin-bottom: 6px; }

/* ---------- sheet & toast ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; pointer-events: none; }
.sheet:empty { display: none; }
.sheet-bg { position: absolute; inset: 0; background: rgba(10, 10, 9, .4); opacity: 0; transition: opacity .25s; }
.sheet-card { position: absolute; left: 50%; bottom: 0; width: min(460px, 100%); max-height: 90dvh; overflow-y: auto; background: var(--surface); border-radius: 28px 28px 0 0; padding: 8px 18px calc(18px + env(safe-area-inset-bottom)); transform: translate(-50%, 100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); overscroll-behavior: contain; }
.sheet.open { pointer-events: auto; }
.sheet.open .sheet-bg { opacity: 1; }
.sheet.open .sheet-card { transform: translate(-50%, 0); }
.sheet-handle { width: 40px; height: 5px; border-radius: 9px; background: var(--line); margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sheet-head h3 { font-size: 20px; }
.sheet-card .field input, .sheet-card .field select { background: var(--bg); }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 650; opacity: 0; pointer-events: none; transition: .25s; z-index: 70; max-width: calc(100% - 32px); display: flex; align-items: center; gap: 12px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast-btn { color: var(--accent); font-weight: 800; }

@media (min-width: 520px) {
  body { padding: 20px 0; }
  .app { background: var(--bg); }
}
@media (max-width: 360px) {
  h1 { font-size: 26px; }
  .score-card { gap: 12px; }
  .grid3 .stat b { font-size: 22px; }
  .kcal-card .huge { font-size: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.trial-banner { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--accent-soft); box-shadow: none; cursor: pointer; padding: 14px 16px; }
.trial-banner .pro { margin-left: 0; }
.trial-banner p { font-size: 13.5px; line-height: 1.45; }
.next-alarm { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.next-alarm span { font-size: 13px; color: var(--muted); }
.next-alarm span b { color: var(--ink); }
.next-alarm strong { font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--accent); }
.next-alarm small { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.alarm-title { font-size: 15px; font-weight: 700; margin-top: 2px; }
.alarm.off .alarm-title { color: var(--muted); }
.alarm-in { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 700; }
.alarm-in .ic { width: 14px; height: 14px; }
.agenda-tag { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; padding: 3px 7px; margin-left: 8px; vertical-align: 8px; letter-spacing: 0; }
.agenda-tag .ic { width: 12px; height: 12px; }
.det-alarm { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.det-alarm .ic { width: 13px; height: 13px; }
/* ---------- iPhone / app web ---------- */
.ios-card { padding: 14px 14px 16px; }
.ios-head { display: flex; align-items: center; gap: 12px; }
.ios-head img { border-radius: 11px; flex: none; }
.ios-head > div { flex: 1; min-width: 0; }
.ios-head b { font-size: 15px; }
.ios-head p { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.ios-steps { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.ios-steps li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; background: var(--surface-2); border-radius: 12px; padding: 9px 12px; flex-wrap: wrap; }
.ios-steps li > span { width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: none; }
.ios-share { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1.5px solid var(--blue); color: var(--blue); }
.ios-share .ic { width: 14px; height: 14px; stroke-width: 2.4; }
.cal-btn { margin-top: 14px; min-height: 46px; background: var(--surface-2); }
.icon-btn.ext { color: var(--accent); }
.ok-line { display: flex; align-items: center; gap: 6px; color: var(--green); font-weight: 700; margin-bottom: 4px; }
.ok-line .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.tiny { font-size: 11.5px; margin-top: 10px; line-height: 1.4; }
.web-alarm-help { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.web-alarm-help h3 .ic { color: var(--accent); }
.web-alarm-help .small .ic { width: 14px; height: 14px; vertical-align: -2px; }
.shortcut-help summary { cursor: pointer; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.shortcut-help summary .ic { width: 16px; height: 16px; color: var(--accent); }
.shortcut-help ol { margin: 8px 0 8px 20px; display: flex; flex-direction: column; gap: 6px; }
.shortcut-help p { margin-top: 8px; }
.warn-line { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin: 6px 0; line-height: 1.45; }
.ai-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-btns .btn { margin-top: 0; }
.ghost-undo { background: transparent; border: 1.5px solid var(--line); color: var(--ink-2); }
.msg .ai-part { margin-top: 8px; }
.remind-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 4px 0 12px; }
.chk { display: flex; align-items: flex-start; gap: 8px; background: var(--surface-2); border-radius: 12px; padding: 9px 10px; cursor: pointer; font-size: 13px; font-weight: 700; }
.chk input { accent-color: var(--ink); width: 16px; height: 16px; margin-top: 1px; flex: none; }
.chk span { display: flex; flex-direction: column; }
.chk small { font-size: 11px; font-weight: 600; color: var(--muted); }
.det-remind { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12px; font-weight: 600; color: var(--muted); flex-wrap: wrap; }
.det-remind .ic { width: 13px; height: 13px; }
/* ---------- boas-vindas ---------- */
.welcome { display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: 18px 4px 10px; max-width: 420px; margin: 0 auto; }
.welcome-logo { width: 84px; height: 84px; border-radius: 22px; align-self: center; box-shadow: var(--shadow); }
.welcome h1 { font-size: 32px; text-align: center; text-wrap: balance; margin-top: 4px; }
.welcome-sub { text-align: center; color: var(--muted); font-size: 15px; margin-top: -6px; }
.welcome-feats { list-style: none; display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.welcome-feats li { display: flex; align-items: center; gap: 12px; background: var(--surface); border-radius: 16px; padding: 11px 13px; box-shadow: var(--shadow); }
.welcome-feats li > span { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.welcome-feats b { display: block; font-size: 14.5px; }
.welcome-feats small { color: var(--muted); font-size: 12.5px; }
.welcome-trial { display: flex; align-items: center; gap: 8px; background: var(--accent-soft); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; }
.welcome-trial .ic { color: var(--accent); }
.welcome .btn-block { margin-top: 0; }
.welcome-foot { text-align: center; font-size: 12.5px; color: var(--muted); }
.welcome-foot a { color: var(--accent); font-weight: 700; }
.link-lang { color: var(--accent); font-weight: 700; font-size: 12.5px; }
.demo-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; background: var(--surface-2); box-shadow: none; }
.demo-banner > .ic { color: var(--accent); }
.demo-banner p { flex: 1; min-width: 180px; font-size: 13px; }
