/* DeckLab poi common UI hardening */
*, *::before, *::after { box-sizing: border-box; }
html, body { width: 100%; max-width: 100%; overflow-x: hidden; }
img, video, canvas, svg, iframe { max-width: 100%; }
button, a, input, select, textarea { min-width: 0; }
.bg-gray-850 { background-color: #151c2a; }
.site-brand-title { text-decoration: none; }
.site-nav-link,
.site-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    border-radius: .55rem;
    padding: .45rem .75rem;
    min-height: 2.25rem;
    line-height: 1.2;
    max-width: 100%;
}
.admin-table-wrap { -webkit-overflow-scrolling: touch; }
.break-anywhere { overflow-wrap: anywhere; word-break: break-word; }

/* Square card form: keep the right edge/border visible on desktop and mobile.
   Square SDK styling only controls the secure iframe internals; outer size/edge fixes stay here. */
.payment-shell,
#payment-form,
#tab-panel-card {
    min-width: 0;
    overflow: visible !important;
}
.square-card-clip-fix {
    width: 100%;
    max-width: 100%;
    padding-right: 2px;
    overflow: visible !important;
    box-sizing: border-box;
}
#card-container.square-card-field,
#card-container {
    position: relative;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 76px;
    padding: 0 !important;
    margin: 0 0 .5rem 0;
    border: 0 !important;
    border-radius: 14px;
    background: transparent !important;
    overflow: visible !important;
    box-sizing: border-box;
}
#card-container > *,
#card-container iframe {
    display: block !important;
    position: relative;
    z-index: 1;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    border-radius: 14px;
}
#card-container iframe { border: 0 !important; overflow: visible !important; }
#card-container.square-card-ready::after {
    content: "";
    position: absolute;
    z-index: 2;
    pointer-events: none;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    border-radius: 0 14px 14px 0;
    background: #D1D5DB;
}
#card-container.square-card-ready:focus-within::after { background: #EC4899; }
.payment-note {
    font-size: 11px;
    line-height: 1.55;
    color: #9ca3af;
}

/* Square digital wallet buttons: Google Pay must be attached after its visible container has real width. */
#google-pay-container,
#google-pay-button {
    width: 100%;
    min-width: 0;
}
#google-pay-button {
    min-height: 44px;
}
#google-pay-button > div,
#google-pay-button iframe,
#google-pay-button button {
    width: 100% !important;
    min-height: 44px;
}

@media (max-width: 640px) {
    .site-nav-link,
    .site-nav-button { width: auto; max-width: 100%; }
    #floating-cart { right: 1rem !important; bottom: 1rem !important; padding: .85rem !important; }
    #cartModal,
    #checkoutModal,
    #quoteModal {
        align-items: flex-start !important;
        padding: .75rem;
        overflow-y: auto;
    }
    #cartModal > div,
    #checkoutModal > div,
    #quoteModal > div {
        width: 100% !important;
        max-height: calc(100vh - 1.5rem) !important;
        padding: 1rem !important;
    }
    .cart-line,
    .order-item-row,
    .deck-preview-line { align-items: flex-start !important; }
    .cart-line-actions { align-items: flex-end; }
    .mobile-stack-buttons > * { width: 100%; }
    #card-container.square-card-field,
    #card-container { min-height: 88px; }
}

/* 2026-05 homepage visual polish and mobile category navigation fix */
:root {
    --dev-banner-height: 0px;
    --site-header-height: 0px;
    --category-nav-height: 0px;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}
body {
    background-image:
        radial-gradient(circle at 0 0, rgba(37, 99, 235, .16), transparent 34rem),
        radial-gradient(circle at 100% 5rem, rgba(219, 39, 119, .12), transparent 30rem),
        linear-gradient(180deg, rgba(17, 24, 39, 1), rgba(3, 7, 18, 1));
    background-attachment: fixed;
}
.site-header {
    top: var(--dev-banner-height) !important;
}
.category-nav {
    top: calc(var(--dev-banner-height) + var(--site-header-height)) !important;
}
.category-nav .container,
.category-scroll-track {
    min-width: 0;
}
.category-scroll-track {
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    mask-image: linear-gradient(to right, transparent 0, #000 1rem, #000 calc(100% - 1rem), transparent 100%);
}
.category-label,
.cat-tab,
.category-scroll-btn,
.feature-pill,
.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
}
.category-label,
.cat-tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
}
.cat-tab {
    min-height: 2.25rem;
    max-width: min(70vw, 22rem);
    padding: .5rem .9rem;
    border: 1px solid rgba(75, 85, 99, .72);
    border-radius: 9999px;
    background: rgba(17, 24, 39, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    touch-action: manipulation;
}
.cat-tab:hover,
.cat-tab.text-blue-400 {
    border-color: rgba(96, 165, 250, .72);
    background: rgba(37, 99, 235, .18);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .12), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.category-scroll-btn {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    border: 1px solid rgba(75, 85, 99, .7);
    background: rgba(17, 24, 39, .72);
    touch-action: manipulation;
}
.home-hero,
.category-title-card,
.hero-info-card,
.deck-product-card {
    position: relative;
    overflow: hidden;
}
.home-hero {
    background:
        linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(17, 24, 39, .92)),
        radial-gradient(circle at 20% 10%, rgba(59, 130, 246, .30), transparent 30rem),
        radial-gradient(circle at 90% 20%, rgba(236, 72, 153, .20), transparent 26rem);
    border: 1px solid rgba(96, 165, 250, .24);
    box-shadow: 0 18px 54px rgba(2, 6, 23, .36), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.home-hero-compact {
    min-height: auto;
}
.home-hero-foldable {
    transition: padding .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.home-hero-foldable.is-collapsed {
    padding: .55rem !important;
    border-color: rgba(96, 165, 250, .34);
    box-shadow: 0 12px 34px rgba(2, 6, 23, .28), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.home-hero-expanded {
    animation: decklabFadeIn .18s ease-out;
}
.home-hero-collapsed-button {
    display: flex;
    width: 100%;
    min-height: 3rem;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .65rem .8rem;
    border: 1px solid rgba(96, 165, 250, .24);
    border-radius: 1rem;
    background: rgba(2, 6, 23, .34);
    color: #dbeafe;
    text-align: left;
    cursor: pointer;
    touch-action: manipulation;
}
.home-hero-collapsed-button.hidden {
    display: none !important;
}
.home-hero-collapsed-button:hover {
    border-color: rgba(96, 165, 250, .48);
    background: rgba(37, 99, 235, .14);
}
.home-hero-collapsed-button > span:nth-child(2) {
    flex: 1 1 auto;
    min-width: 0;
}
.home-hero-collapsed-button .hero-details-arrow {
    flex: 0 0 auto;
}
.deck-image-panel {
    border: 1px solid rgba(96, 165, 250, .22);
    background: linear-gradient(135deg, rgba(15, 23, 42, .82), rgba(2, 6, 23, .74));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.deck-image-preview-frame {
    border: 1px solid rgba(75, 85, 99, .68);
    border-radius: .9rem;
    background: rgba(2, 6, 23, .72);
    overflow: hidden;
}
.deck-image-preview-frame img {
    display: block;
    width: 100%;
    max-height: min(78vh, 900px);
    object-fit: contain;
    background: #020617;
    -webkit-user-drag: none;
    user-select: none;
}
.home-hero > * {
    position: relative;
    z-index: 1;
}
.home-hero::before,
.deck-product-card::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(110deg, rgba(255, 255, 255, .08), transparent 26%, transparent 70%, rgba(255, 255, 255, .04));
    opacity: .45;
}
.hero-info-card {
    padding: 1rem;
    border: 1px solid rgba(75, 85, 99, .72);
    border-radius: 1rem;
    background: rgba(2, 6, 23, .42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.feature-pill {
    gap: .35rem;
    min-height: 2rem;
    padding: .45rem .75rem;
    border-radius: 9999px;
    font-size: .75rem;
    font-weight: 800;
    white-space: nowrap;
}
.hero-actions .site-nav-button {
    min-width: 10.5rem;
}
.hero-details-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    min-height: 2.5rem;
    padding: .65rem .85rem;
    border: 1px solid rgba(96, 165, 250, .24);
    border-radius: .9rem;
    background: rgba(2, 6, 23, .34);
    color: #bfdbfe;
    font-size: .85rem;
    font-weight: 800;
    cursor: pointer;
    touch-action: manipulation;
    list-style: none;
}
.hero-details-summary::-webkit-details-marker {
    display: none;
}
.hero-summary-close { display: none; }
.home-hero-details[open] .hero-summary-open { display: none; }
.home-hero-details[open] .hero-summary-close { display: inline; }
.hero-summary-label-close {
    display: none;
}
.home-hero-details[open] .hero-summary-label-open {
    display: none;
}
.home-hero-details[open] .hero-summary-label-close {
    display: inline;
}
.hero-details-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 9999px;
    border: 1px solid rgba(96, 165, 250, .24);
    background: rgba(37, 99, 235, .14);
    transition: transform .18s ease;
}
.home-hero-details[open] .hero-details-arrow {
    transform: rotate(180deg);
}
.hero-details-body {
    animation: decklabFadeIn .16s ease-out;
}
@keyframes decklabFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}
.trust-note {
    padding: .75rem 1rem;
    border: 1px solid rgba(75, 85, 99, .55);
    border-radius: .9rem;
    background: rgba(2, 6, 23, .36);
}
.category-title-card {
    background:
        linear-gradient(135deg, rgba(17, 24, 39, .88), rgba(15, 23, 42, .72)),
        radial-gradient(circle at 0 0, rgba(59, 130, 246, .12), transparent 20rem);
}
.view-toggle-btn {
    min-height: 2.25rem;
    padding: .35rem .8rem .45rem;
    border-radius: .8rem .8rem .35rem .35rem;
    border: 1px solid rgba(75, 85, 99, .55);
    background: rgba(17, 24, 39, .54);
}
.view-toggle-btn.active-tab,
.view-toggle-btn.text-blue-400 {
    border-color: rgba(96, 165, 250, .65);
    background: rgba(37, 99, 235, .14);
}
.deck-product-card {
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.deck-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, .45);
    box-shadow: 0 24px 60px rgba(2, 6, 23, .46);
}
.build-image-frame::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(to top, rgba(17, 24, 39, .86), transparent);
    pointer-events: none;
}
.build-summary {
    position: relative;
    z-index: 1;
}
.card-link,
.cart-line-info,
.deck-preview-line {
    min-width: 0;
}
.card-link {
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    .site-header {
        padding: .85rem !important;
    }
    .site-header nav {
        width: 100%;
        justify-content: flex-start;
    }
    .category-nav {
        padding-top: .55rem !important;
        padding-bottom: .55rem !important;
    }
    .category-nav .container {
        padding-left: .65rem !important;
        padding-right: .65rem !important;
        gap: .35rem !important;
    }
    .category-scroll-track {
        gap: .45rem !important;
        padding-left: .3rem !important;
        padding-right: .3rem !important;
    }
    .category-label {
        min-height: 2rem;
        padding: .45rem .65rem !important;
        font-size: .78rem !important;
    }
    .cat-tab {
        min-height: 2rem;
        max-width: 58vw;
        padding: .45rem .72rem;
        font-size: .82rem;
        letter-spacing: 0;
    }
    .category-scroll-btn {
        width: 1.9rem;
        height: 2rem;
        font-size: 1rem !important;
    }
    .home-hero {
        border-radius: 1.1rem !important;
    }
    .hero-actions .site-nav-button {
        width: 100%;
        min-width: 0;
    }
    .hero-details-summary {
        align-items: flex-start;
        font-size: .8rem;
        line-height: 1.35;
    }
    .feature-pill {
        white-space: normal;
        text-align: left;
    }
    .view-toggle-btn {
        flex: 1 1 auto;
        min-width: calc(50% - .5rem);
        border-radius: .75rem;
        padding: .55rem .7rem;
        font-size: .86rem;
    }
    .deck-product-card:hover {
        transform: none;
    }
    .cart-remove {
        opacity: 1 !important;
    }
}

@media (max-width: 390px) {
    .cat-tab {
        max-width: 54vw;
        font-size: .78rem;
    }
    .category-label {
        font-size: .72rem !important;
    }
}

#deck-list-start {
    scroll-margin-top: calc(var(--dev-banner-height) + var(--site-header-height) + var(--category-nav-height) + 1rem);
}

