/* SAOMUSU 0.3.8: workbook-directed navigation, card and mobile refinements. */

/* The label is overlaid, so it never changes card height or text flow. */
.sm-new-badge {
    position: absolute;
    z-index: 4;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    background: linear-gradient(135deg, var(--sm-accent, #ff3ea5), var(--sm-accent2, #8a5cff));
    box-shadow: 0 6px 18px rgba(0, 0, 0, .34);
    color: #fff;
    font-size: 10px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .08em;
    pointer-events: none;
}

.sm-sale-badge {
    position: absolute;
    z-index: 5;
    top: 10px;
    right: 10px;
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    max-width: calc(100% - 20px);
    padding: 3px 10px;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7638, #f22578);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .36);
    color: #fff;
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
    letter-spacing: .04em;
    white-space: nowrap;
    pointer-events: none;
}

.sm-sale-badge-performer { letter-spacing: 0; }

.sm-sale-card-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px 8px;
    margin-top: 8px !important;
}

.sm-sale-card-price del {
    color: var(--sm-muted, #a6a8b5);
    font-size: 11px;
}

.sm-sale-card-price strong {
    color: #ff819f;
    font-size: 16px;
    font-weight: 900;
}

.sm-sale-panel {
    max-width: 680px;
    margin-top: 20px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 118, 56, .52);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255, 118, 56, .13), rgba(242, 37, 120, .09));
    box-shadow: inset 3px 0 0 #ff5b63;
}

.sm-sale-panel-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.sm-sale-panel-head > span {
    padding: 4px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #ff7638, #f22578);
    color: #fff;
    font-size: 10px;
    font-weight: 950;
    letter-spacing: .08em;
}

.sm-sale-panel-head > strong { font-size: 16px; }
.sm-sale-panel .sm-sale-card-price { margin: 10px 0 0 !important; }
.sm-sale-panel .sm-sale-card-price del { font-size: 13px; }
.sm-sale-panel .sm-sale-card-price strong { font-size: 25px; }
.sm-sale-panel-note { margin: 5px 0 0; color: var(--sm-muted); font-size: 12px; }

html.sm-light-mode .sm-sale-panel {
    border-color: rgba(214, 67, 89, .34);
    background: linear-gradient(135deg, rgba(255, 118, 56, .1), rgba(242, 37, 120, .07));
}

html.sm-light-mode .sm-sale-card-price strong { color: #c52055; }

@media (max-width: 560px) {
    .sm-new-badge { top: 7px; left: 7px; min-height: 22px; padding: 3px 8px; font-size: 9px; }
    .sm-sale-badge { top: 7px; right: 7px; min-height: 22px; padding: 3px 7px; font-size: 8px; }
    .sm-sale-panel { padding: 14px; }
}

/* Search: cross-content cards, compact list view and accessible controls. */
.sm-search-hero h1 {
    max-width: 100%;
    font-size: clamp(38px, 5.5vw, 68px);
    overflow-wrap: anywhere;
}

.sm-search-section {
    padding-top: 42px;
}

.sm-search-controls {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(170px, 240px) auto;
    align-items: end;
    gap: 12px;
    padding: 14px;
    margin-bottom: 18px;
    border: 1px solid var(--sm-line);
    border-radius: 16px;
    background: var(--sm-card);
}

.sm-search-controls label {
    display: grid;
    gap: 6px;
}

.sm-search-controls label > span {
    color: var(--sm-muted);
    font-size: 11px;
    font-weight: 800;
}

.sm-search-controls input,
.sm-search-controls select {
    width: 100%;
    min-height: 50px;
    padding: 12px 14px;
    border: 1px solid var(--sm-line);
    border-radius: 11px;
    outline: 0;
    color: var(--sm-text);
    background: #0e1016;
}

.sm-search-controls input:focus,
.sm-search-controls select:focus {
    border-color: var(--sm-accent);
}

.sm-search-controls button {
    min-height: 50px;
    padding: 0 25px;
    border: 0;
    border-radius: 11px;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    background: linear-gradient(135deg, var(--sm-accent), var(--sm-accent2));
}

.sm-search-result-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0;
}

.sm-search-result-bar p {
    margin: 0;
    color: var(--sm-muted);
}

.sm-search-result-bar p strong {
    margin-right: 5px;
    color: var(--sm-text);
    font-size: 22px;
}

