/* UMAI — витрина и заказ.
   Палитра снята с их айдентики: чёрный #010101 + золото #E4D296 / #B09C5D / #736432.
   Две темы; цвет категории (снят с их же карточек) живёт точкой на чипе, не спорит с золотом. */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

:root {
  --gold: #C7B27A;
  --gold-hi: #E4D296;
  --gold-deep: #8C7A46;
  --radius: 13px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --tabh: 60px;
  --shadow: 0 2px 10px rgba(0,0,0,.5);
}

/* ── тёмная: их фирменная ── */
:root, :root[data-theme="dark"] {
  --bg: #0B0A08;
  --surface: #131210;
  --surface-2: #1B1916;
  --ink: #F0EAD9;
  --ink-2: #A9A08A;
  --ink-3: #6E6757;
  --line: #262320;
  --line-2: #332F29;
  --acc: var(--gold);
  --acc-ink: #0B0A08;
  --tile-bg: #17150F;
  --shadow: 0 2px 12px rgba(0,0,0,.55);
}

/* ── светлая: тёплая слоновая кость + густое золото ── */
:root[data-theme="light"] {
  /* золото на слоновой кости должно быть гуще, иначе тонет */
  --gold: #8A7538;
  --gold-hi: #C0A75F;
  --gold-deep: #6B5A2A;
  --bg: #FAF7F0;
  --surface: #FFFFFF;
  --surface-2: #F3EEE3;
  --ink: #14110C;
  --ink-2: #57503F;
  --ink-3: #8E866F;
  --line: #E7E0CF;
  --line-2: #DCD3BE;
  --acc: var(--gold-deep);
  --acc-ink: #FFFFFF;
  --tile-bg: #EFEADD;
  --shadow: 0 2px 10px rgba(20,17,12,.07);
}
/* на светлой кнопка-заливка тёмная: золотой градиент на кости выцветает */
:root[data-theme="light"] .cta,
:root[data-theme="light"] .picking button,
:root[data-theme="light"] .done .tick {
  background: linear-gradient(180deg, #221D12, #14110C);
  color: var(--gold-hi);
}
:root[data-theme="light"] .cartbtn b { background: var(--gold); color: #FAF7F0; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 450 15px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  padding-bottom: calc(var(--tabh) + var(--safe-b) + 8px);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  transition: background .25s, color .25s;
}
h1, h2 { margin: 0; font-weight: 500; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--gold); color: #0B0A08; }

.serif { font-family: "Playfair Display", Georgia, serif; }

/* ── шапка ── */
.top {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 4px;
  height: 54px; padding: 0 14px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.3) blur(16px);
  border-bottom: 1px solid var(--line);
}
.mark { display: flex; align-items: baseline; gap: 8px; margin-right: auto; }
.sun {
  width: 15px; height: 15px; flex: none; align-self: center;
  background: var(--gold);
  -webkit-mask: var(--sunmask) center/contain no-repeat;
          mask: var(--sunmask) center/contain no-repeat;
}
.sun.dark { background: var(--gold); }
.wm {
  font: 400 22px/1 "Playfair Display", Georgia, serif;
  letter-spacing: .2em; color: var(--gold);
}
.sub { font-size: 7.5px; letter-spacing: .3em; color: var(--ink-3); }
.back { font-size: 20px; line-height: 1; width: 30px; margin-left: -6px; color: var(--ink-2); }

.iconbtn {
  position: relative; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; color: var(--ink-2);
  transition: color .15s;
}
.iconbtn:hover { color: var(--gold); }
.cartbtn b {
  position: absolute; top: -1px; right: -2px; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--gold); color: #0B0A08;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
#themebtn .moon { display: none; }
:root[data-theme="light"] #themebtn .moon { display: block; }
:root[data-theme="light"] #themebtn .sunicon { display: none; }

/* ── поиск и рельс категорий ── */
.searchrow {
  display: flex; align-items: center; gap: 8px;
  margin: 13px 14px 11px; padding: 0 13px; height: 42px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
  color: var(--ink-3);
}
.searchrow:focus-within { border-color: var(--gold-deep); }
.searchrow input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--ink); }
.searchrow input::placeholder { color: var(--ink-3); }
.searchrow button { font-size: 20px; color: var(--ink-3); padding: 0 2px; }

.rail { display: flex; gap: 7px; overflow-x: auto; padding: 0 14px 13px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail button {
  flex: none; display: flex; align-items: center; gap: 7px;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; white-space: nowrap; color: var(--ink-2);
  transition: border-color .16s, color .16s;
}
.rail button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset; }
.rail button.on { border-color: var(--gold-deep); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold-deep); }