/* Collapsible homepage intro + generated deck image preview */
.home-hero-foldable {
    transition: padding .18s ease, border-radius .18s ease, box-shadow .18s ease;
}
.home-hero-foldable.is-collapsed {
    padding: .65rem .85rem !important;
    border-radius: 1rem !important;
    box-shadow: 0 10px 28px rgba(2, 6, 23, .28), inset 0 1px 0 rgba(255, 255, 255, .05);
}
.home-hero-collapsed-button {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 2.45rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    text-align: left;
    touch-action: manipulation;
}
.deck-image-tools {
    border: 1px solid rgba(96, 165, 250, .26);
    background: linear-gradient(135deg, rgba(15, 23, 42, .90), rgba(2, 6, 23, .72));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.deck-image-preview-wrap {
    background: rgba(2, 6, 23, .55);
    border: 1px solid rgba(75, 85, 99, .62);
    border-radius: .9rem;
    overflow: hidden;
}
.deck-image-preview-wrap img {
    display: block;
    width: 100%;
    max-height: 540px;
    object-fit: contain;
    background: #020617;
}
.deck-image-preview-placeholder {
    min-height: 10rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    color: #64748b;
    text-align: center;
    font-size: .85rem;
    line-height: 1.6;
}
@media (max-width: 768px) {
    .home-hero-collapsed-button {
        align-items: flex-start;
    }
    .deck-image-preview-wrap img {
        max-height: 420px;
    }
}

/* Store single-card search in the environment bar */
.category-nav-inner,
.category-nav-tabs,
.store-single-search {
    min-width: 0;
}
.store-single-search {
    flex: 0 0 auto;
}
.store-single-search-input {
    min-height: 2.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.store-single-search-submit,
#storeSingleSearchBack {
    min-height: 2.35rem;
    touch-action: manipulation;
}
.store-single-result-card {
    min-width: 0;
}
.store-single-result-card .card-link {
    width: 100%;
}
.store-single-location {
    max-width: 100%;
}
@media (max-width: 1280px) {
    .store-single-search {
        width: 100%;
    }
}
@media (max-width: 768px) {
    .category-nav-inner {
        gap: .5rem !important;
    }
    .store-single-search {
        padding-top: .15rem;
    }
    .store-single-search-input {
        min-height: 2.25rem;
        font-size: .82rem;
    }
    .store-single-search-submit,
    #storeSingleSearchBack {
        min-height: 2.25rem;
        padding-left: .75rem !important;
        padding-right: .75rem !important;
    }
}

/* Ensure Tailwind's hidden state wins inside generated deck preview frames. */
.deck-image-preview-frame img.hidden,
.deck-image-preview-frame .deck-image-preview-placeholder.hidden {
    display: none !important;
}
.deck-image-preview-frame .deck-image-preview-placeholder {
    min-height: 9rem;
}

/* DeckLab poi brand logo */
.poi-logo-link {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    min-width: 0;
    text-decoration: none;
    color: #e5e7eb;
}
.poi-logo-img {
    width: clamp(4.6rem, 10vw, 7.5rem);
    height: auto;
    flex: 0 0 auto;
    border-radius: 1rem;
    background: #020617;
    border: 1px solid rgba(148, 163, 184, .24);
    box-shadow: 0 14px 34px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255,255,255,.05);
    -webkit-user-drag: none;
    user-select: none;
}
.poi-logo-link-sm .poi-logo-img {
    width: clamp(3.8rem, 8vw, 5.6rem);
    border-radius: .8rem;
}
.poi-logo-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.05;
}
.poi-logo-title {
    font-size: clamp(1.1rem, 2vw, 1.75rem);
    font-weight: 1000;
    color: #bfdbfe;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-shadow: 0 0 22px rgba(59, 130, 246, .24);
}
.poi-logo-subtitle {
    margin-top: .25rem;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .12em;
    color: #e5e7eb;
    opacity: .82;
    white-space: nowrap;
}
.poi-logo-link:hover .poi-logo-title { color: #dbeafe; }
.poi-logo-mark-only .poi-logo-text { display: none; }
.auth-logo-block {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}
.auth-logo-block .poi-logo-img {
    width: min(12rem, 70vw);
}
@media (max-width: 640px) {
    .poi-logo-link { gap: .55rem; }
    .poi-logo-subtitle { display: none; }
    .poi-logo-link-sm .poi-logo-img { width: 4.2rem; }
    .poi-logo-title { font-size: 1rem; letter-spacing: .04em; }
}

/* 2026-05 compact home header + quote rarity image preview */
.site-header-compact {
    padding-top: .55rem !important;
    padding-bottom: .55rem !important;
}
.site-header-compact .container {
    gap: .55rem;
}
.poi-logo-link-compact {
    gap: .65rem;
}
.poi-logo-link-compact .poi-logo-img {
    width: clamp(3.5rem, 6.8vw, 5.25rem);
    border-radius: .78rem;
}
.site-header-compact .poi-logo-title {
    font-size: clamp(1rem, 1.75vw, 1.55rem);
    letter-spacing: .07em;
}
.site-header-compact .poi-logo-subtitle {
    margin-top: .16rem;
    font-size: .58rem;
    letter-spacing: .10em;
}
.top-nav-compact .site-nav-link,
.top-nav-compact .site-nav-button {
    min-height: 2rem;
    padding: .34rem .62rem;
    border-radius: .5rem;
    font-size: .9rem;
    line-height: 1.12;
}
.home-hero-compact .feature-pill {
    min-height: 1.65rem;
    padding: .32rem .55rem;
    font-size: .70rem;
    border-radius: 9999px;
}
.hero-info-card-compact {
    padding: .68rem .82rem;
    border-radius: .85rem;
}
.build-image-frame {
    min-height: 16rem;
}
.quote-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(225px, 1fr));
    gap: .65rem;
    align-content: start;
}
.quote-card-cell {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}
.quote-price-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.1rem;
    padding: .42rem .72rem;
    border-radius: .72rem;
    font-size: .75rem;
    line-height: 1.12;
    font-weight: 900;
    white-space: nowrap;
    touch-action: manipulation;
}
.quote-rarity-select {
    min-height: 2.2rem;
}
.cart-estimate-body {
    overflow: hidden;
}
#cartDeckImagePanel .deck-image-preview-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 18rem;
}
#cartDeckImagePanel .deck-image-preview-frame img {
    max-height: min(54vh, 720px);
}
@media (min-width: 1536px) {
    .build-image-frame {
        min-height: 34rem;
    }
}
@media (max-width: 1024px) {
    .cart-estimate-body {
        overflow-y: auto;
    }
    #cartDeckImagePanel .deck-image-preview-frame img {
        max-height: 58vh;
    }
}
@media (max-width: 640px) {
    .site-header-compact .container {
        gap: .45rem;
    }
    .poi-logo-link-compact .poi-logo-img {
        width: 3.6rem;
    }
    .top-nav-compact .site-nav-link,
    .top-nav-compact .site-nav-button {
        min-height: 1.9rem;
        padding: .32rem .5rem;
        font-size: .8rem;
    }
    .quote-card-grid {
        grid-template-columns: 1fr;
    }
    .quote-price-mode-btn {
        flex: 1 1 auto;
        min-height: 2rem;
        padding: .42rem .55rem;
        font-size: .72rem;
    }
    .build-image-frame {
        min-height: 17rem;
    }
}

/* 2026-05 admin/home continuation refinements */
@media (min-width: 1280px) {
    .store-single-search {
        flex: 0 0 min(27vw, 26rem);
    }
    .category-nav-tabs {
        flex: 1 1 auto;
    }
    .cat-tab {
        min-height: 2.45rem;
        padding: .58rem 1.05rem;
        font-size: .96rem;
        font-weight: 800;
    }
    .category-label {
        min-height: 2.35rem;
        padding: .5rem .85rem !important;
        font-size: .9rem !important;
    }
}
.deck-card-grid .deck-product-card {
    min-width: 0;
}
@media (min-width: 1280px) {
    .build-image-frame {
        min-height: 22rem;
    }
}
@media (min-width: 1536px) {
    .build-image-frame {
        min-height: 24rem;
    }
}
@media (max-width: 640px) {
    .deck-card-grid {
        gap: 1rem !important;
    }
}
.admin-category-card {
    padding: .75rem .85rem !important;
}
.admin-category-card h3 {
    font-size: .95rem;
    line-height: 1.25;
}
.admin-category-description {
    max-height: 3.3rem;
    overflow-y: auto;
    line-height: 1.45;
    scrollbar-width: thin;
}
.admin-order-mini-btn {
    min-height: 1.75rem;
    padding: .22rem .48rem;
    border-radius: .45rem;
    font-size: .68rem;
    font-weight: 900;
    line-height: 1.1;
    border: 1px solid rgba(75, 85, 99, .74);
    background: rgba(31, 41, 55, .86);
    color: #cbd5e1;
}
.admin-order-mini-btn:hover:not(:disabled) {
    background: rgba(55, 65, 81, .96);
    color: #fff;
}
.admin-order-mini-btn:disabled {
    opacity: .36;
    cursor: not-allowed;
}
.admin-single-list {
    content-visibility: auto;
    contain-intrinsic-size: 720px;
}
.admin-single-card {
    min-height: 18.5rem;
}
.admin-single-card.is-batch-hidden {
    display: none !important;
}
.admin-single-card img[data-src] {
    min-height: 6rem;
}
.admin-single-lazy-placeholder {
    background: radial-gradient(circle at center, rgba(59,130,246,.14), rgba(2,6,23,.76));
}
.admin-link-suggest-box {
    max-height: 18rem;
    overflow-y: auto;
    scrollbar-width: thin;
}

/* 2026-05 v3 requested refinements: wider deck gallery, longer meta tabs, compact single-card search */
.home-wide-container {
    width: 100%;
    max-width: 1960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: .55rem;
    padding-right: .55rem;
    box-sizing: border-box;
}
.store-single-search-input {
    min-width: 0;
}
@media (min-width: 640px) {
    .home-wide-container {
        padding-left: .75rem;
        padding-right: .75rem;
    }
}
@media (min-width: 1280px) {
    .category-nav-inner {
        gap: .45rem !important;
    }
    .category-nav-tabs {
        flex: 1 1 calc(100% - 14.5rem) !important;
    }
    .store-single-search {
        flex: 0 0 clamp(11rem, 12vw, 14.5rem) !important;
        min-width: 11rem !important;
        max-width: 14.5rem !important;
        gap: .35rem !important;
    }
    .store-single-search-input {
        font-size: .76rem !important;
        padding-left: .5rem !important;
        padding-right: .5rem !important;
    }
    .store-single-search-submit,
    #storeSingleSearchBack {
        padding-left: .55rem !important;
        padding-right: .55rem !important;
        font-size: .76rem !important;
    }
    #categoryContainer {
        gap: .78rem !important;
        padding-left: .25rem !important;
        padding-right: .25rem !important;
    }
    .cat-tab {
        min-height: 2.72rem;
        min-width: max-content;
        max-width: min(82vw, 34rem) !important;
        padding: .72rem 1.78rem !important;
        font-size: 1.04rem;
        border-radius: 9999px;
        flex: 0 0 auto;
    }
    .category-label {
        min-height: 2.58rem;
        padding-left: 1.1rem !important;
        padding-right: 1.1rem !important;
    }
    .category-scroll-btn {
        flex: 0 0 2.25rem;
    }
    .deck-card-grid {
        gap: .85rem !important;
    }
    .build-image-frame {
        min-height: 32rem;
    }
}
@media (min-width: 1536px) {
    .home-wide-container {
        padding-left: .8rem;
        padding-right: .8rem;
    }
    .build-image-frame {
        min-height: 36rem;
    }
}
@media (min-width: 1800px) {
    .home-wide-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .build-image-frame {
        min-height: 38rem;
    }
}
@media (max-width: 1279px) {
    .home-wide-container {
        max-width: 100%;
    }
}