.sm-search-result-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.sm-view-switch {
    display: inline-flex;
    gap: 5px;
    padding: 4px;
    border: 1px solid var(--sm-line);
    border-radius: 11px;
    background: var(--sm-card);
}

.sm-view-switch a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 6px 11px;
    border-radius: 8px;
    color: var(--sm-muted);
    font-size: 13px;
    font-weight: 800;
}

.sm-view-switch a.is-active {
    color: #fff;
    background: linear-gradient(135deg, rgba(255,62,165,.88), rgba(138,92,255,.88));
}

.sm-search-near-notice {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 12px;
    padding: 14px 17px;
    margin-bottom: 20px;
    border: 1px solid rgba(69,231,220,.38);
    border-radius: 12px;
    background: rgba(69,231,220,.07);
}

.sm-search-near-notice span {
    color: var(--sm-muted);
}

.sm-search-results {
    display: grid;
    gap: 15px;
}

.sm-search-result-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--sm-line);
    border-radius: 16px;
    background: var(--sm-card);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}

.sm-search-result-card:hover {
    border-color: #4c5063;
    box-shadow: var(--sm-shadow);
    transform: translateY(-2px);
}

.sm-search-result-media {
    position: relative;
    display: block;
    overflow: hidden;
    background: linear-gradient(135deg, #222532, #11131a);
}

.sm-search-result-media > img,
.sm-search-result-media > .sm-card-image-fallback {
    width: 100%;
    height: 100%;
}

.sm-search-result-media > img {
    object-fit: cover;
}

.sm-search-result-content {
    min-width: 0;
    padding: 18px 20px;
}

.sm-search-result-content h2 {
    margin: 5px 0 7px;
    font-size: 22px;
    line-height: 1.4;
}

.sm-search-result-content h2 a:hover {
    color: var(--sm-cyan);
}

.sm-search-result-summary {
    margin: 0 0 10px;
    color: var(--sm-muted);
    font-size: 13px;
}

.sm-search-result-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}

