/**
 * kok-responsive-commerce-v1.1.css — KL-010Q-F (from KL-010Q-E)
 * AUTHORITATIVE mobile commerce stylesheet for staged release.
 * Replaces the stacked cascade: v2.1 + v2.2 + v3.0 + cards + product + sales.
 * Desktop (>=901px): progressive toggles hidden; desktop legacy CSS remains owners.
 * Tokens + component ownership — see docs/RESPONSIVE_CSS_ARCHITECTURE.md
 */
:root {
  --kok-rc-primary: #078bd7;
  --kok-rc-primary-press: #0670ad;
  --kok-rc-text: #17384b;
  --kok-rc-muted: #738691;
  --kok-rc-bg: #f7fafc;
  --kok-rc-surface: #ffffff;
  --kok-rc-border: #dce8ee;
  --kok-rc-success: #19845e;
  --kok-rc-radius: 10px;
  --kok-rc-s1: 4px;
  --kok-rc-s2: 8px;
  --kok-rc-s3: 12px;
  --kok-rc-s4: 16px;
  --kok-rc-btn: 44px;
  --kok-rc-bp: 900px;
}

/* Progressive toggles inert until ready / desktop */
.kok-mobile-nav-toggle,
.kok-mobile-cat-toggle,
#kok-mobile-cat-backdrop {
  display: none !important;
}

/* ===== SECTION: mobile shell recovery (was v2.1 ownership) ===== */
/* KOK.mn Mobile Experience v2.0 — KL-010 staging
 * Based on kok-mobile-v1.css (2026-08-30) with header/search/overflow fixes.
 * Desktop rules outside these media queries are untouched.
 * Load after legacy CSS; uses !important to override topform inline mobile bugs
 * (e.g. .kok-compact-search { min-width:430px } at max-width:900px).
 */

