/* FC2 / early-2000s storefront aesthetic */

:root {
    --border: #ccc;
    --link: #8aaffc; 
    --visited: #897df7;
    --bg-tile: #c04080;
    --bg-image: url('/background.png');
    --btn-bg-image: url('/background2.png');
    --flash-error-bg: #ffcccc;
    --flash-success-bg: #88cc88;
    --site-rail-max-height: min(28vh, 160px);
    --site-rail-gap: 4px;
    --site-rail-pad: 4px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    background-color: var(--bg-tile);
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100%;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
}

body {
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    min-height: -webkit-fill-available;
    padding-top: 15px;
    padding-bottom: calc(var(--site-rail-max-height) + env(safe-area-inset-bottom, 0px) + 8px);
    font-family: Tahoma, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: white;
    background: transparent;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--bg-tile);
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.page {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    border: 1px solid var(--border);
    padding: 0;
    isolation: isolate;
    background: transparent;
}

.site-rail {
    position: fixed;
    z-index: 40;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: var(--site-rail-gap);
    width: min(800px, 100%);
    height: var(--site-rail-max-height);
    max-height: var(--site-rail-max-height);
    margin: 0 auto;
    padding: var(--site-rail-pad);
    padding-bottom: max(var(--site-rail-pad), env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid var(--border);
    border-bottom: none;
}

.site-rail-cell {
    display: block;
    min-height: 0;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #111;
    line-height: 0;
}

.site-rail-cell img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.site-rail-note {
    display: none;
    margin: 0;
    padding: 8px 12px;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 12px;
    line-height: 1.35;
    color: #f0f0f0;
}

.site-rail.is-empty {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}

.site-rail.is-empty .site-rail-cell {
    display: none;
}

.site-rail.is-empty .site-rail-note {
    display: flex;
}

a {
    color: var(--link);
}

a:visited {
    color: var(--visited);
}

main a:not(.btn) {
    color: var(--link);
    background-clip: text;
    -webkit-background-clip: text;
    text-decoration: none;
    -webkit-text-stroke: 1px #363636;
    paint-order: stroke fill;
}

main a:visited {
    color: var(--visited);
}

header {
    border-bottom: 1px solid var(--border);
    padding: 0px 0 12px;
    background-image: var(--btn-bg-image);
}

.marquee-bar {
    background: #000;
    margin: 0 0 10px;
    display: flex;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-item {
    flex-shrink: 0;
    padding: 2px 15px;
    font-size: 11px;
    color: #ff0000;
    animation:
        marquee-content 18s linear infinite,
        marquee-rainbow 4s linear infinite;
        animation-timing-function: steps(180, end);
}

@keyframes marquee-content {
    from { transform: translateX(150%); }
    to { transform: translateX(-100%); }
}

@keyframes marquee-rainbow {
    0% { filter: hue-rotate(0deg); }
    100% { filter: hue-rotate(360deg); }
}

header h1 {
    margin: 0;
    font-size: 16px;
    font-weight: bold;
}

.header-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 8px 8px;
}

header a {
    text-decoration: none;
    color: white !important;
}

nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 12px;
    margin-bottom: 8px;
    padding: 0 10px;
}

nav form.nav-search {
    margin: 0;
}

.theme-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding-right: 2px;
}

.theme-picker-label {
    font-size: inherit;
}

.theme-picker select {
    font-family: inherit;
    font-size: inherit;
    border: 1px solid var(--border);
    padding: 1px 2px;
}

.theme-css-upload-btn {
    font-family: inherit;
    font-size: 11px;
    line-height: 1.2;
    color: #fff;
    border: 1px solid var(--border);
    background: transparent;
    padding: 1px 5px;
    cursor: pointer;
    opacity: 0.8;
}

.theme-css-upload-btn:hover {
    opacity: 1;
}

.theme-css-upload-btn[hidden] {
    display: none;
}

.theme-css-upload-btn input[type="file"] {
    display: none;
}

@media (min-width: 600px) {
    nav form.nav-search {
        margin-left: auto;
    }
}

@media (max-width: 599px) {
    nav form.nav-search {
        width: 100%;
    }
}

nav a {
    margin-right: 0;
}

nav form.nav-logout {
    display: inline;
    margin: 0;
}