.cathead { padding: 0 15px 11px; font-size: 12.5px; color: var(--ink-3); }
.cathead b { color: var(--gold); font-weight: 500; }

/* ── сетка карточек ── */
.grid {
  display: grid; gap: 9px; padding: 0 12px 24px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 12px; padding-inline: 18px; } }
@media (min-width: 860px) {
  .grid { grid-template-columns: repeat(4, 1fr); padding-bottom: 44px; }
  .view, .searchrow, .rail, .cathead { max-width: 1000px; margin-inline: auto; }
  .searchrow { margin-top: 18px; }
}

.tile {
  position: relative; display: block; width: 100%;
  aspect-ratio: 9 / 16; border-radius: var(--radius); overflow: hidden;
  background: var(--tile-bg); text-align: left;
  box-shadow: inset 0 0 0 1px var(--line);
  transform: translateZ(0);
  transition: box-shadow .18s;
}
.tile:hover { box-shadow: inset 0 0 0 1px var(--gold-deep); }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile .add {
  position: absolute; right: 7px; bottom: 7px;
  width: 31px; height: 31px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(11,10,8,.72); color: var(--gold-hi);
  border: 1px solid rgba(228,210,150,.42);
  backdrop-filter: blur(6px);
  font-size: 16px; line-height: 1; font-weight: 500;
  transition: transform .13s, background .13s;
}
.tile .add:active { transform: scale(.88); }
.tile .add.in { background: var(--gold); color: #0B0A08; border-color: var(--gold); }
.tile .noprice {
  position: absolute; left: 7px; bottom: 10px;
  padding: 3px 8px; border-radius: 6px;
  background: rgba(11,10,8,.66); color: var(--ink-2);
  font-size: 10px; letter-spacing: .02em; backdrop-filter: blur(4px);
}
.empty { padding: 44px 20px; text-align: center; color: var(--ink-3); }
.empty a { color: var(--gold); border-bottom: 1px solid currentColor; }

/* ── нижние вкладки ── */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: grid; grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabh) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.3) blur(16px);
  border-top: 1px solid var(--line);
}
.tabs a { display: grid; place-items: center; gap: 3px; color: var(--ink-3); font-size: 10px; }
.tabs svg { width: 21px; height: 21px; }
.tabs a.on { color: var(--gold); }

/* ── общие заголовки ── */
.h1 { padding: 20px 16px 12px; font: 400 27px/1.1 "Playfair Display", Georgia, serif; }
.lbl {
  display: flex; align-items: baseline; gap: 8px;
  padding: 22px 16px 10px; font-size: 10.5px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3);
}
.lbl span { font-weight: 450; letter-spacing: 0; text-transform: none; font-size: 11.5px; }
.hint { margin: 0; padding: 0 16px 4px; font-size: 12.5px; color: var(--ink-3); }

/* ── конструктор ── */
.bhero { padding: 22px 16px 4px; }
.bhero h1 { font: 400 32px/1.05 "Playfair Display", Georgia, serif; }
.bhero p { margin: 10px 0 0; max-width: 34em; color: var(--ink-2); font-size: 14px; }

.presets { display: flex; gap: 9px; overflow-x: auto; padding: 0 16px 4px; scrollbar-width: none; }
.presets::-webkit-scrollbar { display: none; }
.preset {
  flex: none; width: 170px; padding: 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); text-align: left;
}
.preset.on { border-color: var(--gold-deep); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.preset b { display: block; font: 400 18px/1.15 "Playfair Display", Georgia, serif; color: var(--ink); }
.preset small { display: block; margin-top: 4px; color: var(--ink-3); font-size: 11.5px; line-height: 1.35; }
.preset u { display: block; margin-top: 10px; font-size: 12px; text-decoration: none; color: var(--gold); letter-spacing: .04em; }

.bases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 16px; }
.base { padding: 12px 11px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); text-align: left; }
.base.on { border-color: var(--gold-deep); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.base b { display: block; font-size: 13.5px; font-weight: 500; }
.base small { display: block; margin-top: 3px; color: var(--ink-3); font-size: 11px; }
.base small:last-child { color: var(--gold); }

.filllist { padding: 0 16px; }
.row { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; background: var(--tile-bg); }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; font-size: 13.5px; font-weight: 500; }
.row .t small { color: var(--ink-3); font-size: 11.5px; }
.row .p { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--ink); }
.row .p.ask { color: var(--ink-3); font-size: 11.5px; }
.stepper { display: flex; align-items: center; gap: 2px; }
.stepper button { width: 27px; height: 27px; border-radius: 7px; background: var(--surface-2); font-size: 15px; line-height: 1; color: var(--ink-2); }
.stepper span { min-width: 26px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.addmore {
  display: block; width: calc(100% - 32px); margin: 13px 16px 0; padding: 12px;
  border: 1px dashed var(--line-2); border-radius: 11px; color: var(--ink-2); font-size: 13.5px;
}
.addmore:hover { border-color: var(--gold-deep); color: var(--gold); }

/* тираж корзин */
.qtyrow { display: flex; align-items: center; gap: 10px; padding: 0 16px; flex-wrap: wrap; }
.stepper.big button { width: 38px; height: 38px; border-radius: 10px; font-size: 18px; }
.stepper.big span { min-width: 44px; font-size: 17px; font-variant-numeric: tabular-nums; }
.qtyquick { display: flex; gap: 6px; margin-left: auto; }
.qtyquick button {
  min-width: 40px; padding: 9px 6px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums;
}
.qtyquick button.on { border-color: var(--gold-deep); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold-deep); }

