/* slotmaster — стили */
:root {
  --mb-black: #0c0d10;
  --mb-ink: #292b32;
  --mb-ink-muted: #757987;
  --mb-gray-400: #b4beca;
  --mb-gray-300: #d2d8de;
  --mb-gray-250: #dfe3e8;
  --mb-gray-200: #e8ebee;
  --mb-gray-100: #f0f3f6;
  --mb-white: #ffffff;
  --mb-green: #39aa5d;
  --mb-green-700: #30a257;
  --mb-green-mint: #56d67f;
  --mb-green-deep: #055755;
  --mb-blue: #0682c3;
  --mb-red: #ff1d29;
  --mb-yellow: #fdcc41;

  --text-primary: var(--mb-ink);
  --text-secondary: var(--mb-ink-muted);
  --text-disabled: var(--mb-gray-400);
  --surface-page: var(--mb-gray-100);
  --surface-card: var(--mb-white);
  --surface-subtle: var(--mb-gray-100);
  --border-default: var(--mb-gray-200);
  --border-strong: var(--mb-gray-400);
  --action-primary: var(--mb-green);
  --action-primary-hover: var(--mb-green-700);
  --action-secondary: var(--mb-gray-250);
  --accent-soft: #e6f5eb;

  --radius-s: 8px; --radius-m: 10px; --radius-l: 12px; --radius-xl: 20px; --radius-pill: 999px;
  --shadow-card: 0 4px 24px rgba(41, 43, 50, .08);
  --shadow-raised: 0 12px 48px rgba(12, 13, 16, .16);
  --ease: cubic-bezier(.2, 0, .2, 1);
  --font: "CoFo Sans Variable", "CoFo Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--surface-page);
  color: var(--text-primary);
  font: 400 16px/1.44 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--mb-blue); }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--text-secondary); }

/* ---------- Каркас ---------- */
.shell { max-width: 1040px; margin: 0 auto; padding: 32px 16px 48px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; margin-bottom: 20px; }
.brand-logo { display: block; height: 22px; width: auto; color: var(--mb-black, #292b32); }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--mb-black); display: grid; place-items: center; }
.brand-mark span { width: 10px; height: 10px; border-radius: 50%; background: var(--mb-green); }
.card { background: var(--surface-card); border-radius: var(--radius-xl); box-shadow: var(--shadow-card); }

/* ---------- Бронирование: две колонки как в Google Calendar ---------- */
.booking { display: grid; grid-template-columns: 320px 1fr; min-height: 560px; }
.side { padding: 32px; border-right: 1px solid var(--border-default); display: flex; flex-direction: column; gap: 20px; }
.main { padding: 32px; min-width: 0; }

.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--mb-black); color: var(--mb-white); display: grid; place-items: center; font-weight: 700; font-size: 20px; }
.host-name { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 12px 0 4px; }
.host-title { color: var(--text-secondary); font-size: 14px; }
.intro { font-size: 14px; color: var(--text-secondary); margin: 0; }

.field-label { font-size: 12px; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 8px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border-strong); background: var(--surface-card); border-radius: var(--radius-pill);
  padding: 8px 16px; font-weight: 500; cursor: pointer; transition: all 120ms var(--ease);
}
.chip:hover { border-color: var(--mb-ink); }
.chip[aria-pressed="true"] { background: var(--mb-ink); border-color: var(--mb-ink); color: var(--mb-white); }

.select, .input, .textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-l);
  background: var(--surface-card); padding: 12px 14px; outline: none; transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease);
}
.select:focus, .input:focus, .textarea:focus { border-color: var(--mb-ink); box-shadow: 0 0 0 3px rgba(41, 43, 50, .12); }
.textarea { min-height: 96px; resize: vertical; }

.summary { background: var(--surface-subtle); border-radius: var(--radius-l); padding: 14px 16px; font-size: 14px; display: grid; gap: 4px; }
.summary b { font-size: 16px; }

.steps { display: flex; gap: 8px; margin-bottom: 24px; font-size: 14px; color: var(--text-secondary); flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; }
.step i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-subtle); font-weight: 600; font-size: 12px; }
.step.on { color: var(--text-primary); font-weight: 500; }
.step.on i { background: var(--mb-ink); color: var(--mb-white); }
.step.done i { background: var(--mb-green); color: var(--mb-white); }
.step + .step::before { content: ""; width: 24px; height: 1px; background: var(--border-strong); }