nav form.nav-logout button {
    font-family: inherit;
    font-size: inherit;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

nav input[type="search"] {
    width: 220px;
    border: 1px solid var(--border);
    padding: 2px 4px;
    font-family: inherit;
    font-size: inherit;
}

button,
input[type="submit"],
input[type="button"],
.btn {
    font-family: inherit;
    font-size: inherit;
    border: 1px solid var(--border);
    color: white;
    background-color: var(--bg-tile);
    background-image: var(--btn-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 2px 8px;
    cursor: pointer;
}

a.btn {
    display: inline-block;
    text-decoration: none;
    line-height: normal;
    background-clip: border-box;
    -webkit-background-clip: border-box;
    color: white;
}

a.btn:visited {
    color: white;
}

.btn-row {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
    margin-top: 0;
}

input[type="email"],
input[type="password"],
input[type="text"],
input[type="search"] {
    border: 1px solid var(--border);
    padding: 2px 4px;
    font-family: inherit;
    font-size: inherit;
}

main {
            padding: 12px 12px 16px;
    }

main h2 {
    font-size: 15px;
    margin: 0 0 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}

main table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

main table.catalog-grid {
    display: grid;
    grid-template-columns: repeat(var(--catalog-cols, 4), 1fr);
    width: 100%;
}

main table.catalog-grid tbody,
main table.catalog-grid tr {
    display: contents;
}

@media (max-width: 599px) {
    main table.catalog-grid {
        grid-template-columns: repeat(var(--catalog-cols-sm, 3), 1fr);
    }
}

main table td {
    vertical-align: top;
    padding: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
    word-wrap: break-word;
}

main table td.release {
    display: flex;
    flex-direction: column;
    text-align: center;
}

main table td.release .release-cell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 100%;
}

main table td.release .release-foot {
    margin-top: auto;
    padding-top: 5px;
}

main table td.release .release-cell > a {
    display: block;
}

main table td.release .cover-link {
    position: relative;
}

main table td.release .le-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 1px 5px;
    font-size: 11px;
    line-height: 1.4;
    font-weight: bold;
    color: #fff;
    background-image: var(--btn-bg-image);
    border: 1px solid #fff;
    pointer-events: none;
}

main table td.release .le-badge-sold-out {
    background-image: none;
    background-color: #6b6b6b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-capsule-sold-out {
    background: #6b6b6b;
    border-color: #d9d9d9;
    text-shadow: none;
}

main table td.release img,
main table td.release .cover-placeholder {
    display: block;
    width: 100%;
    max-width: 100%;
    max-height: 20dvh;
    aspect-ratio: 1;
    height: auto;
    object-fit: contain;
    margin: 0 auto 4px;
}

main table td.release .cover-placeholder {
    border: 1px dashed currentColor;
    opacity: 0.35;
}

main.release img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.release-cover img {
    max-height: 400px;
    margin: 0 0 12px;
}

.release-previews {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-start;
    margin: 0.35rem 0 0.75rem;
}

.release-previews .release-preview {
    flex: 0 1 auto;
    max-width: 100%;
}

main.release .release-previews audio,
main.release .release-previews video,
main.release .release-previews img {
    max-height: 50dvh;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    margin: 0;
}

main.release video {
    display: block;
    max-width: 100%;
    height: auto;
}

main.release audio {
    display: block;
    max-width: 100%;
}

.release h3 {
    margin: 4px 0;
    font-size: 13px;
}

.release p {
    margin: 2px 0;
}

.release .price {
        margin-top: 5px;
}

/* Format type colors — garish FC2 palette */
.format-music {
    color: #ff99cc;
}
.format-comics {
    color: #99ccff;
}
.format-video {
    color: #cc99ff;
}
.format-games {
    color: #00ff55;
}
.format-software {
    color: #cccc00;
}
.format-film {
    color: #ffcc99;
}
.format-texts {
    color: #ccccff;
}
.format-image-sets {
    color: #ffcccc;
}
.format-other {
    color: #bbbbbb;
}

.release[class*="format-"] a,
.release[class*="format-"] a:visited,
main.release[class*="format-"] a,
main.release[class*="format-"] a:visited {
    color: inherit;
}

.flash {
    border: 1px solid var(--border);
    padding: 6px 8px;
    margin: 0 0 12px !important;
    color: #001a0a;
    font-weight: bold;
}

.flash.error {
    background: var(--flash-error-bg);
}

