/* Kinoportal redesign — Stage 1: design tokens and global foundation */
:root {
  color-scheme: dark;

  --kp-bg: #070a12;
  --kp-bg-elevated: #0c1220;
  --kp-surface: rgba(17, 24, 39, .88);
  --kp-surface-solid: #111827;
  --kp-surface-2: #172033;
  --kp-surface-3: #202b42;
  --kp-surface-hover: #26334d;
  --kp-glass: rgba(15, 23, 42, .72);

  --kp-text: #f8fafc;
  --kp-text-muted: #a7b3c7;
  --kp-text-soft: #7f8da6;
  --kp-heading: #ffffff;

  --kp-primary: #8b5cf6;
  --kp-primary-hover: #7c3aed;
  --kp-primary-soft: rgba(139, 92, 246, .16);
  --kp-secondary: #3b82f6;
  --kp-cyan: #22d3ee;
  --kp-amber: #f59e0b;
  --kp-success: #22c55e;
  --kp-danger: #f43f5e;
  --kp-warning: #f59e0b;

  --kp-border: rgba(148, 163, 184, .18);
  --kp-border-strong: rgba(167, 139, 250, .38);
  --kp-focus: rgba(34, 211, 238, .42);

  --kp-shadow-xs: 0 4px 14px rgba(0, 0, 0, .18);
  --kp-shadow-sm: 0 10px 30px rgba(0, 0, 0, .24);
  --kp-shadow-md: 0 18px 48px rgba(0, 0, 0, .32);
  --kp-shadow-glow: 0 0 0 1px rgba(139, 92, 246, .22), 0 18px 46px rgba(76, 29, 149, .22);

  --kp-radius-sm: 10px;
  --kp-radius-md: 14px;
  --kp-radius-lg: 18px;
  --kp-radius-xl: 24px;
  --kp-radius-pill: 999px;

  --kp-space-1: 4px;
  --kp-space-2: 8px;
  --kp-space-3: 12px;
  --kp-space-4: 16px;
  --kp-space-5: 20px;
  --kp-space-6: 24px;
  --kp-space-8: 32px;
  --kp-space-10: 40px;

  --kp-container: 1260px;
  --kp-reading: 780px;
  --kp-font-body: "Manrope", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --kp-font-heading: "Manrope", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --kp-transition-fast: 150ms ease;
  --kp-transition: 240ms cubic-bezier(.2, .8, .2, 1);
  --kp-transition-slow: 420ms cubic-bezier(.2, .8, .2, 1);

  /* Existing portal variables mapped to the new system. */
  --kp-body-bg: var(--kp-bg);
  --kp-brand: var(--kp-primary);
  --kp-brand-strong: var(--kp-primary-hover);
  --kp-header-bg: rgba(7, 10, 18, .84);
  --kp-footer-bg: #080d18;
  --kp-footer-text: var(--kp-text);
  --kp-footer-muted: var(--kp-text-muted);
  --kp-input-bg: rgba(7, 10, 18, .72);
  --kp-input-border: var(--kp-border);
  --kp-input-text: var(--kp-text);
  --kp-shadow: var(--kp-shadow-md);
  --kp-ghost-bg: rgba(255, 255, 255, .055);
  --kp-ghost-border: var(--kp-border);
  --kp-page-max: var(--kp-container);
  --kp-header-font: var(--kp-font-body);

  --bg: var(--kp-bg);
  --page-bg: var(--kp-bg);
  --panel: var(--kp-surface-solid);
  --card: var(--kp-surface-solid);
  --card-bg: var(--kp-surface-solid);
  --text: var(--kp-text);
  --text-strong: var(--kp-heading);
  --muted: var(--kp-text-muted);
  --muted-2: var(--kp-text-muted);
  --muted2: var(--kp-text-soft);
  --line: var(--kp-border);
  --border: var(--kp-border);
  --border-2: rgba(148, 163, 184, .24);
  --border2: var(--kp-border);
  --brand: var(--kp-primary);
  --brand-hover: var(--kp-primary-hover);
  --brand-2: var(--kp-cyan);
  --brand2: var(--kp-cyan);
  --accent: var(--kp-primary);
  --accent-hover: var(--kp-primary-hover);
  --accent-2: var(--kp-cyan);
  --primary: var(--kp-primary);
  --primary-2: var(--kp-primary-hover);
  --primary-600: var(--kp-secondary);
  --success: var(--kp-success);
  --ok: var(--kp-success);
  --danger: var(--kp-danger);
  --err: var(--kp-danger);
  --warning: var(--kp-warning);
  --radius: var(--kp-radius-lg);
  --shadow: var(--kp-shadow-sm);
  --shadow-soft: var(--kp-shadow-xs);
  --card-border: var(--kp-border);
  --card-shadow: var(--kp-shadow-sm);
}

