:root {
  --ink: #111;
  --muted: #8e8e93;
  --tint: #1d4a3a;
  --tint-bg: #1d4a3a;
  --bg: #f2f2f7;
  --card: #fff;
  --fill: #f2f2f7;
  --line: rgba(60,60,67,.12);
  --bad: #c41c1c;
  --bad-bg: #fde8e8;
  --danger: #c41c1c;
  --ok: #1d4a3a;
  --ok-bg: #e4f3ec;
  --wait: #9a7b12;
  --wait-bg: #fff4cc;
  --draft: #0a66c2;
  --draft-bg: #e5f1ff;
  --mute: #636366;
  --mute-bg: #e5e5ea;
  --warn-bg: #f4e3a3;
  --warn-ink: #6d5308;
  --desk: #dcdce2;
  --bar: rgba(242,242,247,.86);
  --tabbar: rgba(249,249,249,.92);
  --scrim: rgba(242,242,247,.28);
  --dot: #d1d1d6;
  --dash: #c7c7cc;
  --ph: #e5e5ea;
  --tooth-ink: #4a5560;
  --tooth-pick-bg: #eef3f7;
  --tooth-bad-bg: #fff5f5;
  --tooth-bad-line: #e24b4b;
  --bar-strong: rgba(242,242,247,.92);
  --rail: #c5ddd2;
  --ink2: #3a3a3c;
  --seg: #e5e5ea;
  --seg-on: #fff;
  --ph-soft: #eee;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tab-h: 52px;
  --nav-h: 56px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --ink: #f2f2f7;
  --muted: #8e8e93;
  --tint: #6fc7a2;
  --tint-bg: #2a6b52;
  --bg: #000;
  --card: #1c1c1e;
  --fill: #2c2c2e;
  --line: rgba(84,84,88,.55);
  --bad: #ff6b61;
  --bad-bg: rgba(255,69,58,.16);
  --danger: #d93b30;
  --ok: #6fc7a2;
  --ok-bg: rgba(111,199,162,.16);
  --wait: #e3bb4a;
  --wait-bg: rgba(227,187,74,.18);
  --draft: #7eb6ff;
  --draft-bg: rgba(64,156,255,.18);
  --mute: #a1a1a6;
  --mute-bg: rgba(142,142,147,.22);
  --warn-bg: rgba(227,187,74,.22);
  --warn-ink: #ecca6c;
  --desk: #161618;
  --bar: rgba(0,0,0,.78);
  --tabbar: rgba(22,22,24,.92);
  --scrim: rgba(0,0,0,.45);
  --dot: #48484a;
  --dash: #636366;
  --ph: #2c2c2e;
  --tooth-ink: #c7ccd1;
  --tooth-pick-bg: rgba(111,199,162,.14);
  --tooth-bad-bg: rgba(255,69,58,.14);
  --tooth-bad-line: #ff6b61;
  --bar-strong: rgba(0,0,0,.88);
  --rail: rgba(111,199,162,.35);
  --ink2: #d1d1d6;
  --seg: #1c1c1e;
  --seg-on: #636366;
  --ph-soft: #2c2c2e;
}
:root[data-theme="dark"] :where(input, textarea, select) { color: var(--ink); }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body {
  margin: 0; min-height: 100dvh;
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  background: var(--bg); color: var(--ink);
  overscroll-behavior: none;
}
a { color: var(--tint); text-decoration: none; }
button { font: inherit; }

.app { max-width: 430px; margin: 0 auto; min-height: 100dvh; background: var(--bg); position: relative; }
@media (min-width: 768px) {
  body { background: var(--desk); }
  .app { max-width: 430px; min-height: 100dvh; box-shadow: 0 0 0 1px var(--line), 0 18px 50px rgba(0,0,0,.12); }
  .app-wide { max-width: 740px; }
  .app-wide .wizbar { max-width: 740px; }
}