@media screen and (max-width: 900px) {
  html, body {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    -webkit-text-size-adjust: 100%;
  }
  body *, body *::before, body *::after { box-sizing: border-box; }
  img, video, iframe, object, embed { max-width: 100% !important; }
  input, select, textarea, button { max-width: 100%; font-size: 16px; }
  a, button, input[type="submit"], input[type="button"] { touch-action: manipulation; }

  #container,
  #main.kok-modern-main,
  .kok-info-hub,
  .kok-compact-hub,
  .kok-business-network {
    width: calc(100% - 20px) !important;
    min-width: 0 !important;
    max-width: none !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }
  .side-tools, .kok-site-notice { display: none !important; }

  /* Header and account panel */
  #toppanel,
  #toppanel > .headerMenu,
  #toppanel .headerMenu,
  html body #toppanel > .kok-v2-header {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  html body #toppanel > .kok-v2-header {
    display: grid !important;
    height: auto !important;
    min-height: 96px !important;
    grid-template-areas: "brand account" "nav nav" !important;
    grid-template-columns: minmax(120px,1fr) minmax(148px,190px) !important;
    grid-template-rows: 48px 46px !important;
    gap: 0 8px !important;
    padding: 4px 10px 0 !important;
    overflow: visible !important;
  }
  html body #toppanel .kok-v2-brand {
    grid-area: brand !important;
    width: auto !important;
    min-width: 0 !important;
    height: 42px !important;
    align-items: flex-start !important;
    padding-left: 2px !important;
  }
  html body #toppanel .kok-v2-brand-title,
  html body #toppanel .kok-v2-brand-note {
    width: 100% !important;
    max-width: 100% !important;
    text-align: left !important;
  }
  html body #toppanel .kok-v2-brand-title { font-size: 18px !important; }
  html body #toppanel .kok-v2-account.tab {
    grid-area: account !important;
    justify-self: end !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 190px !important;
  }
  html body #toppanel .kok-v2-account.tab > ul.login,
  html body #toppanel .kok-v2-account.tab > ul.login > li#toggle,
  html body #toppanel .kok-v2-account-open,
  html body #toppanel .kok-v2-account-close {
    width: 100% !important;
    min-width: 0 !important;
  }
  html body #toppanel .kok-v2-nav {
    grid-area: nav !important;
    width: calc(100% + 20px) !important;
    min-width: 0 !important;
    height: 46px !important;
    margin-left: -10px !important;
    padding: 5px 10px 7px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 6px !important;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }
  html body #toppanel .kok-v2-nav::-webkit-scrollbar { display: none; }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link {
    min-width: max-content !important;
    height: 34px !important;
    padding: 0 11px !important;
    font-size: 10px !important;
    scroll-snap-align: start;
  }
  #panel .content.clearfix {
    width: calc(100% - 20px) !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 12px 0 15px !important;
  }
  #panel .kok-auth-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  #panel .kok-publisher-metrics { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  #panel .kok-publisher-actions { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  .kok-welcome-dialog { width: 100% !important; max-width: 520px !important; }
  .kok-theme-switch {
    position: absolute !important;
    top: 101px !important;
    right: 12px !important;
    width: 78px !important;
    height: 30px !important;
    font-size: 9px !important;
  }

  /* Search and discovery */
  .kok-header-clearance { height: 7px !important; }
  body.kok-inner-page .kok-compact-hub {
    display: grid !important;
    grid-template-columns: 40px minmax(0,1fr) auto !important;
    gap: 7px !important;
    padding: 8px !important;
  }
  .kok-compact-search {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    width: 100% !important;
    order: 5;
  }
  .kok-compact-action-primary { grid-column: 2 !important; }
  .kok-compact-action:not(.kok-compact-action-primary) { display: none !important; }
  .kok-compact-toggle { grid-column: 3 !important; padding: 0 10px !important; font-size: 9px !important; }

  .kok-info-hub { width: calc(100% - 20px) !important; }
  .kok-feature-row {
    display: flex !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .kok-feature-row::-webkit-scrollbar { display: none; }
  .kok-feature-row .kok-feature-card {
    width: 88% !important;
    min-width: 88% !important;
    height: 158px !important;
    min-height: 158px !important;
    padding: 14px 15px !important;
    border-right: 1px solid rgba(255,255,255,.18) !important;
    border-bottom: 0 !important;
    scroll-snap-align: start;
  }
  .kok-feature-row .kok-feature-card:last-child { border-right: 0 !important; }
  .kok-feature-row .kok-feature-card h2 { font-size: 15px !important; }
  .kok-feature-row .kok-feature-card p { min-height: 28px !important; font-size: 10px !important; }
  .kok-feature-visual { width: 44px !important; height: 44px !important; flex-basis: 44px !important; }

  .kok-utility-bar {
    display: flex !important;
    overflow-x: auto !important;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
  }
  .kok-utility-bar::-webkit-scrollbar { display: none; }
  .kok-utility-item { min-width: 205px !important; height: 56px !important; scroll-snap-align: start; }
  .kok-search-actions { grid-template-columns: 1fr !important; gap: 9px !important; }
  .kok-action-links { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .kok-search-form { min-width: 0 !important; }
  .kok-search-input { min-width: 0 !important; font-size: 16px !important; }
  .kok-search-button { min-width: 72px !important; padding: 0 12px !important; }

  /* Main layout */
  #main.kok-modern-main { width: calc(100% - 20px) !important; }
  .kok-content-layout { grid-template-columns: minmax(0,1fr) !important; gap: 10px !important; }
  .kok-content-primary { border-radius: 11px !important; overflow: hidden !important; }
  .kok-content-sidebar { order: 2 !important; }
  .kok-home-category-zone { margin-top: 10px !important; padding: 9px !important; }
  .kok-home-category-zone .kok-category-showcase { grid-template-columns: 1fr !important; gap: 9px !important; }

  /* File list and search results */
  .kok-latest-list {
    min-height: 92px !important;
    grid-template-columns: 58px minmax(0,1fr) !important;
    gap: 10px !important;
    padding: 10px !important;
  }
  .kok-latest-media { width: 56px !important; height: 56px !important; }
  .kok-latest-action {
    grid-column: 2 !important;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-direction: row !important;
    gap: 8px !important;
    padding-top: 7px !important;
    border-top: 1px solid #e8eef2 !important;
  }
  .kok-latest-download { min-width: 74px !important; height: 30px !important; }
  .kok-latest-list > .kok-latest-body > .kok-latest-title {
    height: auto !important;
    max-height: 34px !important;
    font-size: 12px !important;
    line-height: 17px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .kok-latest-links { flex-wrap: wrap !important; }

  .kok-search-page { padding: 8px !important; }
  .kok-search-hero { align-items: flex-start !important; padding: 13px !important; }
  .kok-search-card { grid-template-columns: 58px minmax(0,1fr) !important; gap: 9px !important; padding: 9px !important; }
  .kok-search-media { width: 58px !important; height: 58px !important; }
  .kok-search-action {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: 1fr minmax(112px,150px) !important;
    padding: 8px 0 0 !important;
    border-top: 1px solid #e4ecef !important;
    border-left: 0 !important;
  }

  /* Category and sidebar */
  .kok-featured-service { grid-template-columns: 1fr !important; min-height: 0 !important; }
  .kok-featured-service-copy { padding: 16px !important; }
  .kok-featured-service-title { font-size: 18px !important; line-height: 23px !important; }
  .kok-featured-service-media { min-height: 128px !important; padding: 8px !important; }
  .kok-featured-service-media img { height: auto !important; max-height: 190px !important; }
  .kok-category-showcase { width: 100% !important; float: none !important; }
  .kok-category-group { min-height: 0 !important; }
  .kok-category-card { height: 70px !important; grid-template-columns: 48px minmax(0,1fr) !important; }
  .kok-category-thumb { width: 48px !important; height: 48px !important; }
  .kok-sidebar-section summary { min-height: 48px !important; font-size: 12px !important; }
  .kok-sidebar-link { min-height: 46px !important; font-size: 11px !important; }
  .kok-sidebar-count { min-width: 32px !important; height: 22px !important; }

  /* Detail, QPay and file content */
  .kok-help-bar { padding: 10px 12px !important; font-size: 10px !important; }
  .kok-file-card { border-radius: 12px !important; }
  .kok-file-head { padding: 14px !important; }
  .kok-file-title { font-size: 18px !important; line-height: 24px !important; }
  .kok-file-main { grid-template-columns: 1fr !important; gap: 14px !important; padding: 12px !important; }
  .kok-file-preview { min-height: 210px !important; }
  .kok-file-preview img { max-height: 280px !important; }
  .kok-meta-grid { grid-template-columns: 1fr !important; }
  .kok-qpay-entry { align-items: stretch !important; flex-direction: column !important; padding: 12px !important; }
  .kok-qpay-open { width: 100% !important; min-height: 44px !important; }
  .kok-qpay-modal { padding: max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom)) !important; }
  .kok-qpay-dialog { max-height: calc(100dvh - 16px); overflow-y: auto !important; }
  .kok-qpay-banks-grid { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  .kok-qpay-bank { min-height: 58px !important; }
  .kok-download-btn { width: 100% !important; min-width: 0 !important; }

  #examples, #images, #zurag, #aguulga, #aguulga_zurag, #tulbur_hiih {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }
  #images #zurag { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 8px !important; }
  #images #zurag > a { display: block !important; width: 100% !important; }
  #images #zurag > a img { width: 100% !important; height: 120px !important; object-fit: cover !important; border-radius: 9px !important; }
  #zurag pre { width: 100% !important; max-width: 100% !important; padding: 10px !important; overflow-wrap: anywhere; white-space: pre-wrap !important; }
  #zurag .container, #zurag .row, #zurag .col-sm { width: 100% !important; max-width: 100% !important; margin: 0 !important; }
  #zurag .row { display: grid !important; grid-template-columns: 1fr !important; gap: 10px !important; }
  #zurag .col-sm { padding: 12px !important; border-radius: 10px !important; }
  #zurag .card-body, #zurag .card-text { height: auto !important; min-height: 0 !important; }
  #zurag input[type="button"] { width: 100% !important; min-height: 44px !important; }
  #zurag table { width: 100% !important; max-width: 100% !important; }

  /* Publisher and account pages */
  #kok-publisher-dashboard .kpd-shell,
  #kok-wallet-dashboard .kwd-shell,
  #kok-publisher-public .kpv-shell,
  #kok-profile-edit .kpe-shell,
  #kok-register-page .kr-shell,
  #kok-file-add .kfa-shell { padding: 8px 8px 18px !important; }

  #kok-publisher-dashboard .kpd-hero,
  #kok-wallet-dashboard .kwd-hero,
  #kok-publisher-public .kpv-profile {
    display: block !important;
    min-height: 0 !important;
    padding: 17px !important;
  }
  #kok-publisher-dashboard .kpd-hero-copy,
  #kok-publisher-dashboard .kpd-hero-actions,
  #kok-wallet-dashboard .kwd-hero-copy,
  #kok-wallet-dashboard .kwd-hero-balance,
  #kok-publisher-public .kpv-person,
  #kok-publisher-public .kpv-stats {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    text-align: left !important;
  }
  #kok-publisher-dashboard .kpd-hero-actions { margin-top: 13px !important; white-space: normal !important; }
  #kok-publisher-dashboard .kpd-hero-actions .kpd-btn { margin: 0 6px 6px 0 !important; }
  #kok-wallet-dashboard .kwd-hero-balance { margin-top: 14px !important; padding-top: 13px !important; border-top: 1px solid rgba(255,255,255,.18) !important; border-left: 0 !important; }

  #kok-publisher-dashboard .kpd-metrics,
  #kok-wallet-dashboard .kwd-metrics {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 8px !important;
    margin: 10px 0 0 !important;
    border-spacing: 0 !important;
  }
  #kok-publisher-dashboard .kpd-metric,
  #kok-wallet-dashboard .kwd-metric { display: block !important; width: 100% !important; height: auto !important; min-height: 76px !important; }

  #kok-publisher-dashboard .kpd-income-grid,
  #kok-wallet-dashboard .kwd-grid,
  #kok-profile-edit .kpe-layout {
    display: grid !important;
    width: 100% !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    margin: 10px 0 0 !important;
    border-spacing: 0 !important;
  }
  #kok-publisher-dashboard .kpd-income-main,
  #kok-publisher-dashboard .kpd-income-side,
  #kok-wallet-dashboard .kwd-card,
  #kok-profile-edit .kpe-photo-column,
  #kok-profile-edit .kpe-form-column {
    display: block !important;
    width: 100% !important;
    border-right: 0 !important;
    border-left: 0 !important;
  }
  #kok-publisher-dashboard .kpd-income-main { border-bottom: 1px solid #e8eef4 !important; }
  #kok-wallet-dashboard .kwd-card + .kwd-card { border-top: 1px solid #e5edf2 !important; }

  #kok-publisher-dashboard .kpd-table-wrap,
  #kok-wallet-dashboard .kwd-panel { overflow-x: auto !important; -webkit-overflow-scrolling: touch; }
  #kok-publisher-dashboard .kpd-table,
  #kok-wallet-dashboard .kwd-table { min-width: 680px !important; }
  #kok-publisher-dashboard .kpd-share-row,
  #kok-publisher-dashboard .kpd-share-input,
  #kok-publisher-dashboard .kpd-share-action { display: block !important; width: 100% !important; }
  #kok-publisher-dashboard .kpd-share-action { padding: 8px 0 0 !important; }

  #kok-profile-edit .kpe-hero,
  #kok-register-page .kr-hero { min-height: 0 !important; padding: 18px !important; }
  #kok-profile-edit .kpe-back,
  #kok-register-page .kr-login { position: static !important; display: block !important; width: 100% !important; margin-top: 13px !important; }
  #kok-profile-edit .kpe-form-grid { display: block !important; width: 100% !important; margin: 0 !important; border-spacing: 0 !important; }
  #kok-profile-edit .kpe-field { display: block !important; width: 100% !important; }
  #kok-profile-edit .kpe-actions { display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important; }
  #kok-profile-edit .kpe-btn { width: 100% !important; margin: 0 !important; }
  #kok-register-page .kr-grid { display: block !important; width: 100% !important; }
  #kok-register-page .kr-form-side,
  #kok-register-page .kr-terms-side { display: block !important; width: 100% !important; padding: 16px !important; border-left: 0 !important; }
  #kok-register-page .kr-terms-side { border-top: 1px solid #e4edf2 !important; }
  #kok-register-page .kr-field-row { display: block !important; width: 100% !important; margin: 0 !important; }
  #kok-register-page .kr-field-col { display: block !important; width: 100% !important; padding: 0 !important; }
  #kok-register-page .kr-benefits { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 7px !important; border-spacing: 0 !important; }
  #kok-register-page .kr-benefit { display: block !important; padding: 10px 6px !important; }
  #kok-register-page .kr-terms-box { height: 240px !important; }
  #kok-register-page .kr-btn { width: 100% !important; margin-right: 0 !important; }

  #kok-file-add .kfa-shell { padding: 10px 8px 20px !important; }
  #kok-file-add .kfa-hero { padding: 18px 15px !important; }
  #kok-file-add .kfa-hero h1 { font-size: 21px !important; }
  #kok-file-add .kfa-steps { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; }
  #kok-file-add .kfa-step { display: block !important; min-width: 0 !important; padding: 42px 8px 10px !important; border-right: 1px solid #e5edf5 !important; text-align: center !important; }
  #kok-file-add .kfa-step:last-child { border-right: 0 !important; }
  #kok-file-add .kfa-step-no { top: 9px !important; left: 50% !important; margin: 0 0 0 -14px !important; }
  #kok-file-add .kfa-step span { display: none !important; }
  #kok-file-add .kfa-layout { display: block !important; width: 100% !important; margin: 0 !important; border-spacing: 0 !important; }
  #kok-file-add .kfa-main,
  #kok-file-add .kfa-side { display: block !important; width: 100% !important; }
  #kok-file-add .kfa-side { margin-top: 10px !important; }
  #kok-file-add .kfa-card-head,
  #kok-file-add .kfa-card-body { padding-right: 14px !important; padding-left: 14px !important; }
  #kok-file-add .kfa-upload-box { padding: 18px 10px !important; }
  #kok-file-add .kfa-form-grid { display: block !important; width: 100% !important; margin: 0 !important; border-spacing: 0 !important; }
  #kok-file-add .kfa-field { display: block !important; width: 100% !important; }
  #kok-file-add .kfa-actions { display: grid !important; grid-template-columns: 1fr !important; gap: 8px !important; text-align: left !important; }
  #kok-file-add .kfa-primary,
  #kok-file-add .kfa-secondary { width: 100% !important; min-width: 0 !important; margin: 0 !important; }
  #kok-file-add #load { width: calc(100% - 28px) !important; max-width: 360px !important; }

  #kok-publisher-public .kpv-profile { display: block !important; padding: 18px 15px !important; }
  #kok-publisher-public .kpv-person,
  #kok-publisher-public .kpv-stats { display: block !important; width: 100% !important; text-align: left !important; }
  #kok-publisher-public .kpv-stats { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)) !important; gap: 6px !important; margin-top: 15px !important; }
  #kok-publisher-public .kpv-stat { width: 100% !important; min-width: 0 !important; margin: 0 !important; }
  #kok-publisher-public .kpv-file-card { display: grid !important; grid-template-columns: 78px minmax(0,1fr) !important; min-height: 0 !important; }
  #kok-publisher-public .kpv-file-media,
  #kok-publisher-public .kpv-file-content,
  #kok-publisher-public .kpv-file-action { display: block !important; width: auto !important; }
  #kok-publisher-public .kpv-file-media { padding: 10px 0 8px 10px !important; }
  #kok-publisher-public .kpv-file-media img,
  #kok-publisher-public .kpv-file-placeholder { width: 66px !important; height: 66px !important; line-height: 66px !important; }
  #kok-publisher-public .kpv-file-content { min-width: 0 !important; padding: 10px !important; }
  #kok-publisher-public .kpv-file-action { grid-column: 1 / -1 !important; display: grid !important; grid-template-columns: 1fr 1fr 124px !important; align-items: center !important; gap: 6px !important; padding: 9px 10px !important; border-top: 1px solid #edf1f5 !important; border-left: 0 !important; text-align: left !important; }
  #kok-publisher-public .kpv-price { margin: 0 !important; font-size: 16px !important; }
  #kok-publisher-public .kpv-publish-cta { padding: 16px !important; }
  #kok-publisher-public .kpv-publish-cta .kpv-btn { position: static !important; width: 100% !important; margin-top: 12px !important; }

  input[type="text"],input[type="email"],input[type="password"],input[type="tel"],input[type="number"],input[type="search"],select,textarea { font-size: 16px !important; }

  /* Footer */
  #footer.kok-site-footer { margin-bottom: 16px !important; }
  .kok-footer-main { grid-template-columns: repeat(2,minmax(0,1fr)) !important; padding: 26px 22px !important; }
  .kok-footer-bottom { padding: 13px 22px !important; }
}

