/* «Дом»: структура пит-уолла (полоса дня, табло темпа, телеметрия), подача как у часового циферблата.
   Керамика и платина, тонкие риски, один красный акцент поребрика. */
:root {
  --bg: #f1f2ef;
  --panel: #ffffff;
  --raise: #f7f7f5;
  --line: #dcded9;
  --hair: #e8e9e5;
  --ink: #121822;
  --sub: #6b717a;
  --faint: #a3a8ae;
  --kerb: #d3140c;
  --lume: #1f8a5b;
  --sector: #6b46d9;
  --amber: #b88a00;
  --slab: #121822;
  --slab-ink: #eef0f2;
  --slab-sub: #9aa1ab;
  --track: #e3e4e0;
  --scrim: rgba(18, 24, 34, .42);

  --num: "Jost", "Futura", "Avenir Next", system-ui, sans-serif;
  --ui: "Onest", -apple-system, system-ui, sans-serif;
  --gut: 18px;
  --tabs-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  font-family: var(--ui);
  font-size: 15px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] .tower, :root[data-theme="dark"] .tele, :root[data-theme="dark"] .qc,
:root[data-theme="dark"] .target, :root[data-theme="dark"] .stats, :root[data-theme="dark"] .basket { border-color: transparent; }
:root[data-theme="dark"] {
  --bg: #0c0e11;
  --panel: #15181d;
  --raise: #1b1f25;
  --line: #2a2f36;
  --hair: #20242a;
  --ink: #e9ebee;
  --sub: #8c939d;
  --faint: #5c636c;
  --kerb: #ff2a1f;
  --lume: #a9e8c9;
  --sector: #a48bff;
  --amber: #f2c14e;
  --slab: #1d2128;
  --slab-ink: #eef0f2;
  --slab-sub: #8c939d;
  --track: #252a31;
  --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { min-height: 100vh; overscroll-behavior-y: none; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--kerb); outline-offset: 2px; }
[hidden] { display: none !important; }
main { max-width: 560px; margin: 0 auto; padding: 0 0 calc(var(--tabs-h) + var(--safe-b) + 56px); }
.pad { padding: 0 var(--gut); }
.n { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* ---------- шапка ---------- */
.top { display: flex; align-items: center; gap: 10px; padding: 16px var(--gut) 0; }
.top .date { flex: 1; font-size: 14px; color: var(--sub); }
.top .date { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .lap { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--line); font-family: var(--num); }
.daytype { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; padding: 5px 10px 5px 8px;
  border: 1px solid var(--line); border-radius: 999px; }
.daytype i { width: 7px; height: 7px; border-radius: 50%; background: var(--lume); }
.daytype.rest i { background: var(--faint); }
.daytype.recovery i { background: var(--kerb); }

/* ---------- главная цифра ---------- */
.hero { padding: 22px var(--gut) 0; }
.hero .big { font-family: var(--num); font-weight: 300; font-size: 76px; line-height: .9; letter-spacing: -.03em; }
.hero .big small { font-weight: 400; font-size: 20px; letter-spacing: 0; color: var(--sub); margin-left: 6px; }
.hero .lead { margin: 10px 0 0; font-size: 15px; color: var(--sub); line-height: 1.45; }
.hero .lead b { color: var(--ink); font-weight: 600; }
.hero.done .big { color: var(--lume); }

/* ---------- полоса дня (стинт) ---------- */
.stint { position: relative; height: 96px; margin: 22px var(--gut) 0; }
.stint .axis { position: absolute; left: 0; right: 0; top: 40px; height: 6px; background: var(--track); }
.stint .past { position: absolute; left: 0; top: 40px; height: 6px;
  background: repeating-linear-gradient(90deg, var(--kerb) 0 9px, var(--panel) 9px 18px); }
.stint .tick { position: absolute; top: 50px; width: 1px; height: 5px; background: var(--faint); }
.stint .hour { position: absolute; top: 76px; transform: translateX(-50%); font-family: var(--num); font-size: 11px; color: var(--sub); }
.stint .work { position: absolute; top: 36px; height: 14px; background: var(--sector); border-radius: 2px; }
.stint .work-l { position: absolute; top: 12px; font-size: 11px; color: var(--sector); font-weight: 600; white-space: nowrap; }
.stint .pit { position: absolute; top: 32px; width: 2px; height: 22px; background: var(--ink); transform: translateX(-1px); }
.stint .pit span { position: absolute; top: 25px; left: 50%; transform: translateX(-50%); font-family: var(--num); font-size: 11px; font-weight: 500; white-space: nowrap; }
.stint .pit.plan { background: none; border-left: 1.5px dashed var(--kerb); width: 0; }
.stint .pit.plan span { color: var(--kerb); }
.stint .nowline { position: absolute; top: 18px; bottom: 24px; width: 1px; background: var(--ink); opacity: .35; }
.stint .now { position: absolute; top: 0; transform: translateX(-50%); font-family: var(--num); font-size: 11px; color: var(--sub); }
.stint .now::after { content: ""; position: absolute; left: 50%; top: 16px; transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--ink); }

