/* «Афиша выходных»: карта событий (#map), пятничная подборка (#digest), форма организатора (#add).
   Опирается на дизайн-систему app.css (цвета, кнопки, чипы, поля, пины). */

/* ---------- Переключатель выходных (компактный) ---------- */
.wseg {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px;
  border-radius: 18px; background: rgba(20, 12, 30, .72); border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.wseg__b {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  min-width: 0; min-height: 50px; padding: 7px 10px; border: 0; border-radius: 14px; background: transparent;
  color: var(--text-2); text-decoration: none; text-align: left; cursor: pointer; font: inherit;
  transition: background .3s var(--ease), color .3s, box-shadow .3s, transform .2s var(--ease-spring);
  -webkit-tap-highlight-color: transparent;
}
.wseg__b:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.wseg__b:active { transform: scale(.97); }
.wseg__b.is-on { background: var(--grad-coral); color: #2A0E12; box-shadow: 0 6px 18px rgba(255, 107, 87, .35); }
.wseg__b.is-on:hover { color: #2A0E12; }
.wseg__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-width: 0; }
.wseg__l { min-width: 0; font-size: 12px; font-weight: 800; white-space: nowrap; opacity: .9; }
.wseg__r { font-size: 12.5px; font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.wseg__n { flex: none; min-width: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: 11px; font-weight: 800; text-align: center; line-height: 17px; }
.wseg__b.is-on .wseg__n { background: rgba(42, 14, 18, .16); }
.wseg__h { font-size: 11px; font-weight: 700; line-height: 1.2; opacity: .85; }
.wseg__b--hol .wseg__l::before { content: "🇷🇺 "; }
/* 4 сегмента (выходные + отдельный праздник): прокрутка по горизонтали внутри переключателя, страница не едет */
.wseg--4 {
  grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(104px, 1fr);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-snap-type: x proximity;
}
.wseg--4::-webkit-scrollbar { display: none; }
.wseg--4 .wseg__b { scroll-snap-align: start; }
@media (max-width: 420px) { .wseg__n { display: none; } .wseg__b { padding: 7px 9px; } .wseg__l { font-size: 11px; } }
@media (min-width: 640px) { .dg-screen .wseg__l { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; } }

/* =====================================================================
   1. Карта событий
   ===================================================================== */
body[data-screen="map"] .view { max-width: none; padding: 0; min-height: 0; }
body[data-screen="map"] .screen { transform: none; }
@media (max-width: 959px) { body[data-screen="map"] .footer { display: none; } }

.mx { position: relative; isolation: isolate; height: calc(100vh - var(--top-h) - 1px); height: calc(100dvh - var(--top-h) - 1px); overflow: hidden; background: #2a2333; }
.mx-stage { position: absolute; inset: 0; }
.mx-map { position: absolute; inset: 0; z-index: 0; }
.mx-map.map--off { position: absolute; }

/* верхняя панель поверх карты (телефон) */
.mx-panel {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: grid; gap: 8px;
  padding: 10px 12px 26px; pointer-events: none;
  background: linear-gradient(rgba(26, 16, 38, .96) 0%, rgba(26, 16, 38, .88) 62%, rgba(26, 16, 38, 0) 100%);
}
.mx-panel > * { pointer-events: auto; min-width: 0; }
.mx-head { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mx-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.mx-kicker { margin-bottom: 4px; }
.mx-chips { padding-bottom: 2px; }
.mx-chips .chip { min-height: 34px; padding: 5px 12px; font-size: 13px; background: rgba(34, 21, 47, .86); }
.mx-chips .chip[aria-pressed="true"] { background: var(--text); color: var(--ink); border-color: var(--text); }
.mx-chips .chip--coral[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #2A0E12; }
.mx-chips .chip--gold[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.mx-chips .mx-cat[aria-pressed="true"] { background: var(--cat); border-color: var(--cat); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); }
.mx-count { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: 13px; color: var(--text-2); font-weight: 600; text-shadow: 0 1px 6px rgba(10, 4, 18, .8); }
.mx-count b { color: var(--text); }
.mx-reset { background: none; border: 0; padding: 2px 0; color: var(--gold-2); font-weight: 800; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* кнопки управления картой */
.mx-ctls { position: absolute; z-index: 2; right: 12px; bottom: calc(var(--nav-h) + 46px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; transition: opacity .25s, transform .3s var(--ease); }
.mx-stage:has(.mx-card:not([hidden])) .mx-ctls { opacity: 0; pointer-events: none; transform: translateX(10px); }
.mx-ctl {
  display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 8px 13px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(34, 21, 47, .92); color: var(--text); font-weight: 800; font-size: 13px;
  cursor: pointer; box-shadow: 0 8px 20px rgba(5, 2, 10, .45); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  transition: background .2s, border-color .2s, transform .2s var(--ease-spring);
}
.mx-ctl:hover { border-color: var(--gold); }
.mx-ctl:active { transform: scale(.95); }
.mx-ctl[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }

/* Leaflet на телефоне: зум жестами, подпись OSM — над нижней навигацией */
@media (max-width: 959px) {
  .mx .leaflet-control-zoom { display: none; }
  .mx .leaflet-bottom { bottom: calc(var(--nav-h) + 12px + var(--safe-b)); }
  html.sheet-open .mx .leaflet-bottom { bottom: 0; }
}

/* пины: счётчик событий на площадке и звезда «события недели» */
.mx-pin { overflow: visible; }
.mx-badge {
  position: absolute; z-index: 3; top: -7px; right: -9px; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 999px;
  background: var(--ink); color: var(--gold-2); border: 2px solid #fff; font: 800 11px/17px var(--font); text-align: center;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .4); animation: mxPop .45s var(--ease-spring) both;
}
.mx-star { position: absolute; z-index: 3; top: -13px; left: -9px; font-size: 16px; line-height: 1; color: var(--gold); text-shadow: 0 0 6px rgba(245, 185, 71, .9), 0 1px 2px rgba(0, 0, 0, .6); animation: twinkle 2.4s ease-in-out infinite; }
.mx-pin--feat .pin { box-shadow: 0 6px 16px rgba(10, 4, 18, .5), inset 0 0 0 3px #FFE3A8, 0 0 0 3px rgba(245, 185, 71, .55); }
@keyframes mxPop { 0%, 70% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes twinkle { 0%, 100% { transform: scale(1) rotate(0); } 50% { transform: scale(1.25) rotate(18deg); } }

.mx-vpin-wrap { background: none; border: 0; }
.mx-vpin {
  display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255, 246, 236, .96); border: 2px solid var(--vc, var(--plum)); font-size: 15px; line-height: 1;
  box-shadow: 0 4px 10px rgba(10, 4, 18, .35); animation: mxPop .4s var(--ease-spring) both; transition: transform .2s var(--ease-spring);
}
.mx-vpin-wrap:hover .mx-vpin { transform: scale(1.15); }

/* карточка выбранного места */
.mx-card {
  position: absolute; z-index: 4; left: 10px; right: 10px; bottom: calc(var(--nav-h) + 20px + var(--safe-b));
  max-height: min(58vh, 470px); overflow-y: auto; overscroll-behavior: contain; padding: 14px;
  background: rgba(34, 21, 47, .97); border: 1px solid var(--line-2); border-radius: 22px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.mx-card.is-in { animation: mxCardUp .42s var(--ease) both; }
@keyframes mxCardUp { from { opacity: 0; transform: translateY(26px) scale(.98); } }
.mx-card__x { position: absolute; top: 10px; right: 10px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(20, 12, 30, .7); color: var(--text); cursor: pointer; font-size: 14px; }
.mx-card__x:hover { background: var(--surface-3); }
.mx-card__one { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; align-items: start; }
.mx-card__cover { aspect-ratio: 1; border-radius: 14px; }
.mx-card__body, .mx-card__group { display: grid; gap: 4px; min-width: 0; }
.mx-card__group { padding-right: 36px; }
.mx-card__cat { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12px; font-weight: 800; color: var(--gold); }
.mx-card__feat { padding: 1px 8px; border-radius: 999px; background: var(--grad-gold); color: var(--ink); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.mx-card__t { font-family: var(--font); font-weight: 800; font-size: 17px; line-height: 1.25; letter-spacing: 0; padding-right: 30px; }
.mx-card__group .mx-card__t { padding-right: 0; }
.mx-card__when { color: var(--coral-2); font-weight: 800; font-size: 13px; }
.mx-card__place { color: var(--muted); font-size: 13px; }
.mx-card .tags { margin-top: 4px; }
.mx-card__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mx-card__acts .btn { flex: 1 1 140px; }
.mx-card__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.mx-row {
  display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px;
  border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--text); text-decoration: none;
  transition: background .2s, border-color .2s;
}
.mx-row:hover, .mx-row.is-focus { color: var(--text); background: rgba(255, 255, 255, .08); border-color: var(--line-2); }
.mx-row.is-focus { border-color: var(--gold); }
.mx-row__e { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 11px; font-size: 17px; background: rgba(255, 255, 255, .08); background: color-mix(in srgb, var(--cat) 34%, transparent); }
.mx-row__t { display: flex; flex-direction: column; min-width: 0; }
.mx-row__t b { font-size: 14px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mx-row__w { font-size: 12px; color: var(--muted); }
.mx-row__go { color: var(--muted); font-size: 22px; line-height: 1; }
.mx-row__star { color: var(--gold); font-size: 16px; }

/* список (телефон — выезжающая панель; компьютер — колонка слева) */
.mx-list {
  position: absolute; z-index: 5; left: 0; right: 0; bottom: 0; top: 24%; display: flex; flex-direction: column;
  background: var(--bg-2); border-top: 1px solid var(--line-2); border-radius: 26px 26px 0 0; box-shadow: 0 -18px 46px rgba(0, 0, 0, .5);
  transform: translateY(105%); visibility: hidden; transition: transform .42s var(--ease), visibility 0s linear .42s;
}
.mx-list.is-open { transform: none; visibility: visible; transition: transform .42s var(--ease), visibility 0s; }
.mx-list__head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 10px; }
.mx-list__title { font-size: 18px; }
.mx-list__n { color: var(--muted); font-size: 13px; font-weight: 700; }
.mx-list__x { margin-left: auto; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(20, 12, 30, .6); color: var(--text); cursor: pointer; }
.mx-items { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 12px calc(var(--nav-h) + 28px + var(--safe-b)); -webkit-overflow-scrolling: touch; }

.mx-item {
  position: relative; display: grid; grid-template-columns: 48px minmax(0, 1fr) 34px; gap: 12px; align-items: start;
  padding: 12px; margin-bottom: 8px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface);
  transition: border-color .2s, background .2s, transform .2s var(--ease);
}
.mx-item:hover { border-color: var(--line-2); background: var(--surface-2); }
.mx-item.is-sel { border-color: var(--cat, var(--gold)); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--cat, var(--gold)); }
.mx-item__d { display: flex; flex-direction: column; align-items: center; padding: 6px 2px 7px; border-radius: 12px; background: rgba(255, 246, 236, .94); color: var(--ink); line-height: 1; }
.mx-item__d small { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #8A3B2E; }
.mx-item__d small:last-child { color: #5B4A66; }
.mx-item__d b { font-family: var(--font-display); font-size: 20px; font-weight: 800; margin: 3px 0 2px; }
.mx-item__d.is-long { background: rgba(245, 185, 71, .95); }
.mx-item__body { display: grid; gap: 3px; min-width: 0; }
.mx-item__cat { font-size: 12px; font-weight: 800; color: var(--muted); }
.mx-item__feat { color: var(--gold); }
.mx-item__t { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: none; text-align: left; cursor: pointer; font: 800 15px/1.3 var(--font); color: var(--text); text-decoration: none; }
.mx-item__t:hover { color: var(--gold-2); }
.mx-item__place { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-item .tags { margin-top: 4px; }
.mx-item__go { align-self: center; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--text); text-decoration: none; font-weight: 800; transition: background .2s, border-color .2s, transform .2s var(--ease-spring); }
.mx-item__go:hover { color: var(--ink); background: var(--gold); border-color: var(--gold); transform: translateX(2px); }
.mx-items .empty { margin-top: 8px; }

/* без Leaflet — обычный список */
.mx--off { height: auto; overflow: visible; background: none; max-width: var(--maxw); margin: 0 auto; padding: 16px var(--gutter) 10px; }
.mx--off .mx-panel { position: static; padding: 0 0 12px; background: none; }
.mx--off .mx-head { position: static !important; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; margin-bottom: 4px; }
.mx--off .mx-count { text-shadow: none; }
.mx-offnote { margin-bottom: 14px; }
.mx--off .mx-list { position: static; transform: none; visibility: visible; background: none; border: 0; box-shadow: none; border-radius: 0; }
.mx--off .mx-list__head { display: none; }
.mx--off .mx-items { padding: 0 0 calc(var(--nav-h) + 30px); overflow: visible; }
.mx-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .mx-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .mx-grid { grid-template-columns: repeat(3, 1fr); } }

@media (min-width: 960px) {
  .mx { display: grid; grid-template-columns: 420px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: calc(100vh - var(--top-h) - 1px); }
  .mx-panel { position: relative; grid-column: 1; grid-row: 1; gap: 12px; padding: 22px 20px 12px; background: var(--bg); border-right: 1px solid var(--line); pointer-events: auto; }
  .mx-head { position: static !important; width: auto; height: auto; clip: auto; overflow: visible; white-space: normal; }
  .mx-chips { flex-wrap: wrap; overflow: visible; }
  .mx-panel .wseg--4 { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .mx-chips .chip { background: rgba(255, 255, 255, .04); }
  .mx-count { text-shadow: none; color: var(--muted); }
  .mx-stage { position: relative; inset: auto; grid-column: 2; grid-row: 1 / span 2; }
  .mx-list { position: relative; inset: auto; grid-column: 1; grid-row: 2; transform: none; visibility: visible; border-radius: 0; border: 0; border-right: 1px solid var(--line); box-shadow: none; background: var(--bg); transition: none; }
  .mx-list__head { display: none; }
  .mx-items { padding: 4px 16px 24px; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
  .mx-ctl--list { display: none; }
  .mx-ctls { top: 16px; right: 16px; bottom: auto; flex-direction: row; }
  .mx-stage:has(.mx-card:not([hidden])) .mx-ctls { opacity: 1; pointer-events: auto; transform: none; }
  .mx-card { left: 20px; right: auto; bottom: 30px; width: 410px; max-height: calc(100% - 100px); padding: 16px; }
  .mx-card__one { grid-template-columns: 110px minmax(0, 1fr); }
  .mx--off { display: block; height: auto; }
  .mx--off .mx-panel, .mx--off .mx-list { border: 0; background: none; }
}
@media (min-width: 1280px) { .mx { grid-template-columns: 460px minmax(0, 1fr); } }

/* =====================================================================
   2. Пятничная подборка
   ===================================================================== */
.dg-hero { display: grid; gap: 16px; margin: 4px 0 18px; }
.dg-hero__text { display: grid; gap: 10px; }
.dg-steps, .of-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dg-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.dg-steps b { flex: none; min-width: 92px; font-family: var(--font-display); font-size: 14px; color: var(--gold); }
@media (min-width: 960px) {
  .dg-hero { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: end; gap: 32px; margin-bottom: 24px; }
  .dg-hero .display { font-size: 56px; }
}
.dg-screen .wseg { margin-bottom: 18px; background: rgba(255, 255, 255, .05); }
@media (min-width: 640px) {
  .dg-screen .wseg__b { padding: 10px 40px 10px 16px; min-height: 60px; }
  .dg-screen .wseg__r { font-family: var(--font-display); font-size: 15px; }
}
.dg-range { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 14px; }
.dg-range__k { font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.dg-range__r { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.dg-range__n { color: var(--muted); font-size: 14px; font-weight: 700; }
.dg-range__hol { flex-basis: 100%; font-size: 14px; color: var(--text-2); }
.dg-range__hol b { color: var(--text); }
.dg-body { animation: dgIn .45s var(--ease); }
@keyframes dgIn { from { opacity: 0; transform: translateY(10px); } }

.dg-split { display: grid; gap: 16px; }
@media (min-width: 960px) { .dg-split { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: start; gap: 22px; } }
.dg-post, .dg-card { display: grid; gap: 12px; min-width: 0; padding: 16px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.dg-post__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dg-h { font-size: 18px; font-weight: 700; }
.dg-size { font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: .04em; }
.dg-tabs { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.dg-tab { min-height: 34px; padding: 5px 14px; border: 0; border-radius: 999px; background: none; color: var(--text-2); font-weight: 800; font-size: 14px; cursor: pointer; transition: background .25s, color .25s; }
.dg-tab:hover { color: var(--text); }
.dg-tab[aria-selected="true"] { background: var(--text); color: var(--ink); }

.dg-post__panel {
  border-radius: 18px; padding: 14px 12px; min-width: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(123, 97, 255, .16), transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(255, 107, 87, .12), transparent 45%),
    #0F1A26;
}
.dg-msg { max-width: 560px; border-radius: 18px 18px 18px 6px; padding: 12px 14px 8px; background: #1E2C3A; color: #EEF2F6; box-shadow: 0 6px 18px rgba(0, 0, 0, .35); animation: dgIn .35s var(--ease); }
.dg-msg--vk { border-radius: 14px; background: #19191A; border: 1px solid #2C2D2E; color: #E1E3E6; max-width: none; }
.dg-msg__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dg-msg__ava { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); flex: none; }
.dg-msg__head b { display: block; font-size: 14px; color: #6AB2F2; }
.dg-msg--vk .dg-msg__head b { color: #71AAEB; }
.dg-msg__head span { font-size: 12px; color: #7F91A4; }
.dg-msg__text { font-size: 14.5px; line-height: 1.5; max-height: 520px; overflow-y: auto; overflow-wrap: anywhere; scrollbar-width: thin; }
.dg-msg__text a { color: #6AB2F2; }
.dg-msg__foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: #7F91A4; }
.dg-msg--tg .dg-msg__foot { justify-content: flex-end; }
.dg-acts { align-items: center; }
.dg-acts .btn { flex: 1 1 200px; }
.dg-len { font-size: 12px; color: var(--muted); font-weight: 700; }
.btn.is-done { background: var(--ok); color: #082414; }

.dg-frame { position: relative; aspect-ratio: 1 / 1; width: 100%; border-radius: 18px; overflow: hidden; background: var(--bg-2); box-shadow: 0 14px 36px rgba(0, 0, 0, .45); }
.dg-canvas { display: block; width: 100%; height: 100%; }
.dg-frame__busy { position: absolute; inset: 0; background: var(--surface-2); opacity: 0; pointer-events: none; transition: opacity .35s; }
.dg-frame.is-busy .dg-frame__busy { opacity: 1; }
.dg-frame__err { position: absolute; left: 12px; right: 12px; bottom: 12px; }

.dg-partner { margin: 22px 0 4px; }
.dg-sec { margin-top: 6px; }
.dg-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .dg-grid { grid-template-columns: repeat(2, 1fr); } .dg-grid--feat { grid-template-columns: minmax(0, 560px); } }
@media (min-width: 1100px) { .dg-grid { grid-template-columns: repeat(3, 1fr); } .dg-grid--feat { grid-template-columns: minmax(0, 560px); } }
.dg-grid--feat .ecard { box-shadow: 0 0 0 2px rgba(245, 185, 71, .55), var(--shadow); }
.dg-sig { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 32px 0 0; color: var(--gold-2); font-weight: 800; text-align: center; }
.dg-sig img { width: 26px; height: 26px; }

/* =====================================================================
   3. Добавить событие
   ===================================================================== */
.of-hero { display: grid; gap: 16px; margin: 4px 0 16px; }
.of-hero__text { display: grid; gap: 10px; }
.of-steps li { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.of-steps__n { display: flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--grad-coral); color: #2A0E12; font-weight: 800; font-size: 14px; }
.of-steps b { display: block; font-size: 14px; }
.of-steps small { display: block; font-size: 12px; color: var(--muted); }
@media (max-width: 639px) {
  .dg-steps, .of-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .dg-steps li, .of-steps li { flex-direction: column; align-items: flex-start; gap: 4px; padding: 9px 10px; font-size: 12px; line-height: 1.3; }
  .dg-steps b { min-width: 0; font-size: 13px; }
  .of-steps__n { width: 24px; height: 24px; font-size: 12px; }
  .of-steps b { font-size: 12.5px; line-height: 1.25; }
  .of-steps small { font-size: 11px; }
}
@media (min-width: 960px) {
  .of-hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: end; gap: 32px; margin-bottom: 22px; }
  .of-hero .display { font-size: 56px; }
}
.of-modebar { margin-bottom: 16px; }
.of-modebar .note b { color: inherit; }

.of-form { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.of-main { display: grid; gap: 16px; min-width: 0; }
@media (min-width: 1024px) {
  .of-form { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "main side" "send side"; column-gap: 28px; align-items: start; }
  .of-main { grid-area: main; }
  .of-side { grid-area: side; position: sticky; top: calc(var(--top-h) + 16px); }
  .of-send { grid-area: send; }
}
@media (min-width: 1200px) { .of-form { grid-template-columns: minmax(0, 1fr) 420px; } }

.of-sec { min-width: 0; margin: 0; padding: 16px 16px 2px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--surface); box-shadow: var(--shadow-s); }
.of-sec__t { float: left; width: 100%; display: flex; align-items: center; gap: 10px; padding: 0; margin: 0 0 14px; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.of-sec__i { display: flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 11px; background: rgba(245, 185, 71, .14); font-size: 17px; }
.of-sec__body { clear: both; min-width: 0; }
@media (min-width: 640px) { .of-sec { padding: 20px 22px 6px; } }
.of-row { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 14px; }
@media (min-width: 560px) {
  .of-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .of-row--addr { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
.of-req { color: var(--coral-2); }
.of-count { align-self: flex-end; margin-top: -2px; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.of-count.is-low { color: var(--gold-2); }
.of-f.is-invalid .field__label { color: #FFB3C1; }
.field__err { animation: ofShake .35s var(--ease); }
@keyframes ofShake { 0%, 100% { transform: none; } 30% { transform: translateX(-4px); } 60% { transform: translateX(3px); } }

/* радио-чипы */
.of-chips { gap: 8px; padding: 2px 0 4px; margin: 0; }
.of-rchip { position: relative; }
.of-radio { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.of-rchip:has(.of-radio:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.of-rchip.is-on { background: var(--text); color: var(--ink); border-color: var(--text); }
.of-cats .of-rchip.is-on { background: var(--cat); border-color: var(--cat); color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0, 0, 0, .3); }
.of-rchip.chip--gold.is-on { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.is-invalid .of-chips .chip { border-color: rgba(255, 92, 122, .55); }

/* переключатели */
.of-switch { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); cursor: pointer; transition: border-color .2s, background .2s; }
.of-switch:hover { border-color: var(--line-2); }
.of-switch__in { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.of-switch__ui { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, .16); transition: background .25s; }
.of-switch__ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); transition: transform .35s var(--ease-spring); }
.of-switch__in:checked + .of-switch__ui { background: var(--coral); }
.of-switch__in:checked + .of-switch__ui::after { transform: translateX(18px); }
.of-switch__in:focus-visible + .of-switch__ui { outline: 3px solid var(--gold); outline-offset: 2px; }
.of-switch:has(.of-switch__in:checked) { border-color: rgba(255, 107, 87, .45); background: rgba(255, 107, 87, .07); }
.of-switch__t b { display: block; font-size: 15px; }
.of-switch__t small { display: block; font-size: 12px; color: var(--muted); }
.of-multi { margin-bottom: 14px; }

/* площадка с подсказками */
.of-combo { position: relative; }
.of-combo__list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); max-height: 330px; overflow-y: auto;
  list-style: none; margin: 0; padding: 6px; border-radius: 16px; background: var(--bg-2); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); animation: dgIn .2s var(--ease);
}
.of-combo__opt { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.of-combo__opt:hover, .of-combo__opt.is-active { background: rgba(255, 255, 255, .08); }
.of-combo__opt b { display: block; font-size: 14px; line-height: 1.3; }
.of-combo__opt small { display: block; font-size: 12px; color: var(--muted); }
.of-combo__e { flex: none; width: 24px; text-align: center; font-size: 17px; }
.of-combo__opt--other { margin-top: 4px; padding-top: 11px; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; }
.of-venue-badge { font-size: 12.5px; font-weight: 700; color: #A8F0C9; }

/* точка на карте */
.of-point { display: grid; gap: 8px; }
.of-map { height: 260px; }
@media (min-width: 960px) { .of-map { height: 300px; } }
.is-invalid .of-map { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 92, 122, .18); }
.of-point__bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 10px; }
.of-coords { font-size: 13px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.of-coords.is-set { color: var(--text-2); }
.of-manual .field { margin-bottom: 0; }

/* афиша */
.of-postbox { display: grid; }
.of-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line-2); border-radius: 18px; background: rgba(255, 255, 255, .02);
  transition: border-color .2s, background .2s, transform .25s var(--ease-spring);
}
.of-drop:hover, .of-drop.is-over { border-color: var(--gold); background: rgba(245, 185, 71, .07); }
.of-drop.is-over { transform: scale(1.015); }
.of-drop:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.of-drop__i { font-size: 34px; line-height: 1; transition: transform .3s var(--ease-spring); }
.of-drop:hover .of-drop__i, .of-drop.is-over .of-drop__i { transform: translateY(-3px) rotate(-6deg) scale(1.08); }
.of-drop__t b { display: block; font-size: 15px; }
.of-drop__t small { display: block; max-width: 46ch; margin: 4px auto 0; font-size: 12.5px; color: var(--muted); }
.of-pv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px; border-radius: 18px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); animation: dgIn .35s var(--ease); }
.of-pv__img { display: flex; align-items: center; justify-content: center; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--surface-2); font-size: 28px; }
.of-pv__img img { width: 100%; height: 100%; object-fit: cover; }
.of-pv__meta { display: grid; gap: 4px; min-width: 0; }
.of-pv__meta small { font-size: 12.5px; color: var(--muted); }
.of-pv__meta .btn-row { margin-top: 6px; gap: 8px; }
.of-pv__busy { grid-column: 1 / -1; padding: 22px; border-radius: 12px; text-align: center; font-weight: 700; color: var(--text-2); background: var(--surface-2); }

.of-private { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 14px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; background: rgba(88, 178, 240, .08); border: 1px solid rgba(88, 178, 240, .25); color: #BFE3FF; }
.of-private b { color: #DDF0FF; }

/* отправка */
.of-send { display: grid; gap: 12px; padding: 16px; border-radius: var(--r-l); background: var(--grad-hero); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.of-send .field { margin-bottom: 0; }
.of-consent { font-size: 14px; color: var(--text-2); line-height: 1.45; }
.of-formerr:empty { display: none; }
.of-submit { min-height: 54px; font-size: 16px; }
.of-submit.is-busy { cursor: progress; }
.of-submit.is-busy::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(42, 14, 18, .3); border-top-color: #2A0E12; animation: spin .8s linear infinite; }
.of-legal { font-size: 12px; color: var(--muted); text-align: center; }
.of-clear { padding: 2px 4px; border: 0; background: none; color: var(--gold-2); font-weight: 800; font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.of-editbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 14px; }

/* предпросмотр */
.of-side { display: grid; gap: 12px; min-width: 0; }
.of-preview { display: grid; gap: 10px; padding: 16px; border-radius: var(--r-l); background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.of-preview__k { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.of-live { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: ofLive 1.8s ease-out infinite; }
@keyframes ofLive { 0% { box-shadow: 0 0 0 0 rgba(94, 211, 154, .6); } 100% { box-shadow: 0 0 0 9px rgba(94, 211, 154, 0); } }
.of-pcard { pointer-events: none; animation: ofFlash .4s var(--ease); }
@keyframes ofFlash { from { opacity: .7; } }
@media (min-width: 1024px) {
  .of-pcard.ecard { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .of-pcard .cover { aspect-ratio: 16 / 9; height: auto; min-height: 0; }
}
.of-preview__line { padding: 10px 12px; border-radius: 14px 14px 14px 4px; background: #1E2C3A; color: #EEF2F6; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.of-tips { display: grid; gap: 6px; margin: 0; padding: 0 4px 0 22px; font-size: 13px; color: var(--muted); }

/* успех */
.of-ok { display: grid; justify-items: center; gap: 12px; padding: 34px 18px; border-radius: var(--r-l); text-align: center; background: var(--grad-hero); border: 1px solid var(--line-2); box-shadow: var(--shadow); outline: none; animation: dgIn .5s var(--ease); }
.of-ok__icon { display: flex; align-items: center; justify-content: center; width: 78px; height: 78px; border-radius: 50%; background: var(--grad-coral); color: #2A0E12; font-size: 40px; font-weight: 800; box-shadow: 0 12px 34px rgba(255, 107, 87, .45); animation: ofPop .7s var(--ease-spring) both; }
@keyframes ofPop { 0% { transform: scale(.3) rotate(-30deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
.of-ok__t { font-size: clamp(22px, 5vw, 32px); font-weight: 800; }
.of-ok__lead { max-width: 60ch; color: var(--text-2); }
.of-ok__key { max-width: 60ch; font-size: 13px; color: var(--muted); }
.of-ok__acts { justify-content: center; margin-top: 6px; }

/* статусы и «Мои события» */
.of-status { display: inline-flex; align-items: center; gap: 6px; justify-self: start; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; background: rgba(255, 255, 255, .08); color: var(--text-2); }
.of-ok .of-status { justify-self: center; font-size: 13px; padding: 6px 14px; }
.of-status--pending { background: rgba(245, 185, 71, .16); color: var(--gold-2); }
.of-status--ok { background: rgba(94, 211, 154, .16); color: #8FF0BE; }
.of-status--err { background: rgba(255, 92, 122, .16); color: #FFB3C1; }
.of-status--off { background: rgba(255, 255, 255, .06); color: var(--muted); }
.of-status--demo { background: rgba(255, 107, 87, .16); color: #FFB4A6; }
.of-status--wait { color: var(--muted); animation: ofBlink 1.2s ease-in-out infinite; }
@keyframes ofBlink { 50% { opacity: .45; } }
.of-mine { margin-top: 30px; }
.of-mlist { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.of-mitem { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); }
.of-mitem__main { display: grid; gap: 2px; min-width: 0; }
.of-mitem__t { font-size: 15px; overflow-wrap: anywhere; }
.of-mitem__d { font-size: 13px; color: var(--muted); }
.of-mitem__reason { margin-top: 4px; font-size: 13px; color: #FFC2CE; }
.of-mitem__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.of-mitem__acts:empty { display: none; }
@media (min-width: 640px) {
  .of-mitem { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .of-mitem .of-status { justify-self: end; }
  .of-mitem__acts { grid-column: 1 / -1; }
}
@media (min-width: 960px) {
  .of-mitem { grid-template-columns: minmax(0, 1fr) auto auto; }
  .of-mitem__acts { grid-column: auto; justify-content: flex-end; }
}

/* ---------- Печать ---------- */
@media print {
  .mx-ctls, .mx-card, .dg-tabs, .dg-acts, .wseg, .of-send, .of-side, .of-mine { display: none !important; }
  .mx { height: auto; }
  .dg-post, .dg-card, .of-sec { box-shadow: none; background: #fff; color: #111; border-color: #ccc; }
}

/* ---------- Без анимаций ---------- */
@media (prefers-reduced-motion: reduce) {
  .mx-card.is-in, .mx-badge, .mx-vpin, .mx-star, .dg-body, .dg-msg, .of-ok, .of-ok__icon, .of-pv, .of-pcard, .of-live, .field__err, .of-combo__list, .of-status--wait { animation: none !important; }
  .mx-list, .mx-ctls { transition: none; }
}
