.sm-inv-en {
    display: none !important;
}

html.sm-language-en .sm-inv-ja {
    display: none !important;
}

html.sm-language-en .sm-inv-en {
    display: revert !important;
}

.sm-inventory-profile-media,
.sm-performer-card .sm-card-media {
    position: relative;
    overflow: hidden;
}

.sm-inventory-profile-media > img,
.sm-performer-card .sm-card-media > img[data-sm-inventory-safe-profile] {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--sm-profile-focus-x, 50%) var(--sm-profile-focus-y, 35%);
}

.sm-inventory-checking .sm-card-media > img,
.sm-inventory-profile-media.sm-inventory-checking > img:not([data-sm-inventory-safe-profile]) {
    visibility: hidden;
}

.sm-inventory-no-safe-image > img,
.sm-inventory-unsafe-landscape {
    display: none !important;
}

.sm-inventory-badge {
    position: absolute;
    z-index: 8;
    display: inline-flex;
    align-items: baseline;
    gap: .2em;
    max-width: calc(100% - 20px);
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 999px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .3);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: .02em;
    pointer-events: none;
    backdrop-filter: blur(8px);
}

.sm-inventory-badge strong {
    color: inherit;
    font-size: 1.08em;
    line-height: 1;
}

.sm-inventory-badge small {
    color: inherit;
    font-size: .86em;
    font-weight: 700;
}

.sm-inventory-newcomer {
    top: 10px;
    left: 10px;
    background: rgba(25, 154, 91, .95);
    border-color: rgba(99, 255, 177, .58);
}

.sm-inventory-work-count {
    right: 10px;
    bottom: 10px;
    background: rgba(12, 15, 24, .9);
}

.sm-inventory-profile-media .sm-inventory-badge {
    padding: 8px 11px;
    font-size: 13px;
}

.sm-inventory-profile-media .sm-inventory-newcomer {
    top: 14px;
    left: 14px;
}

.sm-inventory-profile-media .sm-inventory-work-count {
    right: 14px;
    bottom: 14px;
}

.sm-inventory-offers {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.sm-inventory-offers-compact {
    display: flex;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 0;
}

.sm-inventory-detail-offers {
    width: 100%;
    margin-top: 16px;
}

.sm-inventory-detail-offers .sm-inventory-offers {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 0;
}

.sm-inventory-detail-offers .sm-inventory-offer {
    width: 100%;
    min-height: 52px;
    padding: 10px 14px 10px 18px;
    border-radius: 12px;
    font-size: 14px;
}

.sm-theme {
    --sm-store-accent: #ff3ea5;
    --sm-store-accent-2: #8a5cff;
    --sm-store-start: #912362;
    --sm-store-end: #48236d;
    --sm-store-shadow: rgba(255, 62, 165, .24);
}

.sm-theme .sm-inventory-offer,
.sm-theme .sm-card-cta,
.sm-theme .sm-button-buy {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 48%),
        linear-gradient(135deg, var(--sm-store-start), var(--sm-store-end));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .12),
        0 8px 20px var(--sm-store-shadow);
    color: #fff !important;
    text-decoration: none !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, .38);
    transform: translateY(0);
    transition:
        transform .18s ease,
        filter .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.sm-theme .sm-inventory-offer::before,
.sm-theme .sm-card-cta::before,
.sm-theme .sm-button-buy::before {
    position: absolute;
    z-index: -1;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--sm-store-accent), var(--sm-store-accent-2));
    content: "";
}

.sm-theme .sm-inventory-offer:hover,
.sm-theme .sm-card-cta:hover,
.sm-theme .sm-button-buy:hover {
    border-color: rgba(255, 255, 255, .34);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .18),
        0 12px 26px var(--sm-store-shadow);
    filter: saturate(1.08) brightness(1.08);
    transform: translateY(-2px);
}

.sm-theme .sm-inventory-offer:active,
.sm-theme .sm-card-cta:active,
.sm-theme .sm-button-buy:active {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
    filter: brightness(.96);
    transform: translateY(0);
}

