:root {
    color-scheme: dark;
    --nakama-bg: #090a0c;
    --nakama-surface: #111316;
    --nakama-surface-raised: #17191d;
    --nakama-line: rgba(245, 197, 24, .16);
    --nakama-line-strong: rgba(245, 197, 24, .34);
    --nakama-gold: #e8bd50;
    --nakama-gold-bright: #f6d77c;
    --nakama-text: #f2f1ec;
    --nakama-muted: #a2a29e;
    --nakama-red: #bd4d49;
    --nakama-green: #54b982;
    --nakama-radius: 16px;
    --nakama-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

html {
    min-width: 0;
    background: var(--nakama-bg);
    scroll-behavior: smooth;
}

body:has(link[href$="nakama-design.css"]) {
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--nakama-text);
    background-color: var(--nakama-bg) !important;
    background-image: linear-gradient(135deg, rgba(9, 10, 12, .97), rgba(16, 15, 12, .95)) !important;
    font-family: Inter, "Segoe UI", Arial, sans-serif !important;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body:has(link[href$="nakama-design.css"])::before {
    background: linear-gradient(135deg, rgba(8, 9, 11, .93), rgba(14, 13, 11, .94)) !important;
    pointer-events: none;
}

body:has(link[href$="nakama-design.css"]) :focus-visible {
    outline: 2px solid var(--nakama-gold-bright);
    outline-offset: 3px;
}

body:has(link[href$="nakama-design.css"]) :is(h1, h2, h3, h4) {
    color: var(--nakama-text);
    text-wrap: balance;
}

body:has(link[href$="nakama-design.css"]) :is(.header-gradient, .glass-card, .card, .panel, .table-card, .filter-card, .summary-card, .receipt-card, .order-card, .members-header) {
    border-color: var(--nakama-line) !important;
    border-radius: var(--nakama-radius) !important;
    background-color: rgba(17, 19, 22, .94) !important;
    box-shadow: var(--nakama-shadow);
    backdrop-filter: blur(14px);
}

body:has(link[href$="nakama-design.css"]) [class*="rounded-3xl"][class*="border"] {
    border-color: var(--nakama-line) !important;
    border-radius: var(--nakama-radius) !important;
}

body:has(link[href$="nakama-design.css"]) :is(.header-gradient, .members-header) {
    background: linear-gradient(115deg, rgba(32, 28, 19, .98), rgba(17, 19, 22, .98)) !important;
}

body:has(link[href$="nakama-design.css"]) :is(.header-gradient h1, .eyebrow, .section-kicker, .section-label) {
    color: var(--nakama-gold-bright);
}

body:has(link[href$="nakama-design.css"]) [class*="bg-black/60"][class*="rounded-2xl"] {
    border-color: var(--nakama-line-strong) !important;
    border-radius: 20px !important;
    background: linear-gradient(145deg, rgba(23, 24, 25, .97), rgba(14, 15, 17, .97)) !important;
    box-shadow: 0 28px 80px rgba(0, 0, 0, .48);
}

body:has(link[href$="nakama-design.css"]) :is(.text-indigo-500, .text-indigo-400, .text-indigo-300) {
    color: var(--nakama-gold-bright) !important;
}

body:has(link[href$="nakama-design.css"]) .bg-indigo-600 {
    border-color: rgba(246, 215, 124, .56) !important;
    background: linear-gradient(135deg, #f0cf77, #d6a73c) !important;
    color: #17140d !important;
}

body:has(link[href$="nakama-design.css"]) .bg-indigo-600:hover {
    background: #f6d77c !important;
}

body:has(link[href$="nakama-design.css"]) :is(button, input, select, textarea) {
    font: inherit;
}

body:has(link[href$="nakama-design.css"]) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, .13) !important;
    border-radius: 10px !important;
    color: var(--nakama-text) !important;
    background-color: #0e1013 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .025);
    transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
}

body:has(link[href$="nakama-design.css"]) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea)::placeholder {
    color: #82847f;
}

body:has(link[href$="nakama-design.css"]) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea):focus {
    border-color: rgba(232, 189, 80, .75) !important;
    box-shadow: 0 0 0 3px rgba(232, 189, 80, .12);
}

