:root {
  --navy: #1a2744;
  --navy-2: #243556;
  --sage: #7d9b8a;
  --sage-2: #5f7f6e;
  --cream: #f7f4ef;
  --cream-2: #efeae2;
  --gold: #c4a35a;
  --text: #1c2434;
  --muted: #6b7280;
  --card: #ffffff;
  --radius: 18px;
  --font-serif: "Fraunces", "Times New Roman", serif;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  background: #d9d2c8;
  font-family: var(--font-sans);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0,0,0,0.15);
}

.screen { display: none; min-height: 100vh; min-height: 100dvh; flex-direction: column; }
.screen.is-active { display: flex; }

/* —— 01 onboarding —— */
.ob {
  padding: 28px 22px 20px;
  text-align: center;
  background: linear-gradient(180deg, #fbf9f6 0%, var(--cream) 100%);
}
.ob-crest {
  width: 56px; height: 56px; margin: 8px auto 10px;
  border: 2px solid var(--navy); border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 22px; color: var(--navy);
  box-shadow: inset 0 0 0 4px var(--cream-2);
}
.ob-brand { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--navy); font-weight: 600; }
.ob h1 {
  font-family: var(--font-serif);
  font-weight: 560;
  font-size: 34px;
  line-height: 1.15;
  margin: 14px 0 8px;
  color: var(--navy);
}
.ob .tag { color: var(--muted); font-size: 14px; margin: 0 0 18px; }
.ob-hero {
  border-radius: 22px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #ddd;
  box-shadow: 0 18px 40px rgba(26,39,68,0.12);
  margin-bottom: 22px;
}
.ob-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.btn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; border: 0; border-radius: 14px; padding: 16px 18px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  font-family: var(--font-sans);
}
.btn .ico { width: 22px; text-align: left; }
.btn-navy { background: var(--navy); color: #fff; margin-bottom: 10px; }
.btn-sage { background: var(--sage); color: #fff; }
.btn-ghost { background: transparent; color: var(--navy); border: 1px solid rgba(26,39,68,0.15); }
.ob-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.room-label { margin: 16px 0 8px; font-size: 12px; font-weight: 600; color: var(--navy); letter-spacing: 0.02em; }
.room-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 10px; }
.room-chips .chip { font-size: 12px; }
.ob-foot {
  margin-top: auto; padding: 18px 22px 28px; text-align: center;
  font-family: var(--font-serif); font-size: 14px; color: var(--navy-2); line-height: 1.4;
}
.trust {
  margin-top: 14px; padding: 10px 12px; border-radius: 12px;
  background: var(--cream-2); font-size: 11px; color: var(--muted);
}

/* —— common header —— */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 8px; gap: 8px;
}
.topbar h2 {
  margin: 0; font-family: var(--font-serif); font-size: 18px; color: var(--navy); font-weight: 560;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 12px; border: 0;
  background: var(--cream-2); color: var(--navy); font-size: 18px; cursor: pointer;
}
.steps {
  display: flex; gap: 8px; padding: 0 16px 10px; align-items: center;
}
.steps .dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--cream-2); color: var(--muted);
}
.steps .dot.on { background: var(--navy); color: #fff; }
.steps .dot.done { background: var(--sage); color: #fff; }
.steps .line { flex: 1; height: 2px; background: #ddd; }
.badge-live {
  display: none !important;
}
.badge-wall {
  position: absolute; right: 10px; top: 10px; z-index: 3;
  margin: 0; display: inline-flex; align-items: center;
  padding: 4px 9px; border-radius: 999px; background: rgba(90,60,40,0.88); color: #fff;
  font-size: 9px; letter-spacing: 0.06em; font-weight: 700;
  pointer-events: none;
}
.badge-wall[hidden] { display: none !important; }

/* —— stage —— */
.stage-wrap {
  margin: 0 auto;
  width: calc(100% - 32px);
  max-width: 390px;
  border-radius: 18px;
  overflow: hidden;
  background: #d8d2c8;
  position: relative;
  aspect-ratio: 3 / 4;
  max-height: min(52vh, 420px);
  box-shadow: 0 10px 26px rgba(0,0,0,0.1);
}
.stage-wrap canvas,
.stage-wrap img.photo {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: fill; /* холст уже 3:4 — без letterbox, маркеры = пиксели фото */
  background: #d8d2c8;
}
.tryon-toolbar {
  margin: 8px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.layer-pills {
  display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; align-items: center;
}
.pill-sep {
  width: 1px; height: 16px; background: rgba(26,39,68,0.15); margin: 0 2px;
}
.pill {
  border: 1px solid rgba(26,39,68,0.1); border-radius: 999px; padding: 5px 10px;
  font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,0.92); color: var(--navy); cursor: pointer;
}
.pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.fab-style { display: none; }
.open-actions {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; z-index: 2;
}
.client-app .staff-only { display: none; }
[data-change-salon][hidden], #btn-staff-app[hidden], #btn-staff-login[hidden], .client-salon-line[hidden] { display: none !important; }
.salon-ob { justify-content: center; }
.salon-ob input { text-transform: uppercase; letter-spacing: 0.04em; }
.salon-error { color: #b3261e; text-align: left; margin: 6px 0 10px; }
.salon-help { margin: 14px 0 8px; text-align: center; }
.client-salon-line { margin: 10px 0 0; text-align: center; }
.open-actions.is-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.open-btn[hidden] { display: none; }
.live-quad.multi .m-handle.corner .m-ico { width: 22px; height: 22px; border-width: 2px; }
.live-quad.multi .m-handle.corner .m-ico::after, .live-quad.multi .m-handle.corner .m-ico { font-size: 8px; }
.win-layout { margin: 0 0 10px; }
.win-layout[hidden], .win-layout-chips[hidden] { display: none; }
.win-layout-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.win-layout-chips .chip { flex: 1 1 auto; text-align: center; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.win-layout-hint { margin: 0; font-size: 12px; line-height: 1.35; color: var(--muted); }
.sheer-style { display: flex; gap: 6px; margin: 0 0 10px; }
.sheer-style[hidden] { display: none; }
.sheer-style .chip { flex: 1; text-align: center; }
.open-btn {
  border: 1px solid rgba(26,39,68,0.1); border-radius: 10px; padding: 7px 2px;
  font-size: 10px; font-weight: 700; cursor: pointer;
  background: rgba(255,255,255,0.95); color: var(--navy);
  font-family: inherit; white-space: nowrap;
}
.open-btn.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.open-btn:active { transform: scale(0.97); }
.layer-hint { margin: 4px 0 2px; font-size: 12px; color: var(--muted); font-weight: 500; }
.roman-hint { display: none; margin: 0 0 8px; font-size: 11px; color: var(--muted); }
.roman-hint.is-on { display: block; }

/* —— markers (screen 02) —— */
.mark-banner {
  margin: 0 16px 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--gold);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  text-align: center;
}
.mark-stage { touch-action: none; position: relative; }
.quad-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.quad-overlay polygon {
  fill: rgba(196, 163, 90, 0.12);
  stroke: rgba(196, 163, 90, 0.9);
  stroke-width: 0.6;
  stroke-dasharray: 1.2 0.8;
  vector-effect: non-scaling-stroke;
}
.quad-overlay .floor-seg {
  stroke: var(--sage-2);
  stroke-width: 0.7;
  stroke-dasharray: 1.4 0.9;
  fill: none;
  vector-effect: non-scaling-stroke;
}
.btn { position: relative; }
.file-cam-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 16px;
}
.live-quad { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.live-quad .live-handle { pointer-events: auto; touch-action: none; }
.live-guides { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.live-guides line, .live-guides polygon { vector-effect: non-scaling-stroke; fill: none; }
.live-guides .g-win { stroke: #fff; stroke-width: 2; stroke-dasharray: 6 4; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.live-guides .g-rod { stroke: var(--gold); stroke-width: 3; filter: drop-shadow(0 0 2px rgba(0,0,0,.5)); }
.live-guides .g-floor { stroke: var(--sage-2); stroke-width: 3; stroke-dasharray: 10 6; filter: drop-shadow(0 0 2px rgba(0,0,0,.5)); }
.m-handle.line .m-lab { padding: 7px 12px; font-size: 12px; border: 2px solid var(--gold); cursor: ns-resize; }
#live-floor .m-lab { border-color: var(--sage-2); }
.frame-hint {
  margin: 0 0 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-soft, #5c675c);
}
.m-handle {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
}
.m-handle.corner .m-ico {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--gold);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--gold);
  font-weight: 700;
}
.m-handle.floor .m-ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--sage-2);
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--navy);
  font-weight: 700;
}
.m-handle .m-lab {
  background: rgba(255,255,255,0.95);
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  white-space: nowrap;
}
.m-handle.is-active .m-ico {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
  transform: scale(1.08);
}
.m-handle.is-active .m-lab { background: var(--navy); color: #fff; }
.tool-row {
  display: flex;
  gap: 6px;
  padding: 10px 16px 0;
  overflow-x: auto;
}
.tool {
  flex: 1 0 auto;
  border: 1px solid #e0dbd3;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
}
.tool.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tool-auto {
  background: #eef6f1;
  border-color: var(--sage-2);
  color: var(--navy);
  font-weight: 700;
}
.return-hint { margin: 4px 0 0; font-size: 11px; display: none; }
#return-range:disabled { opacity: 0.45; }
.mark-sheet .step-kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--gold);
}
.step-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid var(--sage);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--navy);
  flex-shrink: 0;
}