.sm-theme .sm-inventory-offer:focus-visible,
.sm-theme .sm-card-cta:focus-visible,
.sm-theme .sm-button-buy:focus-visible {
    z-index: 2;
    outline: 3px solid var(--sm-cyan, #45e7dc);
    outline-offset: 3px;
}

.sm-inventory-offer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

.sm-inventory-offer-detail {
    gap: 6px;
}

.sm-inventory-offer-copy {
    display: block;
    overflow: hidden;
    min-width: 0;
    flex: 1 1 auto;
    text-align: left;
    white-space: nowrap;
}

.sm-inventory-offer-copy strong {
    display: block;
    overflow: hidden;
    color: inherit;
    font-size: inherit;
    font-weight: 900;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sm-inventory-offer-price {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    background: rgba(0, 0, 0, .22);
    color: inherit;
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1.2;
    white-space: nowrap;
}

.sm-inventory-offer-arrow {
    flex: 0 0 auto;
    margin-left: auto;
    color: inherit;
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
    opacity: .78;
}

.sm-theme .sm-card-cta::after,
.sm-theme .sm-button-buy::after {
    margin-left: auto;
    color: inherit;
    content: "\2197";
    font-size: 1.08em;
    line-height: 1;
    opacity: .78;
}

.sm-theme :is(.sm-store-dmm, .sm-source-dmm) {
    --sm-store-accent: #005ef3;
    --sm-store-accent-2: #75a7ff;
    --sm-store-start: #243b63;
    --sm-store-end: #101722;
    --sm-store-shadow: rgba(0, 94, 243, .25);
}

.sm-theme :is(.sm-store-fanza, .sm-source-fanza) {
    --sm-store-accent: #b42f5a;
    --sm-store-accent-2: #e7abba;
    --sm-store-start: #8f0539;
    --sm-store-end: #4f0d2b;
    --sm-store-shadow: rgba(180, 47, 90, .26);
}

.sm-theme :is(.sm-store-dmm-books, .sm-source-dmm-books, .sm-store-dmm[href*="book.dmm.com"]) {
    --sm-store-accent: #005ef3;
    --sm-store-accent-2: #a088ff;
    --sm-store-start: #29487c;
    --sm-store-end: #1a1945;
    --sm-store-shadow: rgba(0, 94, 243, .24);
}

.sm-theme :is(.sm-store-fanza-books, .sm-source-fanza-books) {
    --sm-store-accent: #b42f5a;
    --sm-store-accent-2: #b78cff;
    --sm-store-start: #79234f;
    --sm-store-end: #35163f;
    --sm-store-shadow: rgba(180, 47, 90, .25);
}

.sm-theme :is(.sm-store-duga, .sm-store-apex, .sm-source-duga, .sm-source-apex, .sm-source-apex-duga) {
    --sm-store-accent: #ee0000;
    --sm-store-accent-2: #ff5a36;
    --sm-store-start: #ad0000;
    --sm-store-end: #510000;
    --sm-store-shadow: rgba(238, 0, 0, .27);
}

.sm-theme :is(.sm-store-sokmil, .sm-source-sokmil) {
    --sm-store-accent: #ff6600;
    --sm-store-accent-2: #ffb13b;
    --sm-store-start: #96400b;
    --sm-store-end: #4d2107;
    --sm-store-shadow: rgba(255, 102, 0, .25);
}

.sm-theme :is(.sm-store-mgs, .sm-store-mgstage, .sm-source-mgs, .sm-source-mgstage) {
    --sm-store-accent: #f02b32;
    --sm-store-accent-2: #ff7377;
    --sm-store-start: #5f1820;
    --sm-store-end: #111318;
    --sm-store-shadow: rgba(240, 43, 50, .23);
}

.sm-theme :is(.sm-store-fc2, .sm-source-fc2, .sm-source-fc2-contents) {
    --sm-store-accent: #ef5763;
    --sm-store-accent-2: #2c82e7;
    --sm-store-start: #74214e;
    --sm-store-end: #32162d;
    --sm-store-shadow: rgba(239, 87, 99, .24);
}

.sm-theme :is(.sm-store-myfans, .sm-source-myfans) {
    --sm-store-accent: #ff414d;
    --sm-store-accent-2: #ff3700;
    --sm-store-start: #9c2635;
    --sm-store-end: #682200;
    --sm-store-shadow: rgba(255, 65, 77, .25);
}

/* Override the older FC2 Catalog rule, whose three-class selector otherwise
   keeps the retired cyan/blue myfans treatment. */
.sm-theme .sm-fc2-card a.sm-card-cta.sm-store-myfans {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .12), transparent 48%),
        linear-gradient(135deg, var(--sm-store-start), var(--sm-store-end));
}

