/*
 * Mebel House brendi: logotip yashili #0f412a, ochrog'i #155a3b, krem #fefbf1.
 * Uch ko'rinish (theme.js): yorug' = oq; qorong'i = brend yashili sirtlar + krem matn; tizim = telefon bo'yicha.
 * --navy — asosiy (brend) rang; nomi tarixiy. Qorong'ida asosiy tugma krem, ustidagi matn to'q yashil.
 * Kontrast (scratchpad/contrast.mjs): matn ≥ 4.5:1, chegara/ikonka ≥ 3:1 — ikkala rejimda.
 */
:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f2f6f3;
  --field: #ffffff;
  --ink: #13201a;
  --ink-2: #4b5a52;
  --line: #d9e2dc;
  --line-strong: #7b8a82;
  --navy: #0f412a;
  --navy-2: #155a3b;
  --navy-soft: #e3efe7;
  --accent: #f5a524;
  --accent-soft: #fbe6bf;
  --wall: #dfe6e1;
  --on-accent: #2b1d00;
  --ok: #17643f;
  --ok-soft: #dcf0e3;
  --on-ok: #ffffff;
  --warn: #8a5a00;
  --warn-soft: #fdf0d3;
  --danger: #b3261e;
  --danger-soft: #fde7e4;
  --on-danger: #ffffff;
  --on-navy: #fefbf1;
  --focus: #0f412a;
  --top-bg: #ffffff;
  --top-ink: #0f412a;
  --top-line: #d9e2dc;
  --scrim: rgba(10, 30, 20, 0.5);
  --shadow-1: 0 1px 2px rgba(15, 65, 42, 0.06), 0 1px 3px rgba(15, 65, 42, 0.08);
  --shadow-2: 0 4px 16px rgba(15, 65, 42, 0.12), 0 1px 3px rgba(15, 65, 42, 0.08);
  /* qog'oz (blanka, eskiz varag'i) — har doim oq, qora siyoh */
  --paper: #ffffff;
  --paper-ink: #000000;
  --paper-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  /* o'lchamlar */
  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-pill: 999px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --tap: 48px;
  --fs-sm: 14px;
  --fs: 16px;
  --fs-md: 17px;
  --fs-lg: 20px;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