.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: var(--nav-h);
  padding: calc(8px + var(--safe-t)) 8px 8px;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--line);
}
.nav-stack {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--line);
}
/* chrome-lock.css loaded next to chrome-lock.js */
.nav-stack .nav {
  position: static;
  background: transparent;
  border-bottom: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.nav-sub {
  margin: 0;
  padding: 0 8px 8px;
  text-align: center;
}
.nav-sub[hidden] { display: none !important; }
.nav-title { font-weight: 600; font-size: 17px; text-align: center; flex: 1; }
.nav-btn {
  min-width: 72px; min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 10px; color: var(--tint); font-weight: 500; background: none; border: 0;
}
.nav-btn.right { justify-content: flex-end; }
.nav-btn.ico {
  appearance: none; -webkit-appearance: none;
  min-width: 44px; padding: 0 18px 0 10px; position: relative;
}
.nav-btn.ico svg { width: 22px; height: 22px; display: block; }
.nav-btn.ico.on::after {
  content: "";
  position: absolute; top: 10px; right: 15px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--tint);
  box-shadow: 0 0 0 2px var(--bg);
}
.nav-btn.saved { font-size: 13px; font-weight: 600; color: var(--ok); white-space: nowrap; }
.nav-btn.saved.bad { color: var(--bad); }
form.autosave .js-save { display: none; }
.nav.split {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
}
.nav.split .nav-title { flex: none; justify-self: center; }
.nav.split .nav-btn { justify-self: start; }
.nav.split .nav-btn.right { justify-self: end; }
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 4px 0 8px;
  justify-self: start;
}
.nav-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
  background: var(--tint-bg);
  flex: none;
}
.nav-brand img.nav-wordmark {
  width: 65px;
  height: 17px;
  border-radius: 4px;
  object-fit: fill;
  background: #0d2a1c;
}
/* Sit the wordmark on the same baseline as the centred page title. */
.nav.split > .nav-brand img.nav-wordmark {
  position: relative;
  top: -1.4px;
}
/* Solid green top bar (same layout as ru, filled). */
.nav.nav-green {
  background: #1d4a3a;
  border-bottom: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: #fff;
}
.nav.nav-green .nav-title { color: #fff; }
.nav.nav-green .nav-btn { color: #d7ebe3; }
.nav.nav-green .nav-btn.on {
  color: #1d4a3a;
  font-weight: 500;
  background: #e4f3ec;
  border-radius: 10px;
  padding: 0 12px;
  min-height: 32px;
}
.nav.nav-green .nav-btn.ico.on::after {
  background: #fff;
  box-shadow: 0 0 0 2px #1d4a3a;
}
.nav.nav-green .nav-brand {
  padding-left: 2px;
}
.nav.nav-green .nav-brand b { color: #fff; }
.nav.nav-green .nav-brand img.nav-wordmark {
  width: 79px;
  height: auto;
  max-height: 20px;
  background: transparent;
  border-radius: 0;
  object-fit: contain;
  top: 0;
}
:root[data-theme="dark"] .nav.nav-green {
  background: #000;
}
:root[data-theme="dark"] .nav.nav-green .nav-btn { color: rgba(255,255,255,.72); }
:root[data-theme="dark"] .nav.nav-green .nav-btn.ico.on::after {
  box-shadow: 0 0 0 2px #000;
}
:root[data-theme="dark"] html:has(.nav-green),
:root[data-theme="dark"]:has(.nav-green) {
  background: #000;
}
:root[data-theme="dark"] html:has(.nav-green) body {
  background: var(--bg);
  box-shadow: none;
}
/* Keep the same white wordmark as light green bar (don’t swap to chip logo). */
:root[data-theme="dark"] .nav.nav-green .nav-brand img.nav-wordmark {
  content: url(/static/logo-zubfix-on-green.png?v=ongreen4);
  background: transparent;
  border-radius: 0;
}
/* Mode switch — title-like on green plans nav */
.nav.split > .desk-mode {
  justify-self: center;
  z-index: 20;
}
.desk-mode {
  position: relative;
  z-index: 20;
  justify-self: center;
}
.desk-mode > summary {
  list-style: none;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -.01em;
  white-space: nowrap;
  user-select: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 2px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  transition: opacity .15s ease;
}
.desk-mode > summary::-webkit-details-marker { display: none; }
.desk-mode > summary:hover,
.desk-mode[open] > summary {
  opacity: .72;
  background: transparent;
  border-color: transparent;
}
.desk-mode > summary::after {
  content: "";
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: .55;
  transition: transform .15s ease;
}
.desk-mode[open] > summary::after { transform: rotate(180deg); }
.desk-mode-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  min-width: 196px;
  padding: 6px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(29, 74, 58, .08);
  box-shadow:
    0 4px 6px rgba(18, 36, 28, .04),
    0 14px 32px rgba(18, 36, 28, .18);
  animation: desk-mode-in .14s ease-out;
}
.desk-mode-menu::before {
  content: "";
  position: absolute;
  top: -5px; left: 50%;
  width: 10px; height: 10px;
  margin-left: -5px;
  background: #fff;
  border-left: 1px solid rgba(29, 74, 58, .08);
  border-top: 1px solid rgba(29, 74, 58, .08);
  transform: rotate(45deg);
}
@keyframes desk-mode-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.desk-mode-menu a {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  color: #1d4a3a;
  text-decoration: none;
  text-align: left;
}
.desk-mode-menu a + a { margin-top: 2px; }
.desk-mode-title {
  font-weight: 650;
  font-size: 15px;
  letter-spacing: -.02em;
  line-height: 1.2;
}
.desk-mode-hint {
  font-size: 12px;
  font-weight: 500;
  color: #6b7a74;
  line-height: 1.25;
}
.desk-mode-menu a.on { background: #e4f3ec; }
.desk-mode-menu a.on .desk-mode-title { color: #1d4a3a; }
.desk-mode-menu a:not(.on):hover { background: #f3f7f5; }
.desk-mode-menu a.on {
  padding-right: 32px;
}
.desk-mode-menu a.on::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 7px;
  height: 12px;
  margin-top: -7px;
  border-right: 2px solid #1d4a3a;
  border-bottom: 2px solid #1d4a3a;
  transform: rotate(45deg);
  opacity: .85;
}
.pick-row {
  display: flex;
  gap: 10px;
  margin: 0 0 4px;
}
.pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 14px 14px;
  border-radius: 14px;
  background: var(--card);
  cursor: pointer;
}
.pick input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--dash);
  background: transparent;
  display: grid;
  place-content: center;
  accent-color: var(--tint-bg);
}
.pick input[type="radio"]::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  transform: scale(0);
}
.pick input[type="radio"]:checked {
  border-color: var(--tint-bg);
  background: var(--tint-bg);
}
.pick input[type="radio"]:checked::after {
  transform: scale(1);
}
.logo-pick .nav-brand {
  min-height: 0;
  padding: 0;
}
.logo-pick .nav-brand img.nav-wordmark {
  width: 107px;
  height: 28px;
  border-radius: 6px;
}
.nav-brand b {
  font-size: 17px;
  font-weight: 600;
  color: var(--tint);
  letter-spacing: -.02em;
}
.wiz-sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-start; justify-content: center;
  padding: env(safe-area-inset-top, 0px) 12px 24px;
  pointer-events: none;
}
.wiz-sheet.hide,
.wiz-sheet[hidden] { display: none !important; }
.wiz-sheet-back {
  position: absolute; inset: 0;
  background: transparent;
  pointer-events: none;
}
.wiz-sheet-card {
  position: relative; width: 100%; max-width: 430px;
  background: var(--card); border-radius: 16px;
  border: 2px solid var(--tint-bg);
  padding: 16px 16px 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.16);
  pointer-events: auto;
  opacity: 0;
  transform: translateY(-10px) scale(.96);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), opacity .22s ease;
}
.wiz-sheet.on .wiz-sheet-card { opacity: 1; transform: none; }
.wiz-sheet-head {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px;
}
.wiz-sheet-title {
  flex: 1; min-width: 0;
  margin: 0;
  font: 600 17px/1.25 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
}
.wiz-sheet-done {
  flex: none;
  width: 28px; height: 28px;
  margin: 0;
  padding: 0; border: 0; background: none;
  color: var(--tint);
  display: grid; place-items: center;
  cursor: pointer;
}
.wiz-sheet-done svg { width: 18px; height: 18px; }
.wiz-sheet-kicker {
  margin: 12px 4px 8px;
  font: 600 12px/1.2 -apple-system, system-ui, sans-serif;
  letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.wiz-sheet-row {
  display: flex; gap: 6px;
}
.wiz-sheet-opt {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
  background: var(--fill); border-radius: 12px;
  padding: 10px 12px; margin: 0;
  font: 600 15px/1.25 -apple-system, system-ui, sans-serif; color: var(--ink);
  white-space: nowrap;
}
.wiz-sheet-opt input { margin: 0; accent-color: var(--tint); }
.wiz-sheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
  padding: 2px 0 4px;
}
.wiz-chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--fill);
  color: var(--ink);
  font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
}
.wiz-chip input {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.wiz-chip.on,
.wiz-chip:has(input:checked) {
  background: var(--tint-bg);
  color: #fff;
}
.wiz-chip[hidden] { display: none !important; }
button.wiz-chip {
  appearance: none; -webkit-appearance: none; border: 0;
}
.filt-line { align-items: stretch; }
.wiz-sheet-opt.filt-date {
  flex-direction: row; align-items: center; gap: 8px;
  min-width: 0; min-height: 44px; padding: 0 10px;
}
.wiz-sheet-opt.filt-date span {
  flex: none;
  display: flex; align-items: center;
  height: 28px;
  font: 600 15px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--muted);
}
.wiz-sheet-opt.filt-date input {
  flex: 1; min-width: 0; width: auto; height: 28px;
  border: 0; background: transparent;
  font: 600 15px/28px -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
}
.nav-btn.strong { font-weight: 600; }

