/* Демо программы (#desk, assets/demo/desk.js) и телефон жильца (#angry, assets/demo/resident.js). */

/* ---------- #desk: кнопка и ноутбук */
#desk .pz-3d { cursor: pointer; }
#desk .pz-3d.no-webgl { display: none; }
.dd-chip {
  position: absolute; left: 50%; bottom: 6%; z-index: 2; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px;
  border: 0; border-radius: 999px; background: #fbd530; color: #17181c; font: 600 15px/1 var(--font-text, Onest, sans-serif);
  box-shadow: 0 10px 28px rgb(0 0 0 / 28%); cursor: pointer;
}
.dd-chip::after { content: "›"; font-size: 20px; line-height: 1; }
.dd-chip:hover { filter: brightness(.96); }
#desk .dd-open { min-height: 48px; }

/* ---------- окно программы */
.dd-layer {
  position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column;
  background: #17181c; color: #fbfaf6; will-change: clip-path;
}
.dd-layer[hidden] { display: none; }
.dd-bar {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 12px 6px 18px;
  font: 400 13px/1.35 var(--font-text, Onest, sans-serif);
}
.dd-bar__title { flex: 1; min-width: 0; margin: 0; color: rgb(251 250 246 / 72%); }
.dd-bar__title b { color: #fbfaf6; font-weight: 650; }
.dd-zoom, .dd-close {
  flex: 0 0 auto; min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  font: 600 14px/1 var(--font-text, Onest, sans-serif);
}
.dd-zoom { border: 1px solid rgb(251 250 246 / 40%); background: transparent; color: #fbfaf6; }
.dd-close { border: 0; background: #fbd530; color: #17181c; }
.dd-zoom:focus-visible, .dd-close:focus-visible, .dd-chip:focus-visible { outline: 2px solid #fbfaf6; outline-offset: 2px; }
.dd-stage { position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #fafaf8; }
.dd-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.dd-wait {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); margin: 0; padding: 10px 18px; border-radius: 999px;
  background: #17181c; color: #fbfaf6; font: 500 14px/1.2 var(--font-text, Onest, sans-serif);
}
.dd-scroll { position: absolute; inset: 0; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; visibility: hidden; }
.dd-size { position: relative; }
.dd-frame { display: block; border: 0; background: #fafaf8; transform-origin: 0 0; }
.dd-layer.is-ready .dd-scroll { visibility: visible; }
.dd-layer.is-ready :is(.dd-poster, .dd-wait) { display: none; }
/* пока экран раскрывается, программа ещё не принимает нажатий */
.dd-layer.is-moving .dd-stage { pointer-events: none; }

@media (max-width: 700px) {
  .dd-bar { padding-left: 12px; gap: 8px; }
  .dd-bar__note { display: none; }
  .dd-zoom, .dd-close { padding: 0 12px; }
}
#desk .pz-3d.dd-busy .dd-chip { visibility: hidden; }

/* ====================================================================================
   #angry: телефон жилицы у лица посетителя (resident.js) — рука с телефоном и приложение жильца на 360 px,
   уменьшенное под экран в руке. Цвета и тексты — как в приложении «Ярус · Жильцам». */
#angry .ag-stage { position: relative; }
.ag-phone { position: absolute; z-index: 6; width: 420px; visibility: hidden; }
.ag-phone__hand { position: relative; z-index: 2; display: block; width: 100%; height: auto; pointer-events: none; filter: drop-shadow(0 30px 40px rgb(0 0 0 / 35%)); }
.ag-phone__screen { position: absolute; z-index: 1; left: 14.26%; top: 3.93%; width: 47.38%; height: 75.5%; overflow: hidden; border-radius: 9% / 4.3%; background: #fff; }
.ag-phone__finger { position: absolute; z-index: 3; width: 13%; height: auto; translate: -36% -6%; opacity: 0; pointer-events: none; transition: opacity .25s;
  filter: drop-shadow(0 8px 8px rgb(0 0 0 / 30%)); }
.ag-phone__finger.is-on { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .ag-phone__finger.is-on { animation: ag-tap 1.1s ease-in-out infinite; } }
@keyframes ag-tap { 0%, 100% { transform: translateY(-14%) scale(1.04); } 45% { transform: translateY(0) scale(.96); } }
/* абзац слева уступает место подписи телефона (.v3-reveal держит opacity: 1 !important — здесь сильнее) */
#angry .ag-text .t-lead { transition: opacity .3s !important; }
#angry.is-phone .ag-text .t-lead { opacity: 0 !important; }

/* подпись и ход заявки в УК — на месте абзаца слева (на телефоне — полоской сверху) */
.ag-after { position: absolute; z-index: 7; visibility: hidden; display: grid; gap: 14px; }
.ag-take { margin: 0; font: 500 18px/1.45 "Onest", system-ui, sans-serif; color: #17181c; max-width: 34ch; }
.ag-take b { font-weight: 800; }
.ag-desk { padding: 18px 20px 16px; color: #fbfaf6; border: 0 solid transparent; border-image: url("../poster/paper/card-black.webp?v=1") 40 fill / 30px / 14px stretch; }
.ag-desk__h { margin: 0 0 8px; font: 700 12px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .1em; text-transform: uppercase; color: rgb(251 250 246 / 70%); }
.ag-desk__h b { color: #fbd530; }
.ag-desk__log { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; min-height: 2.6em; }
.ag-desk__log:empty::before { content: "Подайте заявку на телефоне — здесь будет видно, что с ней происходит."; font: 500 14px/1.4 "Onest", system-ui, sans-serif; color: rgb(251 250 246 / 75%); }
.ag-desk__log li { display: grid; grid-template-columns: 44px 1fr; gap: 8px; font: 500 14px/1.4 "Onest", system-ui, sans-serif; }
.ag-desk__log time { font: 700 12px/1.6 ui-monospace, Consolas, monospace; color: rgb(251 250 246 / 55%); }
.ag-desk__log li.is-key span { color: #fbd530; font-weight: 700; }
.ag-desk__open { justify-self: start; margin-top: 10px; min-height: 40px; padding: 0 14px; border: 1.5px solid rgb(251 250 246 / 55%); border-radius: 999px; background: transparent;
  color: #fbfaf6; font: 700 14px/1 "Onest", system-ui, sans-serif; cursor: pointer; }
.ag-desk__open:hover { background: rgb(251 250 246 / 10%); }
.ag-desk__open:focus-visible { outline: 2px solid #fbd530; outline-offset: 2px; }
#angry:not(.has-log) .ag-desk__open { display: none; }
@media (max-width: 900px) {
  .ag-after { gap: 6px; }
  .ag-take { font-size: 15px; line-height: 1.3; max-width: none; }
  .ag-take span { display: none; }
  .ag-desk { padding: 10px 12px; border-image-width: 20px; }
  .ag-desk__h, .ag-desk__open { display: none !important; }
  .ag-desk__log { min-height: 0; }
  .ag-desk__log:empty { display: none; }
  .ag-desk__log li { display: none; font-size: 13px; }
  .ag-desk__log li:last-child { display: grid; }
  #angry.has-log .ag-take { display: none; }
  #angry:not(.has-log) .ag-desk { display: none; }
}
/* без прокрутки-сцены («меньше движения» или нет GSAP): всё стоит под текстом */
#angry.phone-static .ag-phone, #angry.phone-static .ag-after { position: relative; visibility: visible; left: auto !important; top: auto !important; }
#angry.phone-static .ag-after { width: min(560px, calc(100% - 32px)) !important; margin: 0 auto 18px; }
#angry.phone-static .ag-phone { width: min(560px, 120vw) !important; margin: 0 auto -18%; justify-self: center; }

/* ---------- приложение жильца (360 px, scale — resident.js) */
.rp { position: absolute; left: 0; top: 0; width: 360px; height: 766px; transform-origin: 0 0; display: flex; flex-direction: column; overflow: hidden;
  background: #fff; color: #17181c; font: 400 15px/1.4 "Onest", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
.rp button { font: inherit; color: inherit; cursor: pointer; }
.rp-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.rp-status { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: center; height: 40px; padding: 8px 26px 0 30px; font: 600 13px/1 "Onest", system-ui, sans-serif; }
.rp-status__r { display: flex; gap: 5px; }
.rp-status__r i { width: 14px; height: 9px; border-radius: 2px; background: #17181c; }
.rp-status__r i:nth-child(2) { width: 11px; clip-path: polygon(0 100%, 100% 0, 100% 100%); border-radius: 0; }
.rp-status__r i:nth-child(1) { width: 13px; border-radius: 50% 50% 0 0; clip-path: polygon(50% 100%, 0 20%, 100% 20%); }
.rp-top { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 2px 16px 4px 6px; }
.rp-back { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; }
.rp-back .rp-ic { width: 22px; height: 22px; }
.rp-top__t { margin: 0 0 0 10px; font: 700 20px/1.2 "Onest", system-ui, sans-serif; }
.rp-back + .rp-top__t { margin-left: 0; }
.rp-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 20px; scrollbar-width: none; }
.rp-scroll::-webkit-scrollbar { display: none; }
.rp-hero { position: relative; margin: 0 -16px 14px; background: #fff7e1; }
.rp-hero img { display: block; width: 100%; height: auto; }
.rp-hero__hi { position: absolute; left: 16px; top: 12px; margin: 0; font: 800 24px/1.15 "Onest", system-ui, sans-serif; }
.rp-addr { display: flex; align-items: center; gap: 6px; margin: 0; font: 500 14px/1.3 "Onest", system-ui, sans-serif; color: #3d4048; }
.rp-addr .rp-ic { width: 16px; height: 16px; }
.rp-hero .rp-addr { position: absolute; left: 16px; top: 48px; padding: 4px 10px; border-radius: 999px; background: #fff; box-shadow: 0 2px 8px rgb(0 0 0 / 10%); }
.rp-addr--form { margin-top: 14px; }
.rp-cta { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 56px; border: 0; border-radius: 14px; background: #fbd530; color: #17181c;
  font: 700 17px/1 "Onest", system-ui, sans-serif !important; box-shadow: 0 2px 0 rgb(0 0 0 / 8%); }
.rp-cta:active { filter: brightness(.95); }
.rp-cta--sm { margin-top: 14px; min-height: 48px; font-size: 15px !important; }
.rp-h { margin: 22px 0 10px; font: 700 18px/1.3 "Onest", system-ui, sans-serif; }
.rp-h--first { margin-top: 6px; }
.rp-empty { margin: 0; padding: 16px; border-radius: 16px; background: #f4f4f2; color: #3d4048; font-size: 14px; }
.rp-list { display: grid; gap: 10px; }
.rp-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid #e6e7ea; border-radius: 16px; background: #fff; text-align: left; }
.rp-row.is-live { border-left: 4px solid #fbd530; background: #fffbea; }
.rp-row img { flex: 0 0 auto; width: 44px; height: 44px; object-fit: contain; }
.rp-row__t { display: grid; gap: 2px; min-width: 0; }
.rp-row__t b { font-weight: 700; font-size: 15px; }
.rp-row__t span { font-size: 13px; color: #3d4048; }
.rp-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 6px; }
.rp-cat { display: grid; justify-items: start; gap: 8px; min-height: 112px; padding: 14px; border: 1px solid #e6e7ea; border-radius: 16px; background: #fff; text-align: left; font-weight: 700 !important; }
.rp-cat img { width: 56px; height: 56px; object-fit: contain; }
.rp-cat:active, .rp-row:active { background: #fff7e1; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.rp-chip { min-height: 40px; padding: 0 14px; border: 1px solid #8e929a; border-radius: 12px; background: #fff; font-size: 14px !important; }
.rp-chip.is-on { border-color: #17181c; background: #fff7e1; box-shadow: inset 0 0 0 1px #17181c; font-weight: 700 !important; }
.rp-text { width: 100%; min-height: 84px; padding: 12px; border: 1px solid #8e929a; border-radius: 12px; resize: none; font: 400 15px/1.4 "Onest", system-ui, sans-serif; color: #17181c; }
.rp-text:focus { outline: 2px solid #17181c; outline-offset: 0; border-color: #17181c; }
.rp-photo { display: flex; align-items: center; gap: 8px; margin-top: 10px; min-height: 44px; padding: 0 14px; border: 1px dashed #8e929a; border-radius: 12px; background: #fff; font-weight: 600 !important; }
.rp-photo.is-on { border-style: solid; border-color: #15803d; color: #15803d; }
.rp-foot { flex: 0 0 auto; padding: 10px 16px 18px; border-top: 1px solid #e6e7ea; background: #fff; }
.rp-ok { display: flex; gap: 10px; margin: 2px 0 14px; padding: 12px 14px; border-radius: 14px; background: #e3f5e8; color: #14632f; font: 500 14px/1.4 "Onest", system-ui, sans-serif; }
.rp-ok .rp-ic { width: 18px; height: 18px; margin-top: 1px; padding: 2px; border-radius: 50%; background: #15803d; color: #fff; stroke-width: 3; }
.rp-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.rp-title__t { margin: 0 0 4px; font: 800 26px/1.15 "Onest", system-ui, sans-serif; }
.rp-title img { width: 60px; height: 60px; object-fit: contain; }
.rp-track { padding: 14px; border: 1px solid #e6e7ea; border-radius: 16px; }
.rp-track__head { display: flex; gap: 12px; margin-bottom: 14px; }
.rp-track__head b { font-size: 16px; }
.rp-track__head p { margin: 2px 0 0; font-size: 13.5px; color: #3d4048; }
.rp-track__ic { display: grid; place-items: center; flex: 0 0 auto; width: 40px; height: 40px; border-radius: 10px; background: #f1f1ef; }
.rp-steps { margin: 0; padding: 0; list-style: none; display: grid; }
.rp-steps li { position: relative; display: grid; grid-template-columns: 24px 1fr auto; gap: 12px; align-items: start; min-height: 40px; color: #6a6e76; }
.rp-steps li::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: -2px; width: 2px; background: #d9dadd; }
.rp-steps li:last-child::before { display: none; }
.rp-steps li.is-done::before { background: #17181c; }
.rp-dot { position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid #b8bbc1; border-radius: 50%; background: #fff; }
.rp-dot .rp-ic { width: 14px; height: 14px; stroke-width: 3; }
.rp-steps li.is-done { color: #17181c; }
.rp-steps li.is-done .rp-dot { border-color: #17181c; background: #17181c; color: #fff; }
.rp-steps li.is-now { color: #17181c; }
.rp-steps li.is-now .rp-dot { border-color: #17181c; background: #fbd530; box-shadow: inset 0 0 0 5px #fff; }
@media (prefers-reduced-motion: no-preference) { .rp-steps li.is-now .rp-dot { animation: rp-pulse 1.4s ease-in-out 3; } }
@keyframes rp-pulse { 50% { box-shadow: inset 0 0 0 5px #fff, 0 0 0 6px rgb(251 213 48 / 45%); } }
.rp-steps__t { display: grid; gap: 1px; padding-top: 2px; }
.rp-steps__t b { font-weight: 500; font-size: 15px; }
.rp-steps li.is-now .rp-steps__t b { font-weight: 800; }
.rp-steps__t small { font-size: 13px; color: #3d4048; }
.rp-steps time { padding-top: 3px; font-size: 12.5px; color: #3d4048; }
.rp-rate { margin-top: 12px; padding: 14px; border-left: 4px solid #fbd530; border-radius: 16px; background: #fff7d1; }
.rp-rate b { font-size: 16px; }
.rp-rate p { margin: 4px 0 8px; font-size: 13.5px; color: #3d4048; }
.rp-stars { display: flex; gap: 6px; }
.rp-star { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #8e929a; }
.rp-star .rp-ic { width: 32px; height: 32px; stroke-width: 1.6; }
.rp-star.is-on { color: #17181c; }
.rp-star.is-on .rp-ic { fill: #fbd530; }
.rp-said { margin-bottom: 8px; padding: 12px 14px; border-radius: 16px; background: #f1f1ef; }
.rp-said p { margin: 0 0 4px; font-size: 15px; }
.rp-said small { font-size: 12px; color: #6a6e76; }
.rp-said--me { margin-left: 34px; background: #fff7d1; }
.rp-said__ph { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 6px 0; padding: 3px 8px; border-radius: 8px; background: #fff; font-size: 12px; }
.rp-said__ph .rp-ic { width: 14px; height: 14px; }
.rp-msg { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px 12px 18px; border-top: 1px solid #e6e7ea; background: #fff; }
.rp-msg__cam { display: grid; place-items: center; width: 36px; color: #3d4048; }
.rp-msg__in { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: 999px; background: #f1f1ef; font: 400 15px/1 "Onest", system-ui, sans-serif; color: #17181c; }
.rp-msg__in:focus { outline: 2px solid #17181c; }
.rp-msg__send { display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #fbd530; }
.rp-msg__send .rp-ic { fill: #17181c; stroke-width: 1.5; }
.rp-tabs { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); padding: 6px 8px 16px; border-top: 1px solid #e6e7ea; background: #fff; }
.rp-tab { display: grid; justify-items: center; gap: 3px; min-height: 52px; border: 0; background: transparent; font-size: 12.5px !important; color: #3d4048 !important; }
.rp-tab__pill { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; }
.rp-tab.is-on { color: #17181c !important; font-weight: 700 !important; }
.rp-tab.is-on .rp-tab__pill { background: #fbd530; }
.rp :focus-visible { outline: 2px solid #17181c; outline-offset: 2px; }

/* 15.11: наклейки «КОГДА?!» и «ГДЕ МАСТЕР?» вместо «ЗАНЯТО!» и «АЛЛО?» (про занятые линии — история с Моной Лизой) */
#angry .ag-hello { left: 22%; top: 15%; width: 40%; rotate: 7deg; }
#angry .ag-calm { width: 70%; left: 14%; }
#angry .ag-leak { left: 3%; top: 31%; }