/* Qorong'i — ikki blok bir xil bo'lsin (tizim bo'yicha va qo'lda tanlangan) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b2a1c;
    --surface: #0f412a;
    --surface-2: #155a3b;
    --field: #0b2a1c;
    --ink: #fefbf1;
    --ink-2: #d2dfd5;
    --line: #2e6b4e;
    --line-strong: #84ad97;
    --navy: #fefbf1;
    --navy-2: #f2ead2;
    --navy-soft: #1f6a48;
    --accent: #ffc24d;
  --accent-soft: #6b5220;
  --wall: #1d5f40;
    --on-accent: #2b1d00;
    --ok: #8fe3b0;
    --ok-soft: #1a5639;
    --on-ok: #0b2a1c;
    --warn: #ffd37a;
    --warn-soft: #4a3c10;
    --danger: #ffaaa0;
    --danger-soft: #5c2420;
    --on-danger: #2a0b08;
    --on-navy: #0b2a1c;
    --focus: #ffc24d;
    --top-bg: #0f412a;
    --top-ink: #fefbf1;
    --top-line: #2e6b4e;
    --scrim: rgba(0, 10, 5, 0.65);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-2: 0 6px 20px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b2a1c;
  --surface: #0f412a;
  --surface-2: #155a3b;
  --field: #0b2a1c;
  --ink: #fefbf1;
  --ink-2: #d2dfd5;
  --line: #2e6b4e;
  --line-strong: #84ad97;
  --navy: #fefbf1;
  --navy-2: #f2ead2;
  --navy-soft: #1f6a48;
  --accent: #ffc24d;
  --accent-soft: #6b5220;
  --wall: #1d5f40;
  --on-accent: #2b1d00;
  --ok: #8fe3b0;
  --ok-soft: #1a5639;
  --on-ok: #0b2a1c;
  --warn: #ffd37a;
  --warn-soft: #4a3c10;
  --danger: #ffaaa0;
  --danger-soft: #5c2420;
  --on-danger: #2a0b08;
  --on-navy: #0b2a1c;
  --focus: #ffc24d;
  --top-bg: #0f412a;
  --top-ink: #fefbf1;
  --top-line: #2e6b4e;
  --scrim: rgba(0, 10, 5, 0.65);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-2: 0 6px 20px rgba(0, 0, 0, 0.45), 0 1px 3px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}


* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: var(--fs) / 1.45 var(--sans);
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-tap-highlight-color: transparent;
}
h1 {
  font-size: 18px;
  font-weight: 800;
  margin: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
h2 {
  font-size: 18px;
  font-weight: 800;
  margin: 22px 0 8px;
}
a {
  color: var(--navy);
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.muted {
  color: var(--ink-2);
}
.small {
  font-size: 13px;
}
.hint {
  color: var(--ink-2);
  font-size: var(--fs-sm);
  margin: 4px 0 10px;
}
.warn {
  background: var(--warn-soft);
  color: var(--warn);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  border-left: 4px solid var(--warn);
  font-weight: 600;
}

/* ───── sarlavha: yorug'da oq (yashil matn), qorong'ida to'q yashil ───── */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  /* yon tugmalar o'z kengligida, uzun sarlavha qisqarib «…» bo'ladi — tugma ustiga chiqmaydi */
  grid-template-columns: minmax(max-content, 1fr) minmax(0, auto) minmax(max-content, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: calc(4px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 4px max(12px, env(safe-area-inset-left));
  background: var(--top-bg);
  color: var(--top-ink);
  border-bottom: 1px solid var(--top-line);
}
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  min-width: 0;
  padding: 0 6px;
  margin: 0 -6px;
  border-radius: var(--r-sm);
  color: inherit;
  font-size: 15px;
  text-decoration: none;
  font-weight: 700;
  justify-self: start;
}
.top-link:last-child {
  text-align: right;
  justify-self: end;
}
.top-link:active {
  background: var(--navy-soft);
}
/* bosh ekran: logotipli sarlavha uzun — chap havola 2 qatorga, brend qolgan joyni oladi */
.top:has(> .brand) {
  grid-template-columns: auto minmax(0, 1fr) auto;
}
.top:has(> .brand) > .top-link:first-child {
  max-width: 104px;
  font-size: 14px;
  line-height: 1.15;
}
.top .brand {
  font-size: 16px;
  min-width: 0;
}
.pad {
  padding: 4px 16px 16px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  max-width: 720px;
  margin: 0 auto;
}

/* ───── maydonlar ───── */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  min-width: 0;
}
.field > span {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--ink-2);
}
input,
select,
textarea {
  width: 100%;
  font: inherit;
  font-size: 17px;
  padding: 11px 12px;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--field);
  color: var(--ink);
  min-height: 50px;
}
input::placeholder,
textarea::placeholder {
  color: var(--ink-2);
  opacity: 1;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--focus);
  outline: 3px solid var(--focus);
  outline-offset: 0;
}
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.6;
}
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}

/* ───── ruletka maydonlari ───── */
.sizes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 10px;
}
.tape {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  text-align: center;
}
.tape-field.big .tape {
  font-size: 24px;
  min-height: 60px;
  padding: 8px 4px;
}
.tape:focus {
  background: var(--navy-soft);
  outline-width: 4px;
}
.tape[readonly] {
  background: var(--navy-soft);
}
.tape[aria-invalid="true"] {
  border-color: var(--danger);
  border-width: 2px;
}
.tape-err {
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
  font-style: normal;
}
@keyframes tape-ok {
  from {
    background: var(--ok-soft);
    border-color: var(--ok);
  }
}
.tape.tape-ok {
  animation: tape-ok 0.9s ease-out;
}
.tape-field.act > span {
  color: var(--navy);
  font-weight: 800;
}
.tape-field.act > span {
  text-decoration: underline 3px var(--accent);
  text-underline-offset: 4px;
}
/* ruletka xabari: pastda suzuvchi karta */
.tape-banner {
  position: fixed;
  left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right));
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 10;
  max-width: 696px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: var(--r);
  background: var(--navy);
  color: var(--on-navy);
  box-shadow: var(--shadow-2);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}
body.has-tabs .tape-banner {
  bottom: calc(72px + env(safe-area-inset-bottom));
}

