/* DPD Job — Telegram Mini App. Дизайн-система: светлая тема (белый и светло-серый
   фон, красные акценты DPD, тёмный текст), тёмная тема с той же иерархией,
   крупные заголовки, единые скругления и области нажатия ≥ 48 px.
   Темы Telegram подхватываются через --tg-theme-*; акценты остаются красными. */
:root {
  --dpd-red: #DC0032;
  --dpd-red-dark: #B5002A;
  --dpd-red-light: #FF4D6D;
  --dpd-red-soft: #FDE8ED;
  --dpd-ink: #111827;
  --dpd-muted: #6B7280;
  --dpd-green: #15803D;
  --dpd-green-soft: #DCFCE7;
  --dpd-amber: #B45309;
  --dpd-amber-soft: #FEF3C7;
  --dpd-blue: #1D4ED8;
  --dpd-blue-soft: #DBEAFE;
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --card-2: #F7F8FA;
  --text: #111827;
  --hint: #6B7280;
  --sep: #E5E7EB;
  --radius-lg: 24px;
  --radius: 20px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --shadow: 0 8px 24px rgba(17, 24, 39, 0.07);
  --shadow-red: 0 10px 28px rgba(220, 0, 50, 0.28);
  --safe-top: var(--tg-content-safe-area-inset-top, var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px)));
  --safe-bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --tabbar-h: 66px;
  --space: 16px;
  --font: -apple-system, "SF Pro Text", "SF Pro Display", Inter, Roboto, "Segoe UI", Arial, sans-serif;
}
:root.tg-dark {
  --bg: #0F1115;
  --surface: #161922;
  --card: #1B1F29;
  --card-2: #222733;
  --text: #F3F4F6;
  --hint: #9CA3AF;
  --sep: #2A3040;
  --dpd-red-soft: #3B1420;
  --dpd-green-soft: #11301C;
  --dpd-amber-soft: #3A2A0B;
  --dpd-blue-soft: #0F1F4A;
  --dpd-green: #4ADE80;
  --dpd-amber: #FBBF24;
  --dpd-blue: #93C5FD;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font: 17px/1.5 var(--font); -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--dpd-red); text-decoration: none; }
h1 { font-size: 28px; line-height: 1.18; margin: 0 0 8px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 22px; line-height: 1.25; margin: 0 0 6px; font-weight: 750; letter-spacing: -0.01em; }
h3 { font-size: 18px; line-height: 1.3; margin: 0 0 6px; font-weight: 700; }
p { margin: 0 0 10px; }
.muted { color: var(--hint); }
.small { font-size: 14px; line-height: 1.45; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--hint); font-weight: 700; }
.app { display: flex; flex-direction: column; min-height: 100vh; }

/* Верхняя панель */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: calc(var(--safe-top) + 8px) 16px 8px; background: var(--surface); border-bottom: 1px solid var(--sep); }
.topbar-brand { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; letter-spacing: -0.01em; }
.topbar-brand .logo { width: 30px; height: 30px; display: block; }
[hidden] { display: none !important; }
.topbar-title { flex: 1; font-weight: 750; font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-back { width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--card-2); color: var(--text); display: grid; place-items: center; }
.topbar-back svg, .topbar-bell svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.topbar-bell { margin-left: auto; width: 44px; height: 44px; border-radius: 14px; border: 0; background: var(--card-2); color: var(--text); position: relative; display: grid; place-items: center; }
.topbar-bell i { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--dpd-red); color: #fff; font-size: 11px; font-weight: 700; font-style: normal; display: grid; place-items: center; padding: 0 5px; }
.topbar-action { margin-left: auto; border: 0; background: transparent; color: var(--dpd-red); font-weight: 700; padding: 8px 4px; min-height: 44px; }
.topbar-bell + .topbar-action { margin-left: 0; }

