:root {
  --wb: #cb11ab;
  --wb-dark: #8f0c79;
  --oz: #005bff;
  --oz-dark: #0040b8;
  --ink: #0f1115;
  --muted: #6b7280;
  --line: #e7e8ec;
  --ease: cubic-bezier(.65, .05, .25, 1);
  --bar-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Color Emoji", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: #0b0d10;
  color: #fff;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ============================ ЭКРАН 1: ДВА ПОЛЯ ============================ */
.split {
  position: fixed;
  inset: 0;
  display: flex;
}
.split__title {
  position: absolute;
  top: clamp(18px, 4vh, 40px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: clamp(.95rem, 1.6vw, 1.15rem);
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
  transition: opacity .3s ease;
}
.split.is-picked .split__title { opacity: 0; }

.half {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: var(--base);
  transition: flex-grow .7s var(--ease), background-color .45s ease, opacity .35s ease;
}
.half--wb   { --base: #13151b; --mp: var(--wb); }
.half--ozon { --base: #0d0f13; --mp: var(--oz); }
.half + .half { border-left: 1px solid rgba(255, 255, 255, .07); }

.half::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(65% 65% at 50% 55%, var(--mp), transparent 72%);
  opacity: 0;
  transition: opacity .4s ease;
}
.half:hover::before, .half:focus-visible::before { opacity: .38; }
.half:focus-visible { outline-offset: -6px; }

.half__word {
  position: relative;
  font-size: clamp(2.4rem, 9vw, 8rem);
  font-weight: 800;
  letter-spacing: -.045em;
  line-height: 1;
  white-space: nowrap;
  transition: transform .45s var(--ease);
}
.half:hover .half__word { transform: scale(1.05); }
.half__hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(28px, 9vh, 90px);
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .02em;
  opacity: .55;
  transition: opacity .3s ease, transform .3s ease;
}
.half__hint i { display: inline-block; font-style: normal; transition: transform .3s ease; }
@media (hover: hover) {
  .half__hint { opacity: 0; transform: translateY(8px); }
  .half:hover .half__hint, .half:focus-visible .half__hint { opacity: .9; transform: none; }
  .half:hover .half__hint i { transform: translateX(5px); }
}

/* выбранное поле красится в цвет площадки и растягивается на весь экран */
.split.is-picked .half { pointer-events: none; }
.half.is-picked { flex-grow: 1000; background: var(--mp); }
.half.is-picked::before { opacity: 0; }
.half.is-picked .half__hint { opacity: 0; }
.half.is-gone { flex-grow: 0; opacity: 0; border-width: 0; }
.split.no-anim .half { transition: none; }

@media (max-width: 720px) {
  .split { flex-direction: column; }
  .half + .half { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .07); }
  .half__word { font-size: clamp(2.6rem, 15vw, 5rem); }
  .half__hint { bottom: 14px; }
}

/* ============================ ЭКРАН 2: КОНСТРУКТОР ============================ */
.app {
  --mp: var(--oz);
  --mp-dark: var(--oz-dark);
  --tint: rgba(0, 91, 255, .08);
  --flash: rgba(94, 160, 255, .38);
  position: fixed;
  inset: 0;
  z-index: 5;
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--mp);
  opacity: 0;
  visibility: hidden;
  transition: opacity .45s ease, visibility 0s linear .45s;
  scroll-behavior: smooth;
}
.app.is-open { opacity: 1; visibility: visible; transition-delay: 0s; }
.app[data-mp="wb"] {
  --mp: var(--wb);
  --mp-dark: var(--wb-dark);
  --tint: rgba(203, 17, 171, .08);
  --flash: rgba(255, 140, 235, .38);
}

.bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  height: var(--bar-h);
  padding: 0 max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  background: var(--mp);
}
.bar__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, .18);
  font-weight: 600;
  font-size: .95rem;
  transition: background .2s;
}
.bar__back:hover { background: rgba(255, 255, 255, .3); }
.bar__word { font-size: 1.7rem; font-weight: 800; letter-spacing: -.04em; line-height: 1; }