body:has(link[href$="nakama-design.css"]) :is(button, .button, .primary, .back-link, .receipt-print) {
    min-height: 40px;
    border-radius: 10px;
    font-weight: 750;
    transition: transform .16s ease, filter .16s ease, border-color .16s ease, box-shadow .16s ease;
}

body:has(link[href$="nakama-design.css"]) button:not(:disabled):hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

body:has(link[href$="nakama-design.css"]) button:disabled {
    cursor: not-allowed;
    filter: saturate(.55);
    opacity: .58;
}

body:has(link[href$="nakama-design.css"]) :is(button.primary, button.save, .receipt-print) {
    border: 1px solid rgba(246, 215, 124, .48) !important;
    background: linear-gradient(135deg, #f0cf77, #d6a73c) !important;
    color: #17140d !important;
}

body:has(link[href$="nakama-design.css"]) :is(button.danger, button.delete, button.reduce) {
    border-color: rgba(189, 77, 73, .55) !important;
    background: rgba(105, 35, 35, .8) !important;
    color: #ffe1de !important;
}

body:has(link[href$="nakama-design.css"]) button.restock {
    border-color: rgba(84, 185, 130, .48) !important;
    background: rgba(31, 93, 62, .62) !important;
    color: #dff8e8 !important;
}

body:has(link[href$="nakama-design.css"]) :is(table, .overflow-x-auto) {
    max-width: 100%;
}

body:has(link[href$="nakama-design.css"]) table {
    border-collapse: collapse;
}

body:has(link[href$="nakama-design.css"]) :is(th, td) {
    border-color: rgba(255, 255, 255, .075) !important;
    vertical-align: middle;
}

body:has(link[href$="nakama-design.css"]) th {
    color: var(--nakama-gold-bright);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .08em;
    text-transform: uppercase;
}

body:has(link[href$="nakama-design.css"]) tbody tr {
    transition: background-color .16s ease;
}

body:has(link[href$="nakama-design.css"]) tbody tr:hover {
    background-color: rgba(232, 189, 80, .045);
}

body:has(link[href$="nakama-design.css"]) :is(.modal, .modal-backdrop, .modal-backdrop.fixed, .fixed.inset-0[class*="z-"]) {
    backdrop-filter: blur(8px);
}

body:has(link[href$="nakama-design.css"]) :is(.modal-card, .member-modal, #inventory-action-panel, #order-history-modal > div) {
    max-height: min(90vh, 900px);
    overflow-y: auto;
    border: 1px solid var(--nakama-line-strong) !important;
    border-radius: 18px !important;
    background: #121417 !important;
    box-shadow: 0 30px 100px rgba(0, 0, 0, .62);
}

body:has(link[href$="nakama-design.css"]) :is(#toast, .toast-notification) {
    z-index: 120;
    max-width: min(420px, calc(100vw - 32px));
    border: 1px solid rgba(84, 185, 130, .4);
    border-radius: 12px;
    background: #14251c;
    color: #e5f6eb;
    box-shadow: var(--nakama-shadow);
    line-height: 1.5;
}

body:has(link[href$="nakama-design.css"]) :is(.toast-notification.error, .status.error) {
    border-color: rgba(189, 77, 73, .55);
    background: #2a1718;
    color: #ffd5d2;
}

body:has(link[href$="nakama-design.css"]) :is(.loading, .empty, [aria-live="polite"]:empty) {
    color: var(--nakama-muted);
}

body:has(link[href$="nakama-design.css"]) :is(.loading, .empty) {
    border-color: rgba(255, 255, 255, .13);
    border-radius: 14px;
    background: rgba(255, 255, 255, .018);
}

body:has(link[href$="nakama-design.css"]) .nakama-card {
    border: 1px solid var(--nakama-line);
    border-radius: var(--nakama-radius);
    background: rgba(17, 19, 22, .94);
    box-shadow: var(--nakama-shadow);
}

body:has(link[href$="nakama-design.css"]) .nakama-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 4px 10px;
    border: 1px solid rgba(232, 189, 80, .25);
    border-radius: 999px;
    background: rgba(232, 189, 80, .09);
    color: var(--nakama-gold-bright);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .035em;
}