.page { padding: 8px 16px 120px; }
.login-page { position: relative; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; padding: 32px 24px calc(32px + var(--safe-b)); }
.login-page:has(.login-core) { justify-content: flex-start; }
.login-core { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.login-page > .more {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: calc(12px + var(--safe-b));
  margin: 0;
  z-index: 2;
}
.brand { text-align: center; margin-bottom: 28px; }
.brand .mark {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 16px;
  background: var(--tint-bg); color: #fff; display: grid; place-items: center;
  font: 700 22px/1 -apple-system, sans-serif;
}
.brand img.mark { display: block; object-fit: cover; }
.brand img.brand-wordmark {
  display: block; width: 214px; height: auto; margin: 0 auto 16px;
}
/* Dark theme swaps this image via content:url, which drops the intrinsic height. */
.login-page .brand img.brand-wordmark {
  height: 56px;
  object-fit: contain;
}
.brand h1 { font-size: 28px; letter-spacing: -.02em; margin: 0 0 6px; }
.brand p { margin: 0; color: var(--muted); font-size: 15px; }

/* Clinic door: logo green fills the whole viewport. */
body.clinic-gate {
  --clinic-green: #27452d;
  background: var(--clinic-green);
  color: #fff;
}
body.clinic-gate .app {
  background: var(--clinic-green);
  box-shadow: none;
}
@media (min-width: 768px) {
  body.clinic-gate { background: var(--clinic-green); }
  body.clinic-gate .app { box-shadow: none; }
}
body.clinic-gate .brand p { color: rgba(255,255,255,.78); }
body.clinic-gate .btn {
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.55);
}
body.clinic-gate .banner.bad {
  background: rgba(255,255,255,.92);
}
body.clinic-gate .gate-err {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
  color: #ffb4ae;
}
body.clinic-gate .group,
body.clinic-gate .pin-box {
  background: #fff;
}
body.clinic-gate .group label {
  color: #8e8e93;
  border-bottom-color: rgba(60,60,67,.12);
}
body.clinic-gate .group input,
body.clinic-gate .pin-box input {
  color: #111;
}
body.clinic-gate .pin-box input::placeholder {
  color: #c7c7cc;
}