.app__body {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px 24px 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

/* ---- меню модулей ---- */
.menu {
  background: #fff;
  color: var(--ink);
  border-radius: 28px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5);
}
.menu__title { font-size: clamp(1.45rem, 2.6vw, 1.9rem); letter-spacing: -.02em; line-height: 1.15; outline: none; }
.menu__lead { margin-top: 8px; color: var(--muted); line-height: 1.5; max-width: 52ch; }

.grp { margin-top: 28px; }
.grp__title { font-size: .78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--mp); }
.grp__sub { margin: 2px 0 10px; font-size: .88rem; color: var(--muted); }

.mod {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 14px;
  margin-top: 8px;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 18px;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.mod:hover { border-color: color-mix(in srgb, var(--mp) 40%, var(--line)); }
.mod:active { transform: scale(.992); }
.mod.is-on { border-color: var(--mp); background: var(--tint); }
.mod:focus-within { outline: 3px solid color-mix(in srgb, var(--mp) 45%, transparent); outline-offset: 2px; }
.mod__cb { position: absolute; opacity: 0; pointer-events: none; }
.mod__icon {
  grid-row: 1 / span 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--tint);
  font-size: 1.35rem;
}
.mod.is-on .mod__icon { background: #fff; }
.mod__title { font-weight: 700; font-size: .98rem; line-height: 1.25; }
.mod__desc { grid-column: 2; font-size: .85rem; color: var(--muted); line-height: 1.35; }
.mod__tag {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 99px;
  background: #eef0f4;
  color: #5b6472;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  vertical-align: 2px;
  white-space: nowrap;
}
.mod.is-on .mod__tag { background: #fff; color: var(--mp); }

.switch {
  grid-column: 3;
  grid-row: 1 / span 2;
  position: relative;
  width: 46px;
  height: 28px;
  border-radius: 99px;
  background: #d5d8df;
  transition: background .2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .25s var(--ease);
}
.mod.is-on .switch { background: var(--mp); }
.mod.is-on .switch::after { transform: translateX(18px); }

/* свой модуль */
.mod--custom { cursor: default; border-color: var(--mp); background: var(--tint); }
.mod__rm {
  grid-column: 3;
  grid-row: 1 / span 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}
.mod__rm:hover { color: #d92d20; }
.custom { display: flex; gap: 8px; margin-top: 8px; }
.custom input {
  flex: 1;
  min-width: 0;
  padding: 13px 16px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: border-color .2s;
}
.custom input:focus { border-color: var(--mp); }
.custom button {
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
}
.custom button:hover { background: #2a2f3a; }

/* заказ: в самом низу меню, намеренно негромкий */
.order {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.order__info { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: .85rem; }
.order__info b { font-weight: 600; color: #3b4250; }
.order__info span { font-size: .78rem; }
.order__btn {
  flex: none;
  padding: 9px 16px;
  border: 1.5px solid var(--mp);
  border-radius: 12px;
  background: transparent;
  color: var(--mp);
  font-weight: 600;
  font-size: .88rem;
  transition: background .2s, color .2s;
}
.order__btn:hover:not(:disabled) { background: var(--mp); color: #fff; }
.order__btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---- телефон с чатом ---- */
.phone-col {
  position: sticky;
  top: calc(var(--bar-h) + 10px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.phone {
  position: relative;
  width: 360px;
  max-width: 100%;
  height: min(700px, calc(100vh - 150px));
  min-height: 500px;
  padding: 10px;
  border-radius: 46px;
  background: #0a0d12;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .14), 0 40px 80px -20px rgba(0, 0, 0, .65);
}
.phone::before {
  content: "";
  position: absolute;
  z-index: 3;
  top: 19px;
  left: 50%;
  width: 82px;
  height: 22px;
  border-radius: 14px;
  background: #000;
  transform: translateX(-50%);
}
.tg {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 36px;
  background: #0e1621;
  color: #f5f5f5;
}
.tg__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 44px 14px 10px 10px;
  background: #17212b;
}
.tg__back { font-size: 2rem; line-height: .7; color: #6ab3f3; padding: 0 2px 4px; }
.tg__ava {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mp), var(--mp-dark));
  font-weight: 800;
  font-size: 1.05rem;
}
.tg__who { display: flex; align-items: center; min-width: 0; flex: 1; }
.tg__who b { font-size: .98rem; line-height: 1.25; }

.tg__wrap { position: relative; flex: 1; min-height: 0; }
.tg__chat {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #2b3a4a transparent;
  background-image: radial-gradient(rgba(255, 255, 255, .035) 1px, transparent 1.5px);
  background-size: 18px 18px;
}
.tg__empty {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  padding: 0 40px;
  text-align: center;
  font-size: .9rem;
  line-height: 1.4;
  color: #6d7f8f;
  pointer-events: none;
}
.tg__wrap.is-empty .tg__empty { display: grid; }

.msg {
  position: relative;
  align-self: flex-start;
  max-width: 92%;
  padding: 8px 12px 20px;
  border-radius: 16px 16px 16px 4px;
  background: #182533;
  font-size: .9rem;
  line-height: 1.42;
  word-break: break-word;
}
.msg b { color: #fff; font-weight: 700; }
.msg time { position: absolute; right: 10px; bottom: 4px; font-size: .68rem; color: #6d7f8f; }
.msg--me { align-self: flex-end; border-radius: 16px 16px 4px 16px; background: #2b5278; }
.msg--me time { color: #9cc3e8; }
.msg--pop { animation: pop .35s var(--ease) both; }
.msg.is-out-msg { animation: fadeOut .3s ease forwards; }
.msg .dh { margin-bottom: 8px; }
.msg .dstore { margin-bottom: 2px; }
.msg .lnk { color: #6ab3f3; }

.msg--typing { display: flex; gap: 4px; padding: 12px 14px; animation: pop .25s ease both; }
.msg--typing i { width: 7px; height: 7px; border-radius: 50%; background: #6d7f8f; animation: dot 1s infinite ease-in-out; }
.msg--typing i:nth-child(2) { animation-delay: .15s; }
.msg--typing i:nth-child(3) { animation-delay: .3s; }

/* строки сводки: появляются по одной, исчезают со схлопыванием */
.dl { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .3s ease, opacity .3s ease; border-radius: 6px; }
.dl > div { min-height: 0; overflow: hidden; }
.dl.is-new { animation: lineIn .5s ease both; }
.dl.is-out { grid-template-rows: 0fr; opacity: 0; }

.tg__kb { display: flex; gap: 6px; padding: 6px 8px; background: #0e1621; }
.tg__kb button {
  flex: 1;
  padding: 10px;
  border: 0;
  border-radius: 9px;
  background: #1f2d3c;
  font-size: .86rem;
  font-weight: 600;
  transition: background .15s;
}
.tg__kb button:hover { background: #2a3b4e; }
.tg__input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px 18px;
  background: #17212b;
  color: #6d7f8f;
  font-size: .92rem;
}

.replay {
  padding: 10px 20px;
  border: 0;
  border-radius: 99px;
  background: #fff;
  color: var(--mp);
  font-weight: 700;
  font-size: .92rem;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .45);
  transition: transform .15s, box-shadow .2s;
}
.replay:hover { box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .6); }
.replay:active { transform: scale(.97); }
.replay span:first-child { display: inline-block; transition: transform .4s var(--ease); }
.replay:hover span:first-child { transform: rotate(180deg); }

@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeOut { to { opacity: 0; transform: scale(.96); } }
@keyframes lineIn {
  0%   { opacity: 0; transform: translateX(-10px); background: var(--flash); }
  35%  { opacity: 1; transform: none; }
  100% { background: transparent; }
}
@keyframes dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ============================ OZON: РАЗДЕЛ «В РАБОТЕ» ============================ */
.mod--soon { cursor: default; grid-template-columns: 44px minmax(0, 1fr); border-style: dashed; background: #fafafb; }
.mod--soon:hover { border-color: var(--line); }
.mod--soon:active { transform: none; }
.mod--soon .mod__tag { background: #fff4d6; color: #9a6700; }

/* ============================ WB: НОУТБУК ============================ */
.stage-host, .scene-tabs { display: none; }
.app[data-mp="wb"] .phone { display: none; }
.app[data-mp="wb"] .stage-host { display: block; width: 100%; }
.app[data-mp="wb"] .scene-tabs { display: flex; }
.app[data-mp="wb"] .app__body { max-width: 1340px; grid-template-columns: minmax(340px, 440px) minmax(0, 1fr); }
.app[data-mp="wb"] .stage-host { max-width: 780px; }

.stage { position: relative; width: 100%; aspect-ratio: 640 / 470; }
.lap { position: absolute; top: 0; left: 8%; width: 84%; }
.lap__lid {
  position: relative;
  margin: 0 auto;
  width: 90%;
  padding: 2.4% 2.4% 3.2%;
  border-radius: 16px 16px 4px 4px;
  background: linear-gradient(#23262d, #16181d);
  box-shadow: inset 0 0 0 1.5px #3a3e47;
  transform-origin: 50% 100%;
  transform: scaleY(0);              /* закрытая крышка лежит на корпусе — видно только корпус */
  opacity: 0;
  transition: transform .9s cubic-bezier(.3, .7, .2, 1), opacity .1s linear .8s;
}
.lap__lid::before {                  /* камера */
  content: "";
  position: absolute;
  top: 1%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0c0d10;
  box-shadow: inset 0 0 0 1.5px #2f3440;
  transform: translateX(-50%);
}
.stage.is-open .lap__lid { transform: none; opacity: 1; transition: transform .9s cubic-bezier(.3, .7, .2, 1), opacity .1s linear; }
.lap__view {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 4px;
  background: #050608;
}
.lap__inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 960px;
  height: 600px;
  transform: scale(var(--s, .5));
  transform-origin: 0 0;
  opacity: 0;
  transition: opacity .35s ease;
  font-size: 14px;
  color: #1c1c21;
}
.stage.is-on .lap__inner { opacity: 1; }
.lap__deck {
  position: relative;
  height: 0;
  padding-bottom: 3.6%;
  border-radius: 2px 2px 14px 14px / 2px 2px 60% 60%;
  background: linear-gradient(#eef0f4, #b9bec8 70%, #9ba1ad);
  box-shadow: 0 18px 30px -12px rgba(0, 0, 0, .55);
}
.lap__deck::before {                 /* выемка под пальцы */
  content: "";
  position: absolute;
  top: 0;
  left: 42%;
  width: 16%;
  height: 40%;
  border-radius: 0 0 8px 8px;
  background: #a9aeb9;
}
.stage__hint {
  position: absolute;
  inset: 20% 10% auto;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  opacity: .85;
  transition: opacity .3s;
}
.stage.is-open .stage__hint { opacity: 0; pointer-events: none; }
.stage__caption { min-height: 1.4em; margin-top: -6px; text-align: center; font-weight: 600; font-size: .95rem; }

.scene-tabs { flex-wrap: wrap; justify-content: center; gap: 8px; }
.scene-tab {
  padding: 8px 14px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, .18);
  font-size: .85rem;
  font-weight: 600;
}
.scene-tab.is-on { background: #fff; color: var(--mp); }

/* --- вещь и сканер перед ноутбуком --- */
.props { position: absolute; left: 0; bottom: 0; width: 100%; height: auto; overflow: visible; pointer-events: none; }
.props .p-shirt { transform: translateY(300px); opacity: 0; transition: transform .8s var(--ease), opacity .4s ease; }
.props.show-shirt .p-shirt { transform: none; opacity: 1; }
.props .p-scanner { transform: translate(240px, 30px) rotate(14deg); transform-origin: 530px 150px; opacity: 0; transition: transform .75s var(--ease), opacity .4s ease; }
.props.show-scanner .p-scanner { transform: rotate(-4deg); opacity: 1; }
.props .p-beam, .props .p-laser { opacity: 0; }
.props.scan .p-beam { animation: beam .18s steps(2) infinite alternate; }
.props.scan .p-laser { animation: laser .65s ease-in-out infinite alternate; }
.props .p-ok { opacity: 0; transform: scale(.2); transform-origin: 420px 70px; transition: transform .35s var(--ease), opacity .2s; }
.props.beep .p-ok { opacity: 1; transform: none; }
.props.beep .p-tag rect:first-child { stroke: #1ea45a; stroke-width: 2.5; }
@keyframes beam { from { opacity: .45; } to { opacity: .95; } }
@keyframes laser { 0% { opacity: 1; transform: translateY(-22px); } 100% { opacity: 1; transform: translateY(22px); } }

/* --- экраны ноутбука (размеры в «пикселях» экрана 960×600) --- */
.scr { position: absolute; inset: 0; animation: scrIn .45s ease both; }
@keyframes scrIn { from { opacity: 0; transform: scale(.985); } to { opacity: 1; transform: none; } }

.w-app { display: grid; grid-template-columns: 76px 1fr; background: #f2f2f6; font-family: var(--font); }
.w-side { display: flex; flex-direction: column; align-items: center; gap: 4px; padding-top: 12px; background: #fff; border-right: 1px solid #e6e6ec; }
.w-logo { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg, #cb11ab, #7a1fd1); color: #fff; font-weight: 800; font-size: 13px; }
.w-id { margin: 6px 0 12px; font-size: 9px; color: #777; text-align: center; line-height: 1.3; }
.w-nav { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; padding: 10px 0; font-size: 11.5px; color: #3c3c46; }
.w-nav i { width: 17px; height: 17px; border: 2px solid currentColor; border-radius: 4px; opacity: .8; }
.w-nav b { position: absolute; top: 4px; right: 18px; min-width: 16px; padding: 1px 4px; border-radius: 99px; background: #f07b3f; color: #fff; font-size: 9px; text-align: center; }
.w-nav.is-on { color: #a23bf5; background: #f4ecfe; box-shadow: inset 3px 0 #a23bf5; }
.w-main { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 0 14px 14px; }
.w-top { display: flex; align-items: center; justify-content: space-between; height: 46px; }
.w-tools { display: flex; gap: 14px; }
.w-tools i { width: 16px; height: 16px; border: 2px solid #555; border-radius: 4px; opacity: .55; }
.w-tabs { display: flex; gap: 26px; font-size: 13px; color: #555; }
.w-tabs span { position: relative; padding: 12px 4px 10px; }
.w-tabs b { position: absolute; top: 0; right: -10px; padding: 0 5px; border-radius: 99px; background: #555; color: #fff; font-size: 9px; }
.w-tabs .is-on { color: #a23bf5; box-shadow: inset 0 -2px #a23bf5; font-weight: 600; }
.w-tabs .is-on b { background: #a23bf5; }
.w-chips { display: flex; gap: 8px; overflow: hidden; padding: 8px; border-radius: 12px; background: #fff; }
.w-chip { flex: none; display: flex; flex-direction: column; justify-content: center; width: 108px; height: 46px; padding: 0 10px; border: 1.5px solid; border-radius: 8px; font-size: 11px; color: #222; }
.w-chip b { font-weight: 500; font-size: 12px; }
.w-chip--new { align-items: center; width: 70px; border: 1.5px dashed #bbb; color: #444; }
.w-chip--new b { font-size: 18px; line-height: 1; }
.w-chip--ok { border-color: #1ea45a; background: #1ea45a; color: #fff; }
.w-chip--ok-line { border-color: #1ea45a; }
.w-chip--bad { border-color: #e5484d; }
.w-body { flex: 1; display: grid; grid-template-columns: 150px 1fr; gap: 12px; min-height: 0; margin-top: 10px; padding: 12px; border-radius: 12px; background: #fff; }
.w-box { display: flex; flex-direction: column; gap: 6px; font-size: 11px; color: #555; text-align: right; }
.w-box__no { font-size: 16px; color: #222; }
.w-box__date { margin: 4px 0; font-size: 11px; }
.w-box__count { padding: 10px; border-radius: 10px; background: #f3f3f6; text-align: center; }
.w-box__count b { display: block; font-size: 24px; font-weight: 500; color: #111; }
.w-btn { padding: 10px 0; border-radius: 99px; background: #a23bf5; color: #fff; font-size: 11px; font-weight: 600; text-align: center; }
.w-btn--soft { background: #f1e3fe; color: #a23bf5; }
.w-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; overflow: hidden; }
.w-card__img { display: grid; place-items: center; height: 150px; border-radius: 6px; }
.w-card__img svg { width: 62%; height: 82%; }
.w-card__art { margin-top: 6px; font-size: 17px; font-weight: 600; color: #222; }
.w-card__art span { font-weight: 400; color: #777; }
.w-card__name { font-size: 11px; color: #444; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-toast { position: absolute; left: 50%; bottom: 24px; padding: 10px 18px; border-radius: 99px; background: #1ea45a; color: #fff; font-size: 13px; font-weight: 600; opacity: 0; transform: translate(-50%, 14px); transition: opacity .3s, transform .3s var(--ease); }
.w-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.w-sheet { flex: 1; padding: 16px 20px; border-radius: 12px; background: #fff; }
.w-backlink { font-size: 12px; color: #333; }
.w-rp { display: grid; grid-template-columns: 220px 1fr; gap: 26px; margin-top: 18px; padding: 0 20px; }
.w-item { padding-bottom: 10px; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, .08); overflow: hidden; font-size: 11px; }
.w-item__img { display: grid; place-items: center; height: 200px; background: #e9e5df; }
.w-item__img svg { width: 70%; height: 86%; }
.w-item__art { padding: 8px 10px 2px; font-size: 22px; font-weight: 600; }
.w-item__art span { font-weight: 400; color: #777; }
.w-item__name { padding: 0 10px 4px; color: #333; }
.w-item__meta { padding: 1px 10px; color: #555; }
.w-steps { font-size: 12.5px; color: #333; }
.w-steps h4 { margin-bottom: 14px; font-size: 16px; font-weight: 600; color: #111; }
.w-steps p { margin-bottom: 10px; line-height: 1.4; }
.w-steps u { color: #a23bf5; text-decoration: none; font-weight: 600; }
.w-radios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 2px 0 16px; }
.w-radios span { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1.5px solid transparent; border-radius: 8px; background: #f3f3f6; transition: border-color .3s, background .3s; }
.w-radios span::before { content: ""; flex: none; width: 14px; height: 14px; border: 1.5px solid #888; border-radius: 50%; transition: box-shadow .3s, border-color .3s; }
.w-radios span:last-child { grid-column: 2; }
.w-radios span.is-on { border-color: #a23bf5; background: #faf4ff; }
.w-radios span.is-on::before { border-color: #a23bf5; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 8px #a23bf5; }
.w-qrframe { position: relative; width: 116px; margin: 0 auto; padding: 8px; background:
  linear-gradient(#c9a3f5, #c9a3f5) top left / 18px 2px, linear-gradient(#c9a3f5, #c9a3f5) top left / 2px 18px,
  linear-gradient(#c9a3f5, #c9a3f5) top right / 18px 2px, linear-gradient(#c9a3f5, #c9a3f5) top right / 2px 18px,
  linear-gradient(#c9a3f5, #c9a3f5) bottom left / 18px 2px, linear-gradient(#c9a3f5, #c9a3f5) bottom left / 2px 18px,
  linear-gradient(#c9a3f5, #c9a3f5) bottom right / 18px 2px, linear-gradient(#c9a3f5, #c9a3f5) bottom right / 2px 18px;
  background-repeat: no-repeat; }
.w-qrframe svg { display: block; width: 100%; }
.w-scanline { position: absolute; left: 4px; right: 4px; top: 50%; height: 2px; background: #a23bf5; box-shadow: 0 0 8px #a23bf5; animation: scanline 1.6s ease-in-out infinite alternate; }
@keyframes scanline { from { top: 12%; } to { top: 88%; } }

.q-app { display: flex; flex-direction: column; gap: 18px; padding: 26px 34px; background: linear-gradient(160deg, #f7f2ff, #eef1ff); font-family: var(--font); }
.q-head { display: flex; align-items: center; gap: 16px; }
.q-head__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: linear-gradient(135deg, #a23bf5, #cb11ab); color: #fff; box-shadow: 0 8px 18px -8px rgba(162, 59, 245, .8); }
.q-head__icon svg { width: 26px; height: 26px; }
.q-head__text { flex: 1; }
.q-head h3 { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: #1b1530; }
.q-head p { margin-top: 3px; font-size: 13px; color: #7a7390; }
.q-stat { display: flex; flex-direction: column; align-items: flex-end; padding: 8px 16px; border-radius: 14px; background: #fff; box-shadow: 0 4px 14px -6px rgba(40, 20, 90, .25); }
.q-stat b { font-size: 24px; line-height: 1.1; color: #a23bf5; }
.q-stat span { font-size: 11px; color: #7a7390; }
.q-card { flex: 1; overflow: hidden; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px -14px rgba(40, 20, 90, .3); }
.q-table { width: 100%; border-collapse: collapse; font-size: 14px; color: #2a2438; }
.q-table th { padding: 14px 22px; background: #faf8ff; border-bottom: 1px solid #eee9f7; color: #8a82a0; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-align: left; }
.q-table td { padding: 12px 22px; border-bottom: 1px solid #f2eff8; vertical-align: middle; }
.q-table tr:last-child td { border-bottom: 0; }
.q-table td b { display: block; font-size: 15px; }
.q-table td small { font-size: 11.5px; color: #9a93ad; }
.q-table tr.is-new td { animation: rowIn 1.8s ease both; }
@keyframes rowIn { 0% { background: #efe3ff; opacity: 0; } 20% { opacity: 1; } 100% { background: transparent; } }
.q-code { display: inline-block; padding: 5px 10px; border-radius: 8px; background: #f3effb; color: #3b2a63; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.q-act { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #a23bf5, #cb11ab); color: #fff; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 14px -8px rgba(162, 59, 245, .9); transition: filter .15s, transform .1s; }
.q-act svg { width: 15px; height: 15px; }
.q-act:hover { filter: brightness(1.1); }
.q-act.is-press { transform: scale(.94); filter: brightness(.9); }
.q-win { position: absolute; inset: 0; display: grid; place-items: center; }
.q-win[hidden] { display: none; }
.q-win__bg { position: absolute; inset: 0; background: rgba(27, 21, 48, .45); backdrop-filter: blur(3px); animation: fadeIn .25s ease both; }
.q-win__card { position: relative; width: 290px; padding: 16px 20px 20px; border-radius: 22px; background: #fff; box-shadow: 0 30px 60px -20px rgba(20, 10, 50, .6); text-align: center; animation: winIn .35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes winIn { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
.q-win__title { display: flex; justify-content: space-between; align-items: center; font-size: 14px; font-weight: 700; color: #1b1530; }
.q-win__title span { display: inline-flex; align-items: center; gap: 8px; }
.q-win__title svg { width: 18px; height: 18px; color: #a23bf5; }
.q-win__x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: #f3effb; color: #6b6482; font-size: 12px; cursor: pointer; }
.q-win__qr { width: 200px; margin: 14px auto 10px; padding: 10px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 2px #efe7fb; }
.q-win__qr svg { display: block; width: 100%; }
.q-win__text { font-size: 16px; font-weight: 700; color: #1b1530; }
.q-win__close { width: 100%; margin-top: 14px; padding: 11px; border: 0; border-radius: 12px; background: #1b1530; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.q-win__close:hover { background: #2d2447; }
.q-cursor { position: absolute; left: 70%; top: 85%; width: 24px; height: 24px; opacity: 0; pointer-events: none; transition: left .9s var(--ease), top .9s var(--ease), opacity .2s, transform .12s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.q-cursor.is-show { opacity: 1; }
.q-cursor.is-click { transform: scale(.8); }

@media (max-width: 900px) {
  .app[data-mp="wb"] .app__body { grid-template-columns: minmax(0, 1fr); }
  .stage { width: min(100%, 460px); margin: 0 auto; }
  .stage__caption { font-size: .82rem; }
}

/* ============================ ЗАЯВКА / ТОСТ ============================ */
.dlg {
  width: min(520px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 40px 100px -20px rgba(0, 0, 0, .6);
}
.dlg::backdrop { background: rgba(8, 10, 14, .6); backdrop-filter: blur(4px); }
.dlg[open] { animation: pop .3s var(--ease); }
.dlg__form { display: flex; flex-direction: column; gap: 14px; padding: 26px; }
.dlg h2 { font-size: 1.4rem; letter-spacing: -.02em; }
.dlg__sub { margin-top: -8px; color: var(--muted); font-size: .92rem; }
.dlg__field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; color: #3b4250; }
.dlg__field input, .dlg textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font-weight: 400;
  outline: none;
}
.dlg__field input:focus, .dlg textarea:focus { border-color: var(--mp, var(--oz)); }
.dlg textarea { resize: none; background: #f6f7f9; font-size: .88rem; line-height: 1.5; }
.dlg__error { margin-top: -4px; padding: 10px 14px; border-radius: 12px; background: #fdecec; color: #b42318; font-size: .88rem; line-height: 1.4; }
.dlg__actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.btn {
  display: inline-block;
  padding: 12px 20px;
  border: 0;
  border-radius: 14px;
  background: var(--mp, var(--oz));
  color: #fff;
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  text-align: center;
}
.btn:hover { filter: brightness(1.1); }
.btn--ghost { background: #eef0f4; color: var(--ink); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  padding: 12px 20px;
  border-radius: 99px;
  background: #0f1115;
  color: #fff;
  font-size: .92rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .4);
  opacity: 0;
  transform: translate(-50%, 20px);
  pointer-events: none;
  transition: opacity .25s, transform .25s var(--ease);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }

/* ============================ АДАПТИВ ============================ */
@media (max-width: 900px) {
  .app__body { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 4px 14px 40px; }
  /* чат закреплён сверху, меню прокручивается под ним */
  :root { --bar-h: 56px; }
  .phone-col { order: -1; top: var(--bar-h); z-index: 8; gap: 8px; padding: 2px 0 8px; background: var(--mp); }
  .phone { width: min(360px, 100%); height: clamp(250px, 34vh, 340px); min-height: 0; padding: 7px; border-radius: 32px; }
  .phone::before { top: 13px; width: 64px; height: 16px; }
  .tg { border-radius: 28px; }
  .tg__head { padding-top: 30px; padding-bottom: 8px; }
  .tg__ava { width: 34px; height: 34px; }
  .tg__kb, .tg__input { display: none; }
  .replay { padding: 7px 16px; font-size: .85rem; }
  .bar__word { font-size: 1.4rem; }
}
@media (max-width: 480px) {
  .mod { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; }
  .mod__icon { width: 40px; height: 40px; }
  .mod__tag { display: block; width: fit-content; margin: 4px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; scroll-behavior: auto !important; }
}
