/* Страницы сайта без Telegram: «Сделать модель» (/make) и страница модели (/m/…). Цвета — как на лендинге. */
:root {
  --teal: #1D4E58; --teal-deep: #163E46; --amber: #E8A33A; --amber-hi: #F2BD66;
  --cream: #F6F1E9; --sand: #E9DCC8; --ink: #1F2A2E; --muted: #5C6B70; --line: #E3DACB; --err: #B3261E;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--cream); color: var(--ink); min-height: 100vh;
  font: 16px/1.5 "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: var(--teal); }
[hidden] { display: none !important; }

.bar { background: var(--teal); color: #F4F7F7; }
.bar-in { max-width: 640px; margin: 0 auto; padding: 14px 18px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; text-decoration: none; color: inherit; }
.logo-mark { width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.1); display: grid; place-items: center; }
.bar .who { font-size: 13px; color: #C9DADC; text-align: right; }
.bar .who a, .bar .link { color: #F4F7F7; }

/* снизу запас: в Safari на iPhone панель адреса висит поверх страницы и закрывала последнюю кнопку */
main { max-width: 640px; margin: 0 auto; padding: 24px 18px calc(96px + env(safe-area-inset-bottom)); }
h1 { font-size: clamp(25px, 6vw, 32px); line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 20px; margin: 32px 0 12px; }
.hint { color: var(--muted); margin: 0 0 20px; }
.small { color: var(--muted); font-size: 14px; }

.card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
label { display: block; font-weight: 700; font-size: 14px; margin: 0 0 6px; }
input[type=email], input[type=text], input[inputmode=numeric] { width: 100%; font: inherit; font-size: 17px;
  padding: 13px 14px; border: 1px solid #D9CFBF; border-radius: 12px; background: #fff; color: var(--ink); }
input:focus { outline: 2px solid var(--teal); outline-offset: 0; border-color: transparent; }
#code { letter-spacing: .3em; font-size: 22px; font-weight: 700; text-align: center; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; color: var(--muted);
  margin: 16px 0 0; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--teal); }

.btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; margin-top: 18px;
  border: 0; border-radius: 14px; padding: 15px 20px; font: inherit; font-size: 17px; font-weight: 700;
  background: var(--amber); color: #2A1E08; cursor: pointer; text-decoration: none; transition: background .15s; }
.btn:hover { background: var(--amber-hi); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-2 { background: #fff; color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); margin-top: 10px; }
.btn-2:hover { background: #F0F5F5; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--teal); text-decoration: underline; cursor: pointer; }
.link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.row { display: flex; justify-content: space-between; gap: 12px; margin-top: 14px; font-size: 14px; }
.error { color: var(--err); font-size: 14px; margin: 12px 0 0; min-height: 1em; }
.error:empty { display: none; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin: 0;
  min-height: 190px; border: 2px dashed #CDBFA8; border-radius: 16px; background: var(--cream); cursor: pointer;
  text-align: center; padding: 16px; font-weight: 500; }
.drop:hover { border-color: var(--teal); }
.drop b { font-size: 18px; color: var(--teal); }
.drop small { color: var(--muted); font-size: 13px; }
.drop svg { width: 34px; height: 34px; color: var(--teal); }
.drop img { max-width: 100%; max-height: 300px; border-radius: 12px; }

.tips { margin: 20px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.tips li { display: flex; gap: 10px; }
.tips li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; margin-top: 8px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.list a { display: flex; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 16px; text-decoration: none; color: var(--ink); font-weight: 700; }
.list span { color: var(--muted); font-weight: 500; font-size: 14px; text-align: right; }

/* страница модели */
.status { display: flex; gap: 14px; align-items: flex-start; }
.spin { width: 26px; height: 26px; flex: none; margin-top: 6px; border-radius: 50%; border: 3px solid var(--sand);
  border-top-color: var(--teal); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pics { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; align-items: end; margin: 4px 0 6px; }
.pics figure { margin: 0; }
.pics img { width: 100%; border-radius: 14px; background: #fff; display: block; }
.pics figcaption { color: var(--muted); font-size: 13px; margin-top: 6px; }
.thumb { width: 120px; border-radius: 12px; display: block; margin-top: 18px; }
model-viewer { width: 100%; height: min(50vh, 460px); background: #fff; border-radius: 18px; border: 1px solid var(--line);
  --poster-color: transparent; }
.done-note { background: #FBF4E6; border: 1px solid #EED9B4; border-radius: 14px; padding: 12px 14px; font-size: 14px;
  color: var(--muted); margin-top: 14px; }

/* кнопка «Поставить у себя на столе» поверх 3D (видна, только если телефон умеет AR) */
.ar-btn { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: flex; align-items: center;
  gap: 8px; border: 0; border-radius: 999px; padding: 11px 18px; font: inherit; font-size: 15px; font-weight: 700;
  background: var(--teal); color: #fff; box-shadow: 0 6px 18px rgba(0,0,0,.18); cursor: pointer; white-space: nowrap; }
.ar-btn svg { width: 20px; height: 20px; flex: none; }
.ar-hint { margin: 10px 0 0; }
.deadline { margin: 14px 0 0; padding: 11px 14px; border-radius: 12px; background: #FBEBCB; color: #6B4A12;
  font-weight: 700; font-size: 15px; }
.deadline + .btn { margin-top: 10px; }