@media screen and (max-width: 620px) {
  #container,
  #main.kok-modern-main,
  .kok-info-hub,
  .kok-compact-hub,
  .kok-business-network { width: calc(100% - 12px) !important; }
  html body #toppanel > .kok-v2-header {
    grid-template-columns: minmax(108px,1fr) minmax(138px,170px) !important;
    padding-right: 7px !important;
    padding-left: 7px !important;
  }
  html body #toppanel .kok-v2-nav { width: calc(100% + 14px) !important; margin-left: -7px !important; padding-right: 7px !important; padding-left: 7px !important; }
  html body #toppanel .kok-v2-account-copy { padding: 0 4px !important; }
  html body #toppanel .kok-v2-account-label { display: none !important; }
  html body #toppanel .kok-v2-account-name { font-size: 9px !important; }
  .kok-theme-switch { display: none !important; }

  .kok-business-network { padding: 9px !important; }
  .kok-business-links { gap: 8px !important; }
  .kok-business-link { min-width: 166px !important; }
  .kok-feature-row .kok-feature-card { width: 92% !important; min-width: 92% !important; }
  .kok-feature-visual { display: none !important; }
  .kok-action-links { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }

  .kok-search-total { min-width: 60px !important; padding: 7px !important; }
  .kok-search-hero-icon { display: none !important; }
  .kok-search-title { font-size: 15px !important; line-height: 21px !important; }
  .kok-search-subtitle { display: none !important; }

  .kok-qpay-head { padding: 15px 46px 13px 12px !important; }
  .kok-qpay-steps { overflow-x: auto !important; }
  .kok-qpay-banks-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .kok-qpay-qr-frame img { width: min(205px,68vw) !important; }

  #images #zurag { grid-template-columns: 1fr !important; }
  #images #zurag > a img { height: auto !important; max-height: 220px !important; }

  #kok-publisher-dashboard .kpd-metrics,
  #kok-wallet-dashboard .kwd-metrics { grid-template-columns: 1fr 1fr !important; }
  #kok-publisher-dashboard .kpd-table,
  #kok-wallet-dashboard .kwd-table { min-width: 620px !important; }

  .kok-footer-main { grid-template-columns: 1fr !important; gap: 0 !important; padding: 23px 18px !important; }
  .kok-footer-brand,.kok-footer-column { min-height: 0 !important; padding-right: 0 !important; padding-left: 0 !important; border-left: 0 !important; }
  .kok-footer-column { margin-top: 19px !important; padding-top: 19px !important; border-top: 1px solid rgba(255,255,255,.16) !important; }
  .kok-footer-bottom { grid-template-columns: 1fr !important; gap: 9px !important; padding: 14px 18px !important; }
  .kok-footer-legal { justify-content: flex-start !important; flex-wrap: wrap !important; }
}

@media screen and (max-width: 380px) {
  html body #toppanel > .kok-v2-header { grid-template-columns: minmax(98px,1fr) 138px !important; }
  html body #toppanel .kok-v2-brand-title { font-size: 16px !important; }
  html body #toppanel .kok-v2-brand-note { display: none !important; }
  html body #toppanel .kok-v2-account-avatar { flex-basis: 27px !important; width: 27px !important; height: 27px !important; }
  html body #toppanel .kok-v2-account-arrow { display: none !important; }

  body.kok-inner-page .kok-compact-hub { grid-template-columns: 38px minmax(0,1fr) !important; }
  .kok-compact-toggle { display: none !important; }
  .kok-compact-action-primary { grid-column: 2 !important; padding: 0 8px !important; font-size: 9px !important; }
  .kok-compact-search button { padding: 0 11px !important; }

  .kok-latest-list { grid-template-columns: 50px minmax(0,1fr) !important; gap: 8px !important; padding: 8px !important; }
  .kok-latest-media { width: 48px !important; height: 48px !important; }
  .kok-latest-note { display: none !important; }
  .kok-search-card { grid-template-columns: 50px minmax(0,1fr) !important; }
  .kok-search-media { width: 50px !important; height: 50px !important; }
  .kok-search-action { grid-template-columns: 1fr 108px !important; }

  #kok-publisher-dashboard .kpd-metrics,
  #kok-wallet-dashboard .kwd-metrics { grid-template-columns: 1fr !important; }
  #kok-register-page .kr-benefits { grid-template-columns: 1fr !important; }
  #kok-publisher-public .kpv-person-info { display: block !important; max-width: none !important; margin-top: 10px !important; }
  #kok-publisher-public .kpv-stats { grid-template-columns: 1fr !important; }
  #kok-publisher-public .kpv-file-action { grid-template-columns: 1fr 1fr !important; }
  #kok-publisher-public .kpv-file-action .kpv-btn { grid-column: 1 / -1 !important; }
}

@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; }
}

/* ===== KL-010 additive mobile header / search / overflow hardening ===== */
@media screen and (max-width: 900px) {
  /* Explicitly kill known topform overflow source */
  .kok-compact-hub {
    overflow-x: hidden !important;
    width: calc(100% - 20px) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .kok-compact-search {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
  }
  .kok-compact-search input[type="text"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    font-size: 16px !important; /* iOS zoom prevention */
  }
  .kok-compact-search button {
    flex: 0 0 auto !important;
    min-height: 44px !important;
    min-width: 72px !important;
    padding: 0 14px !important;
  }
  .kok-compact-home {
    min-width: 40px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .kok-compact-action-primary {
    min-height: 44px !important;
    align-items: center !important;
  }

  /* Compact header: brand + auth; nav scroll without page overflow */
  html body #toppanel > .kok-v2-header {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  html body #toppanel .kok-v2-brand-title {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
  }
  html body #toppanel .kok-v2-brand-note {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    max-width: 100% !important;
  }
  html body #toppanel .kok-v2-account-open,
  html body #toppanel .kok-v2-account-close {
    min-height: 44px !important;
    box-sizing: border-box !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link {
    min-height: 40px !important;
    max-width: 85vw !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link > span {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Containers: prevent horizontal page scroll */
  #toppanel,
  #panel,
  .kok-content-layout,
  .kok-content-primary,
  .kok-content-sidebar,
  .kok-sidebar-categories {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .kok-sidebar-name {
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
  }
}

@media screen and (max-width: 600px) {
  .kok-compact-hub {
    width: calc(100% - 12px) !important;
    overflow-x: hidden !important;
  }
  /* Search first: full-width row, then actions */
  body.kok-inner-page .kok-compact-hub,
  .kok-compact-hub {
    display: grid !important;
    grid-template-columns: 44px minmax(0,1fr) auto !important;
    grid-template-areas:
      "home primary more"
      "search search search" !important;
    gap: 8px !important;
    padding: 8px !important;
  }
  .kok-compact-home { grid-area: home !important; }
  .kok-compact-action-primary { grid-area: primary !important; }
  .kok-compact-toggle { grid-area: more !important; }
  .kok-compact-search {
    grid-area: search !important;
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    order: 0 !important;
  }
}

@media screen and (max-width: 380px) {
  .kok-compact-hub {
    grid-template-columns: 40px minmax(0,1fr) !important;
    grid-template-areas:
      "home primary"
      "search search" !important;
  }
  .kok-compact-toggle { display: none !important; }
}

/* ===== KL-010D RECOVERY — must load AFTER topform.php inline CSS =====
 * Root cause: topform sets html body #toppanel > .kok-v2-header {
 *   min-width: 1100px !important; } outside any media query, AFTER the
 * head-linked mobile sheet. That expands the mobile layout viewport so
 * max-width:900px queries never match → scaled desktop UI.
 * Fix: equal/higher specificity + late load; kill 1100px; force stack.
 */

@media screen and (max-width: 900px) {
  /* Kill layout-viewport expansion */
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    white-space: normal !important;
    overflow: visible !important;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) minmax(140px,170px) !important;
    grid-template-areas:
      "brand account"
      "nav nav" !important;
    grid-template-rows: auto auto !important;
    gap: 6px 8px !important;
    padding: 8px 10px !important;
  }
  html body #toppanel > .headerMenu,
  html body #toppanel .headerMenu {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 6px 10px !important;
    white-space: normal !important;
    flex-wrap: wrap !important;
  }
  #panel .content.clearfix {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 12px 10px !important;
  }
  #panel .kok-auth-grid {
    grid-template-columns: 1fr !important;
  }

  html, body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  #container,
  #main,
  #main.kok-modern-main {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box !important;
  }

  /* Single column: categories near top of content */
  .kok-content-layout {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .kok-content-sidebar {
    order: -1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .kok-content-primary,
  #mainleft.kok-content-primary,
  #mainleft {
    order: 1 !important;
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .kok-content-sidebar > #mainright,
  #mainright {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Header readability / touch */
  html body #toppanel .kok-v2-brand {
    grid-area: brand !important;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    align-items: flex-start !important;
  }
  html body #toppanel .kok-v2-brand-title {
    font-size: 22px !important;
    line-height: 26px !important;
    white-space: nowrap !important;
  }
  html body #toppanel .kok-v2-brand-note {
    font-size: 11px !important;
    line-height: 14px !important;
  }
  html body #toppanel .kok-v2-account.tab {
    grid-area: account !important;
    max-width: 170px !important;
  }
  html body #toppanel .kok-v2-account-open,
  html body #toppanel .kok-v2-account-close {
    min-height: 44px !important;
    font-size: 12px !important;
  }
  html body #toppanel .kok-v2-nav {
    grid-area: nav !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    height: auto !important;
    min-height: 44px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link {
    min-height: 40px !important;
    font-size: 12px !important;
    padding: 0 12px !important;
  }

  /* Search full width + readable */
  .kok-compact-hub,
  body.kok-inner-page .kok-compact-hub {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: hidden !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0,1fr) auto !important;
    grid-template-areas:
      "home primary more"
      "search search search" !important;
    gap: 8px !important;
    padding: 10px !important;
    box-sizing: border-box !important;
  }
  .kok-compact-search {
    grid-area: search !important;
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
  }
  .kok-compact-search input[type="text"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    min-height: 44px !important;
    font-size: 16px !important;
  }
  .kok-compact-search button {
    min-height: 44px !important;
    min-width: 72px !important;
    font-size: 14px !important;
  }
  .kok-compact-home,
  .kok-compact-action-primary {
    min-height: 44px !important;
  }

  /* Banners: single column responsive */
  .kok-home-banner-grid {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    height: auto !important;
    min-height: 0 !important;
    gap: 8px !important;
  }
  .kok-banner-slider,
  .kok-banner-stage,
  .kok-home-product-banner {
    height: auto !important;
    min-height: 140px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .kok-banner-slide img,
  .kok-banner-slider img {
    width: 100% !important;
    height: auto !important;
    max-height: 200px !important;
    object-fit: cover !important;
  }
  .kok-home-product-banner {
    grid-template-columns: minmax(0,1fr) !important;
  }

  /* Product list readability */
  .kok-latest-list {
    grid-template-columns: 64px minmax(0,1fr) !important;
    min-height: 0 !important;
    padding: 12px !important;
    gap: 12px !important;
  }
  .kok-latest-list > .kok-latest-body > .kok-latest-title {
    font-size: 15px !important;
    line-height: 20px !important;
    max-height: none !important;
    height: auto !important;
    -webkit-line-clamp: 3;
  }
  .kok-latest-download {
    min-height: 40px !important;
    font-size: 13px !important;
  }
  .kok-search-card {
    grid-template-columns: 64px minmax(0,1fr) !important;
  }
  .kok-search-title,
  .kok-file-title {
    font-size: 17px !important;
    line-height: 22px !important;
  }

  /* Sidebar accordion touch */
  .kok-sidebar-section summary {
    min-height: 48px !important;
    font-size: 14px !important;
  }
  .kok-sidebar-link {
    min-height: 44px !important;
    font-size: 13px !important;
  }
}