html[data-theme="light"] {
  color-scheme: light;

  --kp-bg: #f5f7ff;
  --kp-bg-elevated: #eef2ff;
  --kp-surface: rgba(255, 255, 255, .9);
  --kp-surface-solid: #ffffff;
  --kp-surface-2: #f7f8ff;
  --kp-surface-3: #edf1fb;
  --kp-surface-hover: #e7ecf8;
  --kp-glass: rgba(255, 255, 255, .76);

  --kp-text: #172033;
  --kp-text-muted: #5f6f85;
  --kp-text-soft: #7d8ca1;
  --kp-heading: #0f172a;

  --kp-primary: #7c3aed;
  --kp-primary-hover: #6d28d9;
  --kp-primary-soft: rgba(124, 58, 237, .10);
  --kp-secondary: #2563eb;
  --kp-cyan: #0891b2;
  --kp-amber: #d97706;

  --kp-border: rgba(30, 41, 59, .12);
  --kp-border-strong: rgba(124, 58, 237, .28);
  --kp-focus: rgba(8, 145, 178, .28);

  --kp-shadow-xs: 0 4px 14px rgba(15, 23, 42, .07);
  --kp-shadow-sm: 0 10px 30px rgba(15, 23, 42, .09);
  --kp-shadow-md: 0 18px 48px rgba(15, 23, 42, .12);
  --kp-shadow-glow: 0 0 0 1px rgba(124, 58, 237, .15), 0 18px 44px rgba(91, 33, 182, .10);

  --kp-header-bg: rgba(248, 250, 255, .86);
  --kp-footer-bg: #e9edf7;
  --kp-input-bg: rgba(255, 255, 255, .92);
  --kp-ghost-bg: rgba(91, 33, 182, .055);
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  background: var(--kp-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body:not(.admin-body) {
  min-width: 320px;
  overflow-x: clip;
  font-family: var(--kp-font-body) !important;
  font-size: 15px;
  line-height: 1.6;
  color: var(--kp-text) !important;
  background:
    radial-gradient(circle at 12% -5%, rgba(139, 92, 246, .20), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgba(34, 211, 238, .10), transparent 30rem),
    var(--kp-bg) !important;
  transition: background-color var(--kp-transition), color var(--kp-transition);
}

html[data-theme="light"] body:not(.admin-body) {
  background:
    radial-gradient(circle at 12% -5%, rgba(124, 58, 237, .10), transparent 34rem),
    radial-gradient(circle at 92% 8%, rgba(8, 145, 178, .07), transparent 30rem),
    var(--kp-bg) !important;
}

body:not(.admin-body),
body:not(.admin-body) button,
body:not(.admin-body) input,
body:not(.admin-body) select,
body:not(.admin-body) textarea {
  font-family: var(--kp-font-body) !important;
}

body:not(.admin-body) :where(h1, h2, h3, h4, h5, h6) {
  font-family: var(--kp-font-heading) !important;
  color: var(--kp-heading) !important;
  letter-spacing: -.025em;
  text-wrap: balance;
}

body:not(.admin-body) h1 { font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.08; }
body:not(.admin-body) h2 { font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.18; }
body:not(.admin-body) h3 { line-height: 1.25; }

body:not(.admin-body) :where(p, li, dd) { color: inherit; }
body:not(.admin-body) :where(.muted, .meta, .small, .empty, .filter-hint) { color: var(--kp-text-muted) !important; }
body:not(.admin-body) a { text-underline-offset: .18em; }

body:not(.admin-body) ::selection {
  background: rgba(139, 92, 246, .42);
  color: #fff;
}

body:not(.admin-body) :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--kp-focus) !important;
  outline-offset: 2px;
}

body:not(.admin-body) img,
body:not(.admin-body) video,
body:not(.admin-body) iframe {
  max-width: 100%;
}

body:not(.admin-body) hr {
  border: 0;
  border-top: 1px solid var(--kp-border);
}

body:not(.admin-body)::-webkit-scrollbar,
body:not(.admin-body) *::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}
body:not(.admin-body)::-webkit-scrollbar-track,
body:not(.admin-body) *::-webkit-scrollbar-track { background: transparent; }
body:not(.admin-body)::-webkit-scrollbar-thumb,
body:not(.admin-body) *::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, .30);
  border: 3px solid transparent;
  border-radius: var(--kp-radius-pill);
  background-clip: padding-box;
}
body:not(.admin-body)::-webkit-scrollbar-thumb:hover,
body:not(.admin-body) *::-webkit-scrollbar-thumb:hover { background-color: rgba(167, 139, 250, .56); }

/* Kinoportal redesign — Stage 1: reusable components and compatibility layer */
body:not(.admin-body) :where(
  .card, .panel, .content-section, .news-item, .article-card, .quiz-card,
  .review-item, .user-card, .role-block, .forum-card, .forum-section-card,
  .search-card, .actor-card, .home-poll__card, .login-container,
  .register-container, .profile-container, .modal__content, .modal-content,
  .search-hero, .empty-box
) {
  color: var(--kp-text) !important;
  background: linear-gradient(145deg, rgba(255, 255, 255, .025), transparent 58%), var(--kp-surface) !important;
  border: 1px solid var(--kp-border) !important;
  border-radius: var(--kp-radius-lg) !important;
  box-shadow: var(--kp-shadow-sm) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-theme="light"] body:not(.admin-body) :where(
  .card, .panel, .content-section, .news-item, .article-card, .quiz-card,
  .review-item, .user-card, .role-block, .forum-card, .forum-section-card,
  .search-card, .actor-card, .home-poll__card, .login-container,
  .register-container, .profile-container, .modal__content, .modal-content,
  .search-hero, .empty-box
) {
  background: linear-gradient(145deg, rgba(124, 58, 237, .025), transparent 58%), var(--kp-surface) !important;
}

body:not(.admin-body) :where(.poster, .frame, .news-item__media, .article-card__cover, .quiz-card__cover, .media-card__cover, .search-card__thumb, .actor-card img) {
  background-color: var(--kp-surface-2) !important;
  border-color: var(--kp-border) !important;
}

body:not(.admin-body) :where(.poster img, .article-card__cover img, .quiz-card__cover img, .media-card__cover img, .news-item__image, .user-avatar) {
  transition: transform var(--kp-transition-slow), filter var(--kp-transition);
}

body:not(.admin-body) :where(
  .btn, .button, .kp-btn, .login-button, .register-button,
  .media-card__button, .article-card__button, .quiz-card__button,
  .forum-btn, .pagination a, .pagination span, .pagination__btn,
  .pagination__page, .pagination__nav, .articles-pagination__link
) {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--kp-border) !important;
  border-radius: var(--kp-radius-md) !important;
  color: var(--kp-text) !important;
  background: rgba(255, 255, 255, .055) !important;
  box-shadow: none;
  font: inherit;
  font-weight: 750 !important;
  line-height: 1.15;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform var(--kp-transition-fast), border-color var(--kp-transition), background-color var(--kp-transition), color var(--kp-transition), box-shadow var(--kp-transition);
}

