/* ui.css - экраны, формы, окошки, таблица: перенесено из макета МАКЕТЫ/2_oblik.html (источник облика). Правила проекта: без функции смешивания цветов, цвета переменными. */
/* --- таблица --- */
.board.smooth { scroll-behavior: smooth; }
.board { flex: 1; min-height: 0; position: relative; overflow: auto; -webkit-overflow-scrolling: touch; background: var(--surface); scroll-snap-type: x mandatory; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid { position: relative; }
.hrow { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.corner { position: sticky; left: 0; z-index: 6; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; padding-left: 14px; text-align: left; }
.corner:active { background: var(--press2); }
.corner.away { background: var(--today-bg); }
.corner.away span { color: var(--text); font-weight: 700; }
.corner b { font-size: 15px; line-height: 18px; }
.corner span { font-size: 13px; line-height: 16px; color: var(--text2); }
.dh { position: absolute; top: 0; text-align: center; scroll-snap-align: start; padding-top: 7px; }
.dh:active b { background: var(--press); }
.dh.td:active b { background: var(--press); }
.dh i { display: block; font-style: normal; font-size: 12px; line-height: 14px; color: var(--text2); }
.dh.wk i { color: var(--wk-text); }
.dh b { display: block; margin: 3px auto 0; width: 34px; height: 28px; border-radius: 9px; font-size: 16px; line-height: 28px; font-variant-numeric: tabular-nums; }
.dh.td { background: var(--today-bg); }
.dh.td b { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1.5px var(--edge); }
.row { position: absolute; left: 0; z-index: 1; }
.nm {
  position: sticky; left: 0; z-index: 4; height: 100%; background: var(--surface); border-right: 1px solid var(--line);
  padding: 9px 6px 6px 22px; overflow: hidden; display: block; width: 100%; text-align: left;
}
.nm .stripe { position: absolute; left: 6px; top: 11px; bottom: 11px; width: 4px; border-radius: 2px; }
.nm .nl { display: flex; align-items: center; min-width: 0; height: 36px; }
.hi { flex: none; display: block; object-fit: contain; }
.nm .hi { width: 34px; height: 34px; margin-right: 5px; }
.nm b { display: block; font-size: 16px; line-height: 22px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.nm span.st { display: block; margin-top: 2px; font-size: 12px; line-height: 15px; color: var(--text2); }
.nm:active { background: var(--press2); }
.cell { position: absolute; top: 0; height: 100%; z-index: 1; }
.cell::before { content: ''; position: absolute; top: 3px; right: 2px; bottom: 3px; left: 2px; border-radius: 9px; background: var(--cell); }
.cell.wk::before { background: var(--cell-wk); }
.cell.td::before { background: var(--today-bg); }
.cell:active::before { background: var(--cell-hover); }
.bar {
  position: absolute; z-index: 2; border-radius: 8px; white-space: nowrap; color: #FFFFFF;
}
.bar:active { filter: brightness(0.92); }
.bar.wide-hit::after { content: ''; position: absolute; top: 0; bottom: 0; left: -8px; right: -8px; }
.bar span { display: inline-block; position: sticky; font-weight: 600; font-size: 14px; }
.bar.tight span { font-size: 11px; }
/* неделя на телефоне: ячейки уже, подписи мельче */
.narrow .dh i { font-size: 11px; }
.narrow .dh b { font-size: 15px; }
.narrow .nm { padding: 6px 3px 4px 20px; }
.narrow .nm .hi { width: 32px; height: 32px; margin-right: 4px; }
.narrow .nm .nl { height: 34px; }
.narrow .nm b { font-size: 14px; }
.narrow .nm span.st { font-size: 11px; line-height: 14px; margin-top: 1px; }
.narrow .corner { padding-left: 10px; }
/* окно «Телефон» на ПК: полоса прокрутки занимает 8 px, колонка домиков на 4 px уже - название и значок чуть мельче */
.nsb .nm { padding-right: 1px; }
.nsb .nm .hi { width: 30px; height: 30px; margin-right: 3px; }
.nsb .nm b { font-size: 13px; }
.narrow .corner b { font-size: 14px; }
.narrow .bar span { font-size: 13px; }
.bar span.ell { overflow: hidden; text-overflow: ellipsis; vertical-align: top; }
.bar span.tr { overflow: hidden; text-overflow: ellipsis; }

/* --- полосы броней (вариант А, выбран владельцем 02.10; цвета домиков те же) ---
   цвет домика с прозрачностью 78 % сверху и 87 % снизу, к низу затемнение 25 %; под именем «ярлычок» (тёмная подложка 22 %,
   скругление) - белое имя держит контраст не ниже 4,5:1 у всех восьми цветов на обеих схемах (расчёт - в отчёте 21) */
.bar, .nm .stripe, .dl-row .bar-c, .gs-row.st .bar-c, .hd .on, .legend i.solid, .hs-leg i.s, .chip::before {
  background: linear-gradient(to bottom, rgba(20, 23, 28, 0) 25%, rgba(20, 23, 28, 0.25)), linear-gradient(to bottom, rgba(var(--c), 0.78), rgba(var(--c), 0.87));
}
.bar { color: #FFFFFF; border: 1px solid rgba(20, 23, 28, 0.14); box-shadow: 0 1px 1px rgba(20, 23, 28, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.16); }
.bar span { margin-left: 3px; padding: 0 5px; border-radius: 6px; background: rgba(20, 23, 28, 0.22); line-height: 22px; vertical-align: middle; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.bar.pre {
  background: repeating-linear-gradient(135deg, rgba(var(--c), 0.14) 0, rgba(var(--c), 0.14) 5px, var(--pre-gap) 5px, var(--pre-gap) 10px);
  border: 1.5px solid rgba(var(--c), 0.65); box-shadow: none; color: var(--text);
}
.bar.pre span { background: var(--pre-chip); text-shadow: none; }
.hd .pr { background: repeating-linear-gradient(135deg, rgba(var(--c), 0.22) 0, rgba(var(--c), 0.22) 4px, var(--pre-gap) 4px, var(--pre-gap) 8px); box-shadow: inset 0 0 0 1px rgba(var(--c), 0.6); }
.legend i.hatch, .hs-leg i.p { background: repeating-linear-gradient(135deg, rgba(var(--c), 0.24) 0, rgba(var(--c), 0.24) 3px, var(--surface) 3px, var(--surface) 6px); border: 1.5px solid rgba(var(--c), 0.65); }
.chip { position: relative; border-left: 0; padding-left: 4px; }
.chip::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; border-radius: 10px 0 0 10px; }

/* --- задание 26: контакты (несколько телефонов и профилей), плашка «Сделайте копию», выгрузка и загрузка --- */
.mrow { display: flex; align-items: center; margin-top: 8px; }
.mrow:first-of-type { margin-top: 0; }
.mrow .fld-in { flex: 1; min-width: 0; }
.mrow .sel { flex: none; width: 124px; margin-right: 8px; padding: 0 8px; font-size: 16px; }
.mrow .mx { flex: none; width: 44px; height: 52px; margin-left: 2px; border-radius: 10px; font-size: 24px; text-align: center; color: var(--text2); }
.mrow .mx:active { background: var(--press2); }
.add-l { display: block; height: 44px; margin-top: 4px; padding: 0 4px; font-size: 15px; font-weight: 700; text-decoration: underline; text-align: left; }
.sh-call.alt .ic { background: #3A4A63; }
.sh-call.txt { padding: 10px 14px; }
.sh-call.txt .tx b { font-size: 16px; }
.bk { flex: none; display: flex; align-items: center; min-height: 44px; margin: 6px 14px 0; padding: 0 4px 0 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 18px; }
.bk .t { flex: 1; min-width: 0; font-weight: 600; }
.bk .bb { position: relative; flex: none; height: 32px; padding: 0 12px; border: 1px solid var(--edge); border-radius: 9px; font-size: 14px; font-weight: 700; }
.bk .bb::after { content: ''; position: absolute; top: -6px; bottom: -6px; left: -4px; right: -2px; }
.bk .bb:active { background: var(--press2); }
.bk .bl { flex: none; height: 44px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--text2); }
.opt { margin-top: 14px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.opt.sel { border-color: var(--edge); box-shadow: inset 0 0 0 1px var(--edge); }
.opt-h { display: flex; align-items: center; }
.opt-h b { flex: 1; font-size: 18px; line-height: 24px; }
.opt-b { flex: none; margin-left: 8px; padding: 2px 9px; border-radius: 8px; background: var(--cell-wk); font-size: 12px; line-height: 16px; font-weight: 700; color: var(--text2); }
.opt p { margin: 6px 0 0; font-size: 14px; line-height: 20px; color: var(--text2); }
.opt .sh-btn { margin-top: 12px; }
.opt .sh-btn.sec { background: var(--surface); color: var(--text); box-shadow: none; border: 1px solid var(--edge); }
.opt .sh-btn.dng { background: var(--surface); color: var(--err); box-shadow: none; border: 1px solid var(--err); }
.note-card { display: flex; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--cell-wk); font-size: 14px; line-height: 20px; color: var(--text); }
.note-card i { flex: none; width: 22px; height: 22px; margin: 0 10px 0 0; border-radius: 11px; background: var(--text2); color: var(--surface); font-style: normal; font-weight: 800; text-align: center; line-height: 22px; font-size: 13px; }
.note-card.bad { background: var(--bad-bg); color: var(--bad-tx); }
.chips.pr button { height: 44px; margin: 4px 6px 4px 0; }
.per-in { display: flex; margin-top: 10px; }
.per-in .fld-in { flex: 1; min-width: 0; }
.per-in .fld-in + .fld-in { margin-left: 8px; }
.kv { margin-top: 10px; }
.last-copy { margin: 10px 4px 0; font-size: 14px; line-height: 20px; color: var(--text2); }

/* --- этап 2 (наброски): форма записи, настройки домика, услуги, «откуда гость» --- */
.fm .fld, .fs .fld { margin-top: 16px; }
.fld-l { margin: 0 0 6px 4px; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--text2); }
.fld-h { margin: 6px 4px 0; font-size: 13px; line-height: 17px; color: var(--text2); }
.fld-in { display: block; width: 100%; height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--text); font: inherit; font-size: 17px; -webkit-appearance: none; appearance: none; }
.fld-in:focus { outline: 2px solid var(--edge); outline-offset: -1px; }
textarea.fld-in { height: 92px; padding: 12px 14px; line-height: 22px; resize: none; }
.fld-row { display: flex; align-items: center; width: 100%; min-height: 56px; padding: 6px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.fld-row:active { background: var(--press2); }
.fld-row.bad { border-color: var(--err); }
.fld-row .hi { width: 40px; height: 40px; margin-right: 10px; }
.fld-row .tx { flex: 1; min-width: 0; }
.fld-row .tx b { display: block; font-size: 16px; line-height: 21px; }
.fld-row .tx span { display: block; font-size: 13px; line-height: 17px; color: var(--text2); }
.fld-row .ph { color: var(--text2); font-weight: 600; }
.fld-row .go { flex: none; margin-left: 8px; font-size: 22px; line-height: 22px; color: var(--text2); }
.fld-2 { display: flex; }
.fld-2 > button { flex: 1; min-width: 0; }
.fld-2 > button + button { margin-left: 10px; }
.err { margin: 6px 4px 0; font-size: 13px; line-height: 17px; font-weight: 600; color: var(--err); }
.step { display: flex; align-items: center; }
.step button { flex: none; width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: 26px; line-height: 26px; text-align: center; }
.step button:active { background: var(--press2); }
.step b { min-width: 64px; text-align: center; font-size: 22px; }
.sh-r small.x { font-size: 12px; color: var(--text2); margin-left: 4px; }
.fld-h .lnk, .svc-s .lnk { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 4px; }
.svc-c { margin-top: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.svc-c.on { border-color: var(--edge); }
.svc-h { display: flex; align-items: center; min-height: 52px; }
.svc-h > span { flex: 1; min-width: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
.svc-sw { flex: none; width: 56px; height: 44px; display: flex; align-items: center; justify-content: center; margin-right: -8px; }
.svc-sw .sw { margin: 0; }
.svc-b { padding: 0 0 8px; }
.svc-p { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.svc-l { font-size: 14px; color: var(--text2); }
.svc-p .fld-in { flex: none; width: 140px; height: 44px; text-align: right; }
.nsv .svc-h { padding: 6px 0 0; }
.nsv .svc-h .fld-in { flex: 1; min-width: 0; }
.nsv .mx { flex: none; width: 44px; height: 52px; margin-left: 2px; border-radius: 10px; font-size: 24px; text-align: center; color: var(--text2); }
.nsv .mx:active { background: var(--press2); }
.src-in { margin-top: 8px; }
.step.sm button { width: 44px; height: 44px; }
.step.sm b { min-width: 44px; font-size: 20px; }
.svc-s { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; font-size: 13px; line-height: 17px; color: var(--text2); }
.svc-s b { flex: none; margin-left: 8px; font-size: 16px; color: var(--text); }
.paidrow { margin-top: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.sh-r.paidfull b { color: var(--ok-tx); }
.warn { display: flex; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: #FFD54A; color: #1F1A00; font-size: 15px; line-height: 21px; }
.warn i { flex: none; width: 22px; height: 22px; margin: 0 10px 0 0; border-radius: 11px; background: #1F1A00; color: #FFD54A; font-style: normal; font-weight: 800; text-align: center; line-height: 22px; font-size: 14px; }
.warn b { font-weight: 700; }
.lnk { display: inline; height: auto; padding: 0; font-weight: 700; text-decoration: underline; color: var(--text); }
.fld-h .lnk { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 4px; }
.lnk-danger { display: block; width: 100%; height: 48px; margin-top: 6px; border-radius: 12px; font-size: 16px; font-weight: 700; text-align: center; color: var(--err); }
.lnk-danger:active { background: var(--press2); }
.fx-foot { position: sticky; bottom: var(--kb, 0px); z-index: 3; margin: 20px -16px -20px; padding: 10px 16px 14px; background: var(--bg); border-top: 1px solid var(--line); }
.fx-foot .sh-btn { margin-top: 0; }
.fm-tot { margin-top: 16px; }
.chips.fc { padding: 0; margin: 0 -4px; }
.chips button.on { background: var(--press2); border-color: var(--edge); font-weight: 700; }
.pal { display: flex; flex-wrap: wrap; margin: 0 -4px; }
.pal button { position: relative; width: 44px; height: 44px; margin: 4px 3px; border-radius: 22px; background: rgb(var(--c)); }
.pal button.sel { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--edge); }
.pal button.sel::after { content: '\2713'; position: absolute; left: 0; right: 0; top: 0; line-height: 44px; text-align: center; color: #FFFFFF; font-size: 22px; font-weight: 800; }
.note-p { margin: 10px 4px 0; font-size: 14px; line-height: 20px; color: var(--text2); }
.cal .wh { text-align: center; font-size: 12px; line-height: 20px; color: var(--text2); }
.cal .wh.wk { color: var(--wk-text); }
.cd { position: relative; height: 46px; border-radius: 10px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-align: center; font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd.wk { background: var(--cell-wk); }
.cd.tl { opacity: 0.4; }
.cd.busy { background: rgba(var(--c), 0.22); box-shadow: inset 0 0 0 1px rgba(var(--c), 0.55); }
.cd.dis { opacity: 0.35; cursor: default; }
.cd.rng { background: var(--press); }
.cd.sel { background: var(--btn); color: var(--btn-text); box-shadow: none; }
.cd.td { box-shadow: inset 0 0 0 2px var(--edge); }
.toast.undo { display: flex; align-items: center; justify-content: space-between; text-align: left; pointer-events: none; }
.toast.undo.show { pointer-events: auto; }
.toast.undo button { flex: none; margin-left: 12px; padding: 0 10px; height: 44px; border-radius: 8px; font-weight: 800; text-decoration: underline; }
.sv-card { margin-top: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.sv-card .fld-in + .fld-in { margin-top: 8px; }
.sv-card .set-row { padding: 0; margin-top: 4px; border-top: 0; min-height: 52px; }
.sr-row { display: flex; align-items: center; min-height: 56px; padding: 6px 6px 6px 14px; border-top: 1px solid var(--line); font-size: 16px; }
.sr-row:first-child { border-top: 0; }
.sr-row span { flex: 1; min-width: 0; }
.sr-row button { flex: none; width: 44px; height: 44px; border-radius: 10px; font-size: 22px; text-align: center; color: var(--text2); }
.sr-row button:active { background: var(--press2); }
.sr-add { display: flex; }
.sr-add .fld-in { flex: 1; min-width: 0; }
.sr-add button { flex: none; margin-left: 8px; width: 110px; height: 52px; border: 1px solid var(--edge); border-radius: 12px; font-weight: 700; text-align: center; }
.cf-btns .sh-btn { margin-top: 10px; }
.cf-btns .sh-btn.sec { background: var(--surface); color: var(--text); box-shadow: none; border: 1px solid var(--edge); }
.cf-btns .sh-btn.dng { background: var(--surface); color: var(--err); box-shadow: none; border: 1px solid var(--err); }

/* --- экран настроек (выезжает справа, как экран домика) --- */
.set-row { display: flex; align-items: center; width: 100%; min-height: 56px; padding: 6px 14px; border-top: 1px solid var(--line); text-align: left; font-size: 16px; }
button.set-row:active { background: var(--press2); }
.set-row .hi { width: 40px; height: 40px; margin-right: 10px; }
.set-row .tx { flex: 1; min-width: 0; }
.set-row .tx b { display: block; font-size: 16px; line-height: 21px; }
.set-row .tx span { display: block; font-size: 13px; line-height: 18px; color: var(--text2); }
.set-row .dot { display: inline-block; width: 14px; height: 14px; border-radius: 7px; margin-right: 8px; background: rgb(var(--c)); box-shadow: inset 0 0 0 1px rgba(20, 23, 28, 0.15); vertical-align: -2px; }
.set-row .go { flex: none; margin-left: 8px; font-size: 22px; line-height: 22px; color: var(--text2); }
.set-row.add { font-weight: 700; }
.dat { display: flex; padding: 14px 12px 12px; }
.dat > div { flex: 1; min-width: 0; margin: 0 4px; text-align: center; }
.dat button { display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; border: 1px solid var(--edge); border-radius: 12px; background: var(--surface); font-size: 17px; font-weight: 700; text-align: center; }
.dat button svg { flex: none; margin-right: 8px; }
.dat button:active { background: var(--press2); }
.dat p { margin: 6px 2px 0; font-size: 13px; line-height: 17px; color: var(--text2); }
.sw { position: relative; flex: none; margin-left: 10px; width: 52px; height: 32px; border-radius: 16px; background: var(--line); }
.sw::after { content: ''; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 13px; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); }
.sw.on { background: #2E7D4F; }
.sw.on::after { left: 23px; }
.rad { position: relative; flex: none; margin-left: 10px; width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--edge); }
.rad.on::after { content: ''; position: absolute; left: 4px; top: 4px; width: 12px; height: 12px; border-radius: 6px; background: var(--text); }
.chips { display: flex; flex-wrap: wrap; padding: 8px 10px; }
.chips button { height: 44px; padding: 0 16px; margin: 4px; border: 1px solid var(--line); border-radius: 22px; font-size: 15px; }
.chips button.add { font-weight: 700; }

/* --- окошко брони --- */
.sheet-wrap { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 9000; visibility: hidden; transition: visibility 0s linear 200ms; }
.sheet-wrap.open { visibility: visible; transition-delay: 0s; }
.scrim { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(20, 23, 28, 0.42); opacity: 0; transition: opacity 180ms ease-out; }
.open .scrim { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); background: var(--surface); border-radius: 16px 16px 0 0; z-index: 1;   /* над экранной клавиатурой (--kb, ui.js) */
  padding: 14px 16px 16px; transform: translateY(100%); transition: transform 180ms var(--ease-out); max-height: calc(94% - var(--kb, 0px)); overflow-y: auto;
  border-top: 1px solid var(--edge);
}

.open .sheet { transform: translateY(0); transition: transform 240ms var(--ease-drawer); }
.sheet:focus { outline: none; }
.sh-head { display: flex; align-items: center; justify-content: space-between; }
.sh-tags { display: flex; align-items: center; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 40px; padding: 0 12px 0 4px; margin-right: 8px; border-radius: 10px; font-size: 16px; font-weight: 700;
  background: var(--bg); }
.chip .hi { width: 36px; height: 36px; margin: 0 6px 0 4px; }
.badge { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; font-size: 13px; font-weight: 700; }
.badge.ok { background: #E1F0E6; color: #14502F; border: 1px solid #A9CDB6; }
.badge.pre { background: #FFF1CC; color: #5A4300; border: 1px dashed #B58A10; }
.sh-back { display: inline-flex; align-items: center; height: 44px; margin: -6px 0 2px -8px; padding: 0 12px 0 8px; border-radius: 10px; font-size: 16px; font-weight: 700; }
.sh-back:active { background: var(--press); }
.sh-x { flex: none; width: 44px; height: 44px; margin-right: -8px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.sh-x:active { background: rgba(20, 23, 28, 0.08); }
.sheet h2 { margin: 8px 0 0; font-size: 26px; line-height: 32px; }
.sh-dates { margin: 2px 0 12px; font-size: 16px; line-height: 22px; color: var(--text2); }
.sh-rows { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; }
.sh-r { display: flex; justify-content: space-between; align-items: center; min-height: 42px; padding: 0 14px; border-top: 1px solid var(--line); font-size: 16px; }
.sh-r:first-child { border-top: 0; }
.sh-r span { color: var(--text2); }
.sh-r b { font-size: 17px; }
.sh-r em { font-style: normal; color: var(--text2); }
.sh-r.tot, .sh-r.rest { background: var(--surface); }
.sh-r.tot:last-child, .sh-r.rest:last-child { border-radius: 0 0 10px 10px; }
.sh-r.rest b { font-size: 18px; }
.sh-call { display: flex; align-items: center; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); text-decoration: none; color: var(--text); }
.sh-call .ic { flex: none; width: 42px; height: 42px; border-radius: 21px; background: #1E6B3F; display: flex; align-items: center; justify-content: center; margin-right: 12px; }
.sh-call b { display: block; font-size: 17px; line-height: 21px; }
.sh-call .tx { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.sh-call .tx span { display: block; font-size: 13px; line-height: 17px; color: var(--text2); }
.sh-note { margin: 10px 2px 0; font-size: 15px; line-height: 21px; color: var(--text2); }
.sh-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 52px; margin-top: 12px; border-radius: 12px; font-size: 17px; font-weight: 700; }
.toast {
  position: fixed; left: 16px; right: 16px; top: 38%; z-index: 9500; max-width: 560px; margin: 0 auto; padding: 12px 14px; border-radius: 10px;
  background: var(--btn); color: var(--btn-text); font-size: 15px; line-height: 21px; text-align: center;
  opacity: 0; transform: translateY(6px); transition: opacity 160ms ease-out, transform 160ms var(--ease-out); pointer-events: none;
}
.toast.show { opacity: 1; transform: translateY(0); }

.sheet.wide { }

.dl-sub { margin: 2px 0 10px; font-size: 14px; line-height: 20px; color: var(--text2); }
.dl-h { margin: 12px 0 6px; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.4px; }
.dl-row { position: relative; display: flex; align-items: center; width: 100%; min-height: 54px; padding: 6px 10px 6px 14px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-align: left; }
.dl-row:active { background: var(--press2); }
.dl-row.free { cursor: default; }
.dl-row.free:active { background: var(--bg); }
.dl-row .bar-c { position: absolute; left: 0; top: 8px; bottom: 8px; width: 5px; border-radius: 0 4px 4px 0; }
.dl-row .hi { width: 40px; height: 40px; margin-right: 10px; }
.dl-row .tx { flex: 1; min-width: 0; }
.dl-row .tx b { display: block; font-size: 16px; line-height: 20px; }
.dl-row .tx span { display: block; font-size: 14px; line-height: 18px; color: var(--text2); }
.dl-row .st { flex: none; margin-left: 8px; font-size: 13px; font-weight: 700; text-align: right; }
.dl-row .st.pre { font-weight: 600; color: #7A5A00; }
body.dark .dl-row .st.pre { color: #E6C264; }
.dl-row .st small { display: block; font-size: 12px; font-weight: 600; }
.dl-row .tx span.rt { font-size: 13px; line-height: 17px; font-weight: 600; color: var(--pre-tx); }
.dl-row .go { flex: none; margin-left: 8px; height: 44px; min-width: 92px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.dl-row.dep { opacity: 0.95; }
.pk-foot { position: sticky; bottom: 0; margin: 6px -16px -16px; padding: 10px 16px 16px; background: var(--surface); border-top: 1px solid var(--line); z-index: 3; }
.pk-foot .sh-btn { margin-top: 0; }
.pk-sub { margin: 4px 0 10px; font-size: 15px; line-height: 21px; color: var(--text2); }
.pk-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 4px; }

.pk-it { position: relative; text-align: center; padding: 8px 2px 6px; margin: 2px; border-radius: 12px; border: 2px solid transparent; }
.pk-it .hi { width: 56px; height: 56px; margin: 0 auto; }
.pk-it span.n { display: block; margin-top: 2px; font-size: 12px; line-height: 15px; color: var(--text2); }
.pk-it.sel { border-color: var(--edge); background: var(--press2); }
.pk-it.sel span.n { color: var(--text); font-weight: 700; }
.pk-it i { display: none; position: absolute; right: 4px; top: 4px; width: 20px; height: 20px; border-radius: 10px; background: var(--acc-top); color: var(--acc-text); font-style: normal; font-size: 13px; line-height: 20px; text-align: center; font-weight: 700; }
.pk-it.sel i { display: block; }
.pk-it:active { background: var(--press); }
.hs-id { display: flex; align-items: center; margin: 4px 0 12px; }
.hs-id .hi { width: 88px; height: 88px; margin-right: 14px; }
.hs-id h2 { margin: 0; font-family: var(--head-serif); font-weight: 800; font-size: 34px; line-height: 40px; }
.hs-id p { margin: 2px 0 0; font-size: 15px; line-height: 20px; color: var(--text2); }
.mh { font-size: 17px; font-weight: 700; margin: 0 0 8px; }
.mg { display: grid; grid-template-columns: repeat(7, 1fr); grid-gap: 3px; }
.mg .wh { text-align: center; font-size: 12px; line-height: 20px; color: var(--text2); }
.mg .wh.wk { color: var(--wk-text); }
.hd { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 9px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-align: left; padding: 0; }
.hd.wk { background: var(--cell-wk); }
.hd.tl { opacity: 0.4; }
.hd.td { background: var(--today-bg); box-shadow: inset 0 0 0 2px var(--edge); }
.hd .hl, .hd .hr { position: absolute; top: 0; bottom: 0; width: 50%; }
.hd .hl { left: 0; }
.hd .hr { right: 0; }
.hd u { position: absolute; left: 5px; top: 3px; z-index: 2; text-decoration: none; font-size: 13px; line-height: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.hd u.w { left: 3px; padding: 0 3px; border-radius: 4px; background: rgba(20, 23, 28, 0.22); color: #FFFFFF; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.hd em { position: absolute; left: 3px; right: 3px; bottom: 3px; z-index: 2; font-style: normal; font-size: 10px; line-height: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; border-radius: 4px; background: rgba(20, 23, 28, 0.22); color: #FFFFFF; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); }
.hd em.d { color: var(--text); text-shadow: none; background: var(--pre-chip); }
.hs-leg { display: flex; flex-wrap: wrap; margin-top: 12px; font-size: 13px; line-height: 18px; color: var(--text2); }
.hs-leg span { display: inline-flex; align-items: center; margin-right: 16px; }
.hs-leg i { display: inline-block; width: 22px; height: 12px; border-radius: 4px; margin-right: 6px; }
.hs-leg i.h { background: linear-gradient(to right, rgb(var(--c)) 50%, var(--cell) 50%); border: 1px solid var(--line); }
.hs-note { margin: 12px 0 0; font-size: 13px; line-height: 18px; color: var(--text2); }


@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; width: 460px; margin-left: -230px; bottom: 24px; border-radius: 16px; border: 1px solid var(--edge); }
  .sheet.wide { width: 760px; margin-left: -380px; }
  .pk-grid { grid-template-columns: repeat(8, 1fr); }
}

/* --- сводка дня и пояснение --- */
.today { flex: none; display: flex; align-items: center; width: calc(100% - 28px); min-height: 48px; margin: 6px 14px 0; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 16px; line-height: 22px; text-align: left; }
.today:active { background: var(--press2); }
.today .tx { flex: 1; min-width: 0; }
.today .tx b { font-weight: 700; }
.today .none { color: var(--text2); }
.today .go { flex: none; margin-left: 8px; font-size: 22px; line-height: 22px; color: var(--text2); }
.legend { flex: none; display: flex; align-items: center; padding: 6px 16px 0; font-size: 13px; line-height: 16px; color: var(--text2); }
.legend i { display: inline-block; width: 26px; height: 12px; border-radius: 4px; margin-right: 7px; vertical-align: -2px; }
.legend span { display: inline-flex; align-items: center; margin-right: 16px; }
.main {
  flex: none; display: flex; align-items: center; justify-content: center; margin: 8px 14px 10px; height: 54px; color: var(--acc-text);
  font-weight: 700; font-size: 18px; letter-spacing: 0.2px; border-radius: 12px;
}
.main svg { margin-right: 10px; }
/* главные кнопки - в цвете приложения (медовый акцент, градиент, мягкая тень); второстепенные остаются прежними */
.main, .sh-btn, .dl-row .go { background: linear-gradient(to bottom, var(--acc-top), var(--acc-bot)); color: var(--acc-text); box-shadow: var(--acc-shadow); }
.main:active, .sh-btn:active, .dl-row .go:active { background: var(--acc-press); }


@media (hover: hover) and (pointer: fine) {
  .cell:hover::before { background: var(--cell-hover); }
  .bar:hover { filter: brightness(1.06); }
  .nm:hover, .dl-row:hover, .corner:hover { background: var(--press2); }
  .dl-row.free:hover { background: var(--bg); }
  .hd:hover { filter: brightness(0.96); }
  .pk-it:hover { background: var(--press); }
}
/* низкий экран: легенда полос уходит, таблице остаётся больше места */
@media (max-height: 700px) {
  .legend { display: none; }
  .main { margin-top: 8px; margin-bottom: 10px; height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet, .open .sheet { transform: none; opacity: 0; transition: opacity 150ms linear; }
  .open .sheet { opacity: 1; }
  .toast, .toast.show { transform: none; }
  .board.smooth { scroll-behavior: auto; }
}

.fld-in.bad { border-color: var(--err); }

/* тонкие неброские полосы прокрутки с отступом 2 px от края (design-system, раздел 14) */
@supports not selector(::-webkit-scrollbar) { .board, .sheet { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb) transparent; } }
.board::-webkit-scrollbar, .sheet::-webkit-scrollbar { width: 8px; height: 8px; }
.board::-webkit-scrollbar-thumb, .sheet::-webkit-scrollbar-thumb { background: var(--scroll-thumb); background-clip: padding-box; border: 0 solid transparent; }
.board::-webkit-scrollbar-thumb:vertical, .sheet::-webkit-scrollbar-thumb:vertical { border-right-width: 2px; border-radius: 3px 5px 5px 3px; }
.board::-webkit-scrollbar-thumb:horizontal, .sheet::-webkit-scrollbar-thumb:horizontal { border-bottom-width: 2px; border-radius: 3px 3px 5px 5px; }
.board::-webkit-scrollbar-track, .sheet::-webkit-scrollbar-track, .board::-webkit-scrollbar-corner { background: transparent; }
.board { scrollbar-gutter: stable; }

/* календарь выбора даты и общие кнопки второго плана */
.mg { display: grid; grid-template-columns: repeat(7, 1fr); grid-gap: 3px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 8px; }
.cal-nav button { width: 44px; height: 44px; border-radius: 10px; font-size: 26px; line-height: 26px; text-align: center; color: var(--text); }
.cal-nav button:active { background: var(--press2); }
.cal-nav b { font-size: 17px; }
.sh-btn.sec { background: var(--surface); color: var(--text); box-shadow: none; border: 1px solid var(--edge); }

/* --- гости: подсказка в форме записи, красная плашка, метка чёрного списка (задание 28) --- */
.bl-badge { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 8px; background: var(--bad-bg); color: var(--bad-tx); font-style: normal; font-size: 12px; line-height: 16px; font-weight: 700; vertical-align: 1px; }
.av { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: 12px; border-radius: 22px; background: var(--cell-wk); border: 1px solid var(--line); font-size: 18px; font-weight: 800; color: var(--text); }
.g-h { margin: 10px 2px 6px; font-size: 13px; line-height: 18px; color: var(--text2); }
.g-sug, .g-picked { display: flex; align-items: center; width: 100%; min-height: 60px; padding: 6px 10px; margin-top: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-align: left; }
.g-sug:active { background: var(--press2); }
.g-picked { background: var(--surface); border-color: var(--edge); }
.g-sug .tx, .g-picked .tx { flex: 1; min-width: 0; }
.g-sug .tx b, .g-picked .tx b { display: block; font-size: 16px; line-height: 20px; overflow-wrap: anywhere; }
.g-sug .tx span, .g-picked .tx span { display: block; font-size: 13px; line-height: 17px; color: var(--text2); }
.g-do { flex: none; margin-left: 8px; padding: 0 12px; height: 44px; line-height: 42px; border: 1px solid var(--edge); border-radius: 10px; font-size: 14px; font-weight: 700; }
.fld .note-card { margin-top: 10px; }

/* --- экран «Гости» --- */
.gs-search { position: relative; margin-top: 4px; }
.gs-search .fld-in { padding-left: 46px; }
.gs-ic { position: absolute; left: 14px; top: 14px; width: 24px; height: 24px; color: var(--text2); pointer-events: none; }
.gs-row { position: relative; display: flex; align-items: center; width: 100%; min-height: 72px; padding: 8px 10px 8px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); text-align: left; }
button.gs-row:active { background: var(--press2); }
.gs-row .tx { flex: 1; min-width: 0; }
.gs-row .tx b { display: block; font-size: 16px; line-height: 21px; overflow-wrap: anywhere; }
.gs-row .tx span { display: block; font-size: 14px; line-height: 18px; color: var(--text2); overflow-wrap: anywhere; }
.gs-row .go { flex: none; margin-left: 8px; color: var(--text2); font-size: 22px; }
.gs-empty { padding: 28px 12px; text-align: center; color: var(--text2); font-size: 15px; line-height: 21px; }

/* --- карточка гостя --- */
.av.big { width: 64px; height: 64px; border-radius: 32px; font-size: 28px; font-family: var(--head-serif); }
.gc-head { display: flex; align-items: center; margin: 4px 0 14px; }
.gc-head .av { margin-right: 14px; }
.gc-head h2 { margin: 0; font-family: var(--head-serif); font-weight: 800; font-size: 30px; line-height: 36px; overflow-wrap: anywhere; }
.gc-head p { margin: 2px 0 0; font-size: 14px; line-height: 19px; color: var(--text2); }
.gc-btns { display: flex; margin-top: 12px; }
.gc-btns .sh-btn { margin-top: 0; height: auto; min-height: 52px; padding: 6px 10px; font-size: 15px; line-height: 19px; }
.gc-btns .sh-btn + .sh-btn { margin-left: 8px; }
.gc-h { margin: 20px 0 8px 4px; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: 0.4px; }
.bl-card { margin: 0 0 4px; }
.mo-w { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 4px 12px; }
.mo-r { display: flex; align-items: center; min-height: 48px; border-top: 1px solid var(--line); }
.mo-r:first-child { border-top: 0; }
.mo-r .n { flex: none; width: 88px; font-size: 15px; font-weight: 600; }
.mo-r .bar-m { flex: 1; height: 10px; margin: 0 12px; border-radius: 5px; background: var(--cell-wk); overflow: hidden; }
.mo-r .bar-m i { display: block; height: 100%; border-radius: 5px; background: var(--btn); }
.mo-r .v { flex: none; width: 84px; text-align: right; }
.mo-r .v b { display: block; font-size: 15px; line-height: 18px; }
.mo-r .v span { display: block; font-size: 12px; line-height: 15px; color: var(--text2); }
.gs-row.st { min-height: 60px; padding-left: 16px; }
.gs-row.st .bar-c { position: absolute; left: 0; top: 8px; bottom: 8px; width: 5px; border-radius: 0 4px 4px 0; }
.gs-row.st .hi { width: 40px; height: 40px; margin-right: 10px; }
.gs-row .stt { flex: none; margin-left: 8px; max-width: 108px; font-size: 13px; line-height: 17px; font-weight: 700; text-align: right; }
.gs-row .stt.nx { font-weight: 600; color: var(--pre-tx); }

/* --- экран домика --- */
.hm-top { display: flex; align-items: center; justify-content: space-between; }
.hm-set { height: 44px; padding: 0 14px; border: 1px solid var(--edge); border-radius: 10px; background: var(--surface); font-size: 14px; font-weight: 700; }
.hm-set:active { background: var(--press2); }
.hm-st { color: var(--text) !important; font-weight: 600; }
.hnav { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.hnav > button { flex: none; width: 48px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 24px; line-height: 40px; text-align: center; }
.hnav > button:active { background: var(--press2); }
.hmt { display: flex; align-items: center; }
.hmt b { font-size: 18px; }
#hm-grid { touch-action: pan-y; }
.hscreen { overscroll-behavior-x: contain; }
.occ { margin-top: 16px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.occ .t { display: flex; justify-content: space-between; align-items: baseline; font-size: 16px; }
.occ .bar-o { height: 10px; margin-top: 8px; border-radius: 5px; background: var(--cell-wk); overflow: hidden; }
.occ .bar-o i { display: block; height: 100%; border-radius: 5px; background: rgb(var(--c)); }

.pv { margin-top: 10px; }
.pv .bar { position: relative; display: block; height: 40px; margin-top: 6px; line-height: 38px; padding-left: 4px; }
.pv .bar span { position: static; }
