/* Шаг — бумага, чёрная линия и жёлтый. Заголовки Unbounded, текст Onest. Плавность — zhivoy.css. */
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/onest-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/onest-lat.woff2) format('woff2'); unicode-range: U+0020-007E, U+00A0-00FF, U+2010-2015, U+2018-201E, U+2022, U+2026, U+2039-203A, U+20AC, U+2122, U+2212; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/fonts/unbounded-cyr.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500 700; font-display: swap; src: url(/fonts/unbounded-lat.woff2) format('woff2'); unicode-range: U+0020-007E, U+00A0-00FF, U+2010-2015, U+2018-201E, U+2022, U+2026, U+2039-203A, U+20AC, U+2122, U+2212; }
:root {
  --paper: #f2f0ea; --card: #fbfaf6; --ink: #18191b; --ink-2: #55564f; --line: #d9d5c9;
  --yellow: #f5c518; --yellow-l: #fbe9a0; --red: #b3391f;
  --head: 'Unbounded', 'Onest', sans-serif; --text: 'Onest', system-ui, sans-serif;
  --nav: 62px;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body { margin: 0; font-family: var(--text); color: var(--ink); background: var(--paper); min-height: 100dvh; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
[hidden] { display: none !important; }
.grow { flex: 1; min-width: 0; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#app { max-width: 560px; margin: 0 auto; padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 28px); }
.pad { padding: 0 18px; display: flex; flex-direction: column; gap: 14px; }
.top { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 14px) 18px 10px; }
.logo { font-family: var(--head); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.date { font-size: .875rem; color: var(--ink-2); }
.round { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; background: var(--card); flex: none; }
.round:hover { background: var(--yellow-l); }

.hero { padding: 6px 0 4px; }
.big { font-family: var(--head); font-weight: 700; font-size: clamp(3.4rem, 19vw, 5.2rem); line-height: .95; letter-spacing: -.04em; }
.big small { font-size: .32em; font-weight: 500; letter-spacing: -.01em; color: var(--ink-2); }
.hero p { margin-top: 8px; color: var(--ink-2); max-width: 30ch; }

.card { background: var(--card); border: 1.5px solid var(--ink); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.done { background: var(--yellow); }
.card.risk { box-shadow: 4px 4px 0 var(--ink); }
.row { display: flex; align-items: flex-start; gap: 12px; }
.card h3 { font-family: var(--head); font-weight: 600; font-size: 1.06rem; letter-spacing: -.02em; overflow-wrap: anywhere; }
.sub { font-size: .875rem; color: var(--ink-2); margin-top: 3px; }
.card.done .sub { color: #3a3200; }
.chain { font-size: .8125rem; color: var(--ink-2); white-space: nowrap; padding-top: 3px; }
.tick { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: var(--yellow); display: grid; place-items: center; flex: none; }
.note { font-size: .9375rem; background: var(--yellow-l); border-radius: 8px; padding: 9px 12px; }
.mini { font-size: 1rem; border-left: 3px solid var(--yellow); padding-left: 11px; overflow-wrap: anywhere; }
.mini span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin-bottom: 1px; }

.week { display: flex; gap: 6px; }
.dot { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dot i { width: 100%; height: 9px; border-radius: 3px; border: 1.5px solid var(--ink); }
.dot b { font-weight: 400; font-size: .6875rem; color: var(--ink-2); }
.dot.full i { background: var(--ink); }
.dot.mini i { background: linear-gradient(90deg, var(--ink) 50%, transparent 50%); }
.dot.miss i { border-color: #a9a698; }
.dot.off i { border-style: dashed; border-color: var(--line); }
.dot.now b { font-weight: 700; color: var(--ink); }
.card.done .dot b { color: #3a3200; }
.card.done .dot.miss i { border-color: #8a7400; }

.btns { display: flex; gap: 8px; }
.btn { flex: 1; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--ink); font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-align: center; text-decoration: none; line-height: 1.2; }
.btn.main { background: var(--yellow); }
.btn.main:hover { background: #ffd43a; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--yellow-l); }
.btn.wide { width: 100%; flex: none; }
.btn.sm { flex: none; min-height: 44px; padding: 6px 14px; font-size: .9375rem; }
.link { align-self: flex-start; min-height: 44px; padding: 0 2px; text-decoration: underline; text-underline-offset: 3px; font-size: .9375rem; color: var(--ink-2); text-align: left; }
.card.done .link { color: #3a3200; margin: -6px 0 -8px; }
.link.red { color: var(--red); }
.link.out { align-self: center; margin-top: 8px; }
.add { min-height: 52px; border: 1.5px dashed var(--ink); border-radius: 14px; display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.add:hover { background: var(--card); }
.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: calc(100% - 36px); margin: 0 18px 10px; padding: 12px 14px; background: var(--ink); color: var(--paper); border-radius: 12px; text-decoration: none; text-align: left; }
.pad > .banner { width: 100%; margin: 0; }
.banner span { color: var(--yellow); font-weight: 600; white-space: nowrap; }
.slot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--yellow-l); }
.slot p { flex: 1; font-size: .9375rem; overflow-wrap: anywhere; }
.slot .btn { flex: none; min-height: 44px; }
.foot { font-size: .875rem; color: var(--ink-2); text-align: left; }
.rest summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.rest[open] { display: flex; flex-direction: column; gap: 14px; }

.start { padding-top: 18px; gap: 18px; }
.start h1, .login h1 { font-family: var(--head); font-weight: 700; font-size: clamp(1.9rem, 9vw, 2.6rem); letter-spacing: -.03em; }
.start > p { color: var(--ink-2); }
.how { counter-reset: n; display: flex; flex-direction: column; gap: 10px; margin-top: 6px; border-top: 1.5px solid var(--ink); padding-top: 16px; }
.how li { counter-increment: n; display: grid; grid-template-columns: 34px 1fr; font-size: .9375rem; color: var(--ink-2); }
.how li::before { content: counter(n); font-family: var(--head); font-weight: 600; color: var(--ink); }
.how b { color: var(--ink); }

h2 { font-family: var(--head); font-weight: 600; font-size: 1.05rem; letter-spacing: -.02em; margin-top: 14px; }
h2 small { font-family: var(--text); font-weight: 400; font-size: .875rem; color: var(--ink-2); letter-spacing: 0; margin-left: 6px; }
.stats { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--card); overflow: hidden; }
.stats div { padding: 12px 12px 11px; border-left: 1.5px solid var(--ink); display: flex; flex-direction: column; }
.stats div:first-child { border-left: 0; background: var(--yellow); }
.stats b { font-family: var(--head); font-size: 1.5rem; font-weight: 700; letter-spacing: -.03em; }
.stats b small { font-size: .55em; font-weight: 500; }
.stats span { font-size: .75rem; color: var(--ink-2); }
.stats div:first-child span { color: #3a3200; }
.list { border: 1.5px solid var(--ink); border-radius: 14px; background: var(--card); }
.list li { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 14px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.list span { display: block; font-size: .8125rem; color: var(--ink-2); overflow-wrap: anywhere; }
.empty, .hint, .lead { color: var(--ink-2); font-size: .9375rem; }
.lead { font-size: 1rem; color: var(--ink); }
.set { display: flex; flex-direction: column; border: 1.5px solid var(--ink); border-radius: 14px; background: var(--card); }
.set label { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 6px 14px; border-top: 1px solid var(--line); }
.set label:first-child { border-top: 0; }
.set label.check { justify-content: flex-start; }
.set input[type=time], .set select { min-height: 42px; padding: 4px 10px; border: 1.5px solid var(--ink); border-radius: 9px; background: var(--paper); }
.set input:disabled { opacity: .45; }
.set input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--ink); flex: none; }
.upd { font-size: .9375rem; }
.upd small { color: var(--ink-2); }
.upd ul { margin-top: 6px; display: flex; flex-direction: column; gap: 4px; color: var(--ink-2); }
.upd li { padding-left: 16px; position: relative; }
.upd li::before { content: ''; position: absolute; left: 0; top: .6em; width: 8px; height: 2px; background: var(--ink); }

.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; background: var(--paper); border-top: 1.5px solid var(--ink); padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1; max-width: 280px; height: var(--nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .75rem; text-decoration: none; color: var(--ink-2); transition: color 220ms; }
.nav a.on { color: var(--ink); font-weight: 700; }
.nav a.on .i { fill: var(--yellow); }

.sheet { position: fixed; inset: 0; z-index: 10; background: rgba(24, 25, 27, .45); display: flex; align-items: flex-end; justify-content: center; }
.box { width: 100%; max-width: 560px; max-height: 92dvh; overflow: auto; background: var(--paper); border: 1.5px solid var(--ink); border-bottom: 0; border-radius: 18px 18px 0 0; padding: 20px 18px calc(18px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.box h2 { margin: 0; font-size: 1.2rem; }
.box label, .login label { display: flex; flex-direction: column; gap: 5px; font-size: .875rem; font-weight: 600; }
.box label small { font-weight: 400; color: var(--ink-2); display: inline; }
.box input, .box textarea, .login input { min-height: 48px; padding: 10px 12px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--card); font-size: 1rem; font-weight: 400; resize: vertical; }
.box input:focus, .box textarea:focus, .login input:focus { outline: 0; box-shadow: 3px 3px 0 var(--yellow); }
.more { display: flex; flex-direction: column; border-top: 1px solid var(--line); padding-top: 6px; }
.err { color: var(--red); font-size: .9375rem; }
.login { padding-top: 16vh; gap: 16px; }
.login form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 14px); translate: -50% 0; z-index: 20; max-width: calc(100% - 36px); width: max-content; background: var(--ink); color: var(--paper); padding: 11px 16px; border-radius: 11px; font-size: .9375rem; }
.sk-big { height: 110px; margin-top: 70px; }
.sk-card { height: 170px; border-radius: 14px; }

@media (min-width: 700px) {
  .top { padding-top: 28px; }
  .big { font-size: 5.6rem; }
}