body:not(.admin-body) :where(
  .btn-primary, .btn--primary, .button.primary, .kp-btn--primary,
  .login-button, .register-button, .media-card__button,
  .article-card__button, .quiz-card__button, .home-poll__button,
  .pagination .current, .pagination__btn.is-current,
  .pagination__page.is-active, .pagination__page[aria-current="page"],
  .articles-pagination__link.is-current
) {
  color: #fff !important;
  border-color: transparent !important;
  background: linear-gradient(135deg, var(--kp-primary), var(--kp-secondary)) !important;
  box-shadow: 0 9px 24px rgba(91, 33, 182, .26) !important;
}

body:not(.admin-body) :where(.btn--ghost, .button.ghost, .kp-btn--ghost, .forum-btn-ghost, .btn--secondary) {
  background: rgba(255, 255, 255, .045) !important;
  border-color: var(--kp-border) !important;
  color: var(--kp-text) !important;
}

body:not(.admin-body) :where(.btn-danger, .link--danger, .forum-btn-ghost--danger) {
  color: #fb7185 !important;
  border-color: rgba(244, 63, 94, .32) !important;
  background: rgba(244, 63, 94, .10) !important;
}

body:not(.admin-body) :where(.btn-success, .forum-btn-ghost--success) {
  color: #4ade80 !important;
  border-color: rgba(34, 197, 94, .30) !important;
  background: rgba(34, 197, 94, .10) !important;
}

body:not(.admin-body) :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--kp-input-border) !important;
  border-radius: var(--kp-radius-md) !important;
  color: var(--kp-input-text) !important;
  background: var(--kp-input-bg) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
  font: inherit;
  transition: border-color var(--kp-transition), box-shadow var(--kp-transition), background-color var(--kp-transition);
}

body:not(.admin-body) textarea { min-height: 120px; resize: vertical; }
body:not(.admin-body) :where(input, textarea)::placeholder { color: var(--kp-text-soft) !important; opacity: 1; }
body:not(.admin-body) :where(input, select, textarea):focus {
  border-color: var(--kp-cyan) !important;
  box-shadow: 0 0 0 4px var(--kp-focus) !important;
  outline: none;
}
body:not(.admin-body) select { color-scheme: dark; }
html[data-theme="light"] body:not(.admin-body) select { color-scheme: light; }
body:not(.admin-body) :where(label, .form-group label) { color: var(--kp-text-muted) !important; font-weight: 700; }

