/* ============================================================
   MUZUKRAINE — Application Shell (v2)
   Header, Desktop Sidebar, Mobile Bottom Navigation,
   Global Overlays, Component primitives, responsive ranges.
   Loads on every page. The interface uses one permanent dark theme.
   ============================================================ */

/* ===== 1. Document / body ===== */
html {
  background: var(--mzk-bg);
}

body {
  background: var(--mzk-bg);
  color: var(--mzk-txt);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ===== 2. Layout grid (desktop >= 1024px) ===== */
.mzk-design-page .mzk-main {
  display: grid;
  grid-template-columns: var(--mzk-sbw) minmax(0, 1fr);
  gap: 0;
  max-width: none;
  margin: 0;
  padding: 0;
  align-items: stretch;
}


.mzk-design-page .mzk-main-in {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
}

/* Wide screens: keep the content readable, never stretch edge-to-edge */
@media (min-width: 1600px) {
  .mzk-design-page .mzk-main-in {
    max-width: 1440px;
  }
}

/* ===== 3. Header (compact, fixed) ===== */
.mzk-design-page .header {
  height: var(--mzk-hh);
  min-height: 0;
  padding: 0 24px;
  gap: 16px;
  background: var(--mzk-cbg);
  border-bottom: 1px solid var(--mzk-brdr);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02);
}

.mzk-design-page .header.is-scrolled {
  height: var(--mzk-hh);
  background: color-mix(in srgb, var(--mzk-cbg) 88%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--mzk-brdr);
}

/* Compact logo: wordmark only on desktop, icon on small screens */
.mzk-design-page .header__logo {
  align-items: center;
  gap: 10px;
}

.mzk-design-page .header__logo-text {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.4px;
  line-height: 1;
}

.mzk-design-page .header__logo-main { background: var(--color-primary); color: var(--color-on-primary); }
.mzk-design-page .header__logo-accent { color: var(--color-brand); }
.mzk-design-page .header__logo-tagline { display: none; }

/* Brand mark chip */
.header__logo-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-active));
  color: var(--color-on-primary);
  overflow: hidden;
}

.header__logo-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Nav arrows (desktop) */
.header-nav-btns {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
}

.header-nav-btn {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--mzk-muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: background .15s, color .15s, opacity .15s;
}

.header-nav-btn:hover { background: var(--mzk-hover); color: var(--mzk-txt); }
.header-nav-btn:disabled { opacity: .35; cursor: default; background: none; }
.header-nav-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Header icon buttons (theme, notifications, mobile search, burger) */
.header-icon-btn {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  color: var(--mzk-muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.header-icon-btn:hover { background: var(--mzk-hover); color: var(--mzk-txt); }
.header-icon-btn[aria-expanded="true"] { background: var(--mzk-active); color: var(--color-primary-text); }
.header-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.header-icon-btn .mzk-badge-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-danger);
  border: 2px solid var(--mzk-cbg);
}

/* Notifications dropdown */
.mzk-notif-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 12000;
  min-width: 240px;
  padding: 6px;
  border-radius: 14px;
  background: var(--mzk-cbg);
  border: 1px solid var(--mzk-brdr);
  box-shadow: 0 16px 44px rgba(15, 23, 42, .18);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.mzk-notif-menu.is-open {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Search (center) */
.mzk-design-page .header__right {
  position: relative;
}

.mzk-design-page .header__center .search {
  height: 40px;
  border-radius: 12px;
  background: var(--mzk-bg-muted);
  border-color: transparent;
}

.mzk-design-page .search:focus-within {
  background: var(--mzk-cbg);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--mzk-active);
}

/* ===== 4. Unified desktop sidebar ===== */
.mzk-design-page .mzk-sidebar-left {
  display: block;
  min-width: 0;
  min-height: 0;
  padding: 14px 14px 28px;
  overflow: visible;
  background: #09131d;
  border-right: 1px solid var(--mzk-brdr);
}

