.screen {
  min-height: 100dvh;
  max-width: 430px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top, 0px) + 18px) var(--pad) calc(env(safe-area-inset-bottom, 0px) + 24px);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow-x: hidden;
}
.screen--tabbed { padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 91px); }
.screen--modal { min-height: 100dvh; }
.screen--center { align-items: center; text-align: center; justify-content: center; }
.screen__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.screen__title { margin: 0; font-size: 26px; line-height: 1.16; font-weight: 650; letter-spacing: -.02em; }
.screen__title--sm { font-size: 22px; }
.screen__subtitle { margin: 5px 0 0; color: var(--text-60); font-size: 13px; line-height: 1.5; }
.label { color: var(--text-45); font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
.muted { color: var(--text-60); }
.hint { color: var(--text-45); font-size: 12.5px; line-height: 1.55; text-align: center; }
.grow { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack--lg { gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row--between { justify-content: space-between; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.card--highlight { background: var(--accent-12); border: 1.5px solid var(--accent); box-shadow: var(--shadow-glow); }
.card--insight { background: rgba(145, 132, 217, .1); border-color: rgba(145, 132, 217, .35); }
.card--night { background: linear-gradient(160deg, var(--surface-night-a), var(--surface-night-b)); border: 1px solid rgba(179,169,230,.16); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; min-width: 0; }
.stat__value { font-size: 22px; font-weight: 650; line-height: 1.15; }
.stat__label { color: var(--text-60); font-size: 11px; margin-top: 3px; }
.btn { width: 100%; min-height: var(--tap); border-radius: var(--radius); padding: 11px 15px; color: var(--text); border: 1px solid var(--border-strong); background: transparent; font-weight: 650; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:active { opacity: .7; }
.btn:disabled { opacity: .38; cursor: default; }
.btn--primary { border: 1.5px solid var(--accent); background: var(--accent-12); }
.btn--hero { min-height: 66px; border-radius: var(--radius-lg); border: 1.5px solid var(--accent); background: var(--accent-12); box-shadow: var(--shadow-glow); font-size: 16px; letter-spacing: .02em; }
.btn--ghost { color: var(--text-80); }
.btn--text { width: auto; border: 0; background: none; color: var(--accent-light); padding: 8px; }
.icon-btn { width: var(--tap); height: var(--tap); border: 0; border-radius: 50%; background: var(--surface); color: var(--text-60); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.icon { width: 22px; height: 22px; display: inline-block; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon--fill { fill: currentColor; stroke-width: 1.3; }
.option { min-height: 66px; width: 100%; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text); display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; }
.option[aria-pressed="true"], .option--selected { border: 1.5px solid var(--accent); background: var(--accent-12); }
.option__icon { width: 42px; color: var(--accent-light); display: flex; justify-content: center; flex: none; }
.option__body { flex: 1; min-width: 0; }
.option__title { font-size: 15px; font-weight: 650; }
.option__meta { color: var(--text-60); font-size: 12px; margin-top: 3px; }
.chip-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.chip { min-height: 44px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--surface); color: var(--text-80); padding: 8px; font-size: 13px; cursor: pointer; }
.chip[aria-pressed="true"] { border: 1.5px solid var(--accent); background: var(--accent-12); color: var(--text); font-weight: 650; }
.badge, .points-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent-border); border-radius: var(--radius-pill); color: var(--accent-light); padding: 6px 11px; font-size: 11px; font-weight: 650; letter-spacing: .05em; }
.points-pill { font-size: 13px; letter-spacing: 0; }
.progress { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress__fill { height: 100%; width: var(--progress, 0%); background: var(--accent); border-radius: inherit; transition: width .25s ease; }
.task { min-height: 42px; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.task + .task { border-top: 1px solid rgba(233,233,237,.055); }
.task--done { color: var(--text-45); }
.task--done .task__text { text-decoration: line-through; }
.task__points { margin-left: auto; color: var(--accent-light); font-size: 11px; }
.check { width: 20px; height: 20px; border: 1.5px solid var(--text-30); border-radius: 50%; display: grid; place-items: center; flex: none; color: transparent; }
.check--done { border-color: var(--accent); background: var(--accent); color: #161826; }
.tabbar { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(430px, 100%); height: calc(72px + env(safe-area-inset-bottom, 0px)); padding: 7px 10px env(safe-area-inset-bottom, 0px); border-top: 1px solid var(--border); background: rgba(22,24,38,.96); backdrop-filter: blur(16px); display: grid; grid-template-columns: repeat(5, 1fr); z-index: 20; }
.tab { border: 0; background: none; color: var(--text-45); min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 10px; cursor: pointer; }
.tab[aria-current="page"] { color: var(--accent-light); font-weight: 650; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { color: var(--text-60); font-size: 12px; }
.input, .select { width: 100%; min-height: 48px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 12px; background: var(--surface); color: var(--text); }
.settings-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.settings-row { min-height: 52px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(233,233,237,.06); }
.settings-row:first-child { border-top: 0; }
.settings-row__value { margin-left: auto; color: var(--accent-light); }
.toggle { appearance: none; width: 48px; height: 28px; border: 0; border-radius: 99px; background: #4a4b58; position: relative; transition: background .15s; flex: none; }
.toggle::after { content: ""; position: absolute; width: 24px; height: 24px; top: 2px; left: 2px; border-radius: 50%; background: var(--text); transition: transform .15s; }
.toggle:checked { background: var(--accent); }
.toggle:checked::after { transform: translateX(20px); }
.empty { color: var(--text-45); text-align: center; font-size: 13px; padding: 24px 12px; }
.toast-region { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(390px, calc(100% - 32px)); z-index: 100; pointer-events: none; }
.toast { background: #303343; border: 1px solid var(--accent-border); border-radius: 12px; padding: 12px 14px; box-shadow: 0 8px 30px rgba(0,0,0,.28); text-align: center; font-size: 13px; animation: toast-in .2s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.skip-link { position: fixed; left: 8px; top: 8px; z-index: 200; transform: translateY(-150%); background: var(--text); color: var(--bg); padding: 8px; border-radius: 6px; }
.skip-link:focus { transform: none; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
