/* MARSHAL VPN brand layer for the Mini App.
   Active only when <html class="brand-marshal"> (set in index.html). It sits on top of the
   template palettes in app.css and wins over every body[data-variant][data-mode] combination,
   so the branded look does not depend on the admin template or on the Telegram light/dark
   scheme. Business logic, API calls and markup produced by app.js are untouched.

   Selectors are prefixed with `html.brand-marshal body` on purpose: that specificity (0,2,2+)
   beats the per-template rules in app.css such as body[data-variant="h"] .card (0,2,1). */

html.brand-marshal {
  color-scheme: dark;
  /* Shown while the image loads and on iOS rubber-band overscroll. Matches the artwork. */
  background: #13070a;
}

html.brand-marshal body[data-variant][data-mode] {
  --bg: #13070a;
  --card: rgba(20, 14, 16, 0.88);
  --ink: #f3eadf;
  --sub: #bba999;
  --line: rgba(212, 175, 111, 0.18);
  --acc: #d4af6f;
  --accInk: #1a0e0a;
  --soft: rgba(212, 175, 111, 0.14);
  --chip: rgba(36, 24, 26, 0.92);
  --tabbg: rgba(16, 10, 12, 0.92);
  --ok: #7bd3a0;
  --warn: #f08a78;
  --ringoff: rgba(255, 240, 225, 0.12);
  --gold: #d4af6f;
  --radius: 16px;
}

html.brand-marshal body {
  /* The image lives on .app-bg; body must stay transparent or it would paint over it. */
  background: transparent;
  overflow-x: hidden;
  overflow-x: clip;
  transition: none;
}

/* ---------- single fixed background for the whole app ----------
   A fixed layer instead of background-attachment: fixed (broken in iOS WebView).
   It is created once in index.html, outside #screen, so tab/screen re-renders never touch
   it: no reload, no flicker, no jump. Its height is pinned by marshal.js to the device
   height, so expanding the Mini App or opening the keyboard does not rescale the art. */
html.brand-marshal .app-bg {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100lvh;
  z-index: -1;
  pointer-events: none;
  background-color: #13070a;
  background-image: url("img/marshal-bg.webp?v=1");
  background-repeat: no-repeat;
  background-size: cover;
  /* Portrait phones crop the sides: keep the eagle (right side of the art) in frame.
     Wide windows crop top/bottom: keep the emblem band. One rule, so the position never
     switches while the Telegram viewport changes height. */
  background-position: 78% 28%;
  transform: translateZ(0);
  will-change: transform;
}

/* ---------- surfaces ---------- */
html.brand-marshal body .card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 28px -18px rgba(0, 0, 0, 0.9);
}

/* The connection wizard is rendered straight onto the screen (no card): give it the same
   dense panel so titles and chips stay readable over the artwork. */
html.brand-marshal body .wiz {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 24px 14px 14px;
  min-height: calc(100vh - 190px);
}

html.brand-marshal body .plan-opt {
  background: var(--chip);
  border-color: var(--line);
}
html.brand-marshal body .plan-opt.on,
html.brand-marshal body .chip.on {
  border-color: var(--acc);
  background: var(--soft);
}

html.brand-marshal body .inp {
  background: rgba(8, 4, 5, 0.55);
  border-color: rgba(212, 175, 111, 0.24);
  color: var(--ink);
}
html.brand-marshal body .inp::placeholder {
  color: rgba(187, 169, 153, 0.75);
}
html.brand-marshal body .inp:focus {
  border-color: var(--acc);
}

html.brand-marshal body .link-box {
  background: rgba(8, 4, 5, 0.55);
}