.mzk-design-page .mzk-sidebar-sticky {
  position: sticky;
  top: var(--mzk-hh);
  max-height: calc(100vh - var(--mzk-hh) - var(--mzk-ph) - 16px);
  padding-top: 4px;
  overflow-y: auto;
  scrollbar-width: none;
}

.mzk-design-page .mzk-sidebar-sticky::-webkit-scrollbar { display: none; }

.mzk-design-page .mzk-nav-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mzk-design-page .mzk-nav-section {
  margin: 24px 10px 10px;
  color: #ffa200;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mzk-design-page .mzk-nav-item {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--mzk-muted);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease, transform .16s ease;
}

.mzk-design-page .mzk-nav-item:hover {
  color: var(--mzk-txt);
  border-color: rgba(255, 255, 255, .07);
  background: #101e2b;
  transform: translateX(1px);
}

.mzk-design-page .mzk-nav-item.active,
.mzk-design-page .mzk-nav-item[aria-current="page"] {
  color: #f7f9fc;
  border-color: transparent;
  background: #101e2b;
  font-weight: 700;
}

.mzk-design-page .mzk-nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  color: currentColor;
}

.mzk-design-page .mzk-nav-item.active .mzk-nav-icon,
.mzk-design-page .mzk-nav-item[aria-current="page"] .mzk-nav-icon { color: #ffa200; }

.mzk-design-page .mzk-nav-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mzk-design-page .mzk-sb-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 8px 0;
}

.mzk-design-page .mzk-sb-genres__link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 2px;
  padding: 5px 11px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  color: #aeb9c7;
  background: #101e2b;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.mzk-design-page .mzk-sb-genres__link::before {
  color: #ffa200;
  content: "#";
}

.mzk-design-page .mzk-sb-genres__link:hover {
  color: #f7f9fc;
  background: rgba(255, 162, 0, .1);
  border-color: rgba(255, 162, 0, .34);
}

.mzk-design-page .mzk-sb-genres-more {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  margin: 10px 8px 0;
  padding: 7px 12px;
  border: 1px solid rgba(255, 162, 0, .22);
  border-radius: 999px;
  color: #ffa200;
  background: rgba(255, 162, 0, .06);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.mzk-design-page .mzk-sb-genres-more::before {
  margin-right: 3px;
  content: "#";
}

.mzk-design-page .mzk-sb-genres-more:hover {
  color: #07111c;
  background: #ffa200;
  border-color: #ffa200;
}

.mzk-design-page .mzk-nav-item:focus-visible,
.mzk-design-page .mzk-sb-genres__link:focus-visible,
.mzk-design-page .mzk-sb-genres-more:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ===== 5. Mobile bottom navigation ===== */
.mzk-bnav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9000;
  display: none;
  height: calc(var(--mzk-bnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: var(--mzk-cbg);
  border-top: 1px solid var(--mzk-brdr);
  box-shadow: 0 -6px 24px rgba(15, 23, 42, .06);
}

.mzk-bnav__list {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 100%;
  padding: 0 8px;
}

.mzk-bnav__item {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--mzk-muted);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .16s;
}

button.mzk-bnav__item {
  border: 0;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

.mzk-bnav__item svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mzk-bnav__label {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.mzk-bnav__item.active {
  color: var(--color-primary-text);
}

.mzk-bnav__item.active .mzk-bnav__label {
  font-weight: 600;
}

.mzk-bnav__item:active {
  opacity: .7;
}

/* ===== 6. Section headers ===== */
.mzk-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.mzk-section-head__text {
  min-width: 0;
}

.mzk-section-head__title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--mzk-txt);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mzk-section-head__sub {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--mzk-muted);
}

.mzk-section-head__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.mzk-section-head__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 9px;
  color: var(--color-primary-text);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s;
}

.mzk-section-head__link:hover { background: var(--mzk-active); }
.mzk-section-head__link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Slider arrows (mouse only) */
.mzk-slider-arrows {
  display: flex;
  align-items: center;
  gap: 6px;
}

