/* Community market: catalog, filters, publishing and personal submissions. */
.mk { width: min(1560px, calc(100% - 80px)); margin: 0 auto; padding: 136px 0 90px; }

/* Заголовок */
.mk-hero { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; padding: 34px 36px; margin-bottom: 18px; border-radius: 30px; overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, #3a0f1a 0%, #1a0d13 34%, #0f0e12 70%); border: 1px solid #2a1820; isolation: isolate; }
.mk-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(#ffffff06 1px, transparent 1px), linear-gradient(90deg, #ffffff06 1px, transparent 1px); background-size: 28px 28px; mask-image: radial-gradient(80% 120% at 85% 10%, #000 0%, transparent 70%); }
.mk-hero::after { content: ""; position: absolute; right: -80px; top: -120px; width: 380px; height: 380px; z-index: -1; border-radius: 50%; background: radial-gradient(circle, #ff2d4233, transparent 65%); filter: blur(10px); }
.mk-eyebrow { color: #c97a8a; font-size: 10px; letter-spacing: .2em; font-weight: 600; }
.mk-hero h1 { font-size: clamp(32px, 3.4vw, 50px); margin: 10px 0 10px; line-height: 1.1; letter-spacing: -.03em; }
.mk-hero p { color: #9a909e; font-size: 15px; line-height: 1.55; max-width: 470px; margin: 0; }
.mk-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.mk-hero__actions .btn__face { min-height: 46px; padding: 0 20px; font-size: 14px; }

/* Переключатель типов и поиск */
.mk-bar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; margin-bottom: 24px; }
.mk-types { display: flex; gap: 4px; padding: 5px; border-radius: 19px; background: #101013; border: 1px solid #1d1a21; }
.mk-types button { display: inline-flex; align-items: center; gap: 9px; padding: 0 17px 0 13px; height: 44px; border-radius: 14px; color: #8d8693; font-size: 14px; font-weight: 500; transition: background-color .2s, color .2s; white-space: nowrap; }
.mk-types button:hover { color: #e8e0ea; background: #ffffff06; }
.mk-types button[aria-selected="true"] { color: #fff; background: linear-gradient(180deg, #d8213d, #b3162f); box-shadow: 0 8px 24px -10px #ff2d42aa, inset 0 1px 0 #ffffff26; }
.mk-types__icon svg { width: 18px; height: 18px; display: block; }
.mk-types b { min-width: 22px; padding: 2px 7px; border-radius: 8px; background: #ffffff0d; color: inherit; font-size: 11px; font-weight: 500; text-align: center; }
.mk-types button[aria-selected="true"] b { background: #00000030; }
.mk-types button:focus-visible { outline: 2px solid #ff7489; outline-offset: 2px; }
.mk-search { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 18px; border-radius: 19px; background: #101013; border: 1px solid #1d1a21; transition: border-color .2s; }
.mk-search:focus-within { border-color: #c23a52; }
.mk-search svg { width: 19px; height: 19px; color: #77717e; flex: none; }
.mk-search input { border: 0; outline: 0; background: transparent; width: 100%; min-width: 0; font: inherit; font-size: 14px; color: #ded9e2; }
.mk-search input::placeholder { color: #6f6976; }

/* Раскладка */
.mk-layout { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 24px; align-items: start; }
.mk-filters { display: grid; gap: 14px; }
.mk-filters form { display: grid; gap: 24px; padding: 24px 22px; border-radius: 24px; background: #101013; }
.mk-filter-toggle { display: none; }
.mk-filters fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.mk-filters fieldset[hidden] { display: none; }
.mk-filters legend { padding: 0; margin-bottom: 11px; color: #8b8490; font-size: 13px; }
.mk-filters__note { margin: 0; color: #7f7885; font-size: 12px; line-height: 1.55; }
.mk-segment { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 3px; border-radius: 14px; background: #19181d; }
.mk-segment label, .mk-chips label, .mk-kind label { position: relative; cursor: pointer; }
.mk-segment input, .mk-chips input, .mk-kind input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.mk-segment span { display: block; text-align: center; padding: 9px 5px; border-radius: 11px; color: #847e8b; font-size: 13px; transition: background-color .2s, color .2s; }
.mk-segment input:checked + span { background: #2a2530; color: #fff; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.mk-chips span { display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border: 1px solid #2b2831; border-radius: 12px; color: #9a93a0; font-size: 13px; transition: background-color .2s, border-color .2s, color .2s; }
.mk-chips span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #3a3540; transition: background-color .2s, box-shadow .2s; }
.mk-chips label:hover span { border-color: #4a3b44; color: #e3dbe6; }
.mk-chips input:checked + span { background: #361720; border-color: #bd2d45; color: #ffd0d8; }
.mk-chips input:checked + span::before { background: #ff2d42; box-shadow: 0 0 8px #ff2d42; }
.mk-segment input:focus-visible + span, .mk-chips input:focus-visible + span, .mk-kind input:focus-visible + span { outline: 2px solid #ff7489; outline-offset: 2px; }
.mk-reset { width: 100%; border: 1px solid #2b2831; background: transparent; color: #aaa2b0; border-radius: 14px; font-size: 12px; padding: 12px 8px; cursor: pointer; }
.mk-reset:hover { color: #fff; border-color: #6c3a48; }
.mk-rules { padding: 22px; border-radius: 24px; border: 1px dashed #2b2530; color: #8b8490; font-size: 12.5px; line-height: 1.55; }
.mk-rules strong { display: block; color: #d9d0dc; font-size: 13px; font-weight: 500; margin-bottom: 10px; }
.mk-rules ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

/* Каталог */
.mk-catalog { min-width: 0; }
.mk-results { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 4px 4px 16px; }
.mk-results h2 { font-family: inherit; font-size: 20px; font-weight: 500; margin: 0; }
.mk-results > span { font-size: 12px; color: #7f7885; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.mk-grid:empty { display: none; }
.mk-card { display: flex; flex-direction: column; min-width: 0; border-radius: 22px; overflow: hidden; background: #111014; border: 1px solid #1e1b22; transition: border-color .25s, transform .25s var(--ease-out), box-shadow .25s; }
.mk-card:hover { border-color: #4a2330; transform: translateY(-3px); box-shadow: 0 24px 40px -28px #ff2d4277; }
.mk-card__media { position: relative; display: block; aspect-ratio: 16 / 10; width: 100%; overflow: hidden; background: radial-gradient(circle at 50% 40%, #2a1119, #141116 70%); }
.mk-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease-out); }
.mk-card:hover .mk-card__media img { transform: scale(1.04); }
.mk-card__glyph { position: absolute; inset: 0; display: grid; place-items: center; color: #e64861; }
.mk-card__glyph svg { width: 44px; height: 44px; }
.mk-card__kind { position: absolute; left: 12px; top: 12px; padding: 5px 10px; border-radius: 9px; background: #0b0a0dcc; backdrop-filter: blur(8px); color: #f1e3e8; font-size: 11px; font-weight: 500; }
.mk-card__body { display: flex; flex-direction: column; gap: 9px; flex: 1; padding: 16px 18px 18px; }
.mk-card h3 { margin: 0; font: 500 16px/1.3 var(--font-text); }
.mk-card h3 button { text-align: left; color: #f1e9e6; }
.mk-card h3 button:hover { color: #ff8d9e; }
.mk-card__body > p { margin: 0; color: #857e8b; font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.mk-author { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: #b6adb9; font-size: 12.5px; overflow-wrap: anywhere; }
.mk-author i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, #e8324b, #7c1225); color: #fff; font-style: normal; font-size: 11px; font-weight: 600; }
.mk-tag { flex: none; padding: 4px 9px; border-radius: 8px; background: #1d1a21; color: #a39aa8; font-size: 11px; }
.mk-tag--signal { background: #361720; color: #ffb0be; }
.mk-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 12px; border-top: 1px solid #ffffff08; }
.mk-downloads { display: inline-flex; align-items: center; gap: 6px; color: #7f7885; font-size: 12px; }
.mk-downloads svg { width: 15px; height: 15px; }
.mk-card__get { padding: 8px 14px; border-radius: 11px; background: #ff2d4214; border: 1px solid #ff2d4233; color: #ff9aab; font-size: 12px; font-weight: 500; transition: background-color .2s, color .2s; }
.mk-card__get:hover { background: #d8213d; color: #fff; }
.mk-card--skeleton { min-height: 320px; padding: 0 0 18px; gap: 12px; pointer-events: none; }
.mk-card--skeleton span { display: block; aspect-ratio: 16 / 10; background: #18161b; }
.mk-card--skeleton i { display: block; height: 12px; margin: 0 18px; border-radius: 6px; background: #18161b; }
.mk-card--skeleton i:last-child { width: 55%; }
.mk-card--skeleton > * { animation: mk-pulse 1.4s ease-in-out infinite; }
@keyframes mk-pulse { 50% { opacity: .45; } }

.mk-empty { min-height: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #201c24; border-radius: 27px; padding: 40px 24px; text-align: center; background: radial-gradient(ellipse at 50% 37%, #29101955, transparent 57%), #0e0e11; }
.mk-empty[hidden] { display: none; }
.mk-empty__symbol { display: grid; place-items: center; width: 88px; height: 88px; border: 1px solid #45212e; border-radius: 26px; background: #20131a; transform: rotate(-7deg); margin-bottom: 25px; color: #e64861; }
.mk-empty__symbol svg { width: 44px; height: 44px; transform: rotate(7deg); }
.mk-empty h3 { font: 600 clamp(22px, 2.4vw, 28px)/1.3 var(--font-text); margin: 0 0 10px; }
.mk-empty p { color: #89818f; font-size: 14px; line-height: 1.6; max-width: 340px; margin: 0 0 26px; }

/* Окна */
.mk-modal { width: min(640px, calc(100vw - 32px)); }
.mk-modal__lead { margin: 6px 0 0; color: #8b8490; font-size: 14px; }
.mk-form { display: grid; gap: 18px; }
.mk-form[hidden] { display: none; }
.mk-kind { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border: 0; padding: 0; margin: 0; }
.mk-kind legend { padding: 0; margin-bottom: 10px; color: #8b8490; font-size: 13px; }
.mk-kind span { display: grid; gap: 3px; height: 100%; padding: 14px; border-radius: 16px; border: 1px solid #29252e; background: #141317; transition: border-color .2s, background-color .2s; }
.mk-kind i { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 7px; border-radius: 11px; background: #1f1b23; color: #a99fae; }
.mk-kind i svg { width: 19px; height: 19px; }
.mk-kind b { font-size: 14px; font-weight: 500; }
.mk-kind small { color: #7b7480; font-size: 12px; }
.mk-kind label:hover span { border-color: #4a3b44; }
.mk-kind input:checked + span { border-color: #cf2a44; background: #241018; box-shadow: inset 0 0 0 1px #cf2a44; }
.mk-kind input:checked + span i { background: #d8213d; color: #fff; }
.mk-field { display: grid; gap: 9px; border: 0; padding: 0; margin: 0; min-width: 0; color: #8b8490; font-size: 13px; }
.mk-field[hidden] { display: none; }
.mk-field legend { padding: 0; margin-bottom: 9px; }
.mk-field > span { display: flex; justify-content: space-between; gap: 10px; }
.mk-field small { color: #625c68; font-size: 11px; }
.mk-field input, .mk-field textarea { width: 100%; min-width: 0; border: 1px solid #29272e; border-radius: 14px; background: #0c0b0e; color: #ece4ee; font: inherit; font-size: 14px; padding: 13px 15px; transition: border-color .2s; }
.mk-field textarea { resize: vertical; min-height: 104px; line-height: 1.5; }
.mk-field input:focus, .mk-field textarea:focus { outline: 0; border-color: #c23a52; }
.mk-uploads { display: grid; grid-template-columns: 1.25fr 1fr; gap: 12px; }
.mk-drop { position: relative; display: grid; place-items: center; min-height: 150px; padding: 16px; border-radius: 18px; border: 1.5px dashed #34303a; background: #0f0e12; text-align: center; cursor: pointer; overflow: hidden; transition: border-color .2s, background-color .2s; }
.mk-drop:hover, .mk-drop.is-drag { border-color: #c23a52; background: #1a0f14; }
.mk-drop:focus-within { border-color: #ff7489; }
.mk-drop.has-value { border-style: solid; border-color: #3b2a33; }
.mk-drop.is-invalid { border-color: #e04462; background: #22101a; }
.mk-drop__empty { display: grid; justify-items: center; gap: 4px; color: #8b8490; }
.mk-drop__empty i { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 13px; background: #1e1a22; color: #e64861; }
.mk-drop__empty i svg { width: 21px; height: 21px; }
.mk-drop__empty b { color: #e6dde8; font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.mk-drop__empty small { font-size: 11.5px; }
.mk-drop__preview { position: absolute; inset: 0; }
.mk-drop__preview img { width: 100%; height: 100%; object-fit: cover; }
.mk-drop__preview span { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); padding: 6px 11px; border-radius: 9px; background: #0b0a0dcc; backdrop-filter: blur(6px); font-size: 11.5px; color: #f1e3e8; white-space: nowrap; }
.mk-drop.has-value[data-drop="file"] .mk-drop__empty i { background: #d8213d; color: #fff; }
.mk-form__error { margin: 0; padding: 11px 14px; border-radius: 12px; background: #3a101b; color: #ffb3c0; font-size: 13px; }
.mk-form__error[hidden] { display: none; }
.mk-form__actions .btn { width: 100%; }
.mk-done { display: grid; justify-items: center; text-align: center; padding: 18px 4px 4px; }
.mk-done[hidden] { display: none; }
.mk-done__icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: #d8213d; color: #fff; box-shadow: 0 14px 40px -10px #ff2d42aa; margin-bottom: 18px; }
.mk-done__icon svg { width: 30px; height: 30px; }
.mk-done h3 { font: 600 22px/1.3 var(--font-text); margin: 0 0 8px; }
.mk-done p { color: #8b8490; font-size: 14px; line-height: 1.55; max-width: 380px; margin: 0 0 22px; }
.mk-done .modal__actions { justify-content: center; }

.mk-ban { display: flex; gap: 14px; padding: 16px; margin-bottom: 18px; border-radius: 16px; border: 1px solid #5d1c2c; background: #22101a; }
.mk-ban[hidden] { display: none; }
.mk-ban__icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: #4a1322; color: #ff8a9f; }
.mk-ban__icon svg { width: 19px; height: 19px; }
.mk-ban strong { display: block; color: #ffd3db; font-size: 14px; font-weight: 500; margin-bottom: 5px; }
.mk-ban p { margin: 3px 0 0; color: #c99aa6; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }

.mk-mine { display: grid; gap: 10px; }
.mk-mine__row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 12px; border-radius: 16px; background: #141317; border: 1px solid #1f1c23; }
.mk-mine__thumb { display: block; aspect-ratio: 16 / 10; border-radius: 10px; overflow: hidden; background: #1d1a21; }
.mk-mine__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mk-mine__info { min-width: 0; display: grid; gap: 4px; }
.mk-mine__info strong { font-size: 14px; font-weight: 500; overflow-wrap: anywhere; }
.mk-mine__info > span { color: #7f7885; font-size: 12px; }
.mk-mine__note { margin: 6px 0 0; padding: 9px 11px; border-radius: 10px; background: #1d161b; color: #c5b6bf; font-size: 12.5px; line-height: 1.5; overflow-wrap: anywhere; }
.mk-mine__note b { color: #ff9aab; font-weight: 500; }
.mk-mine__side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.mk-mine__delete { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #7f7885; }
.mk-mine__delete:hover { color: #ff8a9f; background: #ff2d4214; }
.mk-mine__delete svg { width: 17px; height: 17px; }
.mk-mine__empty { display: grid; justify-items: center; gap: 16px; padding: 30px 10px; color: #8b8490; font-size: 14px; text-align: center; }
.mk-mine__empty p { margin: 0; }
.mk-status { white-space: nowrap; padding: 5px 10px; border-radius: 9px; font-size: 11.5px; background: #1f1c23; color: #a39aa8; }
.mk-status--pending { background: #2e2512; color: #f1c96a; }
.mk-status--approved { background: #12281c; color: #7fe0a4; }
.mk-status--rejected, .mk-status--removed { background: #33121c; color: #ff9aab; }

.mk-modal--item { width: min(920px, calc(100vw - 32px)); }
.mk-item { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.mk-item__media { position: relative; min-height: 100%; background: radial-gradient(circle at 50% 40%, #2a1119, #141116 70%); }
.mk-item__media img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 340px; }
.mk-item__media .icon-btn { position: absolute; top: 12px; left: 12px; background: #0b0a0dcc; backdrop-filter: blur(8px); }
.mk-item__body { display: flex; flex-direction: column; gap: 16px; padding: 28px; min-width: 0; }
.mk-item__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-item h2 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; margin: 0; overflow-wrap: anywhere; }
.mk-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; color: #7f7885; font-size: 12.5px; }
.mk-item__meta > span:not(.mk-author) { display: inline-flex; align-items: center; gap: 6px; }
.mk-item__meta svg { width: 15px; height: 15px; }
.mk-item__text { margin: 0; color: #b1a8b4; font-size: 14px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.mk-item__file { display: flex; align-items: center; gap: 12px; padding: 12px; margin-top: auto; border-radius: 14px; background: #141317; border: 1px solid #1f1c23; }
.mk-item__file > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #1f1b23; color: #e64861; flex: none; }
.mk-item__file svg { width: 19px; height: 19px; }
.mk-item__file strong { display: block; font-size: 13.5px; font-weight: 500; overflow-wrap: anywhere; }
.mk-item__file small { color: #7f7885; font-size: 12px; }

@media (min-width: 1100px) { .mk-filters { position: sticky; top: 105px; } }
@media (max-width: 1100px) { .mk-bar { grid-template-columns: 1fr; } .mk-types { justify-self: start; } }
@media (max-width: 900px) {
  .mk { width: calc(100% - 40px); padding-top: 116px; }
  .mk-layout { grid-template-columns: 1fr; }
  .mk-filters { position: static; }
  .mk-rules { display: none; }
  .mk-hero { flex-direction: column; align-items: flex-start; padding: 28px; }
  .mk-hero__actions { justify-content: flex-start; }
  .mk-item { grid-template-columns: 1fr; }
  .mk-item__media img { min-height: 0; max-height: 360px; aspect-ratio: 16 / 10; }
}
@media (max-width: 900px) {
  .js .mk-filter-toggle { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 16px 20px; border-radius: 18px; background: #101013; color: #e9e1eb; font-size: 14px; }
  .js .mk-filter-toggle > span:last-child { color: #bd6e81; font-size: 20px; line-height: 1; }
  .js .mk-filters form { display: none; }
  .js .mk-filters form.is-open { display: grid; }
}
@media (max-width: 620px) {
  .mk { width: calc(100% - 32px); padding-top: 104px; padding-bottom: 50px; }
  .mk-hero { padding: 24px 20px; border-radius: 24px; }
  .mk-hero__actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .mk-hero__actions .btn { width: 100%; }
  .mk-hero__actions .btn__face { padding: 0 12px; }
  .mk-types { display: grid; grid-template-columns: repeat(3, 1fr); justify-self: stretch; }
  .mk-types button { justify-content: center; padding: 0 6px; gap: 6px; font-size: 13px; }
  .mk-types__icon { display: none; }
  .mk-search { height: 50px; }
  .mk-grid { grid-template-columns: 1fr; }
  .mk-empty { min-height: 380px; }
  .mk-kind { grid-template-columns: 1fr; }
  .mk-kind span { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 11px 13px; }
  .mk-kind i { grid-row: span 2; margin: 0; }
  .mk-uploads { grid-template-columns: 1fr; }
  .mk-drop { min-height: 120px; }
  .mk-mine__row { grid-template-columns: 56px minmax(0, 1fr); }
  .mk-mine__side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .mk-item__body { padding: 22px 20px; }
}
