/* ============================================================
   Wishlist by iburimskiy — боевые стили фронтенда.
   Перенесены из design/design.html (согласованная витрина):
   токены 4 шаблонов, типографика, радиусы 20/14/пилюли, 2px-рамки.
   ============================================================ */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------- шрифтовые роли (без внешних шрифтов) ---------- */
:root {
  --font-display: ui-rounded, -apple-system, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  --font-body: -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

/* ============================================================
   ПАЛИТРЫ 4 ШАБЛОНОВ (тема на <body data-theme="...">)
   Праздник — по умолчанию (до применения темы).
   ============================================================ */
body,
body[data-theme="holiday"] {
  --bg: #FFF1E1; --surface: #FFFBF5; --line: #F2D8BD;
  --ink: #4B2E26; --muted: #9A7565;
  --accent: #F0614F; --accent-ink: #FFFFFF; --accent-strong: #D94C3B;
  --soft: #FBDCCB; --soft2: #FBE9C6;
  --pop: #F6A643; --pop2: #43A88D;
  --st-free-bg: #DFF2E5; --st-free-ink: #1E7A50;
  --st-taken-bg: #F2E4D6; --st-taken-ink: #8F7362;
  --st-mine-bg: #FBDCCB; --st-mine-ink: #C24630;
  --err: #C43A28;
}
body[data-theme="clouds"] {
  --bg: #E4F1FC; --surface: #FFFFFF; --line: #C9E2F5;
  --ink: #223A54; --muted: #66809C;
  --accent: #3D8BDD; --accent-ink: #FFFFFF; --accent-strong: #2E76C4;
  --soft: #D7EAFB; --soft2: #FFE9B8;
  --pop: #FFCF5C; --pop2: #F191B2;
  --st-free-bg: #DCF2E4; --st-free-ink: #1B7A52;
  --st-taken-bg: #E5EBF2; --st-taken-ink: #66809C;
  --st-mine-bg: #D7EAFB; --st-mine-ink: #2264AE;
  --err: #C43A28;
}
body[data-theme="forest"] {
  --bg: #EFEADB; --surface: #FAF7EC; --line: #DBD2B6;
  --ink: #35402B; --muted: #7C8065;
  --accent: #5E8253; --accent-ink: #FFFFFF; --accent-strong: #4C6E43;
  --soft: #DCE7D0; --soft2: #F1E3C8;
  --pop: #D07A45; --pop2: #C9A356;
  --st-free-bg: #D9E8D2; --st-free-ink: #3E6636;
  --st-taken-bg: #E7E0CB; --st-taken-ink: #7C8065;
  --st-mine-bg: #F3E0C8; --st-mine-ink: #A25A28;
  --err: #B23C24;
}
body[data-theme="night"] {
  --bg: #20244C; --surface: #2B3060; --line: #3E4480;
  --ink: #EEEFFF; --muted: #A5A9D8;
  --accent: #FFD45E; --accent-ink: #2A2140; --accent-strong: #F5C43F;
  --soft: #3C4178; --soft2: #46418A;
  --pop: #8F86E8; --pop2: #F08FB4;
  --st-free-bg: #27514A; --st-free-ink: #8CE2BA;
  --st-taken-bg: #363B6E; --st-taken-ink: #A5A9D8;
  --st-mine-bg: #4C4230; --st-mine-ink: #FFD45E;
  --err: #FF9C86;
}

/* Локальные палитры для статичных мини-превью шаблонов */
.pal-holiday { --bg:#FFF1E1; --surface:#FFFBF5; --line:#F2D8BD; --ink:#4B2E26; --muted:#9A7565; --accent:#F0614F; --accent-ink:#fff; --soft:#FBDCCB; --soft2:#FBE9C6; --pop:#F6A643; --pop2:#43A88D; }
.pal-clouds  { --bg:#E4F1FC; --surface:#FFFFFF; --line:#C9E2F5; --ink:#223A54; --muted:#66809C; --accent:#3D8BDD; --accent-ink:#fff; --soft:#D7EAFB; --soft2:#FFE9B8; --pop:#FFCF5C; --pop2:#F191B2; }
.pal-forest  { --bg:#EFEADB; --surface:#FAF7EC; --line:#DBD2B6; --ink:#35402B; --muted:#7C8065; --accent:#5E8253; --accent-ink:#fff; --soft:#DCE7D0; --soft2:#F1E3C8; --pop:#D07A45; --pop2:#C9A356; }
.pal-night   { --bg:#20244C; --surface:#2B3060; --line:#3E4480; --ink:#EEEFFF; --muted:#A5A9D8; --accent:#FFD45E; --accent-ink:#2A2140; --soft:#3C4178; --soft2:#46418A; --pop:#8F86E8; --pop2:#F08FB4; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* Плавная перекраска при смене шаблона */
body, .themed, .themed * { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
.themed svg * { transition: fill .25s ease, stroke .25s ease; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================================================
   ЛОГОТИП
   ============================================================ */
.logo-lockup { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-lockup .lg-mark { flex: none; }
.lg-word {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  line-height: 1; color: var(--ink);
}
.lg-by {
  font-family: var(--font-mono); color: var(--muted); letter-spacing: .02em;
  line-height: 1.2; margin-top: 1px; display: block;
}
.logo-lockup.size-header { gap: 10px; }
.logo-lockup.size-header .lg-mark { width: 34px; }
.logo-lockup.size-header .lg-word { font-size: 21px; }
.logo-lockup.size-header .lg-by { font-size: 9px; }

/* ============================================================
   КНОПКИ
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  border-radius: 999px; padding: 11px 22px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1.2; white-space: nowrap;
  background: none;
}
.btn:focus-visible, .tpl:focus-visible, .modal-close:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 2px;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { font-size: 17px; padding: 14px 30px; }
.btn-sm { font-size: 13px; padding: 8px 16px; }
.btn[disabled] { background: var(--st-taken-bg); color: var(--st-taken-ink); cursor: default; border-color: transparent; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; border-color: var(--line); color: var(--err); }
.btn-danger:hover { border-color: var(--err); }
.btn.is-busy { opacity: .6; pointer-events: none; }

/* ============================================================
   ШАПКА СТРАНИЦЫ
   ============================================================ */
.topbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 24px; max-width: 1100px; margin: 0 auto;
}
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ============================================================
   ГЛАВНАЯ: герой + шаги
   ============================================================ */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 24px 110px; text-align: center;
}
.hero-inner { position: relative; z-index: 2; max-width: 620px; margin: 0 auto; }
.hero h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(30px, 5.4vw, 52px); line-height: 1.1;
}
.uline { position: relative; white-space: nowrap; }
.uline svg {
  position: absolute; left: -2%; bottom: -.22em; width: 104%; height: .32em;
  overflow: visible;
}
.hero-sub { color: var(--muted); font-size: clamp(15px, 2vw, 18px); margin: 16px auto 28px; max-width: 520px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.steps {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  padding: 0 24px 48px; max-width: 860px; margin: 0 auto;
}
.step {
  background: var(--surface); border: 2px solid var(--line); border-radius: 20px;
  padding: 16px; text-align: left; display: flex; gap: 12px; align-items: flex-start;
}
.step-num {
  flex: none; width: 30px; height: 30px; border-radius: 10px;
  background: var(--soft); color: var(--ink);
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  display: grid; place-items: center;
}
.step b { font-family: var(--font-display); font-weight: 700; display: block; font-size: 15px; }
.step span { color: var(--muted); font-size: 13px; }

/* --- декоративные слои по темам --- */
.layer { display: none; position: absolute; inset: 0; pointer-events: none; z-index: 1; }
body[data-theme="holiday"] .layer.holiday,
body[data-theme="clouds"]  .layer.clouds,
body[data-theme="forest"]  .layer.forest,
body[data-theme="night"]   .layer.night { display: block; }
.swap { display: none; }
body[data-theme="holiday"] .swap.holiday,
body[data-theme="clouds"]  .swap.clouds,
body[data-theme="forest"]  .swap.forest,
body[data-theme="night"]   .swap.night { display: contents; }
.layer svg { position: absolute; }

/* ============================================================
   ФОРМЫ (панель, поля, код)
   ============================================================ */
.form-stage { padding: 8px 24px 56px; position: relative; z-index: 2; }
.panel {
  max-width: 620px; margin: 0 auto; background: var(--surface);
  border: 2px solid var(--line); border-radius: 24px; padding: 28px;
}
.panel-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.015em;
  font-size: 24px;
}
.panel-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.field { margin-top: 18px; }
.field > label, .field > .field-label {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: 14px; margin-bottom: 6px;
}
.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; font-family: var(--font-body); }
.input, .textarea {
  width: 100%; background: var(--bg); border: 2px solid var(--line);
  border-radius: 14px; padding: 11px 14px; font-size: 16px; color: var(--ink);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.textarea { resize: none; min-height: 76px; }
.form-actions { margin-top: 26px; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.form-actions .aside { color: var(--muted); font-size: 13px; }
.form-error { color: var(--err); font-size: 14px; margin-top: 12px; font-weight: 600; }
.form-error:empty { display: none; }
.field-note { color: var(--muted); font-size: 12.5px; margin-top: 6px; }

/* мини-выбор шаблона */
.tpl-mini-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.tpl {
  border: 2px solid var(--line); background: var(--surface);
  border-radius: 14px; overflow: hidden; cursor: pointer; padding: 0; position: relative;
}
.tpl .m-sky {
  height: 52px; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
}
.tpl .m-name {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 12px;
  color: var(--ink); padding: 6px 4px 7px; text-align: center;
  border-top: 2px solid var(--line); background: var(--surface);
}
.tpl.is-active { border-color: var(--accent); }
.tpl.is-active::after {
  content: "✓"; position: absolute; top: 5px; right: 5px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink);
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
}

/* 6-значный код: видимые ячейки + прозрачный настоящий input */
.code-box { position: relative; display: inline-flex; }
.code-row { display: flex; gap: 8px; }
.code-cell {
  width: 46px; height: 54px; background: var(--bg);
  border: 2px solid var(--line); border-radius: 12px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-size: 22px; font-weight: 700;
}
.code-cell.is-focus { border-color: var(--accent); background: var(--surface); }
.code-box input {
  position: absolute; inset: 0; width: 100%; height: 100%;
  opacity: 0; font-size: 16px; cursor: pointer; border: 0;
}

/* стоимость и валюта */
.price-row { display: flex; gap: 10px; }
.price-row .input { flex: 1; min-width: 0; }
.seg { display: inline-flex; border: 2px solid var(--line); border-radius: 12px; overflow: hidden; flex: none; }
.seg button {
  border: none; background: var(--surface); padding: 10px 16px;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
  cursor: pointer; color: var(--muted);
}
.seg button + button { border-left: 2px solid var(--line); }
.seg button.is-active { background: var(--accent); color: var(--accent-ink); }

/* загрузка картинки */
.drop {
  border: 2px dashed var(--line); border-radius: 16px; background: var(--bg);
  padding: 20px; text-align: center; color: var(--muted); font-size: 13px;
  cursor: pointer; position: relative;
}
.drop:hover, .drop.is-over { border-color: var(--accent); }
.drop svg { width: 40px; height: auto; margin: 0 auto 8px; }
.drop b { color: var(--ink); font-weight: 600; display: block; font-size: 14px; }
.drop input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.drop-preview { display: flex; align-items: center; gap: 12px; margin-top: 10px; text-align: left; }
.drop-preview img {
  width: 72px; height: 54px; object-fit: cover; border-radius: 10px;
  border: 2px solid var(--line); background: var(--soft);
}
.drop-preview .dp-meta { flex: 1; min-width: 0; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.drop-status { font-size: 12.5px; margin-top: 8px; color: var(--muted); }
.drop-status.is-err { color: var(--err); font-weight: 600; }

/* черновики подарков на форме создания */
.draft-list { display: flex; flex-direction: column; gap: 8px; }
.draft {
  display: flex; align-items: center; gap: 12px;
  border: 2px solid var(--line); border-radius: 14px; padding: 8px 10px;
  background: var(--bg);
}
.draft .d-thumb {
  flex: none; width: 52px; height: 40px; border-radius: 10px; overflow: hidden;
  background: var(--soft); display: flex; align-items: center; justify-content: center; position: relative;
}
.draft .d-thumb img { width: 100%; height: 100%; object-fit: cover; }
.draft .d-thumb svg { width: 60%; height: auto; }
.draft .d-name { flex: 1; min-width: 0; font-family: var(--font-display); font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft .d-price { font-family: var(--font-mono); font-size: 13px; color: var(--muted); white-space: nowrap; }
.draft .d-del {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--line); background: var(--surface); color: var(--muted);
  font-size: 13px; line-height: 1; cursor: pointer;
}
.draft .d-del:hover { color: var(--err); border-color: var(--err); }

/* ============================================================
   СТРАНИЦА ВИШЛИСТА
   ============================================================ */
.wl-stage { padding-bottom: 56px; }
.wl-head { position: relative; overflow: hidden; text-align: center; padding: 16px 24px 34px; }
.wl-head-inner { position: relative; z-index: 2; max-width: 560px; margin: 0 auto; }
.wl-title {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(24px, 4vw, 36px); margin-top: 20px; overflow-wrap: break-word;
}
.wl-desc { color: var(--muted); margin-top: 8px; font-size: 15px; overflow-wrap: break-word; }
.wl-meta { margin-top: 12px; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.gift-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 16px; padding: 0 24px; max-width: 1020px; margin: 0 auto;
}
.gift {
  background: var(--surface); border: 2px solid var(--line); border-radius: 20px;
  overflow: hidden; display: flex; flex-direction: column;
}
.gift-img { position: relative; aspect-ratio: 4 / 3; background: var(--soft); overflow: hidden; }
.gift-img.alt { background: var(--soft2); }
.gift-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gift-img .ph-art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.gift-img .ph-art svg { width: 46%; height: auto; max-height: 72%; }
.gift.is-taken .gift-img { opacity: .68; }
.chip {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-family: var(--font-display); font-weight: 700; font-size: 12px;
  border-radius: 999px; padding: 4px 11px;
}
.chip-free  { background: var(--st-free-bg);  color: var(--st-free-ink); }
.chip-taken { background: var(--st-taken-bg); color: var(--st-taken-ink); }
.chip-mine  { background: var(--st-mine-bg);  color: var(--st-mine-ink); }
.gift-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.gift-name { font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 1.25; overflow-wrap: break-word; }
.gift-desc { color: var(--muted); font-size: 13px; overflow-wrap: break-word; }
.gift-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 10px; }
.price { font-family: var(--font-mono); font-weight: 700; font-size: 15px; }
.buy-link {
  font-size: 13px; font-weight: 600; color: var(--accent);
  text-decoration: none; border-bottom: 2px solid var(--soft); padding-bottom: 1px;
}
body[data-theme="night"] .buy-link { border-bottom-color: var(--line); }
.buy-link:hover { border-bottom-color: var(--accent); }
.gift .btn { margin-top: 10px; }
.gift-admin { display: flex; gap: 8px; margin-top: 10px; }
.gift-admin .btn { margin-top: 0; flex: 1; }

/* плитка «добавить подарок» в режиме редактирования */
.add-tile {
  border: 2px dashed var(--line); border-radius: 20px; min-height: 240px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--muted); cursor: pointer;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.add-tile:hover { border-color: var(--accent); color: var(--accent); }
.add-tile .plus {
  width: 44px; height: 44px; border-radius: 50%; background: var(--soft);
  color: var(--ink); font-size: 26px; font-weight: 700; display: grid; place-items: center;
}

/* пустой список */
.empty {
  grid-column: 1 / -1; text-align: center; color: var(--muted);
  background: var(--surface); border: 2px dashed var(--line); border-radius: 20px;
  padding: 40px 24px; font-size: 15px;
}
.empty b { font-family: var(--font-display); color: var(--ink); display: block; font-size: 18px; margin-bottom: 4px; }

/* панель режима редактирования */
.edit-wrap { max-width: 1020px; margin: 0 auto 20px; padding: 0 24px; position: relative; z-index: 5; }
.edit-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--soft); border-radius: 999px; padding: 8px 10px 8px 18px;
}
.edit-bar .eb-label {
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  display: inline-flex; align-items: center; gap: 8px;
}
.edit-bar .eb-label::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.edit-bar .btn-ghost { background: var(--surface); }

/* ============================================================
   МОДАЛКИ
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(24, 21, 40, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.modal {
  position: relative; width: 100%; max-width: 400px; margin: auto;
  background: var(--surface); border: 2px solid var(--line); border-radius: 24px;
  padding: 26px; text-align: center;
}
.modal-form { max-width: 500px; text-align: left; }
.modal-art { display: flex; justify-content: center; margin-bottom: 14px; }
.modal-art svg { width: 84px; height: auto; max-height: 90px; }
.modal h3 { font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.01em; }
.modal p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.modal-close {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; z-index: 2;
}
.modal-close:hover { color: var(--ink); border-color: var(--accent); }

.share-link-row { display: flex; gap: 8px; margin-top: 16px; }
.share-link {
  flex: 1; min-width: 0; background: var(--bg); border: 2px solid var(--line);
  border-radius: 12px; padding: 10px 12px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
.qr-tile {
  margin: 18px auto 0; width: 168px; padding: 12px;
  background: #FFFFFF; border: 2px solid var(--line); border-radius: 16px;
}
body[data-theme="night"] .qr-tile { border-color: var(--soft2); }
.qr-tile img { width: 100%; height: auto; image-rendering: pixelated; }
.qr-cap { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ============================================================
   СОСТОЯНИЯ: загрузка, 404, тост
   ============================================================ */
.state-block { text-align: center; padding: 80px 24px; position: relative; z-index: 2; }
.state-block h1 {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -.02em;
  font-size: clamp(24px, 4vw, 34px);
}
.state-block p { color: var(--muted); margin-top: 8px; }
.state-block .btn { margin-top: 20px; }
.state-art { display: flex; justify-content: center; margin-bottom: 18px; }
.state-art svg { width: 96px; height: auto; }

.spinner {
  width: 34px; height: 34px; margin: 0 auto 14px;
  border-radius: 50%; border: 4px solid var(--soft); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(8px);
  z-index: 200; background: var(--ink); color: var(--bg);
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  border-radius: 999px; padding: 10px 20px; max-width: min(90vw, 480px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-show { opacity: 1; transform: translateX(-50%) translateY(0); }

.page-footer {
  text-align: center; padding: 24px; color: var(--muted);
  font-family: var(--font-mono); font-size: 12px; position: relative; z-index: 2;
}

/* ============================================================
   АДАПТИВ (от 375px)
   ============================================================ */
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; max-width: 420px; }
  .hero { padding: 56px 20px 96px; }
}
@media (max-width: 460px) {
  .tpl-mini-row { grid-template-columns: repeat(2, 1fr); }
  .code-row { gap: 6px; }
  .code-cell { width: 40px; height: 48px; font-size: 18px; }
  .panel { padding: 20px; }
  .modal { padding: 20px; }
  .layer .side-el { display: none; }
  .topbar { padding: 12px 16px; }
  .form-stage { padding-left: 16px; padding-right: 16px; }
  .gift-grid { padding: 0 16px; grid-template-columns: 1fr 1fr; }
  .edit-wrap { padding: 0 16px; }
  .gift-admin { flex-direction: column; }
}
@media (max-width: 400px) {
  .gift-grid { grid-template-columns: 1fr; }
}