body:not(.admin-body) :where(.chip, .chip-text, .badge, .quiz-pill, .quiz-badge, .forum-badge) {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c4b5fd !important;
  background: var(--kp-primary-soft) !important;
  border: 1px solid rgba(167, 139, 250, .24) !important;
  border-radius: var(--kp-radius-pill) !important;
}
html[data-theme="light"] body:not(.admin-body) :where(.chip, .chip-text, .badge, .quiz-pill, .quiz-badge, .forum-badge) { color: #6d28d9 !important; }

body:not(.admin-body) :where(.alert, .forum-alert) {
  padding: 12px 15px;
  border-radius: var(--kp-radius-md) !important;
  border: 1px solid var(--kp-border) !important;
  background: rgba(59, 130, 246, .10) !important;
  color: #bfdbfe !important;
  box-shadow: none !important;
}
body:not(.admin-body) :where(.alert--success, .alert.success, .alert.ok, .alert-success, .forum-alert.is-success) {
  color: #86efac !important;
  border-color: rgba(34, 197, 94, .28) !important;
  background: rgba(34, 197, 94, .10) !important;
}
body:not(.admin-body) :where(.alert--error, .alert.error, .alert-error, .error-box, .forum-alert.is-error) {
  color: #fda4af !important;
  border-color: rgba(244, 63, 94, .30) !important;
  background: rgba(244, 63, 94, .10) !important;
}

body:not(.admin-body) :where(.pagination, .articles-pagination) { gap: 8px; }
body:not(.admin-body) :where(.pagination .current, .pagination__btn.is-current, .pagination__page.is-active, .pagination__page[aria-current="page"], .articles-pagination__link.is-current) { transform: none; }

body:not(.admin-body) :where(.meta-item, .comment-item, .comments-login, .tagline, .trailer-link, .credit-list li, .kp-notify-link-line, .kp-notify-system, .kp-notify-request:hover) {
  color: var(--kp-text) !important;
  background: rgba(255, 255, 255, .045) !important;
  border-color: var(--kp-border) !important;
}

body:not(.admin-body) :where(.tagline, .comments-login) {
  background: linear-gradient(135deg, rgba(139, 92, 246, .13), rgba(59, 130, 246, .08)) !important;
  border-color: rgba(139, 92, 246, .26) !important;
  color: #ddd6fe !important;
}
html[data-theme="light"] body:not(.admin-body) :where(.tagline, .comments-login) { color: #5b21b6 !important; }

body:not(.admin-body) :where(.search-card__title a, .article-card__title a, .news-item__title a, .card__title a, .title a, .user-name, .forum-section-card__title a) {
  color: var(--kp-heading) !important;
}
body:not(.admin-body) :where(.search-card__text, .search-card__meta, .actor-card__meta, .article-card__description, .news-item__text, .news-item__meta, .card__meta, .card__excerpt, .user-role, .forum-muted) {
  color: var(--kp-text-muted) !important;
}

body:not(.admin-body) :where(.modal, .kp-modal, .actor-lightbox, .kp-home-popup-backdrop) {
  background: rgba(2, 6, 23, .84) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
body:not(.admin-body) :where(.modal__close, .close, .kp-modal__close, .actor-lightbox__close, .kp-home-popup__close) {
  color: var(--kp-text) !important;
  background: rgba(15, 23, 42, .86) !important;
  border: 1px solid var(--kp-border) !important;
  box-shadow: var(--kp-shadow-sm) !important;
}

/* Header notification block contains legacy inline colours; override them here. */
body:not(.admin-body) .kp-notify-btn,
body:not(.admin-body) .kp-avatar-btn {
  color: var(--kp-text) !important;
  background: rgba(255, 255, 255, .055) !important;
  border-color: var(--kp-border) !important;
  box-shadow: none !important;
}
body:not(.admin-body) .kp-notify-dropdown,
body:not(.admin-body) .kp-dropdown {
  color: var(--kp-text) !important;
  background: rgba(12, 18, 32, .97) !important;
  border-color: var(--kp-border) !important;
  box-shadow: var(--kp-shadow-md) !important;
  backdrop-filter: blur(18px);
}
html[data-theme="light"] body:not(.admin-body) .kp-notify-dropdown,
html[data-theme="light"] body:not(.admin-body) .kp-dropdown { background: rgba(255, 255, 255, .97) !important; }
body:not(.admin-body) :where(.kp-notify-head, .kp-notify-section + .kp-notify-section, .kp-drop-sep) { border-color: var(--kp-border) !important; }
body:not(.admin-body) :where(.kp-notify-text, .kp-notify-meta, .kp-notify-system, .kp-notify-link-line) { color: var(--kp-text) !important; }
body:not(.admin-body) :where(.kp-notify-counter, .kp-notify-empty, .kp-notify-label, .kp-notify-system__meta) { color: var(--kp-text-muted) !important; }
body:not(.admin-body) .kp-notify-link { color: #c4b5fd !important; background: var(--kp-primary-soft) !important; }
body:not(.admin-body) .kp-notify-badge { border-color: var(--kp-bg) !important; }

/* Header and footer receive the same cinematic material language. */
body:not(.admin-body) .kp-header {
  background: var(--kp-header-bg) !important;
  border-color: var(--kp-border) !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .12);
  backdrop-filter: blur(20px) saturate(145%);
  -webkit-backdrop-filter: blur(20px) saturate(145%);
}
body:not(.admin-body) .kp-brand__title {
  color: var(--kp-heading) !important;
  font-weight: 850;
  letter-spacing: -.03em;
}
body:not(.admin-body) .kp-brand__title::first-letter { color: var(--kp-cyan); }
body:not(.admin-body) .kp-navlink { color: var(--kp-text-muted) !important; }
body:not(.admin-body) .kp-navlink:hover,
body:not(.admin-body) .kp-navlink.is-active {
  color: var(--kp-heading) !important;
  background: var(--kp-primary-soft) !important;
}
body:not(.admin-body) .kp-navlink.is-active { box-shadow: inset 0 0 0 1px rgba(167, 139, 250, .18); }
body:not(.admin-body) .kp-search-input { min-height: 40px; }
body:not(.admin-body) .kp-ft {
  background:
    radial-gradient(circle at 10% 0, rgba(139, 92, 246, .15), transparent 25rem),
    var(--kp-footer-bg) !important;
  border-color: var(--kp-border) !important;
}
body:not(.admin-body) .kp-ft__stat,
body:not(.admin-body) .kp-ft__counter {
  background: rgba(255, 255, 255, .04) !important;
  border-color: var(--kp-border) !important;
}

/* Hardcoded white surfaces on catalogue/detail/search pages. */
body:not(.admin-body) :where(.search-hero, .search-card, .actor-card, .actor-gallery__viewport, .actor-gallery__caption, .credit-list li, .comments-form textarea) {
  color: var(--kp-text) !important;
  background-color: var(--kp-surface-solid) !important;
  border-color: var(--kp-border) !important;
}
body:not(.admin-body) :where(.search-hero h1, .search-section h2, .search-card__title a, .actor-card h3) { color: var(--kp-heading) !important; }
body:not(.admin-body) :where(.search-hero p, .search-card__meta, .search-card__text, .actor-card__meta) { color: var(--kp-text-muted) !important; }
body:not(.admin-body) mark { color: #fff !important; background: rgba(245, 158, 11, .54) !important; }

/* 3.2.0 — light-theme readability: alerts used pale dark-mode text on pale cards. */
html[data-theme="light"] body:not(.admin-body) :where(.alert,.forum-alert) {
  color:#1e40af!important;background:#eff6ff!important;border-color:#bfdbfe!important;
}
html[data-theme="light"] body:not(.admin-body) :where(.alert--success,.alert.success,.alert.ok,.alert-success,.forum-alert.is-success) {
  color:#166534!important;background:#f0fdf4!important;border-color:#bbf7d0!important;
}
html[data-theme="light"] body:not(.admin-body) :where(.alert--error,.alert.error,.alert-error,.error-box,.forum-alert.is-error) {
  color:#991b1b!important;background:#fef2f2!important;border-color:#fecaca!important;
}
/* The close icon has a deliberately dark backdrop in BOTH schemes. */
html[data-theme="light"] body:not(.admin-body) :where(.modal__close,.close,.kp-modal__close,.actor-lightbox__close,.kp-home-popup__close){color:#f8fafc!important;}

/* Kinoportal redesign — Stage 1: spacing, sizing and page rhythm */
body:not(.admin-body) :where(.container, .wrap, .page-wrap, .news-page, .articles-page, .reviews, .quiz-page, .users-container, .profile-container, .forum-page, .search-page) {
  width: min(100% - 28px, var(--kp-container));
  max-width: var(--kp-container) !important;
  margin-inline: auto !important;
}

body:not(.admin-body) :where(main, .page-wrap, .news-page, .articles-page, .reviews, .quiz-page, .users-main, .forum-page, .search-page) {
  position: relative;
}

body:not(.admin-body) :where(.page-wrap, .news-page, .articles-page, .reviews, .quiz-page, .users-main, .forum-page, .search-page) {
  padding-top: clamp(18px, 3vw, 34px) !important;
  padding-bottom: clamp(32px, 5vw, 64px) !important;
}

body:not(.admin-body) :where(.content-section, .section, .search-section) {
  margin-block: clamp(18px, 3vw, 32px);
}

body:not(.admin-body) :where(.section-head, .news-page__head, .reviews__head, .users-head, .forum-head) {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

body:not(.admin-body) :where(.section-title, .reviews__title, .users-title, .news-page__head h1, .articles-hero h1, .quiz-hero h1) {
  margin: 0;
}

body:not(.admin-body) :where(.media-grid, .articles-grid, .quiz-list, .users-grid, .cards, .news-list, .search-list, .actor-grid) {
  gap: clamp(12px, 2vw, 20px) !important;
}

body:not(.admin-body) :where(.card .bd, .panel, .news-item__body, .article-card__body, .quiz-card__body, .media-card__body, .user-meta, .search-card, .actor-card) {
  padding: clamp(14px, 2vw, 20px) !important;
}

body:not(.admin-body) :where(.hero, .articles-hero, .quiz-hero, .search-hero) {
  border-radius: var(--kp-radius-xl) !important;
}

body:not(.admin-body) :where(.login-main, .register-main) {
  min-height: calc(100svh - 150px);
  padding: clamp(28px, 7vw, 72px) 14px !important;
  display: grid;
  place-items: center;
}

body:not(.admin-body) :where(.login-container, .register-container) {
  width: min(100%, 520px) !important;
  padding: clamp(22px, 5vw, 38px) !important;
}

body:not(.admin-body) :where(.login-form, .register-form, .form-group) { gap: 8px; }
body:not(.admin-body) .form-group { margin-bottom: 16px; }

body:not(.admin-body) :where(.actions-bar, .action-buttons, .news-page__actions, .modal__actions, .kp-ft__cta) {
  gap: 10px !important;
}

body:not(.admin-body) :where(.card, .news-item, .article-card, .quiz-card, .media-card, .user-card, .search-card, .actor-card) { overflow: clip; }

body:not(.admin-body) .kp-page-frame { gap: 20px; }
body:not(.admin-body) .kp-side-banner {
  border-radius: var(--kp-radius-lg) !important;
  background: var(--kp-surface) !important;
  border-color: var(--kp-border) !important;
  box-shadow: var(--kp-shadow-xs);
}

body:not(.admin-body) .kp-ft__inner,
body:not(.admin-body) .kp-ft__bottom-inner {
  width: min(100% - 28px, var(--kp-container));
  padding-left: 0;
  padding-right: 0;
}

/* Kinoportal redesign — Stage 1: restrained motion and interaction feedback */
@keyframes kpFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes kpSoftPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
  50% { box-shadow: 0 0 0 5px rgba(139, 92, 246, .08); }
}

body:not(.admin-body) :where(.content-section, .news-item, .article-card, .quiz-card, .media-card, .user-card, .forum-card, .search-section) {
  animation: kpFadeIn .42s both;
}

body:not(.admin-body) :where(.btn, .button, .kp-btn, .login-button, .register-button, .media-card__button, .article-card__button, .quiz-card__button) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

@media (hover: hover) and (pointer: fine) {
  body:not(.admin-body) :where(
    .card, .news-item, .article-card, .quiz-card, .media-card,
    .user-card, .forum-section-card, .search-card, .actor-card
  ) {
    transition: transform var(--kp-transition), border-color var(--kp-transition), box-shadow var(--kp-transition), background-color var(--kp-transition);
  }

  body:not(.admin-body) :where(
    .card, .news-item, .article-card, .quiz-card, .media-card,
    .user-card, .forum-section-card, .search-card, .actor-card
  ):hover {
    transform: translateY(-4px);
    border-color: var(--kp-border-strong) !important;
    box-shadow: var(--kp-shadow-glow) !important;
  }

  body:not(.admin-body) :where(
    .card, .news-item, .article-card, .quiz-card, .media-card,
    .user-card, .search-card, .actor-card
  ):hover :where(.poster img, .article-card__cover img, .quiz-card__cover img, .media-card__cover img, .news-item__image, .user-avatar) {
    transform: scale(1.025);
  }

  body:not(.admin-body) :where(
    .btn, .button, .kp-btn, .login-button, .register-button,
    .media-card__button, .article-card__button, .quiz-card__button,
    .pagination a, .pagination__btn, .pagination__page, .pagination__nav
  ):hover {
    transform: translateY(-1px);
    border-color: var(--kp-border-strong) !important;
    background: var(--kp-surface-hover) !important;
    box-shadow: var(--kp-shadow-xs);
  }

  body:not(.admin-body) :where(
    .btn-primary, .btn--primary, .button.primary, .kp-btn--primary,
    .login-button, .register-button, .media-card__button,
    .article-card__button, .quiz-card__button, .home-poll__button
  ):hover {
    background: linear-gradient(135deg, var(--kp-primary-hover), #2563eb) !important;
    box-shadow: 0 12px 28px rgba(91, 33, 182, .34) !important;
  }

  body:not(.admin-body) .kp-brand:hover { animation: kpSoftPulse 1.1s ease; }
}

body:not(.admin-body) :where(.btn, .button, .kp-btn, button):active { transform: translateY(0) scale(.985); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Kinoportal redesign — Stage 8: final performance, motion and responsive polish */

:root {
  --kp-ad-radius: clamp(16px, 2vw, 24px);
  --kp-motion-fast: 160ms;
  --kp-motion-base: 280ms;
  --kp-motion-slow: 560ms;
  --kp-ease-out: cubic-bezier(.2, .8, .2, 1);
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body:not(.admin-body) {
  min-width: 320px;
  overflow-x: clip;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body:not(.admin-body),
body:not(.admin-body) *,
body:not(.admin-body) *::before,
body:not(.admin-body) *::after {
  box-sizing: border-box;
}

body:not(.admin-body) :where(img, video, iframe, svg, canvas) {
  max-inline-size: 100%;
}

body:not(.admin-body) img {
  height: auto;
}

body:not(.admin-body) :where(button, a, input, select, textarea, summary) {
  -webkit-tap-highlight-color: transparent;
}

body:not(.admin-body) :where(button, [role="button"], input, select, textarea, a) {
  outline-offset: 3px;
}

body:not(.admin-body) :where(button, [role="button"], input, select, textarea, a):focus-visible {
  outline: 3px solid color-mix(in srgb, var(--kp-cyan, #22d3ee) 80%, #fff 20%);
  outline-offset: 3px;
}

body:not(.admin-body) :where(button, input, select, textarea) {
  font: inherit;
}

body:not(.admin-body) :where(.home-button, .kp-button, .btn, button, [role="button"]) {
  touch-action: manipulation;
}

body:not(.admin-body) table {
  max-width: 100%;
}

body:not(.admin-body) :where(.table-wrap, .responsive-table, .forum-table-wrap) {
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

/* Below-the-fold rendering: improves long catalog/editorial pages without changing layout. */
@supports (content-visibility: auto) {
  body:not(.admin-body) :where(
    .home-section:nth-of-type(n+3),
    .catalog-grid,
    .editorial-grid,
    .articles-grid,
    .reviews-grid,
    .quiz-list,
    .forum-list,
    .profile-section,
    .title-detail__section
  ) {
    content-visibility: auto;
    contain-intrinsic-size: auto 760px;
  }
}

/* Final reveal animation is added only by JS, so content remains visible without JS. */
html.kp-final-ui:not(.kp-reduced-motion) [data-kp-final-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity var(--kp-motion-slow) ease,
    transform var(--kp-motion-slow) var(--kp-ease-out);
}

html.kp-final-ui:not(.kp-reduced-motion) [data-kp-final-reveal].is-kp-visible {
  opacity: 1;
  transform: none;
}

/* Image loading feedback and graceful failures. */
body:not(.admin-body) .kp-media-loading {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--kp-surface-2, #172033) 92%, #fff 8%);
}

body:not(.admin-body) .kp-media-loading::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 20%,
    rgba(255, 255, 255, .08) 42%,
    rgba(255, 255, 255, .16) 50%,
    rgba(255, 255, 255, .08) 58%,
    transparent 80%
  );
  transform: translateX(-120%);
  animation: kp-final-shimmer 1.35s linear infinite;
}

body:not(.admin-body) .kp-media-loading > img {
  z-index: 1;
  opacity: 1;
  transition: opacity var(--kp-motion-base) ease;
}

body:not(.admin-body) .kp-media-ready::before {
  display: none;
}

body:not(.admin-body) .kp-media-ready > img {
  opacity: 1;
}

body:not(.admin-body) .kp-media-error {
  min-height: 120px;
  background-color: color-mix(in srgb, var(--kp-surface-2, #172033) 88%, #000 12%);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 120'%3E%3Cg fill='none' stroke='%2394a3b8' stroke-width='5' stroke-linecap='round' stroke-linejoin='round' opacity='.75'%3E%3Crect x='24' y='18' width='112' height='84' rx='12'/%3E%3Ccircle cx='58' cy='49' r='9'/%3E%3Cpath d='m37 88 27-27 19 18 14-13 26 22'/%3E%3C/g%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: min(46%, 160px) auto;
}

body:not(.admin-body) .kp-media-error > img {
  opacity: 0 !important;
}

@keyframes kp-final-shimmer {
  to { transform: translateX(120%); }
}

/* Pause non-essential movement while tab is hidden. */
html.kp-page-hidden *,
html.kp-page-hidden *::before,
html.kp-page-hidden *::after {
  animation-play-state: paused !important;
}

/* Cards: one consistent depth/interaction language. */
@media (hover: hover) and (pointer: fine) {
  body:not(.admin-body) :where(
    .catalog-card,
    .editorial-card,
    .home-title-card,
    .home-reading-card,
    .quiz-card,
    .forum-card,
    .profile-card,
    .collection-card
  ) {
    transition:
      transform var(--kp-motion-base) var(--kp-ease-out),
      box-shadow var(--kp-motion-base) ease,
      border-color var(--kp-motion-base) ease;
  }

  body:not(.admin-body) :where(
    .catalog-card,
    .editorial-card,
    .home-title-card,
    .home-reading-card,
    .quiz-card,
    .forum-card,
    .profile-card,
    .collection-card
  ):hover {
    transform: translateY(-5px);
  }
}

/* Back-to-top appears only after useful scrolling. */
body:not(.admin-body) .kp-back-top {
  opacity: .45;
  transform: translateY(4px);
  transition: opacity var(--kp-motion-fast) ease, transform var(--kp-motion-fast) ease;
}

body:not(.admin-body).kp-has-scrolled .kp-back-top {
  opacity: 1;
  transform: none;
}

/* Advertising: compact, non-destructive and dismissible for the current tab. */
.kp-inline-banner-wrap {
  position: relative;
  width: min(calc(100% - clamp(20px, 5vw, 64px)), 1180px);
  margin: clamp(12px, 1.8vw, 22px) auto;
  isolation: isolate;
}

.kp-inline-banner {
  position: relative;
  width: 100%;
  min-height: 74px;
  max-height: 124px;
  padding: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--kp-border, rgba(148, 163, 184, .22));
  border-radius: var(--kp-ad-radius);
  background:
    radial-gradient(circle at 20% 0%, rgba(124, 58, 237, .14), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--kp-surface-solid, #111827) 94%, #fff 6%), var(--kp-surface-solid, #111827));
  box-shadow: 0 16px 42px rgba(4, 7, 14, .17);
  line-height: 0;
  text-decoration: none;
  transition: transform var(--kp-motion-base) var(--kp-ease-out), border-color var(--kp-motion-base) ease, box-shadow var(--kp-motion-base) ease;
}

.kp-inline-banner img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 108px;
  display: block;
  object-fit: contain;
  object-position: center;
  border-radius: calc(var(--kp-ad-radius) - 8px);
}

.kp-inline-banner-label,
.kp-side-banner__badge {
  position: absolute;
  z-index: 4;
  top: 10px;
  left: 10px;
  min-height: 23px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(4, 7, 14, .72);
  color: rgba(255, 255, 255, .9);
  font: 800 9px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: .09em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.kp-ad-dismiss {
  position: absolute;
  z-index: 8;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 50%;
  background: rgba(4, 7, 14, .76);
  color: #fff;
  box-shadow: 0 7px 22px rgba(0, 0, 0, .2);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.kp-ad-dismiss:hover {
  background: rgba(244, 63, 94, .9);
}

.kp-inline-banner-wrap.is-kp-ad-hidden,
.kp-side-banner.is-kp-ad-hidden {
  display: none !important;
}

@media (hover: hover) and (pointer: fine) {
  a.kp-inline-banner:hover {
    transform: translateY(-2px);
    border-color: color-mix(in srgb, var(--kp-primary, #7c3aed) 46%, transparent);
    box-shadow: 0 22px 52px rgba(4, 7, 14, .23);
  }
}

/* Side banners are now contained instead of stretched/cropped. */
.kp-page-frame {
  width: min(100% - 28px, 1920px);
  margin: 0 auto;
  padding: 20px 0;
  display: grid;
  grid-template-columns: minmax(160px, 250px) minmax(0, 1fr) minmax(160px, 250px);
  gap: clamp(16px, 2vw, 26px);
  align-items: start;
}

.kp-page-content {
  min-width: 0;
}

.kp-side-banner {
  position: sticky;
  top: 92px;
  min-width: 0;
}

.kp-side-banner.is-empty {
  display: none !important;
}

.kp-side-banner__link,
.kp-side-banner__box {
  position: relative;
  min-height: 160px;
  padding: 8px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--kp-border, rgba(148, 163, 184, .22));
  border-radius: 20px;
  background: var(--kp-surface-solid, #111827);
  box-shadow: 0 16px 40px rgba(4, 7, 14, .16);
}

.kp-side-banner__image {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 210px);
  display: block;
  object-fit: contain;
  border-radius: 13px;
}

.kp-ad-dismiss--side {
  top: 8px;
  right: 8px;
}

/* Mobile/tablet final pass. */
@media (max-width: 1199px) {
  .kp-page-frame {
    width: 100%;
    padding: 0;
    display: block;
  }

  .kp-side-banner {
    display: none !important;
  }
}

@media (max-width: 900px) {
  html {
    scroll-padding-top: 76px;
  }

  body:not(.admin-body) :where(button, [role="button"], .home-button, .kp-button, .btn) {
    min-height: 42px;
  }

  .kp-inline-banner-wrap {
    width: calc(100% - 24px);
    margin: 12px auto;
  }

  .kp-inline-banner {
    min-height: 68px;
    max-height: 100px;
    padding: 6px;
    border-radius: 18px;
  }

  .kp-inline-banner img {
    max-height: 88px;
    border-radius: 13px;
  }
}

@media (max-width: 640px) {
  body:not(.admin-body) {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  body:not(.admin-body) :where(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    font-size: 16px; /* prevents iOS zoom */
  }

  body:not(.admin-body) :where(.modal, [role="dialog"]) {
    max-width: calc(100vw - 16px);
  }

  .kp-inline-banner-wrap {
    width: calc(100% - 16px);
    margin: 9px auto;
  }

  .kp-inline-banner {
    min-height: 58px;
    max-height: 84px;
    padding: 5px;
    border-radius: 15px;
  }

  .kp-inline-banner img {
    max-height: 72px;
    border-radius: 11px;
  }

  .kp-inline-banner-label {
    top: 7px;
    left: 7px;
    min-height: 19px;
    padding-inline: 6px;
    font-size: 8px;
  }

  .kp-ad-dismiss {
    top: 6px;
    right: 6px;
    width: 27px;
    height: 27px;
    font-size: 17px;
  }

  body:not(.admin-body) table {
    font-size: .88rem;
  }
}

/* Users who request less motion get a genuinely calm interface. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }

  body:not(.admin-body) .kp-media-loading::before {
    animation: none;
  }
}

/* Printing: content first, navigation/ads never. */
@media print {
  .kp-site-header,
  .kp-mobile-nav,
  .kp-site-footer,
  .kp-inline-banner-wrap,
  .kp-side-banner,
  .kp-back-top,
  .kp-ad-dismiss {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  a {
    color: inherit !important;
    text-decoration: none !important;
  }
}

/* Stage 9: consistent public 404 page */
.kp-not-found {
  width: min(100% - 32px, 1180px);
  min-height: 58vh;
  margin: 0 auto;
  padding: clamp(40px, 8vw, 96px) 0;
  display: grid;
  place-items: center;
}
.kp-not-found__card {
  width: min(100%, 760px);
  padding: clamp(28px, 5vw, 54px);
  text-align: center;
  border: 1px solid var(--kp-border);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 10%, rgba(34,211,238,.12), transparent 30%),
    linear-gradient(145deg, var(--kp-surface), var(--kp-surface-2));
  box-shadow: var(--kp-shadow-md);
}
.kp-not-found__code {
  display: block;
  margin-bottom: 8px;
  color: var(--kp-cyan);
  font-size: clamp(3.5rem, 12vw, 8rem);
  font-weight: 950;
  line-height: .9;
  letter-spacing: -.07em;
}
.kp-not-found__card h1 { margin: 0 0 12px; }
.kp-not-found__card p { margin: 0 auto 24px; max-width: 620px; color: var(--kp-text-muted); }
.kp-not-found__button {
  min-height: 46px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #fff !important;
  background: linear-gradient(110deg, var(--kp-primary), var(--kp-secondary));
  text-decoration: none !important;
  font-weight: 850;
}

/* Release 3.8.0: contrast and episode feedback. Deliberately scoped. */
.tv-episode-feedback {min-height:1.4em;margin:12px 0;color:var(--kp-text, #f8fafc);font-weight:650}
.tv-episode-feedback.is-error {color:#fda4af}
.tv-episode__toggle:disabled {cursor:not-allowed;opacity:.62}
.tv-episode__form[data-busy="1"] {opacity:.75}
.catalog-filters input[type=number],.catalog-filters select {min-width:0;max-width:100%;color:var(--kp-text,#f8fafc);background:var(--kp-surface,#111827)}
.catalog-filters option {color:#10182a;background:#fff}
@media(max-width:640px){.catalog-filters .catalog-field{min-width:0;flex:1 1 100%}}

/* Kinoportal redesign — Stage 1: phone and tablet safeguards */
@media (max-width: 1199px) {
  :root { --kp-container: 1120px; }

  body:not(.admin-body) .kp-page-frame {
    grid-template-columns: minmax(0, 1fr) !important;
    width: min(100% - 28px, var(--kp-container));
  }

  body:not(.admin-body) .kp-side-banner { display: none !important; }
}

@media (max-width: 991.98px) {
  body:not(.admin-body) { font-size: 15px; }

  body:not(.admin-body) .kp-nav {
    background: rgba(12, 18, 32, .98) !important;
    border-color: var(--kp-border) !important;
    box-shadow: var(--kp-shadow-md) !important;
    backdrop-filter: blur(20px);
  }
  html[data-theme="light"] body:not(.admin-body) .kp-nav { background: rgba(255, 255, 255, .98) !important; }

  body:not(.admin-body) .kp-navlink {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  body:not(.admin-body) :where(.btn, .button, .kp-btn, .login-button, .register-button, .media-card__button, .article-card__button, .quiz-card__button) {
    min-height: 44px;
  }
}

@media (max-width: 767.98px) {
  :root {
    --kp-radius-lg: 16px;
    --kp-radius-xl: 20px;
  }

  body:not(.admin-body) {
    line-height: 1.55;
    padding-bottom: env(safe-area-inset-bottom);
  }

  body:not(.admin-body) :where(.container, .wrap, .page-wrap, .news-page, .articles-page, .reviews, .quiz-page, .users-container, .profile-container, .forum-page, .search-page) {
    width: min(100% - 20px, var(--kp-container));
  }

  body:not(.admin-body) .kp-header__inner { padding-inline: 10px; }
  body:not(.admin-body) .kp-brand__title { font-size: .98rem; }

  body:not(.admin-body) :where(.section-head, .news-page__head, .reviews__head, .users-head, .forum-head) {
    align-items: stretch;
  }

  body:not(.admin-body) :where(.section-head > *, .news-page__actions, .reviews__head .btn, .users-head .filter) {
    max-width: 100%;
  }

  body:not(.admin-body) :where(.actions-bar, .comments-form__footer, .comments-login) {
    align-items: stretch !important;
  }

  body:not(.admin-body) :where(.action-buttons, .news-page__actions, .modal__actions) {
    width: 100%;
  }

  body:not(.admin-body) :where(.action-buttons .btn, .news-page__actions .btn, .modal__actions .btn) {
    flex: 1 1 auto;
  }

  body:not(.admin-body) :where(.media-grid, .articles-grid, .quiz-list, .users-grid, .cards, .actor-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:not(.admin-body) :where(.search-card) { grid-template-columns: 1fr !important; }
  body:not(.admin-body) :where(.search-card__thumb, .search-card__thumb--poster) { width: 100% !important; }

  body:not(.admin-body) .kp-notify-dropdown {
    position: fixed !important;
    top: 66px !important;
    left: 10px !important;
    right: 10px !important;
    width: auto !important;
    max-height: calc(100svh - 82px) !important;
  }
}

@media (max-width: 520px) {
  body:not(.admin-body) h1 { font-size: clamp(1.65rem, 8vw, 2.25rem); }
  body:not(.admin-body) h2 { font-size: clamp(1.25rem, 6vw, 1.65rem); }

  body:not(.admin-body) :where(.articles-grid, .quiz-list, .users-grid) {
    grid-template-columns: 1fr !important;
  }
  /* Poster grids remain scannable on 360–520px instead of one huge poster per row. */
  body:not(.admin-body) :where(.media-grid, .actor-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body:not(.admin-body) :where(.btn, .button, .kp-btn, .login-button, .register-button, .media-card__button, .article-card__button, .quiz-card__button) {
    min-height: 46px;
  }

  body:not(.admin-body) :where(.search-form, .kp-search-form) { gap: 7px; }
  body:not(.admin-body) .kp-search-form .kp-btn { padding-inline: 12px; }

  body:not(.admin-body) :where(.pagination, .articles-pagination) {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }
}