/* ---------- табло темпа ---------- */
.tower { margin: 14px var(--gut) 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.trow { display: grid; grid-template-columns: 3px 1fr auto; gap: 0 12px; align-items: baseline; padding: 14px 14px 13px 0; }
.trow + .trow { border-top: 1px solid var(--hair); }
.trow i { grid-row: 1 / 4; align-self: stretch; width: 3px; border-radius: 0 2px 2px 0; background: var(--lume); }
.trow i.behind { background: var(--amber); } .trow i.over { background: var(--kerb); }
.trow .k { font-size: 14px; font-weight: 500; }
.trow .v { font-family: var(--num); font-size: 18px; font-weight: 400; text-align: right; }
.trow .v em { font-style: normal; color: var(--sub); font-weight: 300; font-size: 15px; }
.trow .bar { grid-column: 2 / 4; height: 3px; background: var(--track); margin-top: 10px; position: relative; border-radius: 2px; }
.trow .bar b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); border-radius: 2px; }
.trow .bar b.behind { background: var(--amber); } .trow .bar b.over { background: var(--kerb); }
.trow .bar .pace { position: absolute; top: -5px; width: 2px; height: 13px; background: var(--kerb); border-radius: 1px; }
.trow .d { grid-column: 2 / 4; margin-top: 7px; font-size: 12px; color: var(--sub); }
.trow .d.behind { color: var(--amber); } .trow .d.over { color: var(--kerb); }
.tower .foot { padding: 9px 14px; border-top: 1px solid var(--hair); font-size: 12px; color: var(--sub); }