.sm-search-result-tags span {
    display: inline-flex;
    max-width: 100%;
    padding: 5px 9px;
    overflow: hidden;
    border: 1px solid var(--sm-line);
    border-radius: 999px;
    color: #c9cbd5;
    background: rgba(255,255,255,.025);
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sm-search-results.is-list .sm-search-result-card {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    min-height: 138px;
}

.sm-search-results.is-list .sm-search-result-media {
    min-height: 138px;
}

.sm-search-results.is-list .sm-search-result-media > img {
    object-position: center top;
}

.sm-search-results.is-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.sm-search-results.is-grid .sm-search-result-media {
    aspect-ratio: 4 / 3;
}

.sm-search-results.is-grid .sm-search-result-content {
    padding: 15px;
}

.sm-search-results.is-grid .sm-search-result-content h2 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.sm-search-results.is-grid .sm-search-result-tags {
    max-height: 50px;
    overflow: hidden;
}

html.sm-light-mode .sm-search-controls,
html.sm-light-mode .sm-view-switch,
html.sm-light-mode .sm-search-result-card {
    background: var(--sm-light-card);
}

html.sm-light-mode .sm-search-controls input,
html.sm-light-mode .sm-search-controls select {
    color: var(--sm-light-text);
    background: #fff;
}

html.sm-light-mode .sm-search-result-content h2,
html.sm-light-mode .sm-search-result-bar p strong {
    color: var(--sm-light-text);
}

@media (max-width: 1000px) {
    .sm-search-results.is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
    .sm-search-controls { grid-template-columns: 1fr; }
    .sm-search-result-bar { align-items: flex-start; }
    .sm-search-result-actions { align-items: flex-end; flex-direction: column; }
    .sm-search-results.is-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .sm-search-results.is-list .sm-search-result-card { grid-template-columns: 140px minmax(0, 1fr); }
    .sm-search-result-content { padding: 14px; }
    .sm-search-result-content h2 { font-size: 18px; }
}

@media (max-width: 520px) {
    .sm-search-hero h1 { font-size: 34px; }
    .sm-search-section { padding-top: 28px; }
    .sm-search-result-bar { align-items: stretch; flex-direction: column; }
    .sm-search-result-actions { align-items: stretch; gap: 7px; }
    .sm-view-switch { align-self: flex-start; }
    .sm-content-switch { align-self: stretch; }
    .sm-content-switch a { flex: 1; justify-content: center; }
    .sm-search-results.is-list .sm-search-result-card { grid-template-columns: 112px minmax(0, 1fr); min-height: 126px; }
    .sm-search-results.is-list .sm-search-result-media { min-height: 126px; }
    .sm-search-results.is-list .sm-search-result-content { padding: 11px 12px; }
    .sm-search-results.is-list .sm-search-result-content h2 { display: -webkit-box; overflow: hidden; font-size: 15px; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
    .sm-search-results.is-list .sm-search-result-summary { display: none; }
    .sm-search-results.is-list .sm-search-result-tags { gap: 4px; max-height: 43px; overflow: hidden; }
    .sm-search-results.is-list .sm-search-result-tags span { padding: 4px 7px; font-size: 10px; }
    .sm-search-results.is-grid .sm-search-result-content { padding: 11px; }
    .sm-search-results.is-grid .sm-search-result-content h2 { font-size: 14px; }
}
:root {
    --sm-light-bg: #f3f4f8;
    --sm-light-bg2: #ffffff;
    --sm-light-card: #ffffff;
    --sm-light-line: #d9dce7;
    --sm-light-text: #171823;
    --sm-light-muted: #626575;
}

.sm-header-inner { height: 64px; gap: 20px; }
.sm-brand-name { font-size: 22px; }
.sm-nav-list { gap: 20px; }
.sm-header-tools,
.sm-header-mode-tools { display: flex; align-items: center; }
.sm-header-tools { gap: 16px; }
.sm-header-mode-tools { gap: 8px; }
.sm-color-toggle,
.sm-language-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 38px;
    padding: 7px 11px;
    color: var(--sm-text);
    background: transparent;
    border: 1px solid var(--sm-line);
    border-radius: 999px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 750;
}
.sm-language-toggle { min-width: 38px; }
.sm-search-toggle {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    border-radius: 50%;
}

.sm-hero { padding: 56px 0 50px; }
.sm-hero-grid { grid-template-columns: minmax(0, 1fr) 230px; gap: 36px; }
.sm-hero h1 { max-width: 900px; font-size: clamp(34px, 4vw, 50px); line-height: 1.05; white-space: nowrap; }
.sm-hero .sm-eyebrow { margin-bottom: 12px; }
.sm-hero-ja { margin: 14px 0 0; color: var(--sm-muted); font-size: 14px; }
.sm-hero-disclosure { margin: 2px 0 0; color: var(--sm-muted); font-size: 11px; }
.sm-hero-orbit { max-width: 260px; }
.sm-orbit-core { width: 98px; font-size: 36px; }
.sm-orbit-dot { width: 11px; height: 11px; }
.sm-hero-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 8px;
    max-width: 760px;
    margin: 12px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
}
.sm-hero-search input {
    min-width: 0;
    min-height: 50px;
    padding: 11px 15px;
    background: rgba(15,17,24,.78);
    border: 1px solid var(--sm-line);
    border-radius: 13px;
}
.sm-hero-search-actions { display: flex; gap: 6px; }
.sm-hero-search-actions button {
    min-width: 142px;
    min-height: 43px;
    padding: 8px 16px;
    border: 1px solid var(--sm-line);
    border-bottom: 3px solid var(--sm-accent);
    border-radius: 12px 12px 3px 3px;
    white-space: nowrap;
}
.sm-hero-search-actions .sm-button-ghost {
    color: var(--sm-text);
    background: transparent;
    border: 1px solid var(--sm-line);
    box-shadow: none;
}
.sm-hero-library-switcher {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 20px;
    max-width: 760px;
    margin-top: 18px;
    border-bottom: 1px solid var(--sm-line);
}
.sm-hero-library-switcher .sm-library-tabs,
.sm-hero-library-switcher .sm-library-subtabs {
    display: flex;
    align-items: stretch;
    gap: 6px;
}
.sm-hero-library-switcher a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 86px;
    min-height: 45px;
    padding: 9px 18px;
    color: var(--sm-muted);
    background: rgba(255,255,255,.025);
    border: 1px solid var(--sm-line);
    border-bottom: 3px solid transparent;
    border-radius: 12px 12px 0 0;
    font-size: 13px;
    font-weight: 800;
}
.sm-hero-library-switcher .sm-library-subtabs a {
    min-width: auto;
    background: transparent;
    border-color: transparent;
}
.sm-hero-library-switcher a:hover,
.sm-hero-library-switcher a.is-active {
    color: var(--sm-text);
    border-bottom-color: var(--sm-accent);
}

