/* Забота — крупно и спокойно: пользоваться должно быть легко уставшему человеку одной рукой */
:root { --bg: #F6F3EE; --card: #FFFFFF; --ink: #1E2A28; --muted: #6B7673; --line: #E6E0D6; --acc: #1F7A6C; --acc-soft: #E2F1EE; --red: #C2410C; --red-soft: #FDEBDD; --done: #8A9592; --r: 16px; --nav: 64px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
body { padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 16px); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
.pad { padding: 16px; }
.wrap { max-width: 560px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) 16px 16px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
h1 { font-size: 24px; margin: 4px 0 2px; }
h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 22px 0 8px; font-weight: 600; }
.card { background: var(--card); border-radius: var(--r); padding: 14px 16px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 18px; border-radius: 12px; background: var(--acc); color: #fff; font-weight: 600; }
.btn.ghost { background: var(--acc-soft); color: var(--acc); }
.btn.light { background: #EFEAE2; color: var(--ink); }
.btn.red { background: var(--red-soft); color: var(--red); }
.btn.wide { width: 100%; }
.btn:active { transform: scale(.98); }

/* Шапка дня */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.prog { height: 8px; background: #E9E3D8; border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.prog i { display: block; height: 100%; background: var(--acc); border-radius: 99px; transition: width .3s; }
.daynav { display: flex; gap: 6px; }
.daynav button { width: 44px; height: 44px; border-radius: 12px; background: #EFEAE2; font-size: 20px; }

/* «Сейчас» */
.now { background: var(--card); border-radius: var(--r); padding: 14px 16px; margin-top: 14px; border: 2px solid var(--acc); }
.now.late { border-color: var(--red); }
.now .t { font-weight: 700; font-size: 15px; color: var(--acc); }
.now.late .t { color: var(--red); }
.now ul { list-style: none; margin: 8px 0 12px; padding: 0; }
.now li { padding: 6px 0; font-size: 19px; font-weight: 600; }
.now li small { display: block; font-weight: 400; font-size: 15px; color: var(--muted); }
.allgood { margin-top: 14px; text-align: center; padding: 18px; }

/* Быстрые отметки */
.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.quick button { background: var(--card); border-radius: 14px; min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 13px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.quick button b { font-size: 26px; line-height: 1; }

/* Список дел */
.list { background: var(--card); border-radius: var(--r); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--line); width: 100%; text-align: left; min-height: 60px; }
.row:first-child { border-top: 0; }
.row .tm { width: 50px; font-weight: 700; font-variant-numeric: tabular-nums; }
.row .em { font-size: 22px; width: 28px; text-align: center; }
.row .tx { flex: 1; min-width: 0; }
.row .tx small { display: block; color: var(--muted); font-size: 14px; }
.row .st { font-size: 12px; max-width: 86px; white-space: normal !important; color: var(--muted); text-align: right; white-space: nowrap; }
.row.done .tx > span, .row.done .tm { color: var(--done); text-decoration: line-through; }
.row.skip .tx > span { color: var(--done); }
.row.late { background: var(--red-soft); }
.row.late .st { color: var(--red); font-weight: 600; }
.row.cur { background: var(--acc-soft); }
.check { width: 32px; height: 32px; border-radius: 50%; border: 2px solid #CFC7BA; flex: none; display: grid; place-items: center; color: #fff; font-size: 18px; }
.row.done .check { background: var(--acc); border-color: var(--acc); }
.row.skip .check { background: #CFC7BA; border-color: #CFC7BA; }

/* Расписание */
.item .times { color: var(--acc); font-weight: 600; font-size: 14px; }
.item.off { opacity: .5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 99px; background: #EFEAE2; display: inline-flex; align-items: center; gap: 6px; }
.chip.on { background: var(--acc); color: #fff; }
.chip .x { font-size: 18px; opacity: .7; margin-left: 2px; }

/* Журнал */
.log .row { min-height: 52px; }
.log .row .tm { width: 46px; font-weight: 600; color: var(--muted); font-size: 15px; }

/* Формы */
label.f { display: block; margin: 14px 0 6px; font-weight: 600; font-size: 15px; }
input[type=text], input[type=password], input[type=time], input[type=date], textarea, select { width: 100%; min-height: 48px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
textarea { min-height: 80px; resize: vertical; }
.err { color: var(--red); margin-top: 8px; }

/* Нижнее меню: непрозрачное, под системными кнопками ничего не просвечивает */
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); display: flex; padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
.nav a { flex: 1; height: var(--nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 12px; }
.nav a b { font-size: 22px; line-height: 1; filter: grayscale(1); opacity: .7; }
.nav a.on { color: var(--acc); font-weight: 600; }
.nav a.on b { filter: none; opacity: 1; }

/* Шторка */
.sheet { position: fixed; inset: 0; background: rgba(20,30,28,.45); z-index: 10; display: flex; align-items: flex-end; justify-content: center; }
.sheet > div { background: var(--bg); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
.sheet .acts { display: grid; gap: 8px; margin-top: 14px; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 12px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; z-index: 20; max-width: 92vw; text-align: center; }
.banner { display: flex; align-items: center; gap: 10px; background: #FFF6D8; border-radius: 14px; padding: 12px 14px; margin-top: 12px; }
.banner p { margin: 0; flex: 1; font-size: 15px; }
.banner .btn { min-height: 40px; padding: 0 14px; }
.login { max-width: 400px; margin: 12vh auto 0; padding: 0 20px; text-align: center; }
.login img { width: 84px; height: 84px; }