.mzk-slider-arrows .mzk-slider-arrow {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--mzk-muted);
  background: var(--mzk-cbg);
  border: 1px solid var(--mzk-brdr);
  cursor: pointer;
  transition: background .16s, color .16s, opacity .16s;
}

.mzk-slider-arrows .mzk-slider-arrow:hover { background: var(--mzk-hover); color: var(--mzk-txt); }
.mzk-slider-arrows .mzk-slider-arrow:disabled { opacity: .4; cursor: default; }
.mzk-slider-arrows .mzk-slider-arrow svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== 7. Dropdown menus (unified) ===== */
.mzk-dropdown {
  position: relative;
  display: inline-flex;
}

.mzk-dropdown__menu {
  position: absolute;
  z-index: 12000;
  top: calc(100% + 6px);
  right: 0;
  min-width: 224px;
  max-width: min(320px, calc(100vw - 24px));
  padding: 6px;
  border-radius: 14px;
  background: var(--mzk-cbg);
  border: 1px solid var(--mzk-brdr);
  box-shadow: 0 16px 44px rgba(15, 23, 42, .18);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.mzk-dropdown.is-open .mzk-dropdown__menu {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mzk-dropdown__menu--bottom {
  top: auto;
  bottom: calc(100% + 6px);
}

.mzk-dropdown__item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--mzk-txt);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}

.mzk-dropdown__item:hover { background: var(--mzk-hover); }

.mzk-dropdown__item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mzk-dropdown__item--danger { color: var(--color-danger); }
.mzk-dropdown__item--danger:hover { background: color-mix(in srgb, var(--color-danger) 10%, transparent); }

.mzk-dropdown__sep {
  height: 1px;
  margin: 6px 8px;
  background: var(--mzk-brdr);
}

.mzk-dropdown__label {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--mzk-muted);
}

/* ===== 8. Modal system ===== */
.mzk-modal {
  position: fixed;
  inset: 0;
  z-index: 15000;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
}

.mzk-modal.is-open { visibility: visible; }

.mzk-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 22, .55);
  opacity: 0;
  transition: opacity .2s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.mzk-modal.is-open .mzk-modal__backdrop { opacity: 1; }

.mzk-modal__panel {
  position: relative;
  z-index: 1;
  width: min(480px, 100%);
  max-height: min(82vh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px;
  border-radius: 20px;
  background: var(--mzk-cbg);
  border: 1px solid var(--mzk-brdr);
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
  opacity: 0;
  transform: translateY(10px) scale(.98);
  transition: opacity .2s ease, transform .2s ease;
}

.mzk-modal.is-open .mzk-modal__panel {
  opacity: 1;
  transform: none;
}

.mzk-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.mzk-modal__title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.mzk-modal__close {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 9px;
  color: var(--mzk-muted);
  background: var(--mzk-hover);
  border: 0;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.mzk-modal__close:hover { background: var(--mzk-bg-muted-2); color: var(--mzk-txt); }
.mzk-modal__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ===== 9. Toasts ===== */
.mzk-toast-root {
  position: fixed;
  right: 20px;
  bottom: 96px;
  left: 20px;
  z-index: 20000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

body.mzk-has-bnav .mzk-toast-root {
  bottom: calc(var(--mzk-bnav-h) + 24px + env(safe-area-inset-bottom, 0px));
}

body.mzk-player-active .mzk-toast-root {
  bottom: calc(var(--mzk-player-mobile-h) + var(--mzk-bnav-h) + 24px + env(safe-area-inset-bottom, 0px));
}

.mzk-toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, 100%);
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--mzk-cbg);
  border: 1px solid var(--mzk-brdr);
  box-shadow: 0 12px 36px rgba(15, 23, 42, .18);
  color: var(--mzk-txt);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  pointer-events: auto;
  animation: mzk-toast-in .22s ease;
}

