/* Общая основа демо для Биомузея: шрифты, сброс, кнопки, шапка,
   шторка результата. Цвета у каждого демо свои: демо переопределяет
   токены на :root в своём style.css. Колонка до 520 px, на десктопе по
   центру, фон на весь экран. */

@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/golos-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text"; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url(/fonts/golos-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2122;
}
@font-face {
  font-family: "Piazzolla"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/fonts/piazzolla-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Piazzolla"; font-style: normal; font-weight: 300 900; font-display: swap;
  src: url(/fonts/piazzolla-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F, U+2122;
}

:root {
  --bg: #f4efe4;
  --bg-2: #fffaf0;
  --ink: #23201b;
  --ink-2: #5d564b;
  --ink-3: #8d8576;
  --line: rgba(35, 32, 27, .12);
  --accent: #2f7d5b;
  --accent-ink: #fff;
  --ok: #2f9e62;
  --no: #d0493b;
  --gold: #c99a2e;
  --card: #fffaf0;
  --shadow: 0 18px 40px -18px rgba(40, 30, 10, .35);
  --sans: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --serif: "Piazzolla", Georgia, "Times New Roman", serif;
  --r: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; font: 16px/1.5 var(--sans); color: var(--ink); background: var(--bg); overflow-x: hidden; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img { display: block; max-width: 100%; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; }
p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.app { max-width: 520px; margin: 0 auto; padding: calc(10px + var(--sat)) 16px calc(28px + var(--sab)); min-height: 100vh; display: flex; flex-direction: column; gap: 16px; }

/* шапка: демо для какого музея и путь назад к списку демо */
.top { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); min-height: 36px; }
.top__mark { width: 26px; height: 26px; border-radius: 8px; background: var(--accent); flex: none; display: grid; place-items: center; color: var(--accent-ink); }
.top__mark svg { width: 16px; height: 16px; }
.top__name { font-weight: 600; line-height: 1.2; }
.top__name small { display: block; font-weight: 400; color: var(--ink-3); }
.top__right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.top__link { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px 22px; border-radius: 16px; font-weight: 700; font-size: 17px; background: var(--accent); color: var(--accent-ink); text-decoration: none; transition: transform .15s var(--ease), filter .15s; box-shadow: 0 10px 24px -12px var(--accent); }
.btn:active { transform: scale(.97); }
.btn--ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn--soft { background: var(--bg-2); color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.btn--block { width: 100%; }
.btn svg { width: 20px; height: 20px; }
.btn[disabled] { opacity: .45; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.eyebrow { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.lead { color: var(--ink-2); }
.note { font-size: 13px; color: var(--ink-3); }

.field { display: grid; gap: 6px; }
.field span { font-size: 13px; color: var(--ink-2); }
.field input { font: inherit; font-size: 17px; padding: 13px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg-2); color: var(--ink); width: 100%; }

/* шторка: результат, подсказка, приз */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(12, 10, 6, .5); animation: fade .2s var(--ease); }
.sheet__in { width: 100%; max-width: 520px; max-height: 92vh; overflow: auto; background: var(--bg-2); color: var(--ink); border-radius: 24px 24px 0 0; padding: 22px 18px calc(22px + var(--sab)); display: grid; gap: 14px; animation: rise .32s var(--ease); }
@media (min-width: 560px) { .sheet { align-items: center; } .sheet__in { border-radius: 24px; } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }

.toast { position: fixed; left: 50%; bottom: calc(24px + var(--sab)); transform: translateX(-50%); z-index: 60; background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; animation: rise .25s var(--ease); max-width: calc(100vw - 32px); }

.demo-note { font-size: 12px; color: var(--ink-3); text-align: center; margin-top: auto; padding-top: 10px; }
.demo-note a { color: inherit; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