/* Экран */
.screen { flex: 1; padding: var(--space) var(--space) calc(var(--tabbar-h) + var(--safe-bottom) + 28px); max-width: 640px; width: 100%; margin: 0 auto; }
.screen.no-tabs { padding-bottom: calc(var(--safe-bottom) + 28px); }
.loading-state, .empty-state, .error-state { text-align: center; padding: 44px 16px; color: var(--hint); }
.empty-state h2, .error-state h2 { color: var(--text); }
.spinner { width: 34px; height: 34px; margin: 0 auto 14px; border-radius: 50%; border: 3px solid var(--sep); border-top-color: var(--dpd-red); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty-state .illus, .error-state .illus { width: 140px; height: 140px; margin: 0 auto 8px; }

/* Карточки */
.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); margin-bottom: 14px; }
.card.flat { box-shadow: none; border: 1px solid var(--sep); }
.card.accent { background: linear-gradient(145deg, var(--dpd-red-light) 0%, var(--dpd-red) 55%, var(--dpd-red-dark) 100%); color: #fff; box-shadow: var(--shadow-red); }
.card.accent h1, .card.accent h2, .card.accent h3 { color: #fff; }
.card.accent .muted, .card.accent .small, .card.accent .eyebrow { color: rgba(255, 255, 255, 0.85); }
.card.soft { background: var(--dpd-red-soft); }
.card.demo { border: 1.5px dashed var(--dpd-red); }
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.card-head .icon { width: 48px; height: 48px; border-radius: 16px; background: var(--dpd-red-soft); color: var(--dpd-red); display: flex; align-items: center; justify-content: center; flex: none; }
.card-head .icon svg, .ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.card-head .icon.ok { background: var(--dpd-green-soft); color: var(--dpd-green); }
.card-head .icon.warn { background: var(--dpd-amber-soft); color: var(--dpd-amber); }
.card-head .icon.gray { background: var(--card-2); color: var(--hint); }
.card-head > div { flex: 1; min-width: 0; }
.card-head > .score-ring, .card-head > .avatar-lg, .card-head > .avatar, .card-head > .icon { flex: none; width: auto; }
.card-head > .score-ring { width: 80px; }
.card-head > .avatar-lg { width: 72px; }
.card-head > .icon { width: 48px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--sep); }
.card-row:first-of-type { border-top: 0; }
.card-row b { font-weight: 650; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack > * + * { margin-top: 12px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.section-title h2 { margin: 0; }
.section-title .link-btn { padding: 0; min-height: 0; }

/* Главная карточка шага с иллюстрацией */
.hero { position: relative; overflow: hidden; padding: 22px 20px; min-height: 196px; display: flex; align-items: center; }
.hero .illus { position: absolute; right: 4px; bottom: -10px; width: 150px; height: 150px; pointer-events: none; }
.hero-content { position: relative; z-index: 1; padding-right: 118px; }
.hero-content h1 { font-size: 24px; margin-bottom: 8px; }
.hero-content p { font-size: 15px; margin-bottom: 14px; }
.hero .btn { width: auto; min-width: 180px; }

/* Плитки и меню */
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); border: 0; text-align: left; min-height: 124px; position: relative; width: 100%; color: var(--text); }
.tile .tile-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--dpd-red-soft); color: var(--dpd-red); display: grid; place-items: center; margin-bottom: 2px; }
.tile .tile-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tile b { font-size: 16px; line-height: 1.25; }
.tile .tile-text { font-size: 13.5px; color: var(--hint); line-height: 1.35; }
.tile .chev { position: absolute; right: 14px; top: 16px; }
.menu { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border: 0; background: transparent; text-align: left; min-height: 64px; border-top: 1px solid var(--sep); color: var(--text); }
.menu-item:first-child { border-top: 0; }
.menu-item .mi-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--dpd-red-soft); color: var(--dpd-red); display: grid; place-items: center; flex: none; }
.menu-item .mi-icon.gray { background: var(--card-2); color: var(--hint); }
.menu-item .mi-icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.menu-item > div { flex: 1; min-width: 0; }
.menu-item b { display: block; font-size: 16px; line-height: 1.25; }
.menu-item span { display: block; font-size: 14px; color: var(--hint); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { width: 22px; height: 22px; flex: none; color: var(--hint); display: inline-grid; place-items: center; }
.chev svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 20px; border-radius: 16px; border: 0; font-weight: 700; font-size: 16px; background: var(--dpd-red); color: #fff; width: 100%; cursor: pointer; transition: transform 0.08s ease, opacity 0.15s; }
.btn:active { transform: scale(0.98); }
.btn[disabled], .btn.disabled { opacity: 0.45; pointer-events: none; }
.btn.secondary { background: var(--card-2); color: var(--text); }
.btn.light { background: #fff; color: var(--dpd-red); }
.btn.ghost { background: transparent; color: var(--dpd-red); border: 1.5px solid var(--dpd-red); }
.btn.compact { min-height: 44px; padding: 8px 16px; font-size: 15px; width: auto; border-radius: 13px; }
.btn.danger { background: transparent; color: var(--dpd-red); border: 1.5px solid var(--dpd-red-soft); }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; animation: spin 0.8s linear infinite; }
.btn.secondary.loading::after, .btn.ghost.loading::after { border-color: rgba(220, 0, 50, 0.25); border-top-color: var(--dpd-red); }
.btn .ico { width: 20px; height: 20px; }
.link-btn { background: none; border: 0; color: var(--dpd-red); font-weight: 700; padding: 10px 0; min-height: 44px; font-size: 15px; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 42px; padding: 9px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--sep); font-size: 15px; font-weight: 600; white-space: nowrap; color: var(--text); }
.chip.active { background: var(--dpd-red); border-color: var(--dpd-red); color: #fff; }

/* Статусы */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--card-2); color: var(--hint); }
.pill::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .75; }
.pill.red { background: var(--dpd-red-soft); color: var(--dpd-red); }
.pill.green { background: var(--dpd-green-soft); color: var(--dpd-green); }
.pill.amber { background: var(--dpd-amber-soft); color: var(--dpd-amber); }
.pill.blue { background: var(--dpd-blue-soft); color: var(--dpd-blue); }
.pill.demo { background: transparent; color: var(--dpd-red); border: 1px dashed var(--dpd-red); }
.pill.demo::before { display: none; }
.list-item > .pill, .card-row > .pill, .menu-item .pill { display: inline-flex; flex: none; margin-left: auto; white-space: nowrap; }
.progress { height: 10px; border-radius: 999px; background: var(--sep); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--dpd-red-light), var(--dpd-red)); border-radius: 999px; transition: width 0.5s ease; }
.score-ring { --score: 0%; width: 80px; height: 80px; border-radius: 50%; background: conic-gradient(var(--dpd-red) var(--score), var(--sep) 0); display: grid; place-items: center; flex: none; }
.score-ring > b { width: 62px; height: 62px; border-radius: 50%; background: var(--card); display: grid; place-items: center; font-size: 17px; }

