/* Шрифт музея: тот же файл, что подключён на 15kop.ru (там он назван 15kopFont). */
@font-face { font-family: 'Aeonik Pro'; src: url('https://static.tildacdn.com/tild3065-3332-4664-a634-353832633030/aeonikpro-regular.woff') format('woff'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Aeonik Pro'; src: url('https://static.tildacdn.com/tild3539-3033-4230-b763-636337613666/aeonikpro-medium.woff') format('woff'); font-weight: 500; font-style: normal; font-display: swap; }

/* Пункт проката. Палитра и приёмы — от сайта Музея советских игровых автоматов:
   тёплый камень, тёмные «экраны» со скруглениями и вырезанными вкладками, оранжевая кнопка, жёлтые фишки. */
:root {
  --stone: #C6BBB5;
  --ink: #171818;
  --cream: #F2EBE1;
  --brown: #60544A;
  --orange: #FF4802;
  --yellow: #F3C72C;
  --mute: #A39A93;
  --card: rgba(122, 122, 122, .2);
  --r: 28px;
  --gap: 16px;
  --top: 52px;
  --font: 'Aeonik Pro', 'Onest', Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--top) + 14px); }
body {
  margin: 0; padding: var(--top) var(--gap) 100px;
  background: var(--stone); color: var(--ink);
  font: 400 17px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

h2 { font-weight: 400; font-size: clamp(34px, 5.2vw, 64px); line-height: 1; letter-spacing: -.02em; text-transform: uppercase; }
h3 { font-weight: 500; font-size: 20px; line-height: 1.2; }

/* ——— экраны ——— */
.screen {
  position: relative; background: var(--ink); color: var(--cream);
  border-radius: var(--r); padding: clamp(24px, 4vw, 56px);
  margin: 0 0 var(--gap);
}
.plain { margin: 0; padding: clamp(40px, 6vw, 88px) clamp(8px, 3vw, 40px); }
.hint { color: var(--mute); max-width: 62ch; margin-top: 14px; }

/* ——— рамка окна и верхняя полоса, как на сайте музея ——— */
/* Каменная рамка со скруглёнными углами стоит на месте, страница прокручивается под ней. */
.frame { position: fixed; z-index: 15; pointer-events: none; inset: var(--top) var(--gap) var(--gap); border-radius: var(--r); box-shadow: 0 0 0 240px var(--stone); }
.topbar {
  position: fixed; z-index: 20; top: 0; left: 0; right: 0; height: var(--top);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 0 calc(var(--gap) + 8px); color: var(--ink);
}
.tb-city { display: flex; align-items: center; gap: 2px; }
.brand { display: grid; place-items: center; width: 32px; height: 32px; color: var(--ink); }
.city { background: none; border: 0; padding: 6px 8px; cursor: pointer; font-size: 16px; font-weight: 500; color: var(--ink); opacity: .5; text-decoration: none; }
.city[aria-pressed="true"], a.city { opacity: 1; }
.menu { display: flex; gap: 26px; font-size: 16px; font-weight: 500; }
.menu a { color: var(--ink); text-decoration: none; }
.menu a:hover { text-decoration: underline; text-underline-offset: 5px; }

/* ——— первый экран: чёрный круг на коричневом, дуга лежит поверх букв ——— */
.hero {
  --R: calc((100vw - 2 * var(--gap)) * .525); --arc-top: 0px;
  padding: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--ink);
}
.hero-arc {
  position: absolute; z-index: 2; pointer-events: none; top: 0; left: 0; right: 0;
  height: calc(var(--arc-top) + var(--R));
  background: radial-gradient(circle var(--R) at 50% 100%, transparent calc(100% - 1px), var(--brown) 100%);
}
.hero-body { position: relative; z-index: 1; text-align: center; padding: clamp(84px, 9.5vw, 170px) 20px clamp(48px, 6vw, 96px); }
h1 {
  font-weight: 400; text-transform: uppercase; letter-spacing: -.02em;
  font-size: clamp(48px, 9.4vw, 160px); line-height: .92;
}
.lead { max-width: 46ch; margin: 28px auto 0; font-size: clamp(17px, 1.5vw, 21px); }
.lead-price { margin-top: 10px; color: var(--mute); }

