/* DecideLess — styles. System fonts only. No red anywhere. */
:root {
  --primary: #BFA7E6;
  --deep: #3D2A56;
  --accent: #F3DC9F;
  --bg: #F2EDFA;
  --card: #FBF9FE;
  --card-2: #EEE6F9;
  --line: #DCD0EE;
  --text: #3D2A56;
  --muted: #5F4F78;
  --hero-bg: #BFA7E6;
  --hero-text: #2B1D40;
  --action-bg: #F3DC9F;
  --action-text: #3D2A56;
  --chip-on-bg: #3D2A56;
  --chip-on-text: #FBF9FE;
  --focus: #3D2A56;
  --soft-amber-bg: #FBEFD2;
  --soft-amber-text: #6E4A00;
  --track: #E4DAF3;
  --fill: #8E70C2;
  --shadow: 0 1px 2px rgba(61, 42, 86, .06), 0 4px 14px rgba(61, 42, 86, .06);
  --radius: 20px;
  --radius-sm: 14px;
  --tap: 44px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Arabic", "Geeza Pro", Tahoma, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #1D1826;
  --card: #2A2236;
  --card-2: #342A44;
  --line: #43375A;
  --text: #EFE8FA;
  --muted: #C9BBE3;
  --hero-bg: #BFA7E6;
  --hero-text: #22172F;
  --action-bg: #F3DC9F;
  --action-text: #2B1D40;
  --chip-on-bg: #BFA7E6;
  --chip-on-text: #1D1826;
  --focus: #F3DC9F;
  --soft-amber-bg: #3B3020;
  --soft-amber-text: #F3DC9F;
  --track: #3E3350;
  --fill: #BFA7E6;
  --shadow: 0 1px 2px rgba(0, 0, 0, .25), 0 6px 18px rgba(0, 0, 0, .18);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--card); color: var(--text); padding: 10px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }

/* ---------- Layout ---------- */
.app { max-width: 640px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 0; gap: 12px; }
.brand { display: flex; align-items: center; height: 46px; }
.wordmark { height: 46px; width: auto; display: block; margin-inline-start: -10px; }
[dir="rtl"] .wordmark { margin-inline-start: -10px; }
.wm-dark { display: none; }
[data-theme="dark"] .wm-dark { display: block; }
[data-theme="dark"] .wm-light { display: none; }
.timer-pill { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font-size: 14px; font-variant-numeric: tabular-nums; min-height: var(--tap); display: inline-flex; align-items: center; gap: 8px; }
.main { flex: 1; padding: 6px 16px calc(96px + var(--safe-b)); outline: none; }
.app.no-tabs .main { padding-bottom: calc(32px + var(--safe-b)); }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
  display: flex; justify-content: center;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: var(--safe-b);
}
.tabbar-inner { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; max-width: 640px; }
.tab { background: none; border: 0; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; color: var(--muted); padding: 6px 2px; }
.tab svg { width: 24px; height: 24px; }
.tab .tab-ico { display: grid; place-items: center; width: 48px; height: 30px; border-radius: 999px; transition: background .2s; }
.tab[aria-current="page"] { color: var(--text); font-weight: 600; }
.tab[aria-current="page"] .tab-ico { background: var(--primary); color: var(--deep); }