h2.title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 16px; }

/* Календарь месяца + слоты */
.pick { display: grid; grid-template-columns: minmax(280px, 1fr) 200px; gap: 32px; }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.month-head b { font-size: 16px; }
.month-head b::first-letter { text-transform: uppercase; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; cursor: pointer; font-size: 18px; color: var(--text-primary); }
.icon-btn:hover:not(:disabled) { background: var(--surface-subtle); }
.icon-btn:disabled { color: var(--text-disabled); cursor: default; }
.grid7 { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.dow { font-size: 12px; color: var(--text-secondary); padding: 6px 0; font-weight: 500; }
.day {
  aspect-ratio: 1; max-width: 48px; width: 100%; margin: 0 auto; border-radius: 50%; border: 0; background: transparent;
  font-weight: 500; cursor: pointer; color: var(--text-disabled);
}
.day.avail { color: var(--mb-green-deep); background: var(--accent-soft); }
.day.avail:hover { background: #cfeedb; }
.day.today { box-shadow: inset 0 0 0 1px var(--border-strong); }
.day[aria-selected="true"], .day.avail[aria-selected="true"], .day.avail[aria-selected="true"]:hover { background: var(--mb-green); color: var(--mb-white); }
.day:disabled { cursor: default; }

.slots { display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow-y: auto; padding-right: 4px; }
.slots-day { font-weight: 600; margin-bottom: 8px; }
.slots-day::first-letter { text-transform: uppercase; }
.slot {
  border: 1px solid var(--mb-green); color: var(--mb-green-deep); background: var(--surface-card);
  border-radius: var(--radius-l); padding: 10px 12px; font-weight: 600; cursor: pointer; transition: all 120ms var(--ease);
}
.slot:hover { background: var(--accent-soft); }
.empty { color: var(--text-secondary); font-size: 14px; padding: 12px 0; }

/* Форма */
.form { display: grid; gap: 16px; max-width: 480px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.err { color: #c4111a; font-size: 14px; }
.btns { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  border-radius: var(--radius-l); padding: 14px 22px; font-weight: 600; font-size: 16px; text-decoration: none; transition: background 120ms var(--ease);
}
.btn-primary { background: var(--action-primary); color: var(--mb-white); }
.btn-primary:hover { background: var(--action-primary-hover); }
.btn-primary:disabled { background: var(--mb-gray-300); cursor: default; }
.btn-secondary { background: var(--action-secondary); color: var(--text-primary); }
.btn-secondary:hover { background: var(--mb-gray-300); }
.btn-ghost { background: transparent; color: var(--text-primary); padding-left: 0; padding-right: 0; }
.btn-ghost:hover { text-decoration: underline; }

/* Финальный экран */
.done-badge { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--mb-green); display: grid; place-items: center; font-size: 28px; margin-bottom: 16px; }
.copy-row { display: flex; gap: 8px; align-items: stretch; margin: 8px 0 24px; }
.copy-row .input { font-size: 14px; background: var(--surface-subtle); }
.note { font-size: 14px; color: var(--text-secondary); }

.spinner { width: 24px; height: 24px; border: 3px solid var(--border-default); border-top-color: var(--mb-green); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--mb-ink); color: var(--mb-white); padding: 12px 18px; border-radius: var(--radius-l); box-shadow: var(--shadow-raised); font-size: 14px; }

/* ---------- Кабинет ---------- */
.panel { padding: 32px; }
.settings { display: grid; gap: 24px; }
.settings section { display: grid; gap: 12px; padding-bottom: 24px; border-bottom: 1px solid var(--border-default); }
.settings section:last-of-type { border-bottom: 0; }
.settings h3 { margin: 0; font-size: 16px; }
.days { display: flex; gap: 6px; flex-wrap: wrap; }
.linkbox { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--accent-soft); border-radius: var(--radius-l); padding: 14px 16px; }
.linkbox a { color: var(--mb-green-deep); font-weight: 600; word-break: break-all; }
.hint { font-size: 13px; color: var(--text-secondary); }

/* ---------- Часовой пояс с поиском ---------- */
.tzp { position: relative; max-width: 420px; }
.tzp-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; cursor: pointer; }
.tzp-btn svg { color: var(--text-secondary); flex: none; }
.tzp-pop {
  position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface-card);
  border-radius: var(--radius-l); box-shadow: var(--shadow-raised); padding: 8px; min-width: 280px;
}
.tzp-search { margin-bottom: 6px; }
.tzp-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.tzp-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--radius-s); cursor: pointer; font-size: 15px; }
.tzp-item:hover, .tzp-item.on { background: var(--surface-subtle); }
.tzp-item.sel { font-weight: 600; }
.tzp-item.sel::after { content: "✓"; color: var(--mb-green); margin-left: auto; }
.tzp-item.sel .muted { margin-left: auto; }
.tzp-sep { border-bottom: 1px solid var(--border-default); border-radius: var(--radius-s) var(--radius-s) 0 0; margin-bottom: 4px; }
.tzp-empty { padding: 12px; color: var(--text-secondary); font-size: 14px; }