/* ---------- buttons ---------- */
html.brand-marshal body .btn.primary {
  background: linear-gradient(135deg, #e6c88f 0%, #c99a55 100%);
  color: var(--accInk);
  border: 0;
  box-shadow: 0 8px 20px -12px rgba(212, 175, 111, 0.8);
}
html.brand-marshal body .btn.ghost {
  background: var(--chip);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: none;
}
html.brand-marshal body .wiz-chip.on {
  background: var(--acc);
  color: var(--accInk);
  border-color: var(--acc);
}

/* ---------- tab bar ---------- */
html.brand-marshal body .tabs {
  background: var(--tabbg);
  border-top: 1px solid var(--line);
}
html.brand-marshal body .tabs button.on {
  color: var(--acc);
}

/* ---------- states outside cards ---------- */
html.brand-marshal body .skel {
  color: var(--ink);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}
html.brand-marshal body .spinner {
  border-color: rgba(255, 240, 225, 0.16);
  border-top-color: var(--acc);
}
html.brand-marshal body .toast {
  background: rgba(20, 14, 16, 0.96);
  color: var(--ink);
  border: 1px solid rgba(212, 175, 111, 0.35);
}

/* Small captions that sit directly on the artwork (e.g. version line under the account). */
html.brand-marshal body .screen > :not(.card):not(.wiz) {
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

/* ---------- sales storefront (start screen, approved mockup) ----------
   Palette: #1D040A bg · #30090D bg-2 · #590F16 burgundy · #D4AF6F gold · #F5E3C5 light gold ·
   #F5F1EB text. Cards are dense (readability over the artwork), the active one glows gold. */
html.brand-marshal body.sf-mode .screen {
  gap: 14px;
  padding-top: 20px;
}
html.brand-marshal .sf-head {
  display: grid;
  gap: 14px;
  padding: 2px 4px 0;
}
html.brand-marshal .sf-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
html.brand-marshal .sf-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(212, 175, 111, 0.45), 0 6px 22px -8px rgba(212, 175, 111, 0.55);
}
html.brand-marshal .sf-word {
  font: 800 22px/1 "Montserrat", system-ui, sans-serif;
  letter-spacing: 0.02em;
  color: #f5f1eb;
}
html.brand-marshal .sf-word span {
  color: #d4af6f;
}
html.brand-marshal .sf-title {
  margin: 4px 0 0;
  font: 800 clamp(28px, 8.6vw, 40px) / 1.08 "Montserrat", system-ui, sans-serif;
  letter-spacing: -0.01em;
  color: #f5f1eb;
  text-wrap: balance;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}
html.brand-marshal .sf-sub {
  margin: 0;
  max-width: 32ch;
  color: rgba(245, 241, 235, 0.85);
  font-size: 15.5px;
  line-height: 1.45;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
html.brand-marshal .sf-list {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}
html.brand-marshal .sf-card {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  position: relative;
  padding: 14px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 111, 0.22);
  background: linear-gradient(180deg, rgba(48, 9, 13, 0.93), rgba(29, 4, 10, 0.93));
  box-shadow: 0 10px 26px -18px rgba(0, 0, 0, 0.9);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s, transform 0.08s;
}
html.brand-marshal .sf-card.on {
  border-color: #e9c98f;
  background: linear-gradient(180deg, rgba(89, 15, 22, 0.96), rgba(48, 9, 13, 0.96));
  box-shadow: 0 0 0 1px rgba(233, 201, 143, 0.55), 0 0 24px -4px rgba(233, 150, 90, 0.55),
    inset 0 0 26px -14px rgba(245, 227, 197, 0.55);
}
html.brand-marshal .sf-card:active {
  transform: scale(0.992);
}
html.brand-marshal .sf-card:focus-visible,
html.brand-marshal .sf-pay:focus-visible {
  outline: 2px solid #f5e3c5;
  outline-offset: 2px;
}
html.brand-marshal .sf-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}
html.brand-marshal .sf-label {
  font: 700 18px/1.2 "Montserrat", system-ui, sans-serif;
  color: #f5f1eb;
}
html.brand-marshal .sf-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 99px;
  white-space: nowrap;
  background: linear-gradient(135deg, #f5e3c5, #d4af6f);
  color: #2a0a0e;
  font: 700 13px/1 "Montserrat", system-ui, sans-serif;
  box-shadow: 0 4px 12px -6px rgba(212, 175, 111, 0.8);
}
html.brand-marshal .sf-pill svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}
html.brand-marshal .sf-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
html.brand-marshal .sf-prices {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  flex: 1 1 auto;
  min-width: 0;
}
html.brand-marshal .sf-old {
  color: rgba(245, 241, 235, 0.45);
  font: 600 15px/1 "Montserrat", system-ui, sans-serif;
  text-decoration-thickness: 2px;
  white-space: nowrap;
}
html.brand-marshal .sf-price {
  color: #f5f1eb;
  font: 800 clamp(22px, 6.6vw, 28px) / 1 "Montserrat", system-ui, sans-serif;
  white-space: nowrap;
}
html.brand-marshal .sf-sep {
  width: 1px;
  align-self: stretch;
  background: rgba(212, 175, 111, 0.28);
}
html.brand-marshal .sf-month {
  color: #d4af6f;
  font: 700 clamp(15px, 4.4vw, 19px) / 1.1 "Montserrat", system-ui, sans-serif;
  white-space: nowrap;
}
@media (max-width: 359px) {
  html.brand-marshal .sf-card-row {
    flex-wrap: wrap;
  }
  html.brand-marshal .sf-sep {
    display: none;
  }
  html.brand-marshal .sf-month {
    width: 100%;
  }
}
html.brand-marshal .sf-pay {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  width: 100%;
  min-height: 60px;
  margin-top: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: pointer;
  border-radius: 20px;
  background: linear-gradient(180deg, #f5e3c5 0%, #d4af6f 55%, #c99a55 100%);
  color: #1d040a;
  font: 800 clamp(18px, 5.2vw, 22px) / 1 "Montserrat", system-ui, sans-serif;
  box-shadow: 0 10px 26px -12px rgba(212, 175, 111, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.08s, opacity 0.15s;
}
html.brand-marshal .sf-pay:active {
  transform: scale(0.99);
}
html.brand-marshal .sf-pay:disabled {
  opacity: 0.55;
  cursor: default;
}
html.brand-marshal .sf-arrow {
  font-size: 1.15em;
}
html.brand-marshal .sf-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 2px 10px 6px;
  color: rgba(245, 241, 235, 0.85);
  font-size: 13.5px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
html.brand-marshal .sf-shield {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  color: #d4af6f;
}
html.brand-marshal .sf-shield svg {
  width: 100%;
  height: 100%;
  display: block;
}
html.brand-marshal .sf-empty {
  display: grid;
  gap: 6px;
  padding: 22px;
  text-align: center;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
}
/* Admin-entered texts may contain long unbreakable words — never let them widen the page. */
html.brand-marshal .sf-label,
html.brand-marshal .sf-title,
html.brand-marshal .sf-sub,
html.brand-marshal .sf-foot span {
  min-width: 0;
  overflow-wrap: anywhere;
}
html.brand-marshal body.sf-mode .receipt-field .sub {
  color: rgba(245, 241, 235, 0.88);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
html.brand-marshal body.sf-mode .receipt-inp {
  background: rgba(29, 4, 10, 0.88);
  border-color: rgba(212, 175, 111, 0.35);
  color: #f5f1eb;
}

/* ---------- compact storefront (owner feedback 23.11): smaller cards, button and receipt field ---------- */
html.brand-marshal body.sf-mode .screen {
  gap: 10px;
  padding-top: 14px;
}
html.brand-marshal .sf-head {
  gap: 10px;
}
html.brand-marshal .sf-logo {
  width: 48px;
  height: 48px;
}
html.brand-marshal .sf-word {
  font-size: 18px;
}
html.brand-marshal .sf-title {
  margin-top: 2px;
  font-size: clamp(24px, 7.2vw, 32px);
}
html.brand-marshal .sf-sub {
  font-size: 14px;
}
html.brand-marshal .sf-list {
  gap: 9px;
  margin-top: 4px;
}
html.brand-marshal .sf-card {
  padding: 10px 14px 12px;
  border-radius: 16px;
}
html.brand-marshal .sf-card-top {
  min-height: 24px;
}
html.brand-marshal .sf-label {
  font-size: 15px;
}
html.brand-marshal .sf-pill {
  padding: 5px 10px;
  font-size: 11.5px;
  gap: 5px;
}
html.brand-marshal .sf-pill svg {
  width: 13px;
  height: 13px;
}
html.brand-marshal .sf-card-row {
  margin-top: 8px;
  gap: 10px;
}
html.brand-marshal .sf-old {
  font-size: 13px;
}
html.brand-marshal .sf-price {
  font-size: clamp(19px, 5.6vw, 23px);
}
html.brand-marshal .sf-month {
  font-size: clamp(13.5px, 3.9vw, 16px);
}
html.brand-marshal .sf-pay {
  min-height: 50px;
  margin-top: 4px;
  gap: 10px;
  border-radius: 16px;
  /* not pure black: deep burgundy reads softer on the gold and matches the brand */
  color: #3b0d14;
  font-size: clamp(16px, 4.6vw, 18px);
  font-weight: 700;
  letter-spacing: 0.01em;
}
html.brand-marshal .sf-foot {
  font-size: 12.5px;
  gap: 8px;
}
html.brand-marshal .sf-shield {
  width: 22px;
  height: 22px;
}
/* compact receipt e-mail (font stays 16px: smaller makes iOS zoom the page on focus) */
html.brand-marshal body.sf-mode .receipt-field {
  gap: 4px;
  margin-top: 2px;
}
html.brand-marshal body.sf-mode .receipt-field .sub {
  font-size: 12px;
}
html.brand-marshal body.sf-mode .receipt-inp {
  padding: 8px 12px;
  min-height: 40px;
  border-radius: 12px;
  font-size: 16px;
}
/* ---------- inset storefront (owner feedback 25.11, blue reference): wider side margins,
   cards/button no longer edge-to-edge, roomier cards, calmer headline ---------- */
html.brand-marshal body.sf-mode .screen {
  padding-left: clamp(22px, 8vw, 38px);
  padding-right: clamp(22px, 8vw, 38px);
  gap: 12px;
}
html.brand-marshal body.sf-mode .sf-title {
  font-size: clamp(23px, 6.6vw, 30px);
  line-height: 1.12;
}
html.brand-marshal body.sf-mode .sf-sub {
  font-size: 13.5px;
  line-height: 1.45;
  max-width: 30ch;
}
html.brand-marshal body.sf-mode .sf-list {
  gap: 12px;
  margin-top: 8px;
}
html.brand-marshal body.sf-mode .sf-card {
  padding: 14px 18px 16px;
  border-radius: 20px;
}
html.brand-marshal body.sf-mode .sf-card-row {
  margin-top: 10px;
}
html.brand-marshal body.sf-mode .sf-pay {
  min-height: 54px;
  margin-top: 8px;
  border-radius: 18px;
}
html.brand-marshal body.sf-mode .sf-foot {
  padding: 0 4px;
  font-size: 12px;
}
/* success header above the setup wizard after a confirmed payment */
html.brand-marshal body .paid-card {
  border-color: rgba(123, 211, 160, 0.45);
}
html.brand-marshal body .paid-title {
  font: 700 16px/1.3 "Montserrat", system-ui, sans-serif;
  color: #f5f1eb;
}
html.brand-marshal .sf-back {
  justify-self: start;
  appearance: none;
  border: 0;
  background: none;
  padding: 4px 0;
  color: rgba(245, 241, 235, 0.85);
  font: 600 14px/1 "Montserrat", system-ui, sans-serif;
  cursor: pointer;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* ---------- website (/web): e-mail code login + desktop framing ---------- */
html[data-web="1"] .tabs {
  max-width: 480px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-radius: 14px 14px 0 0;
}
body.login-mode .tabs {
  display: none;
}
body.login-mode .screen {
  min-height: 100vh;
  min-height: 100dvh;
  align-content: center;
  max-width: 400px;
  padding-bottom: 32px;
}
.login-head {
  text-align: center;
  display: grid;
  gap: 6px;
  justify-items: center;
}
.login-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
}
.login-head h1 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0.01em;
}
.login-head .sub {
  font-size: 13.5px;
  max-width: 320px;
}
.login-card {
  display: grid;
  gap: 8px;
}
.login-lbl {
  font-size: 12.5px;
  color: var(--sub);
}
.login-card .inp {
  width: 100%;
  box-sizing: border-box;
  font-size: 16px; /* 16px+ keeps iOS Safari from zooming into the field */
}
.login-code {
  letter-spacing: 0.4em;
  text-align: center;
  font-size: 22px !important;
  font-weight: 700;
}
.login-sent {
  font-size: 13px;
}
.login-err {
  color: var(--warn);
  font-size: 13px;
  min-height: 1em;
}
.login-err:empty {
  display: none;
}
.login-links {
  margin-top: 2px;
}
.logout-btn {
  width: 100%;
}

/* website guest: «Войти» on the storefront, «‹ К тарифам» on the login screen */
.sf-head {
  position: relative;
}
.sf-signin {
  position: absolute;
  top: 2px;
  right: 0;
  z-index: 1;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 111, 0.45);
  background: rgba(20, 14, 16, 0.6);
  color: var(--acc);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.login-back {
  justify-self: start;
}

/* login alternatives + guest warnings */
.login-alt { display: grid; gap: 8px; }
.login-alt .btn { width: 100%; }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--sub); font-size: 12.5px; margin: 2px 0; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-guest-btn { opacity: 0.85; }
.login-wait { text-align: center; }
.login-card a.btn { text-align: center; text-decoration: none; display: block; }
.guest-warn-title { font-weight: 800; color: var(--acc); font-size: 15px; }
.guest-warn-list { margin: 4px 0 0; padding-left: 18px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.4; }
.guest-warn-tip { font-size: 13px; color: var(--sub); }
/* the consent checkbox: a highlighted gold box so nobody misses it */
.guest-agree {
  position: relative; display: flex; gap: 12px; align-items: center; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; margin: 2px 0;
  border: 2px dashed rgba(212, 175, 111, 0.9);
  background: rgba(212, 175, 111, 0.1);
  animation: guest-pulse 1.8s ease-in-out infinite;
  -webkit-tap-highlight-color: transparent;
}
.guest-agree input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.guest-check {
  flex: none; width: 28px; height: 28px; border-radius: 8px;
  border: 2px solid var(--acc); background: rgba(8, 4, 5, 0.6);
  display: grid; place-items: center; transition: background 0.15s, transform 0.15s;
}
.guest-check::after {
  content: ""; width: 8px; height: 14px; margin-top: -3px;
  border: solid #3b0d14; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0);
  transition: transform 0.15s;
}
.guest-agree-text { display: grid; gap: 2px; font-size: 13px; line-height: 1.35; }
.guest-agree-text b { color: var(--acc); font-size: 13.5px; }
.guest-agree:focus-within .guest-check { box-shadow: 0 0 0 3px rgba(212, 175, 111, 0.35); }
.guest-agree.on {
  animation: none; border-style: solid; border-color: #5fb98a; background: rgba(95, 185, 138, 0.12);
}
.guest-agree.on .guest-check { background: var(--acc); }
.guest-agree.on .guest-check::after { transform: rotate(45deg) scale(1); }
.guest-agree.on .guest-agree-text b { color: #7fd3a6; }
.guest-agree.nudge { animation: guest-shake 0.45s ease, guest-pulse 1.8s ease-in-out 0.45s infinite; border-color: #ffd27a; background: rgba(255, 210, 122, 0.18); }
.guest-go.off { opacity: 0.55; }
@keyframes guest-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 111, 0.0); }
  50% { box-shadow: 0 0 0 6px rgba(212, 175, 111, 0.22); }
}
@keyframes guest-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); } 40% { transform: translateX(7px); }
  60% { transform: translateX(-5px); } 80% { transform: translateX(5px); }
}
@media (prefers-reduced-motion: reduce) {
  .guest-agree, .guest-agree.nudge { animation: none; }
}
.guest-strip {
  width: 100%; text-align: left; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  padding: 9px 12px; border-radius: 12px; color: var(--acc);
  background: rgba(20, 14, 16, 0.85); border: 1px solid rgba(212, 175, 111, 0.45);
}
.guest-card { border: 1px solid rgba(212, 175, 111, 0.55); display: grid; gap: 10px; }
.guest-actions { gap: 8px; flex-wrap: wrap; }
.guest-tg { display: grid; gap: 8px; }
.guest-tg a.btn { text-align: center; text-decoration: none; }