/* выбор дня для церемонии */
.daysel { display: flex; gap: 7px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.daysel::-webkit-scrollbar { display: none; }
.daysel button {
  flex: none; min-width: 62px; padding: 9px 8px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); text-align: center; color: var(--ink-2);
}
.daysel button.on { border-color: var(--gold-deep); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.daysel b { display: block; font-size: 13px; font-weight: 500; }
.daysel small { display: block; margin-top: 2px; font-size: 10.5px; color: var(--ink-3); }

.repeat {
  padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line);
  font-size: 12px; color: var(--ink-2); background: var(--surface);
}
.repeat:hover { border-color: var(--gold-deep); color: var(--gold); }

.deco { padding: 0 16px; }
.chk { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.chk input { width: 17px; height: 17px; accent-color: var(--gold-deep); }
.chk span { flex: 1; }
.chk b { font-size: 11.5px; font-weight: 450; color: var(--ink-3); }
#cardtext {
  width: 100%; margin-top: 11px; padding: 11px 13px; min-height: 70px;
  border: 1px solid var(--line); border-radius: 11px; background: var(--surface);
  resize: vertical; outline: 0; color: var(--ink);
}
#cardtext:focus { border-color: var(--gold-deep); }

.total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  margin: 24px 16px 0; padding: 15px 0 0; border-top: 1px solid var(--gold-deep);
}
.total i { font-style: normal; font-size: 12px; color: var(--ink-3); }
.total b { font: 400 28px/1 "Playfair Display", Georgia, serif; font-variant-numeric: tabular-nums; color: var(--gold); }
.total .ask { display: block; margin-top: 5px; font-size: 11.5px; color: var(--ink-3); text-align: right; }

.cta {
  display: block; width: calc(100% - 32px); margin: 16px 16px 6px; padding: 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold));
  color: #0B0A08; font-size: 15px; font-weight: 600; letter-spacing: .02em;
}
.cta:disabled { opacity: .35; }
.ghost { padding: 11px 17px; border: 1px solid var(--gold-deep); border-radius: 10px; font-size: 13.5px; color: var(--gold); }
.fine { padding: 6px 16px 22px; font-size: 11.5px; color: var(--ink-3); line-height: 1.45; }