/* Role page: same green field and white wordmark as the clinic door. */
body.login-gate {
  --clinic-green: #27452d;
  background: var(--clinic-green);
  color: #fff;
}
body.login-gate .app {
  background: var(--clinic-green);
  box-shadow: none;
}
@media (min-width: 768px) {
  body.login-gate { background: var(--clinic-green); }
  body.login-gate .app { box-shadow: none; }
}
body.login-gate .brand p,
body.login-gate .more summary { color: rgba(255,255,255,.78); }
body.login-gate .btn {
  background: rgba(255,255,255,.14);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,.55);
}
body.login-gate .gate-err {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
  color: #ffb4ae;
}
body.login-gate .pin-box { background: #fff; }
body.login-gate .pin-box input { color: #111; }
body.login-gate .pin-box input::placeholder { color: #c7c7cc; }
body.login-gate .door {
  background: #fff;
  color: #111;
}
body.login-gate .door span { color: #8e8e93; }
body.login-gate .door.primary {
  background: #fff;
  color: #27452d;
}
body.login-gate .door.primary span { color: rgba(39,69,45,.72); }
body.login-gate .door.off {
  background: rgba(255,255,255,.42);
  color: rgba(255,255,255,.78);
  cursor: default;
}
body.login-gate .door.off span { color: rgba(255,255,255,.62); }
body.login-gate a.back-clinic,
body.clinic-gate a.back-clinic {
  display: block;
  margin: 22px auto 0;
  text-align: center;
  color: rgba(255,255,255,.5);
  font-size: 13px;
}
.doors { display: flex; flex-direction: column; gap: 10px; }
.door {
  display: block; padding: 14px 16px; border-radius: 12px;
  background: var(--card); color: inherit; min-height: 64px;
}
.door b { display: block; font-size: 17px; font-weight: 650; letter-spacing: -.02em; }
.door span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); line-height: 1.35; }
.door.primary { background: var(--tint-bg); color: #fff; }
.door.primary span { color: rgba(255,255,255,.78); }

.group {
  background: var(--card); border-radius: 12px; overflow: hidden; margin: 12px 0;
}
.group label {
  display: block; padding: 11px 16px; margin: 0;
  border-bottom: .5px solid var(--line); font-size: 13px; color: var(--muted);
}
.group label:last-child { border-bottom: 0; }
.finance-total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 0; padding: 12px 16px;
  font-size: 17px; font-weight: 600; color: var(--ink);
  border-bottom: .5px solid var(--line);
}
.finance-total[hidden] { display: none; }
.finance-total b { color: var(--tint); font-weight: 600; }
.dict-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 48px; margin: 0; padding: 0 16px;
  border: 0; border-top: .5px solid var(--line); border-radius: 0;
  background: var(--card); color: var(--tint);
  font: 600 17px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.group label.dict-btn {
  display: flex; padding: 0 16px; border-bottom: 0;
  font: 600 17px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--tint);
}
.contact-hint {
  margin: 8px 4px 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--muted);
}
.timing-box {
  padding: 11px 16px 14px;
  border-top: .5px solid var(--line);
}
.timing-lab {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chips button {
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 18px;
  background: var(--fill);
  color: var(--ink);
  font: 600 15px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.chips button.on {
  background: var(--tint-bg);
  color: #fff;
}
.timing-in {
  display: block;
  width: 100%;
  margin: 10px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: 17px/1.35 -apple-system, sans-serif;
  outline: none;
}
.price-row {
  display: grid;
  grid-template-columns: 1fr 96px;
  gap: 0;
  border-bottom: .5px solid var(--line);
}
.price-row:last-child { border-bottom: 0; }
.group .price-row input {
  margin: 0;
  padding: 12px 16px;
  font: 17px/1.3 -apple-system, sans-serif;
}
.group .price-row input + input {
  border-left: .5px solid var(--line);
  text-align: right;
}
.dict-btn:disabled { opacity: .35; }
.dict-btn.on { color: var(--bad); }
.dict-btn.on span { min-width: 8em; }
.dict-hint {
  margin: 0;
  padding: 10px 16px 14px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--bad);
  background: var(--card);
  border-top: .5px solid var(--line);
}
.group input, .group textarea {
  display: block; width: 100%; margin: 6px 0 0; padding: 0;
  border: 0; background: transparent; font: 17px/1.35 -apple-system, sans-serif;
  outline: none; resize: vertical;
}
.pin-box { background: var(--card); border-radius: 12px; padding: 4px 16px; margin: 0 0 16px; }
.pin-box input {
  width: 100%; border: 0; background: transparent; padding: 14px 0;
  font: 22px/1.2 -apple-system, sans-serif; letter-spacing: .2em; text-align: center; outline: none;
}

.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 50px; border: 0; border-radius: 12px;
  background: var(--tint-bg); color: #fff; font-weight: 600; font-size: 17px;
}
.btn:disabled { opacity: .4; }
.btn.ghost {
  background: transparent; color: var(--tint);
}
.btn.wide { width: auto; padding: 0 18px; min-width: 108px; }
.hide { display: none !important; }