/* ---------- «folder» plan card (owner reference 25.11) ----------
   Three opaque layers so borders never double up: the body (::before) sits --tab lower, the tab
   (.sf-tab, sized to the label) and its sloped edge (.sf-tab::after, a skewed block) cover the
   body's top border where they join it; the tickets badge sits on the body line at the right. */
html.brand-marshal body .sf-list .sf-card.sf-folder {
  --tab: 22px;
  --edge: #5b2c27;
  --fill: #34090f;
  --fill2: #1d050a;
  isolation: isolate;
  padding: calc(var(--tab) + 20px) 18px 15px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transition: filter 0.2s, transform 0.08s;
}
html.brand-marshal body .sf-list .sf-card.sf-folder.on {
  --edge: #e9c98f;
  --fill: #5c111b;
  --fill2: #2f0810;
  filter: drop-shadow(0 0 12px rgba(233, 150, 90, 0.42));
}
html.brand-marshal body .sf-list .sf-card.sf-folder::before {
  content: "";
  position: absolute;
  inset: var(--tab) 0 0 0;
  z-index: -3;
  border: 1px solid var(--edge);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--fill) 0, var(--fill) 22px, var(--fill2) 100%);
  transition: background 0.2s, border-color 0.2s;
}
/* soft glass glint on the right, like the reference */
html.brand-marshal body .sf-list .sf-card.sf-folder::after {
  content: "";
  position: absolute;
  right: 6%;
  top: var(--tab);
  width: 50%;
  height: 75%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(245, 227, 197, 0.11), transparent);
}
html.brand-marshal body .sf-list .sf-folder .sf-tab {
  position: absolute;
  left: 0;
  top: 0;
  z-index: -2;
  height: calc(var(--tab) + 22px);
  min-width: 34%;
  max-width: calc(100% - 150px);
  box-sizing: border-box;
  padding: 7px 10px 0 18px;
  border: 1px solid var(--edge);
  border-right: 0;
  border-bottom: 0;
  border-radius: 20px 0 0 0;
  background: var(--fill);
  transition: background 0.2s, border-color 0.2s;
}
html.brand-marshal body .sf-list .sf-folder .sf-tab::after {
  content: "";
  position: absolute;
  top: -1px;
  left: calc(100% - 1px);
  width: 34px;
  height: calc(var(--tab) + 2px);
  border-top: 1px solid var(--edge);
  border-right: 1px solid var(--edge);
  border-top-right-radius: 10px;
  background: var(--fill);
  transform: skewX(42deg);
  transform-origin: bottom left;
  transition: background 0.2s, border-color 0.2s;
}
html.brand-marshal body .sf-list .sf-folder .sf-label {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font: 600 15px/1.2 "Montserrat", system-ui, sans-serif;
  color: #f5f1eb;
}
html.brand-marshal body .sf-list .sf-folder .sf-pill {
  position: absolute;
  top: 0;
  right: 16px;
  height: calc(var(--tab) + 1px);
  padding: 0 12px;
  border-radius: 11px 11px 0 0;
  font-size: 11.5px;
  box-shadow: none;
}
html.brand-marshal body .sf-list .sf-folder .sf-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 0;
}
html.brand-marshal body .sf-list .sf-folder .sf-prices {
  align-items: baseline;
  gap: 2px 10px;
}
html.brand-marshal body .sf-list .sf-folder .sf-price {
  font-size: clamp(21px, 6.2vw, 26px);
}
html.brand-marshal body .sf-list .sf-folder .sf-month {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: auto;
  text-align: right;
  color: #f5e3c5;
  font: 800 clamp(16px, 4.8vw, 20px) / 1.08 "Montserrat", system-ui, sans-serif;
}
html.brand-marshal body .sf-list .sf-folder .sf-month b {
  font-weight: 800;
}
html.brand-marshal body .sf-list .sf-folder:not(.on) .sf-month {
  color: #e6d6bf;
}
@media (max-width: 359px) {
  html.brand-marshal body .sf-list .sf-folder .sf-card-row {
    flex-wrap: nowrap;
  }
}

