/* =====================================================================
   MyCard live demo — точная копия UI мини-приложения внутри «телефона».
   Токены приложения (theme.css) переключаются вместе с темой лендинга.
   ===================================================================== */

/* ---------- секция на лендинге ---------- */
.demo-head { max-width: 42rem; margin-bottom: 40px; }
.demo-head h2 { font-size: clamp(1.6rem, 3.3vw, 2.15rem); letter-spacing: -.015em; margin-top: 12px; line-height: 1.14; }
.demo-head p { margin-top: 14px; color: var(--muted); font-size: 1.08rem; }

.demo-tabs { display: none; gap: 8px; margin-bottom: 22px; }
.demo-tab {
  flex: 1; font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  padding: 11px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
}
.demo-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.demo-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; justify-items: center; }
.demo-col[hidden] { display: none; }
.demo-col { width: 100%; max-width: 440px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.demo-cap { align-self: stretch; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.demo-cap b { font-family: var(--font-display); font-weight: 600; font-size: 1rem; letter-spacing: -.005em; }
.demo-cap span { color: var(--faint); font-size: .86rem; }
.demo-reset {
  font: inherit; font-size: .86rem; color: var(--muted); background: none; border: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 3px; padding: 4px;
}
.demo-reset:hover { color: var(--accent); }
.demo-foot { align-self: stretch; display: flex; flex-direction: column; gap: 10px; }
.demo-foot .btn { justify-content: center; }
.demo-foot p { color: var(--faint); font-size: .86rem; line-height: 1.5; }
.demo-progress { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .9rem; }
.demo-progress .bar { flex: 1; height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; }
.demo-progress .bar i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 6px; transition: width .35s ease; }
.demo-progress .num { font-family: var(--font-mono); font-size: .82rem; white-space: nowrap; }

@media (max-width: 960px) {
  .demo-tabs { display: flex; max-width: 440px; }
  .demo-stage { grid-template-columns: 1fr; }
}

/* ---------- токены приложения ---------- */
.mcd {
  --bg-primary: #ffffff;
  --bg-secondary: #f8f8f8;
  --text-primary: #000000;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --accent: #007AFF;
  --icon-invert: 0;
  --hint-color: #c7c7cc;
  --pill-bg: rgba(118, 118, 128, .14);
  width: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .mcd {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1c1c1e;
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --border-color: #2c2c2e;
    --accent: #0A84FF;
    --icon-invert: 1;
    --hint-color: #48484a;
    --pill-bg: rgba(235, 235, 245, .16);
  }
}
:root[data-theme="dark"] .mcd {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1c1c1e;
  --text-primary: #ffffff;
  --text-secondary: #aaaaaa;
  --border-color: #2c2c2e;
  --accent: #0A84FF;
  --icon-invert: 1;
  --hint-color: #48484a;
  --pill-bg: rgba(235, 235, 245, .16);
}

.mcd *, .mcd *::before, .mcd *::after { box-sizing: border-box; }
.mcd h2, .mcd h4, .mcd p { margin: 0; font-family: inherit; }
.mcd button { font-family: inherit; }
.mcd input, .mcd textarea { font-family: inherit; }

/* ---------- корпус телефона ---------- */
.mcd-fit { margin: 0 auto; }
.mcd-phone {
  width: 440px;
  transform-origin: 0 0;
  padding: 10px;
  border-radius: 54px;
  background: #0b0c0f;
  box-shadow: 0 0 0 1.5px #2a2d35 inset, 0 2px 6px rgba(13,25,45,.08), 0 44px 80px -30px rgba(20,45,110,.4);
}
.mcd-screen {
  position: relative;
  container-type: inline-size;
  width: 100%;
  height: 820px;
  border-radius: 44px;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  isolation: isolate;
}

/* верхняя часть: статус-бар + нативная шапка Telegram */
.mcd-top { position: absolute; z-index: 30; top: 0; left: 0; right: 0; height: 88px; background: var(--bg-primary); }
.mcd-status { position: relative; height: 46px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 34px; font-weight: 600; font-size: 15px; color: var(--text-primary); }
.mcd-island { position: absolute; left: 50%; top: 10px; width: 92px; height: 26px; margin-left: -46px; border-radius: 16px; background: #000; }
.mcd-sys { display: inline-flex; align-items: center; gap: 6px; }
.mcd-sys svg { display: block; fill: var(--text-primary); }
.mcd-pills { display: flex; justify-content: space-between; align-items: center; padding: 0 14px; height: 40px; }
.mcd-pill {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px;
  border: 0; border-radius: 999px; background: var(--pill-bg); color: var(--text-primary);
  font-size: 15px; font-weight: 600; cursor: pointer;
}
.mcd-pill svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mcd-pill-r { cursor: default; gap: 10px; padding: 0 14px; }

.mcd-scroll { position: absolute; z-index: 1; top: 88px; left: 0; right: 0; bottom: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; background: var(--bg-primary); }
.mcd-scroll::-webkit-scrollbar { display: none; }

/* ---------- Header ---------- */
.mcd-hd { display: flex; flex-direction: column; width: 100%; background: var(--bg-primary); padding: 24px 20px 8px 20px; }
.mcd-row { display: flex; flex-direction: row; align-items: flex-start; width: 100%; gap: 16px; margin-bottom: 16px; }
.mcd-avatar {
  width: 88px; height: 88px; min-width: 88px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 4px 12px rgba(0,0,0,.08); border: 1px solid rgba(0,0,0,.05); background: var(--bg-secondary);
}
.mcd-avatar.ed { border: 2px dashed #007AFF; cursor: pointer; }
.mcd-info { display: flex; flex-direction: column; flex: 1; min-width: 0; padding-top: 4px; }
.mcd-name { display: flex; align-items: center; gap: 8px; font-size: 22px; font-weight: 700; line-height: 1.3; color: var(--text-primary); margin-bottom: 8px; border-radius: 6px; word-break: break-word; }
.mcd-name.ed { border: 1px dashed #007AFF; cursor: pointer; }
.mcd-name .crown { cursor: pointer; }
.mcd-tagswrap { display: flex; flex-wrap: wrap; gap: 6px; }
.mcd-tagswrap.ed { border: 1px dashed #007AFF; border-radius: 8px; padding: 4px; cursor: pointer; }
.mcd-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0; align-items: center; }
.mcd-tag {
  color: var(--accent); font-size: 14px; font-weight: 500; line-height: 20px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--accent); display: inline-flex; align-items: center; background: var(--bg-secondary); height: 24px;
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: inline-block;
}
.mcd-tag-add { cursor: pointer; }
.mcd-biowrap { margin-bottom: 8px; width: 100%; }
.mcd-bio {
  font-size: 15px; color: var(--text-secondary); line-height: 1.4; margin: 0; white-space: pre-line; border-radius: 8px; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mcd-bio.ed { border: 1px dashed #007AFF; padding: 6px; cursor: pointer; }
.mcd-more { color: #007AFF; font-size: 14px; font-weight: 500; cursor: pointer; margin-top: 4px; display: inline-block; }
.mcd-addbio { color: #007AFF; font-size: 15px; font-weight: 500; cursor: pointer; padding: 8px 0; display: block; }

/* ---------- MenuLine ---------- */
.mcd-menu { width: 100%; display: flex; flex-direction: column; align-items: center; background: var(--bg-primary); padding: 12px 20px 8px 20px; }
.mcd-menurow { display: flex; flex-direction: row; justify-content: center; align-items: center; width: 100%; gap: 16px; margin-bottom: 20px; }
.mcd-rbtn {
  display: flex; align-items: center; justify-content: center; width: 20cqw; height: 32px; background: #3B82F6; color: #fff;
  border: 0; border-radius: 9999px; cursor: pointer; font-size: 16px; padding: 0;
}
.mcd-rbtn .mr { margin-right: 4px; }
.mcd-rbtn svg { display: block; }
.mcd-shwrap { width: 100%; display: flex; justify-content: center; position: relative; }
.mcd-btn-main {
  display: flex; align-items: center; justify-content: center; gap: 8px; background: #007AFF; color: #fff; font-size: 16px; font-weight: 600;
  border-radius: 24px; padding: 12px 32px; margin-bottom: 12px; box-shadow: 0 4px 10px rgba(0,0,0,.15); cursor: pointer; border: 0;
  animation: mcd-bounce .6s ease-out;
}
.mcd-btn-main.own { background: var(--bg-primary); color: var(--text-primary); cursor: default; border: 1px solid #007AFF; box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.mcd-btn-main.added { background: var(--bg-primary); color: #007AFF; border: 1px solid #007AFF; }
.mcd-cta { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }

/* ---------- Main (сетка соцсетей) ---------- */
.mcd-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); justify-items: center; align-items: center; gap: 8px;
  padding: 12px 16px 8px 16px; padding-bottom: 116px; background: var(--bg-primary); border-radius: 16px; width: 100%;
}
.mcd-soc {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; width: 88px; min-height: 108px;
  border-radius: 16px; padding: 8px; cursor: pointer; background: none; border: 0; color: inherit; font: inherit;
}
.mcd-soc.ed { border: 1px dashed #007AFF; }
.mcd-soc img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 6px; padding-top: 4px; transition: filter .3s ease; }
.mcd-soc img.mono, .mcd-mono { filter: invert(var(--icon-invert)); }
.mcd-soc .lbl { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 36px; max-width: 100%; }
.mcd-soc h4 { font-size: 15px; color: var(--text-primary); text-align: center; line-height: 1.2; word-break: break-word; font-weight: 500; }
.mcd-socadd {
  display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; padding: 10px; border-radius: 12px;
  border: 1px solid #007AFF; background: var(--bg-primary); width: 88px; height: 108px; color: inherit; font: inherit;
}
.mcd-socadd img { width: 44px; height: 44px; }
.mcd-socadd h4 { margin-top: 8px; font-size: 14px; font-weight: 500; color: #007AFF; text-align: center; }

/* ---------- Footer «Завершить редактирование» ---------- */
.mcd-foot { position: absolute; z-index: 20; left: 0; right: 0; bottom: 34px; display: flex; justify-content: center; pointer-events: none; }
.mcd-exit {
  pointer-events: auto; display: flex; align-items: center; justify-content: center; background: #007AFF; color: #fff; font-size: 16px; font-weight: 600;
  border-radius: 24px; padding: 12px 32px; box-shadow: 0 4px 10px rgba(0,0,0,.15); cursor: pointer; animation: mcd-bounce .6s ease-out;
}

/* ---------- модалки ---------- */
.mcd-layer { position: absolute; z-index: 40; top: 88px; left: 0; right: 0; bottom: 0; pointer-events: none; }
.mcd-ov {
  position: absolute; inset: 0; background: rgba(0,0,0,.4); display: flex; justify-content: center; align-items: center; padding: 16px;
  pointer-events: auto; animation: mcd-fade .3s ease both;
}
.mcd-ov.soft { background: rgba(0,0,0,.3); }
.mcd-ov.solid { background: var(--bg-primary); padding: 0; }
.mcd-ov.top { z-index: 3; background: rgba(0,0,0,.45); }
.mcd-mod {
  background: var(--bg-primary); color: var(--text-primary); border-radius: 18px; padding: 20px; width: 100%; max-width: 400px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: mcd-in .35s cubic-bezier(.25, 1, .5, 1) both; max-height: 100%; overflow-y: auto; scrollbar-width: none;
}
.mcd-mod::-webkit-scrollbar { display: none; }
.mcd-mod h2 { font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--text-primary); }
.mcd-mod .ttl { margin-bottom: 12px; }
.mcd-mod .center { text-align: center; }

.mcd-btns { display: flex; justify-content: flex-end; gap: 12px; }
.mcd-cancel { background: transparent; border: 0; color: #007AFF; font-size: 16px; cursor: pointer; padding: 8px 4px; }
.mcd-save { background: #007AFF; color: #fff; border: 0; border-radius: 10px; padding: 8px 16px; font-size: 16px; cursor: pointer; }
.mcd-save.lg { border-radius: 12px; padding: 10px; font-weight: 500; }
.mcd-btns.split { justify-content: space-between; gap: 10px; }
.mcd-btns.split > button { flex: 1; }

.mcd-inp {
  width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border-color); caret-color: #3b82f6;
  font-size: 14px; color: var(--text-primary); outline: none; background: var(--bg-secondary);
}
.mcd-m-name .mcd-inp { border: 1px solid #3b82f6; border-radius: 10px; font-size: 16px; margin-bottom: 20px; }

/* аватар */
.mcd-m-avatar { max-width: 400px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.mcd-m-avatar img { width: 140px; height: 140px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,.1); margin-bottom: 10px; }
.mcd-upload { background: #007AFF; color: #fff; border-radius: 12px; padding: 10px 18px; font-size: 15px; font-weight: 500; cursor: pointer; }
.mcd-m-avatar .mcd-btns { width: 100%; margin-top: 12px; }

/* био */
.mcd-m-bio { max-width: 420px; }
.mcd-m-bio textarea {
  width: 100%; height: 180px; border-radius: 12px; border: 1px solid var(--border-color); padding: 10px; font-size: 15px; resize: vertical;
  color: var(--text-primary); background: var(--bg-secondary); outline: none; caret-color: #3b82f6; display: block;
}
.mcd-m-bio textarea.limit { border-color: #ff3b30; }
.mcd-counter { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 13px; color: #666; }
.mcd-counter.limit { color: #ff3b30; }
.mcd-counter .q { cursor: pointer; margin-left: 6px; font-weight: 600; }
.mcd-m-bio .txt { font-size: 15px; color: var(--text-secondary); line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.mcd-m-bio .mcd-btns { margin-top: 16px; }

/* ссылка */
.mcd-m-link { max-width: 340px; padding: 24px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.mcd-lprev { display: flex; align-items: center; gap: 10px; background: var(--bg-secondary); padding: 10px 14px; border-radius: 12px; width: 100%; }
.mcd-lprev img { width: 32px; height: 32px; border-radius: 8px; }
.mcd-lprev span { font-weight: 500; font-size: 15px; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; }
.mcd-lfield { width: 100%; display: flex; flex-direction: column; gap: 4px; }
.mcd-lfield .cnt { align-self: flex-end; font-size: 12px; color: #999; }
.mcd-lfield .cnt.limit { color: #FF3B30; }
.mcd-hint { width: 100%; background: var(--bg-secondary); border-radius: 12px; padding: 8px 10px; font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; line-height: 1.3; }
.mcd-hint span:first-child { font-size: 16px; }
.mcd-icons { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: -6px; opacity: .7; }
.mcd-icons img { width: 20px; height: 20px; }
.mcd-m-link .mcd-btns { width: 100%; margin-top: 8px; }
.mcd-m-link .mcd-save { border-radius: 12px; padding: 10px; font-weight: 500; }
.mcd-del { background: #FF3B30; color: #fff; border: 0; border-radius: 12px; padding: 10px; font-size: 16px; font-weight: 500; cursor: pointer; width: 100%; margin-top: 4px; }

/* теги: добавление (на весь экран) и редактирование */
.mcd-m-acts { max-width: 360px; border-radius: 24px; padding: 24px; max-height: 92%; display: flex; flex-direction: column; gap: 20px; box-shadow: 0 8px 30px rgba(0,0,0,.15); }
.mcd-m-acts h2 { text-align: center; }
.mcd-actcnt { font-size: 13px; color: #999; text-align: center; }
.mcd-actcnt a { margin-left: 4px; color: #007AFF; cursor: pointer; }
.mcd-chips { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 12px; }
.mcd-chips.left { justify-content: flex-start; margin-bottom: 10px; }
.mcd-chip { background: var(--bg-secondary); color: var(--text-primary); border-radius: 20px; padding: 8px 14px; font-size: 14px; font-weight: 500; cursor: pointer; border: 0; transition: all .2s ease; }
.mcd-chip.on { background: var(--accent); color: #fff; }
.mcd-catt { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin: 0 0 8px; }
.mcd-actempty { color: var(--text-secondary); }
.mcd-m-acts label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--text-secondary); }
.mcd-m-acts .mcd-btns { width: 100%; margin-top: 12px; }
.mcd-m-acts .mcd-save { border-radius: 12px; padding: 10px; font-weight: 500; }
.mcd-m-edact { max-width: 420px; border-radius: 18px; }
.mcd-m-edact h2 { text-align: center; margin-bottom: 10px; }
.mcd-m-edact .mcd-chips { max-height: 250px; overflow-y: auto; }
.mcd-m-edact .mcd-chip { background: #f2f2f2; color: #000; }
.mcd-m-edact .mcd-chip.on { background: #007AFF; color: #fff; }
.mcd-m-edact .mcd-btns { margin-top: 36px; }
.mcd-m-edact .mcd-save { border-radius: 12px; padding: 10px; font-weight: 500; }

/* контакты и просмотры */
.mcd-m-list { max-width: 420px; border-radius: 20px; }
.mcd-m-list h2 { text-align: center; margin-bottom: 12px; }
.mcd-empty { text-align: center; color: #999; margin: 0 0 4px; }
.mcd-crow { position: relative; border-radius: 12px; margin-bottom: 8px; overflow: hidden; background: #FF3B30; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.mcd-cin { display: flex; align-items: center; background: var(--bg-secondary); padding: 10px 14px; border-radius: 12px; transition: transform .25s ease; cursor: pointer; position: relative; }
.mcd-crow.swiped .mcd-cin { transform: translateX(-64px); }
.mcd-cdel { position: absolute; right: 0; top: 0; bottom: 0; width: 64px; background: #FF3B30; color: #fff; border: 0; cursor: pointer; font-size: 14px; }
.mcd-cav { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; margin-right: 10px; flex-shrink: 0; }
.mcd-cname { font-size: 15px; font-weight: 500; color: var(--text-primary); }
.mcd-cbio { font-size: 13px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.mcd-swhint { text-align: center; font-size: 12px; color: var(--text-secondary); margin: 4px 0 2px; }
.mcd-closebtn { margin-top: 10px; background: #007AFF; color: #fff; border: 0; border-radius: 12px; padding: 10px; font-size: 16px; font-weight: 500; width: 100%; cursor: pointer; }
.mcd-avw { position: relative; margin-right: 10px; width: 40px; height: 40px; flex-shrink: 0; }
.mcd-avw img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: block; }
.mcd-newdot { position: absolute; top: -2px; right: -2px; width: 10px; height: 10px; border-radius: 50%; background: #FF3B30; border: 2px solid var(--bg-primary); }
.mcd-vmeta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 3px; }
.mcd-vpill { font-size: 11px; color: #007AFF; background: rgba(0,122,255,.12); padding: 2px 8px; border-radius: 999px; }
.mcd-vseen { font-size: 12px; color: var(--text-secondary); }
.mcd-promo { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: linear-gradient(135deg, #F8F3FF, #EAF2FF); border: 1px solid rgba(0,122,255,.2); padding: 12px 14px; border-radius: 12px; margin-bottom: 8px; cursor: pointer; font-size: 14px; font-weight: 600; color: #007AFF; }

/* настройки */
.mcd-m-set { max-width: 400px; border-radius: 22px; padding: 24px; box-shadow: 0 8px 28px rgba(0,0,0,.25); }
.mcd-m-set h2 { text-align: center; margin-bottom: 20px; }
.mcd-sec { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin: 10px 0 6px; }
.mcd-srow { display: flex; justify-content: space-between; align-items: center; background: var(--bg-secondary); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; gap: 10px; }
.mcd-srow span { font-size: 15px; color: var(--text-primary); }
.mcd-sw { flex: none; width: 44px; height: 26px; border-radius: 14px; background: var(--hint-color); position: relative; transition: background .3s ease; cursor: pointer; border: 0; padding: 0; }
.mcd-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; background: #fff; border-radius: 50%; transition: left .3s ease; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.mcd-sw.on { background: #007AFF; }
.mcd-sw.on::after { left: 20px; }
.mcd-prev { background: var(--bg-secondary); border: 1px solid rgba(0,122,255,.2); border-radius: 12px; padding: 10px 14px; color: var(--text-primary); font-size: 16px; cursor: pointer; width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; margin-bottom: 10px; }
.mcd-prev small { display: block; font-size: 12px; color: var(--text-secondary); }
.mcd-m-set .mcd-btns { margin-top: 20px; gap: 10px; }

/* QR */
.mcd-m-qr { width: 340px; max-width: 100%; padding: 24px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.mcd-m-qr svg { display: block; border-radius: 4px; max-width: 100%; height: auto; }
.mcd-qrcap { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; color: #fff; font-size: 13px; opacity: .85; padding: 0 24px; }

/* paywall и подтверждение */
.mcd-m-pay { max-width: 380px; border-radius: 24px; padding: 26px 22px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.mcd-m-pay .t { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.mcd-m-pay .s { text-align: center; font-size: 14px; color: var(--text-secondary); margin-bottom: 18px; }
.mcd-feat { display: flex; align-items: center; gap: 10px; background: var(--bg-secondary); border-radius: 14px; padding: 12px 14px; font-size: 14px; margin-bottom: 8px; color: var(--text-primary); }
.mcd-buy { display: block; text-align: center; text-decoration: none; margin-top: 18px; width: 100%; background: #007AFF; color: #fff; border: 0; border-radius: 14px; padding: 14px; font-size: 16px; font-weight: 600; cursor: pointer; }
.mcd-buy.alt { background: transparent; border: 1px solid rgba(0,122,255,.35); color: var(--text-primary); margin-top: 10px; }
.mcd-one { text-align: center; font-size: 12px; color: var(--text-secondary); margin-top: 8px; }
.mcd-later { margin-top: 12px; width: 100%; background: transparent; border: 0; color: #007AFF; font-size: 15px; cursor: pointer; }
.mcd-m-conf { max-width: 340px; }
.mcd-m-conf h2 { margin-bottom: 8px; }
.mcd-m-conf p { color: var(--text-secondary); font-size: 15px; margin-bottom: 16px; }
.mcd-m-conf .mcd-btns button { border: 0; border-radius: 10px; padding: 8px 16px; font-size: 16px; cursor: pointer; }
.mcd-m-conf .no { background: var(--bg-secondary); color: var(--text-primary); }
.mcd-m-conf .yes { background: var(--accent); color: #fff; }

/* тост / подсказка */
.mcd-toast {
  position: absolute; z-index: 90; top: 98px; left: 50%; transform: translateX(-50%); width: calc(100% - 40px); max-width: 320px;
  background: var(--bg-primary); color: var(--text-primary); border-radius: 16px; padding: 12px 16px; font-size: 14px; line-height: 1.4; text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.35); animation: mcd-down .25s ease; pointer-events: none;
}
.mcd-toast[hidden] { display: none; }

@keyframes mcd-fade { from { opacity: 0; } }
@keyframes mcd-in { from { opacity: 0; transform: translateY(20px); } }
@keyframes mcd-down { from { opacity: 0; transform: translate(-50%, -8px); } }
@keyframes mcd-bounce {
  0% { opacity: 0; transform: translateY(40px) scale(.9); }
  60% { opacity: 1; transform: translateY(-10px) scale(1.03); }
  80% { transform: translateY(4px) scale(.98); }
  100% { transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .mcd *, .mcd *::before, .mcd *::after { animation: none !important; transition: none !important; }
}

/* ---------- тур ---------- */
.mcd-tour { position: absolute; inset: 0; z-index: 70; pointer-events: none; }
.mcd-tb { position: absolute; background: rgba(0, 0, 0, .62); pointer-events: auto; }
.mcd-ring { position: absolute; border-radius: 16px; box-shadow: 0 0 0 2px var(--accent), 0 0 0 5px rgba(10, 132, 255, .28); pointer-events: none; transition: left .3s ease, top .3s ease, width .3s ease, height .3s ease; }
.mcd-ring.pulse { animation: mcd-pulse 1.7s ease-out infinite; }
.mcd-tip {
  position: absolute; pointer-events: auto; background: var(--bg-primary); color: var(--text-primary); border-radius: 18px; padding: 14px 16px 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .45); animation: mcd-in .3s ease both;
}
.mcd-tip .n { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--accent); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.mcd-tip h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; line-height: 1.3; color: var(--text-primary); font-family: inherit; }
.mcd-tip p { font-size: 13.5px; line-height: 1.45; color: var(--text-secondary); }
.mcd-tip .f { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.mcd-tip .skip { white-space: nowrap; background: none; border: 0; padding: 4px 0; font-size: 13px; color: var(--text-secondary); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.mcd-tip .nx { background: #007AFF; color: #fff; border: 0; border-radius: 12px; padding: 8px 16px; font-size: 14px; font-weight: 600; cursor: pointer; }
.mcd-tip .hint { font-size: 12px; font-weight: 600; color: var(--accent); text-align: right; line-height: 1.3; }
@keyframes mcd-pulse { 0% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 4px rgba(10, 132, 255, .5); } 100% { box-shadow: 0 0 0 2px var(--accent), 0 0 0 16px rgba(10, 132, 255, 0); } }