.large-title { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin: 8px 4px 16px; }

.swipe {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  margin: 10px 0;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.swipe.fresh { box-shadow: inset 0 0 0 2px var(--tint); }
.swipe-del {
  position: absolute; inset: 0 0 0 auto; width: 96px; margin: 0;
  display: flex;
  background: var(--danger);
  opacity: 0;
}
.swipe.pull .swipe-del { opacity: 1; }
.swipe-del button {
  flex: 1; border: 0; background: transparent; color: #fff;
  font-weight: 600; font-size: 15px;
}
.cell {
  background: var(--card); border-radius: 12px; padding: 14px 36px 14px 16px;
  margin: 10px 0; color: inherit; display: block;
}
.swipe .cell {
  margin: 0; border-radius: 0; position: relative; z-index: 1;
  will-change: transform;
}
.cell .row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.cell strong { font-size: 17px; }
.cell .fine { margin: 4px 0 0; }
.cell.go { position: relative; }
.cells {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  margin: 10px 0 16px;
}
.cells .cell {
  margin: 0;
  border-radius: 0;
  border-bottom: .5px solid var(--line);
}
.cells .cell:last-child { border-bottom: 0; }
.cell.go::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.6px solid var(--muted);
  border-top: 1.6px solid var(--muted);
  transform: translateY(-50%) rotate(45deg);
}
.swipe.open .swipe-front::after { opacity: 0; }

.tag { font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.tag.mute { background: var(--mute-bg); color: var(--mute); }
.tag.draft { background: var(--draft-bg); color: var(--draft); }
.tag.wait { background: var(--wait-bg); color: var(--wait); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.silent { background: var(--bad-bg); color: var(--bad); }
.fine { color: var(--muted); font-size: 13px; }
.banner { background: var(--ok-bg); color: var(--ok); padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.banner.bad { background: var(--bad-bg); color: var(--bad); }

.tabbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  display: flex; justify-content: space-around;
  padding: 4px 8px var(--safe-b);
  min-height: calc(var(--tab-h) + var(--safe-b));
  background: var(--tabbar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--line); z-index: 30;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 48px; color: var(--muted); font-size: 10px; font-weight: 500;
}
button.tab {
  border: 0; background: none; width: 100%; padding: 0;
  font-family: inherit; font-size: 10px; font-weight: 500; line-height: 1.2;
  color: inherit; cursor: pointer;
}
.tabbar form { flex: 1; margin: 0; display: flex; min-width: 0; }
.tabbar form .tab { flex: 1; }
.tab.on { color: var(--tint); }
.tab svg { width: 26px; height: 26px; }

.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--dot); display: block; }
.dots i.on { background: var(--tint); width: 18px; border-radius: 99px; }