/* ───── tugmalar ───── */
button {
  font: inherit;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
}
.btn-big {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 15px 16px;
  border: 0;
  border-radius: var(--r);
  background: var(--navy);
  color: var(--on-navy);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  margin: 12px 0;
  box-shadow: var(--shadow-1);
  transition: transform 0.12s ease-out, filter 0.12s ease-out;
}
.btn-big:active:not(:disabled) {
  transform: scale(0.985);
  filter: brightness(0.92);
}
.btn-big:disabled {
  opacity: 0.5;
  box-shadow: none;
}
.btn-line {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--r);
  background: transparent;
  color: var(--navy);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.btn-line:active:not(:disabled) {
  background: var(--navy-soft);
}
.btn-line:disabled {
  opacity: 0.5;
}
.danger-btn {
  border-style: solid;
  border-color: var(--danger);
  color: var(--danger);
  font-weight: 700;
}
.danger-btn:active:not(:disabled) {
  background: var(--danger-soft);
}
.danger {
  margin-top: 28px;
  padding-bottom: 96px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 12px;
}
.chips button,
.seg button {
  min-height: 44px;
  padding: 6px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.chips button:active,
.seg button:active {
  border-color: var(--line-strong);
}
.chips button[aria-pressed="true"],
.seg button[aria-pressed="true"] {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--on-navy);
  font-weight: 800;
}
.seg {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.seg button {
  flex: 1 1 0;
  border-radius: var(--r-sm);
  min-height: 48px;
}
.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stepper button {
  width: var(--tap);
  height: var(--tap);
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line-strong);
  background: var(--surface);
  color: var(--navy);
  font-size: 24px;
  font-weight: 700;
}
.stepper button:active {
  background: var(--navy-soft);
}
.stepper output {
  min-width: 36px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
}
.bottom-bar {
  position: sticky;
  bottom: 0;
  padding: 0 16px;
  max-width: 720px;
  margin: 0 auto;
  background: linear-gradient(transparent, var(--bg) 30%);
}
.actions {
  display: grid;
  gap: 8px;
}

/* ───── ro'yxat ───── */
.zamer-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.zamer-item {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  box-shadow: var(--shadow-1);
}
.zamer-item:active {
  background: var(--surface-2);
}
.zi-main {
  font-size: 17px;
  font-weight: 800;
}
.zi-sub,
.zi-addr {
  font-size: 14px;
  color: var(--ink-2);
}

/* ───── proyom kartasi: yig'iladigan, chizmali ───── */
.row-card {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  padding: 0;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.row-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 12px 14px;
  margin: 0;
  cursor: pointer;
  user-select: none;
}
.row-no {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy);
  color: var(--on-navy);
  font-weight: 800;
}
.row-no.done {
  background: var(--ok);
  color: var(--on-ok);
}
.row-main {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.row-sum {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.row-sum i {
  font-weight: 400;
  color: var(--ink-2);
}
.row-state {
  flex: 1;
  font-size: 14px;
  color: var(--ink-2);
}
.row-state.ok {
  color: var(--ok);
  font-weight: 700;
}
.row-chev {
  color: var(--ink-2);
  transition: transform 0.2s ease-out;
}
.row-card.open .row-chev {
  transform: rotate(180deg);
}
.row-body {
  display: none;
  padding: 0 14px 14px;
}
.row-card.open .row-body {
  display: block;
}
.row-card.open {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px var(--navy-soft), var(--shadow-1);
}
.btn-x {
  flex: none;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  color: var(--ink-2);
  font-size: 20px;
  width: 44px;
  height: 44px;
}
.btn-x:active {
  background: var(--surface-2);
}
.btn-x.small {
  width: auto;
  font-size: 14px;
  text-decoration: underline;
}
.more summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
}

/* ───── eshik/deraza chizmasi (proyom kartasida) ───── */
.door-viz {
  max-width: 260px;
  margin: 0 auto 6px;
}
.door-svg {
  width: 100%;
  height: auto;
  display: block;
}
.dv-wall {
  fill: var(--wall);
}
.dv-open {
  fill: var(--surface);
  stroke: var(--ink-2);
  stroke-width: 2;
}
.dv-jamb {
  fill: var(--accent-soft);
  stroke: var(--ink-2);
  stroke-width: 1;
}
.dv-floor {
  stroke: var(--ink-2);
  stroke-width: 3;
}
.dv-frame {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 1.5;
}
.dv-sill {
  fill: var(--ink-2);
}
.dv-hit {
  fill: transparent;
  cursor: pointer;
}
.dv-arrow {
  stroke: var(--ink-2);
  stroke-width: 2;
}
.dv-head {
  fill: var(--ink-2);
}
.dv-val {
  fill: var(--ink);
  font: 800 20px var(--sans);
}
.dv-small {
  font-size: 15px;
}
.dv-zone.act .dv-arrow {
  stroke: var(--navy);
  stroke-width: 4;
  animation: dv-pulse 1s ease-in-out infinite;
}
.dv-zone.act .dv-head,
.dv-zone.act .dv-val {
  fill: var(--navy);
}
@keyframes dv-pulse {
  50% {
    opacity: 0.35;
  }
}

.step-no {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-navy);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
}
.next-wrap {
  margin: 4px 0 12px;
}
.next-wrap .ok-box {
  margin: 0;
  text-align: center;
}
.next-wrap .btn-big {
  margin: 8px 0 0;
}