/* 2026-05 mobile rarity quote refinements */
#card-tooltip {
    z-index: 100000 !important;
    max-width: min(92vw, 24rem);
}
.quote-card-name-button,
.quote-slot-row,
.quote-slot-list,
.quote-selection-summary,
.cart-line-info {
    min-width: 0;
}
.quote-card-name-button,
.break-anywhere {
    overflow-wrap: anywhere;
    word-break: break-word;
}
.quote-slot-row select,
.quote-rarity-select {
    width: 100%;
    max-width: 100%;
}
@media (max-width: 1180px) {
    #cartModal {
        align-items: flex-start !important;
        padding: .5rem !important;
        overflow-y: auto !important;
    }
    #cartModal > div {
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100dvh - 1rem) !important;
    }
    .cart-estimate-body {
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
        gap: .85rem !important;
        padding-right: .1rem;
    }
    #cartModal .cart-estimate-body > div:first-child {
        flex: none !important;
        min-height: auto !important;
        overflow: visible !important;
    }
    #cartItems.quote-card-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
        overflow: visible !important;
        flex: none !important;
        height: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        padding-right: 0 !important;
        margin-bottom: 0 !important;
    }
    #cartDeckImagePanel {
        flex: none !important;
        width: 100%;
        min-height: auto !important;
    }
    #cartDeckImagePanel .deck-image-preview-frame {
        min-height: 12rem !important;
        max-height: 42vh;
        overflow: auto;
    }
    #cartDeckImagePanel .deck-image-preview-frame img {
        max-height: 40vh !important;
    }
}
@media (max-width: 640px) {
    #cartModal > div {
        min-height: calc(100dvh - .8rem);
        border-radius: .85rem !important;
        padding: .9rem !important;
    }
    #cartModalTitle {
        font-size: 1.25rem !important;
        line-height: 1.25;
    }
    .quote-card-cell {
        padding: .75rem !important;
    }
    .quote-rarity-select {
        font-size: .75rem !important;
        min-height: 2.45rem;
    }
    .quote-slot-title {
        width: 100% !important;
    }
    #cartTotal {
        font-size: 2.25rem !important;
        line-height: 1.05;
        overflow-wrap: anywhere;
    }
    #cartDeckImagePanel .deck-image-preview-frame {
        min-height: 10rem !important;
    }
}

/* 2026-06 ordering rarity detail folding + homepage deck image notice */
.build-image-frame {
    cursor: zoom-in;
}
.build-image-frame::after {
    z-index: 1;
}
.build-image-frame img {
    pointer-events: none;
}
.build-image-disclaimer {
    position: absolute;
    top: .75rem;
    right: .75rem;
    left: 6.5rem;
    z-index: 20;
    display: block;
    padding: .42rem .62rem;
    border: 1px solid rgba(250, 204, 21, .28);
    border-radius: .75rem;
    background: rgba(0, 0, 0, .68);
    color: #fef3c7;
    font-size: .72rem;
    line-height: 1.35;
    font-weight: 900;
    text-align: right;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .28);
    backdrop-filter: blur(5px);
}
.build-image-zoom-hint {
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    z-index: 20;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.55rem;
    padding: .24rem .55rem;
    border: 1px solid rgba(96, 165, 250, .34);
    border-radius: 9999px;
    background: rgba(2, 6, 23, .72);
    color: #bfdbfe;
    font-size: .68rem;
    line-height: 1.1;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(2, 6, 23, .35);
}
.quote-detail-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    min-height: 1.75rem;
    padding: .24rem .5rem;
    border: 1px solid rgba(148, 163, 184, .36);
    border-radius: 9999px;
    background: rgba(15, 23, 42, .78);
    color: #cbd5e1;
    font-size: .66rem;
    line-height: 1;
    font-weight: 900;
    white-space: nowrap;
    touch-action: manipulation;
    transition: border-color .16s ease, background .16s ease, color .16s ease;
}
.quote-detail-toggle:not(:disabled):hover {
    border-color: rgba(96, 165, 250, .62);
    background: rgba(37, 99, 235, .18);
    color: #dbeafe;
}
.quote-detail-arrow {
    display: inline-block;
    font-size: .95rem;
    line-height: 1;
    transform-origin: center;
    transition: transform .16s ease;
}
.quote-rarity-static {
    min-height: 2.2rem;
    display: flex;
    align-items: center;
}
.adjust-inventory-toggle {
    min-height: 1.55rem;
    padding: .12rem .34rem;
}
.adjust-inventory-toggle .quote-detail-arrow {
    font-size: 1rem;
}
.adjust-inventory-compact {
    line-height: 1.25;
}
@media (max-width: 640px) {
    .build-image-disclaimer {
        top: 2.9rem;
        left: .75rem;
        right: .75rem;
        text-align: center;
        font-size: .68rem;
    }
    .build-image-zoom-hint {
        font-size: .64rem;
        bottom: .55rem;
        right: .55rem;
    }
    .quote-detail-toggle {
        padding: .25rem .42rem;
        min-height: 1.7rem;
    }
    .quote-detail-toggle .quote-detail-label:not(.sr-only) {
        display: none;
    }
}

/* 2026-06 CS homepage ticker + wider compact header */
.home-header-v2 {
    padding: .48rem 0 !important;
}
.home-header-v2-inner {
    display: grid;
    grid-template-columns: minmax(17rem, 30rem) minmax(0, 1fr);
    align-items: center;
    gap: .65rem;
}
.home-header-brand {
    display: flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
}
.home-header-brand .poi-logo-link {
    flex: 0 1 auto;
}
.home-header-kana {
    flex: 0 0 auto;
}
.home-header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .45rem;
    flex-wrap: nowrap;
    min-width: 0;
}
.home-header-nav-main,
.home-header-nav-user {
    display: flex;
    align-items: center;
    gap: .42rem;
    min-width: 0;
}
.home-header-nav-main {
    flex: 1 1 auto;
    justify-content: flex-start;
    flex-wrap: wrap;
}
.home-header-nav-user {
    flex: 0 0 auto;
    justify-content: flex-end;
    flex-wrap: wrap;
}
.home-header-nav .site-nav-link,
.home-header-nav .site-nav-button {
    white-space: nowrap;
}
.home-cs-alert-bar {
    min-height: 2.6rem;
    box-shadow: 0 14px 30px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.cs-home-ticker-track {
    will-change: transform;
}
#homeCsTicker + #categoryNav {
    margin-top: .65rem !important;
}
@media (min-width: 1280px) {
    .home-header-v2-inner {
        grid-template-columns: minmax(18.5rem, 32rem) minmax(0, 1fr);
    }
    .home-header-v2 .poi-logo-link-compact .poi-logo-img {
        width: clamp(3.15rem, 4.8vw, 4.55rem);
    }
    .home-header-v2 .poi-logo-title {
        font-size: clamp(.98rem, 1.35vw, 1.36rem);
        letter-spacing: .06em;
    }
    .home-header-v2 .poi-logo-subtitle {
        font-size: .52rem;
        letter-spacing: .09em;
    }
    .home-header-v2 .top-nav-compact .site-nav-link,
    .home-header-v2 .top-nav-compact .site-nav-button {
        min-height: 1.95rem;
        padding: .31rem .52rem;
        border-radius: .48rem;
        font-size: .8rem;
    }
}
@media (min-width: 1536px) {
    .home-header-v2-inner {
        grid-template-columns: minmax(20rem, 35rem) minmax(0, 1fr);
    }
    .home-header-v2 .top-nav-compact .site-nav-link,
    .home-header-v2 .top-nav-compact .site-nav-button {
        font-size: .86rem;
        padding-left: .6rem;
        padding-right: .6rem;
    }
}
@media (max-width: 1279px) {
    .home-header-v2-inner {
        grid-template-columns: 1fr;
        align-items: start;
    }
    .home-header-nav {
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
        flex-wrap: wrap;
    }
    .home-header-nav-main,
    .home-header-nav-user {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
}
@media (max-width: 640px) {
    .home-header-v2 {
        padding-top: .4rem !important;
        padding-bottom: .45rem !important;
    }
    .home-header-brand {
        gap: .5rem;
    }
    .home-header-nav-main,
    .home-header-nav-user {
        gap: .35rem;
    }
    .home-cs-alert-bar {
        border-radius: 1rem !important;
    }
}


/* Mobile scroll flicker stabilization
   Keep the document itself scrollable on phones; do not promote body/header/main
   to their own GPU layers because iOS Safari can stop page scrolling or flicker. */
html, body {
  width: 100%;
  max-width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
body {
  background-color: #111827;
}
@supports (-webkit-touch-callout: none) {
  body { background-attachment: scroll !important; }
}
@media (hover: none), (pointer: coarse), (max-width: 768px) {
  html, body {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    overscroll-behavior-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  body {
    position: static !important;
    overflow-y: auto !important;
    touch-action: pan-y;
  }
  header, main {
    transform: none !important;
    will-change: auto !important;
  }
  .bg-gray-800, .bg-gray-900 {
    transform: none !important;
  }
  .deck-product-card,
  .build-image-frame,
  .deck-image-preview-frame,
  .payment-shell {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
  }
  #cartModal,
  #checkoutModal,
  #quoteModal,
  #deckImageModal,
  #card-tooltip,
  .backdrop-blur,
  .backdrop-blur-sm,
  .backdrop-blur-md {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }
  .build-image-frame img,
  .deck-image-preview-frame img,
  .poi-logo-img {
    transform: translateZ(0);
    will-change: auto;
  }
  input, textarea, select { font-size: 16px; }
}

/* Custom / adjust purchase panels: keep headings readable and avoid side-by-side squeezing. */
#adjustPurchasePanel > div:first-child,
#customPurchasePanel > div:first-child {
  align-items: stretch !important;
}
#adjustPurchasePanel > div:first-child > div,
#customPurchasePanel > div:first-child > div {
  width: 100%;
  min-width: 0;
}
#adjustPurchasePanel h3,
#customPurchasePanel h3 {
  overflow-wrap: normal;
  word-break: keep-all;
  white-space: normal;
}
#adjustPurchasePanel p,
#customPurchasePanel p {
  overflow-wrap: break-word;
  word-break: normal;
  max-width: 100%;
}
#adjustPurchasePanel .quote-price-mode-btn,
#customPurchasePanel .quote-price-mode-btn {
  flex: 1 1 9rem;
}
@media (max-width: 640px) {
  #adjustPurchasePanel,
  #customPurchasePanel {
    padding: .85rem !important;
  }
  #adjustPurchasePanel .quote-price-mode-btn,
  #customPurchasePanel .quote-price-mode-btn {
    flex: 1 1 100%;
  }
}


/* 2026-06 v4 homepage mobile image flicker fix
   Heavy fixed backgrounds, hover opacity transitions and GPU promotion can cause card images to blink on mobile Safari/Chrome while decoding or scrolling. */
@media (hover: none), (pointer: coarse), (max-width: 768px) {
  body {
    background-attachment: scroll !important;
    background-image: linear-gradient(180deg, #111827 0%, #030712 100%) !important;
  }
  .home-hero::before,
  .deck-product-card::before {
    display: none !important;
  }
  .deck-product-card,
  .build-image-frame,
  .store-single-result-card,
  .deck-image-preview-frame {
    contain: paint;
    transform: none !important;
    will-change: auto !important;
  }
  .deck-product-card,
  .deck-product-card *,
  .build-summary,
  .build-image-frame,
  .build-image-frame *,
  .store-single-result-card,
  .store-single-result-card * {
    transition-property: none !important;
    animation-duration: 0.001ms !important;
  }
  .build-image-frame img,
  .deck-product-card img,
  .store-single-result-card img,
  .deck-image-preview-frame img,
  #deckImageModalImg {
    opacity: 1 !important;
    transform: none !important;
    will-change: auto !important;
    -webkit-backface-visibility: visible !important;
    backface-visibility: visible !important;
  }
}

/* 2026-06 mobile app-style homepage redesign */
.mobile-header-user,
.mobile-home-app,
.mobile-deck-quick-actions {
    display: none;
}