/* ---------- Поле с иконкой «копировать» ---------- */
.copy-field { position: relative; flex: 1; min-width: 0; }
.copy-field .input { padding-right: 48px; }
.copy-icon {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: var(--radius-s);
  background: transparent; color: var(--text-secondary); display: grid; place-items: center; cursor: pointer; transition: all 120ms var(--ease);
}
.copy-icon:hover { background: var(--mb-gray-200); color: var(--text-primary); }
.copy-icon.ok { color: var(--mb-green); }

/* ---------- Адрес ссылки ---------- */
.slug-group { display: flex; align-items: stretch; border: 1px solid var(--border-strong); border-radius: var(--radius-l); overflow: hidden; background: var(--surface-card); transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease); }
.slug-group:focus-within { border-color: var(--mb-ink); box-shadow: 0 0 0 3px rgba(41, 43, 50, .12); }
.slug-prefix { background: var(--surface-subtle); color: var(--text-secondary); padding: 12px 4px 12px 14px; white-space: nowrap; font-size: 15px; display: flex; align-items: center; }
.slug-group input { border: 0; outline: none; padding: 12px 14px 12px 2px; flex: 1; min-width: 80px; font-weight: 600; background: transparent; }
.slug-state { font-size: 13px; margin-top: 6px; }
.slug-state.ok { color: var(--mb-green-deep); }
.slug-state.bad { color: #c4111a; }

.link-card { display: flex; gap: 16px; align-items: center; background: var(--mb-black); color: var(--mb-white); border-radius: var(--radius-xl); padding: 20px 24px; margin-bottom: 28px; }
.link-card .lc-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--mb-gray-400); margin-bottom: 4px; }
.link-card .lc-url { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; word-break: break-all; color: var(--mb-white); text-decoration: none; }
.link-card .lc-url b { color: var(--mb-green-mint, #56d67f); font-weight: 700; }
.link-card .copy-icon { position: static; transform: none; color: var(--mb-gray-300); flex: none; background: rgba(255, 255, 255, .08); }
.link-card .copy-icon:hover { background: rgba(255, 255, 255, .16); color: var(--mb-white); }
.link-card .copy-icon.ok { color: #56d67f; }
.link-card .lc-open { color: var(--mb-gray-300); font-size: 14px; text-decoration: none; white-space: nowrap; }
.link-card .lc-open:hover { color: var(--mb-white); }

/* ---------- Аватар ---------- */
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-edit { display: flex; align-items: center; gap: 16px; }
.avatar-lg { width: 72px; height: 72px; font-size: 24px; overflow: hidden; }

/* ---------- Инструкция (раскрывашка) ---------- */
.howto { background: var(--surface-subtle); border-radius: var(--radius-l); padding: 12px 16px; font-size: 14px; }
.howto summary { cursor: pointer; font-weight: 500; color: var(--mb-blue); list-style: none; }
.howto summary::-webkit-details-marker { display: none; }
.howto summary::before { content: "›"; display: inline-block; margin-right: 8px; transition: transform 120ms var(--ease); }
.howto[open] summary::before { transform: rotate(90deg); }
.howto ol { margin: 12px 0 8px; padding-left: 20px; display: grid; gap: 6px; }
.howto p { margin: 8px 0 0; color: var(--text-secondary); }
.howto code { background: var(--surface-card); padding: 2px 6px; border-radius: 6px; font-size: 13px; word-break: break-all; }

/* ---------- Совместные ссылки ---------- */
.group-card { border: 1px solid var(--border-default); border-radius: var(--radius-l); padding: 16px; display: grid; gap: 10px; }
.group-card-head { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.group-card-title { font-weight: 600; font-size: 16px; }
.group-card-url { display: flex; align-items: center; gap: 4px; font-size: 14px; }
.group-card-url a { color: var(--mb-green-deep); font-weight: 600; word-break: break-all; text-decoration: none; }
.group-card-url .copy-icon { position: static; transform: none; width: 32px; height: 32px; }
.stack { display: flex; align-items: center; }
.stack .avatar { width: 32px; height: 32px; font-size: 12px; border: 2px solid var(--surface-card); margin-left: -8px; overflow: hidden; }
.stack .avatar:first-child { margin-left: 0; }
.member-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.member-chip { display: flex; align-items: center; gap: 8px; background: var(--surface-subtle); border-radius: var(--radius-pill); padding: 4px 6px 4px 4px; font-size: 14px; }
.member-chip .avatar { width: 28px; height: 28px; font-size: 11px; overflow: hidden; }
.member-chip button { border: 0; background: transparent; cursor: pointer; color: var(--text-secondary); font-size: 13px; padding: 2px 6px; border-radius: var(--radius-pill); }
.member-chip button:hover { background: var(--mb-gray-200); color: var(--text-primary); }
.member-chip.optional > .avatar, .member-chip.optional > span { opacity: .65; }
.opt-dd { position: relative; }
.member-chip .opt-toggle { font-size: 12px; display: inline-flex; align-items: center; gap: 4px; background: var(--surface-card); color: var(--text-primary); padding: 4px 8px 4px 10px; }
.member-chip .opt-toggle:hover { background: var(--mb-gray-200); }
.member-chip .opt-toggle svg { color: var(--text-secondary); }
.opt-menu { position: absolute; z-index: 70; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--surface-card); border-radius: var(--radius-l); box-shadow: var(--shadow-raised); padding: 6px; }
.member-chip .opt-menu .opt-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-s); font-size: 14px; color: var(--text-primary); }
.member-chip .opt-menu .opt-item:hover { background: var(--surface-subtle); }
.member-chip .opt-menu .opt-item.sel { font-weight: 600; }
.oi-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.oi-check { color: var(--mb-green); font-weight: 700; visibility: hidden; }
.opt-item.sel .oi-check { visibility: visible; }
.opt-item small { display: block; font-weight: 400; color: var(--text-secondary); font-size: 12px; margin-top: 2px; }
.search-wrap { position: relative; }
.search-pop { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface-card); border-radius: var(--radius-l); box-shadow: var(--shadow-raised); padding: 6px; max-height: 280px; overflow-y: auto; }
.search-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-s); cursor: pointer; }
.search-item:hover, .search-item.on { background: var(--surface-subtle); }
.search-item .avatar { width: 32px; height: 32px; font-size: 12px; overflow: hidden; }
.search-item small { display: block; color: var(--text-secondary); font-size: 12px; }
.status-line { font-size: 13px; }
.status-line.ok { color: var(--mb-green-deep); }
.status-line.bad { color: #c4111a; }
.team-list { display: grid; gap: 8px; }
.team-row { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.team-row .avatar { width: 32px; height: 32px; font-size: 12px; overflow: hidden; }

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .booking { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--border-default); padding: 24px; }
  .main { padding: 24px; }
  .pick { grid-template-columns: 1fr; gap: 24px; }
  .slots { max-height: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .slots-day { grid-column: 1 / -1; }
  .row2 { grid-template-columns: 1fr; }
  .panel { padding: 24px; }
}
@media (max-width: 420px) { .shell { padding: 16px 16px 32px; } .side, .main { padding: 20px; } }

/* ---------- Навигация кабинета ---------- */
.topnav { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--surface-card); border-radius: var(--radius-l); padding: 6px; margin-bottom: 20px; box-shadow: var(--shadow-card); }
.tab { border: 0; background: transparent; padding: 10px 16px; border-radius: var(--radius-m); font-weight: 600; cursor: pointer; color: var(--text-secondary); }
.tab:hover { color: var(--text-primary); background: var(--surface-subtle); }
.tab.on { background: var(--mb-ink); color: var(--mb-white); }
.dd { position: relative; }
.dd-caret { font-size: 12px; margin-left: 2px; }
.dd-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; min-width: 300px; max-width: 360px; background: var(--surface-card); border-radius: var(--radius-l); box-shadow: var(--shadow-raised); padding: 6px; }
.dd-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: var(--radius-s); cursor: pointer; }
.dd-item:hover, .dd-item.on { background: var(--surface-subtle); }
.dd-item small { display: block; color: var(--text-secondary); font-size: 12px; margin-top: 2px; word-break: break-all; }
.dd-item.new { color: var(--mb-green-deep); font-weight: 600; border-top: 1px solid var(--border-default); border-radius: 0 0 var(--radius-s) var(--radius-s); margin-top: 4px; }
.dd-empty { padding: 10px 12px; color: var(--text-secondary); font-size: 14px; }
@media (max-width: 520px) { .dd-menu { right: -6px; min-width: calc(100vw - 32px); } .tab { padding: 10px 12px; } }