body:has(link[href$="nakama-design.css"]) .nakama-empty {
    padding: 36px 20px;
    border: 1px dashed rgba(255, 255, 255, .16);
    border-radius: 14px;
    color: var(--nakama-muted);
    text-align: center;
}

body:has(link[href$="nakama-design.css"]) .nakama-skeleton {
    min-height: 56px;
    border-radius: 12px;
    background: linear-gradient(100deg, rgba(255,255,255,.035) 25%, rgba(255,255,255,.09) 42%, rgba(255,255,255,.035) 63%);
    background-size: 300% 100%;
    animation: nakama-shimmer 1.5s ease-in-out infinite;
}

@keyframes nakama-shimmer {
    to { background-position: -150% 0; }
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar {
    width: 248px;
    padding: 22px 16px 18px;
    border-right-color: var(--nakama-line);
    background: rgba(11, 12, 14, .97);
    box-shadow: 12px 0 40px rgba(0, 0, 0, .12);
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-brand {
    padding: 2px 6px 20px;
    border-bottom-color: rgba(255, 255, 255, .09);
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-brand img {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    border-color: rgba(232, 189, 80, .7);
}

body:has(link[href$="nakama-design.css"]) .nakama-brand-name {
    color: var(--nakama-gold-bright);
    font-size: 14px;
    letter-spacing: .08em;
}

body:has(link[href$="nakama-design.css"]) .nakama-brand-sub {
    color: #92918b;
    font-size: 9px;
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-user {
    padding: 14px;
    border: 1px solid rgba(232, 189, 80, .2);
    border-radius: 13px;
    background: linear-gradient(135deg, rgba(232, 189, 80, .085), rgba(255, 255, 255, .018));
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-user-label {
    color: #9b978b;
    font-size: 9px;
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-user-name {
    overflow-wrap: anywhere;
    color: var(--nakama-text);
    font-size: 13px;
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-user-role {
    color: var(--nakama-gold);
    font-size: 9px;
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-heading {
    margin-bottom: 10px;
    color: #85847f;
    font-size: 9px;
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-link {
    min-height: 44px;
    border-radius: 10px;
    color: #b5b4af;
    font-size: 11px;
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-link.active {
    border-color: rgba(232, 189, 80, .28);
    background: linear-gradient(90deg, rgba(232, 189, 80, .14), rgba(232, 189, 80, .04));
    color: var(--nakama-gold-bright);
}

body:has(link[href$="nakama-design.css"]) .nakama-sidebar-icon {
    font-size: 16px;
}

body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) > :not(.nakama-sidebar):not(.nakama-mobile-toggle):not(.nakama-sidebar-overlay) {
    margin-left: 248px;
}

body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) .max-w-6xl,
body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) .max-w-7xl {
    margin-right: 28px;
}

body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) > main:not(.leaderboard-page) {
    width: calc(100% - 248px);
}

body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) > main.leaderboard-page {
    width: calc(100% - 304px);
    margin-right: 56px;
    margin-left: 248px;
}

body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) .data-anggota-wrap {
    width: calc(100% - 280px);
    max-width: none;
    margin-right: 32px;
    margin-left: 248px;
}

body.nakama-with-sidebar.flex:has(link[href$="nakama-design.css"]) > div {
    margin-left: 0 !important;
}

body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) > :is(.fixed, [id$="-modal"], #toast, .toast-notification) {
    margin-left: 0 !important;
}

body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) .nakama-mobile-toggle {
    width: 44px;
    height: 44px;
    border-color: rgba(232, 189, 80, .55);
    border-radius: 12px;
    background: #141516;
    box-shadow: var(--nakama-shadow);
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) {
    display: grid;
    width: calc(100% - 248px);
    max-width: none;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
    grid-template-areas:
        "header header"
        "filters filters"
        "products cart"
        "receipt cart"
        "footer footer";
    align-content: start;
    align-items: start;
    gap: 18px;
    margin-right: 0;
    padding: 28px;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(1) { grid-area: header; }
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(2) { grid-area: filters; }
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) { grid-area: cart; position: sticky; top: 20px; }
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > #receipt-panel { grid-area: receipt; width: 100%; }
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > #item-grid { grid-area: products; align-content: start; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > footer { grid-area: footer; }

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) #cart-tbody input {
    width: 66px;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) table {
    min-width: 540px;
}

