  @import url('https://fonts.googleapis.com/css2?family=Unbounded:wght@700;800;900&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

  /* ---- Tokens: deliberate single dark world (broadcast control room),
     matching the brand identity. Declared explicitly so the page
     holds regardless of host theme. ---- */
  :root{
    --bg:#0A0A0B;
    --bg-vignette: radial-gradient(120% 90% at 50% -10%, #1a1414 0%, #0A0A0B 55%);
    --surface:#141416;
    --surface-raised:#1B1B1E;
    --border:#28282C;
    --border-soft:#1E1E22;
    --text:#F3F1EE;
    --text-muted:#9A9894;
    --text-faint:#615F5B;
    --accent:#FF3B2E;
    --accent-dim:#3A1310;
    --accent-glow: rgba(255,59,46,.35);
    --ok:#34D399;
    --font-display:'Unbounded', 'Archivo Black', Impact, 'Arial Black', sans-serif;
    --font-body:'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:'IBM Plex Mono', 'SFMono-Regular', Consolas, monospace;
  }

  *{box-sizing:border-box;}
  html,body{margin:0;padding:0;}
  body{
    background:var(--bg) var(--bg-vignette);
    color:var(--text);
    font-family:var(--font-body);
    -webkit-font-smoothing:antialiased;
    min-height:100vh;
  }
  ::selection{ background:var(--accent); color:#0A0A0B; }
  a{ color:inherit; }

  .noise{
    position:fixed; inset:0; pointer-events:none; opacity:.035; z-index:0;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  }

  /* ---- Top bar ---- */
  .topbar{
    position:relative; z-index:2;
    display:flex; align-items:center; justify-content:space-between;
    gap:14px; flex-wrap:wrap; row-gap:10px;
    padding:20px clamp(20px,5vw,56px);
    border-bottom:1px solid var(--border-soft);
  }
  .brand{ display:flex; align-items:center; gap:12px; }
  .brand-dot{
    width:10px; height:10px; border-radius:50%;
    background:var(--accent);
    box-shadow:0 0 0 3px var(--accent-dim), 0 0 14px var(--accent-glow);
    animation:pulse 2.4s ease-in-out infinite;
    flex:0 0 auto;
  }
  @keyframes pulse{ 0%,100%{opacity:1} 50%{opacity:.45} }
  .brand-logo{ height:19px; width:auto; display:block; }
  /* Лого-текст "REC & STREAM" слева в шапке — добавлено по просьбе
     заказчика (см. index.php, комментарий у .brand). Кликабельно —
     ведет на сайт продакшена, как и отдельная ссылка .top-nav ниже,
     это просто дублирующий, более заметный вход в то же место. */
  .brand-name{
    font-family:var(--font-display); font-weight:800; font-size:14px;
    letter-spacing:.02em; text-transform:uppercase; color:var(--text);
    text-decoration:none; white-space:nowrap;
    transition:color .15s;
  }
  .brand-name:hover{ color:var(--accent); }
  .brand-tag{
    font-family:var(--font-mono); font-size:11px; color:var(--text-faint);
    letter-spacing:.06em; margin-left:2px; display:none;
  }
  @media(min-width:640px){ .brand-tag{ display:inline; } }

  .top-nav{ display:flex; align-items:center; gap:16px; }
  .nav-link{
    font-family:var(--font-mono); font-size:11px; font-weight:600;
    text-transform:uppercase; letter-spacing:.06em;
    color:var(--text-muted); text-decoration:none; white-space:nowrap;
    transition:color .15s;
  }
  .nav-link:hover{ color:var(--accent); }
  .nav-link.nav-link-bright{ color:var(--text); font-weight:800; }
  .nav-link.nav-link-bright:hover{ color:var(--accent); }

  .top-right{ display:flex; align-items:center; gap:18px; flex-wrap:wrap; justify-content:flex-end; font-family:var(--font-mono); font-size:12px; color:var(--text-muted); }
  .top-right .divider{ width:1px; height:14px; background:var(--border); display:inline-block; }
  /* WhatsApp в шапке — добавлено по просьбе заказчика (см. index.php).
     Оформлено как маленькая "таблетка" под тот же стиль, что и
     select-ы страны/языка рядом (.hdr-select), чтобы не выбиваться —
     подсветка при наведении в фирменном зеленом цвете WhatsApp, просто
     как узнаваемый акцент, сам фон/рамка остаются в стиле остальной шапки. */
  .hdr-whatsapp{
    display:inline-flex; align-items:center; gap:6px;
    border:1px solid var(--border); border-radius:6px;
    padding:5px 10px; color:var(--text); text-decoration:none;
    font-family:var(--font-mono); font-size:12px; font-weight:600; letter-spacing:.02em;
    white-space:nowrap; transition:border-color .15s, color .15s;
  }
  .hdr-whatsapp:hover{ border-color:#25D366; color:#25D366; }
  .hdr-whatsapp svg{ display:block; flex:0 0 auto; color:#25D366; }
  .rec-code{ letter-spacing:.03em; }
  .rec-code b{ color:var(--text); font-weight:600; }
  .lang{
    border:1px solid var(--border); border-radius:6px; padding:5px 10px;
    color:var(--text-muted); font-family:var(--font-mono); font-size:11px;
    letter-spacing:.04em;
  }
  /* Страна/язык — select'ы в шапке (см. index.php), теперь два ЯВНО
     разделенных блока (.hdr-picker-group), а не одна нерасчленимая
     строка из подписи+флага+двух одинаковых мелких select-ов подряд —
     заказчик жаловался, что было непонятно, где страна, а где язык.
     Слева — страна: флаг + select с ПОЛНЫМ названием страны (без
     отдельной текстовой подписи — самоочевидно и так). Справа — язык:
     подпись "Язык" + узкий select под 2 буквы, как и раньше. Между
     двумя блоками — увеличенный gap (18px, против 8px внутри каждого
     блока), чтобы визуально читались как два разных элемента управления,
     а не один общий ряд. */
  .hdr-pickers{
    display:flex; align-items:center; gap:18px; flex-wrap:wrap;
  }
  .hdr-picker-group{
    display:flex; align-items:center; gap:8px; flex-wrap:nowrap;
  }
  .hdr-field-label{
    font-family:var(--font-mono); font-size:12px; color:var(--text-muted);
    letter-spacing:.03em; white-space:nowrap;
  }
  .hdr-flag{
    display:inline-flex; align-items:center; flex:0 0 auto;
    border-radius:2px; overflow:hidden;
    box-shadow:0 0 0 1px var(--border);
  }
  .hdr-flag svg{ display:block; }
  .hdr-select{
    /* width:auto переопределяет общее правило "select{width:100%}" формы
       (см. ниже) — иначе селект в шапке растягивается на всю ширину. */
    width:auto; appearance:none; -webkit-appearance:none; -moz-appearance:none;
    border:1px solid var(--border); border-radius:6px;
    color:var(--text); background-color:var(--surface);
    font-family:var(--font-mono); font-weight:600; letter-spacing:.03em;
    cursor:pointer; flex:0 0 auto;
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239A9894'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:right 7px center;
  }
  .hdr-select:hover{ border-color:var(--text-faint); }
  .hdr-select:focus{ outline:1px solid var(--accent); }
  .hdr-select option{ background:var(--surface); color:var(--text); }
  /* Страна: теперь показывает целиком "Аргентина"/"Argentina" и т.п.
     (было — только код "AR"/"BR"), поэтому ширина увеличена под самое
     длинное название и текст не обрезается многоточием. */
  .hdr-select-country{ font-size:14px; padding:5px 22px 5px 8px; max-width:46vw; text-overflow:ellipsis; }
  /* Язык: тот самый "маленький квадратик под 2 буквы" — узко и плотно,
     без изменений. */
  .hdr-select-lang{ font-size:14px; width:46px; padding:5px 16px 5px 6px; }

  /* ---- Shell ---- */
  .shell{
    position:relative; z-index:1;
    max-width:760px; margin:0 auto;
    padding:clamp(28px,5vw,64px) 20px 80px;
  }

  .eyebrow{
    font-family:var(--font-mono); font-size:12px; color:var(--accent);
    letter-spacing:.12em; text-transform:uppercase; margin:0 0 10px;
    display:flex; align-items:center; gap:8px;
  }
  .eyebrow::before{ content:'●'; font-size:8px; }
  h1.title{
    font-family:var(--font-display); text-transform:uppercase;
    font-size:clamp(22px,3.8vw,32px); font-weight:800; line-height:1.18; letter-spacing:0;
    margin:0 0 8px; text-wrap:balance;
  }
  .subtitle{ color:var(--text-muted); font-size:15px; line-height:1.55; margin:0 0 34px; max-width:56ch; }

  /* ---- Timeline / progress scrubber ---- */
  .scrubber{ margin-bottom:40px; }
  .scrubber-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
  .scrubber-label{ font-family:var(--font-mono); font-size:11px; color:var(--text-muted); letter-spacing:.05em; text-transform:uppercase; }
  .scrubber-pct{ font-family:var(--font-mono); font-size:12px; color:var(--text); font-variant-numeric:tabular-nums; }
  .scrubber-track{
    position:relative; height:5px; border-radius:3px; background:var(--border);
    display:flex; gap:3px;
  }
  .scrubber-seg{ flex:1; height:100%; border-radius:3px; background:var(--border); overflow:hidden; position:relative; }
  .scrubber-seg::after{
    content:''; position:absolute; inset:0; background:var(--accent);
    transform:scaleX(0); transform-origin:left; transition:transform .5s cubic-bezier(.65,0,.35,1);
  }
  .scrubber-seg.filled::after{ transform:scaleX(1); }
  .scrubber-seg.current::after{ transform:scaleX(1); background:linear-gradient(90deg,var(--accent),#ff6b5e); }
  .steps-labels{ display:flex; justify-content:space-between; margin-top:10px; font-family:var(--font-mono); font-size:10.5px; color:var(--text-faint); letter-spacing:.04em; }
  .steps-labels span.on{ color:var(--accent); }

  /* ---- Card ---- */
  .card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:14px;
    padding:clamp(22px,4vw,40px);
    position:relative;
    overflow:hidden;
  }
  .card::before{
    content:''; position:absolute; top:0; left:0; right:0; height:1px;
    background:linear-gradient(90deg, transparent, var(--accent-glow), transparent);
  }

  .step-panel{ display:none; }
  .step-panel.active{ display:block; animation:rise .38s cubic-bezier(.2,.8,.2,1); }
  @keyframes rise{ from{ opacity:0; transform:translateY(6px); } to{ opacity:1; transform:none; } }

  .step-kicker{
    font-family:var(--font-mono); font-size:12px; color:var(--text-faint);
    letter-spacing:.06em; text-transform:uppercase; margin-bottom:6px;
  }
  .step-heading{ font-size:20px; font-weight:700; margin:0 0 12px; letter-spacing:-.01em; }
  .step-instruction{ color:var(--text-muted); font-size:14px; line-height:1.6; margin:0 0 28px; max-width:60ch; }
  .step-instruction b{ color:var(--text); font-weight:600; }

  .field-group{ display:flex; flex-direction:column; gap:22px; }
  .field{ display:flex; flex-direction:column; gap:8px; }
  .field-row{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
  @media(max-width:520px){ .field-row{ grid-template-columns:1fr; } }

  label.flabel{ font-size:13px; font-weight:600; letter-spacing:.01em; }
  label.flabel .req{ color:var(--accent); }
  .fhint{ font-size:12.5px; color:var(--text-faint); margin-top:-4px; line-height:1.5; }

  select, input[type=text], input[type=email], input[type=number]{
    width:100%; background:var(--surface-raised); border:1px solid var(--border);
    color:var(--text); font-family:var(--font-body); font-size:14px;
    border-radius:9px; padding:12px 14px; outline:none;
    transition:border-color .15s, box-shadow .15s;
    appearance:none;
  }
  select{
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239A9894'/%3E%3C/svg%3E");
    background-repeat:no-repeat; background-position:right 14px center; padding-right:34px;
  }
  select:focus, input:focus{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
  input::placeholder{ color:var(--text-faint); }

  .unit-input{ position:relative; }
  .unit-input input{ padding-right:64px; }
  .unit-input .unit{
    position:absolute; right:14px; top:50%; transform:translateY(-50%);
    font-family:var(--font-mono); font-size:12px; color:var(--text-faint);
    pointer-events:none; letter-spacing:.02em;
  }

  .choice-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:8px; }
  @media(max-width:560px){ .choice-grid{ grid-template-columns:repeat(2,1fr); } }
  .choice{
    border:1px solid var(--border); background:var(--surface-raised);
    color:var(--text-muted); font-family:var(--font-mono); font-size:12.5px;
    padding:10px 6px; border-radius:8px; text-align:center; cursor:pointer;
    transition:all .15s; user-select:none;
  }
  .choice:hover{ border-color:var(--text-faint); color:var(--text); }
  .choice.selected{ border-color:var(--accent); color:var(--text); background:var(--accent-dim); }

  .toggle-pair{ display:flex; gap:8px; }
  .toggle-pair .choice{ flex:1; }

  .check-row{
    display:flex; align-items:flex-start; gap:12px; cursor:pointer;
    padding:14px; border:1px solid var(--border); border-radius:10px;
    background:var(--surface-raised); transition:border-color .15s;
  }
  .check-row:hover{ border-color:var(--text-faint); }
  .check-row input{ display:none; }
  .check-box{
    width:19px; height:19px; border-radius:5px; border:1.5px solid var(--border);
    flex:0 0 auto; margin-top:1px; position:relative; transition:all .15s;
    background:var(--surface);
  }
  .check-row input:checked ~ .check-box{ background:var(--accent); border-color:var(--accent); }
  .check-row input:checked ~ .check-box::after{
    content:''; position:absolute; left:5px; top:1px; width:5px; height:10px;
    border:solid #0A0A0B; border-width:0 2px 2px 0; transform:rotate(45deg);
  }
  .check-text{ font-size:13.5px; line-height:1.5; }
  .check-text .ct-title{ font-weight:600; display:block; margin-bottom:2px; }
  .check-text .ct-sub{ color:var(--text-faint); font-size:12px; }

  .subgrid{ display:grid; grid-template-columns:1fr auto; gap:14px; align-items:end; }
  .subgrid .field{ margin:0; }

  fieldset.section{ border:none; margin:0; padding:22px 0 0; border-top:1px dashed var(--border); }
  fieldset.section legend{
    padding:0; font-family:var(--font-mono); font-size:11.5px; color:var(--accent);
    letter-spacing:.06em; text-transform:uppercase; margin-bottom:16px;
  }

  /* ---- Nav buttons ---- */
  .nav-row{
    display:flex; align-items:center; justify-content:space-between;
    margin-top:38px; padding-top:24px; border-top:1px solid var(--border-soft);
    gap:14px; flex-wrap:wrap;
  }
  .btn{
    font-family:var(--font-body); font-weight:600; font-size:14px;
    border-radius:9px; padding:13px 22px; cursor:pointer; border:1px solid transparent;
    display:inline-flex; align-items:center; gap:8px; transition:all .15s;
  }
  .btn-primary{ background:var(--accent); color:#0A0A0B; margin-left:auto; }
  .btn-primary:hover{ background:#ff5245; box-shadow:0 0 0 4px var(--accent-dim); }
  .btn-ghost{ background:transparent; color:var(--text-muted); border-color:var(--border); }
  .btn-ghost:hover{ color:var(--text); border-color:var(--text-faint); }
  .btn-ghost:disabled{ opacity:.3; cursor:default; }
  .btn-ghost:disabled:hover{ border-color:var(--border); color:var(--text-muted); }
  .link-edit{
    font-family:var(--font-mono); font-size:12px; color:var(--text-faint);
    background:none; border:none; cursor:pointer; letter-spacing:.02em;
    padding:0; text-decoration:underline; text-underline-offset:3px;
  }
  .link-edit:hover{ color:var(--text-muted); }

  /* ---- Final step ---- */
  .final-note{
    font-size:12.5px; line-height:1.6; color:var(--text-faint);
    background:var(--surface-raised); border:1px solid var(--border);
    border-radius:10px; padding:14px 16px; margin-top:4px;
  }
  .calc-btn{
    width:100%; justify-content:center; font-size:15px; padding:16px 22px;
    margin-top:6px;
  }

  .footer-note{
    text-align:center; margin-top:22px; font-family:var(--font-mono);
    font-size:11px; color:var(--text-faint); letter-spacing:.04em;
  }

  /* ---- Ошибки валидации на шаге ---- */
  .step-error{
    display:none; font-size:13px; color:var(--accent);
    background:var(--accent-dim); border:1px solid var(--accent);
    border-radius:9px; padding:10px 14px; margin-top:18px;
  }
  .step-error.show{ display:block; }
  /* незаполненные обязательные поля подсвечиваются красным (не только
     общая надпись "заполните поля со звездочкой" сверху) */
  .field.invalid select, .field.invalid input[type=text], .field.invalid input[type=email], .field.invalid input[type=number]{
    border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim);
  }
  .field.invalid > .flabel{ color:var(--accent); }
  .field.invalid .choice{ border-color:var(--accent); }
  .check-row.invalid{ border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
  .check-row.invalid .check-box{ border-color:var(--accent); }

  /* ---- Условно скрываемые блоки (спикеры / удаленка) ---- */
  [data-conditional]{
    display:none; overflow:hidden;
  }
  [data-conditional].open{ display:block; }

  /* ---- Результат расчета: то же самое темное окружение, модальным окном ---- */
  #result{
    display:none; position:fixed; inset:0; z-index:100;
    background:rgba(0,0,0,.6); padding:24px; box-sizing:border-box;
    align-items:center; justify-content:center;
  }
  #result.open{ display:flex; }
  .list{
    position:relative; width:100%; max-width:760px; max-height:88vh;
    margin:auto; padding:0; overflow:hidden; border-radius:14px;
    background:var(--surface); border:1px solid var(--border);
    box-shadow:0 20px 60px rgba(0,0,0,.5); box-sizing:border-box;
    display:flex; flex-direction:column;
  }
  /* .scrollable — гибкая часть модалки (прокручивается), .print — всегда
     видимая "подвал"-кнопка ниже. Раньше .print был за пределами видимой
     высоты .list и обрезался overflow:hidden — теперь оба элемента внутри
     общего flex-столбца и .print никогда не уезжает за край. */
  .scrollable{ flex:1 1 auto; min-height:0; padding:28px clamp(20px,4vw,40px); overflow-y:auto; box-sizing:border-box; }
  .scrollable::-webkit-scrollbar{ width:6px; }
  .scrollable::-webkit-scrollbar-track{ background:var(--surface); }
  .scrollable::-webkit-scrollbar-thumb{ background:var(--border); border-radius:3px; }

  /* ВАЖНО про PDF: .list ограничен по высоте (max-height:88vh) и обрезан
     (overflow:hidden), а .scrollable внутри — со своим overflow-y:auto
     (это скроллящееся модальное окно на экране). html2pdf.js/html2canvas
     считает разрывы страниц по фактическому положению элементов в
     документе — если контейнер обрезан/скроллится, эти расчеты сбиваются
     и получаются кривые переносы (строка или сумма режется посередине).
     Поэтому на время генерации PDF (см. js/app.js) на .list временно
     навешивается класс .pdf-export, который снимает это ограничение —
     весь блок сметы становится обычным, ничем не обрезанным документом
     нормальной высоты, как и должно быть для правильной пагинации. Сразу
     после того как PDF готов, класс снимается и модалка на экране снова
     скроллится как обычно. */
  .list.pdf-export{ max-height:none; overflow:visible; }
  .list.pdf-export .scrollable{ overflow:visible; max-height:none; }

  h1.result{ font-family:var(--font-display); text-transform:uppercase; font-size:20px; font-weight:800; margin:0 0 12px; padding-right:40px; color:var(--text); }
  /* номер расчета — короткий, справочный, поэтому шрифт сильно меньше заголовка */
  .calc-num{ font-family:var(--font-mono); font-size:13px; font-weight:600; letter-spacing:.02em; vertical-align:middle; text-transform:none; color:var(--text-muted); }
  .close{
    position:absolute; top:18px; right:18px; font-size:18px; line-height:34px;
    width:34px; height:34px; text-align:center; border-radius:34px; cursor:pointer;
    border:1px solid var(--border); color:var(--text-muted); z-index:101;
  }
  .close:hover{ color:var(--text); border-color:var(--text-faint); }
  .print{
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    font-family:var(--font-body); font-weight:600; font-size:14px;
    border:1px solid var(--border); border-radius:9px; height:44px; padding:0 20px;
    margin:0 clamp(20px,4vw,40px) 22px; cursor:pointer; background:var(--accent); color:#0A0A0B;
    transition:background .15s; flex:0 0 auto; align-self:flex-start;
  }
  .print:hover{ background:#ff5245; }
  p.lr{ font-size:13px; line-height:1.6; color:var(--text-muted); margin:0 0 20px; }
  .upsized{ font-size:15px; color:var(--text); }

  .inform{ width:100%; margin:0 0 20px; border-radius:9px; overflow:hidden; border-collapse:collapse; }
  .inform th{
    font:12px var(--font-mono); text-transform:uppercase; letter-spacing:.04em;
    padding:8px 12px; background:var(--surface-raised); border-bottom:1px solid var(--border);
    text-align:left; white-space:nowrap; color:var(--text-faint);
  }
  .inform tr:hover td{ background:var(--surface-raised); }
  .inform td{ font-size:13.5px; padding:9px 12px; border-bottom:1px solid var(--border-soft); color:var(--text); }
  .inform td b{ font-weight:700; }

  /* ---- Строки сметы, кликабельные для "Карты площадки" (см. map.html
     + js/app.js) — смета всегда светлая (для PDF), поэтому цвета тут
     подобраны под белый фон, а не под темные --surface-* переменные
     сайта. */
  .smeta-row:hover td{ background:#f5f5f5; }
  .smeta-row.map-active td{ background:#fff1ef; }
  .map-toggle:hover{ background:#f5f5f5; }

  .logo{ margin:18px 0 0; }
  .logo .flr{ margin:0; font-family:var(--font-mono); font-size:11px; letter-spacing:.06em; color:var(--text-faint); }
  .contacts{ display:flex; gap:24px; border-top:1px solid var(--border-soft); padding:14px 0 0; margin:14px 0 0; font-size:12.5px; color:var(--text-muted); flex-wrap:wrap; }

  /* ---- "Карта площадки" — выезжающая справа панель с iframe (map.html).
     Сама карта — отдельное темное SPA (см. map.html), поэтому панель
     тоже темная и не спорит по стилю. Открывается кнопкой "Карта
     площадки" в смете или кликом по любой ее строке (см. js/app.js).
     Смета (#result) и эта панель — независимые слои, могут быть открыты
     одновременно (на десктопе), поэтому у панели свой z-index выше
     модалки сметы. */
  .map-panel{
    position:fixed; top:0; right:0; height:100vh; width:min(560px, 100vw);
    background:#0a0d12; border-left:1px solid #232c39; box-shadow:-20px 0 60px rgba(0,0,0,.45);
    z-index:200; display:flex; flex-direction:column;
    transform:translateX(100%); transition:transform .28s ease;
  }
  .map-panel.open{ transform:translateX(0); }
  /* .map-panel-drag — полоска-"ручка" для смахивания на мобильной шторке
     (см. медиа-запрос ниже) — на десктопе панель не является шторкой,
     поэтому там ручка не нужна и скрыта. */
  .map-panel-drag{ display:none; }
  .map-panel-head{
    display:flex; align-items:center; justify-content:space-between; gap:12px;
    padding:14px 16px; background:#10151d; border-bottom:1px solid #232c39; flex:none;
  }
  .map-panel-title{
    font-family:var(--font-display); text-transform:uppercase; font-weight:800;
    letter-spacing:.02em; font-size:15px; color:#edf1f6;
  }
  .map-panel-head-actions{ display:flex; align-items:center; gap:8px; flex:none; }
  .map-panel-close, .map-panel-expand{
    width:32px; height:32px; border-radius:32px; border:1px solid #232c39; background:transparent;
    color:#8b96a7; font-size:16px; line-height:1; cursor:pointer; flex:none;
  }
  .map-panel-close:hover, .map-panel-expand:hover{ color:#edf1f6; border-color:#54606f; }
  /* Кнопка "развернуть на весь экран" — только мобильный функционал (на
     десктопе панель и так всегда занимает всю высоту), см. медиа-запрос
     ниже и js/app.js. */
  .map-panel-expand{ display:none; }
  .map-frame{ flex:1 1 auto; width:100%; border:0; background:#0a0d12; }

  @media (max-width:720px){
    /* На мобильной ширине карта — не полноэкранная панель, выезжающая
       справа, а "шторка", открывающаяся из НИЖНЕЙ половины экрана: сверху
       остается видна смета с подсвеченной (.map-active) строкой, ради
       которой карту вообще открыли. Открывается теперь только явным
       кликом — кнопкой "Карта площадки" или кликом по строке сметы, но
       НЕ автоматически вместе с расчетом (см. js/app.js, openMapPanel()
       вызывается только когда window.matchMedia('(max-width:720px)')
       не совпадает).
       Шторку можно развернуть на весь экран (.map-panel.expanded) —
       кнопкой ⤢ или смахиванием ручки вверх — и свернуть обратно/закрыть
       смахиванием вниз (см. js/app.js, блок "мобильная шторка карты").
       Половинная высота — намеренно не 50vh ровно, а --map-sheet-half,
       которую JS выставляет на основе реальной высоты видимой области
       (учитывает мобильные тулбары браузера, которые "съедают" часть
       100vh) — если JS почему-то не выполнился, есть аварийный фолбэк
       50vh через сам custom property. */
    .map-panel{
      width:100vw; height:var(--map-sheet-half, 50vh); top:auto; bottom:0; left:0; right:0;
      border-left:none; border-top:1px solid #232c39;
      border-radius:14px 14px 0 0;
      box-shadow:0 -20px 60px rgba(0,0,0,.45);
      transform:translateY(100%);
      transition:transform .28s ease, height .28s ease;
    }
    .map-panel.open{ transform:translateY(0); }
    .map-panel.expanded{ height:var(--map-sheet-full, 94vh); }
    .map-panel-drag{
      display:flex; align-items:center; justify-content:center;
      /* Отступы больше, чем сама видимая полоска (--drag-bar 4px) —
         иначе реальная область попадания пальцем под жест получается
         слишком маленькой (меньше рекомендуемых ~44px) и свайп либо не
         срабатывает, либо срабатывает через раз. */
      padding:14px 0 10px; flex:none; cursor:grab; touch-action:none;
    }
    .map-panel-drag-bar{ width:38px; height:4px; border-radius:3px; background:#3a4658; }
    /* Шапка шторки тоже "ловит" смахивание (не только узкая ручка выше)
       — так пользователю не нужно целиться именно в 4-пиксельную
       полоску, драг работает с любой точки шапки, кроме самих кнопок
       (см. js/app.js, onPointerDown пропускает клики по ⤢/✕). */
    .map-panel-head{ padding:2px 14px 10px; touch-action:none; cursor:grab; }
    .map-panel-title{
      font-size:12.5px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:56vw;
    }
    .map-panel-expand{ display:flex; align-items:center; justify-content:center; width:30px; height:30px; font-size:14px; }
    .map-panel-close{ width:30px; height:30px; }
  }