@media (max-width: 768px) {
    .home-header-v2 {
        padding: .48rem 0 !important;
        border-bottom-color: rgba(30, 41, 59, .86) !important;
        background: rgba(3, 7, 18, .96) !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .28) !important;
    }
    .home-header-v2-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto !important;
        align-items: center !important;
        gap: .55rem !important;
        padding-left: .85rem !important;
        padding-right: .85rem !important;
    }
    .home-header-nav {
        display: none !important;
    }
    .home-header-brand {
        gap: .5rem !important;
        min-width: 0;
    }
    .home-header-kana {
        display: none !important;
    }
    .home-header-v2 .poi-logo-link-compact {
        gap: .55rem !important;
        min-width: 0;
    }
    .home-header-v2 .poi-logo-link-compact .poi-logo-img {
        width: 2.55rem !important;
        border-radius: .72rem !important;
        box-shadow: 0 8px 18px rgba(0, 0, 0, .30) !important;
    }
    .home-header-v2 .poi-logo-title {
        font-size: 1.08rem !important;
        line-height: 1 !important;
        letter-spacing: .065em !important;
        color: #dbeafe !important;
        white-space: nowrap;
    }
    .home-header-v2 .poi-logo-subtitle {
        display: none !important;
    }
    .mobile-header-user {
        display: flex;
        justify-content: flex-end;
        align-items: center;
    }
    .mobile-header-user-button {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.55rem;
        height: 2.55rem;
        border-radius: 9999px;
        border: 1px solid rgba(96, 165, 250, .32);
        background: radial-gradient(circle at 30% 20%, rgba(96, 165, 250, .28), rgba(15, 23, 42, .96));
        color: #dbeafe;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 22px rgba(2, 6, 23, .30);
        text-decoration: none;
        touch-action: manipulation;
    }
    .mobile-header-avatar {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        font-weight: 1000;
        font-size: 1rem;
        line-height: 1;
    }
    .mobile-header-avatar-guest {
        font-size: 1.12rem;
    }
    .mobile-header-badge {
        position: absolute;
        top: -.25rem;
        right: -.25rem;
        min-width: 1.05rem;
        height: 1.05rem;
        padding: 0 .25rem;
        border-radius: 9999px;
        border: 2px solid #030712;
        background: #ef4444;
        color: #fff;
        font-size: .62rem;
        font-weight: 1000;
        line-height: .92rem;
        text-align: center;
    }

    .mobile-home-app {
        display: block;
        padding: .75rem .85rem 0 !important;
    }
    #homeIntroSection,
    #homeCsTicker {
        display: none !important;
    }
    .mobile-promo-carousel {
        position: relative;
        margin-bottom: .78rem;
    }
    .mobile-promo-track {
        display: flex;
        gap: .72rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
        padding-bottom: .15rem;
    }
    .mobile-promo-slide {
        position: relative;
        flex: 0 0 100%;
        min-height: 9.8rem;
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: .7rem;
        overflow: hidden;
        padding: .95rem;
        border-radius: 1.28rem;
        border: 1px solid rgba(148, 163, 184, .22);
        color: #fff;
        text-decoration: none;
        scroll-snap-align: start;
        box-shadow: 0 18px 40px rgba(0, 0, 0, .26), inset 0 1px 0 rgba(255,255,255,.08);
        isolation: isolate;
    }
    .mobile-promo-slide::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: radial-gradient(circle at 80% 12%, rgba(255,255,255,.18), transparent 35%), radial-gradient(circle at 15% 95%, rgba(59,130,246,.22), transparent 44%);
    }
    .mobile-promo-primary {
        background: linear-gradient(135deg, #0f172a 0%, #172554 46%, #020617 100%);
        border-color: rgba(96, 165, 250, .34);
    }
    .mobile-promo-custom {
        background: linear-gradient(135deg, #111827 0%, #6d28d9 45%, #020617 100%);
        border-color: rgba(167, 139, 250, .38);
    }
    .mobile-promo-service {
        background: linear-gradient(135deg, #1f1b06 0%, #713f12 46%, #020617 100%);
        border-color: rgba(251, 191, 36, .32);
    }
    .mobile-promo-buyback {
        background: linear-gradient(135deg, #052e2b 0%, #065f46 46%, #020617 100%);
        border-color: rgba(52, 211, 153, .32);
    }
    .mobile-promo-lottery {
        background: linear-gradient(135deg, #2e1065 0%, #a21caf 44%, #020617 100%);
        border-color: rgba(244, 114, 182, .45);
    }
    .mobile-promo-lottery::before {
        background: radial-gradient(circle at 82% 14%, rgba(253, 224, 71, .28), transparent 34%), radial-gradient(circle at 12% 88%, rgba(244, 114, 182, .24), transparent 45%);
    }
    .mobile-promo-shipping {
        background: linear-gradient(135deg, #1c1917 0%, #92400e 44%, #020617 100%);
        border-color: rgba(251, 191, 36, .40);
    }
    .mobile-promo-shipping::before {
        background: radial-gradient(circle at 82% 16%, rgba(253, 230, 138, .30), transparent 35%), radial-gradient(circle at 12% 88%, rgba(251, 146, 60, .20), transparent 44%);
    }
    .mobile-promo-copy {
        position: relative;
        z-index: 1;
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: .32rem;
    }
    .mobile-promo-eyebrow {
        width: fit-content;
        max-width: 100%;
        padding: .18rem .48rem;
        border-radius: 9999px;
        background: rgba(2, 6, 23, .44);
        border: 1px solid rgba(255,255,255,.18);
        color: rgba(219, 234, 254, .96);
        font-size: .62rem;
        line-height: 1.1;
        font-weight: 1000;
        letter-spacing: .12em;
        text-transform: uppercase;
        white-space: nowrap;
    }
    .mobile-promo-copy strong {
        display: block;
        color: #fff;
        font-size: 1.2rem;
        line-height: 1.12;
        font-weight: 1000;
        letter-spacing: -.02em;
        text-shadow: 0 8px 20px rgba(0, 0, 0, .26);
    }
    .mobile-promo-text {
        max-width: 13.5rem;
        color: rgba(226, 232, 240, .86);
        font-size: .72rem;
        line-height: 1.35;
        font-weight: 700;
    }
    .mobile-promo-cta {
        width: fit-content;
        margin-top: .16rem;
        padding: .38rem .68rem;
        border-radius: 9999px;
        background: rgba(255, 255, 255, .14);
        border: 1px solid rgba(255, 255, 255, .22);
        color: #fff;
        font-size: .68rem;
        font-weight: 1000;
        line-height: 1;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
    }
    .mobile-promo-art {
        flex: 0 0 42%;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 7rem;
        max-width: 11rem;
        border-radius: 1rem;
        background: rgba(2, 6, 23, .48);
        border: 1px solid rgba(255, 255, 255, .12);
        overflow: hidden;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    }
    .mobile-promo-art img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        opacity: .98 !important;
        transform: none !important;
    }
    .mobile-promo-symbol {
        flex: 0 0 6.5rem;
        align-self: center;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 6.5rem;
        height: 6.5rem;
        border-radius: 9999px;
        background: rgba(255, 255, 255, .13);
        border: 1px solid rgba(255, 255, 255, .18);
        font-size: 3rem;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.10);
    }
    .mobile-promo-dots {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: .35rem;
        margin-top: .48rem;
    }
    .mobile-promo-dots button {
        width: .42rem;
        height: .42rem;
        border: 0;
        border-radius: 9999px;
        background: rgba(148, 163, 184, .40);
        transition: width .18s ease, background .18s ease;
    }
    .mobile-promo-dots button.is-active {
        width: 1.25rem;
        background: rgba(96, 165, 250, .95);
    }
    .mobile-promo-shipping-visual {
        flex: 0 0 7rem;
        align-self: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 7rem;
        min-height: 7rem;
        border-radius: 1.15rem;
        background: rgba(2, 6, 23, .42);
        border: 1px solid rgba(254, 243, 199, .20);
        color: #fef3c7;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 14px 28px rgba(0,0,0,.18);
    }
    .mobile-promo-shipping-icon {
        font-size: 1.55rem;
        line-height: 1;
        margin-bottom: .12rem;
        filter: drop-shadow(0 8px 14px rgba(0,0,0,.25));
    }
    .mobile-promo-shipping-days {
        font-size: 2rem;
        line-height: .95;
        font-weight: 1000;
        letter-spacing: -.06em;
        color: #fde68a;
        text-shadow: 0 8px 18px rgba(0,0,0,.24);
    }
    .mobile-promo-shipping-label {
        margin-top: .16rem;
        font-size: .62rem;
        line-height: 1;
        font-weight: 1000;
        letter-spacing: .18em;
        color: rgba(254, 243, 199, .78);
        text-transform: uppercase;
    }

    .mobile-shortcut-row {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(4.65rem, 1fr);
        gap: .54rem;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        overscroll-behavior-x: contain;
        -webkit-overflow-scrolling: touch;
        padding: .05rem .02rem .62rem;
    }
    .mobile-shortcut {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: .32rem;
        min-height: 4.55rem;
        padding: .55rem .35rem;
        border-radius: 1rem;
        border: 1px solid rgba(148, 163, 184, .18);
        background: rgba(15, 23, 42, .78);
        color: #e5e7eb;
        text-decoration: none;
        scroll-snap-align: start;
        box-shadow: 0 10px 24px rgba(2, 6, 23, .18), inset 0 1px 0 rgba(255,255,255,.05);
        touch-action: manipulation;
    }
    .mobile-shortcut-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2rem;
        height: 2rem;
        border-radius: .78rem;
        background: rgba(255, 255, 255, .10);
        font-size: 1.15rem;
        line-height: 1;
    }
    .mobile-shortcut-text {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        color: rgba(226, 232, 240, .94);
        font-size: .66rem;
        line-height: 1.05;
        font-weight: 1000;
        white-space: nowrap;
    }
    .mobile-shortcut-blue { border-color: rgba(96, 165, 250, .28); background: rgba(30, 64, 175, .20); }
    .mobile-shortcut-slate { border-color: rgba(148, 163, 184, .22); }
    .mobile-shortcut-yellow { border-color: rgba(250, 204, 21, .30); background: rgba(113, 63, 18, .22); }
    .mobile-shortcut-emerald { border-color: rgba(52, 211, 153, .28); background: rgba(6, 95, 70, .22); }
    .mobile-shortcut-amber { border-color: rgba(251, 191, 36, .30); background: rgba(120, 53, 15, .22); }
    .mobile-shortcut-pink { border-color: rgba(244, 114, 182, .30); background: rgba(131, 24, 67, .20); }
    .mobile-shortcut-lottery { border-color: rgba(217, 70, 239, .34); background: rgba(112, 26, 117, .24); }
    .mobile-shortcut-orange { border-color: rgba(251, 146, 60, .30); background: rgba(154, 52, 18, .20); }

    #categoryNav {
        top: calc(var(--dev-banner-height, 0px) + var(--site-header-height, 0px)) !important;
        z-index: 31 !important;
        margin-top: .25rem !important;
        padding: .44rem 0 !important;
        border-top: 1px solid rgba(30, 41, 59, .76) !important;
        border-bottom: 1px solid rgba(30, 41, 59, .48) !important;
        background: rgba(3, 7, 18, .90) !important;
        box-shadow: 0 10px 22px rgba(2, 6, 23, .18) !important;
    }
    .category-nav-inner {
        gap: .35rem !important;
        padding-left: .85rem !important;
        padding-right: .85rem !important;
    }
    .category-nav-tabs {
        gap: 0 !important;
        width: 100% !important;
    }
    #scrollLeft,
    #scrollRight,
    .category-label,
    .store-single-search,
    #categoryNav > .category-nav-inner > .site-nav-button {
        display: none !important;
    }
    #categoryContainer {
        gap: .46rem !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 1.2rem), transparent 100%) !important;
    }
    .cat-tab {
        min-height: 2rem !important;
        max-width: 68vw !important;
        padding: .44rem .72rem !important;
        border-radius: 9999px !important;
        font-size: .76rem !important;
        font-weight: 900 !important;
        line-height: 1.05 !important;
        letter-spacing: 0 !important;
        background: rgba(15, 23, 42, .92) !important;
        border-color: rgba(71, 85, 105, .78) !important;
        color: #cbd5e1 !important;
        box-shadow: none !important;
    }
    .cat-tab.text-blue-400,
    .cat-tab.active-tab {
        color: #bfdbfe !important;
        background: rgba(37, 99, 235, .22) !important;
        border-color: rgba(96, 165, 250, .60) !important;
    }

    #deck-list-start {
        padding: .7rem .85rem 5.2rem !important;
        scroll-margin-top: calc(var(--dev-banner-height, 0px) + var(--site-header-height, 0px) + var(--category-nav-height, 0px) + .6rem) !important;
    }
    .category-title-card {
        display: none !important;
    }
    .view-toggle-bar {
        margin-bottom: .72rem !important;
        padding-bottom: 0 !important;
        border-bottom: 0 !important;
        gap: .42rem !important;
    }
    .view-toggle-btn {
        flex: 1 1 0 !important;
        min-width: 0 !important;
        min-height: 2.18rem !important;
        padding: .54rem .45rem !important;
        border: 1px solid rgba(71, 85, 105, .80) !important;
        border-radius: .88rem !important;
        background: rgba(15, 23, 42, .76) !important;
        color: #cbd5e1 !important;
        font-size: .74rem !important;
        line-height: 1.05 !important;
        font-weight: 1000 !important;
        white-space: nowrap;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
    }
    .view-toggle-btn.active-tab,
    .view-toggle-btn.border-blue-400 {
        border-bottom-width: 1px !important;
        border-color: rgba(96, 165, 250, .62) !important;
        background: rgba(37, 99, 235, .22) !important;
        color: #bfdbfe !important;
    }
    .deck-card-grid {
        gap: .95rem !important;
    }
    .deck-product-card {
        border-radius: 1.14rem !important;
        border-color: rgba(71, 85, 105, .78) !important;
        background: rgba(15, 23, 42, .92) !important;
        box-shadow: 0 18px 38px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255,255,255,.04) !important;
    }
    .build-image-frame {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        aspect-ratio: 1.28 / 1 !important;
        background: #020617 !important;
    }
    .build-image-frame img {
        opacity: 1 !important;
        object-fit: contain !important;
    }
    .build-image-frame > span.absolute.top-3.left-3 {
        top: .65rem !important;
        left: .65rem !important;
        padding: .28rem .55rem !important;
        border-radius: 9999px !important;
        font-size: .62rem !important;
    }
    .build-image-disclaimer,
    .build-image-zoom-hint {
        display: none !important;
    }
    .build-summary {
        padding: .86rem .9rem .9rem !important;
        background: rgba(15, 23, 42, .98) !important;
    }
    .build-summary > .flex {
        align-items: flex-start !important;
    }
    .build-summary h3 {
        font-size: 1.03rem !important;
        line-height: 1.24 !important;
        letter-spacing: -.01em;
    }
    .build-summary .inline-block {
        margin-top: .42rem !important;
        font-size: .62rem !important;
        line-height: 1.1 !important;
    }
    .build-summary p.text-sm.text-yellow-500 {
        margin-top: .42rem !important;
        font-size: .72rem !important;
        line-height: 1.22 !important;
    }
    .build-summary p.text-xs.text-gray-500 {
        display: none !important;
    }
    .build-summary .bg-gray-900.p-2 {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.05rem;
        height: 2.05rem;
        padding: .35rem !important;
        border-color: rgba(71, 85, 105, .78) !important;
    }
    .build-summary .arrow-icon {
        width: 1.12rem !important;
        height: 1.12rem !important;
    }
    .mobile-deck-quick-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(5.7rem, .72fr);
        gap: .52rem;
        margin-top: .78rem;
    }
    .mobile-deck-buy-btn,
    .mobile-deck-adjust-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 2.38rem;
        padding: .55rem .7rem;
        border-radius: .82rem;
        border: 1px solid rgba(96, 165, 250, .38);
        font-size: .78rem;
        line-height: 1.05;
        font-weight: 1000;
        text-align: center;
        text-decoration: none;
        touch-action: manipulation;
    }
    .mobile-deck-buy-btn {
        background: #2563eb;
        color: #fff;
        box-shadow: 0 10px 20px rgba(37, 99, 235, .22);
    }
    .mobile-deck-buy-btn-axis {
        background: #0891b2;
        border-color: rgba(103, 232, 249, .35);
        box-shadow: 0 10px 20px rgba(8, 145, 178, .18);
    }
    .mobile-deck-adjust-btn {
        background: rgba(15, 23, 42, .72);
        color: #93c5fd;
        border-color: rgba(96, 165, 250, .34);
    }
    .deck-product-card > div[id^="detail-"] {
        border-top-color: rgba(51, 65, 85, .86) !important;
    }
    .deck-product-card > div[id^="detail-"] .mobile-stack-buttons {
        padding: .85rem !important;
        gap: .55rem !important;
    }
    .deck-product-card > div[id^="detail-"] .mobile-stack-buttons button,
    .deck-product-card > div[id^="detail-"] .mobile-stack-buttons a {
        min-height: 2.45rem;
        padding: .68rem .75rem !important;
        border-radius: .82rem !important;
        font-size: .82rem !important;
    }
    .deck-product-card > div[id^="detail-"] .grid {
        padding: .85rem !important;
        gap: .9rem !important;
    }
    .deck-product-card > div[id^="detail-"] h4 {
        font-size: .86rem !important;
    }
    .deck-product-card > div[id^="detail-"] .card-link {
        font-size: .82rem !important;
    }
    #store-item-showcase {
        margin-top: 1.1rem !important;
        border-radius: 1.14rem !important;
    }
    #floating-cart {
        right: .9rem !important;
        bottom: calc(.9rem + env(safe-area-inset-bottom, 0px)) !important;
        width: 3.75rem !important;
        height: 3.75rem !important;
        padding: .85rem !important;
        align-items: center !important;
        justify-content: center !important;
        border-width: 1px !important;
    }
    #floating-cart svg {
        width: 1.68rem !important;
        height: 1.68rem !important;
    }
    #floating-cart #cartBadge {
        top: -.35rem !important;
        right: -.35rem !important;
        min-width: 1.5rem !important;
        padding-left: .35rem !important;
        padding-right: .35rem !important;
        font-size: .72rem !important;
    }
    footer {
        margin-top: 1.5rem !important;
        padding-bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px)) !important;
    }
}

