:root {
      --bg-dark: #050816;
      --bg-card: #0f172a;
      --accent: #38bdf8;
      --accent-soft: rgba(56, 189, 248, 0.12);
      --text-main: #e5e7eb;
      --text-muted: #9ca3af;
      --border-subtle: rgba(148, 163, 184, 0.25);
      --radius-xl: 1.25rem;
      --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.8);
    }
    * { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      background: radial-gradient(circle at top left, #0f172a 0, #020617 45%, #020617 100%);
      overflow-x: hidden;
      font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
      color: var(--text-main);
      min-height: 100vh;
      line-height: 1.6;
    }
    a { color: inherit; text-decoration: none; }
    .hidden { display: none !important; }
    .page-wrap { max-width: 1120px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem;
    }

    .kp-toolbar{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap: 0.9rem;
      flex-wrap:wrap;
      margin: 0.75rem 0 1rem;
    }
    .kp-pill{
      display:inline-flex;
      align-items:center;
      height:42px;
      box-sizing:border-box;
      gap: 0.5rem;
      padding: 0.45rem 0.75rem;
      border-radius: 999px;
      background: rgba(15,23,42,0.75);
      border: 1px solid rgba(148,163,184,0.45);
      color: var(--text-muted);
      font-weight:700;
      font-size: 0.85rem;
    }
    button.kp-pill{
      border: 1px solid rgba(148,163,184,0.45);
      cursor: pointer;
      appearance: none;
      -webkit-appearance: none;
    }
    .kp-select{
      height: 42px;
      box-sizing:border-box;
      padding: 0.4rem 0.6rem;
      border-radius: 10px;
      border: 1px solid rgba(148,163,184,0.45);
      background: rgba(2,6,23,0.55);
      color: var(--text-main);
      outline:none;
      font-weight:700;
      font-size: 0.85rem;
    }
    .kp-btn{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      height: 42px;
      box-sizing:border-box;
      padding: 0.55rem 0.9rem;
      border-radius: 12px;
      border: 1px solid rgba(148,163,184,0.45);
      background: rgba(15,23,42,0.75);
      color: var(--text-main);
      font-weight: 800;
      cursor: pointer;
    }
    .kp-btn:hover{ background: rgba(15,23,42,0.9); }
    .kp-btn-load-more{
      background: linear-gradient(135deg, rgba(56,189,248,0.38), rgba(14,116,144,0.9));
      border-color: rgba(56,189,248,0.9);
      box-shadow: 0 14px 36px rgba(56,189,248,0.28), 0 10px 24px rgba(15,23,42,0.55);
      font-weight: 900;
      letter-spacing: 0.02em;
      transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.2s ease;
    }
    .kp-btn-load-more:hover{
      transform: translateY(-1px);
      filter: brightness(1.05);
      box-shadow: 0 18px 44px rgba(56,189,248,0.35), 0 12px 28px rgba(15,23,42,0.6);
    }
    .kp-btn-load-more:active{
      transform: translateY(0);
    }

    .kp-input{
      height: 42px;
      box-sizing:border-box;
      padding: 0.55rem 0.75rem;
      border-radius: 12px;
      border: 1px solid rgba(148,163,184,0.45);
      background: rgba(2,6,23,0.55);
      color: var(--text-main);
      outline: none;
      font-weight: 700;
      min-width: 220px;
    }
    .kp-input::placeholder{ color: rgba(156,163,175,0.85); }
    select.kp-input, select.kp-select{ color-scheme: dark; }
    .kp-select option, select.kp-input option{ background: #0f172a; color: #f8fafc; }
    .kp-btn-primary{ border-color: rgba(56,189,248,0.6); }
    .kp-btn.kp-active{
      background: rgba(56,189,248,0.16);
      border-color: rgba(56,189,248,0.85);
    }
    .kp-pill.kp-active{
      background: rgba(56,189,248,0.16);
      border-color: rgba(56,189,248,0.85);
      color: var(--text-main);
    }

  
    .kp-toolbar-group{
      display:flex;
      gap: 0.6rem;
      flex-wrap:wrap;
      align-items:center;
    }
    .kp-market-filter{
      display:flex;
      gap: 0.6rem;
      flex-wrap:wrap;
      align-items:flex-end;
    }
    .kp-filter-block{
      display:flex;
      flex-direction:column;
      gap:0.25rem;
    }
    .kp-filter-label{
      font-size:0.7rem;
      letter-spacing:0.12em;
      text-transform:uppercase;
      color: var(--text-muted);
      font-weight:700;
    }
    .kp-filter-inputs{
      display:flex;
      align-items:stretch;
      gap:0.35rem;
    }
    .kp-filter-sep{
      color: var(--text-muted);
      font-weight:700;
      min-width: 10px;
      text-align:center;
    }
    .kp-input.kp-input-compact{
      min-width: 110px;
      width: 110px;
    }
    .kp-select.kp-select-compact{
      min-width: 160px;
    }
    .kp-market-search-row{
      display:flex;
      gap:0.6rem;
      flex-wrap:wrap;
      align-items:center;
    }
    .kp-market-mobile-filter-shell{
      margin:0;
      width:auto;
    }
    .kp-market-mobile-filter-summary{
      display:none;
      list-style:none;
    }
    .kp-market-mobile-filter-summary::-webkit-details-marker{ display:none; }
    .kp-market-mobile-filter-body{
      display:block;
    }
    @media (min-width: 641px){
      .kp-market-mobile-filter-shell:not([open]) > .kp-market-mobile-filter-body{
        display:block !important;
      }
    }
    @media (max-width: 640px){
      .kp-toolbar.kp-market-toolbar{
        flex-direction:column;
        align-items:stretch;
        gap:0.6rem;
      }
      .kp-toolbar.kp-market-toolbar .kp-toolbar-group,
      .kp-toolbar.kp-market-toolbar .kp-market-filter,
      .kp-toolbar.kp-market-toolbar .kp-market-mobile-filter-shell{
        width:100%;
      }
      .kp-toolbar.kp-market-toolbar .kp-btn,
      .kp-toolbar.kp-market-toolbar .kp-input,
      .kp-toolbar.kp-market-toolbar .kp-select{
        width:100%;
      }
      .kp-market-search-row{
        width:100%;
        display:flex;
        flex-direction:row;
        flex-wrap:nowrap;
        align-items:stretch;
        gap:0.4rem;
      }
      .kp-toolbar.kp-market-toolbar .kp-market-search-row .kp-input{
        width:auto;
        min-width:0;
        flex:1 1 auto;
      }
      .kp-toolbar.kp-market-toolbar .kp-market-search-row .kp-btn{
        width:auto;
        flex:0 0 auto;
        white-space:nowrap;
        padding-inline:0.75rem;
      }
      .kp-market-mobile-filter-shell{
        border: 1px solid rgba(56,189,248,0.22);
        background: rgba(2,6,23,0.62);
        border-radius: 14px;
        overflow: hidden;
      }
      .kp-market-mobile-filter-shell > .kp-market-mobile-filter-summary{
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:0.5rem;
        padding:0.65rem 0.8rem;
        cursor:pointer;
        border-bottom:1px solid rgba(148,163,184,0.16);
        background: rgba(15,23,42,0.38);
      }
      .kp-market-mobile-filter-shell > .kp-market-mobile-filter-summary::after{
        content:"\25BC";
        color: var(--text-muted);
        font-size:0.8rem;
        font-weight:700;
      }
      .kp-market-mobile-filter-shell[open] > .kp-market-mobile-filter-summary::after{
        content:"\25B2";
      }
      .kp-market-mobile-filter-label{
        font-size:0.78rem;
        letter-spacing:0.12em;
        text-transform:uppercase;
        color: var(--text-muted);
        font-weight:700;
      }
      .kp-market-mobile-filter-shell > .kp-market-mobile-filter-body{
        display:block;
        padding:0.7rem 0.75rem 0.75rem;
      }
      .kp-market-mobile-filter-shell:not([open]) > .kp-market-mobile-filter-body{
        display:none;
      }
      .kp-market-filter{
        flex-direction:column;
        align-items:stretch;
        gap:0.55rem;
      }
      .kp-filter-inputs{
        display:grid;
        grid-template-columns: 1fr auto 1fr;
        gap:0.45rem;
      }
    }
  
    .kp-filter-block button{
      align-self:flex-start;
    }
    @media (max-width: 640px){
      .kp-filter-block button{
        align-self:stretch;
      }
    }
  
    .kp-toolbar.kp-market-toolbar{
      align-items:flex-end;
    }
        .kp-filter-inputs > .kp-input,
    .kp-filter-inputs > .kp-select,
    .kp-filter-inputs > .kp-btn{
      height:42px;
    }

    @media (max-width: 640px){
      .kp-filter-inputs .kp-btn{
        grid-column: 1 / -1;
        width:100%;
      }
    }
    @media (max-width: 640px){
      .kp-market-main{
        padding:1.1rem 0 3.1rem !important;
      }
      #kpMarketTopActions{
        width:100%;
        display:grid !important;
        grid-template-columns: repeat(3, minmax(0,1fr));
        gap:0.35rem;
        align-items:stretch;
      }
      #kpMarketTopActions > a.kp-pill,
      #kpMarketTopActions > .kp-pill{
        grid-column:auto;
        width:100%;
        min-width:0;
        justify-content:center;
        white-space:nowrap;
        font-size:0.68rem;
        padding:0.25rem 0.35rem;
      }
      #kpMarketListRoot .kp-btn,
      #kpMarketListRoot .kp-pill{
        height:36px;
        padding-top:0.38rem;
        padding-bottom:0.38rem;
      }
      #kpMarketListRoot .kp-input,
      #kpMarketListRoot .kp-select{
        height:36px;
      }
      .kp-filter-inputs > .kp-input,
      .kp-filter-inputs > .kp-select,
      .kp-filter-inputs > .kp-btn{
        height:36px;
      }
      .kp-toolbar.kp-market-toolbar{
        margin-top:0.35rem !important;
      }
    }
  
    .kp-brainrot-filter-shell{
      display:none;
      margin: 0 0 1rem;
      border: 1px solid rgba(56,189,248,0.22);
      background:
        radial-gradient(circle at top right, rgba(56,189,248,0.10), transparent 45%),
        rgba(2,6,23,0.62);
      border-radius: 16px;
      overflow: hidden;
      box-shadow: 0 12px 28px rgba(2,6,23,0.35);
    }
    .kp-brainrot-filter-shell[data-active="1"]{ display:block; }
    .kp-brainrot-filter-head{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:0.75rem;
      padding:0.75rem 0.85rem;
      border-bottom:1px solid rgba(148,163,184,0.16);
      background: rgba(15,23,42,0.38);
    }
    .kp-brainrot-filter-title{ min-width:0; flex:1; }
    .kp-brainrot-filter-kicker{
      font-size:0.9rem;
      letter-spacing:0.12em;
      text-transform:uppercase;
      color: var(--text-muted);
      font-weight:700;
      line-height:1;
    }
    .kp-brainrot-filter-summary{
      margin-top:0.18rem;
      color: var(--text-main);
      font-weight:700;
      font-size:0.88rem;
      line-height:1.25;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
    }
    .kp-brainrot-filter-actions{
      display:flex;
      align-items:center;
      gap:0.5rem;
      flex-shrink:0;
    }
    .kp-btn.kp-brainrot-toggle{
      min-width: 130px;
      justify-content:space-between;
      gap:0.55rem;
      border-color: rgba(56,189,248,0.32);
      background: rgba(15,23,42,0.72);
    }
    .kp-btn.kp-brainrot-toggle .kp-brainrot-count{
      display:inline-flex;
      align-items:center;
      justify-content:center;
      min-width: 22px;
      height: 22px;
      padding: 0 6px;
      border-radius: 999px;
      border:1px solid rgba(56,189,248,0.35);
      background: rgba(56,189,248,0.14);
      font-size:0.75rem;
      font-weight:900;
      color:#d8f3ff;
    }
    .kp-btn.kp-brainrot-toggle[data-open="1"] .kp-brainrot-toggle-label::after{ content:" \25B2"; }
    .kp-btn.kp-brainrot-toggle[data-open="0"] .kp-brainrot-toggle-label::after{ content:" \25BC"; }
    .kp-brainrot-filter-body{ padding:0.8rem 0.85rem 0.9rem; }
    .kp-brainrot-filter-shell[data-open="0"] .kp-brainrot-filter-body{ display:none; }

    .kp-brainrot-grid{
      display:grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap:0.7rem;
      align-items:start;
    }
    .kp-brainrot-field{
      display:flex;
      flex-direction:column;
      gap:0.28rem;
      min-width:0;
    }
    .kp-brainrot-field-label{
      font-size:0.72rem;
      letter-spacing:0.08em;
      text-transform:uppercase;
      color: var(--text-muted);
      font-weight:700;
    }
    .kp-brainrot-field-note{
      margin-top:0.15rem;
      color: var(--text-muted);
      font-size:0.74rem;
      line-height:1.35;
    }
    .kp-brainrot-quick-actions{
      margin-top:0.7rem;
      display:flex;
      gap:0.55rem;
      justify-content:flex-end;
      flex-wrap:wrap;
    }
    .kp-brainrot-quick-actions .kp-btn{ white-space:nowrap; }
    .kp-brainrot-game-fields-shell{
      margin-top:0.75rem;
      border-top:1px solid rgba(148,163,184,0.16);
      padding-top:0.75rem;
    }
    .kp-brainrot-subtoggle-wrap{ display:none; margin-bottom:0.6rem; }
    .kp-btn.kp-brainrot-subtoggle{
      width:100%;
      justify-content:space-between;
      border-color: rgba(148,163,184,0.28);
      background: rgba(15,23,42,0.56);
    }
    .kp-btn.kp-brainrot-subtoggle[data-open="1"]::after{ content:"\25B2"; }
    .kp-btn.kp-brainrot-subtoggle[data-open="0"]::after{ content:"\25BC"; }
    .kp-brainrot-game-fields-body{
      display:grid;
      grid-template-columns: repeat(2, minmax(0,1fr));
      gap:0.7rem;
      align-items:start;
    }
    .kp-brainrot-game-fields-shell[data-open="0"] .kp-brainrot-game-fields-body{ display:none; }
    .kp-brainrot-game-fields-shell[data-ready="0"]{ display:none; }
    .kp-brainrot-chip-row{
      margin-top:0.75rem;
      display:flex;
      flex-wrap:wrap;
      gap:0.4rem;
    }
    .kp-brainrot-chip{
      display:inline-flex;
      align-items:center;
      gap:0.35rem;
      padding:0.32rem 0.6rem;
      border-radius:999px;
      border:1px solid rgba(148,163,184,0.28);
      background: rgba(15,23,42,0.7);
      color:#e2e8f0;
      font-size:0.75rem;
      font-weight:700;
      max-width:100%;
    }
    .kp-brainrot-chip strong{ color:#93c5fd; font-weight:800; }

    @media (max-width: 640px){
      .kp-brainrot-filter-head{ flex-direction:column; align-items:stretch; }
      .kp-brainrot-filter-actions{ width:100%; }
      .kp-brainrot-filter-actions .kp-btn{ width:100%; }
      .kp-brainrot-grid{ grid-template-columns: 1fr; }
      .kp-brainrot-game-fields-body{ grid-template-columns: 1fr; }
      .kp-brainrot-quick-actions{ flex-direction:column; }
      .kp-brainrot-quick-actions .kp-btn{ width:100%; }
      .kp-brainrot-subtoggle-wrap{ display:block; }
      .kp-brainrot-game-fields-shell[data-open="0"] + .kp-brainrot-chip-row{ display:none; }
    }
    .kp-page-size-pill{
      gap:0.6rem;
      padding-right:0.45rem;
    }
    .kp-page-size-pill .kp-select{
      height:34px;
      min-width:72px;
      padding:0.2rem 0.5rem;
      border-radius:10px;
    }