/* ---------- Header of each tab ---------- */
.hello { margin: 10px 0 2px; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; }
.subdate { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.tab-title { margin: 12px 0 12px; font-size: 24px; font-weight: 700; }

.seg { display: inline-grid; grid-auto-flow: column; background: var(--card-2); border-radius: 999px; padding: 4px; gap: 2px; margin-bottom: 14px; }
.seg button { border: 0; background: none; min-height: 40px; min-width: 76px; padding: 0 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Hero: Do this now ---------- */
.hero {
  background: var(--hero-bg); color: var(--hero-text);
  border-radius: 28px; padding: 22px 20px 20px; text-align: center;
  box-shadow: var(--shadow); margin-bottom: 16px; position: relative;
}
.hero-label { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin: 0 0 8px; display: inline-flex; gap: 8px; align-items: center; }
.hero-label .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(61, 42, 86, .15); }
.hero-title { font-size: 24px; line-height: 1.25; font-weight: 750; margin: 0 auto 8px; max-width: 30ch; overflow-wrap: anywhere; }
.hero-reason { margin: 0 auto 18px; max-width: 36ch; font-size: 16px; opacity: .92; }
.hero-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-do { background: var(--action-bg); color: var(--action-text); border: 0; min-height: 52px; padding: 0 30px; border-radius: 999px; font-weight: 750; font-size: 17px; box-shadow: 0 2px 0 rgba(61, 42, 86, .18); }
.btn-later { background: transparent; color: var(--hero-text); border: 2px solid rgba(43, 29, 64, .35); min-height: 52px; padding: 0 22px; border-radius: 999px; font-weight: 650; font-size: 16px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.hero-chips .chip { background: rgba(251, 249, 254, .65); border-color: transparent; color: var(--hero-text); }
.hero-chips .chip:hover { background: var(--accent); }
.hero-rest { font-size: 20px; }
.hero-mini { font-size: 14px; margin-top: 12px; opacity: .85; }
.hero-mini button { background: none; border: 0; color: inherit; text-decoration: underline; min-height: var(--tap); padding: 0 8px; }

/* ---------- Cards ---------- */
.cards { display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid transparent; }
.card.pinned { border-color: var(--primary); }
.card-head { display: flex; align-items: center; gap: 4px; padding-inline-end: 4px; }
.card-toggle { flex: 1; display: flex; align-items: center; gap: 12px; background: none; border: 0; text-align: start; padding: 14px 6px 14px 16px; min-height: 64px; border-radius: var(--radius); }
[dir="rtl"] .card-toggle { padding: 14px 16px 14px 6px; }
.card-ico { width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--card-2); color: var(--text); display: grid; place-items: center; }
.card-ico svg { width: 22px; height: 22px; }
.card-txt { display: flex; flex-direction: column; min-width: 0; }
.card-title { font-weight: 700; font-size: 16px; }
.card-sum { color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; }
.card-hint { color: var(--muted); font-size: 13px; font-style: italic; margin-top: 2px; }
.card-chev { color: var(--muted); transition: transform .2s; flex: none; }
.card.open .card-chev { transform: rotate(180deg); }
.card-menu-btn { background: none; border: 0; width: var(--tap); height: var(--tap); border-radius: 12px; color: var(--muted); display: grid; place-items: center; flex: none; }
.card-body { padding: 0 16px 16px; }
.card.shrunk .card-toggle { min-height: 48px; padding-top: 6px; padding-bottom: 6px; }
.card.shrunk .card-ico { width: 30px; height: 30px; border-radius: 9px; }
.card.shrunk .card-ico svg { width: 18px; height: 18px; }
.card.shrunk .card-txt { flex-direction: row; gap: 8px; align-items: baseline; flex-wrap: nowrap; white-space: nowrap; }
.card.shrunk .card-title { font-size: 15px; }
.card.shrunk .card-sum { font-size: 14px; }
.card.shrunk .card-hint { display: none; }
.pin-mark { color: var(--muted); display: inline-flex; margin-inline-start: 6px; vertical-align: middle; }

.more-row { margin-top: 18px; }
.more-title { font-size: 14px; font-weight: 700; color: var(--muted); margin: 0 4px 8px; }
.icon-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.icon-btn { background: var(--card); border: 1px solid var(--line); border-radius: 16px; min-height: 84px; padding: 10px 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 600; text-align: center; color: var(--text); }
.icon-btn svg { width: 24px; height: 24px; }
.icon-btn .ib-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--card-2); display: grid; place-items: center; }

