:root {
  --black: #141312;
  --card: #1C1A18;
  --card-2: #23201D;
  --line: #2E2A26;
  --ivory: #F2EDE4;
  --paper: #ECE8E1;
  --muted: #A99F90;
  --gold: #B8A47E;
  --gold-2: #CDBB94;
  --wine: #7A2E26;
  --ink: #1E1C19;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --text: 'Lora', Georgia, serif;
  --r: 14px;
}
[hidden] { display: none !important; }
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { background: var(--black); }
body {
  background: var(--black); color: var(--ivory); font-family: var(--text); font-size: 16px; line-height: 1.5;
  min-height: 100vh; overflow-x: hidden;
}
body.locked { overflow: hidden; }
#app { max-width: 520px; margin: 0 auto; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }
img { display: block; max-width: 100%; }
a { color: var(--gold-2); }

.kicker { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.center { text-align: center; }

/* шапка */
.hero { text-align: center; padding: 34px 4px 22px; }
.hero h1 {
  font-family: var(--serif); font-weight: 300; font-size: 46px; line-height: .98; letter-spacing: .06em;
  text-transform: uppercase; margin: 12px 0 14px;
}
.lead { font-family: var(--serif); font-style: italic; font-size: 19px; line-height: 1.35; color: #D9CFBF; }

/* кнопки */
.btn {
  appearance: none; border: 0; cursor: pointer; font-family: var(--text); font-size: 16px; font-weight: 600;
  border-radius: 12px; padding: 14px 18px; width: 100%; transition: transform .08s ease, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-gold { background: var(--gold); color: #1A1714; }
.btn-outline { background: transparent; color: var(--gold-2); border: 1px solid var(--gold); width: auto; padding: 11px 16px; white-space: nowrap; }
.btn-ghost { background: transparent; color: var(--gold-2); border: 1px solid var(--line); font-weight: 500; }

/* подарок */
.gift {
  display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 14px 14px 14px 16px; margin-bottom: 16px;
}
.gift-text { flex: 1; min-width: 0; }
.gift-title { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.15; margin-top: 3px; }
.gift-sub { font-size: 13px; color: var(--muted); }

/* комплект */
.bundle {
  position: relative; background: var(--card); border: 1px solid #4A3F2E; border-radius: var(--r);
  overflow: hidden; margin-bottom: 30px; box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.ribbon {
  display: inline-block; background: var(--wine); color: var(--ivory); margin-bottom: 12px;
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase; padding: 5px 10px; border-radius: 6px;
}
.bundle-img { width: 100%; aspect-ratio: 900 / 631; object-fit: cover; background: #0E0D0C; }
.bundle-body { padding: 18px 18px 20px; text-align: center; }
.bundle h2 { font-family: var(--serif); font-weight: 300; font-size: 36px; letter-spacing: .05em; text-transform: uppercase; line-height: 1.05; margin-top: 6px; }
.bundle-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.price-row { display: flex; justify-content: center; align-items: baseline; gap: 12px; margin-top: 14px; }
.price { font-family: var(--serif); font-size: 44px; font-weight: 600; line-height: 1; color: var(--ivory); }
.old { color: var(--muted); font-size: 18px; }
.per { color: var(--gold-2); font-size: 14px; margin-top: 6px; }
.bundle-about { color: #D2C8B8; font-size: 15px; margin: 12px 0 16px; }

/* отдельные тетради */
.section-head { text-align: center; margin-bottom: 14px; }
.section-sub { font-family: var(--serif); font-style: italic; font-size: 18px; color: #D9CFBF; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card {
  appearance: none; border: 1px solid var(--line); background: var(--card); color: inherit; text-align: left;
  border-radius: 12px; overflow: hidden; cursor: pointer; font: inherit; display: flex; flex-direction: column;
}
.card:active { transform: scale(.985); }
.card img { width: 100%; aspect-ratio: 480 / 680; object-fit: cover; background: #0E0D0C; }
.card-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.card-num { font-size: 10px; letter-spacing: .2em; color: var(--gold); text-transform: uppercase; }
.card-title { font-family: var(--serif); font-size: 19px; font-weight: 500; line-height: 1.1; }
.card-meta { font-size: 12px; color: var(--muted); margin-top: auto; padding-top: 6px; display: flex; justify-content: space-between; }
.card-meta b { color: var(--ivory); font-weight: 600; font-size: 14px; }

/* как это работает */
.how { margin: 34px 0 10px; background: var(--paper); color: var(--ink); border-radius: var(--r); padding: 20px 18px; }
.how .kicker { color: #6E604A; }
.steps { list-style: none; margin: 14px 0 6px; display: grid; gap: 12px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; line-height: 1.4; }
.steps span {
  flex: none; width: 26px; height: 26px; border: 1px solid var(--wine); color: var(--wine); border-radius: 50%;
  display: grid; place-items: center; font-family: var(--serif); font-weight: 600; font-size: 16px;
}
.note { font-size: 13px; color: #6E604A; text-align: center; margin-top: 8px; }

/* подвал */
.footer { text-align: center; padding: 24px 4px 0; color: var(--muted); font-size: 13px; }
.docs { display: grid; gap: 8px; margin-bottom: 18px; }
.docs a, .docs span {
  display: block; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; color: #D2C8B8;
  text-decoration: none; font-size: 14px;
}
.docs span { opacity: .6; }
.support { line-height: 1.7; margin-bottom: 10px; }
.channel { display: inline-block; margin-bottom: 16px; }
.disclaimer { font-size: 12px; line-height: 1.45; margin-bottom: 8px; }
.seller { font-size: 11px; opacity: .7; }

/* карточка-шторка */
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 10; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 11; max-width: 520px; margin: 0 auto;
  background: var(--card-2); border-radius: 18px 18px 0 0; border-top: 1px solid #4A3F2E;
  max-height: 88vh; display: flex; flex-direction: column; transform: translateY(100%); transition: transform .25s ease;
}
.sheet.open { transform: translateY(0); }
.sheet-grip { width: 40px; height: 4px; background: #4A443D; border-radius: 2px; margin: 10px auto 4px; flex: none; }
.sheet-scroll { overflow-y: auto; padding: 8px 18px 6px; -webkit-overflow-scrolling: touch; }
.sheet-top { display: flex; gap: 14px; align-items: center; }
.sheet-top img { width: 92px; border-radius: 8px; flex: none; aspect-ratio: 480 / 680; object-fit: cover; }
.sheet h3 { font-family: var(--serif); font-weight: 500; font-size: 27px; line-height: 1.05; margin-top: 4px; }
.sheet-count { color: var(--muted); font-size: 14px; margin-top: 4px; }
.sheet-about { margin: 14px 0 10px; color: #D9CFBF; font-size: 15px; }
.label { font-family: var(--serif); font-weight: 600; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 6px 0 6px; }
.recipes { list-style: none; display: grid; gap: 6px; }
.recipes li { position: relative; padding-left: 16px; font-size: 15px; line-height: 1.35; }
.recipes li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 6px; height: 6px; background: var(--wine); transform: rotate(45deg); }
.warn-note { font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.sheet-actions { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); display: grid; gap: 8px; border-top: 1px solid var(--line); flex: none; }

/* уведомление */
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ivory); color: var(--ink); padding: 12px 16px; border-radius: 12px; font-size: 15px;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 20; width: max-content; max-width: calc(100% - 32px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 350px) {
  .hero h1 { font-size: 38px; }
  .card-title { font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet, .toast, .btn { transition: none; }
}

/* ровные цифры в заголовках и ценах (у Cormorant по умолчанию «старинные», 7 опускается вниз) */
h1, h2, h3, .price, .old, .gift-title, .card-title, .card-meta, .per, .bundle-sub { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }

/* Standalone website */
.topnav {display:flex;justify-content:space-between;gap:14px;align-items:center;padding:20px 0;border-bottom:1px solid var(--line);font-size:13px;}
.topnav a {text-decoration:none;min-height:36px;display:inline-flex;align-items:center;}
.brand {font-family:var(--serif);font-size:20px;}
.sheet-close,.dialog-close {appearance:none;border:0;background:transparent;color:var(--ivory);font:28px Georgia;cursor:pointer;width:44px;height:44px;}
.sheet-close {position:absolute;right:4px;top:0;z-index:1;}
.checkout {position:fixed;inset:0;margin:auto;width:calc(100% - 24px);max-width:440px;max-height:90dvh;overflow:auto;background:var(--card-2);color:var(--ivory);border:1px solid #4A3F2E;border-radius:18px;padding:30px 24px;font-family:var(--text);}
.checkout::backdrop {background:rgba(0,0,0,.78);}
.checkout h2 {font:500 30px/1.15 var(--serif);padding-right:14px;margin:12px 0;}
.dialog-close {position:absolute;right:5px;top:5px;}
.checkout-price {font:600 34px/1.2 var(--serif);color:var(--gold-2);margin:12px 0 24px;}
.checkout label {display:block;font-size:14px;margin-bottom:10px;}
.checkout input[type=email] {width:100%;padding:14px;border:1px solid #615640;background:var(--black);border-radius:10px;color:var(--ivory);font:16px var(--text);}
.field-note {font-size:13px;line-height:1.65;color:var(--muted);margin:10px 0 20px;}
.checkout .consent {display:flex;gap:10px;align-items:flex-start;font-size:12px;line-height:1.6;margin:20px 0;}
.consent input {width:18px;height:18px;flex:none;margin-top:2px;accent-color:var(--gold);}
.form-error {font-size:14px;color:#F1B7AA;margin:14px 0;line-height:1.55;overflow-wrap:anywhere;}
.checkout .note {color:var(--muted);}
:focus-visible {outline:2px solid var(--gold-2);outline-offset:4px;}
.order-wrap {max-width:620px;margin:0 auto;padding:0 18px 40px;}
.order-card {background:var(--card);border:1px solid #4A3F2E;border-radius:18px;padding:28px 22px;margin-top:28px;}
.order-card h1 {font:500 38px/1.15 var(--serif);margin:14px 0;overflow-wrap:anywhere;}
.order-card .checkout-price {margin:14px 0;}
.order-icon {font-size:42px;color:var(--gold);margin-top:18px;}
.order-actions {display:grid;gap:12px;margin:24px 0 14px;}
.order-actions a {display:block;text-align:center;text-decoration:none;}
.order-card > .btn {margin-bottom:12px;}
.order-id {font:12px/1.6 monospace;color:var(--muted);overflow-wrap:anywhere;margin:24px 0 14px;}
.back-link {text-align:center;font-size:14px;margin-top:24px;}
.purchase-list {display:grid;gap:16px;margin:24px 0;}
.purchase {border:1px solid var(--line);border-radius:12px;padding:18px;}
.purchase h2 {font:500 25px var(--serif);margin-bottom:8px;}
.purchase p {color:var(--muted);font-size:14px;margin-bottom:14px;}
.payment-badge {display:inline-block;padding:7px 12px;border-radius:7px;background:var(--wine);color:var(--ivory);font:600 13px/1.4 var(--text);letter-spacing:.04em;margin-bottom:10px;}
.order-paid {border-color:#a95245;}
.order-paid .order-icon {display:grid;place-items:center;width:64px;height:64px;border-radius:50%;background:var(--wine);color:var(--ivory);font:32px/1 Arial;box-shadow:0 0 24px #7a2e2638;}
.btn-paid {background:var(--wine);color:var(--ivory);border:1px solid #b96759;box-shadow:0 5px 20px #7a2e2633;}
.btn-paid:hover {background:#913c31;}
.purchase-paid {border-color:#904638;background:linear-gradient(135deg,#7a2e261a,transparent);}
.topnav .purchases-ready {position:relative;background:transparent;color:var(--gold-2);padding:6px 12px;border:1px solid #a95245;border-radius:7px;box-shadow:none;font-weight:600;}
.purchases-count {position:absolute;right:-8px;top:-8px;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#a6493d;color:#fff;font:700 12px/1 Arial,sans-serif;pointer-events:none;animation:purchase-notification 2.8s ease-in-out infinite;}
.paid-attention {animation:paid-glow 1s ease-in-out 3;}
@keyframes paid-glow {50% {box-shadow:0 0 0 5px #a9524538,0 0 26px #7a2e2680;}}
@keyframes purchase-notification {0%,100% {transform:scale(1);box-shadow:0 0 0 0 #a6493d00;}50% {transform:scale(1.08);box-shadow:0 0 9px 3px #a6493d44;}}
@media(prefers-reduced-motion:reduce) {.paid-attention,.purchases-count {animation:none;}}
@media(min-width:760px) {
 #app {max-width:1060px;padding:0 30px 40px;}
 .hero {padding:50px 0 35px;max-width:600px;margin:auto;}
 .hero h1 {font-size:68px;}
 .gift {max-width:620px;margin:0 auto 26px;}
 .bundle {display:grid;grid-template-columns:1fr 1fr;align-items:center;}
 .bundle-img {height:100%;object-fit:cover;}
 .bundle-body {padding:30px;}
 .grid {grid-template-columns:repeat(4,1fr);gap:18px;}
 .card-title {font-size:23px;}
 .how {max-width:700px;margin:45px auto 10px;padding:30px;}
 .docs {display:flex;justify-content:center;}
 .footer {max-width:700px;margin:auto;}
 .sheet {bottom:24px;border-radius:18px;max-height:90vh;}
}
@media(max-width:350px) { .topnav {font-size:12px;gap:6px;} .brand {font-size:17px;} .gift {gap:8px;padding:12px;} .btn-outline {padding:11px;} .order-card {padding:22px 16px;} }