.sm-theme :is(.sm-store-dlsite, .sm-source-dlsite) {
    --sm-store-accent: #0096d6;
    --sm-store-accent-2: #55c7f4;
    --sm-store-start: #075f8f;
    --sm-store-end: #06314f;
    --sm-store-shadow: rgba(0, 150, 214, .25);
}

.sm-theme :is(.sm-store-digiket, .sm-source-digiket) {
    --sm-store-accent: #1d3994;
    --sm-store-accent-2: #6b8cff;
    --sm-store-start: #273787;
    --sm-store-end: #171f4f;
    --sm-store-shadow: rgba(29, 57, 148, .28);
}

.sm-theme :is(.sm-store-gyutto, .sm-source-gyutto) {
    --sm-store-accent: #ff3366;
    --sm-store-accent-2: #ff9c00;
    --sm-store-start: #942353;
    --sm-store-end: #6b3410;
    --sm-store-shadow: rgba(255, 75, 133, .24);
}

.sm-theme :is(.sm-store-groobybucks, .sm-source-groobybucks, .sm-source-grooby) {
    --sm-store-accent: #e10707;
    --sm-store-accent-2: #f04122;
    --sm-store-start: #7e151c;
    --sm-store-end: #351117;
    --sm-store-shadow: rgba(225, 7, 7, .24);
}

.sm-theme :is(.sm-store-adultforce, .sm-source-adultforce, .sm-source-adult-force) {
    --sm-store-accent: #ff3d00;
    --sm-store-accent-2: #da4b2c;
    --sm-store-start: #263a5c;
    --sm-store-end: #09111d;
    --sm-store-shadow: rgba(255, 61, 0, .23);
}

.sm-theme :is(.sm-store-adult-empire, .sm-source-adult-empire, .sm-source-adult-empire-cash, .sm-source-aec) {
    --sm-store-accent: #a60808;
    --sm-store-accent-2: #dadada;
    --sm-store-start: #4e2528;
    --sm-store-end: #171719;
    --sm-store-shadow: rgba(166, 8, 8, .27);
}

.sm-theme :is(.sm-work-card, .sm-catalog-card) .sm-card-offer-list {
    display: flex;
    width: auto;
    max-width: 100%;
    align-self: flex-start;
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 0;
}

.sm-theme :is(.sm-work-card, .sm-catalog-card) .sm-card-cta,
.sm-theme .sm-inventory-offer-compact {
    display: inline-flex;
    width: auto;
    max-width: 100%;
    min-width: 58px;
    min-height: 30px;
    flex: 0 1 auto;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 6px 11px 6px 13px;
    border-radius: 8px;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .1),
        0 4px 10px var(--sm-store-shadow);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: .02em;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sm-theme .sm-inventory-offer-compact .sm-inventory-offer-copy {
    max-width: 100%;
    flex: 0 1 auto;
}

.sm-theme .sm-inventory-offer-compact .sm-inventory-offer-copy strong {
    text-align: center;
    white-space: nowrap;
}