body.nakama-with-sidebar #item-grid > div {
    min-width: 0;
    border: 1px solid rgba(232, 189, 80, .22) !important;
    border-radius: 14px;
    background: linear-gradient(155deg, rgba(23, 25, 28, .98), rgba(13, 15, 17, .98)) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .2) !important;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

body.nakama-with-sidebar #item-grid > .card-weapon,
body.nakama-with-sidebar #item-grid > .card-ammo,
body.nakama-with-sidebar #item-grid > .card-attachment,
body.nakama-with-sidebar #item-grid > .card-vest,
body.nakama-with-sidebar #item-grid > .card-narko,
body.nakama-with-sidebar #item-grid > .card-heist {
    border-color: rgba(232, 189, 80, .22) !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .2) !important;
}

body.nakama-with-sidebar #item-grid > div:hover {
    transform: translateY(-2px);
    border-color: rgba(246, 215, 124, .55) !important;
    box-shadow: 0 18px 38px rgba(0, 0, 0, .32), 0 0 22px rgba(232, 189, 80, .06) !important;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) {
    overflow: hidden;
    border: 1px solid var(--nakama-line) !important;
    border-radius: var(--nakama-radius) !important;
    background: rgba(17, 19, 22, .96) !important;
    box-shadow: var(--nakama-shadow);
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) .overflow-x-auto {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-color: rgba(232, 189, 80, .4) transparent;
    scrollbar-width: thin;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) .overflow-x-auto::-webkit-scrollbar {
    height: 5px;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) .overflow-x-auto::-webkit-scrollbar-track {
    background: transparent;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) .overflow-x-auto::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(232, 189, 80, .4);
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) th,
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td {
    padding: 9px 5px;
    font-size: 11px;
    overflow-wrap: anywhere;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td:nth-child(1),
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) th:nth-child(1) {
    width: 34px;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td:nth-child(2) {
    overflow-wrap: anywhere;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td:nth-child(3),
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) th:nth-child(3),
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td:nth-child(5),
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) th:nth-child(5) {
    width: 74px;
    white-space: nowrap;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td:nth-child(4),
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) th:nth-child(4) {
    width: 58px;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td:nth-child(6),
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) th:nth-child(6) {
    width: 48px;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td:nth-child(4) input {
    width: 44px;
    padding: 5px 2px;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3):has(#cart-tbody td[colspan]) table {
    min-width: 0;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) > div:last-child > div {
    display: grid;
    grid-template-columns: 105px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) #jastip-fields {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1fr);
    justify-content: stretch;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) #jastip-fields > *,
body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) #checkout-recipient {
    width: 100%;
    max-width: none;
    min-width: 0;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) #member-checkout-button {
    border: 1px solid rgba(246, 215, 124, .48);
    background: linear-gradient(135deg, #f0cf77, #d6a73c);
    color: #17140d;
}

body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) > div:last-child {
    border-color: rgba(255, 255, 255, .08) !important;
    background: rgba(9, 10, 12, .72) !important;
}

body.nakama-with-sidebar #item-grid img {
    max-height: 160px;
    object-fit: contain;
}

body.nakama-with-sidebar #item-grid h3 {
    overflow: hidden;
    color: var(--nakama-text);
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

body.nakama-with-sidebar .inventory-stock-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin-top: 8px;
    padding: 3px 9px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    color: var(--nakama-muted);
    font-size: 11px;
    font-weight: 700;
}

body.nakama-with-sidebar .inventory-stock-badge.available {
    border-color: rgba(84, 185, 130, .22);
    background: rgba(84, 185, 130, .07);
    color: #bde8cc;
}

body.nakama-with-sidebar .inventory-stock-badge.unavailable {
    border-color: rgba(189, 77, 73, .3);
    background: rgba(189, 77, 73, .08);
    color: #ffd0cd;
}