.sm-stats-grid div { padding: 17px 20px; }
.sm-stats span { display: block; font-size: 11px; letter-spacing: .12em; }
.sm-stat-value { display: flex; align-items: baseline; justify-content: center; gap: 5px; margin: 5px 0 0; }
.sm-stats .sm-stat-value strong { display: inline; font-size: 30px; line-height: 1; }
.sm-stats .sm-stat-value small { color: var(--sm-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.sm-section { padding: 56px 0; }
.sm-section-head { margin-bottom: 22px; }
.sm-section-head h2 { font-size: clamp(28px, 3vw, 40px); }
.sm-card-grid { gap: 16px; }
.sm-card { border-radius: 14px; }
.sm-card-body { padding: 13px 14px 15px; }
.sm-card-body h3 { margin: 5px 0 4px; font-size: 15px; }
.sm-card-body p { font-size: 12px; }
.sm-card-tax { font-size: 10px; }
.sm-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.sm-card-tags a {
    padding: 3px 7px;
    color: var(--sm-muted);
    background: rgba(255,255,255,.035);
    border: 1px solid var(--sm-line);
    border-radius: 999px;
    font-size: 10px;
}
.sm-card-cta {
    display: inline-flex;
    margin-top: 10px;
    padding: 6px 9px;
    color: #fff;
    background: linear-gradient(135deg, var(--sm-accent), var(--sm-accent2));
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
}
.sm-home-performers .sm-performer-card .sm-card-media { aspect-ratio: 5/6; }
.sm-home-performers .sm-performer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.sm-home-works .sm-work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sm-home-works .sm-work-card .sm-card-media { aspect-ratio: 16/10; }
.sm-work-card .sm-card-media img {
    object-fit: contain;
    background: var(--sm-card);
}
.sm-work-card:hover .sm-card-media img { transform: none; }
.sm-explore .sm-chip-list a { padding: 9px 13px; font-size: 13px; }

.sm-page-hero { padding: 30px 0 24px; }
.sm-page-hero h1 { font-size: clamp(34px, 4.4vw, 46px); }
.sm-page-hero p:not(.sm-eyebrow) { margin: 8px 0 0; font-size: 14px; }
body.post-type-archive-sm_performer .sm-section,
body.post-type-archive-sm_work .sm-section { padding-top: 38px; }
.sm-filter-bar { margin-bottom: 24px; padding: 12px; }
.sm-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(115px, .8fr)) auto;
    align-items: end;
    gap: 9px;
}
.sm-filter-grid label { display: grid; gap: 5px; }
.sm-filter-grid label > span { padding-left: 2px; color: var(--sm-muted); font-size: 11px; font-weight: 700; }
.sm-filter-grid input,
.sm-filter-grid select { min-height: 43px; padding: 9px 11px; }
.sm-filter-grid button { min-height: 43px; padding: 9px 16px; }
body.post-type-archive-sm_work .sm-work-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
body.post-type-archive-sm_work .sm-work-card .sm-card-media { aspect-ratio: 16/10; }