.flash.success {
    background: var(--flash-success-bg);
}

.placeholder {
    color: #ababab;
    font-style: italic;
}

textarea {
    border: 1px solid var(--border);
    padding: 2px 4px;
    font-family: inherit;
    font-size: inherit;
    width: 100%;
    max-width: 480px;
}

select {
    font-family: inherit;
    font-size: inherit;
    border: 1px solid var(--border);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}

.dashboard-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.dashboard-header p {
    margin: 0;
}

.download-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}

.editor-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.editor-abandon {
    margin: 0;
    flex-shrink: 0;
}

.release-editor .editor-primary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 12px;
}

@media (max-width: 599px) {
    .release-editor .editor-primary {
        grid-template-columns: 1fr;
    }
}

.release-editor .editor-section {
    margin-bottom: 16px;
}

.release-editor .editor-section h3 {
    margin: 0 0 8px;
    font-size: 13px;
}

.release-editor .editor-primary .editor-section {
    margin-bottom: 0;
}

.release-editor .field {
    margin: 0 0 12px;
}

.release-editor .field > label {
    display: block;
    margin-bottom: 4px;
}

.release-editor .field input[type="text"],
.release-editor .field input[type="date"],
.release-editor .field input[type="number"],
.release-editor .field input[type="file"],
.release-editor .field select,
.release-editor .field textarea {
    display: block;
    width: 100%;
    max-width: 100%;
}

.release-editor .field-inline label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.release-editor .field-inline input[type="number"] {
    width: 5em;
    max-width: none;
}

.release-editor .tag-fields .field > label {
    display: block;
    margin-bottom: 4px;
}

.release-editor .tag-fields select[multiple],
.release-editor .tag-fields input[type="text"] {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.release-editor .editor-cover-preview:not(:empty) {
    margin: 0 0 8px;
}

.release-editor .editor-cover-preview img {
    display: block;
    max-width: 100%;
    max-height: 240px;
    height: auto;
    object-fit: contain;
}

.release-editor .editor-upload-error {
    margin-top: 8px;
}

.release-editor .editor-publish-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 8px;
}

button:disabled {
    background-color: #666;
    background-image: none;
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.75;
}

.dashboard-artist {
    margin-bottom: 20px;
}

.dashboard-releases th,
.dashboard-releases td {
    font-size: 12px;
}

.dashboard-release-actions {
    white-space: nowrap;
}

.dashboard-release-action {
    display: inline;
    margin: 0;
}

.artist-form-primary {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
    margin-bottom: 12px;
}

@media (max-width: 599px) {
    .artist-form-primary {
        grid-template-columns: 1fr;
    }
}

.artist-form-fields p {
    margin: 0 0 12px;
}

.artist-form-fields p:last-child {
    margin-bottom: 0;
}

.artist-avatar-field {
    margin: 0;
    min-width: 0;
}

#artist-form .artist-avatar-field .artist-avatar,
#artist-form #artist-avatar-preview .artist-avatar {
    width: 140px;
    max-width: 100%;
}

#artist-form #artist-avatar-preview img {
    display: block;
    width: 140px;
    max-width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border: 1px solid var(--border);
}

.artist-theme-field {
    margin: 12px 0 0;
}

.artist-theme-color-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    align-items: center;
}

.artist-theme-opacity {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 200px;
}

.artist-theme-opacity input[type="range"] {
    flex: 1;
    min-width: 100px;
}

.artist-theme-bg-field {
    margin: 12px 0 0;
    border: 0;
    padding: 0;
}

#artist-form .artist-theme-bg-preview,
#artist-form #artist-bg-preview img {
    display: block;
    width: 100%;
    max-width: 280px;
    max-height: 120px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.tag-fields {
    border: 1px solid var(--border);
    padding: 8px 12px;
    margin: 0 0 12px;
}

.tag-fields select[multiple] {
    display: block;
    min-width: 240px;
    margin-top: 4px;
}

.release-details-form .field {
    margin: 0 0 12px;
}

.release-details-form .field > label {
    display: block;
    margin-bottom: 4px;
}

.release-details-form .field input[type="text"],
.release-details-form .field input[type="date"],
.release-details-form .field input[type="number"],
.release-details-form .field select,
.release-details-form .field textarea {
    display: block;
    max-width: 480px;
}