@media screen and (max-width: 768px) {
  .kok-feature-row {
    display: flex !important;
    overflow-x: auto !important;
  }
  .kok-home-category-zone .kok-category-showcase {
    grid-template-columns: 1fr !important;
  }
}

@media screen and (max-width: 430px) {
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    grid-template-columns: minmax(0,1fr) minmax(120px,150px) !important;
  }
  .kok-compact-hub,
  body.kok-inner-page .kok-compact-hub {
    grid-template-columns: 44px minmax(0,1fr) !important;
    grid-template-areas:
      "home primary"
      "search search" !important;
  }
  .kok-compact-toggle { display: none !important; }
}

@media screen and (max-width: 360px) {
  html body #toppanel .kok-v2-brand-title { font-size: 18px !important; }
  html body #toppanel .kok-v2-brand-note { display: none !important; }
}

/* ===== SECTION: header polish refinements (was v2.2 ownership; supersedes conflicting v2.1 header rows) ===== */
/* KOK.mn Mobile UI Polish v2.2 — KL-010G-R2 staging
 * Load AFTER kok-mobile-v2.1.css (after topform.php).
 * Preserves v2.1 cascade fix; refines header, search-first order, categories.
 * Desktop outside these media queries is unchanged.
 */

@media screen and (max-width: 900px) {

  /* ===== Compact shared header ===== */
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    min-height: 0 !important;
    height: auto !important;
    grid-template-columns: minmax(0,1fr) minmax(132px,168px) !important;
    grid-template-rows: auto auto !important;
    grid-template-areas:
      "brand account"
      "nav nav" !important;
    gap: 4px 8px !important;
    padding: 6px 8px 4px !important;
    align-items: center !important;
  }

  html body #toppanel .kok-v2-brand {
    height: auto !important;
    min-height: 36px !important;
    justify-content: center !important;
  }
  html body #toppanel .kok-v2-brand-title {
    font-size: 18px !important;
    line-height: 22px !important;
  }
  html body #toppanel .kok-v2-brand-note {
    font-size: 10px !important;
    line-height: 12px !important;
  }

  /* Login text clipping: topform uses fixed 40px + overflow:hidden */
  html body #toppanel .kok-v2-account.tab,
  html body #toppanel .kok-v2-account.tab > ul.login,
  html body #toppanel .kok-v2-account.tab > ul.login > li#toggle {
    width: 100% !important;
    max-width: 168px !important;
    height: auto !important;
    min-height: 40px !important;
    overflow: visible !important;
  }
  /* KL-010Q-I-R1: generic display:flex — do NOT put display on ultra-specific #open
     selector (it defeated hidden rules at 1292–1298 / mutual exclusion). */
  html body #toppanel .kok-v2-account-open,
  html body #toppanel .kok-v2-account-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    height: auto !important;
    min-height: 40px !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    line-height: 1.25 !important;
    font-size: 11px !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
  /* High-specificity layout only (no display) so .kok-v3-ctrl-hidden / style=none win */
  html body #toppanel > .kok-v2-header > .kok-v2-account.tab > ul.login > li#toggle > a#open.kok-v2-account-open {
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    height: auto !important;
    min-height: 40px !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    line-height: 1.25 !important;
    font-size: 11px !important;
    padding: 6px 8px !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
  html body #toppanel .kok-v2-account-open > span,
  html body #toppanel .kok-v2-account-close > span,
  html body #toppanel .kok-v2-close-content {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: 100% !important;
  }
  html body #toppanel .kok-v2-account-copy {
    min-width: 0 !important;
    overflow: visible !important;
  }
  html body #toppanel .kok-v2-account-name {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  /* Navigation: wrap labels instead of clipping off-screen */
  html body #toppanel .kok-v2-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin-left: 0 !important;
    padding: 2px 0 4px !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    white-space: normal !important;
    scroll-snap-type: none !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 36px !important;
    padding: 6px 10px !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link > span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  /* ===== Compact hub: one upload + full-width search ===== */
  .kok-compact-hub,
  body.kok-inner-page .kok-compact-hub,
  body.kok-home-page .kok-compact-hub {
    display: grid !important;
    grid-template-columns: 40px minmax(0,1fr) !important;
    grid-template-areas:
      "home primary"
      "search search" !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .kok-compact-home { grid-area: home !important; min-height: 40px !important; }
  .kok-compact-action-primary {
    grid-area: primary !important;
    min-height: 40px !important;
    font-size: 12px !important;
  }
  /* Keep one upload CTA; hide secondary hub actions (still in DOM/routes) */
  .kok-compact-action:not(.kok-compact-action-primary),
  .kok-compact-toggle {
    display: none !important;
  }
  .kok-compact-search {
    grid-area: search !important;
    grid-column: 1 / -1 !important;
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .kok-compact-search input[type="text"] {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    min-height: 40px !important;
    height: 40px !important;
    font-size: 16px !important;
    padding: 0 8px !important;
    text-overflow: ellipsis !important;
  }
  .kok-compact-search button {
    flex: 0 0 auto !important;
    min-width: 64px !important;
    min-height: 40px !important;
    height: 40px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
  }

  /* ===== Search-first / content-first reading order =====
   * v2.1 set sidebar order:-1 (categories above results).
   * On mobile, show primary content first; categories remain below, compact.
   */
  .kok-content-layout {
    display: grid !important;
    grid-template-columns: minmax(0,1fr) !important;
    gap: 10px !important;
  }
  .kok-content-primary,
  #mainleft.kok-content-primary,
  #mainleft {
    order: 1 !important;
  }
  .kok-content-sidebar {
    order: 2 !important;
  }
  body.kok-inner-page .kok-content-primary,
  body.kok-home-page .kok-content-primary {
    order: 1 !important;
  }
  body.kok-inner-page .kok-content-sidebar,
  body.kok-home-page .kok-content-sidebar {
    order: 2 !important;
  }

  /* ===== Compact category panel ===== */
  .kok-sidebar-categories {
    margin: 4px 0 8px !important;
    border-radius: 10px !important;
  }
  .kok-sidebar-header {
    min-height: 40px !important;
    padding: 6px 8px !important;
    gap: 6px !important;
  }
  .kok-sidebar-header h2 {
    font-size: 12px !important;
    line-height: 16px !important;
  }
  .kok-sidebar-nav {
    padding: 2px 4px 4px !important;
  }
  .kok-sidebar-section {
    margin: 0 !important;
  }
  .kok-sidebar-section summary {
    min-height: 44px !important;
    padding: 4px 6px !important;
    font-size: 13px !important;
    line-height: 16px !important;
    gap: 6px !important;
  }
  .kok-sidebar-summary-main {
    grid-template-columns: 24px minmax(0,1fr) !important;
    gap: 6px !important;
  }
  .kok-sidebar-section-icon {
    width: 24px !important;
    height: 24px !important;
  }
  .kok-sidebar-list {
    padding: 0 0 2px !important;
  }
  .kok-sidebar-link {
    min-height: 44px !important;
    margin: 0 !important;
    padding: 4px 6px !important;
    gap: 6px !important;
    font-size: 12px !important;
    line-height: 15px !important;
    grid-template-columns: 20px minmax(0,1fr) auto !important;
  }
  .kok-sidebar-name {
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    -webkit-line-clamp: unset !important;
    display: block !important;
  }
  .kok-sidebar-count {
    min-width: 28px !important;
    height: 20px !important;
    font-size: 10px !important;
    justify-self: end !important;
  }
  /* Soften non-category sidebar bulk on mobile */
  .kok-sidebar-promo,
  .kok-sidebar-panel {
    margin-bottom: 8px !important;
  }

  /* ===== Banner / info widgets (scoped compact) ===== */
  .kok-home-banner-grid {
    height: auto !important;
    min-height: 0 !important;
    margin-bottom: 6px !important;
    gap: 6px !important;
  }
  .kok-banner-slider,
  .kok-home-product-banner {
    min-height: 120px !important;
  }
  .kok-utility-item {
    min-width: 150px !important;
    height: 48px !important;
  }
  .kok-feature-row .kok-feature-card {
    height: auto !important;
    min-height: 120px !important;
    padding: 10px 12px !important;
  }
  .kok-header-clearance {
    height: 4px !important;
  }

  /* ===== Fixed bottom marquee (home only) — leave flow, avoid overlap ===== */
  body.kok-home-page #main.kok-modern-main > div[style*="position: fixed"],
  body.kok-home-page #main.kok-modern-main > div[style*="bottom: 0"] {
    position: static !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    z-index: auto !important;
    width: 100% !important;
    margin: 0 0 8px !important;
    box-sizing: border-box !important;
    font-size: 12px !important;
    padding: 6px 8px !important;
  }
  body.kok-home-page #main.kok-modern-main > div[style*="bottom: 0"] h4,
  body.kok-home-page #main.kok-modern-main > div[style*="bottom: 0"] strong {
    font-size: 12px !important;
    line-height: 1.35 !important;
  }
}

@media screen and (max-width: 430px) {
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    grid-template-columns: minmax(0,1fr) minmax(120px,148px) !important;
  }
  html body #toppanel .kok-v2-brand-title {
    font-size: 16px !important;
  }
  html body #toppanel .kok-v2-account-open,
  html body #toppanel .kok-v2-account-close {
    font-size: 10px !important;
    padding: 5px 6px !important;
  }
  .kok-compact-search button {
    min-width: 56px !important;
    padding: 0 8px !important;
  }
}