.sm-profile-hero,
.sm-work-hero { padding: 36px 0; }
.sm-profile-grid { grid-template-columns: 250px minmax(0, 1fr); gap: 36px; align-items: start; }
.sm-profile-image { border-radius: 18px; }
.sm-profile-image,
.sm-work-cover { position: relative; }
.sm-profile-image > img,
.sm-work-cover > img { position: relative; z-index: 1; }
.sm-profile-image img.sm-image-unavailable,
.sm-work-cover img.sm-image-unavailable { display: none; }
.sm-profile-main { padding-top: 2px; }
.sm-profile-title-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 15px; }
.sm-profile-main h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); line-height: 1.08; }
.sm-profile-reading { margin: 0; font-size: 13px; }
.sm-profile-summary {
    max-width: 760px;
    margin-top: 14px;
    padding: 18px;
    background: rgba(255,255,255,.025);
    border: 1px solid var(--sm-line);
    border-radius: 14px;
}
.sm-profile-summary h2,
.sm-profile-tags h2 { margin: 0 0 10px; font-size: 18px; }
.sm-profile-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; margin: 0; }
.sm-profile-summary dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--sm-line); }
.sm-profile-summary dt { color: var(--sm-muted); font-size: 12px; }
.sm-profile-summary dd { margin: 0; text-align: right; font-size: 13px; }
.sm-source-link { display: inline-block; margin-top: 12px; color: var(--sm-cyan); font-size: 12px; }
.sm-profile-tags { max-width: 760px; margin-top: 12px; }
.sm-profile-tags .sm-tag-list { margin: 0; }
.sm-profile-actions { margin-top: 18px; }
.sm-profile-content { padding-top: 38px; padding-bottom: 38px; }

.sm-work-hero-grid { grid-template-columns: minmax(360px, 42%) minmax(0, 1fr); gap: 34px; align-items: start; }
.sm-work-cover {
    width: 100%;
    aspect-ratio: auto;
    min-height: 0;
    border-radius: 18px;
}
.sm-work-cover.is-placeholder { aspect-ratio: 3/2; }
.sm-work-main { min-width: 0; }
.sm-work-main h1 { max-width: 680px; margin: 0 0 12px; font-size: clamp(27px, 3.3vw, 40px); line-height: 1.12; }
.sm-work-cover img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background: var(--sm-card);
}
.sm-work-main > .sm-tag-list { margin: 0 0 16px; }
.sm-inline-product {
    max-width: 680px;
    margin-top: 16px;
    padding: 17px 18px;
    background: rgba(255,255,255,.025);
    border: 1px solid var(--sm-line);
    border-radius: 14px;
}
.sm-inline-product h2 { margin: 0 0 10px; font-size: 18px; }
.sm-inline-product dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 22px; margin: 0; }
.sm-inline-product dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--sm-line); }
.sm-inline-product dt { color: var(--sm-muted); font-size: 12px; }
.sm-inline-product dd { margin: 0; text-align: right; font-size: 13px; }
.sm-inline-tax { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 22px; padding-top: 12px; font-size: 13px; }
.sm-inline-tax span { display: flex; gap: 10px; }
.sm-inline-tax strong { color: var(--sm-muted); }
.sm-button-buy {
    display: inline-flex !important;
    min-width: 210px;
    min-height: 48px;
    margin-top: 16px;
    color: #fff !important;
    -webkit-text-fill-color: #fff;
    background-color: var(--sm-accent);
    background-image: linear-gradient(135deg, var(--sm-accent), var(--sm-accent2));
    border: 1px solid rgba(255,255,255,.16);
    font-size: 15px;
    line-height: 1.25;
    opacity: 1;
    visibility: visible;
    -webkit-appearance: none;
    appearance: none;
}