/* ---------- телеметрия Whoop ---------- */
.tele { margin: 14px var(--gut) 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.tele-h { display: flex; align-items: baseline; gap: 8px; }
.tele-h .t { font-size: 14px; font-weight: 600; flex: 1; }
.tele-h .src { font-size: 12px; color: var(--sub); }
.tele-grid { display: grid; grid-template-columns: 92px 1fr; gap: 16px; align-items: center; margin-top: 12px; }
.dial { position: relative; width: 92px; height: 92px; }
.dial svg { width: 100%; height: 100%; }
.dial .r { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.dial .r b { font-family: var(--num); font-weight: 400; font-size: 26px; line-height: 1; }
.dial .r span { display: block; font-size: 10px; color: var(--sub); margin-top: 3px; }
.gauges { display: grid; gap: 12px; }
.g .gl { display: flex; justify-content: space-between; font-size: 12px; color: var(--sub); }
.g .gl b { font-family: var(--num); font-size: 15px; font-weight: 500; color: var(--ink); }
.scale { position: relative; height: 14px; margin-top: 5px; }
.scale .ln { position: absolute; left: 0; right: 0; top: 6px; height: 2px; background: var(--track); }
.scale .fill { position: absolute; left: 0; top: 6px; height: 2px; background: var(--ink); }
.scale .rk { position: absolute; top: 3px; width: 1px; height: 8px; background: var(--faint); }
.scale .avg { position: absolute; top: 0; width: 0; height: 0; border: 4px solid transparent; border-top-color: var(--sub); transform: translateX(-4px); }
.scale .dot { position: absolute; top: 3px; width: 8px; height: 8px; border-radius: 50%; background: var(--kerb); transform: translateX(-4px); }
.verdict { font-size: 14px; font-weight: 600; line-height: 1.3; }
.g .gn { font-size: 11px; color: var(--faint); margin-top: 2px; }
.eff { display: inline-block; font-family: var(--num); font-weight: 500; padding: 1px 8px; border-radius: 5px; background: var(--raise); border: 1px solid var(--line); }
.eff.up { color: var(--sector); border-color: var(--sector); }
.effect { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hair); font-size: 14px; line-height: 1.4; }
.effect b { font-family: var(--num); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip { font-size: 12px; font-weight: 500; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; background: none; }
.chip.work { border-color: var(--sector); color: var(--sector); }

/* ---------- быстрая запись ---------- */
.sec-h { display: flex; align-items: baseline; gap: 8px; padding: 26px var(--gut) 10px; }
.sec-h h2 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.01em; flex: 1; }
.sec-h .lnk { font-size: 14px; color: var(--sub); background: none; border: 0; padding: 0; }
.quick { display: flex; gap: 8px; overflow-x: auto; padding: 0 var(--gut) 2px; scrollbar-width: none; scroll-snap-type: x proximity; }
.quick::-webkit-scrollbar { display: none; }
.qc { flex: 0 0 auto; min-width: 132px; max-width: 168px; text-align: left; padding: 11px 12px 10px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--panel); scroll-snap-align: start; position: relative; }
.qc .t { font-size: 14px; font-weight: 500; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.qc .m { margin-top: 6px; font-family: var(--num); font-size: 13px; color: var(--sub); }
.qc .m b { color: var(--ink); font-weight: 500; }
.qc.alt { background: none; border-style: dashed; }
.qc:active { transform: scale(.98); }
.say { display: flex; align-items: center; gap: 8px; margin: 12px var(--gut) 0; height: 50px; border: 1.5px solid var(--ink); border-radius: 10px; padding: 0 6px 0 14px; }
.say input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 16px; }
.say input::placeholder { color: var(--faint); }
.say button { width: 38px; height: 38px; border: 0; border-radius: 7px; background: var(--ink); color: var(--bg); display: grid; place-items: center; flex: none; }
.say button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.say.busy button { opacity: .4; }
.said { margin: 8px var(--gut) 0; font-size: 14px; color: var(--sub); line-height: 1.45; white-space: pre-line; }
.hint { margin: 8px var(--gut) 0; font-size: 12px; color: var(--faint); }

