:root{
  --dark:#20221e;
  --line:#e8e7e2;
  --accent:#b89a68;
  --accent-dark:#92774d;
  --text:#20211f;
  --muted:#777a73;
  --bg:#f6f5f1;
  --ok:#5f8f6c;
  --err:#c7665f;
  --radius:22px;
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0;height:100%}
body{
  font-family:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  color:var(--text); background:#f6f5f1; -webkit-font-smoothing:antialiased;
}
button{font-family:inherit}

.app{
  display:grid;
  grid-template-columns:230px minmax(0,1fr);
  grid-template-rows:auto auto minmax(0,1fr) auto;
  grid-template-areas:"rail head" "rail steps" "rail body" "rail foot";
  height:100dvh; background:#fff;
}
.rail{
  grid-area:rail; position:relative; display:flex; flex-direction:column; justify-content:space-between;
  padding:24px 22px; overflow:hidden;
  background:linear-gradient(160deg,#f7f4ec 0%,#f1eee6 55%,#ece8df 100%);
  border-right:1px solid #e7e3da;
}
.rail:after{content:'';position:absolute;width:220px;height:220px;border:1px solid rgba(184,154,104,.16);
  border-radius:50%;right:-120px;bottom:110px;
  background:radial-gradient(circle,rgba(184,154,104,.22),transparent 65%)}
.rail-brand{position:relative;z-index:1;display:flex;gap:11px;align-items:center}
.rail-logo{display:block;width:210px;max-width:100%;height:auto;filter:invert(1)}
.rail-copy{position:relative;z-index:1}
.rail-kicker{font-size:9px;letter-spacing:2.4px;color:#a08355;text-transform:uppercase}
.rail-big{font-size:31px;line-height:1.02;letter-spacing:-1.25px;font-weight:650;margin:12px 0 14px;color:#242620}
.rail-copy p{font-size:12px;line-height:1.55;color:#777a72;max-width:155px;margin:0}
.rail-mini{position:relative;z-index:1;display:flex;justify-content:space-between;font-size:8px;letter-spacing:1.8px;color:#aaa399}

.app-head{grid-area:head; background:#fff; display:flex; align-items:center; gap:12px; padding:14px 22px; min-height:72px; flex:0 0 auto}
.app-title{flex:1; text-align:left; font-family:inherit; text-transform:none; font-weight:600; font-size:14px; letter-spacing:-.1px; color:#31332e}
.ic{background:#f7f7f4; border:1px solid #ecece7; color:#4b4e47; opacity:1; cursor:pointer; font-size:13px;
    padding:8px 10px; min-width:40px; min-height:40px; border-radius:12px}
.ic:hover{background:#efefe9; border-color:#e0e0da; color:#20221e}
.ic[hidden]{visibility:hidden; display:block}

.steps{grid-area:steps; display:flex; gap:5px; padding:0 24px 8px; flex:0 0 auto}
.steps i{flex:1; height:4px; background:#ecece7; border-radius:5px}
.steps i.done{background:#b89a68}

.app-body{grid-area:body; flex:1 1 auto; overflow-y:auto; padding:26px 30px 34px; -webkit-overflow-scrolling:touch;
  background:#fff; color:var(--text); scrollbar-width:thin}
.app-body::-webkit-scrollbar{width:8px}
.app-body::-webkit-scrollbar-thumb{background:#d8d8d2;border-radius:8px}
.app-foot{
  grid-area:foot; flex:0 0 auto; border-top:1px solid #ecece7; padding:14px 22px;
  display:flex; align-items:center; gap:14px; background:#fbfbf8;
}
.f-total{flex:1; font-size:11px; color:#8a8d85; text-transform:uppercase; letter-spacing:1px}
.f-total b{display:block; font-family:inherit; font-size:21px; font-weight:400; letter-spacing:-.5px; color:#22231f; margin-top:4px}
.loading{color:var(--muted); padding:40px 0; text-align:center}

.btn{
  background:#242620; color:#fff; border:1px solid #242620; border-radius:13px; cursor:pointer;
  padding:12px 18px; font-size:12px; font-weight:750; letter-spacing:.15px; min-height:44px;
  text-decoration:none; display:inline-flex; align-items:center; justify-content:center; box-shadow:none; transition:.2s;
}
.btn:hover{background:#3a3d34; border-color:#3a3d34; color:#fff; transform:translateY(-1px)}
.btn:disabled{background:#ecece7; border-color:#ecece7; color:#a6a8a1; cursor:not-allowed; transform:none}
.btn-ghost{background:#fff; color:#5b5f56; border:1px solid #dcdcd5}
.btn-ghost:hover{background:#f5f5f1; color:#242620; border-color:#cfcfc7}
.btn-sm{padding:9px 15px; min-height:40px; font-size:12px}
.btn-link{background:none;border:0;color:#93764a;cursor:pointer;font-size:12px;font-weight:600;text-decoration:underline;padding:6px 0}

h2.step-h{font-family:inherit; font-size:clamp(30px,4vw,46px); font-weight:650; letter-spacing:-1.8px;
  line-height:1.02; margin:2px 0 10px; color:#20221e}
p.step-p{margin:0 0 26px; color:#7a7e75; font-size:13px; line-height:1.55; max-width:610px}
.muted{color:var(--muted)}

.grid-2{display:grid; grid-template-columns:1fr 1fr; gap:14px}
.branch{
  position:relative; overflow:hidden; border:1px solid #e8e8e2; border-radius:22px; padding:24px; cursor:pointer;
  text-align:left; background:#fafaf7; min-height:190px; width:100%; color:#20221e;
  box-shadow:0 1px 0 rgba(255,255,255,.85);
  transition:transform .22s ease,border-color .22s ease,background .22s ease;
}
.branch:before{content:'';position:absolute;width:48px;height:48px;right:20px;top:20px;border-radius:15px;
  background:#f1f1ec;border:1px solid #e6e6df}
.branch:after{content:'\2192';position:absolute;right:24px;bottom:20px;font-size:23px;color:#aaa69d;transition:.2s}
.branch-fitness:before{background:linear-gradient(135deg,#d3bc92,#b89a68)}
.branch-spa:before{background:linear-gradient(135deg,#ddd6cf,#bbaea2)}
.branch:hover{transform:translateY(-3px); background:#fff; border-color:#cfc7b8; box-shadow:0 14px 35px rgba(58,53,43,.08)}
.branch:hover:after{transform:translateX(4px); color:#9a7b4e}
.branch h3{margin:56px 0 8px; font-family:inherit; font-size:26px; font-weight:650; letter-spacing:-.8px; color:#22231f}
.branch p{margin:0; font-size:12.5px; color:#7b7f76; line-height:1.5; max-width:330px}

.opts{display:flex; flex-wrap:wrap; gap:8px; margin-bottom:26px}
.opt{
  border:1px solid #e6e6e0; background:#f7f7f4; border-radius:12px; padding:11px 15px;
  cursor:pointer; font-size:13px; min-height:44px; color:#4e514a;
}
.opt:hover{border-color:#d2c4ac; background:#f3f0e9}
.opt.on{background:#252720; border-color:#252720; color:#fff; font-weight:650}
.q{margin-bottom:26px}
.q > label{display:block; font-size:10px; text-transform:uppercase; letter-spacing:1.6px; color:#8a8d85; margin-bottom:12px}

.card{background:#fff; border:1px solid #e9e9e3; border-radius:20px; padding:20px 21px; margin-bottom:13px; box-shadow:0 5px 18px rgba(42,43,38,.035)}
.card.best{border-color:#cbb893; box-shadow:0 12px 34px rgba(74,66,48,.07), inset 0 0 0 1px rgba(184,154,104,.04)}
.card-top{display:flex; align-items:flex-start; gap:14px; flex-wrap:wrap}
.card-top h3{margin:0; font-family:inherit; font-size:21px; font-weight:640; letter-spacing:-.5px; flex:1 1 200px; color:#252720}
.price{font-family:inherit; font-size:23px; font-weight:660; letter-spacing:-.7px; white-space:nowrap; color:#252720}
.price small{display:block; font-family:inherit; font-size:10px; color:#8a8d84; font-weight:400; text-align:right; margin-top:4px}
.tag{display:inline-block; background:#f3eee5; color:#8d7045; border:0; font-size:9px; font-weight:700;
     text-transform:uppercase; letter-spacing:1.4px; padding:6px 9px; border-radius:999px; margin-bottom:8px}
.inc{margin:12px 0 0; padding:0; list-style:none; font-size:12.5px; color:#767a71; line-height:1.7}
.inc li::before{content:'\2713\A0'; color:#8f7a56}
.inc li.no{color:#aaa79f}
.inc li.no::before{content:'\2014\A0'; color:#c5c2bb}
.card-foot{display:flex; align-items:center; gap:12px; margin-top:14px; flex-wrap:wrap}
.meta{font-size:12.5px; color:var(--muted)}

.row{display:flex; gap:12px; align-items:flex-start; padding:15px 0; border-bottom:1px solid #eeeeea}
.row:last-of-type{border-bottom:0}
.row-main{flex:1}
.row-main b{display:block; font-weight:600; font-size:14px; margin-bottom:3px; color:#2a2c27}
.row-main span{font-size:12px; color:#858981; line-height:1.5}
.row-price{white-space:nowrap; font-weight:600; font-size:14px; color:#2a2c27}
.rm{background:none;border:0;color:#b76059;cursor:pointer;font-size:13px;padding:4px}

/* Кнопка «Добавить» / счётчик количества */
.add-ctl{display:inline-flex; flex-shrink:0; align-items:center}
.add-ctl .btn{white-space:nowrap}
.qty{display:inline-flex; align-items:center; gap:1px; padding:2px; border-radius:13px;
     border:1px solid #e0d7c4; background:#faf7f0; min-height:40px}
.qty-btn{width:32px; height:34px; padding:0; border:0; border-radius:11px; background:none; cursor:pointer;
         font-size:16px; line-height:1; font-weight:500; color:#8a7a58;
         display:grid; place-items:center; -webkit-tap-highlight-color:transparent}
.qty-btn:hover:not(:disabled){background:#efe8d9; color:#5f5230}
.qty-btn:focus-visible{outline:2px solid var(--accent); outline-offset:-2px}
.qty-btn:disabled{color:#cdc7b8; cursor:not-allowed}
.qty-n{min-width:22px; text-align:center; font-size:13.5px; font-weight:700; color:#5f5230;
       font-variant-numeric:tabular-nums}

/* В сетке номиналов сертификата счётчик занимает место кнопки */
.opts .add-ctl .qty{min-height:38px}

/* В карточке клубной карты счётчик стоит вместо крупной кнопки «Выбрать» */
.card-foot .qty{min-height:46px; border-radius:14px}
.card-foot .qty-btn{width:38px; height:40px; font-size:17px}
.card-foot .qty-n{min-width:26px; font-size:14.5px}
.sum{display:flex; justify-content:space-between; padding:8px 0; font-size:14px; color:#7c8077}
.sum.total{font-size:18px; color:#232520; font-weight:600; border-top:1px solid #e8e8e2; margin-top:8px; padding-top:14px}
.empty{text-align:center; color:#8d9088; padding:40px 0; font-size:14px}

.notice{background:#f7f4ed; border:1px solid #eee8db; border-radius:14px; padding:14px 16px; font-size:12px;
        color:#706958; line-height:1.55; margin:14px 0}
.notice:before{content:'i'; display:inline-grid; place-items:center; width:20px; height:20px; border-radius:7px;
        background:#ebe2d2; color:#91744b; font-weight:800; margin-right:9px}
.notice.warn{background:#fff3f1; border-color:#f0d7d3; color:#9b554f}

/* Карточка заказа в личном кабинете — сворачивается по клику */
.ord{border:1px solid #ebebe5; border-radius:16px; margin-bottom:12px; background:#fff; overflow:hidden;
     transition:border-color .18s, box-shadow .18s}
.ord:hover{border-color:#ded9cc}
.ord.open{border-color:#e4dcc9; box-shadow:0 3px 14px rgba(60,50,30,.06)}

.ord-head{display:flex; gap:12px; align-items:center; justify-content:space-between; width:100%;
          padding:15px 18px; background:none; border:0; font:inherit; color:inherit; text-align:left;
          cursor:pointer; -webkit-tap-highlight-color:transparent}
.ord-head:hover{background:#fbfaf7}
.ord-head:focus-visible{outline:2px solid var(--accent); outline-offset:-2px}
.ord-code{font-weight:650; font-size:15px; color:#2a2c27; letter-spacing:.3px}
.ord-code span{display:block; font-weight:400; font-size:12px; color:#8b8f87; letter-spacing:0; margin-top:3px}
.ord-head-right{display:flex; gap:10px; align-items:center; flex-shrink:0}
.ord-head-sum{font-weight:650; font-size:14px; color:#2a2c27; white-space:nowrap}
.ord-chevron{width:8px; height:8px; margin-left:2px; border-right:2px solid #a8aca3;
             border-bottom:2px solid #a8aca3; transform:rotate(45deg) translate(-2px,-2px);
             transition:transform .22s ease}
.ord.open .ord-chevron{transform:rotate(-135deg) translate(-2px,-2px)}

.ord-body{height:0; overflow:hidden; transition:height .22s ease}
.ord-body-inner{padding:0 18px 16px}

.ord-lines{border-top:1px solid #efefea}
.ord-line{display:flex; gap:12px; align-items:flex-start; padding:11px 0; border-bottom:1px solid #f4f4f0}
.ord-line:last-child{border-bottom:0}
.ord-line-main{flex:1}
.ord-line-main b{display:block; font-weight:600; font-size:13.5px; color:#2a2c27; margin-bottom:2px}
.ord-line-main span{font-size:12px; color:#8b8f87; line-height:1.5}
.ord-line-price{white-space:nowrap; font-weight:600; font-size:13.5px; color:#2a2c27}
.ord-sum{display:flex; justify-content:space-between; align-items:baseline; padding-top:10px;
         border-top:1px solid #efefea; font-size:14.5px; font-weight:650; color:#20221e}
.ord-sum-muted{border-top:0; padding-top:8px; font-size:12.5px; font-weight:500; color:#8b8f87}
.ord-sum-muted + .ord-sum{border-top:0; padding-top:4px}
.ord-lines + .ord-sum-muted{border-top:1px solid #efefea; padding-top:10px}
.ord-foot{margin-top:12px; font-size:12px; color:#8b8f87; line-height:1.55}

@media (prefers-reduced-motion:reduce){
  .ord, .ord-body, .ord-chevron{transition:none}
}

.field{margin-bottom:16px}
.field label{display:block; font-size:11px; color:#7e8279; margin-bottom:6px}
.field input{width:100%; padding:14px; font-size:16px; border:1px solid #e4e4de;
             border-radius:13px; font-family:inherit; color:#252720; background:#fafaf7}
.field input::placeholder{color:#aaada5}
.field input:focus{outline:none; border-color:#bba67e; box-shadow:0 0 0 3px rgba(184,154,104,.10); background:#fff}
.field .err{color:#c7665f; font-size:12.5px; margin-top:5px; display:none}
.field.bad input{border-color:#c7665f}
.field.bad .err{display:block}
.check{display:flex; gap:10px; align-items:flex-start; margin-bottom:12px; font-size:12px; line-height:1.5; color:#7e8279}
.check input{margin-top:2px; width:18px; height:18px; flex:0 0 auto}
.check a{color:#8f7249}

.flash{position:fixed; left:50%; transform:translateX(-50%); bottom:96px; background:#252720; color:#fff;
       padding:10px 18px; border-radius:12px; font-size:13px; font-weight:650; z-index:70;
       box-shadow:0 15px 38px rgba(35,36,32,.18)}

body.page{background:#f6f5f1; display:flex; align-items:center; justify-content:center; padding:24px}
.page-box{background:#fff; border-radius:22px; padding:34px 30px; max-width:520px; width:100%;
          box-shadow:0 10px 34px rgba(0,0,0,.08); text-align:center}
.page-logo{font-size:22px; font-weight:650; letter-spacing:-.6px; margin-bottom:22px; color:#22231f}
.page-logo span{display:block; font-size:10px; font-weight:400; letter-spacing:3px; color:#8e8069}
.page-box h1{font-family:inherit; font-weight:650; font-size:30px; letter-spacing:-1.2px; line-height:1.05; margin:0 0 10px; color:#20221e}
.code-box{font-family:inherit; font-size:34px; font-weight:750; letter-spacing:1px; color:#876a40;
          background:#f7f3ea; border:1px dashed #d8c7a7; border-radius:8px; padding:18px 24px;
          display:inline-block; margin:14px 0 18px}
.note{background:#f7f4ed; border:1px solid #eee8db; border-radius:14px; padding:14px 16px; font-size:12.5px;
      color:#706958; line-height:1.6; text-align:left; margin:18px 0}

/* Страница одного заказа: возврат с оплаты */
.status-pill{display:inline-block; padding:6px 14px; border-radius:999px; font-size:12px; font-weight:600;
             background:#f2efe8; color:#7c705c}
.status-pill.ok{background:#eff5f0; color:#40684c}
.status-pill.bad{background:#fdf1ef; color:#9b554f}
.order-lines{text-align:left; margin:20px 0 0; border-top:1px solid #eeeeea}
.order-line{display:flex; gap:12px; align-items:flex-start; padding:12px 0; border-bottom:1px solid #eeeeea}
.order-line-main{flex:1}
.order-line-main b{display:block; font-weight:600; font-size:13.5px; color:#2a2c27; margin-bottom:3px}
.order-line-main span{font-size:12px; color:#858981; line-height:1.5}
.order-line-price{white-space:nowrap; font-weight:600; font-size:13.5px; color:#2a2c27}
.order-total{display:flex; justify-content:space-between; align-items:baseline; padding:14px 0 0;
             font-size:15px; font-weight:650; color:#20221e}
.order-total-muted{padding-top:9px; font-size:12.5px; font-weight:500; color:#8b8f87}
.order-total-muted + .order-total{padding-top:6px}

@media (max-width:900px){
  .app{display:flex; flex-direction:column}
  .rail{display:none}
  .app-head{min-height:62px; padding:10px 16px}
  .steps{padding:0 18px 7px}
  .app-body{padding:22px 18px 28px}
  .app-foot{padding:12px 16px; padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  h2.step-h{font-size:34px}
  .branch{min-height:155px}
  .branch h3{margin-top:36px}
}
@media (max-width:560px){
  .grid-2{grid-template-columns:1fr}
  .branch{min-height:145px}
  .branch h3{font-size:23px; margin-top:28px}
  .branch:before{width:40px; height:40px; border-radius:12px}
  .app-body{padding-top:18px}
  .card{padding:17px 15px}
  .price{font-size:20px}
  .opts{gap:7px}
  .opt{padding:10px 12px}
  .f-total b{font-size:19px}
  .app-foot .btn{padding-inline:15px}
}