.sm-store-offers { margin-top: 24px; }
.sm-store-offers h2 { margin: 0 0 10px; font-size: 18px; letter-spacing: 0; }
.sm-store-offer-list { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.sm-store-offer-list .sm-button-buy { margin: 0; min-height: 54px; min-width: 180px; flex-direction: column; gap: 1px; }
.sm-store-offer-list .sm-button-buy small { font-size: 11px; opacity: .78; }
.sm-api-credit { margin: 9px 0 0; color: var(--sm-muted); font-size: 11px; }
.sm-sokmil-credit { display: inline-block; width: 88px; height: 31px; margin: 9px 0 0; line-height: 0; }
.sm-sokmil-credit img { display: block; width: 88px; height: 31px; border: 0; object-fit: contain; }
.sm-work-media { padding: 32px 0 54px; }
.sm-work-description { margin: 0 0 24px; }
.sm-work-description:last-child { margin-bottom: 0; }
.sm-work-description > :first-child { margin-top: 0; }
.sm-work-description > :last-child { margin-bottom: 0; }
.sm-work-description + .sm-media-block { margin-top: 24px; }
.sm-media-block + .sm-media-block { margin-top: 28px; }
.sm-work-media .sm-media-heading {
    margin: 0 0 12px;
    color: var(--sm-cyan);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: .2em;
}
.sm-sample-player { --sm-player-scale: 1; position: relative; width: min(100%, 476px); aspect-ratio: 476/306; overflow: hidden; background: #000; border: 0; border-radius: 14px; box-shadow: 0 0 0 1px var(--sm-line), 0 18px 44px rgba(0,0,0,.28); }
.sm-sample-player iframe { position: absolute; inset: 0 auto auto 0; display: block; width: 476px; height: 306px; max-width: none; border: 0; background: #000; transform: scale(var(--sm-player-scale)); transform-origin: top left; }
.sm-sample-player-actions { margin: 12px 0 0; }
.sm-sample-player-actions .sm-button { margin: 0; }
.sm-sample-video { display: block; width: 100%; max-height: 620px; background: #000; border: 1px solid var(--sm-line); border-radius: 14px; }
.sm-sample-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sm-sample-grid img { width: 100%; height: 100%; aspect-ratio: 4/3; object-fit: contain; background: #050608; }

html.sm-light-mode body { background: var(--sm-light-bg); color: var(--sm-light-text); }
html.sm-light-mode .sm-header { background: rgba(255,255,255,.9); border-color: rgba(25,28,40,.12); }
html.sm-light-mode .sm-nav-list a,
html.sm-light-mode .sm-search-toggle,
html.sm-light-mode .sm-menu-toggle,
html.sm-light-mode .sm-color-toggle,
html.sm-light-mode .sm-language-toggle { color: var(--sm-light-text); }
html.sm-light-mode .sm-hero,
html.sm-light-mode .sm-page-hero,
html.sm-light-mode .sm-profile-hero,
html.sm-light-mode .sm-work-hero {
    background: radial-gradient(circle at 78% 24%, rgba(138,92,255,.18), transparent 30%), radial-gradient(circle at 18% 12%, rgba(255,62,165,.12), transparent 24%), var(--sm-light-bg2);
}
html.sm-light-mode .sm-hero-disclosure,
html.sm-light-mode .sm-profile-lead,
html.sm-light-mode .sm-prose { color: #454857; }
html.sm-light-mode .sm-stats,
html.sm-light-mode .sm-section-alt,
html.sm-light-mode .sm-header-search { background: #eef0f6; }
html.sm-light-mode .sm-card,
html.sm-light-mode .sm-filter-bar,
html.sm-light-mode .sm-data-panel,
html.sm-light-mode .sm-profile-summary,
html.sm-light-mode .sm-inline-product,
html.sm-light-mode .sm-nav { background: var(--sm-light-card); border-color: var(--sm-light-line); box-shadow: 0 16px 40px rgba(34,38,58,.08); }
html.sm-light-mode .sm-card-media { background: linear-gradient(135deg, #eceef5, #dfe2ec); }
html.sm-light-mode .sm-work-cover img { background: var(--sm-light-card); }
html.sm-light-mode .sm-work-card .sm-card-media img { background: var(--sm-light-card); }
html.sm-light-mode .sm-card-body p,
html.sm-light-mode .sm-filter-grid label > span,
html.sm-light-mode .sm-profile-reading,
html.sm-light-mode .sm-profile-summary dt,
html.sm-light-mode .sm-inline-product dt,
html.sm-light-mode .sm-inline-tax strong { color: var(--sm-light-muted); }
html.sm-light-mode .sm-search-form input,
html.sm-light-mode .sm-hero-search input,
html.sm-light-mode .sm-filter-bar input,
html.sm-light-mode .sm-filter-bar select { color: var(--sm-light-text); background: #fff; border-color: var(--sm-light-line); }
html.sm-light-mode .sm-hero-search { background: transparent; }
html.sm-light-mode .sm-hero-search input { background: #fff; border-color: var(--sm-light-line); }
html.sm-light-mode .sm-hero-search-actions .sm-button-ghost { color: var(--sm-light-text); }
html.sm-light-mode .sm-hero-library-switcher { border-bottom-color: var(--sm-light-line); }
html.sm-light-mode .sm-hero-library-switcher a { color: var(--sm-light-muted); background: rgba(255,255,255,.7); border-color: var(--sm-light-line); border-bottom-color: transparent; }
html.sm-light-mode .sm-hero-library-switcher .sm-library-subtabs a { background: transparent; border-color: transparent; }
html.sm-light-mode .sm-hero-library-switcher a:hover,
html.sm-light-mode .sm-hero-library-switcher a.is-active { color: var(--sm-light-text); border-bottom-color: var(--sm-accent); }
html.sm-light-mode .sm-card-tags a,
html.sm-light-mode .sm-tag-list a { background: #f5f6fa; border-color: var(--sm-light-line); }
html.sm-light-mode .sm-empty { color: var(--sm-light-muted); background: rgba(255,255,255,.65); border-color: var(--sm-light-line); }
html.sm-light-mode .sm-empty strong,
html.sm-light-mode .sm-prose h2 { color: var(--sm-light-text); }
html.sm-light-mode .sm-footer { color: #f6f7fb; background: #11131a; }

@media (max-width: 1120px) {
    .sm-home-performers .sm-performer-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sm-filter-grid { grid-template-columns: 2fr repeat(2, minmax(130px, 1fr)); }
    .sm-filter-grid button { min-height: 46px; }
    .sm-hero h1 { white-space: normal; }
    .sm-work-hero-grid { grid-template-columns: minmax(320px, 40%) minmax(0, 1fr); gap: 28px; }
}

@media (max-width: 780px) {
    .sm-header-inner { height: 60px; gap: 10px; }
    .sm-color-toggle-label { display: none; }
    .sm-color-toggle { width: 38px; justify-content: center; padding: 7px; }
    .sm-language-toggle { padding-inline: 8px; }
    .sm-header-tools { gap: 11px; }
    .sm-header-mode-tools { gap: 6px; }
    .sm-nav { top: 62px; }
    .sm-hero { padding: 42px 0; }
    .sm-hero-grid { grid-template-columns: 1fr; }
    .sm-hero-orbit { display: none; }
    .sm-hero-search { display: grid; }
    .sm-hero-search-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .sm-hero-search-actions button { min-width: 0; }
    .sm-hero-library-switcher { flex-wrap: wrap; gap: 0 14px; }
    .sm-stats-grid { grid-template-columns: repeat(3, 1fr); }
    .sm-stats-grid div { border-right: 1px solid var(--sm-line); border-bottom: 0; padding-inline: 8px; }
    .sm-section { padding: 44px 0; }
    .sm-home-works .sm-work-grid,
    body.post-type-archive-sm_work .sm-work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm-home-performers .sm-performer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm-filter-search { grid-column: 1 / -1; }
    .sm-filter-grid button { grid-column: 1 / -1; }
    .sm-profile-grid { grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr); gap: 24px; }
    .sm-work-hero-grid { grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); gap: 24px; }
    .sm-profile-image,
    .sm-work-cover { max-width: none; }
    .sm-profile-summary dl,
    .sm-inline-product dl,
    .sm-inline-tax { grid-template-columns: 1fr; }
    .sm-sample-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
    .sm-brand-kana { display: none; }
    .sm-search-toggle { padding-inline: 11px; }
    .sm-hero h1 { font-size: 39px; }
    .sm-hero-ja { font-size: 13px; }
    .sm-hero-disclosure { font-size: 10px; }
    .sm-page-hero { padding: 34px 0 26px; }
    .sm-page-hero h1 { font-size: 38px; }
    .sm-profile-grid,
    .sm-work-hero-grid { grid-template-columns: 1fr; }
    .sm-profile-image { width: min(72vw, 300px); }
    .sm-work-cover { width: min(72vw, 300px); }
    .sm-profile-main h1 { font-size: 43px; }
    .sm-work-main h1 { font-size: 29px; }
    .sm-button-buy { width: 100%; min-width: 0; }
    .sm-filter-grid { grid-template-columns: 1fr; }
    .sm-filter-search,
    .sm-filter-grid button { grid-column: auto; }
    .sm-performer-grid,
    .sm-home-performers .sm-performer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sm-work-grid,
    .sm-home-works .sm-work-grid,
    body.post-type-archive-sm_work .sm-work-grid { grid-template-columns: 1fr; }
    .sm-card-body { padding: 10px; }
    .sm-card-body h3 { font-size: 13px; }
    .sm-card-body p { font-size: 11px; }
}

/* SAOMUSU 0.5.1: workbook-directed branding, placeholders and vendor buttons. */
.sm-color-toggle {
    width: 38px;
    min-width: 38px;
    padding: 7px;
}

.sm-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    position: relative;
    z-index: 1;
}

.sm-hero::after {
    pointer-events: none;
}

.sm-hero-brand {
    display: flex;
    align-items: baseline;
    gap: 15px;
    max-width: none !important;
    margin: 0;
    white-space: normal !important;
}

.sm-hero-brand-name {
    color: var(--sm-text);
    font-size: clamp(42px, 6vw, 76px);
    font-weight: 900;
    letter-spacing: -.055em;
}

.sm-hero-brand-name > span {
    color: var(--sm-accent);
}

.sm-hero-brand-kana {
    color: var(--sm-muted);
    font-size: clamp(14px, 1.6vw, 21px);
    font-weight: 800;
    letter-spacing: .08em;
}

.sm-card-image-fallback-performer,
.sm-card-image-fallback-catalog {
    gap: 6px;
    background:
        radial-gradient(circle at 50% 22%, rgba(240,60,167,.14), transparent 31%),
        linear-gradient(160deg, #202331, #090a0f 72%);
}

.sm-placeholder-silhouette {
    position: relative;
    display: block;
    width: 64px;
    height: 78px;
    margin-bottom: 1px;
    opacity: .72;
}

.sm-placeholder-silhouette::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 50%;
    width: 30px;
    height: 36px;
    border-radius: 48% 48% 44% 44%;
    background: linear-gradient(145deg, #ef80c0, #8a5cff);
    box-shadow: -9px 5px 0 -3px rgba(239,128,192,.7), 9px 5px 0 -3px rgba(138,92,255,.7);
    transform: translateX(-50%);
}

.sm-placeholder-silhouette::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 62px;
    height: 44px;
    border-radius: 34px 34px 11px 11px;
    background: linear-gradient(145deg, #ef80c0, #7357da);
    clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%);
    transform: translateX(-50%);
}

.sm-card-image-fallback-catalog .sm-placeholder-silhouette::before {
    width: 27px;
    height: 34px;
    box-shadow: -7px 4px 0 -2px rgba(239,128,192,.65), 7px 4px 0 -2px rgba(138,92,255,.65);
}

.sm-card-image-fallback-catalog .sm-placeholder-silhouette::after {
    width: 58px;
    border-radius: 28px 28px 16px 16px;
    clip-path: polygon(27% 0, 73% 0, 88% 58%, 72% 100%, 28% 100%, 12% 58%);
}

.sm-card-image-fallback-performer strong,
.sm-card-image-fallback-catalog strong {
    color: rgba(255,255,255,.62);
    font-size: 20px;
}

.sm-card-offer-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.sm-card-offer-list .sm-card-cta {
    flex: 0 1 auto;
    min-width: 58px;
    margin: 0;
    padding: 6px 10px;
    text-align: center;
}

.sm-card-offer-list .sm-store-dmm,
.sm-store-offer-list .sm-store-dmm {
    background: linear-gradient(135deg, #a61f45, #641232);
}

.sm-card-offer-list .sm-store-sokmil,
.sm-store-offer-list .sm-store-sokmil {
    background: linear-gradient(135deg, #075a6d, #27398f);
}

.sm-card-offer-list .sm-store-apex,
.sm-store-offer-list .sm-store-apex {
    background: linear-gradient(135deg, #92234d, #55317d);
}

.sm-card-offer-list .sm-store-dlsite,
.sm-store-offer-list .sm-store-dlsite {
    background: linear-gradient(135deg, #3476d2, #5b55d9);
}

.sm-catalog-credit-footer {
    padding-bottom: 24px;
}

.sm-store-offers {
    margin-top: 18px;
}

.sm-store-offer-list .sm-button-buy {
    min-width: 120px;
    min-height: 46px;
    flex: 0 1 180px;
    flex-direction: row;
    justify-content: center;
}

html.sm-light-mode .sm-hero-brand-name {
    color: var(--sm-light-text);
}

@media (max-width: 560px) {
    .sm-hero-brand { gap: 10px; }
    .sm-hero-brand-name { font-size: 43px; }
    .sm-hero-brand-kana { font-size: 13px; }
    .sm-store-offer-list .sm-button-buy {
        width: auto;
        min-width: 0;
        flex: 1 1 calc(50% - 5px);
    }
}