/* ---------- Controls ---------- */
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.btn { background: var(--card-2); color: var(--text); border: 1px solid var(--line); min-height: var(--tap); padding: 0 16px; border-radius: 999px; font-weight: 650; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.primary { background: var(--deep); color: #FBF9FE; border-color: var(--deep); }
[data-theme="dark"] .btn.primary { background: var(--primary); color: #1D1826; border-color: var(--primary); }
.btn.gold { background: var(--accent); color: var(--deep); border-color: var(--accent); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.block { width: 100%; }
.btn svg { width: 18px; height: 18px; }
.iconbtn { background: none; border: 0; width: var(--tap); height: var(--tap); border-radius: 12px; display: inline-grid; place-items: center; color: var(--muted); flex: none; }
.iconbtn svg { width: 20px; height: 20px; }
.iconbtn:hover, .btn.ghost:hover { background: var(--card-2); }
.chip { background: var(--card); border: 1px solid var(--line); color: var(--text); min-height: var(--tap); padding: 0 16px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.chip[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-text); border-color: var(--chip-on-bg); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 14px; font-weight: 650; color: var(--muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: var(--tap); padding: 10px 14px; border-radius: 14px;
  border: 1.5px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 45%, transparent); }
.input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.note { color: var(--muted); font-size: 14px; margin: 6px 0 0; }
.soft { background: var(--card-2); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 15px; }
.amber { background: var(--soft-amber-bg); color: var(--soft-amber-text); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 15px; }
.empty { color: var(--muted); font-size: 15px; padding: 8px 2px; }
.hr { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.sec-title { font-size: 15px; font-weight: 700; margin: 14px 0 8px; }
.big-num { font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.item { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 14px; padding: 4px 4px 4px 6px; min-height: 52px; }
[dir="rtl"] .item { padding: 4px 6px 4px 4px; }
.item .txt { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 6px 2px; }
.item .txt small { display: block; color: var(--muted); font-size: 13px; }
.item.main-one { background: color-mix(in srgb, var(--accent) 55%, var(--bg)); }
[data-theme="dark"] .item.main-one { background: color-mix(in srgb, var(--accent) 18%, var(--bg)); }
.check {
  width: var(--tap); height: var(--tap); flex: none; display: grid; place-items: center;
  background: none; border: 0; border-radius: 50%; color: var(--text);
}
.check .box { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--primary); display: grid; place-items: center; transition: background .2s; }
.check[aria-checked="true"] .box, .check[aria-pressed="true"] .box { background: var(--primary); border-color: var(--primary); color: var(--deep); }
.check .box svg { width: 16px; height: 16px; opacity: 0; }
.check[aria-checked="true"] .box svg, .check[aria-pressed="true"] .box svg { opacity: 1; }
.done-txt { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); color: var(--muted); }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: var(--deep); margin-inline-start: 6px; vertical-align: 1px; }
.tag.soft-tag { background: var(--card-2); color: var(--muted); }

/* progress */
.bar { height: 10px; background: var(--track); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--fill); border-radius: 999px; }
.dots30 { display: grid; grid-template-columns: repeat(15, 1fr); gap: 3px; margin-top: 6px; }
.dots30 i { aspect-ratio: 1; border-radius: 50%; background: var(--track); }
.dots30 i.on { background: var(--fill); }
.water { display: flex; flex-wrap: wrap; gap: 6px; }
.water button { width: var(--tap); height: var(--tap); border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg); display: grid; place-items: center; color: var(--muted); }
.water button.on { background: var(--primary); border-color: var(--primary); color: var(--deep); }
.water svg { width: 20px; height: 20px; }

/* energy */
.energy { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.energy button { min-height: 64px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--bg); font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.energy button svg { width: 22px; height: 22px; }
.energy button[aria-pressed="true"] { background: var(--chip-on-bg); color: var(--chip-on-text); border-color: var(--chip-on-bg); }

/* week / month */
.week { display: flex; flex-direction: column; gap: 8px; }
.wday { background: var(--card); border-radius: 16px; padding: 10px 12px; box-shadow: var(--shadow); }
.wday.today { outline: 2px solid var(--primary); }
.wday-h { display: flex; align-items: center; justify-content: space-between; font-weight: 700; }
.wday-h small { color: var(--muted); font-weight: 500; }
.wday ul { list-style: none; margin: 6px 0 0; padding: 0; font-size: 15px; display: flex; flex-direction: column; gap: 2px; }
.wday li { display: flex; gap: 6px; align-items: baseline; }
.wday li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: none; transform: translateY(-2px); }
.wday li.bill::before { background: var(--accent); border: 1px solid var(--deep); }
.wday li.done { color: var(--muted); text-decoration: line-through; }
.month-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.month-nav h3 { margin: 0; font-size: 18px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; background: var(--card); padding: 10px; border-radius: var(--radius); box-shadow: var(--shadow); }
.cal .dow { text-align: center; font-size: 12px; color: var(--muted); font-weight: 700; padding: 4px 0; }
.cal button { aspect-ratio: 1; min-height: 40px; border: 0; background: var(--bg); border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 14px; font-variant-numeric: tabular-nums; padding: 0; }
.cal button.out { opacity: .35; }
.cal button.today { background: var(--primary); color: var(--deep); font-weight: 800; }
.cal button[aria-pressed="true"] { outline: 2px solid var(--deep); }
[data-theme="dark"] .cal button[aria-pressed="true"] { outline-color: var(--accent); }
.cal .mk { display: flex; gap: 3px; height: 6px; }
.cal .mk i { width: 6px; height: 6px; border-radius: 50%; background: var(--fill); }
.cal .mk i.b { background: var(--accent); box-shadow: 0 0 0 1px var(--deep); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); margin: 8px 4px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: var(--fill); display: inline-block; }
.legend i.b { background: var(--accent); box-shadow: 0 0 0 1px var(--deep); }