/* ── заказ ── */
.cartlist { padding: 0 16px; }
.seg { display: flex; gap: 6px; padding: 0 16px; }
.seg button {
  flex: 1; padding: 11px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-size: 13px; color: var(--ink-2);
}
.seg button.on { border-color: var(--gold-deep); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.fields { display: grid; gap: 10px; padding: 15px 16px 0; }
.fields label { display: grid; gap: 5px; }
.fields span { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.fields input {
  padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); outline: 0; color: var(--ink);
}
.fields input:focus { border-color: var(--gold-deep); }
.fields input::-webkit-calendar-picker-indicator { filter: invert(.6) sepia(1) saturate(2) hue-rotate(5deg); }
:root[data-theme="light"] .fields input::-webkit-calendar-picker-indicator { filter: none; }

/* ── клуб ── */
.card {
  position: relative;
  margin: 20px 16px 0; padding: 21px; border-radius: 18px;
  background: radial-gradient(130% 100% at 50% -10%, #2A251A 0%, #100E0A 48%, #010101 100%);
  color: #F0EAD9;
  box-shadow: 0 0 0 1px rgba(199,178,122,.4), 0 16px 40px rgba(0,0,0,.5);
}
.card::after {
  content: ''; position: absolute; inset: 6px; border-radius: 13px;
  border: 1px solid rgba(199,178,122,.18); pointer-events: none;
}
.cardtop { display: flex; align-items: baseline; gap: 8px; }
.cardwm { font: 400 20px/1 "Playfair Display", Georgia, serif; letter-spacing: .2em; color: var(--gold-hi); }
.cardsub { font-size: 7.5px; letter-spacing: .3em; color: var(--gold-deep); margin-left: auto; }
.qr {
  display: grid; place-items: center; margin: 18px auto; width: 172px; height: 172px;
  background: #F0EAD9; border-radius: 12px; padding: 11px;
}
.qr svg { width: 100%; height: 100%; }
.cardbot { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cardbot small { display: block; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.cardbot b { font-size: 15px; font-weight: 500; margin-top: 3px; display: block; }
.cardbot .right { text-align: right; }
.progress { margin: 14px 16px 7px; height: 3px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.progress .bar { height: 100%; background: linear-gradient(90deg, var(--gold-deep), var(--gold-hi)); border-radius: 3px; transition: width .4s; }
@media (min-width: 560px) {
  /* карта гостя — карта, а не баннер во всю ширину */
  #v-me .card { max-width: 372px; margin-inline: auto; }
  #v-me .progress, #ghint { max-width: 372px; margin-inline: auto; padding-inline: 0; }
  #ghint { text-align: center; }
}
.hist { padding: 0 16px; }
.cer { padding: 0 16px; }
.cer p { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.ver { padding: 28px 16px 8px; font-size: 11px; color: var(--ink-3); text-align: center; }

/* ── шторка товара ── */
.sheet { position: fixed; inset: 0; z-index: 60; }
.scrim { position: absolute; inset: 0; background: rgba(1,1,1,.62); animation: fade .18s ease; }
.panel {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 92svh; overflow: auto;
  background: var(--bg); border-radius: 18px 18px 0 0;
  border-top: 1px solid var(--line-2);
  padding-bottom: calc(16px + var(--safe-b));
  animation: up .24s cubic-bezier(.2,.8,.3,1);
}
@media (min-width: 720px) {
  .panel { left: 50%; right: auto; bottom: 50%; transform: translate(-50%, 50%); width: 460px;
    border-radius: 18px; border: 1px solid var(--line-2); max-height: 88svh; animation: fade .18s ease; }
}
@keyframes up { from { transform: translateY(14%); opacity: .6 } }
@keyframes fade { from { opacity: 0 } }
.grab { width: 34px; height: 4px; border-radius: 3px; background: var(--line-2); margin: 9px auto 4px; }
.pimg { width: 100%; aspect-ratio: 9/16; max-height: 46svh; object-fit: cover; background: var(--tile-bg); }
.pbody { padding: 16px 18px 0; }
.pkind { font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
.pname { margin: 5px 0 0; font: 400 27px/1.08 "Playfair Display", Georgia, serif; }
.porigin { margin: 6px 0 0; font-size: 13px; color: var(--ink-2); }
.pnotes { margin: 13px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.pnotes b { display: block; font-weight: 600; color: var(--ink-3); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 5px; }
.wsel { display: flex; gap: 7px; margin: 16px 0 0; }
.wsel button { flex: 1; padding: 10px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 13px; color: var(--ink-2); }
.wsel button.on { border-color: var(--gold-deep); color: var(--ink); box-shadow: inset 0 0 0 1px var(--gold-deep); }
.prow { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 18px 0 0; }
.prow .pp { font: 400 26px/1 "Playfair Display", Georgia, serif; font-variant-numeric: tabular-nums; color: var(--gold); }
.prow .pa { font-size: 12.5px; color: var(--ink-3); }
.psrc { margin: 14px 0 0; font-size: 11px; color: var(--ink-3); }

/* ── тост ── */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabh) + var(--safe-b) + 14px); z-index: 70;
  transform: translateX(-50%);
  padding: 11px 17px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink); font-size: 13px; white-space: nowrap;
  border: 1px solid var(--gold-deep); box-shadow: var(--shadow);
  animation: up .2s ease;
}

/* ── итог заказа ── */
.done { padding: 28px 18px; text-align: center; }
.done .tick {
  width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #0B0A08;
  display: grid; place-items: center; font-size: 22px;
}
.done h2 { font: 400 26px/1.15 "Playfair Display", Georgia, serif; }
.done p { color: var(--ink-2); font-size: 14px; margin: 10px 0 0; }
.done pre {
  margin: 18px 0 0; padding: 14px; border-radius: 11px;
  background: var(--surface); border: 1px solid var(--line);
  font: 450 11.5px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap; text-align: left; color: var(--ink-2);
}

/* ── режим сбора корзины ── */
.picking {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 9px 11px; border-radius: 10px;
  background: var(--surface); color: var(--ink-2);
  box-shadow: inset 0 0 0 1px var(--gold-deep);
}
.picking b { color: var(--gold); }
.picking button {
  margin-left: auto; padding: 6px 12px; border-radius: 8px;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #0B0A08;
  font-size: 12px; font-weight: 600;
}