.mzk-toast svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mzk-toast--success svg { color: var(--color-success); }
.mzk-toast--error svg { color: var(--color-danger); }
.mzk-toast--warning svg { color: var(--color-warning); }
.mzk-toast--info svg { color: var(--color-primary-text); }

.mzk-toast.is-leaving {
  animation: mzk-toast-out .18s ease forwards;
}

@keyframes mzk-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes mzk-toast-out {
  from { opacity: 1; transform: none; }
  to { opacity: 0; transform: translateY(8px); }
}

/* ===== 10. Empty states ===== */
.mzk-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 48px 24px;
  text-align: center;
  border-radius: 16px;
  background: var(--mzk-bg-muted);
}

.mzk-empty__icon {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 18px;
  color: var(--color-primary-text);
  background: var(--mzk-active);
}

.mzk-empty__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mzk-empty__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--mzk-txt);
}

.mzk-empty__text {
  margin: 0;
  max-width: 38ch;
  font-size: 14px;
  line-height: 1.5;
  color: var(--mzk-muted);
}

.mzk-empty__action {
  margin-top: 8px;
}

/* ===== 11. Buttons (unified) ===== */
.mzk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 11px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .16s, color .16s, border-color .16s, transform .12s;
  -webkit-tap-highlight-color: transparent;
}

.mzk-btn:active { transform: translateY(1px); }
.mzk-btn:disabled { opacity: .5; cursor: default; pointer-events: none; }

.mzk-btn--primary { background: var(--color-primary); color: var(--color-on-primary); }
.mzk-btn--primary:hover { background: var(--color-primary-hover); }

.mzk-btn--soft { background: var(--mzk-active); color: var(--color-primary-text); }
.mzk-btn--soft:hover { background: color-mix(in srgb, var(--color-primary) 16%, transparent); }

.mzk-btn--ghost {
  background: var(--mzk-cbg);
  color: var(--mzk-txt);
  border-color: var(--mzk-brdr);
}
.mzk-btn--ghost:hover { background: var(--mzk-hover); }

.mzk-btn--danger { background: var(--color-danger); color: #fff; }
.mzk-btn--danger:hover { background: color-mix(in srgb, var(--color-danger) 86%, #000); }

.mzk-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.mzk-btn--sm { min-height: 34px; padding: 0 14px; font-size: 13px; border-radius: 9px; }

/* Icon-only button (44px touch target on mobile) */
.mzk-icon-btn {
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: var(--mzk-muted);
  background: none;
  border: 0;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.mzk-icon-btn:hover { background: var(--mzk-hover); color: var(--mzk-txt); }
.mzk-icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ===== 12. Skeleton ===== */
.mzk-skeleton {
  position: relative;
  overflow: hidden;
  background: var(--mzk-bg-muted);
  border-radius: 10px;
}

.mzk-skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--mzk-cbg) 60%, transparent), transparent);
  transform: translateX(-100%);
  animation: mzk-skeleton-shimmer 1.4s infinite;
}

@keyframes mzk-skeleton-shimmer {
  to { transform: translateX(100%); }
}

.mzk-skel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.mzk-skel-row__cover { width: 48px; height: 48px; border-radius: 10px; flex: 0 0 auto; }
.mzk-skel-row__body { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.mzk-skel-row__title { height: 13px; width: 55%; border-radius: 6px; }
.mzk-skel-row__sub { height: 11px; width: 34%; border-radius: 6px; }
.mzk-skel-row__time { width: 32px; height: 11px; border-radius: 6px; flex: 0 0 auto; }

.mzk-skel-card { border-radius: 16px; }
.mzk-skel-card__media { aspect-ratio: 1 / 1; border-radius: 14px; }
.mzk-skel-card__title { height: 13px; width: 80%; margin-top: 10px; border-radius: 6px; }
.mzk-skel-card__sub { height: 11px; width: 55%; margin-top: 8px; border-radius: 6px; }

/* ===== 13. Dark shell (permanent, no light theme) ===== */
.mzk-design-page .header {
  background: var(--mzk-cbg);
  border-bottom-color: var(--mzk-brdr);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .02);
}

