.mb-line-dot {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}
.mb-line-head {
  display: block;
}
.mb-line-head h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.mb-line-head p { margin: 0.35rem 0 0; }
.mb-line-facts {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}
.mb-line-facts li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.7rem;
}
.mb-line-facts a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.mb-line-facts a:hover { color: var(--mb-accent, #c45a2c); }
.mb-line-name { text-decoration: none !important; }
.mb-line-name:hover { text-decoration: underline !important; }
.mb-metro-summary {
  max-width: 42rem;
  margin: 0.85rem 0 0;
  line-height: 1.55;
  color: var(--mb-ink-soft, #4a5d68);
}
.mb-metro-head {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--mb-line, rgba(26, 58, 74, 0.12));
}
.mb-metro-head .mb-place-hero {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.mb-metro-head.has-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 21.5rem);
  column-gap: 1.75rem;
  row-gap: 0.35rem;
  align-items: start;
}
.mb-metro-head.has-card .mb-place-hero {
  display: contents;
}
.mb-metro-head.has-card .mb-eyebrow {
  grid-column: 1;
  grid-row: 1;
}
.mb-metro-head.has-card h1 {
  grid-column: 1;
  grid-row: 2;
  margin-bottom: 0.65rem;
}
.mb-metro-head.has-card .mb-metro-head-copy {
  grid-column: 1;
  grid-row: 3;
  min-width: 0;
}
.mb-metro-head.has-card .mb-metro-card {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
}
.mb-metro-card {
  position: static;
  top: auto;
}
.mb-metro-card .mb-metro-facts {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}
.mb-metro-card .mb-metro-facts > div {
  line-height: 1.45;
}
.mb-metro-card .mb-metro-facts dt,
.mb-metro-card .mb-metro-facts dd {
  display: inline;
  margin: 0;
}
.mb-metro-card .mb-metro-facts dt {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--mb-ink, #1a3a4a);
}
.mb-metro-card .mb-metro-facts dt::after {
  content: ": ";
}
.mb-metro-card .mb-metro-facts dd {
  font-weight: 650;
  color: var(--mb-ink, #1a3a4a);
}
.mb-metro-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.35rem;
  margin: 1rem 0 0;
  padding: 0;
}
.mb-metro-facts div { margin: 0; }
.mb-metro-facts dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mb-ink-soft, #4a5d68);
}
.mb-metro-facts dd { margin: 0.15rem 0 0; font-weight: 600; color: var(--mb-ink, #1a3a4a); }
.mb-metro-facts a { color: inherit; }
.mb-metro-card .mb-metro-facts a {
  color: var(--mb-accent, #c45c26);
  font-weight: 650;
}
.mb-metro-card .mb-metro-facts a:hover {
  text-decoration: underline;
}
.mb-metro-card .mb-line-facts {
  margin: 1rem 0 0;
  padding-top: 0.15rem;
}
.mb-metro-card .mb-line-facts li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.15rem 0.65rem;
  align-items: start;
  padding-top: 0.9rem;
  border-top: 1px solid var(--mb-line, rgba(26, 58, 74, 0.12));
}
.mb-metro-card .mb-line-dot { margin-top: 0.35rem; }
.mb-metro-card .mb-line-body { min-width: 0; }
.mb-metro-card .mb-line-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  font-weight: 700;
}
.mb-metro-card .mb-line-title .mb-muted {
  font-weight: 500;
  font-size: 0.88rem;
}
.mb-metro-card .mb-line-route {
  margin: 0.35rem 0 0;
  color: var(--mb-ink-soft, #3d5a68);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.45;
}
.mb-metro-card .mb-line-route a { font-weight: 600; }
.mb-metro-line-station-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}
.mb-metro-line-station {
  display: grid;
  grid-template-columns: minmax(8rem, 0.9fr) minmax(0, 1.4fr);
  gap: 0.5rem 1rem;
  align-items: baseline;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: rgba(26, 58, 74, 0.04);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.mb-metro-line-station:hover {
  background: rgba(26, 58, 74, 0.08);
  border-color: rgba(26, 58, 74, 0.12);
}
.mb-metro-line-station-name {
  font-weight: 650;
}
.mb-metro-line-station-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.85rem;
  font-size: 0.92em;
  color: var(--mb-muted, #5a6b73);
}
.mb-metro-line-station-meta .mb-muted {
  flex: 1 1 12rem;
  min-width: 0;
}
@media (max-width: 640px) {
  .mb-metro-line-station {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}
@media (max-width: 900px) {
  .mb-metro-head.has-card { grid-template-columns: 1fr; }
  .mb-metro-head.has-card .mb-eyebrow,
  .mb-metro-head.has-card h1,
  .mb-metro-head.has-card .mb-metro-head-copy,
  .mb-metro-head.has-card .mb-metro-card {
    grid-column: 1;
    grid-row: auto;
  }
}
.mb-line-head h2 a {
  color: inherit;
  text-decoration: none;
}
.mb-line-head h2 a:hover { color: var(--mb-accent, #c45a2c); }
.mb-metro-branch { scroll-margin-top: 5rem; }
.mb-metro-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1rem;
}
.mb-metro-open,
.mb-metro-current {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
.mb-metro-open {
  border: 0;
  background: var(--mb-ink, #1a3a4a);
  color: #fff;
}
.mb-metro-current {
  background: rgba(26, 58, 74, 0.07);
  color: inherit;
  text-decoration: none;
}
.mb-photo-col { display: grid; gap: 0.75rem; }
.mb-guide-video { display: grid; gap: 0.55rem; }
.mb-guide-video h3 {
  margin: 0.35rem 0 0;
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--mb-ink, #1a3a4a);
}
.mb-video-item { display: grid; gap: 0.35rem; }
.mb-video-extra {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}
.mb-video-slot {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: #1a2630;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
}
.mb-video-slot--extra { border-radius: 10px; }
.mb-video-slot.is-admin-upload { cursor: pointer; }
.mb-video-slot__player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
  background: #0f172a;
  /* Нативные controls: кнопка Play по центру области слота */
}
.mb-video-slot__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.55);
  pointer-events: none;
  z-index: 1;
}
.mb-video-slot__caption-static,
.mb-video-slot__caption {
  color: #fff;
  font-weight: 650;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-align: center;
  padding: 0.4rem 0.7rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.mb-video-slot__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.58);
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 2;
}
.mb-video-slot__caption:empty { display: none; }
.mb-video-slot--extra .mb-video-slot__caption,
.mb-video-slot--extra .mb-video-slot__caption-static {
  font-size: 0.72rem;
  padding: 0.3rem 0.4rem;
}
.mb-video-title-field { display: block; }
.mb-video-title-field[hidden] { display: none !important; }
.mb-video-title-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(26, 58, 74, 0.18);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  font: inherit;
  color: var(--mb-ink, #1a3a4a);
  background: #fff;
}
.mb-video-title-input:focus {
  outline: 2px solid rgba(26, 58, 74, 0.22);
  outline-offset: 1px;
}
.mb-video-slot__hint {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: rgba(26, 58, 74, 0.55);
}
.mb-video-slot.is-uploading .mb-photo-actions,
.mb-video-slot.is-upload-ok .mb-photo-actions,
.mb-video-slot.is-upload-error .mb-photo-actions {
  pointer-events: none;
}
@media (max-width: 720px) {
  .mb-video-extra { grid-template-columns: 1fr; }
}
.mb-photo-main {
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  overflow: hidden;
  background:
    repeating-linear-gradient(-45deg, rgba(26, 58, 74, 0.04), rgba(26, 58, 74, 0.04) 8px, transparent 8px, transparent 16px);
  border: 1px dashed rgba(26, 58, 74, 0.22);
  display: grid;
  place-items: center;
  color: rgba(26, 58, 74, 0.55);
  font-size: 0.85rem;
}
.mb-photo-main img,
.mb-photo-extra img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.mb-photo-extra {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}
.mb-photo-extra span,
.mb-photo-extra img {
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
}
.mb-photo-extra span {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(26, 58, 74, 0.18);
  color: rgba(26, 58, 74, 0.4);
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.45);
}
.mb-photo-main.is-admin-upload,
.mb-photo-extra .is-admin-upload {
  cursor: pointer;
  position: relative;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.mb-photo-main.is-admin-upload:hover,
.mb-photo-extra .is-admin-upload:hover {
  border-color: rgba(196, 90, 44, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 90, 44, 0.12);
}
.mb-photo-main.is-uploading,
.mb-photo-extra .is-uploading {
  pointer-events: none;
}
.mb-photo-main.is-uploading::after,
.mb-photo-extra .is-uploading::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(26, 58, 74, 0.45);
  border-radius: inherit;
}
.mb-photo-status {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 6;
  transform: translate(-50%, -50%);
  max-width: calc(100% - 1rem);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.96);
  color: var(--mb-ink, #1a3a4a);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.2);
  pointer-events: none;
}
.mb-photo-status.is-ok {
  background: #e8f7ef;
  color: #0f7a3f;
}
.mb-photo-status.is-error {
  background: #fff0f0;
  color: #b42318;
  border-radius: 12px;
  max-width: calc(100% - 0.75rem);
  white-space: normal;
  text-align: left;
  font-weight: 600;
  line-height: 1.35;
}
.mb-photo-main.is-upload-ok,
.mb-photo-extra .is-upload-ok,
.mb-photo-main.is-upload-error,
.mb-photo-extra .is-upload-error {
  pointer-events: none;
}
.mb-photo-actions {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 4;
  display: flex;
  gap: 6px;
}
.mb-photo-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  color: #1f2937;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.22);
  cursor: pointer;
}
.mb-photo-action:hover {
  background: #fff;
  color: #2563eb;
}
.mb-photo-action--danger:hover {
  color: #dc2626;
}
.mb-photo-action__i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  font: 700 0.85rem/1 Georgia, "Times New Roman", serif;
  font-style: italic;
  text-transform: lowercase;
}
.mb-photo-info {
  position: absolute;
  z-index: 8;
  top: 44px;
  right: 8px;
  left: 8px;
  max-width: 100%;
  padding: 0.65rem 0.75rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 252, 246, 0.98);
  color: var(--mb-ink, #1a3a4a);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
  border: 1px solid rgba(26, 58, 74, 0.12);
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
  cursor: default;
}
.mb-photo-info__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}
.mb-photo-info__head strong {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.mb-photo-info__close {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.mb-photo-info__close:hover {
  background: rgba(26, 58, 74, 0.08);
}
.mb-photo-info__list {
  margin: 0;
  display: grid;
  gap: 0.35rem;
}
.mb-photo-info__list > div {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 0.35rem;
  align-items: start;
}
.mb-photo-info__list dt {
  margin: 0;
  color: rgba(26, 58, 74, 0.55);
  font-weight: 600;
}
.mb-photo-info__list dd {
  margin: 0;
  word-break: break-all;
  font-weight: 600;
}
.mb-photo-extra .mb-photo-info {
  left: 4px;
  right: 4px;
  top: 40px;
  font-size: 0.7rem;
}
.mb-photo-extra .mb-photo-info__list > div {
  grid-template-columns: 3.6rem 1fr;
}

/* Превью уже обрезано — показываем целиком в слоте */
.mb-photo-main img[data-mb-has-preview="1"],
.mb-photo-extra img[data-mb-has-preview="1"] {
  object-fit: cover;
}

/* Кроп превью при загрузке */
body.mb-crop-open { overflow: hidden; }
.mb-crop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
}
.mb-crop__panel {
  width: min(36rem, 100%);
  max-height: min(92vh, 44rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1rem 1.1rem;
  border-radius: 18px;
  background: #fffaf2;
  color: #1a3a4a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.mb-crop__title {
  margin: 0;
  flex-shrink: 0;
  font-family: var(--mb-display, Georgia, serif);
  font-size: 1.25rem;
  font-weight: 600;
}
.mb-crop__hint {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.88rem;
  color: rgba(26, 58, 74, 0.72);
  line-height: 1.4;
}
.mb-crop__stage {
  position: relative;
  flex: 1 0 auto;
  width: 100%;
  min-height: min(42vh, 14rem);
  height: min(58vh, 22rem);
  overflow: hidden;
  border-radius: 14px;
  background: #1a3a4a;
  touch-action: none;
  user-select: none;
}
.mb-crop__img {
  position: absolute;
  display: block;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  pointer-events: none;
  background: #0f172a;
}
.mb-crop__frame {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  border: 2px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  cursor: grab;
  touch-action: none;
}
.mb-crop__frame:active { cursor: grabbing; }
.mb-crop__actions {
  display: flex;
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 0.55rem;
}
.mb-crop__btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.mb-crop__btn--ghost {
  background: rgba(26, 58, 74, 0.08);
  color: #1a3a4a;
}
.mb-crop__btn--ok {
  background: #c45c26;
  color: #fff;
}
.mb-crop__btn--ok:hover { background: #a84c1f; }
.mb-photo-main.is-admin-upload:has([data-mb-photo-img][src]),
.mb-photo-extra .is-admin-upload:has([data-mb-photo-img][src]) {
  cursor: zoom-in;
}
.mb-photo-extra .is-admin-upload {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px dashed rgba(26, 58, 74, 0.18);
  background:
    repeating-linear-gradient(-45deg, rgba(26, 58, 74, 0.04), rgba(26, 58, 74, 0.04) 8px, transparent 8px, transparent 16px);
}
.mb-photo-extra .is-admin-upload img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mb-photo-extra .is-admin-upload span {
  border: 0;
  background: transparent;
  aspect-ratio: auto;
}

.mb-metro-modal {
  width: min(40rem, calc(100vw - 1.5rem));
  max-height: min(80vh, 42rem);
  border: 0;
  border-radius: 18px;
  padding: 0;
  color: #1a3a4a;
  background: #fffdf8;
  box-shadow: 0 24px 60px rgba(26, 58, 74, 0.22);
}
.mb-metro-modal::backdrop { background: rgba(18, 32, 40, 0.45); }
.mb-metro-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem 0.4rem 1.15rem;
}
.mb-metro-modal-head h2 { margin: 0; font-size: 1.25rem; }
.mb-metro-close {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}
.mb-metro-q {
  display: block;
  width: calc(100% - 2.3rem);
  margin: 0.4rem 1.15rem 0.8rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(26, 58, 74, 0.16);
  font: inherit;
}
.mb-metro-lines {
  overflow: auto;
  max-height: calc(80vh - 8rem);
  padding: 0 1.15rem 1.15rem;
  display: grid;
  gap: 1rem;
}
.mb-metro-line h3 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  margin: 0 0 0.45rem;
  font-size: 0.98rem;
}
.mb-metro-line .mb-muted { font-weight: 450; font-size: 0.82rem; }
.mb-metro-stations { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.mb-metro-stations a,
.mb-metro-stations button {
  border: 1px solid rgba(26, 58, 74, 0.12);
  background: #fff;
  color: inherit;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font: inherit;
  font-size: 0.86rem;
  cursor: pointer;
  text-decoration: none;
}
.mb-metro-stations a:hover,
.mb-metro-stations button:hover { border-color: #1a3a4a; }
.mb-metro-picked { display: block; font-weight: 650; margin-bottom: 0.35rem; }
.mb-metro-actions { display: flex; gap: 0.5rem; align-items: center; }
.mb-metro-actions button[data-mb-metro-clear] {
  border: 0;
  background: transparent;
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}