/* meals grid */
.meals { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 6px; align-items: stretch; font-size: 14px; }
.meals .mh { font-weight: 700; color: var(--muted); font-size: 12px; text-align: center; align-self: end; }
.meals .md { font-weight: 700; align-self: center; padding-inline-end: 4px; font-size: 13px; }
.meals button { min-height: var(--tap); border: 1.5px dashed var(--line); background: var(--bg); border-radius: 12px; padding: 6px; font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.meals button.has { border-style: solid; background: var(--card-2); }

/* wheel */
.wheel-wrap { display: grid; place-items: center; }
.wheel-wrap svg { width: min(300px, 80vw); height: auto; }
.wheel-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.rate { display: flex; gap: 2px; flex-wrap: wrap; }
.rate button { width: 30px; height: var(--tap); border: 0; background: none; display: grid; place-items: center; padding: 0; }
.rate button i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--primary); display: block; }
.rate button.on i { background: var(--primary); }

/* step view */
.step-big { text-align: center; padding: 18px 8px; }
.step-big .count { color: var(--muted); font-size: 14px; font-weight: 600; }
.step-big .now { font-size: 26px; font-weight: 750; line-height: 1.25; margin: 10px 0 18px; overflow-wrap: anywhere; }

/* timer */
.timer { text-align: center; padding: 10px 0; }
.ring { width: 220px; height: 220px; margin: 0 auto; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .t { position: absolute; inset: 0; display: grid; place-items: center; font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring .ph { position: absolute; bottom: 52px; left: 0; right: 0; color: var(--muted); font-size: 14px; font-weight: 600; }
.breath { width: 120px; height: 120px; border-radius: 50%; margin: 10px auto 16px; background: radial-gradient(circle, var(--primary) 0%, color-mix(in srgb, var(--primary) 30%, transparent) 70%); animation: breathe 8s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.82); } 50% { transform: scale(1); } }

/* ---------- Sheet ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(29, 24, 38, .45); z-index: 40; animation: fade .18s ease-out; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; margin: 0 auto; max-width: 640px;
  background: var(--card); color: var(--text); border-radius: 26px 26px 0 0;
  max-height: 92vh; display: flex; flex-direction: column;
  box-shadow: 0 -8px 40px rgba(29, 24, 38, .25); animation: rise .22s ease-out;
  padding-bottom: var(--safe-b);
}
.sheet-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 4px 20px; }
[dir="rtl"] .sheet-head { padding: 8px 20px 4px 10px; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 20px; }
.sheet-body { overflow: auto; padding: 8px 20px 24px; overscroll-behavior: contain; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@media (min-width: 700px) {
  .sheet { bottom: auto; top: 50%; transform: translateY(-50%); border-radius: 26px; max-height: 86vh; animation: fade .18s ease-out; }
}

/* menu popover inside sheet-like small */
.menu-list { display: flex; flex-direction: column; gap: 6px; }
.menu-list button { text-align: start; min-height: 52px; padding: 0 16px; border-radius: 14px; border: 0; background: var(--bg); font-weight: 600; display: flex; gap: 12px; align-items: center; }
.menu-list svg { width: 20px; height: 20px; }