.mzk-design-page .header.is-scrolled {
  background: color-mix(in srgb, var(--mzk-cbg) 90%, transparent);
}

.mzk-design-page .header__logo-main { background: var(--color-primary); color: var(--color-on-primary); }
.mzk-design-page .header__logo-accent { color: var(--color-brand); }

.mzk-bnav {
  background: var(--mzk-cbg);
  border-top-color: var(--mzk-brdr);
  box-shadow: 0 -6px 24px rgba(0, 0, 0, .35);
}

/* Player surfaces */
.player-bar,
.player-mobile {
  --mzk-player-bg: var(--mzk-cbg);
  --mzk-player-panel: var(--mzk-cbg);
  --mzk-player-border: var(--mzk-brdr);
  --mzk-player-text: var(--mzk-txt);
  --mzk-player-muted: var(--mzk-muted);
  --mzk-player-soft: var(--mzk-bg-muted);
  --mzk-player-line: var(--mzk-brdr);
  --mzk-player-accent: var(--color-primary);
  --mzk-player-focus: var(--color-brand);
  color-scheme: dark;
}

.player-queue-panel,
.player-lyrics-panel,
.player-quality-menu {
  background: var(--mzk-cbg);
  border-color: var(--mzk-brdr);
  box-shadow: 0 16px 48px rgba(0, 0, 0, .5);
}

.auth__btn--ghost {
  color: var(--mzk-txt);
  border-color: var(--mzk-brdr);
  background: transparent;
}

.auth__btn--ghost:hover {
  background: var(--mzk-hover);
  border-color: var(--mzk-muted);
}

.auth__btn--primary {
  color: var(--color-on-primary);
  background: var(--color-primary);
}

.mobile-menu__panel { background: var(--mzk-cbg); }

/* ===== 14. Tabs (chips row) ===== */
.mzk-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  padding: 2px;
}

.mzk-tabs::-webkit-scrollbar { display: none; }

.mzk-tabs__tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--mzk-brdr);
  background: var(--mzk-cbg);
  color: var(--mzk-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .16s, color .16s, border-color .16s;
}

.mzk-tabs__tab:hover { color: var(--mzk-txt); border-color: var(--mzk-muted); }
.mzk-tabs__tab.is-active { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); font-weight: 600; }

/* ===== 15. Track row (mobile simplification) ===== */
.mzk-tl-row .mzk-tl-artist { color: var(--mzk-muted); }

/* ===== 16. Focus visibility ===== */
.mzk-design-page :focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* ===== 17. Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  .mzk-toast, .mzk-toast.is-leaving, .mzk-skeleton::after,
  .mzk-dropdown__menu, .mzk-modal__panel, .mzk-modal__backdrop {
    animation: none !important;
    transition: none !important;
  }
}

/* ===== 17.5 Responsive: small laptop (1024-1199) keeps the desktop sidebar ===== */
@media (min-width: 1024px) and (max-width: 1199px) {
  .mzk-design-page .mzk-main {
    display: grid;
    grid-template-columns: var(--mzk-sbw) minmax(0, 1fr);
  }
  .mzk-design-page .mzk-sidebar-left {
    display: block;
  }
  .mzk-design-page .mzk-main-in > .mzk-mobile-genres {
    display: none !important;
  }
}

