/* Горизонт — утреннее небо: холодный светлый фон, тёмно-синие чернила, одно солнце (коралл). Основа плавности — 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 {
  --sky: #EEF2F8; --card: #FFFFFF; --ink: #14213D; --ink-2: #55617A; --line: #D3DBE8; --sea: #DCE5F2;
  --sun: #FF7A45; --sun-d: #B8431A; --sun-l: #FFE9DF; --ok: #1B7A52; --ok-l: #DDF1E7; --red: #B3261E;
  --head: 'Unbounded', system-ui, sans-serif; --text: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --nav: 62px; --radius: 16px;
}
* { box-sizing: border-box; }
html { background: var(--sky); }
body { margin: 0; font-family: var(--text); color: var(--ink); background: var(--sky); min-height: 100dvh; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
h1 { font-family: var(--head); font-weight: 600; font-size: clamp(1.45rem, 1.2rem + 1.6vw, 1.9rem); overflow-wrap: anywhere; }
h2 { font-family: var(--head); font-weight: 500; font-size: 1rem; letter-spacing: 0; }
h3 { font-size: 1.125rem; font-weight: 700; letter-spacing: -.01em; overflow-wrap: anywhere; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
small { font-size: .8125rem; color: var(--ink-2); }
[hidden] { display: none !important; }
.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.col { display: flex; flex-direction: column; gap: 12px; }

#app { max-width: 560px; margin: 0 auto; padding-bottom: calc(var(--nav) + env(safe-area-inset-bottom) + 28px); }
.pad { padding: 0 max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); display: flex; flex-direction: column; gap: 14px; }
.pad > h2 { margin-top: 10px; }
.top { display: flex; align-items: center; gap: 10px; padding: calc(env(safe-area-inset-top) + 14px) 18px 12px; position: sticky; top: 0; z-index: 4; background: var(--sky); }
.logo { font-family: var(--head); font-weight: 600; font-size: 1.125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date { font-size: .8125rem; color: var(--ink-2); white-space: nowrap; }
.round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--card); border: 1px solid var(--line); flex: none; }
.round:hover { border-color: var(--ink); }
.lead { color: var(--ink-2); }
.sub { color: var(--ink-2); font-size: .9375rem; overflow-wrap: anywhere; }
.note { color: var(--ink-2); font-size: .9375rem; padding: 12px 14px; border-radius: 12px; background: var(--sea); }
.hint { font-size: .875rem; color: var(--ink-2); }
.late { color: var(--red); font-weight: 600; }
.lbl { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; margin-top: 4px; }

/* Солнце над горизонтом */
.hero { position: relative; overflow: hidden; border-radius: 22px; background: linear-gradient(180deg, #FFF3EA 0%, #FFFFFF 62%); border: 1px solid var(--line); padding: 96px 18px 18px; display: flex; flex-direction: column; gap: 6px; }
.hero p { color: var(--ink-2); font-size: .9375rem; }
.sky { position: absolute; left: 0; top: 0; width: 100%; height: 96px; display: block; }
.sky .sunc { fill: var(--sun); transform-origin: 232px 72px; animation: rise 900ms var(--ease-out) both; }
.sky .rays { stroke: var(--sun); stroke-width: 3; stroke-linecap: round; fill: none; animation: z-fade 900ms 300ms var(--ease-out) both; }
.sky .sea { fill: #fff; }
.sky .hl { stroke: var(--ink); stroke-width: 2; }
@keyframes rise { from { transform: translateY(30px); } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; }
a.card:hover, .gline:hover { border-color: var(--ink); }
.list { display: flex; flex-direction: column; gap: 8px; }
.tag { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; color: var(--sun-d); text-decoration: none; }
.ghead { text-decoration: none; display: flex; flex-direction: column; gap: 4px; }
.prog { display: flex; align-items: center; gap: 10px; }
.prog small { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bar { flex: 1; height: 6px; border-radius: 3px; background: var(--sea); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--sun); border-radius: 3px; transition: width 420ms var(--ease-out); }

.sig { background: var(--ink); color: #fff; border-color: var(--ink); }
.sig h2 { color: #FFC3A6; }
.sig ul { display: flex; flex-direction: column; }
.sig a { display: block; padding: 9px 0 9px 16px; text-decoration: none; position: relative; font-size: .9375rem; overflow-wrap: anywhere; border-top: 1px solid rgba(255, 255, 255, .14); }
.sig li:first-child a { border-top: 0; }
.sig a::before { content: ''; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--sun); }
.sig a.k-empty::before, .sig a.k-quiet::before { background: #8E9BB5; }

/* Шаги */
.steps { display: flex; flex-direction: column; }
.steps.card { padding: 4px 14px; gap: 0; }
.step { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step .grow { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding-top: 2px; }
.tick { width: 44px; height: 44px; margin: -4px 0 -4px -8px; display: grid; place-items: center; flex: none; color: transparent; }
.tick::before { content: ''; grid-area: 1 / 1; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--ink); transition: background-color 220ms, border-color 220ms; }
.tick .i { grid-area: 1 / 1; width: 16px; height: 16px; stroke-width: 2.6; position: relative; }
.tick:hover::before { background: var(--sun-l); }
.tick.on { color: #fff; }
.tick.on::before { background: var(--ok); border-color: var(--ok); }
.stitle { text-align: left; font-weight: 600; min-height: 36px; display: flex; align-items: center; overflow-wrap: anywhere; line-height: 1.3; }
.step.done .stitle { font-weight: 400; color: var(--ink-2); text-decoration: line-through; }
.sendb { align-self: center; }
.dest { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px; border-radius: 999px; background: var(--sea); font-size: .8125rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.dest .i { width: 14px; height: 14px; stroke-width: 2.4; }
.dest.run { background: var(--sun-l); color: var(--sun-d); }
.dest.ask { background: var(--sun); color: var(--ink); }
.dest.ok { background: var(--ok-l); color: var(--ok); }
.warn { color: var(--sun-d); }

.gline { display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 56px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; text-decoration: none; }
.gline b { display: block; font-weight: 600; overflow-wrap: anywhere; }
.gline > .i { color: var(--ink-2); width: 18px; height: 18px; }
.fstar .i { width: 15px; height: 15px; fill: var(--sun); stroke: var(--sun); vertical-align: -2px; margin-right: 5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--card); border: 1px solid var(--line); text-decoration: none; font-weight: 600; font-size: .9375rem; }
.chip:hover { border-color: var(--ink); }

/* Сферы */
.sphere .gs { font-size: .9375rem; font-weight: 600; overflow-wrap: anywhere; }
.sphere .gs.none { color: var(--ink-2); font-weight: 400; }
.sc { display: inline-flex; gap: 3px; flex: none; }
.sc i { width: 6px; height: 16px; border-radius: 3px; background: var(--sea); }
.sc i.on { background: var(--sun); }
.rng { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; }
.rng span { grid-column: 1 / -1; font-weight: 600; font-size: .9375rem; }
.rng output { min-width: 2ch; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rng + .rng { margin-top: 6px; }
input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; margin: 0; background: transparent; }
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: var(--line); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--sun); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: var(--sun); border: 3px solid var(--card); box-shadow: 0 1px 4px rgba(20,33,61,.3); }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--sun); border: 3px solid var(--card); box-shadow: 0 1px 4px rgba(20,33,61,.3); }

/* Цель */
.ghero { display: flex; flex-direction: column; gap: 8px; padding: 4px 0 6px; }
.state { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--ok-l); color: var(--ok); font-weight: 600; font-size: .875rem; }
.why { font-size: .9375rem; overflow-wrap: anywhere; border-left: 3px solid var(--sun); padding-left: 11px; }
.why span, .revs p span { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; }
.fold summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; color: var(--ink-2); font-weight: 600; }
.end { margin-top: 14px; }