.release-details-form .tag-fields .field > label {
    display: block;
    margin-bottom: 4px;
}

.release-details-form .tag-fields select[multiple],
.release-details-form .tag-fields input[type="text"] {
    display: block;
    max-width: 480px;
}

.release-details-form .field-inline label {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.release-details-form .field-inline input[type="number"] {
    width: 5em;
    max-width: none;
}

.sold-out {
    color: #ababab;
}

/* Glossy capsule button price tags */
main table td.release .duration,
.gift-item .duration {
    font-size: 11px;
    color: #ababab;
    margin: 0 0 2px;
}

.price {
    display: inline-block;
}

.price-capsule {
    position: relative;
    display: inline-block;
    overflow: hidden;
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    line-height: 1;
    color: #fff;
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 999px;
    border: 2px solid #f2f2f2;
    background: transparent;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

button.price-capsule {
    margin: 0;
    font: inherit;
}

/* Glossy highlight on the top half */
.price-capsule::before {
    content: "";
    position: absolute;
    left: 4px;
    right: 4px;
    top: 0px;
    height: 42%;
    border-radius: 999px;
    background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.hint {
    font-size: 11px;
    color: #ababab;
    margin: -4px 0 8px;
}

form.inline {
    display: inline;
    margin: 0;
}

code {
    font-family: "Courier New", monospace;
    font-size: 12px;
}

/* Honeypot — off-screen; bots fill, humans never see */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.artist-top {
    position: relative;
}

.artist-top .artist-message {
    position: absolute;
    top: 0;
    right: 0;
    margin: 0;
}

.artist-profile {
    display: grid;
    gap: 12px;
    align-items: start;
    margin: 0 0 12px;
}

.artist-profile-pic .artist-avatar {
    height: 30dvh;
}

.artist-profile-details .artist-stats {
    margin: 0 0 8px;
}

@media (min-width: 600px) {
    .artist-profile {
        grid-template-columns: 1fr auto;
    }

    .artist-profile-pic {
        grid-column: 2;
        grid-row: 1;
    }

    .artist-profile-details {
        grid-column: 1;
        grid-row: 1;
    }
}

.artist-message {
    margin: 0;
}

.messages-inbox {
    list-style: none;
    margin: 0;
    padding: 0;
}

.messages-inbox li {
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
}

.message-excerpt {
    margin: 4px 0 0;
    color: #ababab;
    font-size: 12px;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-shrink: 0;
    margin: 0 0 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}

main.messages.chat {
    display: flex;
    flex-direction: column;
    max-height: calc(
        100dvh - 8.5rem - var(--site-rail-max-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    );
}

main.messages.chat .chat-view {
    display: flex;
    flex-direction: column;
    min-height: 0;
    flex: 1;
}

.chat-refresh {
    flex-shrink: 0;
    margin: 0 0 8px;
}

.chat-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.chat-actions {
    margin: 0;
}

.chat-thread {
    flex: 1 1 auto;
    min-height: 8rem;
    margin: 0 0 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column-reverse;
}

.chat-messages {
    display: contents;
    list-style: none;
    margin: 0;
    padding: 0;
}

.chat-message {
    margin: 0 0 12px;
    padding: 8px;
    border: 1px solid var(--border);
}

.chat-message-mine {
    background: rgba(255, 255, 255, 0.04);
}

.chat-message-body {
    margin: 0 0 4px;
    white-space: pre-wrap;
}

.chat-message-meta {
    margin: 0;
    font-size: 11px;
    color: #ababab;
}

.chat-compose textarea {
    max-width: 100%;
}

.chat-compose {
    flex-shrink: 0;
}

.gift-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.gift-item {
    border: 1px solid var(--border);
    padding: 8px;
}

.gift-item img {
        max-width: 100%;
}

.gift-disabled {
    opacity: 0.55;
}

.gift-disabled button,
.gift-disabled form {
    display: none;
}

.gift-unpublished {
    display: block;
    width: fit-content;
    margin: 4px 0;
    padding: 1px 6px;
    border: 1px solid var(--border);
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.nav-unread {
    font-weight: bold;
}

/* Light — colors and backgrounds only */
html[data-theme="light"] {
    --link: #0000ee;
    --visited: #551a8b;
    --bg-tile: #e8e8e8;
    --bg-image: none;
    --btn-bg-image: none;
}

html[data-theme="light"] {
    background-image:
        repeating-linear-gradient(45deg, #ddd 0, #ddd 1px, transparent 1px, transparent 8px),
        repeating-linear-gradient(-45deg, #ddd 0, #ddd 1px, transparent 1px, transparent 8px);
    background-size: auto;
}

html[data-theme="light"] body::before {
    display: none;
}

html[data-theme="light"] .page {
    background: #fff;
}

html[data-theme="light"] body {
    color: #000;
}

html[data-theme="light"] header {
    background-image: none;
}

html[data-theme="light"] header h1 a,
html[data-theme="light"] header h1 a:visited {
    color: #000 !important;
}

html[data-theme="light"] header a:not(header h1 a) {
    color: var(--link) !important;
}

html[data-theme="light"] header a:not(header h1 a):visited {
    color: var(--visited) !important;
}

html[data-theme="light"] main a {
    background-image: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    -webkit-text-stroke: 0px;
    color: var(--link);
}

html[data-theme="light"] main a:visited {
    color: var(--visited);
}

html[data-theme="light"] button,
html[data-theme="light"] input[type="submit"],
html[data-theme="light"] input[type="button"],
html[data-theme="light"] .btn {
    color: #000;
    background-color: #eee;
    background-image: none;
}

html[data-theme="light"] a.btn,
html[data-theme="light"] a.btn:visited {
    color: #000;
}

html[data-theme="light"] main table td.release .le-badge {
    background-image: none;
    background-color: var(--bg-tile);
    border-color: var(--border);
    color: #000;
}

html[data-theme="light"] .flash {
    color: inherit;
}

html[data-theme="light"] .format-image-sets {
    color: #feb8b8;
}

/* Dark — light theme inverted (colors and backgrounds only) */
html[data-theme="dark"] {
    --border: #555;
    --link: #8aaffc;
    --visited: #b794f6;
    --bg-tile: #1a1a1a;
    --bg-image: none;
    --btn-bg-image: none;
}

html[data-theme="dark"] {
    background-image:
        repeating-linear-gradient(45deg, #333 0, #333 1px, transparent 1px, transparent 8px),
        repeating-linear-gradient(-45deg, #333 0, #333 1px, transparent 1px, transparent 8px);
    background-size: auto;
}

html[data-theme="dark"] body::before {
    display: none;
}

html[data-theme="dark"] .page {
    background: #2a2a2a;
}

html[data-theme="dark"] body {
    color: #e8e8e8;
}

html[data-theme="dark"] header {
    background-image: none;
}

html[data-theme="dark"] header h1 a,
html[data-theme="dark"] header h1 a:visited {
    color: #e8e8e8 !important;
}

html[data-theme="dark"] header a:not(header h1 a) {
    color: var(--link) !important;
}

html[data-theme="dark"] header a:not(header h1 a):visited {
    color: var(--visited) !important;
}

html[data-theme="dark"] main a {
    background-image: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    -webkit-text-stroke: 0px;
    color: var(--link);
}

html[data-theme="dark"] main a:visited {
    color: var(--visited);
}

html[data-theme="dark"] button,
html[data-theme="dark"] input[type="submit"],
html[data-theme="dark"] input[type="button"],
html[data-theme="dark"] .btn {
    color: #e8e8e8;
    background-color: #444;
    background-image: none;
}

html[data-theme="dark"] a.btn,
html[data-theme="dark"] a.btn:visited {
    color: #e8e8e8;
}

html[data-theme="dark"] main table td.release .le-badge {
    background-image: none;
    background-color: #444;
    border-color: var(--border);
    color: #e8e8e8;
}

html[data-theme="dark"] .flash {
    color: inherit;
}

html[data-theme="dark"] .format-image-sets {
    color: #ff9999;
}

.download-all-btn {
    display: none;
    font: inherit;
    cursor: pointer;
}

html.js .download-all-btn {
    display: inline-block;
}

.editor-js-required {
    display: none;
}

html:not(.js) .editor-js-required {
    display: block;
}

html:not(.js) .release-editor {
    display: none;
}

.artist-js-required {
    display: none;
}

html:not(.js) .artist-js-required {
    display: block;
}

html:not(.js) #artist-form {
    display: none;
}

.download-view {
    margin-top: 0.5rem;
}

.download-primary {
    display: grid;
    grid-template-columns: fit-content(70%) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

@media (max-width: 599px) {
    .download-primary {
        grid-template-columns: 1fr;
    }
}

.download-aside {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: end;
}

.download-metadata h2 {
    margin: 0 0 4px;
    border-bottom: none;
    padding-bottom: 0;
    text-align: right;
}

.download-view .release-cover {
    margin: 0;
}

.download-view .release-cover img {
    max-height: 30dvh;
    width: auto;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    margin: 0;
}

.download-entry .download-embed {
    display: block;
    max-width: 100%;
    margin: 0.35rem 0 0.75rem;
}

.download-entry .download-embed-first, .download-entry:has(.download-embed-first) {
    margin-top: 0;
}

.download-entry img.download-embed {
    height: auto;
}

.download-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.download-file-list li {
    margin: 0.25rem 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 0 0 12px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
}

.section-header h2 {
    margin: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.section-action {
    margin: 0;
    flex-shrink: 0;
}

.release-purchase {
    margin-top: 15px;
}

.similar-releases, .release-reviews, .format-section, .new-releases, .browse-artists, .browse-releases {
        margin-top: 15px;
}

.release-reviews-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.release-reviews-header h2 {
    margin: 0;
}

.review-card {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border, rgba(0, 0, 0, 0.15));
}

.review-card:first-of-type {
        border: 0;
        margin-top: 0;
        padding-top: 0;
}

.review-card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 8px;
}

.review-author {
    margin: 0;
    font-weight: 600;
}

.review-date {
    margin: 0;
    opacity: 0.75;
    font-size: 0.9em;
}

.review-body {
    margin: 0 0 10px;
    white-space: pre-wrap;
}

.review-stars {
    display: inline-flex;
    line-height: 1;
    font-size: 1.1em;
    letter-spacing: 0.02em;
}

.review-stars-filled {
    background: linear-gradient(
        90deg,
        hsl(0, 85%, 55%),
        hsl(45, 90%, 50%),
        hsl(90, 70%, 45%),
        hsl(150, 65%, 40%),
        hsl(200, 80%, 50%),
        hsl(260, 75%, 58%),
        hsl(320, 80%, 55%)
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.25));
}

.review-stars[data-rating="5"] .review-stars-filled {
    background: linear-gradient(90deg, #e24c3b, #fbf3ef, #0088e0);
    filter: drop-shadow(0 0 0.75px rgba(0, 0, 0, 0.35));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.review-stars-empty {
    color: var(--muted, rgba(0, 0, 0, 0.25));
}

.review-comments {
    list-style: none;
    margin: 15px 0 10px;
    padding: 0 0 0 12px;
    border-left: 2px solid var(--border, rgba(0, 0, 0, 0.12));
}

.review-comment {
    margin: 0 0 10px;
}

.review-comment-meta {
    margin: 0 0 4px;
    font-size: 0.9em;
}

.review-comment-body {
    margin: 0;
    white-space: pre-wrap;
}

.review-compose,
.review-comment-form {
    margin-top: 12px;
}

.review-form textarea,
.review-comment-form textarea {
    width: 100%;
    max-width: 40rem;
}

.artist-grid {
    display: grid;
    grid-template-columns: repeat(var(--artist-cols, 4), 1fr);
    gap: 12px;
    margin-top: 8px;
}

.artist-card {
    text-align: center;
}

.artist-card .artist-name {
    margin: 6px 0 0;
}

.artist-avatar-link {
    display: block;
}

.artist-avatar {
    width: 100%;
    max-width: 30dvw;
    aspect-ratio: 1;
    border: 1px solid var(--border);
}

.artist-avatar-placeholder {
    background-image: var(--btn-bg-image);
    background-size: cover;
    background-position: center;
}

.browse-filters {
    margin: 0;
}

.browse-filter-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.browse-filter-group {
    border: 1px solid var(--border);
    margin: 0;
    padding: 8px 10px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.browse-filter-fields {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    gap: 6px;
}

.browse-filter-fields .browse-filter-select {
    flex: 1;
    min-height: 0;
}

.browse-filter-fields .hint {
    margin: 0;
}

.browse-filter-group legend {
    padding: 0 4px;
    width: fit-content;
}

.browse-filter-select {
    display: block;
    width: 100%;
    max-width: 16rem;
}

.browse-tag-autocomplete {
    display: block;
    width: 100%;
    max-width: 16rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .browse-filter-row {
        flex-direction: row;
        align-items: stretch;
        flex-wrap: wrap;
    }

    .browse-filter-group {
        flex: 1 1 0;
        min-width: min(100%, 14rem);
    }
}

.pagination {
    margin: 15px 0;
}

.pagination a,
.pagination .pagination-current {
    margin-right: 8px;
}

.pagination .pagination-current {
    font-weight: bold;
}


/* ── early-00s media player chrome ── */

main.release audio,
main.release video,
.download-entry audio,
.download-entry video {
    /* XP silver frame */
    display: block;
    max-width: 100%;
    margin: 0.35rem 0 0.75rem;
    padding: 3px 4px;
    background: linear-gradient(180deg, #ece9d8 0%, #d4d0c8 45%, #c0c0c0 100%);
    border: 2px solid;
    border-color: #fff #808080 #404040 #fff;
    border-radius: 0;
    box-shadow:
        inset 1px 1px 0 rgba(255, 255, 255, 0.9),
        inset -1px -1px 0 rgba(0, 0, 0, 0.25),
        2px 2px 0 rgba(0, 0, 0, 0.35);
    accent-color: #c04080; /* your FC2 pink — progress / play tint */
}

main.release video,
.download-entry video {
    height: auto;
    padding: 4px;
    background: #000;
    border-color: #666 #111 #111 #666;
}

/* WebKit/Blink only (Chrome, Safari, Edge) — ~70% of users */
audio::-webkit-media-controls-enclosure,
video::-webkit-media-controls-enclosure {
    background: linear-gradient(180deg, #2a2a3a 0%, #0f0f18 55%, #050508 100%);
    border: 1px solid #000;
    border-radius: 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

audio::-webkit-media-controls-panel,
video::-webkit-media-controls-panel {
    background: transparent;
}

/* chunky square play button */
audio::-webkit-media-controls-play-button,
video::-webkit-media-controls-play-button {
    background-color: #c0c0c0;
    border: 2px solid;
    border-color: #fff #404040 #404040 #fff;
    border-radius: 0;
    margin-right: 6px;
    filter: none;
}

audio::-webkit-media-controls-current-time-display,
audio::-webkit-media-controls-time-remaining-display,
video::-webkit-media-controls-current-time-display,
video::-webkit-media-controls-time-remaining-display {
    font-family: Tahoma, "MS Sans Serif", sans-serif;
    font-size: 11px;
    color: #00ff55; /* Winamp green readout */
    text-shadow: 0 0 4px rgba(0, 255, 85, 0.6);
}

audio::-webkit-media-controls-timeline,
video::-webkit-media-controls-timeline {
    border: 1px inset #808080;
    border-radius: 0;
    background: #1a1a1a;
    min-height: 10px;
}

audio::-webkit-media-controls-volume-slider,
video::-webkit-media-controls-volume-slider {
    border: 1px inset #808080;
    border-radius: 0;
    background: #2a2a2a;
}

audio::-webkit-media-controls-mute-button,
video::-webkit-media-controls-mute-button {
    filter: contrast(1.2) saturate(0.3); /* gray XP icon vibe */
}

/* Artist profile theme — overrides visitor theme on artist/release pages */
html.artist-themed.artist-has-bg[data-theme="light"],
html.artist-themed.artist-has-bg[data-theme="dark"] {
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

html.artist-themed.artist-has-bg[data-theme="light"] body::before,
html.artist-themed.artist-has-bg[data-theme="dark"] body::before {
    display: block;
}

html.artist-themed .page {
    background: var(--artist-container-bg, transparent);
}

html.artist-themed main {
    color: var(--artist-text-color, white);
    font-family: var(--artist-font-family, Tahoma, sans-serif);
}

html.artist-themed main a:not(.btn),
html.artist-themed main a:not(.btn):visited {
    color: var(--artist-link-color, var(--link));
    background-image: none;
    -webkit-background-clip: border-box;
    background-clip: border-box;
    -webkit-text-fill-color: currentColor;
    -webkit-text-stroke: 1px var(--artist-stroke-color, #363636);
    paint-order: stroke fill;
}

html.artist-themed main a:visited {
    color: var(--artist-link-color, var(--visited));
}