@media screen and (min-width: 901px) {
  /* Intentionally empty — desktop remains on existing styles */
}

/* ===== SECTION: progressive header/nav/cats (was v3.0; authoritative for ready-classes) ===== */

@media screen and (max-width: 900px) {

  /* ===== Account open/close: beat v2.2 dual-flex without waiting for JS ===== */
  html body #toppanel a#open.kok-v2-account-open.kok-v3-ctrl-hidden,
  html body #toppanel a#close.kok-v2-account-close.kok-v3-ctrl-hidden,
  html body #toppanel a#open.kok-v2-account-open[style*="display:none"],
  html body #toppanel a#open.kok-v2-account-open[style*="display: none"],
  html body #toppanel a#close.kok-v2-account-close[style*="display:none"],
  html body #toppanel a#close.kok-v2-account-close[style*="display: none"] {
    display: none !important;
  }
  html body #toppanel a#open.kok-v2-account-open.kok-v3-ctrl-visible,
  html body #toppanel a#close.kok-v2-account-close.kok-v3-ctrl-visible {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
    height: auto !important;
    min-height: 40px !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    font-size: 11px !important;
    line-height: 1.25 !important;
    padding: 6px 8px !important;
  }

  /* ===== Compact chrome (safe without JS) ===== */
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    grid-template-columns: minmax(0,1fr) auto auto !important;
    grid-template-areas:
      "brand account navtoggle"
      "nav nav nav" !important;
    grid-template-rows: auto auto !important;
    gap: 4px 6px !important;
    padding: 6px 8px !important;
    min-height: 0 !important;
    height: auto !important;
    align-items: center !important;
  }
  html body #toppanel .kok-v2-brand {
    grid-area: brand !important;
    min-height: 40px !important;
  }
  html body #toppanel .kok-v2-account.tab {
    grid-area: account !important;
    max-width: 150px !important;
  }
  html body #toppanel .kok-v2-brand-title {
    font-size: 16px !important;
    line-height: 20px !important;
  }
  html body #toppanel .kok-v2-brand-note {
    display: none !important;
  }
  html body #toppanel .kok-theme-switch {
    position: static !important;
    grid-column: 1 / -1 !important;
    justify-self: end !important;
    width: auto !important;
    min-height: 28px !important;
    height: 28px !important;
    font-size: 9px !important;
    margin: 0 !important;
  }

  /* Hub denser layout (search + upload always usable) */
  .kok-compact-hub,
  body.kok-inner-page .kok-compact-hub,
  body.kok-home-page .kok-compact-hub {
    display: grid !important;
    grid-template-columns: 40px minmax(0,1fr) auto !important;
    grid-template-areas:
      "home primary cattoggle"
      "search search search" !important;
    gap: 6px !important;
    padding: 6px 8px !important;
  }
  .kok-compact-home { grid-area: home !important; }
  .kok-compact-action-primary {
    grid-area: primary !important;
    min-height: 40px !important;
  }
  .kok-compact-search { grid-area: search !important; }
  .kok-compact-action:not(.kok-compact-action-primary),
  .kok-compact-toggle {
    display: none !important;
  }

  /* Search-first reading order (v2.2; safe without JS) */
  body.kok-inner-page .kok-content-primary,
  body.kok-home-page .kok-content-primary {
    order: 1 !important;
  }
  body.kok-inner-page .kok-content-sidebar,
  body.kok-home-page .kok-content-sidebar {
    order: 2 !important;
  }

  .kok-utility-item {
    min-width: 140px !important;
    height: 44px !important;
    padding: 4px 8px !important;
  }
  .kok-business-network {
    padding: 8px !important;
    margin-top: 8px !important;
  }
  .kok-business-link { min-width: 140px !important; }
  .kok-utility-bar,
  .kok-business-links,
  .kok-feature-row {
    scrollbar-width: thin;
  }
  .kok-feature-row .kok-feature-card {
    min-width: 78% !important;
    width: 78% !important;
  }
  .kok-header-clearance { height: 2px !important; }

  /* ===== ENHANCED NAV (only after kok-v3-nav-ready) ===== */
  body.kok-v3-nav-ready .kok-mobile-nav-toggle:not([hidden]) {
    grid-area: navtoggle !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 1px solid rgba(255,255,255,.35) !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
    font-size: 16px !important;
    line-height: 1 !important;
    cursor: pointer !important;
  }
  body.kok-v3-nav-ready .kok-mobile-nav-toggle[aria-expanded="true"] {
    background: rgba(255,255,255,.22) !important;
  }
  body.kok-v3-nav-ready #toppanel .kok-v2-nav,
  body.kok-v3-nav-ready #toppanel #kok-mobile-primary-nav.kok-v2-nav {
    display: none !important;
  }
  body.kok-v3-nav-ready.kok-mobile-nav-open #toppanel .kok-v2-nav,
  body.kok-v3-nav-ready.kok-mobile-nav-open #toppanel #kok-mobile-primary-nav.kok-v2-nav {
    display: flex !important;
    flex-wrap: wrap !important;
    grid-area: nav !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    white-space: normal !important;
    gap: 4px !important;
    padding: 4px 0 2px !important;
  }
  body.kok-v3-nav-ready.kok-mobile-nav-open #toppanel .kok-v2-nav > a.kok-v2-nav-link {
    height: auto !important;
    min-height: 36px !important;
    white-space: normal !important;
    font-size: 11px !important;
  }
  /* One primary upload only when nav enhancement active */
  body.kok-v3-nav-ready #toppanel .kok-v2-nav-link.kok-v2-nav-primary {
    display: none !important;
  }

  /* ===== ENHANCED CATEGORIES (only after kok-v3-cats-ready) =====
   * Fallback (no ready): categories remain in sidebar — accessible.
   * Ready: hide in-flow; open as non-modal disclosure panel near top.
   */
  body.kok-v3-cats-ready .kok-mobile-cat-toggle:not([hidden]) {
    grid-area: cattoggle !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 72px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 1px solid #c5dce8 !important;
    border-radius: 8px !important;
    background: #f3f9fc !important;
    color: #17678f !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
  }
  body.kok-v3-cats-ready .kok-mobile-cat-toggle[aria-expanded="true"] {
    border-color: #0798d6 !important;
    background: #e7f6fd !important;
  }
  body.kok-v3-cats-ready:not(.kok-mobile-cats-open) #kok-sidebar-categories.kok-sidebar-categories,
  body.kok-v3-cats-ready:not(.kok-mobile-cats-open) .kok-sidebar-categories {
    display: none !important;
  }
  body.kok-v3-cats-ready.kok-mobile-cats-open #kok-sidebar-categories.kok-sidebar-categories,
  body.kok-v3-cats-ready.kok-mobile-cats-open .kok-sidebar-categories {
    display: block !important;
    position: fixed !important;
    left: 8px !important;
    right: 8px !important;
    top: 56px !important;
    z-index: 2400 !important;
    width: auto !important;
    max-width: none !important;
    max-height: 70vh !important;
    margin: 0 !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch;
    box-shadow: 0 10px 28px rgba(20, 50, 70, .28) !important;
    outline: 2px solid #0798d6 !important;
    outline-offset: 0 !important;
  }
  /* KL-010Q-I: backdrop only while drawer open (was cats-ready alone → click steal) */
  body.kok-v3-cats-ready.kok-mobile-cats-open #kok-mobile-cat-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 2300 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: rgba(12, 28, 40, .35) !important;
    cursor: pointer !important;
  }
}

@media screen and (min-width: 901px) {
  .kok-mobile-nav-toggle,
  .kok-mobile-cat-toggle,
  #kok-mobile-cat-backdrop {
    display: none !important;
  }
}

/* ===== SECTION: product cards (was v3.0-cards) ===== */
/* KOK.mn Mobile UX v3.0 — KL-010J-R2 Patch B (SEPARATE / OPTIONAL)
 * Compact product cards. Load AFTER kok-mobile-v3.0.css when authorized.
 * Content-driven height; no fabricated prices; no query changes.
 */

@media screen and (max-width: 900px) {
  .kok-latest-list {
    min-height: 0 !important;
    height: auto !important;
    grid-template-columns: 48px minmax(0,1fr) 52px !important;
    gap: 8px !important;
    padding: 8px !important;
    align-items: center !important;
  }
  .kok-latest-media {
    width: 44px !important;
    height: 44px !important;
    border-radius: 7px !important;
  }
  .kok-latest-list > .kok-latest-body {
    gap: 2px !important;
    justify-content: center !important;
  }
  .kok-latest-list > .kok-latest-body > .kok-latest-title {
    height: auto !important;
    max-height: 34px !important;
    font-size: 12px !important;
    line-height: 16px !important;
    white-space: normal !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .kok-latest-list > .kok-latest-body > .kok-latest-specs {
    height: auto !important;
    min-height: 16px !important;
    gap: 6px !important;
  }
  .kok-latest-format {
    font-size: 9px !important;
  }
  .kok-latest-note {
    max-width: 55% !important;
    font-size: 9px !important;
  }
  .kok-latest-list > .kok-latest-body > .kok-latest-links {
    height: auto !important;
    min-height: 14px !important;
  }
  .kok-latest-tag {
    font-size: 8px !important;
    line-height: 14px !important;
    max-width: 48% !important;
  }
  .kok-latest-action {
    min-height: 0 !important;
    height: auto !important;
    gap: 4px !important;
    justify-content: center !important;
  }
  .kok-latest-views {
    font-size: 8px !important;
  }
  .kok-latest-views strong {
    font-size: 11px !important;
    line-height: 12px !important;
  }
  .kok-latest-download {
    min-width: 48px !important;
    height: 24px !important;
    font-size: 9px !important;
  }
}

@media screen and (max-width: 360px) {
  .kok-latest-list {
    grid-template-columns: 42px minmax(0,1fr) 48px !important;
    padding: 7px !important;
    gap: 6px !important;
  }
  .kok-latest-media {
    width: 40px !important;
    height: 40px !important;
  }
}

/* ===== SECTION: product detail (was v3.0-product) ===== */
/* KOK.mn Mobile Product Detail — KL-010K Patch C
 * Load from single.php (product route only). Compatible with R4 shared header.
 * Does not restyle global nav/upload. Desktop ≥901 mostly preserves existing card.
 */

/* Help: compact disclosure (all viewports; denser on mobile) */
.kok-help-disclosure.kok-help-bar {
  display: block;
  padding: 0;
  margin: 0 0 10px;
  overflow: hidden;
}
.kok-help-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  list-style: none;
}
.kok-help-disclosure > summary::-webkit-details-marker { display: none; }
.kok-help-summary-hint {
  color: #6a8293;
  font-size: 11px;
  font-weight: 500;
}
.kok-help-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  padding: 0 14px 12px;
}