.sm-theme :is(.sm-work-card, .sm-catalog-card) .sm-card-cta::after,
.sm-theme .sm-inventory-offer-compact .sm-inventory-offer-arrow {
    display: none;
}

.sm-theme .sm-button-buy {
    display: inline-flex;
    min-width: 180px;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 20px 0 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 900;
}

.sm-inventory-description {
    margin-top: 32px;
}

.sm-inventory-description h2 {
    margin-bottom: 14px;
}

.sm-inventory-work-card .sm-card-body h3 {
    margin: 0;
}

/* Titles remain Japanese in English mode; only their verified English line is added. */
.sm-layout-title-ja,
.sm-layout-title-en {
    display: block;
    overflow-wrap: anywhere;
}

.sm-layout-title-en {
    display: none;
    margin-top: .3em;
    font-size: .82em;
    font-weight: 500;
    line-height: 1.4;
}

html.sm-language-en .sm-layout-title-en {
    display: block;
}

html.sm-language-en .sm-inventory-work-card .sm-card-body > .sm-inv-ja {
    display: block !important;
}

.sm-inventory-offer-detail .sm-inventory-offer-copy,
.sm-inventory-offer-detail .sm-inventory-offer-copy strong {
    overflow: visible;
    white-space: normal;
    overflow-wrap: anywhere;
    text-overflow: clip;
}

.sm-inventory-offer-subtitle {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.4;
}

.sm-inventory-offer-group {
    width: 100%;
    grid-column: 1 / -1;
    margin: 12px 0 0;
    font-size: 14px;
}

.sm-layout-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 18px 0;
}

.sm-layout-tabs a {
    max-width: 100%;
    padding: 9px 14px;
    border: 1px solid currentColor;
    border-radius: 8px;
    color: inherit;
    font: inherit;
    font-size: 14px;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.sm-layout-tabs a[aria-current="page"] {
    border-color: var(--sm-cyan, #45e7dc);
    box-shadow: inset 0 -3px var(--sm-cyan, #45e7dc);
    font-weight: 800;
}

.sm-layout-tabs a:focus-visible,
.sm-layout-search :is(input, button, a):focus-visible {
    outline: 3px solid var(--sm-cyan, #45e7dc);
    outline-offset: 3px;
}

.sm-layout-search {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0;
}

.sm-layout-search label {
    flex-basis: 100%;
}

.sm-layout-search input[type="search"] {
    flex: 1 1 240px;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid currentColor;
    border-radius: 8px;
    background: transparent;
    color: inherit;
    font: inherit;
}

.sm-layout-search button {
    min-height: 44px;
    padding: 10px 18px;
    font: inherit;
}

[data-sm-layout-search-panel][hidden] {
    display: none !important;
}

@media (max-width: 720px) {
    .sm-inventory-badge {
        padding: 5px 8px;
        font-size: 11px;
    }

    .sm-inventory-profile-media .sm-inventory-badge {
        padding: 6px 9px;
        font-size: 12px;
    }

    .sm-inventory-detail-offers .sm-inventory-offers {
        grid-template-columns: minmax(0, 1fr);
    }

    .sm-inventory-detail-offers .sm-inventory-offer {
        min-height: 52px;
        padding: 9px 11px 9px 15px;
    }

    .sm-theme .sm-button-buy {
        width: 100%;
        min-height: 50px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sm-theme .sm-inventory-offer,
    .sm-theme .sm-card-cta,
    .sm-theme .sm-button-buy {
        transition: none;
    }

    .sm-theme .sm-inventory-offer:hover,
    .sm-theme .sm-card-cta:hover,
    .sm-theme .sm-button-buy:hover {
        transform: none;
    }
}

@media (forced-colors: active) {
    .sm-theme .sm-inventory-offer,
    .sm-theme .sm-card-cta,
    .sm-theme .sm-button-buy {
        border: 1px solid ButtonText;
        background: ButtonFace;
        box-shadow: none;
        color: ButtonText !important;
        text-shadow: none;
    }
}