/* Шаги пути */
.steps { display: flex; flex-direction: column; }
.step { display: flex; gap: 14px; padding: 12px 0; position: relative; }
.step + .step::before { content: ""; position: absolute; left: 17px; top: -14px; height: 26px; width: 2px; background: var(--sep); }
.step i { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--sep); display: grid; place-items: center; font-style: normal; font-weight: 700; font-size: 14px; flex: none; background: var(--card); z-index: 1; }
.step.done i { background: var(--dpd-green); border-color: var(--dpd-green); color: #fff; }
.step.active i { border-color: var(--dpd-red); color: var(--dpd-red); }
.step div { flex: 1; }
.step b { display: block; font-size: 16px; }
.step span { color: var(--hint); font-size: 14px; display: block; }

/* Формы */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 650; margin-bottom: 6px; color: var(--hint); }
.field input, .field select, .field textarea { width: 100%; min-height: 52px; padding: 13px 15px; border-radius: 14px; border: 1.5px solid var(--sep); background: var(--card); color: var(--text); outline: none; font-size: 17px; }
.field textarea { min-height: 104px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--dpd-red); }
.field .hint { font-size: 13px; color: var(--hint); margin-top: 6px; }
.field .err { color: var(--dpd-red); font-size: 13px; margin-top: 4px; }
.radio-list { display: flex; flex-direction: column; gap: 8px; }
.radio-list label { display: flex; align-items: center; gap: 12px; padding: 13px 15px; border-radius: 14px; border: 1.5px solid var(--sep); background: var(--card); min-height: 52px; }
.radio-list label.checked { border-color: var(--dpd-red); background: var(--dpd-red-soft); }
.radio-list input { accent-color: var(--dpd-red); width: 20px; height: 20px; }
.checkbox { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; min-height: 44px; }
.checkbox input { accent-color: var(--dpd-red); width: 22px; height: 22px; flex: none; margin-top: 1px; }
.form-message { min-height: 22px; font-size: 14px; color: var(--dpd-red); margin: 6px 0; }
.form-message.success { color: var(--dpd-green); }
.file-pick { display: flex; align-items: center; gap: 12px; }
.file-pick .preview { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; background: var(--card-2); }