.step-label { display: none; }
.sheet h2 { font-size: 22px; margin: 8px 0 12px; letter-spacing: -.02em; }
.step-h {
  font-size: 13px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
  margin: 18px 4px 10px;
}
/* :first-of-type — hidden inputs precede the first section, so :first-child never matched. */
#wiz[data-layout="canvas"] [data-step]:first-of-type .step-h { margin-top: 8px; }
.nav-stack:has(.nav-green) {
  background: #1d4a3a;
  border-bottom: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.app.chrome-lock > .chrome-mid.page,
.app.chrome-lock > form.chrome-mid {
  padding-top: 4px;
}
.hint { color: var(--muted); font-size: 15px; margin: 0 0 12px; }

.arch { background: var(--card); border-radius: 12px; padding: 12px; margin: 8px 0 16px; }
.arch-cap { font-size: 12px; color: var(--muted); margin: 8px 0 6px; }
.teeth { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.tooth {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 56px; padding: 3px 0 2px; border-radius: 8px; border: 0;
  background: var(--fill); color: var(--tooth-ink); font: 600 10px/1 -apple-system, sans-serif;
  appearance: none; -webkit-appearance: none;
}
.tooth-ico {
  width: 24px; height: 32px; min-width: 24px; min-height: 32px; flex: none;
  display: block; object-fit: contain; pointer-events: none;
}
.tooth.on { color: var(--bad); background: var(--tooth-bad-bg); box-shadow: inset 0 0 0 1.5px var(--tooth-bad-line); }
.tooth.pick { background: var(--tooth-pick-bg); color: var(--tint); box-shadow: inset 0 0 0 1.5px var(--tint); }
.tooth.pick .tooth-ico { filter: brightness(0.72) saturate(0.65); }
.job-rows { margin: 0 0 12px; }
.job-row {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--card); border-radius: 12px; padding: 10px 12px; margin: 8px 0;
}
.job-row b { min-width: 28px; color: var(--bad); font-size: 15px; }
.job-row span { flex: 1; font-size: 15px; }
.job-row .x {
  border: 0; background: none; color: var(--muted); font-size: 20px;
  min-width: 32px; min-height: 32px; padding: 0;
}

.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shots.mid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shots.mid .shot.add { gap: 4px; padding: 8px; }
.shots.mid .shot.add .shot-ico { font-size: 22px; }
.shots.mid .shot.add .shot-lab { font-size: 12px; }
.shots.mid .shot.add svg { width: 22px; height: 22px; }
.pzoom { display: block; }
.plight {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.plight img { max-width: 100%; max-height: 100%; object-fit: contain; }
#wiz[data-photo-cols="1"] .shots > .shot.pic { grid-column: 1 / -1; }
.shot {
  aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--card);
  position: relative;
}
.shot.add {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; width: 100%; margin: 0; padding: 12px;
  border: 1.5px dashed var(--dash); border-radius: 12px;
  background: var(--card); color: var(--tint);
  font: 600 14px/1.2 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  text-align: center; cursor: pointer;
  appearance: none; -webkit-appearance: none;
}
.shot.add .shot-ico { font-size: 32px; font-weight: 300; line-height: 1; display: grid; place-items: center; }
.shot.add .shot-lab { font-size: 14px; font-weight: 600; }
.shot.add input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.shot.pic {
  aspect-ratio: auto;
  display: flex; flex-direction: column;
  background: var(--card);
}
.shot.pic img { width: 100%; aspect-ratio: 1; height: auto; object-fit: cover; display: block; }
.shot.pic.shot-bad {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font: 600 14px/1.3 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.shot.pic.shot-bad img { display: none; }
.shot.pic.shot-bad::after { content: "Фото не открылось"; }
.shot-cap {
  display: block; width: 100%; margin: 0; padding: 8px 10px 10px;
  border: 0; border-top: .5px solid var(--line);
  background: var(--card); color: var(--ink);
  font: 15px/1.3 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  text-align: left; min-height: 44px; white-space: pre-wrap; overflow-wrap: anywhere;
  appearance: none; -webkit-appearance: none;
}
.shot-cap.empty {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--muted); white-space: nowrap;
}
.shot-cap-pen { flex: none; opacity: .75; }
.shot-cap-val { display: none; }
.ai-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 18px 4px 10px;
}
#wiz:not([data-layout="canvas"]) .ai-head { display: none; }
.ai-head .step-h { margin: 0; flex: none; }
#wiz:not([data-layout="canvas"]) .ai-step-name { display: none; }
#wiz[data-layout="canvas"] .ai-notdx { margin-left: 6px; }
.ai-notdx {
  display: inline-block;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--warn-bg);
  color: var(--warn-ink);
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: none;
}
.nav-title .ai-notdx {
  font-size: 9px;
  padding: 2px 5px;
  vertical-align: 2px;
}
.ai-glance {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 10px 12px 12px;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  text-align: center;
  appearance: none;
  -webkit-appearance: none;
}
button.ai-glance { cursor: pointer; }
button.ai-glance:disabled { opacity: .55; cursor: default; }
#ai-shots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 0;
}
#ai-shots .shot,
#ai-shots .shot.pic {
  width: 64px;
  height: 64px;
  aspect-ratio: unset;
  border-radius: 8px;
  overflow: hidden;
  flex: none;
  margin: 0;
  border: 0;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
#ai-shots .shot.pic img {
  width: 100%;
  height: 100%;
  aspect-ratio: unset;
  object-fit: cover;
}
#ai-shots .shot.pic.on { box-shadow: inset 0 0 0 2px var(--tint); }
#ai-shots .shot.pic:disabled { opacity: .65; }
#ai-shots .shot.pic.shot-bad { aspect-ratio: unset; }
#ai-shots .shot.pic.shot-bad::after { content: none; }
.ai-run {
  display: block;
  margin: 10px 0 0;
  text-align: center;
  color: var(--tint);
  font: 600 15px/1.2 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}
.shot-x {
  position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff;
  font-size: 18px; line-height: 1;
}
.shot.add.hide { display: none; }