body.nakama-with-sidebar .inventory-take-button {
    width: 100%;
    min-height: 44px;
    border: 1px solid rgba(246, 215, 124, .42);
    background: linear-gradient(135deg, #f0cf77, #d6a73c);
    color: #17140d;
}

body.nakama-with-sidebar .inventory-take-button:disabled {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .06);
    color: #92928d;
}

body.nakama-with-sidebar :is(.inventory-tab, .filter-btn) {
    min-height: 42px;
    border-radius: 10px;
}

body.nakama-with-sidebar .inventory-tab.tab-active {
    border-color: rgba(246, 215, 124, .7) !important;
    background: linear-gradient(135deg, #f0cf77, #d7a83a) !important;
    color: #17140d !important;
    box-shadow: 0 6px 18px rgba(232, 189, 80, .13);
}

body.nakama-with-sidebar #search-input {
    width: min(100%, 680px);
    min-height: 48px;
}

body.nakama-with-sidebar #receipt-panel {
    border-color: rgba(84, 185, 130, .28) !important;
}

@media (max-width: 1150px) {
    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "header" "filters" "products" "cart" "receipt" "footer";
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) {
        position: static;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > #item-grid {
        grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
    }
}

@media (max-width: 767px) {
    body:has(link[href$="nakama-design.css"]) {
        font-size: 14px;
    }

    body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) > :not(.nakama-sidebar):not(.nakama-mobile-toggle):not(.nakama-sidebar-overlay) {
        margin-left: 0;
    }

    body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) .max-w-6xl,
    body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) .max-w-7xl {
        margin-right: 0;
    }

    body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) > main:not(.leaderboard-page) {
        width: auto;
    }

    body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) > main.leaderboard-page {
        width: auto;
        margin: 0;
    }

    body.nakama-with-sidebar:has(link[href$="nakama-design.css"]) .data-anggota-wrap {
        width: auto;
        margin: 68px 14px 32px;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) {
        width: 100%;
        gap: 12px;
        padding: 68px 14px 28px;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(1) {
        padding: 14px !important;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > #item-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) {
        min-width: 0;
        padding: 14px !important;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) > div:last-child {
        margin: 0;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) table {
        min-width: 520px;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) th,
    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td {
        padding: 10px 7px;
        font-size: 12px;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) td:nth-child(4) input {
        width: 56px;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3):has(#cart-tbody td[colspan]) table {
        min-width: 0;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) > div:last-child > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 7px;
    }

    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > :nth-child(3) #jastip-fields {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    body.nakama-with-sidebar :is(.overflow-x-auto, [class*="overflow-x-auto"]) {
        max-width: 100%;
        overscroll-behavior-x: contain;
    }

    body:has(link[href$="nakama-design.css"]) :is(.history-page, main, .data-anggota-wrap) {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    body:has(link[href$="nakama-design.css"]) :is(.history-header, .panel-head, .modal-actions) {
        align-items: stretch;
        flex-wrap: wrap;
    }

    body:has(link[href$="nakama-design.css"]) :is(.modal, .modal-backdrop, .fixed.inset-0[class*="z-"]) {
        align-items: center;
        padding: 12px !important;
    }

    body:has(link[href$="nakama-design.css"]) :is(.modal-card, .member-modal, #inventory-action-panel, #order-history-modal > div) {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 24px);
        padding: 18px !important;
    }

    body:has(link[href$="nakama-design.css"]) :is(#toast, .toast-notification) {
        right: 12px !important;
        bottom: 12px !important;
        left: 12px !important;
        top: auto !important;
        width: auto;
        max-width: none;
    }
}

@media (max-width: 420px) {
    body.nakama-with-sidebar > div.max-w-7xl:has(#item-grid) > #item-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    body:has(link[href$="nakama-design.css"]) :is(input:not([type="checkbox"]):not([type="radio"]), select, textarea) {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    body:has(link[href$="nakama-design.css"]) *,
    body:has(link[href$="nakama-design.css"]) *::before,
    body:has(link[href$="nakama-design.css"]) *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