.seg-ico button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 68px;
  padding: 6px;
}
.ico {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}
.ico circle {
  fill: currentColor;
  stroke: none;
}
.ico .arc {
  stroke-dasharray: 3 2;
}
.ico-t {
  font: 6px var(--sans);
  fill: currentColor;
  stroke: none;
  text-anchor: middle;
}
.small-del {
  margin-top: 12px;
  padding: 8px;
  font-size: 14px;
}

/* «Ruletka ✓» holati sarlavhada */
.tape-status.on {
  background: var(--ok);
  color: var(--on-ok);
  padding: 4px 10px;
  margin: 0;
  min-height: 36px;
  border-radius: var(--r-pill);
}

/* ish tartibi: raqamlangan bo'limlar */
.step-h {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.step-h > i {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-navy);
  font-style: normal;
  font-size: 15px;
  font-weight: 800;
}

/* ───── qo'llanma ───── */
.guide .lead {
  font-size: 17px;
}
.steps {
  padding-left: 22px;
}
.steps li {
  margin-bottom: 10px;
}
.faq {
  border-collapse: collapse;
  width: 100%;
  font-size: 15px;
}
.faq th,
.faq td {
  border-top: 1px solid var(--line);
  padding: 10px 6px;
  text-align: left;
  vertical-align: top;
}
.faq th {
  width: 40%;
}
.specs {
  padding-left: 20px;
  color: var(--ink-2);
}
.guide-img {
  width: 100%;
  height: auto;
  border-radius: var(--r-sm);
  margin: 4px 0 8px;
  border: 1px solid var(--line);
}

/* ───── virtual blanka: Excel shablonning aynan nusxasi (shablon.html) — qog'oz: har doim oq ───── */
.sheet-wrap {
  overflow: hidden;
  padding: 0 8px 16px;
}
.sheet {
  display: inline-block;
  transform-origin: top left;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: var(--paper-shadow);
  color-scheme: light;
}
.xl {
  position: relative;
  background: var(--paper);
  color: var(--paper-ink);
  font-family: Calibri, Carlito, "Segoe UI", Arial, sans-serif;
}
.xl-t {
  border-collapse: collapse;
  table-layout: fixed;
  width: 100%;
}
.xl-t td {
  padding: 0 2px;
  font-size: 11pt;
  line-height: 1.1;
  white-space: nowrap;
  overflow: visible;
}
.xl-t td > span:empty {
  display: none;
}
.xl .rot90 {
  display: inline-block;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.xl .rot255 {
  display: inline-block;
  writing-mode: vertical-rl;
  text-orientation: upright;
}
.xl img {
  position: absolute;
  pointer-events: none;
}

@media print {
  @page {
    size: A4 landscape;
    margin: 7mm;
  }
  body {
    background: #fff;
  }
  .no-print,
  .tape-banner {
    display: none !important;
  }
  .sheet-wrap {
    padding: 0;
    height: auto !important;
  }
  .sheet {
    transform: none !important;
    box-shadow: none;
  }
  .guide {
    max-width: none;
  }
}
@media print {
  /* A4 albom: 7 mm chetlar bilan 741 px balandlik — shablon 783 px, bitta varaqqa sig'dirish */
  .sheet {
    zoom: 0.93;
  }
}

/* ───── rasm, joylashuv, jurnal ───── */
.photo-row,
.geo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 10px;
}
.photo-btn,
.geo-row .btn-line {
  width: auto;
  flex: 0 0 auto;
  padding: 10px 16px;
  border-style: solid;
  cursor: pointer;
}
.photo-count,
#geo-out {
  font-size: 14px;
  color: var(--ink-2);
  overflow-wrap: anywhere;
}
.journal summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  font-weight: 700;
}
.journal ol {
  padding-left: 20px;
  font-size: 14px;
  max-height: 320px;
  overflow: auto;
}
/* rasm ko'rish oynasi — har ikkala rejimda qora fon (surat rangini buzmaslik uchun) */
.photo-ov {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
  gap: 8px;
}
.photo-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
  touch-action: none;
}
.photo-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.photo-ov .badge {
  position: absolute;
  transform: translate(-50%, -50%);
  background: rgba(15, 65, 42, 0.92);
  color: #fefbf1;
  border: 2px solid #fefbf1;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.photo-hint {
  color: #d0d0d0;
  text-align: center;
  margin: 0;
  font-size: 14px;
}
.photo-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 8px;
}
.photo-actions .btn-big,
.photo-actions .btn-line {
  margin: 0;
}
.photo-actions .btn-big {
  background: #fefbf1;
  color: #0f412a;
}
.photo-actions .btn-line {
  color: #fff;
  border-color: #8a8a8a;
  border-style: solid;
}