.kok-file-breadcrumb {
  margin: 0 0 6px;
  font-size: 12px;
  line-height: 1.3;
}
.kok-file-breadcrumb a {
  color: #087ec1;
  text-decoration: none;
  font-weight: 600;
}

.kok-free-download {
  text-decoration: none !important;
  box-sizing: border-box;
}

/* Alt payments disclosure */
.kok-payment-disclosure {
  border: 1px solid #d8e6ee;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.kok-payment-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}
.kok-payment-summary::-webkit-details-marker { display: none; }
.kok-payment-summary em {
  display: block;
  margin-top: 2px;
  color: #738691;
  font-size: 11px;
  font-style: normal;
}
.kok-alt-payments .kok-section-head { display: none; }

.kok-description-body {
  font-size: 14px;
  line-height: 1.55;
  color: #243746;
  overflow-wrap: anywhere;
}

@media screen and (max-width: 900px) {
  .kok-help-disclosure.kok-help-bar {
    margin: 0 8px 8px;
  }

  .kok-file-card.kok-product-detail {
    width: calc(100% - 16px) !important;
    margin: 8px !important;
    border-radius: 12px !important;
  }
  .kok-file-card.kok-product-detail .kok-file-head {
    display: block !important;
    padding: 12px 14px !important;
  }
  .kok-file-card.kok-product-detail .kok-file-title {
    font-size: 18px !important;
    line-height: 1.3 !important;
    max-width: 100% !important;
  }
  .kok-file-card.kok-product-detail .kok-file-share {
    margin-top: 8px;
  }

  .kok-file-card.kok-product-detail .kok-file-main {
    display: grid !important;
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 12px !important;
    align-items: start !important;
  }
  .kok-file-card.kok-product-detail .kok-file-preview {
    min-height: 0 !important;
    width: 96px !important;
    margin: 0 !important;
  }
  .kok-file-card.kok-product-detail .kok-file-preview img {
    width: 100% !important;
    height: auto !important;
    max-height: 120px !important;
    object-fit: contain !important;
    display: block !important;
  }

  .kok-file-card.kok-product-detail .kok-file-badges {
    gap: 6px !important;
    margin-bottom: 8px !important;
  }
  .kok-file-card.kok-product-detail .kok-file-badge {
    font-size: 10px !important;
    padding: 3px 7px !important;
  }

  .kok-file-card.kok-product-detail .kok-price-box {
    padding: 10px 12px !important;
    margin: 0 0 10px !important;
  }
  .kok-file-card.kok-product-detail .kok-price {
    font-size: 24px !important;
    line-height: 1.15 !important;
  }
  .kok-file-card.kok-product-detail .kok-qpay-button,
  .kok-file-card.kok-product-detail .kok-free-download {
    display: flex !important;
    width: 100% !important;
    min-height: 44px !important;
    height: auto !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    padding: 10px 12px !important;
    white-space: normal !important;
    text-align: center !important;
    font-size: 14px !important;
    line-height: 1.25 !important;
    box-sizing: border-box !important;
  }
  .kok-file-card.kok-product-detail .kok-qpay-text {
    white-space: normal !important;
  }
  .kok-file-card.kok-product-detail .kok-secure-note {
    margin: 8px 0 0 !important;
    font-size: 11px !important;
    line-height: 1.4 !important;
  }

  .kok-file-card.kok-product-detail .kok-meta-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .kok-file-card.kok-product-detail .kok-meta-item {
    min-height: 0 !important;
    padding: 7px 9px !important;
  }
  .kok-file-card.kok-product-detail .kok-meta-label {
    font-size: 9px !important;
  }
  .kok-file-card.kok-product-detail .kok-meta-value {
    font-size: 12px !important;
    margin-top: 2px !important;
  }

  /* Gallery */
  .kok-gallery {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .kok-gallery-link {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .kok-gallery-link img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
  }

  .kok-content-section {
    margin: 8px !important;
    border-radius: 12px !important;
  }
  .kok-section-head {
    padding: 10px 12px !important;
  }
  .kok-section-head h2 {
    font-size: 15px !important;
  }
  .kok-section-body {
    padding: 10px 12px !important;
  }

  .kok-payment-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .kok-payment-card {
    padding: 10px !important;
    min-height: 0 !important;
  }
  .kok-payment-card h3 {
    font-size: 13px !important;
    margin: 6px 0 4px !important;
  }
  .kok-payment-card p {
    font-size: 11px !important;
    min-height: 0 !important;
    margin: 0 0 8px !important;
  }
  .kok-payment-button {
    width: 100% !important;
    min-height: 40px !important;
  }
  .kok-payment-logo {
    width: 48px !important;
    height: 48px !important;
  }
  .kok-payment-logo img {
    max-width: 100% !important;
    max-height: 100% !important;
  }

  /* Primary commerce before long secondary blocks */
  .kok-detail-sections {
    margin: 0 0 12px !important;
  }
}

@media screen and (max-width: 380px) {
  .kok-file-card.kok-product-detail .kok-file-main {
    grid-template-columns: 1fr !important;
  }
  .kok-file-card.kok-product-detail .kok-file-preview {
    width: 100% !important;
    max-width: 160px !important;
  }
  .kok-file-card.kok-product-detail .kok-meta-grid {
    grid-template-columns: 1fr !important;
  }
  .kok-gallery {
    grid-template-columns: 1fr !important;
  }
}

/* Sticky purchase bar — NOT IMPLEMENTED (proposal only; see KL-010K report) */

/* ===== SECTION: sales + QPay presentation (was v3.1-sales) ===== */
/* KOK.mn Mobile Sales UX — KL-010N
 * Load AFTER v2.1, v2.2, v3.0, v3.0-cards, and (on product) v3.0-product.
 * Preserves production brand blues (not KL-010M orange proposal).
 * Mobile-scoped; desktop >=901px mostly untouched.
 */


/* ===== Release A: denser header chrome ===== */
@media screen and (max-width: 900px) {
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    min-height: 56px !important;
    padding: 8px 12px !important;
    gap: 8px 8px !important;
    background: var(--kok-rc-surface) !important;
    border-bottom: 1px solid var(--kok-rc-border) !important;
  }

  html body #toppanel .kok-v2-brand-title {
    color: var(--kok-rc-text) !important;
    font-weight: 800 !important;
  }

  /* One primary upload in hub; hide nav duplicate upload on mobile (JS not required) */
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-primary {
    display: none !important;
  }

  .kok-compact-action-primary,
  .kok-compact-home,
  .kok-mobile-nav-toggle,
  .kok-mobile-cat-toggle {
    min-height: var(--kok-rc-btn) !important;
    border-radius: 8px !important;
  }

  .kok-compact-action-primary {
    background: var(--kok-rc-primary) !important;
    border-color: var(--kok-rc-primary) !important;
    color: #fff !important;
    font-weight: 700 !important;
    box-shadow: none !important;
  }

  .kok-compact-search input[type="text"],
  .kok-compact-search input[type="search"] {
    min-height: 40px !important;
    border-radius: 8px !important;
    border-color: var(--kok-rc-border) !important;
  }

  /* Secondary help: already in expandable nav when ready */
  body.kok-v3-nav-ready #toppanel .kok-v2-nav {
    border-radius: 0 0 10px 10px !important;
    background: var(--kok-rc-surface) !important;
    border: 1px solid var(--kok-rc-border) !important;
    border-top: 0 !important;
  }

  /* ===== Release B: cards + search densify ===== */
  .kok-latest-list {
    min-height: 80px !important;
    max-height: none !important;
    border-radius: 0 !important;
    background: var(--kok-rc-surface) !important;
  }

  .kok-latest-download {
    background: #eef7fc !important;
    border-color: #c5e3f4 !important;
    color: var(--kok-rc-primary) !important;
    border-radius: 8px !important;
  }

  .kok-search-card {
    border-radius: 10px !important;
    border-color: var(--kok-rc-border) !important;
    box-shadow: none !important;
    min-height: 96px !important;
  }

  .kok-search-button {
    min-height: 32px !important;
    border-radius: 8px !important;
  }

  .kok-search-hero {
    border-radius: 10px !important;
    background: var(--kok-rc-surface) !important;
    box-shadow: none !important;
  }

  /* ===== Secondary / footer: after primary, compact ===== */
  body.kok-home-page .kok-content-sidebar,
  body.kok-inner-page .kok-content-sidebar {
    margin-top: 8px !important;
  }

  #mostpopular_full .kok-utility-item,
  .kok-utility-item {
    border-radius: 8px !important;
    min-height: 44px !important;
  }

  /* Reduce decorative chrome that competes with CTA */
  .kok-compact-hub {
    background: var(--kok-rc-surface) !important;
    border-bottom: 1px solid var(--kok-rc-border) !important;
    box-shadow: none !important;
  }
}

/* ===== Release C: product commerce polish ===== */
@media screen and (max-width: 900px) {
  .kok-file-card.kok-product-detail .kok-file-title {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 20px !important;
    line-height: 1.35 !important;
    color: var(--kok-rc-text) !important;
  }

  .kok-file-card.kok-product-detail .kok-price,
  .kok-file-card.kok-product-detail .kok-file-price,
  .kok-product-price {
    font-size: 22px !important;
    font-weight: 800 !important;
    color: var(--kok-rc-text) !important;
  }

  .kok-qpay-button,
  .kok-free-download {
    width: 100% !important;
    min-height: var(--kok-rc-btn) !important;
    border-radius: 10px !important;
    background: var(--kok-rc-primary) !important;
    box-shadow: none !important;
    filter: none !important;
  }

  .kok-qpay-entry {
    flex-direction: column !important;
    align-items: stretch !important;
    background: var(--kok-rc-surface) !important;
    border-radius: 10px !important;
    box-shadow: none !important;
  }

  .kok-description-body {
    color: var(--kok-rc-text) !important;
  }

  .kok-file-card.kok-product-detail .kok-file-media:empty,
  .kok-file-card.kok-product-detail .kok-thumb-empty {
    display: none !important;
  }
}

