:root {
  --bg: #f5f2f8;
  --paper: #fffcff;
  --ink: #1b1524;
  --muted: #6d6578;
  --line: #e6dff0;
  --p: #5b2d82;
  --p2: #7c3aed;
  --ok: #1a8f63;
  --warn: #c48a12;
  --door: #c47a00;
  --cash: #0d7a52;
  --danger: #8b2436;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  height: 100%;
  height: 100dvh;
  height: var(--app-h, 100dvh);
  background: #d9d2e3; color: var(--ink);
  font-family: var(--sans); -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  overflow: hidden;
}
button { font: inherit; cursor: pointer; }
#shell, #app {
  max-width: 430px;
  height: 100%;
  margin: 0 auto;
  background: var(--bg); position: relative; overflow: hidden;
}
#shell { box-shadow: 0 0 0 1px #cfc4dd, 0 20px 60px rgba(50,20,80,.12); }
#app { max-width: none; }
.screen {
  height: 100%;
  display: flex; flex-direction: column;
  padding-top: var(--safe-t);
  overflow: hidden;
}
html.standalone,
html.standalone body {
  background: var(--bg);
}
html.standalone #shell {
  box-shadow: none;
  max-width: none;
}
html.standalone #shell::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; z-index: 120;
  height: var(--safe-t); background: #5b2d82; pointer-events: none;
}
@media (display-mode: standalone) {
  html, body { background: var(--bg); }
  #shell { box-shadow: none; max-width: none; }
  #shell::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; z-index: 120;
    height: var(--safe-t); background: #5b2d82; pointer-events: none;
  }
}