/* ───── CRM ───── */
.me {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
button.zamer-item {
  width: 100%;
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.crm-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.crm-card dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}
.crm-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.ok-box {
  background: var(--ok-soft);
  color: var(--ok);
  padding: 10px 14px;
  border-radius: var(--r-sm);
  font-weight: 700;
}
.crm-login {
  margin-top: 24px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r);
  padding: 4px 14px;
}
.crm-login summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink-2);
  font-weight: 700;
}

/* ───── proyom rasmlari ───── */
.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 4px 0 10px;
}
.thumb {
  position: relative;
  margin: 0;
}
.thumb img {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  display: block;
}
.thumb-del {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--danger);
  color: var(--on-danger);
  font-size: 14px;
}

/* ───── mahsulot turi ───── */
.kind-seg {
  margin: 4px 0 10px;
}
.kind-seg button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 64px;
  font-weight: 700;
}
.kind-ico {
  font-size: 22px;
  line-height: 1;
}

/* ───── brend logotipi sarlavhada ───── */
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
/* logotip to'q yashil, foni shaffof — har doim krem kafel ustida (qorong'i yashil sarlavhada yo'qolmasin) */
.brand img {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #fefbf1;
  padding: 3px;
  box-shadow: inset 0 0 0 1px rgba(15, 65, 42, 0.12);
}

/* ───── pastki menyu (zamer ichida) ───── */
body.has-tabs {
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
}
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--top-bg);
  border-top: 1px solid var(--top-line);
  padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  min-height: 64px;
  padding: 8px 2px 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  color: var(--ink-2);
  text-decoration: none;
}
.tab span {
  font-size: 20px;
  line-height: 1;
  padding: 4px 16px;
  border-radius: var(--r-pill);
  transition: background-color 0.16s ease-out;
}
/* tanlangan: yashil «hap» ikonka ortida + qalin yozuv (faqat rang emas) */
.tab[aria-current="page"] {
  color: var(--navy);
  font-weight: 800;
}
.tab[aria-current="page"] span {
  background: var(--navy-soft);
}
.wz-start {
  margin: 12px 0 0;
}
.full-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