@media (max-width: 390px) {
    .mobile-home-app {
        padding-left: .68rem !important;
        padding-right: .68rem !important;
    }
    .mobile-promo-slide {
        min-height: 9.2rem;
        padding: .82rem;
    }
    .mobile-promo-copy strong {
        font-size: 1.08rem;
    }
    .mobile-promo-text {
        font-size: .68rem;
        max-width: 11.5rem;
    }
    .mobile-promo-art {
        flex-basis: 39%;
        min-width: 6.25rem;
    }
    .mobile-promo-symbol {
        width: 5.8rem;
        height: 5.8rem;
        flex-basis: 5.8rem;
        font-size: 2.55rem;
    }
    .mobile-promo-shipping-visual {
        width: 6rem;
        min-height: 6rem;
        flex-basis: 6rem;
        border-radius: 1rem;
    }
    .mobile-promo-shipping-icon {
        font-size: 1.35rem;
    }
    .mobile-promo-shipping-days {
        font-size: 1.72rem;
    }
    .mobile-promo-shipping-label {
        font-size: .58rem;
    }
    .mobile-shortcut-row {
        grid-auto-columns: minmax(4.3rem, 1fr);
        gap: .46rem;
    }
    .mobile-shortcut-text {
        font-size: .62rem;
    }
    #deck-list-start,
    .category-nav-inner,
    .home-header-v2-inner {
        padding-left: .68rem !important;
        padding-right: .68rem !important;
    }
    .build-image-frame {
        aspect-ratio: 1.20 / 1 !important;
    }
}

@media (min-width: 769px) {
    .mobile-deck-quick-actions {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .mobile-header-avatar-img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 9999px;
        background: #020617;
    }
}