/* Нижняя навигация */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(4, 1fr); height: calc(var(--tabbar-h) + var(--safe-bottom)); padding-bottom: var(--safe-bottom); background: var(--surface); border-top: 1px solid var(--sep); }
.tabbar button { border: 0; background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 12px; font-weight: 650; color: var(--hint); position: relative; }
.tabbar button.active { color: var(--dpd-red); }
.tab-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab-badge { position: absolute; top: 8px; right: calc(50% - 22px); min-width: 17px; height: 17px; border-radius: 9px; background: var(--dpd-red); color: #fff; font-size: 10px; font-style: normal; display: grid; place-items: center; padding: 0 4px; }
body.keyboard-open .tabbar { display: none; }

/* Тост */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(var(--tabbar-h) + var(--safe-bottom) + 14px); z-index: 50; background: var(--dpd-ink); color: #fff; padding: 13px 16px; border-radius: 14px; font-size: 15px; box-shadow: var(--shadow); }

/* Списки */
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); margin-bottom: 10px; border: 0; width: 100%; text-align: left; min-height: 72px; color: var(--text); }
.list-item .avatar { width: 46px; height: 46px; border-radius: 15px; background: var(--dpd-red-soft); color: var(--dpd-red); display: grid; place-items: center; font-weight: 800; flex: none; }
.list-item .avatar.gray { background: var(--card-2); color: var(--hint); }
.list-item .avatar svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.list-item > div { flex: 1; min-width: 0; }
.list-item b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item span { color: var(--hint); font-size: 14px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* FAQ */
.faq-item { background: var(--card); border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 10px; }
.faq-item summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 16px 16px; cursor: pointer; font-weight: 600; font-size: 16px; line-height: 1.35; min-height: 60px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .chev { transition: transform .2s ease; margin-left: auto; }
.faq-item[open] summary .chev { transform: rotate(180deg); }
.faq-item .faq-answer { padding: 0 16px 16px; font-size: 16px; line-height: 1.55; color: var(--text); white-space: pre-line; }
.faq-item .faq-answer .pill { margin-top: 10px; }
.search { position: relative; margin-bottom: 10px; }
.search input { width: 100%; min-height: 52px; padding: 13px 15px 13px 54px; border-radius: 16px; border: 1.5px solid var(--sep); background: var(--card); color: var(--text); font-size: 17px; outline: none; }
.search input:focus { border-color: var(--dpd-red); }
.search .ico { position: absolute; left: 16px; width: 22px; height: 22px; top: 50%; transform: translateY(-50%); color: var(--hint); }

/* Чат */
.chat { display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.bubble { max-width: 86%; padding: 11px 15px; border-radius: 18px; background: var(--card); box-shadow: var(--shadow); font-size: 16px; white-space: pre-wrap; word-break: break-word; }
.bubble.client { align-self: flex-start; border-bottom-left-radius: 6px; }
.bubble.agent { align-self: flex-end; background: var(--dpd-red); color: #fff; border-bottom-right-radius: 6px; }
.bubble.system { align-self: center; background: transparent; box-shadow: none; color: var(--hint); font-size: 14px; text-align: center; max-width: 100%; }
.bubble.eval { align-self: stretch; max-width: 100%; background: var(--dpd-red-soft); border: 1px solid rgba(220, 0, 50, 0.15); font-size: 15px; }
.bubble.eval.good { background: var(--dpd-green-soft); border-color: rgba(21, 128, 61, 0.2); }
.bubble.action { align-self: center; background: var(--card-2); box-shadow: none; font-size: 14px; }
.bubble .attach { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding: 8px; border-radius: 10px; background: rgba(0, 0, 0, 0.05); font-size: 14px; }
.bubble time { display: block; font-size: 12px; opacity: 0.6; margin-top: 4px; }
.composer { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-bottom)); background: var(--bg); padding: 8px 0 4px; }
body.keyboard-open .composer { bottom: 0; }
.composer-row { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 50px; max-height: 130px; padding: 13px 15px; border-radius: 16px; border: 1.5px solid var(--sep); background: var(--card); resize: none; font-size: 16px; }
.composer .send { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--dpd-red); color: #fff; display: grid; place-items: center; flex: none; }
.composer .send svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; }
.composer .send[disabled] { opacity: 0.4; }
.composer .attach-btn { width: 50px; height: 50px; border-radius: 50%; border: 0; background: var(--card-2); color: var(--text); display: grid; place-items: center; flex: none; }
.composer .attach-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; }
.shipment-mini { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--sep); margin-bottom: 10px; font-size: 14px; width: 100%; text-align: left; color: var(--text); }
.shipment-mini b { font-size: 15px; }