/* ===== 18. Responsive: tablet (768-1023) — same shell as phone ===== */
@media (max-width: 1023px) {
  .mzk-design-page .mzk-main { grid-template-columns: 1fr; }
  .mzk-design-page .mzk-sidebar-left { display: none !important; }
  .mzk-design-page .mzk-main-in { max-width: none; }
  .header-nav-btns { display: none; }
  .mzk-design-page .header { padding: 0 20px; }

  /* Bottom navigation on tablets too (phone shell) */
  .mzk-bnav { display: block; }

  /* Header search moves to the bottom-nav search layer on tablets */
  .mzk-design-page .header__center .search { display: none; }

  body.mzk-has-bnav #player-mobile {
    bottom: calc(var(--mzk-bnav-h) + env(safe-area-inset-bottom, 0px));
    height: var(--mzk-player-mobile-h);
  }

  body.mzk-has-bnav {
    padding-bottom: calc(var(--mzk-bnav-h) + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.mzk-has-bnav.mzk-player-active {
    padding-bottom: calc(var(--mzk-bnav-h) + var(--mzk-player-mobile-h) + env(safe-area-inset-bottom, 0px)) !important;
  }

  body.mzk-has-bnav .player-restore {
    bottom: calc(var(--mzk-bnav-h) + 16px + env(safe-area-inset-bottom, 0px));
  }
}

/* ===== 19. Responsive: phone (<= 767) ===== */
@media (max-width: 767px) {
  .mzk-design-page .header {
    height: 58px;
    padding: 0 12px;
    gap: 8px;
  }
  .mzk-design-page .header.is-scrolled { height: 56px; }

  .mzk-design-page .header__logo-text { display: none; }
  .mzk-design-page .header__logo-icon { width: 32px; height: 32px; border-radius: 9px; }

  .mzk-design-page .header__center .search { display: none; }

  /* Guests lose the header buttons on phones, logged-in avatar stays */
  .mzk-design-page .auth .auth__btn--ghost,
  .mzk-design-page .auth .auth__btn--primary { display: none; }

  .mzk-section-head { align-items: flex-start; }
  .mzk-section-head__title { font-size: 19px; }
  .mzk-slider-arrows { display: none; }
}

/* Fullscreen mobile search layer */
.mzk-search-layer {
  position: fixed;
  inset: 0;
  z-index: 11000;
  display: flex;
  flex-direction: column;
  background: var(--mzk-bg);
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}

.mzk-search-layer.is-open { visibility: visible; opacity: 1; }

.mzk-search-layer__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  border-bottom: 1px solid var(--mzk-brdr);
  background: var(--mzk-cbg);
}

.mzk-search-layer__input {
  flex: 1;
  height: 44px;
  min-width: 0;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--mzk-brdr);
  background: var(--mzk-bg-muted);
  color: var(--mzk-txt);
  font-size: 16px;
  outline: none;
}

.mzk-search-layer__input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--mzk-active); }

.mzk-search-layer__body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.mzk-search-layer__hint {
  max-width: 34ch;
  margin: 0;
  text-align: center;
  color: var(--mzk-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Scroll lock while a layer/modal/dropdown drawer is open */
body.mzk-layer-open {
  overflow: hidden;
}

/* ===== Catalog layer (mobile only) ===== */
.mzk-catalog-layer {
  position: fixed;
  inset: 0;
  z-index: 11500;
  display: flex;
  flex-direction: column;
  background: var(--mzk-bg);
  visibility: hidden;
  opacity: 0;
  transition: opacity .2s ease, visibility .2s ease;
}

.mzk-catalog-layer.is-open { visibility: visible; opacity: 1; }

.mzk-catalog-layer__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  border-bottom: 1px solid var(--mzk-brdr);
  background: var(--mzk-cbg);
}

.mzk-catalog-layer__titles { min-width: 0; flex: 1; }
.mzk-catalog-layer__title { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; }
.mzk-catalog-layer__subtitle { margin: 2px 0 0; font-size: 13px; color: var(--mzk-muted); }

.mzk-catalog-layer__body {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px calc(28px + env(safe-area-inset-bottom, 0px));
}

.mzk-catalog-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
}

.mzk-catalog-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 10px 8px;
  border-radius: 14px;
  background: transparent;
  color: var(--mzk-txt);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease, transform .15s ease;
}