/* 2026-06 sitewide mobile UX refresh */
.mobile-shortcut-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}
.mobile-shortcut-icon-build {
    color: #bfdbfe;
}
@media (max-width: 768px) {
    :root {
        --mobile-safe-bottom: env(safe-area-inset-bottom, 0px);
    }
    body:not(.page-home) {
        background-image: linear-gradient(180deg, #111827 0%, #020617 100%) !important;
        background-attachment: scroll !important;
    }
    body:not(.page-home):not(.page-auth):not(.page-login):not(.page-reset-password) > header {
        padding: .58rem .78rem !important;
        background: rgba(3, 7, 18, .96) !important;
        border-bottom-color: rgba(30, 41, 59, .86) !important;
        box-shadow: 0 10px 24px rgba(0, 0, 0, .28) !important;
        backdrop-filter: none !important;
    }
    body:not(.page-home):not(.page-auth):not(.page-login):not(.page-reset-password) > header > .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center !important;
        gap: .5rem !important;
        text-align: left !important;
    }
    body:not(.page-home) > header > .container > div:first-child,
    body:not(.page-home) > header > .container > a.poi-logo-link {
        min-width: 0 !important;
        justify-content: flex-start !important;
        width: auto !important;
    }
    body:not(.page-home) > header > .container > h1 {
        grid-column: 1 / -1;
        justify-content: flex-start !important;
        text-align: left !important;
        width: 100%;
        font-size: .98rem !important;
        line-height: 1.25 !important;
        overflow-wrap: anywhere;
    }
    body:not(.page-home):not(.page-auth):not(.page-login):not(.page-reset-password) > header .poi-logo-link-sm .poi-logo-img,
    body:not(.page-home):not(.page-auth):not(.page-login):not(.page-reset-password) > header .poi-logo-link-compact .poi-logo-img,
    body:not(.page-home):not(.page-auth):not(.page-login):not(.page-reset-password) > header .poi-logo-img {
        width: 2.6rem !important;
        border-radius: .7rem !important;
    }
    body:not(.page-home) > header .poi-logo-title {
        font-size: .95rem !important;
        letter-spacing: .045em !important;
        white-space: nowrap;
    }
    body:not(.page-home) > header .poi-logo-subtitle {
        display: none !important;
    }
    body:not(.page-home) > header nav,
    body:not(.page-home) > header .top-nav-compact {
        grid-column: 1 / -1;
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        gap: .42rem !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        padding: .05rem 0 .12rem !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
    body:not(.page-home) > header nav::-webkit-scrollbar,
    body:not(.page-home) > header .top-nav-compact::-webkit-scrollbar {
        display: none;
    }
    body:not(.page-home) > header nav .site-nav-link,
    body:not(.page-home) > header nav .site-nav-button,
    body:not(.page-home) > header .top-nav-compact .site-nav-link,
    body:not(.page-home) > header .top-nav-compact .site-nav-button,
    body:not(.page-home) > header nav a,
    body:not(.page-home) > header nav button {
        flex: 0 0 auto !important;
        min-height: 2.2rem !important;
        padding: .45rem .62rem !important;
        border-radius: .7rem !important;
        font-size: .78rem !important;
        white-space: nowrap !important;
    }
    body:not(.page-home) > main.container,
    body.page-service > div.container {
        width: 100% !important;
        max-width: 100% !important;
        padding: .85rem .78rem calc(5rem + var(--mobile-safe-bottom)) !important;
        gap: .9rem !important;
    }
    body:not(.page-home) h1 {
        font-size: clamp(1.35rem, 7vw, 2rem);
        line-height: 1.15;
    }
    body:not(.page-home) h2 {
        line-height: 1.18;
    }
    body:not(.page-home) .bg-gray-800,
    body:not(.page-home) .bg-gray-900 {
        box-shadow: none;
    }
    body:not(.page-home) .rounded-xl,
    body:not(.page-home) .rounded-2xl {
        border-radius: 1rem !important;
    }
    body:not(.page-home) .p-8 { padding: 1rem !important; }
    body:not(.page-home) .p-7 { padding: 1rem !important; }
    body:not(.page-home) .p-6 { padding: .95rem !important; }
    body:not(.page-home) .p-5 { padding: .9rem !important; }
    body:not(.page-home) input,
    body:not(.page-home) select,
    body:not(.page-home) textarea {
        font-size: 16px !important;
        max-width: 100%;
    }
    body:not(.page-home) button,
    body:not(.page-home) .site-nav-button,
    body:not(.page-home) a[class*="bg-"],
    body:not(.page-home) label[class*="bg-"] {
        touch-action: manipulation;
    }
    body:not(.page-home) main button,
    body:not(.page-home) main a[class*="bg-"],
    body:not(.page-home) main label[class*="bg-"] {
        min-height: 2.75rem;
    }
    body:not(.page-home) .grid,
    body:not(.page-home) .flex {
        min-width: 0;
    }
    body:not(.page-home) .overflow-x-auto,
    body.page-admin .admin-table-wrap {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
    body.page-admin table {
        min-width: 720px;
    }
    body.page-admin main.container {
        padding-top: .75rem !important;
    }
    body.page-auth,
    body.page-login,
    body.page-reset-password {
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: .9rem .78rem calc(2rem + var(--mobile-safe-bottom)) !important;
    }
    body.page-auth > div,
    body.page-login > main,
    body.page-reset-password > main {
        width: 100% !important;
        max-width: 100% !important;
        border-radius: 1.15rem !important;
        padding: 1.1rem !important;
    }
    body.page-checkout .payment-shell,
    body.page-order-detail .sticky,
    body.page-buyback .sticky,
    body.page-custom .lg\:sticky,
    body.page-adjust .lg\:sticky {
        position: static !important;
        top: auto !important;
    }
    body.page-checkout main.container,
    body.page-order-detail main.container {
        grid-template-columns: 1fr !important;
    }
    body.page-checkout .payment-shell {
        overflow: visible !important;
    }
    .order-item-row {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start !important;
        gap: .72rem !important;
        padding: .78rem !important;
    }
    .order-item-row img {
        width: 3.05rem !important;
        height: 4.25rem !important;
    }
    .order-item-row .order-item-total {
        grid-column: 1 / -1;
        text-align: right !important;
        padding-top: .35rem;
        border-top: 1px solid rgba(55, 65, 81, .75);
    }
    .status-row {
        display: grid !important;
        grid-template-columns: 5.2rem minmax(0, 1fr);
        align-items: start !important;
        gap: .5rem !important;
    }
    .status-row > span:last-child {
        text-align: right;
        overflow-wrap: anywhere;
    }
    body.page-custom main.container,
    body.page-adjust main.container {
        display: flex !important;
        flex-direction: column !important;
    }
    body.page-adjust main.container > div:nth-child(1) { order: 2; }
    body.page-adjust main.container > div:nth-child(2) { order: 1; }
    body.page-adjust main.container > div:nth-child(3) { order: 3; }
    body.page-custom main.container > div,
    body.page-adjust main.container > div {
        width: 100% !important;
        min-width: 0 !important;
    }
    body.page-custom #searchResults,
    body.page-adjust #searchResults {
        max-height: 38vh !important;
    }
    body.page-custom #list-main,
    body.page-adjust #list-main {
        max-height: 48vh !important;
        padding-right: .1rem !important;
    }
    body.page-custom #list-extra,
    body.page-custom #list-side,
    body.page-adjust #list-extra,
    body.page-adjust #list-side {
        max-height: 32vh !important;
        padding-right: .1rem !important;
    }
    body.page-custom [data-card-row="1"],
    body.page-adjust [data-card-row="1"] {
        padding: .55rem !important;
        border-radius: .75rem !important;
    }
    body.page-custom [data-card-row="1"] .opacity-0,
    body.page-adjust [data-card-row="1"] .opacity-0 {
        opacity: 1 !important;
    }
    body.page-custom .card-name-val,
    body.page-adjust .card-name-val {
        white-space: normal !important;
        overflow: visible !important;
        text-overflow: clip !important;
        line-height: 1.28 !important;
        display: block;
    }
    body.page-custom .card-inventory-slot,
    body.page-adjust .card-inventory-slot {
        width: 100%;
        overflow-wrap: anywhere;
    }
    body.page-custom .deck-image-preview-wrap,
    body.page-adjust .deck-image-preview-wrap {
        max-height: 44vh;
        overflow: auto;
    }
    body.page-service > div.container {
        padding-top: .75rem !important;
    }
    body.page-service .home-hero {
        padding: 1rem !important;
        border-radius: 1.15rem !important;
    }
    body.page-service .home-hero .feature-pill {
        white-space: normal;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    body.page-buyback #buybackLoginNotice .flex,
    body.page-buyback main section > .flex,
    body.page-buyback .flex.sm\:flex-row,
    body.page-forum .flex.sm\:flex-row,
    body.page-mypage .flex.sm\:flex-row {
        align-items: stretch !important;
    }
    body.page-buyback #cameraBox {
        max-height: min(72vh, 34rem);
        aspect-ratio: 3 / 4 !important;
    }
    body.page-buyback .scan-guide-card {
        top: .55rem !important;
        left: .55rem !important;
        right: .55rem !important;
        padding: .58rem .65rem !important;
        border-radius: .85rem !important;
        backdrop-filter: none !important;
    }
    body.page-buyback #scanQualityBadge {
        top: 5.8rem !important;
        left: .7rem !important;
        font-size: .68rem !important;
    }
    body.page-buyback #scanDirectionHint {
        right: .7rem !important;
        bottom: .7rem !important;
        max-width: 78% !important;
    }
    body.page-buyback #scanStepList {
        max-height: 16rem !important;
        padding-right: 0 !important;
    }
    body.page-buyback .scan-step {
        padding: .72rem !important;
    }
    body.page-buyback .scan-photo-thumb img {
        height: 6.2rem !important;
    }
    body.page-buyback [id$="Suggestions"] {
        max-height: 45vh !important;
    }
    body.page-forum .forum-washi {
        border-radius: 1.15rem !important;
    }
    body.page-forum .forum-card:hover {
        transform: none !important;
    }
    body.page-forum .forum-washi .grid.grid-cols-3 {
        min-width: 0 !important;
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: .45rem !important;
    }
    body.page-forum .forum-washi .grid.grid-cols-3 > div {
        padding: .72rem .45rem !important;
    }
    body.page-forum form[data-forum-search-form] button,
    body.page-forum form[action*="/forum"] button,
    body.page-forum form[action*="/forum"] a {
        width: 100%;
        justify-content: center;
    }
    body.page-mypage main.container {
        padding-top: .78rem !important;
    }
    body.page-mypage main > .bg-gray-800:first-child {
        margin-bottom: .8rem !important;
    }
    body.page-mypage .tab-panel {
        min-width: 0;
    }
    body.page-mypage main > div:nth-of-type(2) {
        display: flex !important;
        overflow-x: auto !important;
        flex-wrap: nowrap !important;
        gap: .35rem !important;
        padding: .25rem .05rem .55rem !important;
        margin-left: -.1rem;
        margin-right: -.1rem;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    body.page-mypage main > div:nth-of-type(2)::-webkit-scrollbar {
        display: none;
    }
    body.page-mypage main > div:nth-of-type(2) button {
        flex: 0 0 auto;
        min-height: 2.4rem;
        padding: .55rem .75rem !important;
        border-radius: .85rem .85rem .35rem .35rem !important;
        white-space: nowrap;
        font-size: .78rem !important;
    }
    body.page-mypage .namecard-workspace-section {
        width: 100% !important;
        max-width: 100% !important;
    }
    body.page-mypage .namecard-editor-grid {
        grid-template-columns: 1fr !important;
        gap: .9rem !important;
    }
    body.page-mypage .namecard-stage-wrap {
        max-width: 100% !important;
        overflow: auto !important;
    }
    body.page-mypage .namecard-control-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    body.page-meta main.container {
        padding-top: .8rem !important;
        row-gap: 1rem !important;
    }
    body.page-meta img {
        object-fit: contain !important;
        max-height: 62vh;
    }
    #cartModal,
    #checkoutModal,
    #quoteModal,
    #buybackLoginModal {
        align-items: flex-start !important;
        padding: .65rem !important;
        overflow-y: auto !important;
    }
    #cartModal > div,
    #checkoutModal > div,
    #quoteModal > div,
    #buybackLoginModal > div {
        width: 100% !important;
        max-width: 100% !important;
        max-height: calc(100dvh - 1.3rem) !important;
        border-radius: 1rem !important;
        padding: .95rem !important;
    }
    #checkoutModal h2,
    #quoteModal h2,
    #cartModal h2 {
        font-size: 1.18rem !important;
        line-height: 1.25 !important;
    }
    #checkoutItems {
        max-height: 42vh !important;
    }
    #checkoutTotal,
    #cartTotal,
    #checkoutTotalText {
        font-size: clamp(2rem, 11vw, 2.8rem) !important;
        overflow-wrap: anywhere;
    }
    .cart-line {
        display: grid !important;
        grid-template-columns: auto minmax(0, 1fr);
        gap: .65rem !important;
        padding: .72rem !important;
    }
    .cart-line-actions {
        grid-column: 1 / -1;
        width: 100%;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
}
@media (max-width: 390px) {
    body:not(.page-home) > header {
        padding-left: .64rem !important;
        padding-right: .64rem !important;
    }
    body:not(.page-home) > main.container,
    body.page-service > div.container {
        padding-left: .64rem !important;
        padding-right: .64rem !important;
    }
    body.page-buyback #cameraBox {
        max-height: 68vh;
    }
    body.page-mypage .namecard-control-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Keep non-home compact headers usable on mobile even when they reuse home-header-v2 classes. */