/* Инструкция по шагам */
.instr-image { width: 100%; aspect-ratio: 9 / 14; max-height: 46vh; border-radius: 20px; background: var(--card-2); display: grid; place-items: center; color: var(--hint); position: relative; overflow: hidden; margin: 12px 0; }
.instr-image img { width: 100%; height: 100%; object-fit: contain; }
.instr-image .placeholder { padding: 18px; text-align: center; font-size: 14px; }
.instr-image .zoom { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, 0.94); color: var(--dpd-ink); display: grid; place-items: center; }
.instr-highlight { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 12px; background: var(--dpd-red-soft); color: var(--dpd-red); font-size: 14px; font-weight: 650; }
.instr-nav { display: flex; gap: 10px; margin-top: 14px; }
.instr-nav .btn { flex: 1; }
.dots { display: flex; gap: 5px; justify-content: center; margin: 10px 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--sep); }
.dots i.on { background: var(--dpd-red); width: 20px; border-radius: 3px; }
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(0, 0, 0, 0.92); display: grid; place-items: center; overflow: auto; touch-action: pinch-zoom; }
.lightbox img { max-width: 100%; max-height: 100%; }
.lightbox button { position: absolute; top: calc(var(--safe-top) + 12px); right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; font-size: 24px; }
video { width: 100%; border-radius: 16px; background: #000; }

/* Учётные данные */
.cred { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 15px; border-radius: 14px; background: var(--card-2); margin-bottom: 8px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; font-size: 15px; }
.cred button { flex: none; }
.countdown { font-weight: 800; font-size: 30px; color: var(--dpd-red); letter-spacing: 0.02em; }

/* Таблицы в админке */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 9px 6px; border-bottom: 1px solid var(--sep); vertical-align: top; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; font-size: 15px; }
.kv dt { color: var(--hint); }
.kv dd { margin: 0; font-weight: 650; text-align: right; }
.banner { display: flex; gap: 12px; padding: 13px 15px; border-radius: 14px; background: var(--dpd-amber-soft); color: var(--dpd-amber); font-size: 15px; margin-bottom: 14px; align-items: flex-start; }
.banner.red { background: var(--dpd-red-soft); color: var(--dpd-red); }
.banner.green { background: var(--dpd-green-soft); color: var(--dpd-green); }
.banner .ico { flex: none; margin-top: 2px; width: 22px; height: 22px; }
.quality { display: grid; gap: 10px; }
.quality > div { display: grid; grid-template-columns: 1fr 52px; gap: 8px; align-items: center; font-size: 15px; }
.quality .progress { grid-column: 1 / -1; }
.illus-inline { width: 100%; max-width: 220px; margin: 0 auto 8px; display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.avatar-lg { flex: none; width: 72px; height: 72px; aspect-ratio: 1; border-radius: 22px; background: var(--card-2); color: var(--dpd-red); display: grid; place-items: center; font-weight: 800; font-size: 24px; overflow: hidden; box-shadow: none; }
.avatar-lg img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
@media (min-width: 560px) { .screen { padding-left: 24px; padding-right: 24px; } }

/* Экран-предупреждение: только iPhone. Без кнопок приложения. */
body.gated { background: var(--dpd-red); }
body.gated .topbar { display: none; }
body.gated .screen { padding: 0; max-width: none; }
.gate { min-height: 100vh; min-height: 100dvh; padding: calc(var(--safe-top) + 56px) 28px calc(var(--safe-bottom) + 40px); background: linear-gradient(165deg, #FF3B5C 0%, var(--dpd-red) 45%, var(--dpd-red-dark) 100%); color: #fff; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.gate-icon { position: relative; width: 112px; height: 112px; margin-bottom: 28px; }
.gate-icon > svg:first-child { width: 112px; height: 112px; fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .25)); }
.gate-cross { position: absolute; right: -6px; bottom: -2px; width: 40px; height: 40px; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .25)); }
.gate h1 { color: #fff; font-size: 30px; line-height: 1.15; margin-bottom: 14px; max-width: 320px; }
.gate p { color: rgba(255, 255, 255, .92); font-size: 17px; line-height: 1.5; max-width: 340px; margin-bottom: 10px; }
.gate .gate-note { font-size: 14px; color: rgba(255, 255, 255, .72); }

/* Анимации: мягкие, короткие, отключаемые */
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-1.5deg); } 50% { transform: translateY(-9px) rotate(1.5deg); } }
.hero .illus.float { animation: float 6s ease-in-out infinite; will-change: transform; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes fadeout { to { opacity: 0; transform: translateY(8px); } }
.celebrate { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(17, 24, 39, .28); pointer-events: none; }
.celebrate-card { background: var(--card); color: var(--text); border-radius: 26px; padding: 24px 28px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 18px; font-weight: 700; animation: pop .45s cubic-bezier(.2,.9,.3,1.2); }
.celebrate-card .illus { width: 128px; height: 128px; }
.celebrate.leave .celebrate-card { animation: fadeout .35s ease forwards; }
.celebrate.static .celebrate-card { animation: none; }
@media (prefers-reduced-motion: reduce) { .hero .illus.float { animation: none; } .celebrate-card { animation: none; } .btn, .progress > span { transition: none; } }

/* Доступность */
:focus-visible { outline: 3px solid var(--dpd-blue); outline-offset: 2px; border-radius: 8px; }
.step.done i { font-weight: 900; }

/* ===== DPD Job · Android — дополнения ===== */
.badge-android { font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: var(--card-2); color: var(--hint); margin-left: 6px; }
.referral { display: flex; align-items: center; gap: 14px; width: 100%; border: 0; text-align: left; }
.referral .illus { width: 76px; height: 76px; flex: none; }
.referral > div { flex: 1; min-width: 0; }
.referral b { font-size: 16px; display: block; }
.balance { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px; border-radius: 16px; background: var(--card-2); margin-top: 12px; font-size: 15px; }
.balance b { font-size: 26px; color: var(--dpd-red); }
.list-item .chev, .card-row .chev { margin-left: auto; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary.link-btn::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); }
details[open] > summary.link-btn::after { transform: rotate(-135deg) translateY(-2px); }
/* ===== Иллюстрации владельца (art.js) ===== */
.art { display: block; flex: none; max-width: 100%; }
.art img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar, 1); object-fit: contain; object-position: center bottom; }
.hero .art { position: absolute; right: 10px; bottom: 8px; pointer-events: none; }
.hero-content { padding-right: 150px; }
.card-head .art, .row .art { flex: none; }
.art-center { display: grid; place-items: center; margin: 0 auto 10px; }
@media (max-width: 359px) { .hero { flex-direction: column; align-items: stretch; } .hero .art { position: static; margin: 10px auto 0; } .hero-content { padding-right: 0; } }
.pill.demo { background: var(--card-2); color: var(--hint); }
.card.demo { border: 1px solid var(--sep); }

/* Знак DPD — файл владельца, не векторная имитация */
.topbar-brand .logo, img.logo { width: 30px; height: 30px; object-fit: contain; display: block; }
.illus-cube { object-fit: contain; }
.gate-icon img.illus { width: 120px; height: 120px; }