/* ───── asboblar ro'yxati ───── */
.tool-list {
  list-style: none;
  margin: 12px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.tool {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  min-height: 76px;
  box-shadow: var(--shadow-1);
}
.tool:active {
  background: var(--surface-2);
}
.tool-ico {
  font-size: 28px;
}
.tool b {
  display: block;
  font-size: 17px;
  font-weight: 800;
}
.tool small {
  color: var(--ink-2);
  font-size: 14px;
}

/* ───── yo'l-yo'riq (bosqichma-bosqich) ───── */
.wz {
  padding-top: 8px;
}
.wz-back,
.wz-voice {
  min-height: 44px;
  background: none;
  border: 0;
  color: inherit;
  font: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.wz-voice {
  min-width: 44px;
  font-size: 22px;
  text-align: right;
}
.wz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 16px;
  max-width: 720px;
  margin: 0 auto;
  font-weight: 800;
  color: var(--ink-2);
}
.wz-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
/* qilinmagan — bo'sh halqa, qilingan — to'la yashil, hozirgi — uzun hap */
.wz-dots i {
  width: 12px;
  height: 12px;
  border-radius: var(--r-pill);
  border: 2px solid var(--line-strong);
  background: transparent;
}
.wz-dots i.ok {
  border-color: var(--ok);
  background: var(--ok);
}
.wz-dots i.cur {
  width: 24px;
  border-color: var(--navy);
  background: var(--navy);
}
.wz-say {
  font-size: 19px;
  line-height: 1.45;
  margin: 8px 0 14px;
}
.wz-say.big {
  font-size: 22px;
  font-weight: 700;
}
.wz-cta {
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
  margin: -6px 0 10px;
}
.wz-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.wz-cards.two {
  grid-template-columns: 1fr 1fr;
}
.wz-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 120px;
  padding: 12px 8px;
  border: 2px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-1);
  transition: transform 0.12s ease-out;
}
.wz-card small {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}
/* tanlangan karta: qalin yashil ramka + burchakda ✓ (faqat rang emas) */
.wz-card[aria-pressed="true"] {
  border-color: var(--navy);
  background: var(--navy-soft);
  box-shadow: inset 0 0 0 1px var(--navy);
}
.wz-card[aria-pressed="true"]::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--on-navy);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}
.wz-card:active {
  transform: scale(0.98);
}
.wz-ico {
  display: flex;
  gap: 2px;
  color: var(--navy);
  font-size: 40px;
  line-height: 1;
}
.wz-ico .pic {
  width: 80px;
  height: 80px;
}
.wz-card[aria-pressed="true"] .wz-ico {
  color: var(--navy);
}
.wz-chips button {
  min-height: 48px;
  font-size: 16px;
}
.wz-guide {
  max-width: 300px;
  margin: 0 auto;
}
.guide-svg {
  width: 100%;
  height: auto;
  display: block;
}
.g-wall {
  fill: var(--wall);
}
.g-open {
  fill: var(--surface);
  stroke: var(--ink-2);
  stroke-width: 1.2;
}
.g-furn {
  fill: var(--navy-soft);
}
.g-frame {
  fill: none;
  stroke: var(--ink-2);
  stroke-width: 0.6;
}
.g-sill {
  fill: var(--ink-2);
}
.g-floor {
  stroke: var(--ink-2);
  stroke-width: 2;
}
.g-line {
  stroke: var(--line-strong);
  stroke-width: 0.8;
  stroke-dasharray: 2 2;
}
.g-line.done {
  stroke: var(--ok);
  stroke-dasharray: none;
  stroke-width: 1.2;
}
.g-line.act {
  stroke: var(--navy);
  stroke-width: 3;
  stroke-dasharray: none;
  stroke-linecap: round;
}
.g-start {
  fill: var(--accent);
  stroke: var(--navy);
  stroke-width: 0.8;
}
.g-end {
  fill: var(--navy);
}
.g-runner {
  fill: var(--accent);
}
.wz-value {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 6px 0 12px;
}
.wz-value .tape {
  font-size: 44px;
  min-height: 84px;
  text-align: center;
  border-width: 3px;
  border-radius: var(--r);
}
.wz-value small {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink-2);
}
.wz-value .tape-err {
  grid-column: 1 / -1;
  font-size: 15px;
}
.wz-row {
  display: flex;
  gap: 10px;
}
.wz-row .btn-line {
  flex: 1;
}
.wz-checks {
  background: var(--warn-soft);
  color: var(--warn);
  border-left: 4px solid var(--warn);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  margin-bottom: 10px;
  font-weight: 700;
}
.wz-checks p {
  margin: 4px 0;
}
.wz-photo {
  cursor: pointer;
}
.wz-done {
  margin: 4px 0 8px;
}
.wz-finish {
  background: var(--ok);
  color: var(--on-ok);
}
.wz-foot {
  max-width: 720px;
  margin: 8px auto 0;
  padding: 0 16px 16px;
}
.wz-foot .btn-line {
  border-style: solid;
  border-color: var(--line);
  color: var(--ink-2);
  font-weight: 700;
}
.wz-voice .ico-svg,
.wz-geo .ico-svg,
.wz-photo .ico-svg {
  vertical-align: -5px;
}