.wizbar {
  position: fixed; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  padding: 4px 16px var(--safe-b);
  min-height: calc(var(--tab-h) + var(--safe-b));
  background: var(--tabbar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-top: .5px solid var(--line); z-index: 30;
}
.wizbar .dots {
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  margin: 0;
  transform: none;
  pointer-events: none;
}
.wizbar .dots.hide { display: none; }
.wizbar-end {
  margin-left: auto;
  display: flex;
  justify-content: flex-end;
  min-width: 0;
}
.wizbar .btn { min-height: 40px; }
.wizbar:has(#wiz-go.fill) #wiz-back,
.wizbar:has(#wiz-go.fill) .dots { display: none; }
.wizbar:has(#wiz-go.fill) .wizbar-end { flex: 1; margin-left: 0; }
.wizbar .btn.fill { flex: 1; width: 100%; min-width: 0; }
.lan { font: 13px/1.4 ui-monospace, Menlo, monospace; background: var(--card); border-radius: 10px; padding: 10px 12px; word-break: break-all; color: var(--muted); }
.more { margin-top: 20px; }
.more summary { color: var(--muted); font-size: 13px; cursor: pointer; }
@media (display-mode: standalone) {
  .more { display: none; }
}

.page h2 {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 20px 4px 8px;
}
.subcap {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 18px 4px 8px;
}
.checks {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 4px;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--card);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 8px 0;
}
.checks .check {
  margin: 0;
  border-radius: 0;
  border-bottom: .5px solid var(--line);
}
.checks .check:last-child { border-bottom: 0; }
.check input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--tint);
}
.check .lab { display: block; font-size: 17px; font-weight: 500; color: var(--ink); }
.check .fine { display: block; margin: 4px 0 0; }
.check input:disabled + span { opacity: .45; }
.checks .check-nest {
  display: block;
  padding: 0;
}
.checks .check-nest .check-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  margin: 0;
}
.checks .check-nest .check-head input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  flex: none;
  accent-color: var(--tint);
}
.checks .check-embed {
  padding: 0 16px 12px 48px;
}
.checks .check-embed label {
  display: block;
  padding: 0;
  margin: 0;
  border: 0;
  font-size: 13px;
  color: var(--muted);
}
.checks .check-embed input {
  display: block;
  width: 100%;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  font: 17px/1.35 -apple-system, sans-serif;
  color: var(--ink);
  outline: none;
}
.ai-extra { margin-top: 0; }
.ai-box { margin-top: 12px; }
.ai-box ul { margin: 10px 0 0; padding-left: 18px; }
.ai-box li { margin: 6px 0; font-size: 15px; color: var(--ink); }
.hop-kicker {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 14px 0 8px;
}
.sheet h2.hop-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 22px 0 8px;
  color: var(--ok);
  background: var(--ok-bg);
  padding: 12px 14px;
  border-radius: 12px;
}
.hop-hint { margin: 0 0 10px; }
.hop-box { margin-top: 4px; }
.hop-box .timing-box:first-child { border-top: 0; }
.hop-box .fine { margin: 8px 0 0; }
.chips button.guess { box-shadow: inset 0 0 0 1px var(--line); }