/* ——— шаги ——— */
.steps { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.steps .num { display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 10px; border-radius: 8px; background: var(--yellow); color: var(--ink); font-size: 18px; font-weight: 500; margin-bottom: 14px; }
.steps p, .needs p { margin-top: 8px; color: #3b3632; }

/* ——— каталог: как онлайн-экспозиция музея — чёрная плитка с фото, подпись под ней ——— */
.catalog { background: var(--brown); }
.sec-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.chip { border: 0; background: rgba(242, 235, 225, .14); color: var(--cream); border-radius: 8px; padding: 8px 16px; cursor: pointer; font-weight: 500; font-size: 15px; }
.chip:hover { background: rgba(242, 235, 225, .26); }
.chip[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.chip span { opacity: .6; }
.term-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.term-pick-l, .catalog .hint, .tools { color: rgba(242, 235, 225, .72); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin-top: 26px; }
.tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 18px; font-size: 14px; }
.tools label { display: inline-flex; align-items: center; gap: 6px; }
.tools select, .tools input[type=search] { background: none; border: 0; border-bottom: 1px solid rgba(242, 235, 225, .3); border-radius: 0; padding: 3px 2px; color: var(--cream); font-size: 14px; color-scheme: dark; }
.tools select { max-width: 170px; cursor: pointer; }
.tools input[type=search] { width: 110px; }
.tools select:focus, .tools input[type=search]:focus { border-bottom-color: var(--yellow); outline: none; }
.tools .check-inline input { width: 14px; height: 14px; accent-color: var(--yellow); margin: 0; }
.linklike { background: none; border: 0; padding: 0; color: var(--cream); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.catalog .hint { margin-left: auto; margin-right: auto; text-align: center; }
.grid { margin-top: 36px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 24px; }
.card { display: flex; flex-direction: column; min-width: 0; }
.tile { position: relative; display: block; text-decoration: none; aspect-ratio: 1 / 1.04; background: var(--ink); border-radius: 18px; overflow: hidden; }
.tile .tag { position: absolute; z-index: 1; top: 12px; left: 12px; background: var(--yellow); color: var(--ink); font-size: 14px; font-weight: 500; padding: 4px 10px; border-radius: 8px; }
.card.on .tile { box-shadow: 0 0 0 3px var(--yellow); }
.card h3 { font-size: clamp(20px, 2vw, 28px); font-weight: 400; line-height: 1.15; margin-top: 16px; }
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.card .text { margin-top: 8px; font-size: 15px; line-height: 1.4; color: rgba(242, 235, 225, .82); }
.card .rot { margin-top: 8px; font-size: 13px; color: var(--yellow); }
.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card .price { font-size: 19px; font-weight: 500; font-variant-numeric: tabular-nums; }
.card .price small { font-weight: 400; font-size: 14px; opacity: .7; }
.whole { display: block; font-size: 13px; font-weight: 400; opacity: .6; margin-top: 2px; white-space: nowrap; }
.card .add { flex: none; border: 0; background: rgba(242, 235, 225, .14); color: var(--cream); border-radius: 8px; padding: 8px 14px; font-size: 15px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.card .add::before { content: '+ '; }
.card .add:hover { background: var(--cream); color: var(--ink); }
.card.on .add { background: var(--yellow); color: var(--ink); }
.card.on .add::before { content: '✓ '; }
.rotation, .d-rot { display: flex; gap: 12px; align-items: flex-start; margin: 26px auto 0; padding: 14px 18px; border-radius: 12px; background: var(--yellow); color: var(--ink); max-width: 980px; }
.rotation .linklike { color: inherit; font-weight: 500; }
.rot-ico { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--ink); color: var(--yellow); font-size: 18px; line-height: 1; }
.d-rot { max-width: 560px; font-size: 15px; margin-left: 0; }
.empty { grid-column: 1 / -1; color: rgba(242, 235, 225, .72); padding: 30px 0; text-align: center; }

/* ——— готовые наборы ——— */
.combo-lead { margin-top: 14px; max-width: 60ch; color: #3b3632; }
.combo-grid { margin-top: 30px; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.combo { background: var(--cream); border-radius: 22px; padding: 24px; display: flex; flex-direction: column; }
.combo h3 { font-size: 26px; font-weight: 400; text-transform: uppercase; letter-spacing: -.01em; }
.combo-place { color: var(--brown); font-size: 15px; margin-top: 2px; }
.combo-set { margin-top: 12px; font-weight: 500; }
.combo-set a { text-underline-offset: 4px; }
.combo-text { margin-top: 8px; font-size: 15px; color: #3b3632; }
.combo-price { margin-top: auto; padding-top: 16px; font-size: 21px; font-weight: 500; font-variant-numeric: tabular-nums; }
.combo-price small { font-size: 14px; font-weight: 400; color: var(--brown); }
.combo .pick { margin-top: 12px; border-radius: 12px; border: 0; background: var(--ink); color: var(--cream); padding: 12px; cursor: pointer; font-weight: 500; }
.combo .pick:hover { background: var(--orange); }

/* ——— тарифы ——— */
.paper-panel { background: var(--cream); border-radius: var(--r); padding: clamp(18px, 3vw, 40px); margin-top: 30px; }
.tariffs { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tariffs th { text-align: left; font-weight: 500; color: var(--brown); padding: 0 14px 12px 0; font-size: 15px; vertical-align: bottom; }
.tariffs td { padding: 14px 14px 14px 0; border-top: 1px solid #d9cfc4; vertical-align: top; }
.tariffs td:first-child { font-weight: 500; font-size: 20px; white-space: nowrap; }
.tariffs .money { font-size: 20px; white-space: nowrap; }
.tariffs small { display: block; color: var(--brown); font-size: 14px; }
.tariffs tr.sel td { background: #fff7e0; }
.tariffs tr.sel td:first-child { box-shadow: inset 4px 0 0 var(--orange); padding-left: 14px; }
.tariffs tbody tr { cursor: pointer; }
.terms-notes { margin: 26px 0 0; padding-left: 20px; max-width: 78ch; display: grid; gap: 8px; }

/* ——— заявка и квитанция ——— */
.order { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.seg { border: 0; padding: 0; margin: 26px 0 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.seg legend { padding: 0; margin-bottom: 8px; color: var(--mute); font-size: 15px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; background: rgba(242, 235, 225, .14); border-radius: 8px; padding: 8px 16px; font-weight: 500; font-size: 15px; }
.seg input:checked + span { background: var(--cream); color: var(--ink); }
.seg input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 3px; }
form { display: grid; gap: 16px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
form label { display: grid; gap: 6px; font-size: 15px; color: var(--mute); }
form label small { font-size: 13px; }
form input:not([type=checkbox]), form textarea {
  background: rgba(242, 235, 225, .08); border: 1.5px solid rgba(242, 235, 225, .28); border-radius: 12px;
  padding: 12px 14px; color: var(--cream); font-size: 17px; width: 100%; color-scheme: dark;
}
form input::placeholder, form textarea::placeholder { color: #7d7670; }
form input:not([type=checkbox]):focus, form textarea:focus { border-color: var(--yellow); outline: none; }
form .bad { border-color: var(--orange) !important; }
.check { display: flex !important; align-items: flex-start; gap: 10px; color: var(--cream); font-size: 16px; }
.check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--yellow); flex: none; }
.form-msg { min-height: 1.4em; color: var(--yellow); }
.form-msg:empty { display: none; }

.btn {
  display: inline-block; background: var(--orange); color: #fff; border: 0; border-radius: 12px;
  padding: 15px 34px; font-weight: 500; font-size: 18px; cursor: pointer; text-decoration: none; text-align: center;
}
.btn:hover { background: #e63f00; }

.receipt {
  position: sticky; top: calc(var(--top) + 16px);
  background: var(--cream); color: var(--ink); border-radius: 22px;
  padding: 26px 24px; font-variant-numeric: tabular-nums;
}
.receipt h3 { font-size: 15px; font-weight: 500; text-transform: none; color: var(--brown); }
.receipt .r-title { font-size: 26px; line-height: 1.1; text-transform: uppercase; letter-spacing: -.01em; margin: 4px 0 16px; }
.receipt .r-line { display: flex; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px dashed #b9ada1; }
.receipt .r-line span:last-child { white-space: nowrap; text-align: right; }
.receipt .r-line.sub { color: var(--brown); font-size: 15px; border-top: 0; padding-top: 0; }
.receipt .r-total { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 14px; font-weight: 500; }
.receipt .r-total b { font-size: 30px; font-weight: 500; letter-spacing: -.01em; white-space: nowrap; }
.receipt .r-note { font-size: 14px; color: var(--brown); margin-top: 12px; }
.receipt .r-empty { padding: 18px 0 6px; }
.receipt .r-empty a { font-weight: 500; }
.receipt .rm { background: none; border: 0; padding: 0 0 0 6px; cursor: pointer; color: var(--brown); font-size: 18px; line-height: 1; }

/* ——— требования, вопросы, подвал ——— */
.needs { margin-top: 36px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.needs > div { border-top: 2px solid var(--ink); padding-top: 16px; }
.faq { margin-top: 28px; max-width: 900px; }
.faq details { border-top: 1px solid rgba(242, 235, 225, .25); }
.faq details:last-child { border-bottom: 1px solid rgba(242, 235, 225, .25); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; font-size: clamp(19px, 2vw, 24px); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; position: absolute; right: 4px; top: 50%; translate: 0 -50%; width: 30px; height: 30px; border-radius: 50%; background: var(--cream); color: var(--ink); display: grid; place-items: center; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: '–'; background: var(--yellow); }
.faq details p { padding: 0 0 22px; max-width: 68ch; color: #d6cec5; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; padding-top: 48px; padding-bottom: 24px; }
.foot-brand { font-size: 28px; text-transform: uppercase; letter-spacing: -.01em; margin-bottom: 8px; }
.foot p { max-width: 46ch; }
.foot .tel { font-size: 22px; font-weight: 500; text-decoration: none; display: block; }

/* ——— кнопка встроена в нижнюю полосу рамки и видна всю прокрутку, как «Купить билет» у музея ——— */
.dock { position: fixed; left: 50%; bottom: 0; translate: -50% 0; z-index: 25; background: var(--ink); padding: 10px 10px calc(var(--gap) - 2px); border-radius: 20px 20px 0 0; }
.dock::before, .dock::after { content: ''; position: absolute; bottom: 0; width: var(--gap); height: var(--gap); }
.dock::before { left: calc(-1 * var(--gap)); background: radial-gradient(circle at 0 100%, transparent calc(var(--gap) - .5px), var(--ink) var(--gap)); }
.dock::after { right: calc(-1 * var(--gap)); background: radial-gradient(circle at 100% 100%, transparent calc(var(--gap) - .5px), var(--ink) var(--gap)); }
.dock .btn { min-width: 230px; white-space: nowrap; padding: 13px 30px; }

/* ——— страница «О проекте» ——— */
.about-hero { min-height: 0; padding-bottom: clamp(40px, 7vw, 90px); }
.about-hero h1 { font-size: clamp(44px, 9vw, 132px); }
.prose { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: clamp(20px, 5vw, 80px); align-items: start; }
.prose h2 { position: sticky; top: calc(var(--top) + 16px); }
.prose p { max-width: 64ch; margin-bottom: 16px; font-size: clamp(17px, 1.35vw, 20px); }
.prose p.big { font-size: clamp(22px, 2.3vw, 32px); line-height: 1.25; max-width: 30ch; margin-bottom: 26px; }
.timeline { list-style: none; padding: 0; margin: 8px 0 0; max-width: 64ch; }
.timeline li { display: grid; grid-template-columns: 92px 1fr; gap: 18px; padding: 16px 0; border-top: 1px solid currentColor; }
.timeline b { font-weight: 500; font-size: 22px; }
.screen .prose p { color: #e4dcd2; }
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; max-width: 64ch; }
.principles h3 { margin-bottom: 6px; font-size: 22px; }
@media (max-width: 900px) { .prose { grid-template-columns: 1fr; } .prose h2 { position: static; } }

/* ——— фотографии автоматов: все на одной чёрной плитке ——— */
.ph { display: grid; place-items: center; width: 100%; height: 100%; }
.ph img, .ph .noph { grid-area: 1 / 1; }
.ph img { width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; padding: 46px 18px 0; }
.ph.sov img { object-fit: cover; object-position: 50% 50%; padding: 0; }
/* пинболы, снятые передом вправо, разворачиваем: все автоматы смотрят в одну сторону */
.ph.flip img, .d-stage img.flip { transform: scaleX(-1); }
.noph { display: none; color: var(--mute); font-size: 14px; }
.noph.show { display: block; }
.ph.nophoto img { display: none; }
.ph.nophoto .noph { display: block; }

/* ——— карточка автомата ——— */
body.is-detail .home, body.is-detail .hero { display: none; }
.detail .back { display: inline-block; margin-bottom: 22px; color: var(--cream); background: rgba(242, 235, 225, .14); border-radius: 8px; padding: 8px 16px; text-decoration: none; font-weight: 500; font-size: 15px; }
.detail .back:hover { background: var(--cream); color: var(--ink); }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.d-stage { background: #0f1010; border-radius: 22px; height: min(70vh, 640px); display: grid; place-items: center; padding: 28px; overflow: hidden; }
.d-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; }
.d-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { width: 76px; height: 76px; padding: 6px; border-radius: 12px; border: 2px solid transparent; background: var(--card); cursor: pointer; overflow: hidden; display: grid; place-items: center; }
.thumb.on { border-color: var(--yellow); }
.thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.d-type { display: inline-block; background: var(--yellow); color: var(--ink); font-weight: 500; padding: 4px 12px; border-radius: 8px; margin-bottom: 16px; }
.d-meta { color: var(--mute); margin-top: 8px; font-size: 19px; }
.d-text { margin-top: 16px; max-width: 62ch; }
.facts { margin: 24px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.facts div { border-top: 1px solid rgba(242, 235, 225, .3); padding-top: 10px; }
.facts dt { color: var(--mute); font-size: 14px; }
.facts dd { margin: 2px 0 0; font-size: 18px; }
.d-audio { margin-top: 24px; }
.d-audio p { color: var(--mute); font-size: 15px; margin-bottom: 6px; }
.d-audio audio { width: 100%; max-width: 460px; height: 40px; }
.d-video { margin-top: 20px; }
.d-video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 14px; background: #000; }
.play { background: none; border: 1.5px solid var(--cream); color: var(--cream); border-radius: 12px; padding: 12px 20px; cursor: pointer; font-weight: 500; }
.play:hover { background: var(--cream); color: var(--ink); }
.ladder { width: 100%; max-width: 560px; margin-top: 28px; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.ladder caption { text-align: left; color: var(--mute); font-size: 15px; padding-bottom: 8px; }
.ladder th { text-align: left; font-weight: 500; }
.ladder th, .ladder td { padding: 11px 12px 11px 0; border-top: 1px solid rgba(242, 235, 225, .2); }
.ladder td:nth-child(2) { font-size: 20px; white-space: nowrap; }
.ladder td:last-child { color: var(--mute); font-size: 14px; }
.ladder small { font-size: 14px; color: var(--mute); }
.ladder tr { cursor: pointer; }
.ladder tr.sel th { box-shadow: inset 4px 0 0 var(--orange); padding-left: 12px; }
.ladder tr.sel td:nth-child(2) { color: var(--yellow); }
.d-request { margin-top: 24px; }
.d-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 28px; }
.ghost { color: var(--cream); text-underline-offset: 5px; }
@media (max-width: 980px) {
  .d-grid { grid-template-columns: 1fr; }
  .d-stage { height: 52vh; }
}

.burger { display: none; }
.more { grid-column: 1 / -1; margin-top: 6px; border: 1.5px solid var(--cream); background: none; color: var(--cream); border-radius: 12px; padding: 14px; font-weight: 500; cursor: pointer; }
@media (max-width: 980px) {
  .steps, .needs { grid-template-columns: repeat(2, 1fr); }
  .order { grid-template-columns: 1fr; }
  .receipt { position: relative; top: 0; order: -1; }
  /* рамка тонкая; города — выступающая вкладка слева, меню — жёлтая кнопка справа */
  :root { --top: var(--gap); --r: 20px; }
  html { scroll-padding-top: 76px; }
  .hero { --R: 80vw; --arc-top: 56px; }
  .hero-body { padding-top: 104px; }
  .topbar { height: 0; padding: 0; }
  .tb-city { position: fixed; top: 0; left: calc(var(--gap) + var(--r)); background: var(--stone); padding: calc(var(--gap) + 4px) 12px 8px 6px; border-radius: 0 0 16px 16px; }
  .tb-city::before, .tb-city::after { content: ''; position: absolute; top: var(--gap); width: 12px; height: 12px; }
  .tb-city::before { left: -12px; background: radial-gradient(circle at 0 100%, transparent 11.5px, var(--stone) 12px); }
  .tb-city::after { right: -12px; background: radial-gradient(circle at 100% 100%, transparent 11.5px, var(--stone) 12px); }
  .burger {
    position: fixed; top: calc(var(--gap) + 10px); right: calc(var(--gap) + 10px); z-index: 22;
    display: grid; align-content: center; justify-items: center; gap: 6px;
    width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
    background: var(--yellow); color: var(--ink);
  }
  .burger span { display: block; width: 18px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform .2s; }
  body.menu-open .burger span:nth-child(1) { transform: translateY(4.25px) rotate(45deg); }
  body.menu-open .burger span:nth-child(2) { transform: translateY(-4.25px) rotate(-45deg); }
  .menu {
    display: none; position: fixed; top: calc(var(--gap) + 62px); right: calc(var(--gap) + 10px); z-index: 21;
    flex-direction: column; gap: 0; min-width: 230px; padding: 8px; border-radius: 16px;
    background: var(--stone); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); font-size: 18px;
  }
  body.menu-open .menu { display: flex; }
  .menu a { padding: 12px 14px; border-radius: 10px; }
  .menu a:active { background: var(--cream); }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gap: 10px; }
  body { font-size: 16px; }
  .hero { --R: 105vw; --arc-top: 84px; }
  .hero-body { padding-top: 112px; }
  h1 { font-size: 13.4vw; }
  .screen { padding: 22px 16px; }
  .steps, .needs, .row2 { grid-template-columns: 1fr; }
  .steps { gap: 22px; margin-top: 26px; }
  .steps .num { margin-bottom: 8px; }

  /* фильтры каталога: фишки переносятся, остальное — сеткой в две колонки */
  .chips { gap: 6px; }
  .chip { white-space: nowrap; padding: 7px 12px; }
  .term-pick { flex-direction: column; gap: 8px; }
  .term-pick-l { font-size: 14px; }
  .tools { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; width: 100%; text-align: left; }
  .tools label { display: grid; gap: 2px; min-width: 0; }
  .tools select, .tools input[type=search] { width: 100%; max-width: none; font-size: 16px; padding: 6px 2px; }
  .tools .check-inline { display: flex; gap: 8px; grid-column: 1 / -1; font-size: 15px; }
  .tools .check-inline input { width: 18px; height: 18px; }
  .tools .found { align-self: end; padding-bottom: 6px; }
  #catalog .hint { font-size: 14px; }

  .grid { gap: 26px 10px; margin-top: 24px; }
  .tile { border-radius: 14px; }
  .tile .tag { top: 8px; left: 8px; font-size: 12px; padding: 3px 8px; border-radius: 6px; }
  .ph img { padding: 34px 8px 0; }
  .card h3 { font-size: 17px; margin-top: 10px; overflow-wrap: anywhere; }
  .card .text { font-size: 13px; margin-top: 6px; }
  .card .price { font-size: 17px; white-space: nowrap; }
  .card .price small { font-size: 12px; }
  .whole { font-size: 12px; white-space: normal; }
  .card-foot { flex-direction: column; align-items: stretch; gap: 8px; padding-top: 8px; }
  .card .add { padding: 9px 10px; }

  .combo-grid { grid-template-columns: 1fr; margin-top: 20px; }

  .paper-panel { padding: 6px 16px 18px; margin-top: 20px; }
  .tariffs thead { display: none; }
  .tariffs tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 12px 0; border-top: 1px solid #d9cfc4; }
  .tariffs tr:first-child { border-top: 0; }
  .tariffs td { border: 0; padding: 3px 0; }
  .tariffs td:first-child { grid-column: 1 / -1; }
  .tariffs td[data-l]::before { content: attr(data-l); display: block; font-size: 13px; color: var(--brown); }
  .tariffs td.wide { grid-column: 1 / -1; font-size: 14px; color: var(--brown); }
  .tariffs td.none { display: none; }
  .tariffs td[data-l^="Смена"] { grid-column: 1 / -1; }
  .tariffs tr.sel { background: #fff7e0; box-shadow: inset 4px 0 0 var(--orange); margin: 0 -16px; padding: 12px 16px; }
  .tariffs tr.sel td { background: none; }
  .tariffs tr.sel td:first-child { box-shadow: none; padding-left: 0; }
  .terms-notes { font-size: 15px; }

  .receipt { padding: 20px 18px; }
  .receipt .r-title { font-size: 22px; }
  .receipt .r-total b { font-size: 26px; }
  .faq summary { padding: 16px 44px 16px 0; }
  .foot { padding-top: 32px; }
  .dock { padding: 8px 8px calc(var(--gap) + env(safe-area-inset-bottom)); }
  .dock .btn { min-width: 200px; padding: 12px 24px; font-size: 17px; }

  .d-stage { height: 44vh; padding: 14px; }
  .thumb { width: 60px; height: 60px; }
  .ladder tr { display: grid; grid-template-columns: 96px 1fr; }
  .ladder td:last-child { grid-column: 2; border-top: 0; padding-top: 0; }
  .ladder td:last-child:empty { display: none; }
  .rotation { padding: 12px 14px; font-size: 15px; margin-top: 18px; }
  .card .rot { font-size: 12px; }
  .timeline li { grid-template-columns: 64px 1fr; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* скрытое остаётся скрытым, какие бы правила отображения ни стояли выше */
[hidden] { display: none !important; }