/* ---------- следующий приём ---------- */
.slab { margin-top: 26px; padding: 20px var(--gut) 22px; background: var(--slab); color: var(--slab-ink); }
.slab .when { font-size: 13px; color: var(--slab-sub); }
.slab h3 { margin: 6px 0 12px; font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.slab .m { display: flex; gap: 20px; font-family: var(--num); font-size: 18px; font-weight: 400; }
.slab .m span small { font-family: var(--ui); font-size: 12px; color: var(--slab-sub); margin-left: 4px; }
.slab .why { margin-top: 10px; font-size: 13px; color: var(--slab-sub); line-height: 1.4; }
.slab .row2 { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 16px; }
.btn { height: 50px; border: 0; border-radius: 8px; padding: 0 18px; font-size: 16px; font-weight: 600; background: var(--kerb); color: #fff; width: 100%; }
.btn.ghost { background: none; border: 1px solid var(--line); color: var(--ink); width: auto; }
.slab .btn.ghost { border-color: #3a404a; color: var(--slab-ink); }
.btn.line { background: none; border: 1.5px solid var(--ink); color: var(--ink); }
.btn.quiet { background: var(--raise); color: var(--ink); border: 1px solid var(--line); }
.btn.danger { background: none; color: var(--kerb); }
.btn[disabled] { opacity: .45; }
.btns { display: grid; gap: 8px; margin-top: 14px; }
.btns.two { grid-template-columns: 1fr 1fr; }

/* ---------- списки ---------- */
.list { margin: 0 var(--gut); border-top: 1px solid var(--line); }
.li { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--hair); width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; text-align: left; }
.li .tm { width: 44px; flex: none; font-family: var(--num); font-size: 14px; color: var(--sub); }
.li .main { flex: 1; min-width: 0; }
.li .t { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .d { font-size: 13px; color: var(--sub); margin-top: 2px; }
.li .end { font-family: var(--num); font-size: 14px; text-align: right; flex: none; }
.li .end small { display: block; color: var(--sub); font-size: 12px; }
.li .tag { font-size: 11px; font-weight: 600; color: var(--sector); border: 1px solid var(--sector); border-radius: 4px; padding: 0 5px; margin-left: 6px; }
.li .when { font-size: 13px; font-weight: 500; color: var(--sub); }
.li .when.hot { color: var(--kerb); }
.li .when.soon { color: var(--amber); }
.empty { padding: 20px var(--gut); color: var(--sub); font-size: 14px; line-height: 1.5; }

/* ---------- сегменты ---------- */
.seg { display: flex; gap: 22px; margin: 18px var(--gut) 0; border-bottom: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 0 0 10px; font-size: 15px; font-weight: 500; color: var(--sub); position: relative; }
.seg button.on { color: var(--ink); }
.seg button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--kerb); }
.pills { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px var(--gut) 0; }
.pill { border: 1px solid var(--line); background: none; border-radius: 999px; padding: 8px 13px; font-size: 14px; }
.pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
h1 { margin: 0; padding: 18px var(--gut) 0; font-family: var(--num); font-weight: 400; font-size: 34px; letter-spacing: -.02em; }
.sub { padding: 6px var(--gut) 0; margin: 0; color: var(--sub); font-size: 14px; line-height: 1.45; }

/* ---------- цель приёма и блюда ---------- */
.target { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px var(--gut) 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.target > div { padding: 12px 14px; }
.target > div + div { border-left: 1px solid var(--hair); }
.target .k { font-size: 12px; color: var(--sub); }
.target .v { font-family: var(--num); font-size: 22px; font-weight: 400; margin-top: 2px; }
.dish { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--hair); padding: 16px 0; }
.dish .t { font-size: 17px; font-weight: 600; line-height: 1.25; }
.dish .why { margin-top: 4px; font-size: 13px; color: var(--sub); line-height: 1.4; }
.dish .m { margin-top: 8px; display: flex; gap: 14px; font-family: var(--num); font-size: 14px; color: var(--sub); }
.dish .m b { color: var(--ink); font-weight: 500; }
.dish .need { margin-top: 6px; font-size: 13px; color: var(--amber); }

/* ---------- дом ---------- */
.lvl { display: inline-flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; flex: none; }
.lvl button { border: 0; background: none; padding: 6px 9px; font-size: 12px; font-weight: 500; color: var(--sub); }
.lvl button + button { border-left: 1px solid var(--line); }
.lvl button.on { background: var(--ink); color: var(--bg); }
.check { width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--faint); flex: none; display: grid; place-items: center; }
.check svg { width: 13px; height: 13px; fill: none; stroke: var(--bg); stroke-width: 3; opacity: 0; }
.li.done .check { background: var(--ink); border-color: var(--ink); }
.li.done .check svg { opacity: 1; }
.li.done .t { color: var(--faint); text-decoration: line-through; }
.x { border: 0; background: none; color: var(--faint); font-size: 22px; line-height: 1; padding: 0 2px; }
.basket { margin: 12px var(--gut) 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); padding: 4px 14px 14px; }
.basket .li:last-of-type { border-bottom: 0; }
.cov { display: flex; gap: 16px; padding: 12px 0 0; font-size: 13px; color: var(--sub); }
.cov b { font-family: var(--num); color: var(--ink); font-weight: 500; }