.status-badge { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 14px; padding: 8px 12px; border-radius: var(--radius-m); background: var(--surface-subtle); color: var(--text-primary); }
.status-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--mb-yellow); }
.status-badge.ok { background: var(--accent-soft); } .status-badge.ok::before { background: var(--mb-green); }
.status-badge.bad { background: #fde8e9; } .status-badge.bad::before { background: #c4111a; }

/* ---------- «Дополнительно» в кабинете ---------- */
.more summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-secondary); padding: 6px 0; }
.more summary::-webkit-details-marker { display: none; }
.more summary:hover { color: var(--text-primary); }
.more summary svg { transition: transform 150ms var(--ease); }
.more[open] summary svg { transform: rotate(180deg); }
.more-body { display: grid; gap: 12px; margin-top: 12px; }

/* ---------- Шапка хоста и команда ---------- */
.host-head { display: flex; flex-direction: column; gap: 12px; }
.host-head .host-name { margin: 0; }
.host-meta { display: grid; gap: 4px; }
.team-toggle { display: none; }
.team-list .team-row .avatar, .team-toggle .stack .avatar { overflow: hidden; }
.btns-nav { justify-content: space-between; }

/* ---------- Мобильная версия ---------- */
@media (max-width: 860px) {
  .shell { padding-top: 12px; }
  .brand { margin-bottom: 12px; font-size: 16px; }
  .brand-mark { width: 24px; height: 24px; }
  .brand-logo { height: 19px; }
  .side { padding: 16px 20px; gap: 12px; }
  .host-head { flex-direction: row; align-items: center; gap: 12px; }
  .host-head .avatar { width: 44px; height: 44px; font-size: 16px; flex: none; overflow: hidden; }
  .host-head .host-name { font-size: 18px; line-height: 1.2; }
  .host-head .host-title { font-size: 13px; }
  .intro { font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #zoomNote { display: none; }

  /* Команда: стопка аватаров, список — по тапу */
  .team-toggle { display: flex; align-items: center; gap: 10px; border: 0; background: var(--surface-subtle); border-radius: var(--radius-pill); padding: 4px 14px 4px 4px; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-primary); width: fit-content; }
  .team-toggle::after { content: "▾"; font-size: 11px; color: var(--text-secondary); transition: transform 150ms var(--ease); }
  #team.open .team-toggle::after { transform: rotate(180deg); }
  .team-toggle .stack .avatar { width: 28px; height: 28px; font-size: 11px; }
  #team .team-label { display: none; }
  #team .team-list { display: none; margin-top: 10px; }
  #team.open .team-list { display: grid; }
  .team-row { font-size: 14px; }
  .team-row .avatar { width: 28px; height: 28px; font-size: 11px; }

  /* Итог выбора — одна компактная строка */
  .summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding: 8px 12px; font-size: 13px; }
  .summary b { font-size: 13px; }
  .summary > * + *::before { content: "·"; margin-right: 8px; color: var(--text-secondary); }

  .main { padding: 20px; }
  .steps { margin-bottom: 16px; font-size: 13px; gap: 6px; }
  .step + .step::before { width: 12px; }
  h2.title { font-size: 18px; margin-bottom: 12px; }
  #toStep2 { width: 100%; }
  .btns-nav { flex-wrap: nowrap; }
  .btns-nav .btn-primary { flex: 1; }

  /* Часовой пояс: окно поверх страницы, не обрезается карточкой и клавиатурой */
  .tzp-pop { position: fixed; top: 12px; left: 12px; right: 12px; min-width: 0; z-index: 100; box-shadow: 0 0 0 100vmax rgba(12, 13, 16, .4), var(--shadow-raised); }
  .tzp-list { max-height: 42vh; }
}