.login { padding: 52px 24px calc(20px + var(--safe-b)); overflow-y: auto; }
.install-hint {
  margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; text-align: left;
}
.install-hint b { color: var(--ink); font-weight: 750; }
.brand {
  font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--p2); font-weight: 800; margin-bottom: 16px;
}
.login h1 { font-size: 28px; letter-spacing: -.03em; margin: 0 0 8px; font-weight: 750; }
.login p { color: var(--muted); margin: 0 0 24px; line-height: 1.45; }
label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin: 0 0 6px; }
input {
  width: 100%; border: 1px solid var(--line); background: var(--paper);
  border-radius: 14px; padding: 15px; font-size: 18px;
}
.btn {
  border: 0; border-radius: 14px; padding: 15px 18px; font-weight: 750; font-size: 16px;
}
.btn.block { width: 100%; display: block; }
.btn.p { background: var(--p); color: #fff; }
.btn.p:active { background: #4a246c; }
.btn.ghost { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.btn.gray { background: #ece6f3; color: #5a5266; }
.btn.door { background: #c47a00; color: #fff; }
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .4; }

.top {
  display: flex; align-items: center;
  padding: 10px 12px 6px; gap: 8px;
}
.top .place { font-size: 13px; color: var(--ink); font-weight: 700; line-height: 1.25; flex: 1; }
.top .when { display: block; font-size: 11px; color: var(--muted); font-weight: 650; }
.cab-open, .icon-nav {
  width: 42px; height: 42px; border: 0; border-radius: 12px;
  background: #efe8f7; color: var(--p); flex-shrink: 0;
  display: grid; place-items: center; padding: 0;
}
.cab-open { font-size: 18px; }
.icon-nav svg { width: 22px; height: 22px; display: block; }
.icon-nav.sm { width: 40px; height: 40px; background: #efe8f7; }
.top-del { padding: 8px 10px 8px; }
.top-del .switcher { flex: 1; margin: 0; min-width: 0; }

.hero {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 20px 0; text-align: center;
  overflow-x: hidden; overflow-y: auto;
}
.rates { display: flex; gap: 8px; margin: 10px 0 18px; }
.rate { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.rate b { display: block; font-size: 20px; }
.rate span { color: var(--muted); font-size: 11px; }
.wait-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--warn);
  margin: 28px auto 12px;
}
.wait-live { margin: 20px 0 8px; }
.wait-rings {
  position: relative; width: 84px; height: 84px; margin: 0 auto;
}
.wait-rings i {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid var(--p2); opacity: 0;
  animation: waitRipple 1.8s ease-out infinite;
}
.wait-rings i:nth-child(2) { animation-delay: .55s; }
.wait-rings i:nth-child(3) { animation-delay: 1.1s; }
.wait-rings b {
  position: absolute; inset: 30px; border-radius: 50%;
  background: var(--p);
  animation: waitCore 1.2s ease-in-out infinite;
}
.wait-pulse {
  color: var(--muted); font-weight: 650; margin: 6px 0 0;
  animation: waitFade 1.4s ease-in-out infinite;
}
@keyframes waitRipple {
  0% { transform: scale(.28); opacity: .5; }
  100% { transform: scale(1); opacity: 0; }
}
@keyframes waitCore {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(.82); }
}
@keyframes waitFade {
  0%, 100% { opacity: .35; }
  50% { opacity: 1; }
}

.stat-cards {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  width: 100%; margin: 8px 0 0;
}
.stat-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 12px 10px; text-align: left; pointer-events: none;
}
.stat-card i { display: block; font-style: normal; font-size: 11px; color: var(--muted); font-weight: 700; }
.stat-card b { display: block; margin-top: 4px; font-size: 22px; font-variant-numeric: tabular-nums; font-weight: 800; }

.q-num {
  display: grid; grid-template-columns: 2ch auto; column-gap: 16px;
  align-items: baseline; justify-content: center;
  font-size: 86px; font-weight: 820; letter-spacing: -.06em; line-height: .88;
  margin: 8px 0 4px; font-variant-numeric: tabular-nums;
}
.q-num .q-pos { text-align: right; min-width: 2ch; }
.q-num small { font-size: 28px; color: var(--muted); font-weight: 650; }
.pre-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; margin-top: 18px; }
.photo-ok {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 0 0 8px; color: var(--ok); font-size: 13px; font-weight: 700;
}
.photo-ok .btn { padding: 8px 12px; font-size: 13px; width: auto; }
.hist-photo { width: 100%; border-radius: 12px; margin: 8px 0; max-height: 220px; object-fit: cover; background: #eee; }
.q-status { font-size: 20px; font-weight: 800; margin: 6px 0 14px; }
.q-bottom {
  width: 100%; flex-shrink: 0;
  padding: 10px 20px calc(12px + var(--safe-b));
  background: var(--bg);
}
.pause-scr { padding-top: 24px; }

.ribbon {
  display: flex; gap: 12px; overflow-x: auto; width: 100%;
  padding: 6px 2px 16px; scrollbar-width: none;
}
.ribbon::-webkit-scrollbar { display: none; }
.rib {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 48px; border: 0; background: none; padding: 0; color: inherit;
}
.av, .av2 {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800;
  overflow: hidden; flex-shrink: 0;
}
.av2 { width: 36px; height: 36px; }
.av.big, .av2.big { width: 52px; height: 52px; font-size: 18px; }
.av img, .av2 img { width: 100%; height: 100%; object-fit: cover; display: block; }
.act-ico {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: #efe8f7; color: var(--p);
  display: grid; place-items: center;
}
.act-ico svg { width: 20px; height: 20px; display: block; }
.act-ico.tg { color: #229ed9; }
a.btn { display: grid; place-items: center; text-decoration: none; }
.stat-card small { font-size: 12px; font-weight: 700; color: var(--muted); }
.rib .nm { font-size: 11px; color: var(--muted); }
.rib.me .av { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--p2); }
.rib.me .nm { color: var(--p); font-weight: 800; }
.queue-acts { width: 100%; display: grid; gap: 8px; }

.offer {
  padding: 0 0 calc(16px + var(--safe-b));
  align-items: stretch; text-align: left;
}
.offer .top { flex-shrink: 0; }
.offer-body {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 20px 22px 0;
}
.offer h1 { font-size: 26px; margin: 10px 0 6px; }
.offer .off-t {
  font-size: 56px; font-weight: 830; letter-spacing: -.04em;
  font-variant-numeric: tabular-nums; margin: 18px 0 8px; line-height: 1;
}
.offer .off-t.urgent { color: var(--warn); }
.offer .off-t.neg { color: #c81e1e; }
.offer .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; margin-top: 28px; }
.offer .hint { color: var(--muted); margin: 0; max-width: 280px; }

.asm { padding: 8px 16px 0; overflow: hidden; }
.asm .timer { flex-shrink: 0; }
.asm-scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.asm > .btn.block { flex-shrink: 0; margin: 10px 0 calc(12px + var(--safe-b)); }
.timer { font-variant-numeric: tabular-nums; font-size: 28px; font-weight: 800; text-align: center; }
.timer.neg { color: #c81e1e; }
.asm-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 14px; margin: 10px 0; }
.asm-h { display: flex; justify-content: space-between; gap: 8px; }
.oid { font-size: 13px; color: var(--muted); }
.oid b { color: var(--ink); font-size: 20px; }
.pay { font-size: 12px; font-weight: 800; text-transform: uppercase; }
.pay.cash { color: var(--cash); }
.cell { display: inline-block; background: #efe8f7; border-radius: 8px; padding: 3px 8px; font-size: 12px; font-weight: 750; margin-top: 6px; }
.grp { margin-top: 12px; }
.grp-h { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.grp.kit .grp-h { color: #8a5a12; }
.item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 0; background: none; text-align: left; padding: 9px 0;
  border-bottom: 1px solid var(--line); color: inherit;
}
.item .ck { width: 22px; height: 22px; border-radius: 6px; border: 2px solid #d4cce0; }
.item.on .ck { background: var(--ok); border-color: var(--ok); }
.item.on .nm { text-decoration: line-through; opacity: .4; }
.item .nm { flex: 1; font-weight: 650; }
.item .qty { font-weight: 850; font-size: 18px; color: var(--p); font-variant-numeric: tabular-nums; }

.del { height: 100%; position: relative; overflow: hidden; background: #d8d2e0; }
.del-map {
  position: absolute; inset: 0; z-index: 0;
  isolation: isolate; overflow: hidden; background: #d8d2e0;
}
.del-map .leaflet-container { height: 100% !important; width: 100% !important; z-index: 0 !important; }
.del-map .leaflet-pane { z-index: auto; }
.del-map .leaflet-control { display: none !important; }

.del-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 6;
  padding-top: var(--safe-t);
  background: linear-gradient(180deg, rgba(245,242,248,.94) 0%, rgba(245,242,248,.55) 72%, transparent);
}

.switcher {
  display: flex; margin: 0 12px 10px; z-index: 4;
  background: rgba(27, 21, 36, .58);
  border-radius: 16px; padding: 4px; overflow: hidden;
}
.switcher button {
  flex: 1; height: 48px; border: 0; border-radius: 12px;
  background: transparent; color: #ece6f3;
  font-weight: 820; font-size: 18px; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  position: relative;
}
.switcher button + button { box-shadow: inset 1px 0 0 rgba(255,255,255,.14); }
.switcher button.on {
  background: #6d3bb8; color: #fff;
  box-shadow: none;
}
.switcher button.done { color: #dff7ea; }
.switcher button.done.on { background: #178a5e; }
.switcher .okcirc {
  width: 22px; height: 22px; border-radius: 50%;
  background: #178a5e; color: #fff;
  display: none; place-items: center; flex-shrink: 0;
}
.switcher button.done .okcirc { display: grid; }
.switcher button.done.on .okcirc { background: #fff; color: #178a5e; }
.switcher .okcirc svg { width: 14px; height: 14px; display: block; }
.switcher .door-mini {
  width: 20px; height: 20px; color: #ffd27a; flex-shrink: 0;
  display: flex; align-items: center;
}
.switcher .door-mini .door-ico { width: 20px; height: 20px; }
.switcher button.on .door-mini { color: #ffe7b0; }

.del-scroll {
  position: absolute; inset: 0; z-index: 5;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0;
}
.map-spacer { height: 42vh; pointer-events: none; }

.del-sheet {
  position: relative; z-index: 5;
  min-height: calc(var(--app-h, 100dvh) - 42vh);
  background: var(--paper);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -12px 32px rgba(40,20,60,.16);
  padding-bottom: calc(148px + var(--safe-b));
}
.due-float {
  position: absolute; left: 16px; right: 16px; bottom: 100%;
  padding: 0 0 10px; pointer-events: none;
}
.due-float .due-left {
  font-size: 40px; font-weight: 830; letter-spacing: -.05em;
  font-variant-numeric: tabular-nums; line-height: .9; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 6px 18px rgba(0,0,0,.4);
}
.due-float .due-left.urgent { color: #ffd36a; }
.due-float .due-left.neg { color: #ff8a80; }
.due-float .due-left.ok { color: #8ef0c0; }
.due-float .due-abs {
  font-size: 13px; font-weight: 700; color: #fff; margin-top: 4px;
  text-shadow: 0 1px 2px rgba(0,0,0,.55), 0 4px 12px rgba(0,0,0,.35);
}
.handle {
  width: 40px; height: 5px; border-radius: 4px; background: #d5cce0;
  margin: 8px auto 4px;
}
.del-fixed-dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 8;
  padding: 10px 14px calc(12px + var(--safe-b));
  background: var(--paper);
  box-shadow: 0 -10px 24px rgba(40,20,60,.08);
}
.sheet-body { padding: 8px 14px 10px; }

.due-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.due-left {
  font-size: 40px; font-weight: 830; letter-spacing: -.05em;
  font-variant-numeric: tabular-nums; line-height: .9;
}
.due-left.urgent { color: #c48a12; }
.due-left.neg { color: #c81e1e; }
.due-left.ok { color: var(--ok); }
.due-abs { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 4px; }
.due-side { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.door-ico { width: 22px; height: 22px; display: block; flex-shrink: 0; }
.who-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #d5c8e6; background: #efe8f7;
  border-radius: 999px; padding: 8px 12px;
  color: var(--ink); font-weight: 800; font-size: 15px;
}
.who-btn.row {
  width: 100%; justify-content: space-between;
  border-radius: 14px; padding: 12px 14px; margin-bottom: 10px;
  text-decoration: none;
}
.who-btn .phone-ico { width: 22px; height: 22px; color: var(--p); }
.who-btn .act { font-size: 11px; color: var(--p); font-weight: 750; letter-spacing: .02em; }

.door-banner {
  display: flex; align-items: center; gap: 10px;
  background: #c47a00; color: #fff;
  border-radius: 14px; padding: 12px 14px;
  font-weight: 800; font-size: 16px; margin-bottom: 10px;
}
.door-banner .door-ico { width: 26px; height: 26px; color: #fff; }

.pay-line {
  font-size: 14px; font-weight: 800; margin: 0 0 10px;
}
.pay-line.cash {
  background: #e8f8f0; color: var(--cash);
  border-radius: 12px; padding: 10px 12px;
}

.addr-head {
  display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px;
}
.street-line {
  flex: 1; font-size: 22px; font-weight: 800; line-height: 1.25; letter-spacing: -.02em;
}
.addr4 {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 7px; margin-bottom: 10px;
}
.addr4 .street { grid-column: 1 / -1; }
.abox {
  background: #f4eef9; border: 1px solid var(--line); border-radius: 12px;
  padding: 8px 8px; min-height: 54px;
}
.abox i {
  display: block; font-style: normal; font-size: 10px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.abox b {
  display: block; margin-top: 4px; font-size: 17px; line-height: 1.2; font-weight: 780;
  overflow-wrap: anywhere;
}
.abox.street b { font-size: 16px; }

.cli-com {
  background: #fff; border: 1.5px solid #cbbce0; border-radius: 12px;
  padding: 11px 12px; margin-bottom: 12px;
}
.cli-com .lab {
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--p); margin-bottom: 4px;
}
.cli-com .txt { font-size: 16px; font-weight: 700; line-height: 1.4; }
a.tel {
  color: var(--p); font-weight: 800;
  text-decoration: underline; text-underline-offset: 2px;
}

.c-stack {
  border: 0; background: none; width: 100%; text-align: left; padding: 0;
  position: relative; min-height: 92px;
}
.c-card {
  background: #f6f1fb; border: 1px solid var(--line); border-radius: 12px;
  padding: 11px 12px;
}
.c-txt { font-size: 16px; font-weight: 750; line-height: 1.35; color: var(--ink); }
.c-meta { font-size: 11px; color: #9a90a8; font-weight: 500; margin-top: 5px; }
.c-card.top { position: relative; z-index: 1; }
.c-card.peek {
  position: absolute; left: 10px; right: 10px; top: 56px;
  opacity: .36; transform: scale(.97); pointer-events: none;
}
.c-empty { color: var(--muted); font-size: 13px; font-weight: 650; padding: 8px 2px; cursor: pointer; }

.done-banner {
  height: 56px; border-radius: 16px;
  background: #178a5e; color: #fff;
  display: grid; place-items: center;
  font-weight: 800; font-size: 17px; gap: 8px;
  grid-auto-flow: column;
}
.done-banner svg { width: 20px; height: 20px; }

.swipe-track {
  position: relative; height: 58px; border-radius: 16px;
  background: #e7f6ef; border: 1px solid #b7e0cc;
  overflow: hidden; user-select: none; touch-action: none;
}
.swipe-track.swipe-ready { border-color: var(--ok); background: #d4f3e4; }
.swipe-track.swipe-done { opacity: .75; pointer-events: none; }
.swipe-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0;
  background: rgba(26,143,99,.22); pointer-events: none;
}
.swipe-threshold {
  position: absolute; right: 10%; top: 7px; bottom: 7px; width: 2px;
  background: rgba(26,143,99,.45); border-radius: 2px; pointer-events: none;
}
.swipe-label {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: var(--ok); font-weight: 750; font-size: 15px; pointer-events: none;
}
.swipe-knob {
  position: absolute; left: 4px; top: 4px; width: 50px; height: 50px; border-radius: 12px;
  background: var(--p); color: #fff; display: grid; place-items: center;
  font-weight: 800; z-index: 2; will-change: transform;
}

.ret-title { font-size: 28px; font-weight: 820; margin: 18px 0 8px; letter-spacing: -.03em; }
.ret-addr { font-size: 20px; font-weight: 750; line-height: 1.3; }
.ret-hint { color: var(--muted); font-weight: 650; margin: 8px 0 0; }

.oid-head { color: var(--muted); font-weight: 650; font-size: 13px; }
.oid-tail { font-size: 18px; font-weight: 820; font-variant-numeric: tabular-nums; }
.shift-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 16px;
  margin-bottom: 10px; overflow: hidden;
}
.shift-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  gap: 10px; text-align: left; background: none; border: 0; padding: 12px;
  color: inherit;
}
.shift-head small { display: block; color: var(--muted); font-weight: 600; margin-top: 3px; }
.shift-kpis { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.shift-kpis span {
  font-size: 11px; color: var(--muted); background: #f4eef9;
  border: 1px solid var(--line); border-radius: 8px; padding: 4px 7px; font-weight: 700;
}
.shift-kpis b { color: var(--ink); }
.shift-body { border-top: 1px solid var(--line); padding: 6px 8px 8px; }
.hist-row {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px 8px; border-bottom: 1px solid var(--line);
  width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0;
  text-align: left; color: inherit; border-radius: 0;
}
#histQ { margin-bottom: 10px; font-size: 16px; }
.hist-row:last-child { border-bottom: 0; }
.hist-row .l { font-weight: 700; }
.hist-row .l small { display: block; color: var(--muted); font-weight: 500; margin-top: 3px; font-size: 12px; }
.hist-row .t { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

#app .cab, .cab {
  position: absolute; inset: 0; z-index: 30; background: var(--bg);
  display: flex; flex-direction: column; padding-top: var(--safe-t);
}
.cab[hidden] { display: none !important; }
.cab-sticky { flex-shrink: 0; padding: 8px 16px 8px; border-bottom: 1px solid var(--line); background: var(--bg); }
.cab-head { display: flex; justify-content: space-between; align-items: center; }
.cab-head h2 { margin: 0; font-size: 20px; }
.icon-x { border: 0; background: #efe8f7; width: 36px; height: 36px; border-radius: 10px; }
.cab-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 4px; scrollbar-width: none; }
.cab-tabs button {
  flex: 0 0 auto; border: 1px solid var(--line); background: var(--paper);
  border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 700; color: var(--muted);
}
.cab-tabs button.on { background: var(--p); color: #fff; border-color: var(--p); }
.cab-body { flex: 1; overflow-y: auto; padding: 12px 16px calc(24px + var(--safe-b)); }
.pin {
  background: var(--paper); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px; margin-bottom: 8px; width: 100%; text-align: left; color: inherit;
}
.pin b { display: block; }
.pin span { color: var(--muted); font-size: 12px; line-height: 1.4; }
.sec { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 16px 0 8px; }
.crow { display: flex; gap: 10px; align-items: center; }
.av2 { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 800; }

.sheet-modal {
  position: absolute; inset: 0; background: rgba(28,18,40,.4); z-index: 35;
  display: flex; align-items: flex-end;
}
.sheet-modal[hidden] { display: none !important; }
.sheet-modal .inner {
  width: 100%; background: var(--paper); border-radius: 20px 20px 0 0;
  padding: 14px 16px calc(18px + var(--safe-b)); max-height: 78vh; overflow: auto;
}
.sheet-modal .c-card { margin-bottom: 8px; }
.add-c { display: flex; gap: 8px; }
.add-c input { flex: 1; }
.env-prev { width: 100%; max-height: 180px; object-fit: cover; border-radius: 12px; margin: 10px 0; background: #eee; }
.close-expected { color: var(--muted); line-height: 1.45; margin: 0 0 12px; }

.cam {
  position: absolute; inset: 0; background: #111; z-index: 80; color: #fff;
  display: flex; flex-direction: column; padding-top: var(--safe-t);
}
.cam[hidden] { display: none !important; }
.cam video, .cam canvas, .cam img { width: 100%; flex: 1; object-fit: cover; background: #000; }
.cam-bar { padding: 12px 16px calc(16px + var(--safe-b)); display: grid; gap: 8px; }

.confirm {
  position: absolute; inset: 0; z-index: 90;
  background: rgba(28,18,40,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.confirm[hidden] { display: none !important; }
.confirm-card {
  width: 100%; background: var(--paper); border-radius: 18px;
  padding: 18px 16px 16px;
}
.confirm-card h3 { margin: 0 0 8px; font-size: 18px; }
.confirm-card p { margin: 0 0 16px; color: var(--muted); line-height: 1.45; }
.confirm-card .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.toast {
  position: absolute; left: 16px; right: 16px; bottom: calc(18px + var(--safe-b));
  background: #2a2036; color: #fff; border-radius: 12px; padding: 12px; text-align: center;
  z-index: 55; font-weight: 650;
}
.toast[hidden] { display: none; }

.seg { display: flex; background: #ece6f3; border-radius: 12px; padding: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 10px; font-weight: 700; font-size: 13px; }
.seg button.on { background: var(--paper); color: var(--p); }
.stat-big { font-size: 34px; font-weight: 820; letter-spacing: -.04em; }
.bars { display: flex; align-items: flex-end; gap: 4px; height: 84px; margin: 14px 0; }
.bars i { flex: 1; background: var(--p2); border-radius: 4px 4px 0 0; display: block; }