/* light pills: selected = cream outline feel like etalon */

.sheet {
  margin-top: auto; background: #fff; border-radius: 24px 24px 0 0;
  padding: 18px 16px 20px; box-shadow: 0 -8px 30px rgba(0,0,0,0.06);
}
.sheet h3 { margin: 0 0 4px; font-family: var(--font-serif); font-size: 20px; color: var(--navy); }
.sheet .sub { margin: 0 0 14px; color: var(--muted); font-size: 13px; }

/* Примерка: превью сверху, тулбар на полу фото, витрина занимает низ */
.screen-tryon {
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  overflow: hidden;
}
.screen-tryon .topbar-compact {
  padding: 6px 12px 2px;
}
.screen-tryon .topbar-compact h2 {
  font-size: 15px;
}
.screen-tryon .topbar-compact .icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 16px;
}
.screen-tryon .tryon-sticky {
  flex: 0 0 auto;
  background: var(--cream);
  padding-bottom: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.screen-tryon .tryon-sticky .stage-wrap {
  width: calc(100% - 16px);
  max-height: min(46vh, 420px);
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
}
.screen-tryon.is-stage-fold .tryon-sticky .stage-wrap {
  max-height: 22vh;
}
.sheet-fold {
  display: block;
  width: 100%;
  margin: 0 0 6px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  padding: 2px 0 4px;
  cursor: pointer;
}
.tryon-pin-row { display: flex; justify-content: space-between; gap: 12px; }
.tryon-pin-row .sheet-fold { width: auto; }
#btn-edit-setup { text-align: right; color: var(--sage-2, #1e785a); }
#btn-edit-setup[hidden] { display: none; }
.setup-panel { display: none; }
.screen-tryon.is-setup .setup-panel { display: block; }
.screen-tryon.is-setup #tryon-sheet > :not(.setup-panel),
.screen-tryon.is-setup .tryon-toolbar,
.screen-tryon.is-setup .abc-rail,
.screen-tryon.is-setup .badge-live,
.screen-tryon.is-setup .badge-wall { display: none !important; }
.setup-panel { padding-top: 6px; }
.setup-title { margin: 2px 0 6px; font-size: 1.15rem; }
.setup-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #fff4e0; color: #7a4b00; font-size: 13px; line-height: 1.35; }
.setup-note[hidden] { display: none; }
.setup-size .measure-row { margin: 0 0 6px; }
.setup-size input::placeholder { color: #8a8f98; font-weight: 500; }
.setup-cut { margin: 0; font-size: 12.5px; line-height: 1.4; color: var(--muted); }
.setup-cut:empty { display: none; }
#tape-block[hidden], #sheer-full-row[hidden] { display: none; }
.setup-actions { display: flex; gap: 8px; margin-top: 12px; }
.setup-actions .btn { flex: 1; margin: 0; }
.setup-actions .btn-navy { flex: 1.4; }
.screen-tryon .tryon-toolbar-floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  margin: 0;
  width: 100%;
  max-width: none;
  align-self: stretch;
  padding: 10px 8px 9px;
  gap: 5px;
  box-sizing: border-box;
  background: rgba(22, 28, 40, 0.82);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.28);
  pointer-events: none;
}
.screen-tryon .tryon-toolbar-floor > * {
  pointer-events: auto;
}
.screen-tryon .tryon-toolbar-floor .layer-pills {
  justify-content: center;
}
.screen-tryon .tryon-toolbar-floor .wall-chips {
  justify-content: center;
  gap: 4px;
}
.screen-tryon .tryon-toolbar-floor .pill {
  padding: 6px 11px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
.screen-tryon .tryon-toolbar-floor .pill.on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.screen-tryon .tryon-toolbar-floor .pill-sep {
  background: rgba(255, 255, 255, 0.35);
}
.screen-tryon .tryon-toolbar-floor .chip {
  padding: 4px 9px;
  font-size: 10px;
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--navy);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.screen-tryon .tryon-toolbar-floor .chip.on {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}
.screen-tryon .tryon-toolbar-floor .open-btn {
  padding: 8px 4px;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}
.screen-tryon .tryon-toolbar-floor .open-btn.on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.screen-tryon .badge-live {
  margin-bottom: 0;
}
.screen-tryon .abc-rail {
  position: absolute;
  left: 8px;
  top: 38%;
  transform: translateY(-50%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 6px;
  border-radius: 18px;
  background: rgba(18, 24, 36, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}
.screen-tryon .abc-rail .abc {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--navy);
  border-color: transparent;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.screen-tryon .abc-rail .abc.on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.screen-tryon .sheet-tryon .vitrina-pin {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #fff;
  margin: 0 -16px 6px;
  padding: 8px 12px 6px;
  border-bottom: 1px solid #eee;
}
.screen-tryon .vitrina-pin .cat-chips,
.screen-tryon .vitrina-pin .style-chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-bottom: 6px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.screen-tryon .vitrina-pin .style-chips {
  margin-bottom: 0;
}
.screen-tryon .vitrina-pin .chip {
  flex: 0 0 auto;
}
.screen-tryon .sheet-tryon {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: -6px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-top: 0;
  padding-bottom: 8px;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.screen-tryon .sheet-tryon .fabrics {
  max-height: none;
  overflow: visible;
}
.screen-tryon .sheet-tryon .fab-card img {
  height: 88px;
  min-height: 88px;
}
.screen-tryon .bottom-nav {
  flex: 0 0 auto;
}
.topbar-compact {
  padding: 8px 12px 4px;
}
.topbar-compact h2 {
  font-size: 16px;
}
.bottom-nav-steps button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  line-height: 1.15;
}
.bottom-nav-steps .nav-n {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  background: var(--cream-2);
  color: var(--muted);
}
.bottom-nav-steps button.on .nav-n {
  background: var(--navy);
  color: #fff;
}
.row-between { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fabrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: 38vh;
  overflow-y: auto;
  padding-bottom: 8px;
  -webkit-overflow-scrolling: touch;
}
.fab-card {
  flex: none; width: 100%; border: 2px solid transparent; border-radius: 16px; overflow: hidden;
  background: var(--cream-2); cursor: pointer; text-align: left; padding: 0; font: inherit; color: inherit;
}
.fab-card.on { border-color: var(--sage-2); }
.fab-card img { width: 100%; height: 88px; object-fit: cover; display: block; }
.fab-card { position: relative; }
.fab-tint { position: absolute; left: 0; top: 0; right: 0; height: 88px; mix-blend-mode: multiply; opacity: 0.85; pointer-events: none; border-radius: inherit; }
.fab-card .meta { padding: 8px 10px 10px; }
.fab-card strong { display: block; font-size: 12px; }
.fab-card small { color: var(--muted); font-size: 11px; }

.length-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px;
}
.len-card {
  border: 1px solid #e5e1da; border-radius: 14px; padding: 12px; text-align: left;
  background: #fff; cursor: pointer; font: inherit;
}
.len-card.on { background: #e8f0ea; border-color: var(--sage-2); }
.len-card strong { display: block; font-size: 13px; color: var(--navy); }
.len-card small { color: var(--muted); font-size: 11px; }

.slider-row { margin: 8px 0 16px; }
.slider-row label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.slider-row input[type=range] { width: 100%; accent-color: var(--sage-2); }

.quote-box {
  background: var(--cream); border-radius: 14px; padding: 12px; font-size: 13px; margin-bottom: 12px;
}
.quote-box .line { display: flex; justify-content: space-between; gap: 10px; margin: 4px 0; color: var(--muted); }
.quote-box .line > span:last-child { flex: 0 0 auto; white-space: nowrap; }
.quote-box .total { margin-top: 8px; font-weight: 700; color: var(--navy); font-size: 15px; }

/* before/after */
.ba {
  margin: 0 16px; border-radius: 20px; overflow: hidden; position: relative;
  aspect-ratio: 4/3; background: #ccc;
}
.ba canvas, .ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba .after { clip-path: inset(0 0 0 50%); }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 36px; margin-left: -18px;
  z-index: 3; cursor: ew-resize; touch-action: none;
}
.ba-handle::before {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; background: #fff;
  transform: translateX(-50%); box-shadow: 0 0 8px rgba(0,0,0,0.3);
}
.ba-knob {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 36px; height: 36px; border-radius: 50%; background: #fff; color: var(--navy);
  display: grid; place-items: center; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.ba-label {
  position: absolute; top: 10px; z-index: 2; font-size: 10px; font-weight: 800; letter-spacing: 0.08em;
  background: rgba(0,0,0,0.45); color: #fff; padding: 4px 8px; border-radius: 8px;
}
.ba-label.l { left: 10px; }
.ba-label.r { right: 10px; }

.form label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; }
.form input, .form textarea {
  width: 100%; border: 1px solid #e0dbd3; border-radius: 12px; padding: 12px 14px;
  font: inherit; background: #fff;
}

.bottom-nav {
  display: flex; justify-content: space-around; padding: 10px 8px 18px;
  background: #fff; border-top: 1px solid #eee;
}
.bottom-nav button {
  border: 0; background: transparent; font-size: 10px; color: var(--muted); cursor: pointer;
}
.bottom-nav button.on { color: var(--navy); font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: rgba(26,39,68,0.95); color: #fff; padding: 10px 14px; border-radius: 12px;
  font-size: 13px; z-index: 50; opacity: 0; pointer-events: none; transition: 0.2s;
  max-width: 90%;
}
.toast.show { opacity: 1; }

.more-link {
  display: block; text-align: center; margin: 8px 16px; font-size: 12px; color: var(--muted);
}
hidden { display: none !important; }

.cat-chips, .style-chips, .abc-row, .extras-row, .check-grid {
  display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px;
}
.style-chips .chip { font-size: 11px; padding: 6px 10px; }
.vitrina-count { margin: -4px 0 8px; font-size: 11px; }
.chip, .abc {
  border: 1px solid #e0dbd3; background: #fff; border-radius: 999px;
  padding: 7px 12px; font-size: 12px; font-weight: 600; color: var(--muted);
  cursor: pointer; font-family: inherit;
}
.chip.on, .abc.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.abc { width: 34px; height: 34px; padding: 0; border-radius: 10px; }
.fab-card .badge {
  display: inline-block; margin-top: 4px; font-size: 10px; font-weight: 700;
  color: var(--sage-2); letter-spacing: 0.04em;
}
.fab-card .price { display: block; margin-top: 2px; font-size: 11px; color: var(--navy); font-weight: 600; }
.wall-chips {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
}
.wall-chips .chip { font-size: 11px; padding: 5px 10px; }
.rod-warehouse { margin: 0 0 10px; }
.icon-btn.icon-text { width: auto; padding: 0 10px; font-size: 12px; font-weight: 600; }
.role-note {
  background: #fff;
  border: 1px solid #e6e1d8;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.keys-banner {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #1a2744;
  color: #fff;
  font-size: 12px;
  padding: 8px 12px;
  text-align: center;
}
.keys-banner a { color: #b8e0d0; font-weight: 700; }
html.degrade-1 .fab-grid { filter: saturate(0.85); }
html.degrade-1 .screen-tryon .stage-wrap { transition: opacity 0.8s; }
html.degrade-2 .vitrina-pin .chip:nth-child(n+4),
html.degrade-2 #abc-slots { opacity: 0.35; pointer-events: none; }
html.degrade-3 .screen-tryon .tryon-toolbar,
html.degrade-3 .sheet-tryon .fab-grid,
.stage-el { margin-bottom: 8px; }
#role-body input[type="number"],
#role-body input[type="text"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d8d2c8;
  font: inherit;
  background: #fff;
  margin-bottom: 4px;
}
#role-body .login-label { font-size: 0.75rem; color: #6b7280; margin: 6px 0 2px; display: block; }
.role-screen {
  background: var(--cream);
  min-height: 100dvh;
  min-height: 100vh;
}
.role-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 4px 16px 28px;
  -webkit-overflow-scrolling: touch;
}
.role-hero {
  background: #fff;
  border: 1px solid #e6e1d8;
  border-radius: 18px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.role-hero h3 {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 22px;
  color: var(--navy);
}
.role-firm {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}
.role-screen .btn { margin-bottom: 8px; }
.role-screen .cab-title {
  margin: 16px 0 8px;
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0;
  text-transform: none;
  color: var(--navy);
  font-weight: 560;
}
.cab-title {
  margin: 18px 0 8px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}
.cab-panel { margin-bottom: 12px; font-size: 14px; line-height: 1.45; color: var(--navy); }
.cab-panel p { margin: 0 0 8px; }
.cab-panel .fint { display: none; }
.cab-blank {
  background: #fff;
  border: 1px solid #e6e1d8;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
}
.cab-list {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}
.cab-list li {
  background: #fff;
  border: 1px solid #e6e1d8;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--navy);
}
.cab-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.cab-actions .btn { margin: 0; padding: 12px 8px; font-size: 13px; }
.cab-job-card,
.role-job {
  background: #fff;
  border: 1px solid #e6e1d8;
  border-radius: 16px;
  padding: 12px 14px;
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--navy);
}
.role-job strong,
.cab-job-card strong { display: block; margin-bottom: 2px; font-size: 14px; }
.role-job small,
.cab-job-card .sub { color: var(--muted); }
.cab-status-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wh-row { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 8px; }
.wh-row input, .role-screen input[type="text"], .role-screen input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #e0dbd3;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
}
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.stat-grid .role-job strong {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.1;
}
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(132px, 1fr);
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  -webkit-overflow-scrolling: touch;
}
.kanban-col {
  background: #f6f3ee;
  border: 1px solid #e6e1d8;
  border-radius: 14px;
  padding: 10px;
  min-height: 120px;
}
.kanban-col h4 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  color: #3a342c;
}
.kanban-col h4 span { color: #8a8074; font-weight: 600; }
.kanban-card {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid #e0dbd3;
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 6px;
  font: inherit;
  cursor: pointer;
}
.kanban-card strong { font-size: 13px; }
.kanban-card small { color: #8a8074; font-size: 11px; }
.kanban-empty { margin: 0; font-size: 12px; color: #9a9186; }
.empty-hint {
  background: #fff7e8;
  border: 1px solid #e8d4a8;
  border-radius: 14px;
  padding: 12px 14px;
  margin: 0 0 12px;
}
.empty-hint strong { display: block; margin-bottom: 4px; }
.empty-hint p { margin: 0; font-size: 13px; color: #5c4a28; line-height: 1.4; }
.role-card {
  background: #fff;
  border: 1px solid #e6e1d8;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  font-size: 13px;
}
.login-label {
  display: block; text-align: left; width: 100%; max-width: 320px;
  margin: 8px auto 4px; font-size: 12px; color: var(--muted); font-weight: 600;
}
#login-slug, #login-pin, #salon-code {
  width: 100%; max-width: 320px; margin: 0 auto;
  display: block; box-sizing: border-box;
  border: 1px solid #e0dbd3; border-radius: 12px;
  padding: 12px 14px; font-size: 16px; font-family: inherit;
  background: #fff; color: var(--navy);
}
#btn-login, #btn-salon-go { margin-top: 14px; }
.measure-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 14px; }
.measure-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.measure-row input {
  width: 100%; box-sizing: border-box; border: 1px solid #e0dbd3; border-radius: 12px;
  padding: 11px 12px; font: inherit; font-size: 16px; color: var(--navy); background: #fff;
}
.quote-src { color: var(--muted); font-size: 12px; margin-top: 2px; }
.lead-list { display: grid; gap: 8px; margin-bottom: 8px; }
.lead-card { display: flex; flex-direction: column; gap: 8px; background: #fff; border: 1px solid #e8e3da; border-left: 4px solid #c9b994; border-radius: 14px; padding: 10px; }
.lead-top { display: flex; gap: 10px; }
.lead-st-new { border-left-color: #d9822b; }
.lead-st-deposit, .lead-st-sewing, .lead-st-install { border-left-color: var(--sage, #5f7f6e); }
.lead-st-done { border-left-color: #1e785a; opacity: 0.85; }
.lead-st-lost { border-left-color: #b8b2a8; opacity: 0.6; }
.lead-items { list-style: none; margin: 0; padding: 6px 0 0; border-top: 1px dashed #e8e3da; display: grid; gap: 4px; }
.lead-items li { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--navy); }
.lead-items li b { white-space: nowrap; }
.lead-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lead-status { border: 1px solid #e0dbd3; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--navy); background: #fff; }
.lead-paid { font-size: 12px; color: var(--muted); }
.lead-pay { display: flex; gap: 6px; flex-wrap: wrap; }
.lead-pay-in { flex: 1 1 110px; min-width: 0; border: 1px solid #e0dbd3; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 15px; color: var(--navy); }
.lead-pay .btn { width: auto; flex: 0 0 auto; padding: 8px 12px; min-height: 0; font-size: 13px; margin: 0; }
.lead-job { color: var(--sage, #5f7f6e); font-weight: 600; font-size: 12px; }
.lead-sum { display: flex; gap: 8px; margin-bottom: 8px; }
.lead-sum span { flex: 1; background: #fff; border: 1px solid #e8e3da; border-radius: 12px; padding: 8px 10px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.lead-sum b { color: var(--navy); font-size: 15px; }
.roll-pick { width: 100%; box-sizing: border-box; border: 1px solid #e0dbd3; border-radius: 12px; padding: 11px 10px; font: inherit; font-size: 15px; color: var(--navy); background: #fff; margin-bottom: 10px; }
.roll-out { background: #fff; border: 1px solid #e8e3da; border-radius: 14px; padding: 12px; margin-bottom: 14px; }
.roll-sum { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.roll-sum b { color: var(--navy); }
.roll-sum span:first-child { font-size: 15px; color: var(--navy); }
.roll-svg { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 12px; }
.roll-svg small { font-size: 11px; color: var(--muted); }
.roll-legend { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--navy); }
.roll-legend li { display: flex; gap: 8px; align-items: flex-start; }
.roll-legend i { flex: 0 0 20px; height: 20px; border-radius: 6px; font-style: normal; font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.lead-margin { display: flex; flex-direction: column; gap: 2px; margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #eef5f0; font-size: 13px; color: var(--navy); }
.lead-margin b { color: var(--sage-2); }
.lead-margin small { color: var(--muted); font-size: 12px; }
.lead-margin.low { background: #fbeeec; }
.lead-margin.low b { color: #b4442e; }
.margin-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.margin-sum > div { background: #fff; border: 1px solid #e8e3da; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.margin-sum small { color: var(--muted); font-size: 12px; }
.margin-sum b { font-size: 15px; color: var(--navy); white-space: nowrap; }
.margin-sum .margin-total { grid-column: 1 / -1; background: #eef5f0; border-color: #d3e6da; }
.margin-sum .margin-total b { color: var(--sage-2); font-size: 18px; }
.margin-sum .margin-total.low { background: #fbeeec; border-color: #f0d2cc; }
.margin-sum .margin-total.low b { color: #b4442e; }
.margin-row > b { display: flex; flex-direction: column; align-items: flex-end; white-space: nowrap; }
.margin-row > b small { font-weight: 600; font-size: 12px; color: var(--sage-2); }
.margin-row.low > b, .margin-row.low > b small { color: #b4442e; }
.act-modal { position: fixed; inset: 0; z-index: 9000; background: rgba(26, 39, 68, 0.45); display: flex; align-items: flex-end; justify-content: center; }
.act-sheet { background: var(--cream); width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.act-head { display: flex; align-items: center; justify-content: space-between; font-family: var(--font-serif); font-size: 20px; color: var(--navy); }
.act-photos { background: #fff; border: 1px solid #e8e3da; border-radius: 14px; padding: 10px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; color: var(--navy); }
.act-photos small { font-weight: 400; color: var(--muted); }
.act-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.act-thumbs:empty { display: none; }
.act-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; }
.act-add { margin: 0; cursor: pointer; }
.act-field { margin-bottom: 10px; }
.act-sign-wrap { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.act-sign-wrap canvas { width: 100%; height: 150px; background: #fff; border: 1.5px dashed #c9c1b3; border-radius: 12px; touch-action: none; }
.act-sign-wrap .copy { align-self: flex-end; border: 0; background: none; color: var(--sage-2); font: 600 13px var(--font-sans); cursor: pointer; }
.lead-act-btn, .lead-act-open { margin-top: 8px; font-size: 14px; text-decoration: none; }
.shape-fold .heading-chips { margin-top: 10px; }
.shape-faces, .shape-mode { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0; font-size: 13px; color: var(--muted); }
.shape-segs { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.shape-segs label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.shape-segs input { border: 1px solid #e0dbd3; border-radius: 10px; padding: 10px; font: inherit; font-size: 16px; color: var(--navy); background: #fff; width: 100%; box-sizing: border-box; }
.piece-tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.piece-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.piece-total { background: #fff; border: 1px solid #e8e3da; border-radius: 12px; padding: 9px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.piece-total b { color: var(--navy); font-size: 17px; }
.piece-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.piece-row { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; align-items: center; background: #fff; border: 1px solid #e8e3da; border-radius: 12px; padding: 9px 10px; }
.piece-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; color: var(--navy); }
.piece-main small { font-size: 12px; color: var(--muted); }
.piece-row > b { color: var(--navy); white-space: nowrap; }
.piece-who { grid-column: 1 / -1; border: 1px solid #e0dbd3; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--navy); background: #fff; }
.piece-mine { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; background: #fff; border: 1px solid #e8e3da; border-radius: 14px; padding: 12px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.piece-mine b { font-size: 20px; color: var(--navy); }
.piece-mine small { flex-basis: 100%; font-size: 12px; }
.lead-claim { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; padding: 10px; border-radius: 12px; background: #fff6e0; color: #6b4e00; font-size: 13px; }
.lead-claim .btn { margin: 0; }
.lead-est-btn { margin-top: 8px; font-size: 14px; }
.lead-notify { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12px; color: var(--muted); }
.lead-notify span { flex: 1; }
.lead-notify .btn { flex: 0 0 auto; width: auto; margin: 0; padding: 8px 12px; min-height: 0; font-size: 13px; }
.scrap-hint { display: block; margin: 4px 0 0; padding: 6px 9px; border-radius: 9px; background: #e6f1ea; color: #1f6b4a; font-size: 12px; font-style: normal; font-weight: 600; line-height: 1.35; }
.scrap-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.scrap-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid #e8e3da; border-radius: 12px; padding: 9px 10px; }
.scrap-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; color: var(--navy); }
.scrap-row small { font-size: 12px; color: var(--muted); }
.scrap-row .btn { flex: 0 0 auto; width: auto; padding: 7px 10px; font-size: 12px; min-height: 0; }
.scrap-add .pb-grid { margin-top: 10px; }
.pb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.pb-field { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); font-weight: 600; }
.pb-field input { border: 1px solid #e0dbd3; border-radius: 10px; padding: 9px 10px; font: inherit; font-size: 15px; color: var(--navy); background: #fff; width: 100%; box-sizing: border-box; }
.heading-block { margin: 6px 0 10px; }
.heading-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.heading-chips .chip { font-size: 13px; }
.pro-fold { margin: 0 0 12px; border: 1px solid #e8e3da; border-radius: 12px; padding: 8px 12px; background: #fff; }
.pro-fold summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--navy); }
.pro-fold .measure-row { margin-top: 10px; }
.pro-fold select { width: 100%; box-sizing: border-box; border: 1px solid #e0dbd3; border-radius: 12px; padding: 11px 10px; font: inherit; font-size: 16px; color: var(--navy); background: #fff; }
.order-items { margin: 14px 0; padding: 12px; background: #fff; border: 1px solid #e8e3da; border-radius: 14px; }
.order-items h3 { margin-top: 0; }
.room-row input { width: 100%; box-sizing: border-box; border: 1px solid #e0dbd3; border-radius: 12px; padding: 11px 12px; font: inherit; font-size: 16px; color: var(--navy); margin-bottom: 8px; }
.item-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid #f0ece5; }
.item-row img { width: 48px; height: 36px; object-fit: cover; border-radius: 6px; flex: none; }
.item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.item-info strong { font-size: 14px; color: var(--navy); }
.item-info small { font-size: 11px; color: var(--muted); line-height: 1.35; }
.item-row b { font-size: 13px; color: var(--navy); white-space: nowrap; }
.item-del { border: 0; background: var(--cream, #f4f1ea); color: var(--navy); width: 28px; height: 28px; border-radius: 50%; font-size: 16px; line-height: 1; cursor: pointer; flex: none; }
.items-total { display: flex; justify-content: space-between; padding-top: 8px; border-top: 2px solid #e8e3da; margin-top: 4px; font-size: 15px; color: var(--navy); font-weight: 700; }
.item-note { margin: 4px 0 0; }
.blank-item { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed #e0dbd3; }
.lead-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; flex: none; background: var(--cream-2); }
.lead-info { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.lead-info strong { color: var(--navy); font-size: 15px; }
.lead-info small { color: var(--muted); font-size: 12px; line-height: 1.35; }
.lead-msg { color: var(--navy) !important; }
.lead-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 2px; }
.lead-call { color: var(--navy); font-weight: 700; text-decoration: none; font-size: 14px; }
.lead-foot b { color: var(--navy); font-size: 14px; }
.wh-row select { flex: 1; min-width: 0; border: 1px solid #e0dbd3; border-radius: 12px; padding: 11px 10px; font: inherit; font-size: 15px; background: #fff; color: var(--navy); }
#screen-login .btn, #screen-salon .btn { width: 100%; max-width: 320px; margin-left: auto; margin-right: auto; }
.cab-blank p { margin: 0 0 6px; }
.screen[data-screen="supplier"] .sheet { max-width: 420px; }
.cm-box {
  background: var(--cream); border-radius: 12px; padding: 10px 12px;
  font-size: 12px; color: var(--navy); margin-bottom: 10px; line-height: 1.45;
}
.check-grid label {
  flex: 1 1 42%; font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
}
.extras-row label {
  flex: 1 1 auto; font-size: 12px; color: var(--navy);
  display: flex; align-items: center; gap: 6px;
  background: var(--cream); padding: 8px 10px; border-radius: 10px;
}
.cut-details {
  margin: 0 0 12px; border-radius: 12px; background: var(--cream-2); padding: 8px 12px;
  font-size: 12px; color: var(--muted);
}
.cut-details summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.cut-body { margin-top: 8px; line-height: 1.45; white-space: pre-wrap; }
.disclaimer { font-size: 11px; color: var(--muted); margin: 0 0 12px; line-height: 1.4; }
.quote-box .line strong { color: var(--navy); font-weight: 600; }
.quote-box .total { font-size: 18px; font-family: var(--font-serif); }
.quote-plain { margin: 6px 0 10px; font-size: 0.9rem; color: var(--muted); line-height: 1.4; }
.tryon-cta-bar {
  display: grid; gap: 8px; margin-top: 12px;
  padding: 4px 0 8px;
}
.tryon-cta-bar .btn { margin-bottom: 0; }
.adv-fold { margin: 8px 0 12px; border-radius: 12px; background: var(--cream-2, #f3f0ea); padding: 8px 12px; }
.adv-fold summary { cursor: pointer; font-weight: 600; color: var(--navy); font-size: 13px; }
.adv-fold .abc-rail-inline { display: flex; gap: 8px; margin: 10px 0 4px; }
.adv-fold .abc-rail-inline .abc {
  flex: 1; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px; font-weight: 700; color: var(--navy);
}
.adv-fold .abc-rail-inline .abc.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.wiz-sheet {
  position: fixed; inset: 0; z-index: 80; background: rgba(26,39,68,.45);
  display: flex; align-items: flex-end; justify-content: center; padding: 16px;
}
.wiz-sheet[hidden] { display: none !important; }
.wiz-card {
  width: min(420px, 100%); background: #fff; border-radius: 18px 18px 14px 14px;
  padding: 18px 16px 14px; box-shadow: 0 -8px 40px rgba(26,39,68,.18);
}
.wiz-card h3 { margin: 0 0 6px; font-family: var(--font-serif); font-size: 1.25rem; color: var(--navy); }
.wiz-card .sub { margin: 0 0 12px; }
.wiz-label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 10px 0 6px; }
.wiz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.wiz-chips .chip { border: 1px solid var(--line); background: var(--cream); border-radius: 999px; padding: 8px 12px; font: inherit; color: var(--navy); }
.wiz-chips .chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.order-success {
  margin: 0 0 14px; padding: 14px; border-radius: 14px; background: #e8efe9; color: var(--navy);
}
.order-success strong { display: block; margin-bottom: 4px; font-size: 1.05rem; }
.screen[data-screen="03"] .abc-rail { display: none; }
.screen[data-screen="03"].show-abc .abc-rail { display: flex; }

/* Вертикальный экран — одна колонка. Горизонтальный — все четыре экрана в ширину. */
.install-chip {
  flex: 0 0 auto;
  border: 0;
  background: #2f6b4f;
  color: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.install-chip[hidden] { display: none !important; }

@media (min-width: 1000px) and (min-height: 560px) {
  .app-shell:has(#screen-login.is-active),
  .app-shell:has(#screen-salon.is-active) {
    max-width: 480px;
    min-height: 0;
    margin: max(24px, 10vh) auto 24px;
    border-radius: 22px;
  }
  #screen-login.is-active,
  #screen-salon.is-active { min-height: 0; }
  #screen-login .ob,
  #screen-salon .ob { padding: 36px 40px 32px; }
}

@media (orientation: landscape) and (max-height: 500px), (min-width: 1000px) and (min-height: 560px) {
  .app-shell:has(#screen-03.is-active),
  .app-shell:has(#screen-04.is-active),
  .app-shell:has(#screen-05.is-active),
  .app-shell:has(#screen-more.is-active) {
    max-width: min(1180px, calc(100vw - 20px));
    height: calc(100dvh - 12px);
    min-height: 0;
    margin: 6px auto;
    border-radius: 16px;
  }
  #screen-03.is-active,
  #screen-04.is-active,
  #screen-05.is-active,
  #screen-more.is-active {
    display: grid;
    height: 100%;
    max-height: 100%;
    min-height: 0;
  }
  #screen-03.is-active {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 380px);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  #screen-03.is-active .tryon-sticky { display: contents; }
  #screen-03.is-active .topbar-compact { grid-column: 1 / -1; grid-row: 1; }
  #screen-03.is-active .stage-wrap {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    max-width: none;
    max-height: none;
    aspect-ratio: auto;
    height: calc(100% - 8px);
    margin: 4px 8px 4px 12px;
  }
  #screen-03.is-active .sheet-tryon {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    margin: 0;
    border-radius: 0;
    border-left: 1px solid #e6e0d6;
  }
  #screen-03.is-active .bottom-nav { grid-column: 1 / -1; grid-row: 3; }
  #screen-03.is-active .vitrina-pin .cat-chips {
    flex-wrap: wrap;
    overflow: visible;
  }
  #screen-04.is-active,
  #screen-05.is-active,
  #screen-more.is-active {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 440px);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }
  #screen-04.is-active > .topbar,
  #screen-05.is-active > .topbar,
  #screen-more.is-active > .topbar { grid-column: 1 / -1; grid-row: 1; }
  #screen-04.is-active > .bottom-nav,
  #screen-05.is-active > .bottom-nav,
  #screen-more.is-active > .bottom-nav { grid-column: 1 / -1; grid-row: 3; }
  #screen-04.is-active > .stage-wrap {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    width: calc(100% - 16px);
    max-width: none;
    max-height: none !important;
    aspect-ratio: auto;
    height: auto;
    margin: 8px;
    align-self: stretch;
  }
  #screen-04.is-active > .sheet {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    overflow: auto;
    margin: 0;
  }
  #screen-05.is-active > .ba {
    grid-column: 1;
    grid-row: 2;
    margin: 8px;
    aspect-ratio: auto;
    min-height: 0;
    height: auto;
    align-self: stretch;
  }
  #screen-05.is-active > .sheet {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
    overflow: auto;
  }
  #screen-more.is-active > .role-scroll {
    grid-column: 1 / -1;
    grid-row: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    align-content: start;
  }
  #screen-more.is-active .role-hero,
  #screen-more.is-active .cab-title,
  #screen-more.is-active .role-card,
  #screen-more.is-active .cab-panel { grid-column: 1 / -1; }
}

@media (min-width: 1000px) and (min-height: 560px) {
  .app-shell:has(#screen-03.is-active),
  .app-shell:has(#screen-04.is-active),
  .app-shell:has(#screen-05.is-active),
  .app-shell:has(#screen-more.is-active) {
    max-width: min(1600px, 100vw);
    height: 100dvh;
    margin: 0 auto;
    border-radius: 0;
  }
  #screen-03.is-active {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px);
  }
  #screen-03.is-active .stage-wrap {
    margin: 10px 14px 10px 18px;
    height: calc(100% - 20px);
  }
  #screen-03.is-active #btn-fold-stage { display: none; }
  #screen-03.is-active .fabrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (display-mode: standalone) {
  #btn-pwa-install { display: none !important; }
}