@media (max-width: 768px) {
    body:not(.page-home) .home-header-v2-inner {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: .5rem !important;
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    body:not(.page-home) .home-header-v2 .home-header-nav {
        display: flex !important;
        grid-column: 1 / -1;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        width: 100% !important;
        padding-bottom: .12rem !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    body:not(.page-home) .home-header-v2 .home-header-nav::-webkit-scrollbar {
        display: none;
    }
    body:not(.page-home) .home-header-v2 .home-header-nav-main,
    body:not(.page-home) .home-header-v2 .home-header-nav-user {
        flex: 0 0 auto !important;
        flex-wrap: nowrap !important;
        min-width: max-content !important;
    }
}

@media (max-width: 768px) {
    body.page-custom [data-card-row="1"] button,
    body.page-adjust [data-card-row="1"] button {
        min-height: 2.05rem !important;
        min-width: 2.05rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding-top: .15rem !important;
        padding-bottom: .15rem !important;
    }
}

/* 2026-06 buyback / lottery UX additions */
.mobile-shortcut[type="button"] {
    font-family: inherit;
    cursor: pointer;
}
.mobile-shortcut-task {
    border-color: rgba(251, 191, 36, .36) !important;
    background: linear-gradient(135deg, rgba(120, 53, 15, .28), rgba(112, 26, 117, .22)) !important;
    color: #fef3c7 !important;
}
.lottery-mobile-task-fab {
    display: none;
}
.lottery-task-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    color: #e5e7eb;
}
.lottery-task-modal.hidden {
    display: none !important;
}
.lottery-task-modal-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: rgba(2, 6, 23, .78);
    backdrop-filter: blur(12px);
    cursor: pointer;
}
.lottery-task-dialog {
    position: relative;
    z-index: 1;
    width: min(44rem, 100%);
    max-height: min(84vh, 52rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 1.6rem;
    border: 1px solid rgba(251, 191, 36, .24);
    background:
        radial-gradient(circle at 88% 8%, rgba(217, 70, 239, .24), transparent 32%),
        radial-gradient(circle at 0% 100%, rgba(245, 158, 11, .18), transparent 34%),
        rgba(15, 23, 42, .98);
    box-shadow: 0 30px 90px rgba(0, 0, 0, .56), inset 0 1px 0 rgba(255,255,255,.06);
}
.lottery-task-dialog-header {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: 1.15rem 1.15rem .9rem;
    border-bottom: 1px solid rgba(148, 163, 184, .16);
}
.lottery-task-dialog-icon {
    flex: 0 0 3rem;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1.1rem;
    border: 1px solid rgba(251, 191, 36, .30);
    background: rgba(251, 191, 36, .12);
    font-size: 1.6rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
.lottery-task-dialog-eyebrow {
    color: #fcd34d;
    font-size: .68rem;
    font-weight: 1000;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.lottery-task-dialog h2 {
    margin: .1rem 0 0;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1.2;
    font-weight: 1000;
}
.lottery-task-dialog-header p {
    margin-top: .25rem;
    color: rgba(226, 232, 240, .76);
    font-size: .82rem;
    line-height: 1.45;
}
.lottery-task-close {
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 9999px;
    border: 1px solid rgba(148, 163, 184, .28);
    background: rgba(15, 23, 42, .82);
    color: #e5e7eb;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}
.lottery-task-close:hover {
    background: rgba(30, 41, 59, .96);
    color: #fff;
}
.lottery-task-point-note {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin: .9rem 1.15rem 0;
    padding: .78rem .9rem;
    border-radius: 1rem;
    border: 1px solid rgba(96, 165, 250, .24);
    background: rgba(37, 99, 235, .12);
    color: rgba(219, 234, 254, .92);
    font-size: .82rem;
    line-height: 1.45;
}
.lottery-task-point-note strong {
    color: #fff;
}
.lottery-task-point-note-icon {
    flex: 0 0 auto;
}
.lottery-task-list {
    min-height: 0;
    overflow-y: auto;
    padding: .9rem 1.15rem 1.1rem;
    display: grid;
    gap: .7rem;
}
.lottery-task-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    padding: .9rem;
    border-radius: 1.1rem;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(2, 6, 23, .52);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.lottery-task-item-main {
    min-width: 0;
}
.lottery-task-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin-bottom: .35rem;
}
.lottery-task-tags span {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid rgba(251, 191, 36, .25);
    background: rgba(251, 191, 36, .08);
    color: #fde68a;
    padding: .12rem .42rem;
    font-size: .62rem;
    line-height: 1.1;
    font-weight: 1000;
}
.lottery-task-tags span + span {
    border-color: rgba(96, 165, 250, .25);
    background: rgba(37, 99, 235, .10);
    color: #bfdbfe;
}
.lottery-task-item h3 {
    color: #fff;
    font-size: .98rem;
    line-height: 1.25;
    font-weight: 1000;
}
.lottery-task-item p {
    margin-top: .25rem;
    color: rgba(148, 163, 184, .96);
    font-size: .75rem;
    line-height: 1.45;
}
.lottery-task-reward {
    margin-top: .4rem;
    color: #fbbf24;
    font-size: .76rem;
    font-weight: 1000;
}
.lottery-task-action {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6.6rem;
    border-radius: .9rem;
    border: 1px solid rgba(251, 191, 36, .28);
    background: rgba(251, 191, 36, .14);
    color: #fef3c7;
    padding: .62rem .78rem;
    font-size: .78rem;
    font-weight: 1000;
    text-decoration: none;
    transition: background .16s ease, transform .16s ease;
}
.lottery-task-action:hover {
    background: rgba(251, 191, 36, .22);
    transform: translateY(-1px);
}
.lottery-task-empty {
    margin: .9rem 1.15rem 1.1rem;
    border-radius: 1rem;
    border: 1px dashed rgba(148, 163, 184, .30);
    background: rgba(15, 23, 42, .62);
    color: rgba(203, 213, 225, .82);
    padding: 1rem;
    font-size: .9rem;
    text-align: center;
}
.lottery-task-dialog-footer {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    padding: .9rem 1.15rem 1.15rem;
    border-top: 1px solid rgba(148, 163, 184, .16);
    background: rgba(2, 6, 23, .22);
}
.lottery-task-footer-primary,
.lottery-task-footer-secondary {
    flex: 1 1 12rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .95rem;
    padding: .72rem .9rem;
    font-size: .85rem;
    font-weight: 1000;
    text-decoration: none;
}
.lottery-task-footer-primary {
    background: #f59e0b;
    color: #111827;
}
.lottery-task-footer-secondary {
    border: 1px solid rgba(217, 70, 239, .32);
    background: rgba(217, 70, 239, .14);
    color: #fae8ff;
}
html.lottery-task-modal-open,
html.lottery-task-modal-open body {
    overflow: hidden;
}

@media (max-width: 768px) {
    .lottery-mobile-task-fab {
        position: fixed;
        left: .9rem;
        bottom: calc(.9rem + env(safe-area-inset-bottom, 0px));
        z-index: 55;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: .35rem;
        min-width: 3.75rem;
        height: 3.75rem;
        padding: 0 .85rem;
        border-radius: 9999px;
        border: 1px solid rgba(251, 191, 36, .48);
        background: linear-gradient(135deg, #92400e 0%, #a21caf 100%);
        color: #fff;
        box-shadow: 0 14px 32px rgba(0, 0, 0, .36), inset 0 1px 0 rgba(255,255,255,.12);
        font-family: inherit;
        font-size: .76rem;
        font-weight: 1000;
        line-height: 1;
    }
    .lottery-mobile-task-fab span {
        font-size: 1.28rem;
        line-height: 1;
    }
    .lottery-mobile-task-fab strong {
        display: inline-block;
        line-height: 1;
    }
    .lottery-task-modal {
        align-items: flex-end;
        padding: .7rem;
        padding-bottom: calc(.7rem + env(safe-area-inset-bottom, 0px));
    }
    .lottery-task-dialog {
        max-height: min(86vh, 46rem);
        border-radius: 1.35rem;
    }
    .lottery-task-dialog-header {
        padding: .95rem .95rem .78rem;
        gap: .7rem;
    }
    .lottery-task-dialog-icon {
        flex-basis: 2.55rem;
        width: 2.55rem;
        height: 2.55rem;
        border-radius: .95rem;
        font-size: 1.35rem;
    }
    .lottery-task-dialog h2 {
        font-size: 1.12rem;
    }
    .lottery-task-dialog-header p,
    .lottery-task-point-note {
        font-size: .76rem;
    }
    .lottery-task-point-note {
        margin: .75rem .95rem 0;
        padding: .7rem .78rem;
    }
    .lottery-task-list {
        padding: .75rem .95rem 1rem;
        gap: .62rem;
    }
    .lottery-task-item {
        align-items: stretch;
        flex-direction: column;
        padding: .78rem;
        gap: .65rem;
    }
    .lottery-task-action {
        width: 100%;
        min-width: 0;
        padding: .68rem .7rem;
    }
    .lottery-task-dialog-footer {
        padding: .78rem .95rem .95rem;
    }
}

/* 2026-06 forum mobile polish: compact editor toolbar and readable forum cards */
@media (max-width: 768px) {
    body.page-forum main.container {
        padding-top: .72rem !important;
        row-gap: .9rem !important;
    }
    body.page-forum .forum-hero,
    body.page-forum .thread-hero,
    body.page-forum .compose-hero,
    body.page-forum .forum-washi {
        border-radius: 1.05rem !important;
    }
    body.page-forum .forum-hero h1,
    body.page-forum .thread-hero h1,
    body.page-forum .compose-hero h1,
    body.page-forum .forum-washi h1 {
        font-size: clamp(1.45rem, 7vw, 2rem) !important;
        line-height: 1.16 !important;
    }
    body.page-forum .forum-hero .grid.grid-cols-3,
    body.page-forum .forum-washi .grid.grid-cols-3 {
        min-width: 0 !important;
        width: 100% !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: .45rem !important;
    }
    body.page-forum .forum-hero .grid.grid-cols-3 > div,
    body.page-forum .forum-washi .grid.grid-cols-3 > div {
        padding: .72rem .42rem !important;
    }
    body.page-forum .thread-row {
        padding: .85rem !important;
        border-radius: 1rem !important;
        box-shadow: none !important;
    }
    body.page-forum .thread-row:hover {
        transform: none !important;
    }
    body.page-forum .thread-row .shrink-0.grid {
        width: 100% !important;
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
        gap: .35rem !important;
    }
    body.page-forum .thread-row .shrink-0.grid img {
        width: 100% !important;
        height: 4.35rem !important;
    }
    body.page-forum .forum-prose {
        font-size: .95rem !important;
        line-height: 1.82 !important;
        overflow-wrap: anywhere;
    }
    body.page-forum .forum-prose h2 {
        font-size: 1.28rem !important;
    }
    body.page-forum .forum-prose h3 {
        font-size: 1.08rem !important;
    }
    body.page-forum .forum-inline-media {
        max-width: 100% !important;
    }
    body.page-forum .forum-inline-image img,
    body.page-forum .forum-inline-video video {
        max-height: 65vh !important;
    }
    body.page-forum .forum-sentence-modal {
        align-items: flex-end !important;
        padding: .65rem .65rem calc(.65rem + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.page-forum .forum-sentence-modal-panel {
        width: 100% !important;
        max-height: 82vh !important;
        border-radius: 1rem !important;
    }
    body.page-forum article form button,
    body.page-forum .thread-row form button {
        width: auto !important;
        min-height: 2.25rem !important;
    }
    body.page-forum-new-thread form#threadComposeForm {
        gap: .9rem !important;
    }
    body.page-forum-new-thread aside.xl\:sticky {
        position: static !important;
        top: auto !important;
    }
    body.page-forum-new-thread #mediaLibrary {
        max-height: none !important;
        padding-right: 0 !important;
    }
    body.page-forum .compose-toolbar {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        gap: .32rem !important;
        padding: .42rem !important;
        border-radius: .95rem !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-x: contain;
    }
    body.page-forum .compose-toolbar::-webkit-scrollbar {
        display: none;
    }
    body.page-forum .compose-toolbar .compose-toolbar-group {
        width: auto !important;
        flex: 0 0 auto !important;
        border-right: 1px solid rgba(75, 85, 99, .72) !important;
        border-bottom: 0 !important;
        padding: .05rem .38rem .05rem 0 !important;
        margin: 0 !important;
        gap: .25rem !important;
    }
    body.page-forum .compose-toolbar .compose-toolbar-group:last-child {
        border-right: 0 !important;
    }
    body.page-forum .compose-toolbar .toolbar-btn,
    body.page-forum .compose-toolbar button.toolbar-btn,
    body.page-forum .compose-toolbar label.toolbar-btn {
        width: auto !important;
        flex: 0 0 auto !important;
        min-width: 2.25rem !important;
        height: 2.2rem !important;
        min-height: 2.2rem !important;
        padding: 0 .55rem !important;
        font-size: .74rem !important;
        border-radius: .65rem !important;
        justify-content: center !important;
    }
    body.page-forum .compose-toolbar .toolbar-select {
        width: auto !important;
        min-width: 5.7rem !important;
        max-width: 8.6rem !important;
        height: 2.2rem !important;
        flex: 0 0 auto !important;
        font-size: .78rem !important;
        padding: 0 .5rem !important;
    }
    body.page-forum .compose-toolbar .toolbar-color {
        width: 2rem !important;
        height: 2rem !important;
        min-width: 0 !important;
        padding: .1rem !important;
    }
    body.page-forum .editor-media-remove,
    body.page-forum .editor-media-move,
    body.page-forum .media-card button {
        width: auto !important;
        min-height: 0 !important;
    }
}

@media (max-width: 390px) {
    body.page-forum .compose-toolbar .toolbar-btn,
    body.page-forum .compose-toolbar button.toolbar-btn,
    body.page-forum .compose-toolbar label.toolbar-btn {
        min-width: 2.05rem !important;
        height: 2.05rem !important;
        min-height: 2.05rem !important;
        padding: 0 .46rem !important;
        font-size: .7rem !important;
    }
    body.page-forum .compose-toolbar .toolbar-select {
        min-width: 5.2rem !important;
        max-width: 7.8rem !important;
    }
}

@media (max-width: 768px) {
    body.page-forum form[data-forum-search-form] .flex.gap-2 {
        width: 100% !important;
    }
    body.page-forum form[data-forum-search-form] .flex.gap-2 > button,
    body.page-forum form[data-forum-search-form] .flex.gap-2 > a {
        width: auto !important;
        flex: 1 1 0 !important;
    }
}

/* 2026-06 forum mobile polish v2: reduce header height, keep editor controls compact, improve tap targets */
@media (max-width: 768px) {
    body.page-forum {
        overflow-x: hidden;
    }
    body.page-forum header {
        padding-left: .72rem !important;
        padding-right: .72rem !important;
        padding-top: .52rem !important;
        padding-bottom: .52rem !important;
    }
    body.page-forum header .container {
        gap: .55rem !important;
    }
    body.page-forum .top-nav-compact {
        width: 100% !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        justify-content: flex-start !important;
        padding-bottom: .08rem !important;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    body.page-forum .top-nav-compact::-webkit-scrollbar {
        display: none;
    }
    body.page-forum .top-nav-compact > a,
    body.page-forum .top-nav-compact > button,
    body.page-forum .site-nav-link,
    body.page-forum .site-nav-button {
        flex: 0 0 auto !important;
        white-space: nowrap !important;
    }
    body.page-forum .poi-logo-link-compact .poi-logo-img {
        width: 2.35rem !important;
        height: 2.35rem !important;
    }
    body.page-forum .poi-logo-link-compact .poi-logo-title {
        font-size: .98rem !important;
    }
    body.page-forum .poi-logo-link-compact .poi-logo-subtitle {
        font-size: .54rem !important;
        letter-spacing: .08em !important;
    }
    body.page-forum main.container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: .72rem !important;
        padding-right: .72rem !important;
        padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important;
    }
    body.page-forum .forum-card,
    body.page-forum .thread-row,
    body.page-forum .forum-washi,
    body.page-forum .forum-hero,
    body.page-forum .thread-hero,
    body.page-forum section.rounded-2xl,
    body.page-forum section.rounded-\[1\.4rem\] {
        box-shadow: none !important;
    }
    body.page-forum .forum-card {
        padding: .95rem !important;
    }
    body.page-forum .forum-card:hover {
        transform: none !important;
    }
    body.page-forum input,
    body.page-forum select,
    body.page-forum textarea,
    body.page-forum [contenteditable="true"] {
        font-size: 16px !important;
    }
    body.page-forum input[type="file"] {
        line-height: 1.55 !important;
    }
    body.page-forum form[data-forum-search-form] button,
    body.page-forum form[data-forum-search-form] a {
        min-height: 2.65rem !important;
    }
    body.page-forum .thread-row .line-clamp-2,
    body.page-forum .forum-card .line-clamp-2 {
        -webkit-line-clamp: 3;
    }
    body.page-forum .forum-prose img,
    body.page-forum .forum-prose video {
        max-width: 100% !important;
        height: auto !important;
    }
    body.page-forum .forum-select-toolbar {
        left: .75rem !important;
        right: .75rem !important;
        max-width: none !important;
        justify-content: center !important;
        border-radius: 999px !important;
    }
    body.page-forum-thread #comment-form,
    body.page-forum-thread .forum-sentence-modal-panel {
        border-radius: 1rem !important;
    }
    body.page-forum-thread #forumCommentForm button[type="submit"],
    body.page-forum-thread #forumSentenceCommentForm button[type="submit"] {
        width: 100% !important;
        min-height: 2.85rem !important;
    }
    body.page-forum-new-thread .compose-toolbar {
        max-width: 100% !important;
    }
    body.page-forum-new-thread .compose-toolbar button,
    body.page-forum-new-thread .compose-toolbar label,
    body.page-forum-new-thread .compose-toolbar select,
    body.page-forum-new-thread .compose-toolbar input {
        flex-shrink: 0 !important;
    }
    body.page-forum-new-thread .rich-editor:empty::before {
        font-size: .92rem !important;
        line-height: 1.75 !important;
    }
}

@media (max-width: 430px) {
    body.page-forum .site-nav-link,
    body.page-forum .site-nav-button {
        padding-left: .62rem !important;
        padding-right: .62rem !important;
        font-size: .74rem !important;
    }
    body.page-forum .forum-hero .grid.grid-cols-3 > div,
    body.page-forum .forum-washi .grid.grid-cols-3 > div {
        padding: .58rem .32rem !important;
    }
    body.page-forum .forum-hero .grid.grid-cols-3 > div > div:first-child,
    body.page-forum .forum-washi .grid.grid-cols-3 > div > div:first-child {
        font-size: 1.15rem !important;
    }
}

/* 2026-06 rarity group galleries / singles / buyback refinements */
.build-image-disclaimer {
    padding: .28rem .45rem !important;
    font-size: .58rem !important;
    line-height: 1.25 !important;
    left: 7.35rem !important;
    max-width: calc(100% - 8.2rem) !important;
}
.deck-home-gallery {
    background: #020617 !important;
    contain: paint;
    transform: translateZ(0);
}
.home-gallery-image-button,
.deck-home-gallery [data-home-gallery-image] {
    -webkit-tap-highlight-color: transparent;
}
.deck-home-gallery [data-home-gallery-image] {
    opacity: 1 !important;
    background: #020617;
    transform: translateZ(0);
    transition: transform .22s ease, filter .22s ease;
    will-change: transform;
}
.deck-home-gallery:hover [data-home-gallery-image] {
    transform: translateZ(0) scale(1.012);
}
.home-gallery-arrow {
    position: absolute;
    top: 50%;
    z-index: 25;
    width: 2.55rem;
    height: 2.55rem;
    transform: translateY(-50%);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .62);
    background: rgba(2, 6, 23, .82);
    color: #fff;
    font-size: 2.2rem;
    line-height: 1;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .34);
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
    -webkit-tap-highlight-color: transparent;
}
.home-gallery-arrow:hover,
.home-gallery-arrow:focus-visible {
    background: rgba(30, 41, 59, .95);
    border-color: rgba(96, 165, 250, .75);
    transform: translateY(-50%) scale(1.06);
}
.home-gallery-arrow-prev { left: .75rem; }
.home-gallery-arrow-next { right: .75rem; }
.home-gallery-boundary-tip {
    position: absolute;
    top: calc(50% + 2.05rem);
    z-index: 28;
    max-width: min(15rem, calc(100% - 5rem));
    padding: .42rem .62rem;
    border-radius: 999px;
    border: 1px solid rgba(250, 204, 21, .44);
    background: rgba(2, 6, 23, .92);
    color: #fef3c7;
    font-size: .68rem;
    line-height: 1.25;
    font-weight: 900;
    text-align: center;
    box-shadow: 0 12px 32px rgba(0, 0, 0, .36);
    pointer-events: none;
}
.home-gallery-boundary-tip.is-prev { left: .75rem; }
.home-gallery-boundary-tip.is-next { right: .75rem; }
.deck-image-preview-frame img {
    cursor: zoom-in;
    background: #020617;
    opacity: 1 !important;
    transform: translateZ(0);
}

.product-image-manager-with-separators {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: .25rem;
    overflow-x: auto;
    padding-bottom: .4rem;
}
.product-image-manager-with-separators .product-image-manager-card {
    flex: 0 0 auto;
}
.product-image-manager-with-separators .product-image-manager-card.is-drag-over {
    outline: 2px solid rgba(250, 204, 21, .8);
    outline-offset: 2px;
}
 .product-image-separator-slot {
    flex: 0 0 .38rem;
    width: .38rem;
    min-width: .38rem;
    min-height: 6rem;
    align-self: stretch;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(148, 163, 184, .65);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    position: relative;
    touch-action: none;
    transition: color .15s ease, transform .15s ease, background .15s ease;
}
.product-image-separator-slot::before {
    content: '';
    display: block;
    width: 2px;
    height: 72%;
    border-radius: 999px;
    background: currentColor;
    opacity: .65;
    box-shadow: 0 0 0 1px rgba(2, 6, 23, .5);
}
.product-image-separator-slot span,
.product-image-separator-slot small {
    display: none !important;
}
.product-image-separator-slot:hover,
.product-image-separator-slot.is-drop-candidate,
.product-image-separator-slot.is-drag-over {
    color: #bfdbfe;
    background: rgba(59, 130, 246, .12);
}
.product-image-separator-slot.is-active {
    color: #facc15;
    cursor: grab;
}
.product-image-separator-slot.is-active::before {
    width: 3px;
    opacity: 1;
    box-shadow: 0 0 14px rgba(250, 204, 21, .55);
}
.product-image-separator-slot.is-active:active,
.product-image-separator-slot.is-dragging {
    cursor: grabbing;
    transform: scale(1.08);
}
.product-image-manager-generated-badge {
    position: absolute;
    left: .25rem;
    right: .25rem;
    bottom: .25rem;
    border-radius: .45rem;
    background: rgba(88, 28, 135, .92);
    border: 1px solid rgba(216, 180, 254, .45);
    color: #f3e8ff;
    font-size: .56rem;
    line-height: 1.2;
    text-align: center;
    font-weight: 900;
    padding: .18rem .25rem;
}
#deckImageModal {
    z-index: 1000000 !important;
}
.admin-rarity-group-summary {
    border: 1px solid rgba(96, 165, 250, .25);
    background: rgba(37, 99, 235, .08);
    color: #bfdbfe;
    border-radius: .9rem;
    padding: .6rem .75rem;
    font-size: .75rem;
    line-height: 1.45;
    font-weight: 800;
}

