:root {
  --bg: #F4F5F7;
  --card: #FFFFFF;
  --ink: #1A1D24;
  --muted: #5A606C;
  --line: #E3E5EA;
  --soft: #EEEFF2;
  --ok-bg: #E6F2EB; --ok: #1F6B43;
  --late-bg: #FCEFD9; --late: #8A4D00;
  --urg-bg: #FCE9E6; --urg: #A3341F;
  --blue: #2B5DA8;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: Manrope, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button, input, select { font-family: inherit; font-size: 16px; color: var(--ink); }
button { cursor: pointer; }
.wrap { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
header.top { padding: calc(20px + env(safe-area-inset-top)) 20px 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
header.top .sub { font-size: 14px; font-weight: 600; color: var(--muted); }
header.top h1 { margin: 2px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -0.5px; }
main { flex: 1; padding: 8px 20px 110px; display: flex; flex-direction: column; gap: 14px; }
.card { background: var(--card); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.row { display: flex; align-items: center; gap: 12px; }
.grow { flex: 1; min-width: 0; }
.av { width: 40px; height: 40px; flex: none; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 15px; background-size: cover; background-position: center; }
.av.sm { width: 30px; height: 30px; font-size: 12px; }
.av.lg { width: 84px; height: 84px; font-size: 30px; }
.name { font-size: 15px; font-weight: 700; }
.hint { font-size: 12px; color: var(--muted); }
.pill { padding: 5px 11px; border-radius: 99px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.no { background: var(--soft); color: var(--muted); }
.pill.late { background: var(--late-bg); color: var(--late); }
.pill.urg { background: var(--urg-bg); color: var(--urg); }
.seg { display: flex; gap: 8px; }
.seg button { flex: 1; height: 44px; border-radius: 12px; border: 1px solid #D9DCE2; background: var(--card); font-weight: 600; color: var(--muted); }
.seg button.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 700; }
.tri { display: flex; gap: 6px; }
.tri button { height: 38px; padding: 0 11px; border-radius: 10px; border: 1px solid #D9DCE2; background: var(--card); font-size: 13px; font-weight: 700; color: var(--muted); }
.tri button.oui.on { background: var(--ok-bg); border-color: var(--ok-bg); color: var(--ok); }
.tri button.non.on { background: var(--soft); border-color: #C9CDD5; color: var(--ink); }
.tri button.tard.on { background: var(--late-bg); border-color: var(--late-bg); color: var(--late); }
.field { height: 44px; border-radius: 12px; border: 1px solid #D9DCE2; background: var(--card); padding: 0 12px; width: 100%; }
.field.time { width: 104px; flex: none; }
select.field { width: auto; }
.btn { height: 44px; padding: 0 16px; border-radius: 12px; border: none; background: var(--ink); color: #fff; font-weight: 700; }
.btn.ghost { background: var(--card); color: var(--ink); border: 1px solid #D9DCE2; }
.icon-btn { width: 44px; height: 44px; flex: none; border-radius: 12px; border: none; background: var(--soft); display: flex; align-items: center; justify-content: center; }
.check { display: flex; align-items: center; gap: 12px; min-height: 52px; border-top: 1px solid var(--soft); }
.check:first-of-type { border-top: none; }
.check input[type=checkbox] { width: 24px; height: 24px; accent-color: var(--ink); flex: none; }
.check.done .name { color: #8A909C; text-decoration: line-through; font-weight: 600; }
.del { border: none; background: none; color: #8A909C; font-size: 22px; width: 36px; height: 36px; }
.count { font-size: 14px; font-weight: 700; color: var(--blue); }
.datebar { display: flex; align-items: center; gap: 8px; }
.datebar .d { flex: 1; text-align: center; font-weight: 700; }
nav.tabs { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); display: flex; justify-content: center; }
nav.tabs .in { max-width: 560px; width: 100%; display: flex; justify-content: space-around; }
nav.tabs button { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--muted); min-width: 64px; min-height: 52px; justify-content: center; }
nav.tabs button.on { color: var(--ink); font-weight: 800; }
.center { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.center h1 { margin: 0; font-size: 30px; font-weight: 800; }
.pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; max-width: 360px; }
.pick button { background: var(--card); border: none; border-radius: 20px; padding: 18px 10px; display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; }
.err { color: var(--urg); font-weight: 700; font-size: 14px; min-height: 20px; }
.empty { color: var(--muted); font-size: 14px; padding: 6px 0; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; font-weight: 600; opacity: 0; transition: opacity .2s; pointer-events: none; }
.toast.show { opacity: 1; }
.sr { position: absolute; left: -9999px; }