/* yo'riq rasmlari (eshik, ilgak, xona) — currentColor + tokenlar */
.pic .p-door {
  fill: var(--navy-soft);
  stroke: currentColor;
  stroke-width: 2;
}
.pic .p-hinge {
  fill: var(--accent);
  stroke: currentColor;
}
.pic .p-handle {
  fill: currentColor;
}
.pic .p-room {
  fill: var(--navy-soft);
}
.pic .p-t {
  font: 8px var(--sans);
  fill: currentColor;
}
.pic .p-wall {
  stroke: currentColor;
  stroke-width: 4;
}
.pic .p-leaf {
  stroke: currentColor;
  stroke-width: 3;
}
.pic .p-arc {
  fill: none;
  stroke: currentColor;
  stroke-dasharray: 3 2;
}
.pic .p-arrow {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* eshik ochilishi — tepadan ko'rinish */
.door-cards .wz-card {
  min-height: 0;
  padding: 10px 6px 12px;
}
.door-cards .wz-card small {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
}
.pic.door-open {
  width: 100%;
  max-width: 150px;
  height: auto;
  color: var(--ink);
}
.pic.door-open .p-room-t {
  font-size: 12px;
  font-weight: 800;
}
.pic.door-open .p-hinge {
  fill: var(--accent);
  stroke: currentColor;
  stroke-width: 1.2;
}
.pic.door-open .p-leaf {
  stroke-width: 4;
  stroke-linecap: round;
}
.pic.door-open .p-arc {
  stroke-width: 1.5;
}
.pic.door-open .p-me {
  fill: var(--navy);
}
.pic.door-open .p-arrow {
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
/* oldidan ko'rinish: yopiq eshik, oshiq-moshiq (sariq) ochiladigan tomonda ko'rinadi */
.pic.door-hand {
  width: 100%;
  max-width: 96px;
  height: auto;
  color: var(--ink);
}
.pic.door-hand .p-frame {
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
}
.pic.door-hand .p-door {
  stroke-width: 1.5;
}
.pic.door-hand .p-hinge {
  fill: var(--accent);
  stroke: currentColor;
  stroke-width: 1.2;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.onboard {
  margin: 12px 0 0;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  background: var(--navy-soft);
  color: var(--ink);
}
.onboard ol {
  margin: 6px 0 0;
  padding-left: 20px;
}
.onboard li {
  margin: 4px 0;
}

/* ───── sozlamalar (sozlama.js): katta qatorli ro'yxat, tanlangan — to'la doira ichida ✓ ───── */
.set-group {
  margin: 8px 0 24px;
}
.set-group h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 6px;
}
.set-group h2 .ico-svg {
  width: 22px;
  height: 22px;
  color: var(--navy);
}
.set-group .hint {
  margin-top: 0;
}
.set-list {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.set-opt {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 68px;
  padding: 10px 16px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  transition: background-color 0.16s ease-out;
}
.set-opt:first-child {
  border-top: 0;
}
.set-opt:active {
  background: var(--surface-2);
}
.set-opt:focus-visible {
  outline-offset: -3px;
  border-radius: var(--r-lg);
}
.set-opt[aria-pressed="true"] {
  background: var(--navy-soft);
}
.set-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--navy);
}
.set-ico .ico-svg {
  width: 26px;
  height: 26px;
}
.set-opt[aria-pressed="true"] .set-ico {
  background: var(--navy);
  color: var(--on-navy);
}
.set-badge {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}
.set-txt {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.set-txt b {
  font-size: 17px;
  font-weight: 700;
}
.set-opt[aria-pressed="true"] .set-txt b {
  font-weight: 800;
}
.set-txt small {
  font-size: 14px;
  color: var(--ink-2);
}
/* radio kabi: bo'sh halqa / to'la doira + ✓ */
.set-check {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
}
.set-opt[aria-pressed="true"] .set-check {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--on-navy);
}

/* ───── harakatni kamaytirish ───── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn-big:active:not(:disabled),
  .wz-card:active {
    transform: none;
  }
}