/* ---------- Toast ---------- */
.toast-root { position: fixed; left: 0; right: 0; bottom: calc(76px + var(--safe-b)); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 12px; }
.toast { pointer-events: auto; background: var(--deep); color: #FBF9FE; border-radius: 16px; padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 12px; max-width: 560px; width: max-content; box-shadow: 0 6px 24px rgba(29, 24, 38, .3); animation: rise .2s ease-out; font-size: 15px; min-height: 48px; }
[dir="rtl"] .toast { padding: 8px 16px 8px 8px; }
[data-theme="dark"] .toast { background: #F2EDFA; color: #3D2A56; }
.toast button { background: var(--accent); color: var(--deep); border: 0; border-radius: 999px; min-height: 40px; padding: 0 16px; font-weight: 750; }
.toast.noact { padding: 12px 18px; }

/* ---------- Onboarding ---------- */
.onb { min-height: 100vh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top, 0px)) 22px 32px; }
.onb .wordmark { height: 58px; margin: 0 auto 18px; }
.onb h1 { font-size: 28px; line-height: 1.2; margin: 8px 0 8px; text-align: center; }
.onb p.lead { text-align: center; color: var(--muted); margin: 0 0 22px; font-size: 17px; }
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lang-grid button { min-height: 58px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--card); font-size: 17px; font-weight: 650; }
.lang-grid button[aria-pressed="true"] { border-color: var(--deep); background: var(--primary); color: var(--deep); }
.onb .spacer { flex: 1; min-height: 20px; }
.onb .btn { min-height: 54px; font-size: 17px; }
.onb-dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.onb-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.onb-dots i.on { background: var(--deep); width: 22px; border-radius: 4px; }
[data-theme="dark"] .onb-dots i.on { background: var(--primary); }
.privacy-art { width: 96px; height: 96px; margin: 10px auto 8px; border-radius: 28px; background: var(--primary); color: var(--deep); display: grid; place-items: center; }
.privacy-art svg { width: 48px; height: 48px; }

/* iOS guide */
.ios-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; counter-reset: s; }
.ios-steps li { display: flex; gap: 14px; align-items: center; background: var(--bg); border-radius: 16px; padding: 14px; }
.ios-steps .n { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--deep); font-weight: 800; display: grid; place-items: center; flex: none; }
.ios-steps .ill { width: 48px; height: 48px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: #2F6FDF; }
[data-theme="dark"] .ios-steps .ill { color: #8DB4FF; }
.ios-steps .ill svg { width: 26px; height: 26px; }

/* Settings */
.set-group { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 12px; overflow: hidden; }
.set-group h2 { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0; padding: 14px 16px 4px; }
.set-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 56px; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row .grow > div:first-child { font-weight: 650; }
.set-row .grow > div + div { color: var(--muted); font-size: 14px; }
.switch { position: relative; width: 52px; height: 32px; flex: none; border-radius: 999px; background: var(--track); border: 0; padding: 0; }
.switch::after { content: ""; position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: inset-inline-start .18s; }
.switch[aria-checked="true"] { background: var(--deep); }
[data-theme="dark"] .switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { inset-inline-start: 24px; }
.switch-hit { min-height: var(--tap); min-width: var(--tap); display: grid; place-items: center; background: none; border: 0; padding: 0; }
.footer { text-align: center; color: var(--muted); font-size: 14px; padding: 18px 0 8px; line-height: 1.7; }

/* Rough day */
.rough-num { text-align: center; background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.rough-num .label { display: block; margin-bottom: 4px; }
.rough-foot { text-align: center; margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* flip directional icons in RTL */
[dir="rtl"] .flip { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (min-width: 700px) {
  .main { padding-top: 12px; }
  .hero { padding: 30px 28px 26px; }
  .hero-title { font-size: 28px; }
}