/* Мысли */
.thf { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.ths { display: flex; flex-direction: column; gap: 8px; }
.th { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px 4px; }
.th p { white-space: pre-wrap; overflow-wrap: anywhere; }
.thm { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.thm small { overflow-wrap: anywhere; }

/* Кнопки и поля */
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { flex: 1; min-height: 48px; padding: 10px 16px; border-radius: 14px; 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(--sun); border-color: var(--sun); color: var(--ink); }
.btn.main:hover { background: #FF8D5E; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--card); }
.btn.wide { width: 100%; flex: none; }
.btn.sm { flex: none; min-height: 44px; padding: 6px 14px; font-size: .9375rem; }
.btn.sm .i { width: 18px; height: 18px; }
.btn.sendb { border-color: var(--line); background: var(--sky); }
.btn.sendb:hover { border-color: var(--ink); }
.btn:disabled { opacity: .55; }
.link { min-height: 44px; padding: 0 2px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; font-size: .875rem; }
.link:hover { color: var(--ink); }
label { display: flex; flex-direction: column; gap: 6px; font-size: .875rem; font-weight: 600; }
input:not([type=checkbox]):not([type=radio]):not([type=range]), select, textarea { width: 100%; min-height: 48px; padding: 11px 13px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-size: 1rem; font-weight: 400; }
textarea { resize: vertical; line-height: 1.45; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--sun-l); }
.line { display: flex; gap: 8px; }
.line input { flex: 1; min-width: 0; }
.sw { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 400; font-size: .9375rem; min-height: 48px; }
.sw input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--sun-d); flex: none; }
.sw input[type=time], .sw select { width: auto; min-height: 44px; padding: 6px 10px; }
.err { color: var(--red); font-size: .9375rem; font-weight: 600; }
.pick { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); text-align: left; }
.pick small { display: block; }
.pick .i { color: var(--line); }
.pick.on { border-color: var(--sun); background: var(--sun-l); }
.pick.on .i { fill: var(--sun); stroke: var(--sun); }
.revs { display: flex; flex-direction: column; gap: 12px; font-size: .9375rem; }
.revs p { margin-top: 6px; overflow-wrap: anywhere; }
.notes { list-style: disc; padding-left: 20px; font-size: .9375rem; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }

.banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: calc(100% - 36px); margin: 0 18px 12px; padding: 12px 14px; background: var(--ink); color: #fff; border-radius: 12px; text-align: left; }
.banner span { color: #FFB392; font-weight: 600; white-space: nowrap; }

/* Низ: под системными кнопками — тот же фон, ничего не просвечивает */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: center; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.nav a { flex: 1; max-width: 160px; height: var(--nav); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; 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 { stroke: var(--sun-d); }

.sheet { position: fixed; inset: 0; z-index: 10; background: rgba(20, 33, 61, .5); display: flex; align-items: flex-end; justify-content: center; }
.box { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--sky); border-radius: 22px 22px 0 0; padding: 18px 18px calc(env(safe-area-inset-bottom) + 18px); display: flex; flex-direction: column; gap: 12px; }
.opts { display: flex; flex-direction: column; gap: 6px; max-height: 38dvh; overflow-y: auto; }
.opt { flex-direction: row; align-items: center; gap: 12px; min-height: 52px; padding: 8px 12px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); font-weight: 400; font-size: .9375rem; cursor: pointer; }
.opt input { width: 20px; height: 20px; accent-color: var(--sun-d); flex: none; }
.opt small { display: block; overflow-wrap: anywhere; }
.opt:has(input:checked) { border-color: var(--sun); background: var(--sun-l); }
#how { display: flex; flex-direction: column; gap: 6px; }

.login { padding-top: calc(env(safe-area-inset-top) + 9vh); gap: 14px; position: relative; }
.login .sky { position: static; height: auto; border-radius: 22px; background: linear-gradient(180deg, #FFF3EA, #fff); border: 1px solid var(--line); }
.login form { display: flex; flex-direction: column; gap: 14px; margin-top: 6px; }
.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: #fff; padding: 11px 16px; border-radius: 12px; font-size: .9375rem; }
.sk-big { height: 170px; border-radius: 22px; margin-top: 70px; }
.sk-card { height: 120px; border-radius: 16px; }

@media (min-width: 700px) {
  #app { padding-top: 12px; }
  .sheet { align-items: center; }
  .box { border-radius: 22px; padding-bottom: 18px; }
}