.styles {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 0 12px;
  padding-bottom: 2px;
}
.styles::-webkit-scrollbar { display: none; }
.style-pick {
  position: relative;
  flex: 0 0 72px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: var(--card);
  border-radius: 10px;
  padding: 7px 4px 6px;
  font-size: 11px; font-weight: 600; color: var(--ink);
  text-align: center;
  border: 1.5px solid transparent;
}
.style-pick.on { border-color: var(--tint); }
.style-pick input {
  position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer;
}
.swatch { height: 22px; width: 100%; border-radius: 6px; display: block; }
.swatch.pine { background: linear-gradient(90deg, #1d4a3a 34%, #f3f0e8 34%); }
.swatch.night { background: #101614; }
.swatch.paper { background: #f7f4ec; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch.line { background: linear-gradient(90deg, #1d4a3a 8px, #f4f1ea 8px); }
.swatch.todays { background: linear-gradient(90deg, #5d338f 55%, #06b7a2 55%); }
.swatch.sea { background: linear-gradient(90deg, #0c4a6e 55%, #38bdf8 55%); }
.swatch.snow { background: #f8fafc; box-shadow: inset 0 0 0 1px rgba(51,65,85,.16); }
.swatch.indigo { background: #3730a3; }
.swatch.rose { background: linear-gradient(90deg, #9f4d6c 55%, #fbf4f6 55%); }
.swatch.coal { background: linear-gradient(90deg, #1c1917 60%, #d4a574 60%); }

.set-pin {
  margin: 4px 4px 12px;
  font-size: 13px;
  color: var(--muted);
}
.set-pin b { color: var(--ink); font-weight: 600; }
.doc-pic-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--card);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 12px;
}
.doc-pic-wrap {
  position: relative;
  flex: none;
  width: 72px;
  height: 72px;
}
.doc-pic {
  position: relative;
  width: 72px; height: 72px;
  margin: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--fill);
  display: grid; place-items: center;
  color: var(--tint);
  font-size: 28px; font-weight: 300; line-height: 1;
  cursor: pointer;
}
.doc-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.doc-pic input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; }
.doc-pic-lab { margin: 0 0 4px; font-size: 17px; font-weight: 600; color: var(--ink); }
.doc-pic-row .fine { margin: 0; }
.doc-pic-x {
  position: absolute;
  top: -6px;
  right: -6px;
  z-index: 2;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--card);
  box-shadow: 0 0 0 .5px var(--line);
  color: var(--muted);
  font: 500 18px/24px -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

.ask {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.32);
}
.ask-card {
  width: 100%; max-width: 320px;
  background: var(--card);
  border-radius: 14px;
  padding: 22px 16px 0;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
}
.ask-card p {
  margin: 0 8px 18px;
  font-size: 17px;
  font-weight: 600;
  white-space: pre-line;
}
.ask-row {
  display: flex;
  border-top: .5px solid var(--line);
}
.ask-row button {
  flex: 1;
  min-height: 44px;
  border: 0;
  background: none;
  color: var(--tint);
  font-size: 15px;
  padding: 0 4px;
}
.ask-row button + button { border-left: .5px solid var(--line); }
.ask-row button:last-child { font-weight: 600; }

.cell.case {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 12px;
}
.cell.case img,
.cell.case .case-gap,
.port-case img,
.port-case .case-gap {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--ph);
  flex: none;
}
.cell.case .row {
  flex: 1;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-right: 12px;
}
.cell.case strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.port-open {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin: 8px 0 12px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--card);
  color: var(--tint);
  font: 600 17px/1 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  cursor: pointer;
}
.port-pick { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 16px; }
.port-case {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  min-height: 64px;
  text-align: left;
  background: var(--card);
  border: 0;
  border-radius: 12px;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
}
.port-case span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.port-case strong { font-size: 16px; font-weight: 600; }
.port-case.on { box-shadow: inset 0 0 0 2px var(--tint); }
.port-sheet .cap-sheet-card {
  max-height: min(70dvh, 560px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 10px;
}
.port-sheet .wiz-sheet-head { margin-bottom: 4px; }
.port-sheet .port-pick {
  flex: 1;
  min-height: 0;
  margin: 4px 0 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.port-sheet .port-case { background: var(--fill); }
.port-sheet #port-lib-empty { margin: 8px 2px 4px; }

.cap-sheet {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  padding: calc(12px + var(--safe-t)) 16px calc(16px + var(--safe-b));
}
.cap-sheet.hide,
.cap-sheet[hidden] { display: none !important; }
.cap-sheet-back {
  position: absolute; inset: 0;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .28s ease;
}
.cap-sheet.on .cap-sheet-back { opacity: 1; }
.cap-sheet-card {
  position: relative; width: 100%; max-width: 430px;
  background: var(--card); border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: 0 14px 40px rgba(0,0,0,.16);
  opacity: 0;
  transform: translateY(16px) scale(.88);
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .28s ease;
  transform-origin: center center;
  will-change: transform, opacity;
}
.cap-sheet.on .cap-sheet-card { opacity: 1; transform: none; }
.cap-sheet-card img {
  width: 88px; height: 88px; object-fit: cover;
  border-radius: 10px; display: block; margin: 0 0 12px;
  background: var(--fill);
}
.cap-sheet-card textarea {
  display: block; width: 100%; min-height: 168px; margin: 0 0 12px;
  padding: 12px; border: 0; border-radius: 12px;
  background: var(--fill); color: var(--ink);
  font: 17px/1.4 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  resize: vertical;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease .1s, transform .3s cubic-bezier(.2,.8,.2,1) .1s;
}
.cap-sheet.on .cap-sheet-card textarea { opacity: 1; transform: none; }
.cap-sheet-card .btn {
  margin: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease .16s, transform .3s cubic-bezier(.2,.8,.2,1) .16s;
}
.cap-sheet.on .cap-sheet-card .btn { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .cap-sheet-back,
  .cap-sheet-card,
  .cap-sheet-card textarea,
  .cap-sheet-card .btn { transition: none; }
}

.filt-now {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 0 0 10px;
}
.filt-now.hide { display: none; }
.filt-tag {
  appearance: none; -webkit-appearance: none; border: 0;
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: var(--tint-bg); color: #fff;
  font: 600 13px/1.2 -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  white-space: nowrap; cursor: pointer;
}
.filt-tag span { font-size: 16px; line-height: 1; opacity: .75; }
.filt-tag:active { opacity: .7; }

:root[data-theme="dark"] .ask { background: rgba(0,0,0,.6); }
:root[data-theme="dark"] .ask-card,
:root[data-theme="dark"] .cap-sheet-card,
:root[data-theme="dark"] .wiz-sheet-card { box-shadow: 0 14px 40px rgba(0,0,0,.6); }
:root[data-theme="dark"] .app { box-shadow: 0 0 0 1px var(--line); }
:root[data-theme="dark"] .tooth.pick .tooth-ico { filter: none; }
/* Wordmark without its green chip on the dark theme. */
:root[data-theme="dark"] .nav-brand img.nav-wordmark,
:root[data-theme="dark"] .brand img.brand-wordmark {
  content: url(/static/logo-zubfix-nav-dark.png?v=lowerz3);
  background: transparent;
  border-radius: 0;
}
:root[data-theme="dark"] body.login-gate,
:root[data-theme="dark"] body.login-gate .app,
:root[data-theme="dark"] body.clinic-gate,
:root[data-theme="dark"] body.clinic-gate .app {
  background: #27452d;
  box-shadow: none;
}