/* ===== Release D: QPay presentation only ===== */
@media screen and (max-width: 900px) {
  .kok-qpay-modal {
    padding: 12px !important;
  }

  .kok-qpay-dialog {
    border-radius: 12px !important;
    max-width: 100% !important;
    box-shadow: 0 12px 40px rgba(23, 56, 75, 0.22) !important;
  }

  .kok-qpay-head {
    background: var(--kok-rc-surface) !important;
    border-bottom: 1px solid var(--kok-rc-border) !important;
  }

  .kok-qpay-mark {
    background: var(--kok-rc-primary) !important;
    box-shadow: none !important;
  }

  .kok-qpay-banks-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .kok-qpay-bank {
    min-height: 72px !important;
    height: auto !important;
    padding: 10px 6px !important;
    border-radius: 10px !important;
    border: 1px solid var(--kok-rc-border) !important;
    background: var(--kok-rc-surface) !important;
    box-shadow: none !important;
    font-size: 10px !important;
    line-height: 1.2 !important;
    color: var(--kok-rc-text) !important;
  }

  .kok-qpay-bank img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain !important;
  }

  .kok-qpay-amount {
    border-radius: 10px !important;
    background: #f3f9fd !important;
  }

  .kok-qpay-amount strong {
    font-size: 20px !important;
    color: var(--kok-rc-text) !important;
  }

  .kok-qpay-close {
    width: 40px !important;
    height: 40px !important;
    border-radius: 10px !important;
  }

  .kok-download-btn {
    width: 100% !important;
    min-height: var(--kok-rc-btn) !important;
    background: var(--kok-rc-success) !important;
    box-shadow: none !important;
    border-radius: 10px !important;
  }
}