.mzk-catalog-card:hover,
.mzk-catalog-card:focus-visible { background: var(--mzk-hover); outline: none; }
.mzk-catalog-card:active { background: rgba(var(--color-primary-rgb), .1); transform: scale(.985); }

.mzk-catalog-card.active {
  background: rgba(var(--color-primary-rgb), .1);
  box-shadow: none;
}

.mzk-catalog-card--wide { grid-column: 1 / -1; }

.mzk-catalog-card__icon {
  display: grid;
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(var(--color-primary-rgb), .12);
  border-radius: 15px;
  color: var(--color-primary-text);
  background: rgba(var(--color-primary-rgb), .08);
}

.mzk-catalog-card__icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mzk-catalog-card__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mzk-catalog-card__text strong { font-size: 16px; font-weight: 700; line-height: 1.2; }
.mzk-catalog-card__text small { font-size: 13px; color: var(--mzk-muted); line-height: 1.35; }

.mzk-catalog-card__arrow {
  display: grid;
  margin-left: auto;
  flex-shrink: 0;
  place-items: center;
  color: var(--mzk-muted);
}

.mzk-catalog-card__arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@media (min-width: 520px) and (max-width: 1100px) {
  .mzk-catalog-layer__body { padding-inline: 20px; }
  .mzk-catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 18px; }
}

@media (min-width: 1101px) {
  .mzk-catalog-layer { display: none !important; }
}

/* ===== 19a. Mobile header: brand + utility buttons only (≤1023, tablets included) ===== */
.mzk-mobile-back { display: none; }

@media (max-width: 1023px) {
  .mzk-design-page .header {
    height: 58px;
    padding: 0 16px;
    gap: 8px;
  }
  .mzk-design-page .header.is-scrolled { height: 56px; }

  .mzk-design-page .header__left {
    flex: 1 1 auto;
    min-width: 0;
  }

  /* Full brand wordmark on mobile instead of a small square icon */
  .mzk-design-page .header__logo { height: 38px; align-items: center; gap: 0; }
  .mzk-design-page .header__logo-icon { display: none; }
  .mzk-design-page .header__logo-copy { display: flex; align-items: center; }
  .mzk-design-page .header__logo-text { display: flex; font-size: 19px; }

  /* Profile/auth lives in the bottom navigation on mobile */
  .mzk-design-page .auth { display: none; }

  /* Back + page title on inner pages, wordmark on the home page */
  .mzk-mobile-back {
    display: none;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }
  .mzk-design-page:not(.mzk-home-page) .mzk-mobile-back { display: flex; }
  .mzk-design-page:not(.mzk-home-page) .header__logo { display: none; }

  .mzk-mobile-back__btn {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    color: var(--mzk-muted);
    background: none;
    border: 0;
    cursor: pointer;
    transition: background .15s, color .15s;
  }
  .mzk-mobile-back__btn:active { background: var(--mzk-hover); color: var(--mzk-txt); }
  .mzk-mobile-back__btn svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mzk-mobile-back__title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 16px;
    font-weight: 600;
    color: var(--mzk-txt);
  }

  /* Utility buttons: comfortable touch targets, tight spacing */
  .mzk-design-page .header__right { gap: 4px; }
  .mzk-design-page .header-icon-btn { width: 40px; height: 40px; }
  .mzk-design-page .header-icon-btn svg { width: 21px; height: 21px; }
}

@media (max-width: 359px) {
  .mzk-design-page .header__logo-text { font-size: 17px; }
}

/* ===== 20. Misc layout guards ===== */
.mzk-design-page .mzk-catalog,
.mzk-design-page .mzk-playlists-page,
.mzk-design-page .mzk-genres,
.mzk-design-page .mzk-lp {
  padding-bottom: 40px;
}

.mzk-design-page .mzk-catalog--novynky { padding-inline: 24px; }

@media (max-width: 767px) {
  .mzk-design-page .mzk-catalog--novynky { padding-inline: 16px; }
}
