/* График · Грация — цветове от логото */
:root {
  --teal: #006163;
  --teal-600: #00787a;
  --teal-50: #e6f0f0;
  --teal-100: #cfe2e2;
  --silver: #a9b8b8;
  --bg: #f6f8f8;
  --surface: #ffffff;
  --text: #1c2b2b;
  --muted: #5d6f6f;
  --line: #dce5e5;
  --line-soft: #edf2f2;
  --danger: #b3261e;
  --warn: #9a6200;
  --ok: #2e7d4f;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 40, 40, .08), 0 4px 16px rgba(0, 40, 40, .06);
  --top-h: 56px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font-size: 15px; line-height: 1.4; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--teal); }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.warn { color: var(--warn); }
.err { color: var(--danger); min-height: 1.2em; }
.empty { color: var(--muted); padding: 32px 8px; text-align: center; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }

/* ---------- Бутони и полета ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); cursor: pointer; white-space: nowrap; font-weight: 500;
}
.btn:hover { border-color: var(--silver); }
.btn:focus-visible, .chip:focus-visible, .nav-link:focus-visible, .appt:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--teal-600); outline-offset: 2px;
}
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-600); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost-danger { color: var(--danger); border-color: transparent; background: transparent; margin-right: auto; }
.btn.icon { width: 38px; padding: 0; font-size: 22px; line-height: 1; }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 14px; }
.btn.link { border-color: transparent; background: transparent; color: var(--teal); }
.btn.block { width: 100%; margin-top: 10px; }
.btn:disabled { opacity: .6; cursor: default; }
.icon-btn { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 4px 8px; }

input[type=text], input[type=tel], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
textarea { resize: vertical; }
.field { margin-bottom: 12px; min-width: 0; }
.field > label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.chk { display: flex; align-items: center; gap: 8px; margin: 6px 0; cursor: pointer; }
.chk input { width: 18px; height: 18px; accent-color: var(--teal); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; max-height: 220px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.checks .chk { font-size: 14px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg button { border: 0; background: none; padding: 0 12px; min-height: 36px; cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--teal); color: #fff; }
.seg.wrap { flex-wrap: wrap; }
.toggle { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); cursor: pointer; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; background: var(--line-soft); color: var(--muted); font-size: 12px; }
.badge.known { background: var(--teal-50); color: var(--teal); }

/* ---------- Горна лента и навигация ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--top-h);
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
  background: var(--teal); color: #fff;
}
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: .5px; }
.brand img { height: 26px; filter: brightness(0) invert(1); opacity: .95; }
.brand small { font-weight: 400; opacity: .8; font-size: 13px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav-link { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 8px; color: rgba(255,255,255,.85); text-decoration: none; font-weight: 500; }
.nav-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.nav-link.on { background: rgba(255,255,255,.18); color: #fff; }
.nav-ic { font-size: 15px; opacity: .8; }
.nav-badge { background: #f2c14e; color: #3a2a00; border-radius: 99px; font-size: 12px; font-weight: 700; padding: 0 6px; min-width: 20px; text-align: center; }
.user-btn { display: flex; align-items: center; gap: 8px; border: 0; background: none; color: #fff; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.user-btn:hover { background: rgba(255,255,255,.1); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.2); display: grid; place-items: center; font-weight: 700; }
.bottom-nav { display: none; }

.view { padding: 12px 16px 16px; }
.view.loading { opacity: .6; transition: opacity .2s; }

.toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.view-title { font-size: 19px; margin: 0; font-weight: 600; flex: 1; min-width: 160px; }
.nav-group { display: flex; gap: 6px; align-items: center; }
.date-pick { width: 150px !important; }
.tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spec-pick { width: auto !important; min-width: 180px; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 8px; font-size: 12px; }
.lg { padding: 2px 8px; border-radius: 99px; background: var(--line-soft); color: var(--muted); }
.lg.st-done { background: #e3f1e8; color: var(--ok); }
.lg.st-no_show { background: #fbe9e7; color: var(--danger); }

/* ---------- Мрежа на графика ---------- */
.grid-scroll {
  --gut: 56px;
  --colw: minmax(150px, 1fr);
  position: relative; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  height: calc(100vh - var(--top-h) - 120px); min-height: 360px;
  overscroll-behavior: contain;
}
.grid-head, .grid-body { display: grid; grid-template-columns: var(--gut) repeat(var(--cols), var(--colw)); min-width: min-content; }
.grid-head { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.gutter-head { position: sticky; left: 0; background: var(--surface); z-index: 6; }
.col-head { padding: 8px 8px 6px; border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; text-align: center; gap: 1px; min-width: 0; }
.col-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.col-sub { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.col-head .dot { margin-bottom: 2px; }
.gutter { position: sticky; left: 0; z-index: 4; background: var(--surface); border-right: 1px solid var(--line); }
.hour-label { position: absolute; right: 8px; transform: translateY(-50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.hour-label:first-child { transform: none; }
.col { border-left: 1px solid var(--line-soft); }
.col-body {
  position: relative; cursor: cell;
  background-image: repeating-linear-gradient(to bottom, transparent 0 35px, var(--line-soft) 35px 36px);
}
.hour-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line); pointer-events: none; }
.closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(135deg, #f1f4f4 0 6px, #e9eeee 6px 12px); pointer-events: none; }
.now-line { position: absolute; left: 0; right: 0; border-top: 2px solid #d9534f; z-index: 3; pointer-events: none; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: #d9534f; }

.appt {
  position: absolute; z-index: 2; overflow: hidden; cursor: pointer; touch-action: none; user-select: none;
  padding: 3px 6px 3px 8px; border-radius: 6px; font-size: 12px; line-height: 1.25;
  background: color-mix(in srgb, var(--c) 14%, white); border: 1px solid color-mix(in srgb, var(--c) 35%, white);
  border-left: 4px solid var(--c); color: var(--text);
}
.appt:hover { box-shadow: var(--shadow); z-index: 3; }
.appt-time { font-weight: 600; font-variant-numeric: tabular-nums; color: color-mix(in srgb, var(--c) 70%, black); }
.appt-client { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt-svc { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appt.short { display: flex; gap: 6px; align-items: center; padding-top: 1px; padding-bottom: 1px; }
.appt.short .appt-client { font-weight: 500; }
.appt.st-done { opacity: .7; }
.appt.st-no_show { background: repeating-linear-gradient(135deg, #fff 0 6px, #fbeceb 6px 12px); border-color: #e6b8b4; border-left-color: var(--danger); }
.appt.st-no_show .appt-client { text-decoration: line-through; }
.appt.st-cancelled { opacity: .45; background: #f4f4f4; border-left-color: #999; }
.appt.st-cancelled .appt-client { text-decoration: line-through; }
.appt.dragging { opacity: .35; }
.appt.ghost { opacity: .95; box-shadow: 0 6px 20px rgba(0, 40, 40, .25); z-index: 10; pointer-events: none; }

/* ---------- Модални прозорци ---------- */
.backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(10, 30, 30, .45); display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.25); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 6px; }
.modal-head h2 { font-size: 18px; margin: 0; }
.modal-body { padding: 8px 18px 8px; overflow: auto; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.conflicts { padding-left: 18px; }
.conflicts li { margin: 4px 0; }

.appt-form .sugg { display: flex; flex-direction: column; gap: 4px; margin: -6px 0 6px; }
.sugg-item { text-align: left; border: 1px solid var(--line); background: var(--teal-50); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.sugg-item span { color: var(--muted); }
.client-tag { font-size: 12px; color: var(--muted); margin: -6px 0 10px; min-height: 1em; }
.client-tag.known { color: var(--teal); font-weight: 600; }
.req-box { background: #fff8e6; border: 1px solid #f2dca5; border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; font-size: 14px; }
.status-row { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 14px; }
.chip.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.chip.st-no_show.on { background: var(--danger); border-color: var(--danger); }
.chip.st-cancelled.on { background: #777; border-color: #777; }

/* ---------- Съобщения ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #1c2b2b; color: #fff; padding: 10px 16px; border-radius: 8px; box-shadow: var(--shadow); transition: opacity .3s, transform .3s; }
.toast.err { background: var(--danger); }
.toast.out { opacity: 0; transform: translateY(8px); }

/* ---------- Вход ---------- */
.is-login { background: linear-gradient(160deg, var(--teal-50), var(--bg) 60%); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login { width: min(380px, 100%); background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 28px 26px 20px; }
.login-logo { display: block; width: 190px; margin: 0 auto 6px; }
.login h1 { text-align: center; font-size: 16px; font-weight: 500; color: var(--muted); margin: 0 0 18px; letter-spacing: 2px; text-transform: uppercase; }

/* ---------- Входящи ---------- */
.intro { margin: 0 0 12px; }
.req-list { display: grid; gap: 10px; max-width: 900px; }
.req-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.req-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.req-when { margin-left: auto; font-size: 13px; }
.req-want { margin: 6px 0; font-weight: 500; }
.req-msg { margin: 6px 0; padding: 8px 10px; background: var(--bg); border-radius: 8px; }
.req-actions { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.phone { font-variant-numeric: tabular-nums; }

/* ---------- Клиенти ---------- */
.search { max-width: 520px; margin-bottom: 12px; }
.client-list { display: grid; gap: 6px; max-width: 820px; }
.client-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.client-row:hover { border-color: var(--silver); }
.cc-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cc-stats { display: flex; gap: 12px; }
.consents { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 8px 0; }
.cc-notes { background: var(--bg); border-radius: 8px; padding: 8px 10px; white-space: pre-wrap; }
.client-card h3 { font-size: 15px; margin: 14px 0 6px; }
table.hist, table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.hist th, table.list th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
table.hist td, table.list td { padding: 8px; border-bottom: 1px solid var(--line-soft); }
tr.st-cancelled td, tr.st-no_show td { color: var(--muted); }
tr.st-no_show td:nth-child(4) { color: var(--danger); }

/* ---------- Настройки ---------- */
.settings-panel { max-width: 900px; }
.settings-panel section { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; margin-bottom: 12px; }
.settings-panel h3 { font-size: 15px; margin: 6px 0; color: var(--teal); }
.panel-actions { display: flex; justify-content: flex-end; margin: 4px 0 12px; }
table.list tbody tr { cursor: pointer; }
table.list tbody tr:hover td { background: var(--teal-50); }
table.list tr.inactive td { color: #9aa; text-decoration: line-through; }
table.list.hours { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table.list.hours tr { cursor: default; }
table.list.hours input[type=time] { width: 130px; }
.user-menu p { margin: 0 0 8px; }

/* ---------- Моят ден ---------- */
.my-bar { justify-content: space-between; max-width: 640px; margin: 0 auto 6px; }
.my-date { display: flex; flex-direction: column; align-items: center; }
.my-date b { font-size: 18px; }
.my-date span { color: var(--muted); font-size: 14px; }
.my-count { text-align: center; margin: 0 0 8px; }
.my-list { display: grid; gap: 10px; max-width: 640px; margin: 0 auto; }
.my-card { display: flex; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--radius); padding: 12px; }
.my-card.st-done { opacity: .7; }
.my-card.st-no_show { border-left-color: var(--danger); }
.my-time { display: flex; flex-direction: column; font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; min-width: 56px; }
.my-time span { font-weight: 400; font-size: 13px; color: var(--muted); }
.my-main { flex: 1; min-width: 0; }
.my-client { font-weight: 600; font-size: 16px; }
.my-svc { color: var(--muted); margin: 2px 0 4px; }
.my-note { margin-top: 6px; padding: 6px 8px; background: var(--bg); border-radius: 6px; font-size: 14px; white-space: pre-wrap; }
.my-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.badge.st-done { background: #e3f1e8; color: var(--ok); }
.badge.st-no_show { background: #fbe9e7; color: var(--danger); }

/* ---------- Таблет и телефон ---------- */
@media (max-width: 900px) {
  .user-name, .brand small { display: none; }
  .nav-tx { display: none; }
  .nav-link { padding: 8px 10px; }
  .nav-ic { font-size: 18px; opacity: 1; }
}
@media (max-width: 640px) {
  :root { --top-h: 50px; }
  .topbar .nav { display: none; }
  .topbar { justify-content: space-between; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .bottom-nav .nav-link { flex: 1; flex-direction: column; gap: 0; color: var(--muted); border-radius: 0; font-size: 11px; padding: 6px 2px; }
  .bottom-nav .nav-link .nav-tx { display: block; }
  .bottom-nav .nav-link.on { color: var(--teal); background: var(--teal-50); }
  .bottom-nav .nav-badge { position: absolute; top: 2px; right: calc(50% - 22px); }
  .view { padding: 10px 10px 80px; }
  .row2, .row3 { grid-template-columns: 1fr; gap: 0; }
  .row3 { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .grid-scroll { --gut: 44px; --colw: minmax(128px, 1fr); height: calc(100vh - var(--top-h) - 170px); }
  .date-pick { width: 132px !important; }
  .view-title { order: -1; flex-basis: 100%; font-size: 17px; }
  .modal { max-height: calc(100vh - 16px); }
  .backdrop { padding: 8px; align-items: end; }
  .client-row { grid-template-columns: 1fr; gap: 2px; }
  .toolbar { gap: 8px; margin-bottom: 6px; }
  .tools .toggle, .legend { display: none; }
  .seg button { min-height: 32px; padding: 0 10px; font-size: 14px; }
  .fab {
    position: fixed; right: 16px; bottom: calc(72px + env(safe-area-inset-bottom)); z-index: 40;
    width: 56px; height: 56px; border-radius: 50%; padding: 0; font-size: 0; box-shadow: 0 6px 18px rgba(0, 60, 60, .35);
  }
  .fab::before { content: "+"; font-size: 30px; line-height: 1; }
  .grid-scroll { height: calc(100vh - var(--top-h) - 150px); }
  .single-nav .view { padding-bottom: 16px; }
  .req-when { margin-left: 0; flex-basis: 100%; }
}

/* ---------- Период и списък по дни ---------- */
.period { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.period .period-preset { width: auto; min-width: 118px; }
.period-dash { color: var(--muted); }
.period-summary { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin: 0 0 8px; }
.period-summary span:first-child { color: var(--text); font-weight: 600; }
.seg button:disabled { opacity: .45; cursor: not-allowed; }
.agenda-wrap { height: calc(100vh - var(--top-h) - 150px); overflow: auto; }
.agenda { display: grid; gap: 14px; max-width: 980px; }
.ag-day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ag-day.is-today { border-color: var(--teal); }
.ag-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0; padding: 10px 14px; font-size: 15px; background: var(--teal-50); text-transform: none; }
.ag-day.is-today .ag-head { background: var(--teal); color: #fff; }
.ag-day.is-today .ag-head .muted { color: rgba(255,255,255,.85); }
.ag-list { display: flex; flex-direction: column; }
.ag-row {
  display: grid; grid-template-columns: 64px 1fr auto auto; gap: 12px; align-items: center; text-align: left;
  padding: 10px 14px; border: 0; border-top: 1px solid var(--line-soft); border-left: 4px solid var(--c); background: #fff; cursor: pointer; width: 100%;
}
.ag-row:first-child { border-top: 0; }
.ag-row:hover:not(:disabled) { background: var(--teal-50); }
.ag-row:disabled { cursor: default; }
.ag-time { font-weight: 700; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; line-height: 1.15; }
.ag-time small { font-weight: 400; color: var(--muted); font-size: 12px; }
.ag-main { display: flex; flex-direction: column; min-width: 0; }
.ag-main > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-spec { display: flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.ag-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; }
.ag-row.st-cancelled, .ag-row.st-no_show { opacity: .6; }
.ag-row.st-cancelled b, .ag-row.st-no_show b { text-decoration: line-through; }
.my-list .agenda { gap: 12px; }
.my-list .ag-day { background: none; border: 0; overflow: visible; }
.my-list .ag-head { background: none; padding: 6px 2px; }
.my-list .ag-day.is-today .ag-head { background: none; color: var(--teal); }
.my-list .ag-day.is-today .ag-head .muted { color: var(--muted); }
.my-list .ag-list { gap: 10px; }
.my-bar { display: flex; flex-direction: column; align-items: center; gap: 8px; justify-content: flex-start; max-width: 640px; margin: 0 auto 6px; }
.period.compact { justify-content: center; }
.period.compact .date-pick { width: 140px !important; }
@media (max-width: 640px) {
  .ag-row { grid-template-columns: 52px 1fr; }
  .ag-spec, .ag-right { grid-column: 2; align-items: flex-start; flex-direction: row; gap: 8px; }
  .agenda-wrap { height: auto; overflow: visible; }
  .period .date-pick { width: 132px !important; }
}

/* ---------- Мрежа с групи (ден над специалистите) ---------- */
.grid-sticky { position: sticky; top: 0; z-index: 5; background: var(--surface); min-width: min-content; }
.grid-sticky .grid-head { position: static; }
.grid-groups { display: grid; grid-template-columns: var(--gut) repeat(var(--cols), var(--colw)); min-width: min-content; border-bottom: 1px solid var(--line); }
.group-head { padding: 6px 8px; font-weight: 700; font-size: 13px; text-align: center; background: var(--teal-50); border-left: 2px solid var(--teal); color: var(--teal); }
.group-head.is-today { background: var(--teal); color: #fff; }
.col-head.group-start, .col.group-start { border-left: 2px solid var(--teal); }
.has-groups .col-head { padding: 6px 4px 5px; }
.has-groups .col-name { font-size: 13px; }
.has-groups .col-sub { display: none; }
.group-head span { position: sticky; left: 64px; }
.has-groups .now-line::before { display: none; }