/* guest phone at checkout (M30) */
html.brand-marshal body .phone-field .phone-hint {
  font-size: 11.5px;
  line-height: 1.35;
  opacity: 0.75;
}

/* «🎟 Мои билеты» in «Кабинет» (M30) */
html.brand-marshal body .tickets-card { display: grid; gap: 12px; }
html.brand-marshal body .tickets-head {
  appearance: none; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 2px 0; text-align: left;
}
html.brand-marshal body .tickets-head b { flex: 1 1 auto; font-size: 15.5px; }
html.brand-marshal body .tickets-ico { font-size: 20px; line-height: 1; }
html.brand-marshal body .tickets-count {
  min-width: 26px; height: 26px; padding: 0 8px; border-radius: 99px; display: inline-grid; place-items: center;
  background: linear-gradient(135deg, #f5e3c5, #d4af6f); color: #2a0a0e; font: 800 12.5px/1 "Montserrat", system-ui, sans-serif;
}
html.brand-marshal body .tickets-chev { opacity: 0.7; font-size: 13px; }
html.brand-marshal body .tickets-group {
  display: grid; gap: 6px; padding-top: 12px; border-top: 1px solid rgba(212, 175, 111, 0.18);
}
html.brand-marshal body .tickets-won {
  padding: 8px 10px; border-radius: 10px; background: rgba(123, 211, 160, 0.14);
  border: 1px solid rgba(123, 211, 160, 0.45); font-size: 13px; font-weight: 600;
}
html.brand-marshal body .ticket-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 4px;
}
html.brand-marshal body .ticket {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 8px; border-radius: 10px; border: 1px dashed rgba(212, 175, 111, 0.55);
  background: rgba(212, 175, 111, 0.08); color: #f5e3c5;
  font: 700 14px/1 "SF Mono", Menlo, Consolas, monospace; letter-spacing: 0.06em; white-space: nowrap;
}
html.brand-marshal body .ticket.won {
  border-style: solid; border-color: #e9c98f; background: rgba(233, 201, 143, 0.22);
  box-shadow: 0 0 14px -4px rgba(233, 150, 90, 0.6);
}
html.brand-marshal body .ticket.off { opacity: 0.45; text-decoration: line-through; }