body.page-singles .single-search-panel {
    top: calc(var(--site-header-height, 64px) + .35rem);
}
.single-card-grid { align-items: stretch; }
.single-market-card {
    min-width: 0;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.single-market-card:hover {
    transform: translateY(-2px);
    border-color: rgba(96, 165, 250, .55);
    box-shadow: 0 18px 38px rgba(0, 0, 0, .34);
}
.single-market-image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 0.72 / 1;
    background: radial-gradient(circle at top, rgba(30, 64, 175, .22), rgba(2, 6, 23, .98) 62%);
    overflow: hidden;
}
.single-market-image {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .45rem;
    opacity: 0;
    transform: translateZ(0) scale(.985);
    transition: opacity .2s ease, transform .2s ease;
    background: transparent;
}
.single-market-image-wrap.is-loaded .single-market-image {
    opacity: 1;
    transform: translateZ(0) scale(1);
}
.single-image-skeleton {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(90deg, rgba(15, 23, 42, .86), rgba(51, 65, 85, .48), rgba(15, 23, 42, .86));
    background-size: 220% 100%;
    animation: singleSkeleton 1.2s ease-in-out infinite;
}
.single-market-image-wrap.is-loaded .single-image-skeleton { display: none; }
@keyframes singleSkeleton {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}
.single-loading-row {
    min-height: 4rem;
}

.buyback-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: .85rem;
    max-height: min(58vh, 34rem);
    overflow-y: auto;
    padding-right: .2rem;
}
.buyback-price-image-wrap {
    aspect-ratio: .72 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.buyback-price-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: .35rem;
    background: #020617;
}
.buyback-price-card {
    min-width: 0;
}

@media (max-width: 640px) {
    .home-gallery-arrow {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.9rem;
        background: rgba(2, 6, 23, .72);
    }
    .home-gallery-arrow-prev { left: .45rem; }
    .home-gallery-arrow-next { right: .45rem; }
    .home-gallery-boundary-tip {
        top: auto;
        bottom: 3rem;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        max-width: calc(100% - 4rem);
        white-space: normal;
    }
    body.page-singles .single-search-panel {
        position: static !important;
    }
    .single-market-card:hover {
        transform: none;
    }
    .single-market-image {
        padding: .32rem;
    }
    .buyback-price-grid {
        display: flex;
        gap: .75rem;
        overflow-x: auto;
        overflow-y: hidden;
        max-height: none;
        scroll-snap-type: x mandatory;
        padding-bottom: .35rem;
    }
    .buyback-price-card {
        flex: 0 0 72vw;
        scroll-snap-align: start;
    }
}
.custom-scrollbar::-webkit-scrollbar { width: 6px; height: 6px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(100, 116, 139, .72); border-radius: 999px; }
.custom-scrollbar { scrollbar-width: thin; scrollbar-color: rgba(100, 116, 139, .72) transparent; }


/* 2026-06 rarity/cart responsive fix: long Japanese labels must not squeeze headings into vertical text. */
#cartModal .quote-price-mode-btn,
#adjustPurchasePanel .quote-price-mode-btn,
#customPurchasePanel .quote-price-mode-btn {
    white-space: normal !important;
    text-align: center;
    overflow-wrap: break-word;
    word-break: keep-all;
}
#cartDeckImagePanel > div:first-child {
    flex-direction: column !important;
    align-items: stretch !important;
}
#cartDeckImagePanel > div:first-child > div:first-child {
    width: 100%;
    min-width: 0;
}
#cartDeckImagePanel h3,
#cartDeckImagePanel p,
#adjustPurchasePanel h3,
#customPurchasePanel h3 {
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
}
#cartDeckImagePanel h3 {
    word-break: keep-all;
    overflow-wrap: normal;
}
#cartDeckImagePanel p {
    word-break: normal;
    overflow-wrap: break-word;
}
#cartDeckImagePanel > div:first-child > div:last-child {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: .5rem !important;
}
#cartDeckImagePanel > div:first-child > div:last-child .quote-price-mode-btn {
    width: 100%;
    min-width: 0;
}
@media (max-width: 1180px) {
    #cartModal .quote-price-mode-btn {
        flex: 1 1 11rem;
    }
    #cartDeckImagePanel > div:first-child > div:last-child {
        grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    }
}
@media (max-width: 640px) {
    #cartModal .quote-price-mode-btn,
    #adjustPurchasePanel .quote-price-mode-btn,
    #customPurchasePanel .quote-price-mode-btn {
        flex-basis: 100% !important;
        width: 100%;
        font-size: .72rem !important;
        line-height: 1.22 !important;
        min-height: 2.4rem;
    }
    #cartDeckImagePanel {
        padding: .85rem !important;
    }
    #cartDeckImagePanel > div:first-child > div:last-child {
        grid-template-columns: 1fr;
    }
    #cartDeckImagePanel h3 {
        font-size: .85rem !important;
        line-height: 1.3 !important;
    }
    #cartDeckImagePanel p {
        font-size: .68rem !important;
    }
    #cartRarityGroupButtons {
        display: grid !important;
        grid-template-columns: 1fr;
    }
}
@media (min-width: 641px) and (max-width: 1280px) {
    #cartDeckImagePanel > div:first-child > div:last-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