@media screen and (max-width: 360px) {
  .kok-qpay-banks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media screen and (min-width: 901px) {
  /* Sales layer does not restyle desktop chrome */
  .kok-qpay-banks-grid {
    /* keep desktop as product CSS defines */
  }
}

/* ===== SECTION: KL-010P source-conflict corrections (authoritative) ===== */
@media screen and (max-width: 900px) {
  /* Beat topform inline .kok-compact-search { min-width:430px } without needing v2.1 alone */
  .kok-compact-search,
  .kok-compact-hub .kok-compact-search {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Flex/grid children must shrink for Mongolian wrapping */
  .kok-latest-list > .kok-latest-body,
  .kok-file-card.kok-product-detail .kok-file-title,
  .kok-qpay-bank,
  .kok-footer-brand,
  .kok-footer-column {
    min-width: 0 !important;
  }
  /* Prefer soft wrap over clipping */
  .kok-file-card.kok-product-detail .kok-file-title,
  .kok-latest-title,
  .kok-qpay-bank {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
  /* Footer multi-column must collapse (index inline has 980/620; reinforce at 900) */
  .kok-footer-main {
    grid-template-columns: 1fr !important;
  }
  #footer .kok-footer-feature-row {
    grid-template-columns: 1fr !important;
  }
}

@media screen and (min-width: 901px) {
  .kok-mobile-nav-toggle,
  .kok-mobile-cat-toggle,
  #kok-mobile-cat-backdrop {
    display: none !important;
  }
}

/* ============================================================
 * KL-010P-R3 — FINAL RECOVERY corrections (same file, end wins)
 * Beats earlier sections inherited from v2.1/v2.2/sales merges.
 * ============================================================ */
@media screen and (max-width: 900px) {
  /* Header: denser first row */
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    min-height: 52px !important;
    padding: 6px 10px !important;
    gap: 6px !important;
  }
  html body #toppanel .kok-v2-brand-note { display: none !important; }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-primary { display: none !important; }

  .kok-compact-hub {
    gap: 6px !important;
    padding: 6px 8px !important;
  }
  .kok-compact-search,
  .kok-compact-hub .kok-compact-search {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Cards: remove oversized whitespace */
  .kok-latest-list {
    min-height: 80px !important;
    max-height: none !important;
    height: auto !important;
    padding: 8px !important;
    gap: 8px !important;
    grid-template-columns: 48px minmax(0,1fr) 56px !important;
    align-items: center !important;
  }
  .kok-latest-media { width: 44px !important; height: 44px !important; }
  .kok-latest-list > .kok-latest-body > .kok-latest-title {
    max-height: 36px !important;
    -webkit-line-clamp: 2 !important;
    white-space: normal !important;
  }
  .kok-latest-download {
    min-height: 28px !important;
    height: auto !important;
    padding: 4px 6px !important;
    font-size: 10px !important;
  }

  /* Product detail: compact summary, full-width CTA */
  .kok-file-card.kok-product-detail .kok-file-preview {
    min-height: 0 !important;
    height: auto !important;
  }
  .kok-file-card.kok-product-detail .kok-file-preview img {
    max-height: 120px !important;
  }
  .kok-file-card.kok-product-detail .kok-qpay-button,
  .kok-file-card.kok-product-detail .kok-free-download,
  .kok-qpay-button,
  .kok-free-download {
    width: 100% !important;
    min-height: 44px !important;
    display: flex !important;
  }

  /* QPay modal presentation — must beat earlier 2-col@360 from v2.1 section */
  .kok-qpay-close {
    width: 40px !important;
    height: 40px !important;
  }
  .kok-qpay-banks {
    max-height: 42vh !important;
    overflow: auto !important;
  }
  .kok-qpay-banks-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  .kok-qpay-bank {
    min-height: 64px !important;
    height: 64px !important;
    padding: 6px 4px !important;
    font-size: 9px !important;
    box-shadow: none !important;
  }
  .kok-qpay-bank img {
    width: 28px !important;
    height: 28px !important;
  }
  .kok-qpay-amount {
    margin: 0 0 8px !important;
  }
}

@media screen and (min-width: 420px) and (max-width: 900px) {
  .kok-qpay-banks-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media screen and (max-width: 359px) {
  .kok-qpay-banks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .kok-qpay-bank {
    min-height: 58px !important;
    height: 58px !important;
  }
}

/* ============================================================
 * KL-010Q-E — CRITICAL UX RECOVERY (staging only; not production)
 * Root causes confirmed from live Q-C screenshots + cascade audit:
 * 1) Sales section painted header surface white while nav stayed #f3fbff.
 * 2) single.php 31% !important grid beat mobile 1fr override (no !important).
 * 3) Cat toggle stayed [hidden]; cats-ready hid sidebar → no category entry.
 * 4) Bank cards lacked forced equal track children (intrinsic width leak).
 * ============================================================ */
@media screen and (max-width: 900px) {
  /* A. HEADER — restore brand blue + readable light nav (beat sales white surface) */
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    background: linear-gradient(90deg, #087fbd 0%, #079ce4 58%, #087fbd 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #ffffff !important;
    min-height: 0 !important;
    height: auto !important;
    padding: 6px 8px !important;
    gap: 4px 6px !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    grid-template-areas:
      "brand account navtoggle"
      "nav nav nav" !important;
    grid-template-rows: auto auto !important;
  }
  html body #toppanel .kok-v2-brand-title {
    color: #ffffff !important;
    font-size: 17px !important;
    line-height: 20px !important;
  }
  html body #toppanel .kok-v2-brand-note {
    display: none !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link {
    color: #f3fbff !important;
    border-color: rgba(255, 255, 255, 0.22) !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.14) !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-primary {
    display: none !important;
  }
  body.kok-v3-nav-ready .kok-mobile-nav-toggle:not([hidden]),
  body.kok-v3-nav-ready #kok-mobile-nav-toggle.kok-mobile-nav-toggle {
    display: inline-flex !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    background: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
  }
  body.kok-v3-nav-ready #toppanel .kok-v2-nav,
  body.kok-v3-nav-ready #toppanel #kok-mobile-primary-nav.kok-v2-nav {
    background: rgba(4, 70, 110, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-top: 0 !important;
  }

  /* Category entry always reachable on mobile (CSS reveals toggle; sidebar stays
     accessible when enhancement is absent). */
  #kok-mobile-cat-toggle.kok-mobile-cat-toggle,
  .kok-compact-hub .kok-mobile-cat-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    grid-area: cattoggle !important;
    min-width: 72px !important;
    min-height: 40px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 1px solid #c5dce8 !important;
    border-radius: 8px !important;
    background: #f3f9fc !important;
    color: #17678f !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    visibility: visible !important;
  }
  /* Only collapse in-flow categories when the toggle is actually shown */
  body.kok-v3-cats-ready:not(.kok-mobile-cats-open) #kok-sidebar-categories.kok-sidebar-categories,
  body.kok-v3-cats-ready:not(.kok-mobile-cats-open) .kok-sidebar-categories {
    display: none !important;
  }
  /* No-JS / not-ready: keep categories visible in sidebar */
  body:not(.kok-v3-cats-ready) #kok-sidebar-categories.kok-sidebar-categories,
  body:not(.kok-v3-cats-ready) .kok-sidebar-categories {
    display: block !important;
  }

  /* B. PRODUCT — reinforce full-width summary (source also fixed in single.php) */
  .kok-file-card.kok-product-detail .kok-file-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 12px !important;
    width: 100% !important;
  }
  .kok-file-card.kok-product-detail .kok-file-preview {
    width: 100% !important;
    max-width: 120px !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
  }
  .kok-file-card.kok-product-detail .kok-file-preview img {
    max-height: 96px !important;
  }
  .kok-file-card.kok-product-detail .kok-file-summary,
  .kok-file-card.kok-product-detail .kok-price-box,
  .kok-file-card.kok-product-detail .kok-meta-grid,
  .kok-file-card.kok-product-detail .kok-qpay-button,
  .kok-file-card.kok-product-detail .kok-free-download {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  .kok-file-card.kok-product-detail .kok-file-title {
    width: 100% !important;
    max-width: 100% !important;
  }
  .kok-file-card.kok-product-detail .kok-file-badges {
    display: flex !important;
    flex-wrap: wrap !important;
    grid-template-columns: none !important;
  }
  .kok-file-card.kok-product-detail .kok-meta-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .kok-file-card.kok-product-detail .kok-meta-value {
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }
  .kok-file-card.kok-product-detail .kok-qpay-button .kok-qpay-text {
    white-space: normal !important;
  }

  /* C. QPAY BANK GRID — equal track children */
  .kok-qpay-banks,
  #qpayBanks.kok-qpay-banks {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .kok-qpay-banks-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .kok-qpay-banks-grid > .kok-qpay-bank,
  a.kok-qpay-bank {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    justify-self: stretch !important;
    overflow: hidden !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  .kok-qpay-bank span {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }
}

@media screen and (min-width: 721px) and (max-width: 900px) {
  /* KL-010Q-F-R2: keep single-column product through 900px (was 120px+1fr) */
  .kok-file-card.kok-product-detail .kok-file-main {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .kok-file-card.kok-product-detail .kok-file-preview {
    max-width: 120px !important;
    margin: 0 auto !important;
  }
  .kok-file-card.kok-product-detail .kok-meta-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

@media screen and (min-width: 420px) and (max-width: 900px) {
  .kok-qpay-banks-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media screen and (max-width: 359px) {
  .kok-qpay-banks-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* ============================================================
 * KL-010Q-F-R2 — breakpoint gap + contrast + desktop/sidebar
 * ============================================================ */

/* P0: Between 901 and 1199, legacy topform min-width:1100 and main.css
 * width:1200 re-activate because max-width:900 mobile rules no longer match.
 * Force fluid layout here; restore classic fixed desktop at >=1200 only. */
@media screen and (min-width: 901px) and (max-width: 1199px) {
  html, body {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  html body #toppanel > .headerMenu,
  html body #toppanel .headerMenu {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #container,
  #main,
  #main.kok-modern-main,
  #listmenunew,
  #mainchat,
  #headcenter,
  #maintop,
  #mainlink,
  #mainleft,
  #mainright {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  .kok-content-layout {
    width: 100% !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) !important;
  }
  #mainleft.kok-content-primary,
  #mainleft {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
  }
  #mainright {
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
  }
}

/* True wide desktop: do not fight classic 1200 layout above 1200 */
@media screen and (min-width: 1200px) {
  .kok-content-layout {
    max-width: 1200px !important;
  }
  .kok-file-card.kok-product-detail {
    max-width: none !important;
  }
}

/* Product: reinforce single-column through 900; two-col from 901 */
@media screen and (max-width: 900px) {
  .kok-file-card.kok-product-detail .kok-file-main {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .kok-file-card.kok-product-detail .kok-file-summary,
  .kok-file-card.kok-product-detail .kok-price-box,
  .kok-file-card.kok-product-detail .kok-qpay-button,
  .kok-file-card.kok-product-detail .kok-free-download {
    width: 100% !important;
    max-width: 100% !important;
  }
}

@media screen and (min-width: 901px) {
  .kok-file-card.kok-product-detail .kok-file-main {
    grid-template-columns: 140px minmax(0, 1fr) !important;
  }
  .kok-file-card.kok-product-detail {
    width: auto !important;
    max-width: 100% !important;
  }
}

/* Header contrast: brand blue preserved; nav text #fff on darkened chips for >=4.5:1 evidence path */
@media screen and (max-width: 1199px) {
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    background: linear-gradient(90deg, #055f94 0%, #078bd7 55%, #055f94 100%) !important;
  }
  html body #toppanel .kok-v2-brand-title {
    color: #ffffff !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link {
    color: #ffffff !important;
    background: rgba(0, 32, 58, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.28) !important;
    text-shadow: 0 1px 1px rgba(0, 24, 48, 0.55) !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link:hover {
    color: #ffffff !important;
    background: rgba(0, 32, 58, 0.42) !important;
  }
  /* Approximate solid reference for contrast math: #ffffff on #055f94 ≈ 5.4:1 */
}

/* Desktop sidebar readability (real markup, not preview-only) */
@media screen and (min-width: 901px) {
  .kok-sidebar-link {
    font-size: 12px !important;
    line-height: 16px !important;
    grid-template-columns: 22px minmax(0, 1fr) minmax(28px, 52px) !important;
  }
  .kok-sidebar-name {
    max-height: 34px !important;
    -webkit-line-clamp: 2 !important;
  }
  .kok-sidebar-count {
    max-width: 52px !important;
    width: 100% !important;
    font-size: 10px !important;
  }
}

/* ============================================================
 * KL-010Q-F-R3 — final breakpoint + overflow + contrast
 * Beats topform html body #toppanel > .kok-v2-header { min-width:1100px !important }
 * which is unscoped and returns at >=901 once max-width:900 kill ends.
 * ============================================================ */

/* Continuous kill through 1199 (includes exact 901 boundary). Higher specificity. */
@media screen and (max-width: 1199px) {
  html body div#toppanel,
  html body #toppanel {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body div#toppanel > header.kok-v2-header,
  html body div#toppanel > header.kok-v2-header.kok-v2-header,
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header,
  html body #toppanel > header.kok-v2-header[class*="kok-v2"] {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body #toppanel > .headerMenu,
  html body #toppanel .headerMenu {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Auth panel fixed 1100 width */
  #panel .content.clearfix {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  /* +16px home overflow: padding without border-box on 100% width */
  .kok-content-layout {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  #container,
  #main,
  #main.kok-modern-main,
  #listmenunew,
  #mainchat,
  #headcenter,
  #maintop,
  #mainlink,
  #mainleft,
  #mainright {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

/* Mid tablet/desktop fluid content; do not force viewport to 1100 */
@media screen and (min-width: 901px) and (max-width: 1199px) {
  .kok-content-layout {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px) !important;
    gap: 12px !important;
  }
}

/* Preserve classic wide desktop from 1200 */
@media screen and (min-width: 1200px) {
  .kok-content-layout {
    box-sizing: border-box !important;
    max-width: 1200px !important;
  }
}

/* Measurable contrast: solid chip BG (not only rgba over gradient) */
@media screen and (max-width: 1199px) {
  html body #toppanel > header.kok-v2-header,
  html body #toppanel > .kok-v2-header {
    background: linear-gradient(90deg, #055f94 0%, #078bd7 55%, #055f94 100%) !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link,
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link span {
    color: #ffffff !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link {
    /* Solid brand chip — white on #044e7a ≈ 7.2:1; preserves KOK blue family */
    background-color: #044e7a !important;
    background-image: none !important;
    border: 1px solid rgba(255, 255, 255, 0.35) !important;
    text-shadow: none !important;
  }
  html body #toppanel .kok-v2-nav > a.kok-v2-nav-link:hover {
    background-color: #033d61 !important;
    color: #ffffff !important;
  }
  html body #toppanel .kok-v2-brand-title {
    color: #ffffff !important;
  }
}

/* ============================================================
 * KL-010Q-F-RELEASE-FIX — 901px product grid authority
 * Intended: 140px + minmax(0,1fr). Single 1fr track at 901 is FAIL.
 * Beats residual unscoped .kok-file-main { 1fr } from older inline CSS.
 * ============================================================ */
@media screen and (min-width: 901px) {
  html body .kok-file-card.kok-product-detail .kok-file-main,
  .kok-file-card.kok-product-detail > .kok-file-main,
  .kok-file-card.kok-product-detail .kok-file-main {
    display: grid !important;
    grid-template-columns: 140px minmax(0, 1fr) !important;
    grid-template-rows: auto !important;
    align-items: start !important;
  }
  html body .kok-file-card.kok-product-detail .kok-file-preview,
  .kok-file-card.kok-product-detail .kok-file-preview {
    width: 140px !important;
    max-width: 140px !important;
    margin: 0 !important;
  }
}

@media screen and (max-width: 900px) {
  html body .kok-file-card.kok-product-detail .kok-file-main,
  .kok-file-card.kok-product-detail .kok-file-main {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* ============================================================
 * KL-010Q-F-RELEASE-FINAL — continuous mobile-first product grid
 * ROOT CAUSE: max-width:900 and min-width:901 leave a fractional gap
 * (900 < w < 901). Owner 901 iframe measured ~900.8px header width,
 * so NEITHER MQ matched → unscoped display:grid with no columns
 * collapsed to a single ~843px track. 900 PASS / 902 PASS / 901 FAIL.
 *
 * Fix: mobile-first BASE single-column always; two-col ONLY when
 * min-width:901 actually matches. No undefined gap cascade.
 * ============================================================ */
html body .kok-file-card.kok-product-detail .kok-file-main,
.kok-file-card.kok-product-detail > .kok-file-main,
.kok-file-card.kok-product-detail .kok-file-main {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  align-items: start !important;
}

@media screen and (min-width: 901px) {
  html body .kok-file-card.kok-product-detail .kok-file-main,
  .kok-file-card.kok-product-detail > .kok-file-main,
  .kok-file-card.kok-product-detail .kok-file-main {
    grid-template-columns: 140px minmax(0, 1fr) !important;
  }
  html body .kok-file-card.kok-product-detail .kok-file-preview,
  .kok-file-card.kok-product-detail .kok-file-preview {
    width: 140px !important;
    max-width: 140px !important;
    margin: 0 !important;
  }
}

/* Desktop contrast: chips were only max-width:1199 → 1200/1440 UNVERIFIED
 * with topform text #f3fbff on light blue gradient. Solid chip on all widths. */
html body #toppanel .kok-v2-nav > a.kok-v2-nav-link,
html body #toppanel .kok-v2-nav > a.kok-v2-nav-link span {
  color: #ffffff !important;
}
html body #toppanel .kok-v2-nav > a.kok-v2-nav-link {
  background-color: #044e7a !important;
  background-image: none !important;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  text-shadow: none !important;
}
html body #toppanel .kok-v2-nav > a.kok-v2-nav-link:hover {
  background-color: #033d61 !important;
  color: #ffffff !important;
}
/* #ffffff on #044e7a >= 4.5:1 (approx 7.2:1) */

/* ============================================================
 * KL-010Q-I — desktop login/account chip contrast
 * Owner: nearly invisible login text on dark chip despite prior
 * offline nav-chip PASS. Force measurable solid chip + white text
 * (and nested spans / webkit text-fill) for #open/#close only.
 * ============================================================ */
html body #toppanel a#open.kok-v2-account-open,
html body #toppanel a#close.kok-v2-account-close,
html body #toppanel a#open.kok-v2-account-open:hover,
html body #toppanel a#close.kok-v2-account-close:hover,
html body #toppanel a#open.kok-v2-account-open:focus,
html body #toppanel a#close.kok-v2-account-close:focus {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
  background-color: #044e7a !important;
  background-image: none !important;
  text-shadow: none !important;
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}
html body #toppanel a#open.kok-v2-account-open span,
html body #toppanel a#close.kok-v2-account-close span,
html body #toppanel a#open.kok-v2-account-open .kok-v2-close-content,
html body #toppanel a#close.kok-v2-account-close .kok-v2-close-content {
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  opacity: 1 !important;
}
html body #toppanel a#open.kok-v2-account-open:hover,
html body #toppanel a#close.kok-v2-account-close:hover {
  background-color: #033d61 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
}
/* #ffffff on #044e7a ≈ 8.84:1 */