/* ---------- я ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr; margin: 16px var(--gut) 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.stats > div { padding: 14px; }
.stats > div + div { border-left: 1px solid var(--hair); }
.stats .k { font-size: 12px; color: var(--sub); }
.stats .v { font-family: var(--num); font-size: 28px; font-weight: 300; margin-top: 2px; }
.stats .v small { font-size: 14px; color: var(--sub); }
.stats .dlt { font-size: 12px; margin-top: 2px; color: var(--sub); }
.spark { width: 100%; height: 44px; margin-top: 6px; }
.spark path { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.book { display: flex; gap: 14px; margin: 0 var(--gut); padding: 14px 0; border-bottom: 1px solid var(--hair); }
.cover { width: 46px; height: 66px; border-radius: 3px; flex: none; display: grid; place-items: end start; padding: 6px; color: #fff; font-family: var(--num); font-size: 18px; }
.book .t { font-size: 15px; font-weight: 600; line-height: 1.25; }
.book .a { font-size: 13px; color: var(--sub); margin-top: 2px; }
.prog { height: 2px; background: var(--track); margin-top: 10px; position: relative; }
.prog b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--kerb); }
.plus { display: flex; gap: 6px; margin-top: 10px; }
.plus button { border: 1px solid var(--line); background: none; border-radius: 6px; padding: 5px 10px; font-family: var(--num); font-size: 13px; }

/* ---------- лист ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: var(--scrim); animation: fade .2s; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 21; max-height: 90vh; overflow-y: auto; max-width: 560px; margin: 0 auto;
  background: var(--panel); border-radius: 16px 16px 0 0; padding: 10px var(--gut) calc(22px + var(--safe-b)); animation: up .26s cubic-bezier(.2, .8, .2, 1); }
.grab { width: 36px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 14px; }
.sheet h3 { margin: 0; font-size: 21px; font-weight: 600; line-height: 1.2; letter-spacing: -.01em; }
.sheet .sub { padding: 6px 0 0; }
.sheet .list, .sheet .target { margin-left: 0; margin-right: 0; }
.fh { font-size: 12px; color: var(--sub); margin: 18px 0 6px; }
.field { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid var(--hair); }
.field label { flex: 1; font-size: 15px; }
.field input, .field select { border: 0; background: none; outline: none; text-align: right; font-size: 16px; width: 55%; color: var(--ink); font-family: var(--num); }
.field textarea { width: 100%; border: 0; background: none; outline: none; padding: 10px 0; font-size: 15px; resize: vertical; min-height: 60px; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 8px; }
.days button { border: 1px solid var(--line); background: none; border-radius: 7px; padding: 9px 0; font-size: 13px; font-weight: 500; }
.days button.on { background: var(--sector); border-color: var(--sector); color: #fff; }
.portions { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin-top: 8px; }
.portions button { border: 1px solid var(--line); background: none; border-radius: 8px; padding: 12px 0; font-family: var(--num); font-size: 16px; }
.portions button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; gap: 12px; padding: 9px 0; font-size: 15px; line-height: 1.45; }
.steps li::before { content: counter(s); font-family: var(--num); color: var(--kerb); width: 18px; flex: none; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px 0 6px; }
.stepper button { width: 52px; height: 44px; border: 1px solid var(--line); background: none; border-radius: 8px; font-size: 20px; }
.stepper input { width: 120px; border: 0; outline: none; background: none; text-align: center; font-family: var(--num); font-size: 38px; font-weight: 300; }

/* ---------- таббар: 4 раздела и центральная кнопка записи ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: 1fr 1fr 76px 1fr 1fr;
  align-items: center; padding: 0 8px var(--safe-b); height: calc(var(--tabs-h) + 8px + var(--safe-b));
  background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line); max-width: 560px; margin: 0 auto; }
.tabs button { border: 0; background: none; color: var(--faint); display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 500; padding: 6px 0; position: relative; }
.tabs svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tabs button.on { color: var(--ink); }
.tabs button.on::after { content: ""; position: absolute; top: -1px; left: 30%; right: 30%; height: 2px; background: var(--kerb); }
.tabs .add { width: 58px; height: 58px; margin: -26px auto 0; border-radius: 50%; background: var(--kerb); color: #fff;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--kerb) 35%, transparent), 0 0 0 5px var(--bg); justify-content: center; }
.tabs .add svg { width: 26px; height: 26px; stroke-width: 2.2; }
.tabs .add:active { transform: scale(.94); }
.badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 16px; height: 16px; border-radius: 8px; padding: 0 4px;
  background: var(--kerb); color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; }

/* ---------- лист записи ---------- */
.ways { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.way { border: 1px solid var(--line); background: var(--raise); border-radius: 12px; padding: 14px 8px 12px; display: flex; flex-direction: column;
  align-items: center; gap: 7px; font-size: 13px; font-weight: 500; }
.way svg { width: 26px; height: 26px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.way.main { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.way.main svg { stroke: var(--bg); }
.photo-prev { width: 100%; max-height: 190px; object-fit: cover; border-radius: 10px; margin-top: 12px; }
.rev { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.rev .t { font-size: 15px; font-weight: 500; }
.rev .d { font-size: 12px; color: var(--sub); grid-column: 1; }
.rev .gr { grid-row: 1 / 3; grid-column: 2; display: flex; align-items: center; gap: 4px; }
.rev .gr button { width: 32px; height: 32px; border: 1px solid var(--line); background: none; border-radius: 7px; font-size: 17px; }
.rev .gr input { width: 58px; border: 0; background: none; text-align: center; font-family: var(--num); font-size: 16px; outline: none; }
.est { font-size: 11px; color: var(--amber); margin-left: 6px; }
.tot { display: flex; gap: 18px; padding: 12px 0 0; font-family: var(--num); font-size: 16px; }
.tot small { font-family: var(--ui); color: var(--sub); font-size: 12px; margin-left: 3px; }
.quickadd { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.quickadd label { display: block; font-size: 12px; color: var(--sub); }
.quickadd input { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 9px; background: none; padding: 0 12px;
  font-family: var(--num); font-size: 18px; outline: none; margin-top: 4px; }
.textin { width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 9px; background: none; padding: 0 12px; font-size: 16px; outline: none; margin-top: 4px; }
.toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: calc(100% - 32px); z-index: 30;
  bottom: calc(var(--tabs-h) + var(--safe-b) + 14px); display: flex; gap: 14px; align-items: center;
  background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; font-size: 14px; animation: up .2s; }
.toast button { border: 0; background: none; color: var(--kerb); font-weight: 600; padding: 0; }
.skel { height: 120px; margin: 16px var(--gut) 0; border-radius: 10px; background: var(--panel); opacity: .6; }
.spin { display: inline-block; width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; vertical-align: -2px; }

@keyframes up { from { transform: translateY(16px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rot { to { transform: rotate(360deg); } }
@keyframes draw { from { width: 0; } }
.stint .past, .trow .bar b, .scale .fill { animation: draw .9s cubic-bezier(.2, .8, .2, 1); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } }
@media (max-width: 360px) { .hero .big { font-size: 62px; } .tele-grid { grid-template-columns: 78px 1fr; } .dial { width: 78px; height: 78px; } }

/* сканер штрихкода */
.scan { position: relative; margin-top: 12px; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; }
.scan video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scan i { position: absolute; left: 12%; right: 12%; top: 50%; height: 2px; background: var(--kerb); box-shadow: 0 0 12px var(--kerb); animation: scanl 1.6s ease-in-out infinite alternate; }
@keyframes scanl { from { transform: translateY(-46px); } to { transform: translateY(46px); } }
@media (prefers-reduced-motion: reduce) { .scan i { animation: none; } }
.sheet .pills { padding: 0; }