/* ---------- Управление бронью ---------- */
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn.danger { color: #c4111a; }
.btn-danger { background: #c4111a; color: var(--mb-white); }
.btn-danger:hover { background: #a50e16; }
.btn-danger:disabled { background: var(--mb-gray-300); }

/* ---------- Скелетон загрузки слотов ---------- */
.sk { background: linear-gradient(90deg, var(--mb-gray-100) 0%, var(--mb-gray-200) 50%, var(--mb-gray-100) 100%); background-size: 200% 100%; animation: sk-shimmer 1.4s ease-in-out infinite, sk-in 400ms var(--ease) both; }
.sk-line { display: inline-block; height: 16px; border-radius: 8px; vertical-align: middle; }
.sk-day { aspect-ratio: 1; max-width: 48px; width: 100%; margin: 0 auto; border-radius: 50%; }
.sk-slot { height: 44px; border-radius: var(--radius-l); }
.sk-hint { font-size: 13px; color: var(--text-secondary); margin-top: 6px; animation: sk-in 300ms var(--ease) both; }
@keyframes sk-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@keyframes sk-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* ---------- Статус участия ---------- */
.team-row { display: flex; align-items: center; gap: 10px; }
.team-row .team-name { flex: 1; min-width: 0; }
.rsvp { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; }
.rsvp.ok { background: var(--accent-soft); color: var(--mb-green); }
.rsvp.bad { background: #fde8e9; color: #c4111a; }
.rsvp.wait { background: #fff4d6; color: #a87700; }
.rsvp.wait { box-shadow: inset 0 0 0 2px #e9b100; animation: rsvp-pulse 1.8s ease-in-out infinite; }
@keyframes rsvp-pulse { 50% { box-shadow: inset 0 0 0 2px #e9b100, 0 0 0 4px rgba(233, 177, 0, .18); } }
@media (prefers-reduced-motion: reduce) { .rsvp.wait { animation: none; } }

/* ---------- Финальный экран: одно главное действие ---------- */
#step4 .status-badge { margin-bottom: 20px; }
.cal-dd { position: relative; display: inline-block; margin-bottom: 24px; }
.cal-dd .btn svg { transition: transform 150ms var(--ease); }
.cal-dd .btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.cal-menu { position: absolute; left: 0; top: calc(100% + 8px); z-index: 60; min-width: 280px; background: var(--surface-card); border-radius: var(--radius-l); box-shadow: var(--shadow-raised); padding: 6px; }
.cal-menu .dd-item { text-decoration: none; color: var(--text-primary); font-weight: 500; }
.manage-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--border-default); font-size: 14px; }
.link-btn { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text-primary); cursor: pointer; text-decoration: underline; text-decoration-color: var(--mb-gray-300); text-underline-offset: 3px; }
.link-btn:hover { text-decoration-color: currentColor; }
.link-btn.danger { color: #c4111a; }
@media (max-width: 860px) { .cal-dd, .cal-dd .btn { width: 100%; } .cal-menu { right: 0; } }
/* Кнопка календаря всегда отдельной строкой под статусом */
#step4 .status-badge { display: flex; width: fit-content; max-width: 100%; }
.cal-dd { display: block; width: fit-content; }
@media (max-width: 860px) { .cal-dd { width: 100%; } }

/* Управление бронью и итог: аккуратные строки на мобильном */
.manage-links { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
@media (max-width: 860px) {
  .manage-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .summary .sum-line { flex-basis: 100%; }
  .summary .sum-line::before { content: none; }
  .summary .sum-line .muted { color: var(--text-secondary); }
}

/* Поле «Пригласить коллег» — адреса плашками */
.ec-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 48px; padding: 6px 8px; border: 1px solid var(--border-strong, #b4beca); border-radius: var(--radius-m, 12px); background: var(--surface-card, #fff); cursor: text; }
.ec-box:focus-within { border-color: var(--mb-ink, #292b32); box-shadow: 0 0 0 3px rgba(41,43,50,.08); }
.ec-input { flex: 1; min-width: 160px; border: 0; outline: 0; font: inherit; font-size: 16px; padding: 6px 4px; background: transparent; color: inherit; }
.ec-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; background: var(--surface-subtle, #f0f3f6); border-radius: 999px; padding: 4px 4px 4px 12px; font-size: 14px; }
.ec-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ec-x { width: 24px; height: 24px; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary, #757987); font-size: 18px; line-height: 1; cursor: pointer; flex: none; }
.ec-x:hover { background: var(--mb-gray-200, #dfe3e8); color: var(--text-primary, #292b32); }
.ec-msg { font-size: 14px; margin-top: 6px; line-height: 1.4; }
.ec-msg.err { color: #c4111a; }
.ec-msg.note { color: var(--text-secondary, #757987); }
.ec-hint { margin: 6px 0 0; font-size: 13px; }
.invite-answer { margin: 4px 0 22px; }
.invite-answer .btn[aria-pressed="true"] { opacity: .55; cursor: default; }

/* «Пригласить коллег»: кнопка → плашка с полями, добавленные — списком */
.gl { display: grid; gap: 8px; }
.gl-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.gl-list:empty { display: none; }
.gl-item { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border: 1px solid var(--border-default); border-radius: var(--radius-l); background: var(--surface-card, #fff); }
.gl-av { width: 32px; height: 32px; border-radius: 50%; background: var(--surface-subtle); display: grid; place-items: center; font-size: 12px; font-weight: 700; flex: none; }
.gl-tx { display: grid; min-width: 0; flex: 1; line-height: 1.3; }
.gl-tx b { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-tx small { color: var(--text-secondary); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); font-size: 20px; line-height: 1; cursor: pointer; flex: none; }
.gl-x:hover { background: var(--surface-subtle); color: var(--text-primary); }
.gl-add { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 14px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-l); background: transparent; color: var(--text-primary); font: inherit; cursor: pointer; transition: border-color 120ms var(--ease), background 120ms var(--ease); }
.gl-add:hover { border-color: var(--mb-green); background: var(--accent-soft); }
.gl-add svg { flex: none; width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: var(--mb-green); color: #fff; }
.gl-add-t { display: grid; line-height: 1.3; }
.gl-add-t b { font-weight: 600; font-size: 15px; }
.gl-add-t small { color: var(--text-secondary); font-size: 13px; }
.gl-add-t small:empty { display: none; }
.gl-pop { padding: 14px; border-radius: var(--radius-l); background: var(--surface-subtle); display: grid; gap: 10px; box-shadow: 0 6px 20px rgba(41,43,50,.08); animation: gl-in 160ms var(--ease); }
@keyframes gl-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.gl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gl-row .input { background: var(--surface-card, #fff); }
.gl-actions { display: flex; justify-content: flex-end; gap: 8px; }
.gl-actions .btn { padding: 10px 18px; min-height: 0; }
.gl-msg { font-size: 14px; }
.gl-limit { font-size: 14px; color: var(--text-secondary); line-height: 1.4; }
@media (max-width: 640px) { .gl-row { grid-template-columns: 1fr; } .gl-actions .btn { flex: 1; } }

.load-fail { padding: 8px 0; display: grid; gap: 12px; justify-items: start; }
.load-fail .note { margin: 0 0 8px; }

/* ===== slotmaster ===== */
a.brand { text-decoration: none; color: var(--text-primary); }
.sm-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--mb-green); position: relative; flex: none; }
.sm-mark::after { content: ""; position: absolute; left: 7px; right: 7px; top: 12px; height: 4px; border-radius: 2px; background: #fff; box-shadow: 0 -6px 0 #fff, 0 6px 0 rgba(255,255,255,.55); }
.sm-word { font-weight: 800; font-size: 20px; letter-spacing: -0.03em; }
.btn-sm { padding: 8px 14px; font-size: 14px; min-height: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.view { margin-top: 0; }
.feat { margin: 0 0 24px; padding-left: 20px; display: grid; gap: 6px; color: var(--text-secondary); }
.or { display: flex; align-items: center; gap: 12px; color: var(--text-secondary); font-size: 14px; margin: 18px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border-default); }
.inline-row { display: flex; gap: 8px; }
.inline-row .input { flex: 1; min-width: 0; }
.warn-box { background: #fff6e0; border-radius: var(--radius-l); padding: 10px 14px; font-size: 14px; line-height: 1.45; }
.choice { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.4; cursor: pointer; padding: 4px 0; }
.choice input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--mb-green); flex: none; }
.choice-list { display: grid; gap: 2px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; color: var(--text-secondary); cursor: pointer; }
.consent input { margin-top: 2px; width: 18px; height: 18px; accent-color: var(--mb-green); flex: none; }
select.input { appearance: auto; }
.event-head { margin: 4px 0 8px; }
.event-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.et-list { display: grid; gap: 12px; }
.et-card { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--border-default); border-radius: var(--radius-l); text-decoration: none; color: var(--text-primary); transition: border-color 120ms var(--ease), box-shadow 120ms var(--ease); }
.et-card:hover { border-color: var(--mb-green); box-shadow: 0 4px 16px rgba(41,43,50,.06); }
.et-name { font-size: 18px; font-weight: 700; }
.et-meta { font-size: 14px; color: var(--text-secondary); }
.et-desc { font-size: 14px; line-height: 1.45; margin-top: 4px; }
.src-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-default); border-radius: var(--radius-l); }
.src-info { flex: 1; min-width: 0; display: grid; gap: 2px; }
.src-info small { color: var(--text-secondary); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.src-info small.bad { color: #c4111a; }
.switch { position: relative; width: 40px; height: 24px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--mb-gray-300); border-radius: 999px; transition: background 120ms var(--ease); }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 120ms var(--ease); }
.switch input:checked + span { background: var(--mb-green); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--mb-ink); outline-offset: 2px; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--surface-subtle); color: var(--text-secondary); vertical-align: middle; }
.pill.ok { background: var(--accent-soft); color: var(--mb-green-deep); }
.pill.wait { background: #fff4d6; color: #8a6200; }
.pill.bad { background: #fde8e9; color: #c4111a; }
.bk-card { border: 1px solid var(--border-default); border-radius: var(--radius-l); padding: 14px 16px; display: grid; gap: 4px; }
.bk-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.bk-when { font-size: 15px; }
.muted-card { opacity: .6; }
.answers { border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.answers td { padding: 3px 14px 3px 0; vertical-align: top; }
.answers td:first-child { color: var(--text-secondary); white-space: nowrap; }
.mini-select { border: 0; background: transparent; font: inherit; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.fb { display: grid; gap: 8px; }
.fb-item { border: 1px solid var(--border-default); border-radius: var(--radius-l); padding: 10px 12px; display: grid; gap: 8px; background: var(--surface-card); }
.fb-sys { background: var(--surface-subtle); }
.fb-row { display: flex; align-items: center; gap: 10px; }
.fb-type { font-size: 12px; font-weight: 600; color: var(--text-secondary); width: 118px; flex: none; text-transform: uppercase; letter-spacing: .02em; }
.fb-label { flex: 1; min-width: 0; padding: 8px 10px; min-height: 0; }
.fb-label-static { flex: 1; font-size: 15px; }
.fb-req { display: flex; gap: 6px; align-items: center; font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.fb-req input { accent-color: var(--mb-green); }
.fb-ctrls { display: flex; gap: 2px; }
.fb-ctrls .icon-btn { width: 30px; height: 30px; font-size: 14px; }
.fb-opts { min-height: 70px; font-size: 14px; }
.fb-add { display: flex; gap: 8px; }
.fb-add .input { flex: 1; }
@media (max-width: 640px) {
  .fb-row { flex-wrap: wrap; }
  .fb-type { width: 100%; }
  .inline-row { flex-direction: column; }
  .topnav { overflow-x: auto; }
}
