:root {
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    --bg: #0d1014;
    --panel: #151a20;
    --panel-soft: #191f26;
    --border: #262d35;
    --muted: #8b96a3;
    --text: #e9edf0;
    --accent: #d7f36a;
    --accent-dim: rgba(215, 243, 106, .13);
    --danger: #ff8c86;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { color: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 4; width: 244px; display: flex; flex-direction: column; padding: 27px 16px 18px; background: #11151a; border-right: 1px solid #20262d; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px; margin-bottom: 48px; }
.brand-mark { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #171b13; font-weight: 900; font-size: 18px; box-shadow: 0 0 22px rgba(215,243,106,.17); }
.brand strong { display: block; font-size: 15px; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 3px; color: #7f8993; font-size: 9px; letter-spacing: .16em; font-weight: 700; }
.nav-label { color: #69747e; font-size: 9px; font-weight: 800; letter-spacing: .17em; padding: 0 12px; margin: 0 0 10px; }
.nav-item { min-height: 43px; display: flex; align-items: center; gap: 12px; padding: 0 12px; margin-bottom: 5px; border-radius: 8px; color: #a4adb6; font-size: 12px; font-weight: 600; }
a.nav-item.active { background: var(--accent-dim); color: var(--accent); }
.nav-icon { width: 17px; color: #85919b; text-align: center; font-size: 17px; }
.active .nav-icon { color: var(--accent); }
.nav-state { margin-left: auto; color: #66717b; font-size: 9px; font-weight: 500; }
.nav-item-disabled { cursor: default; opacity: .53; }
.main-area { min-height: 100vh; margin-left: 244px; }
.topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 clamp(24px, 5vw, 72px); border-bottom: 1px solid #1e242b; }
.language-switcher select { color: #eaf1f5; background: #171d22; border: 1px solid #303b44; border-radius: 8px; padding: 8px 28px 8px 10px; font: inherit; cursor: pointer; }
.language-switcher select:focus-visible { outline: 2px solid #d4f34e; outline-offset: 2px; }
.top-link { color: #929ca5; font-size: 10px; }
.top-link span { padding-left: 5px; color: var(--accent); }
.page-content { max-width: 1180px; padding: 54px clamp(24px, 5vw, 72px) 64px; margin: 0 auto; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 31px; }
h1 { margin: 13px 0 9px; font-size: clamp(31px, 4vw, 46px); line-height: 1.05; letter-spacing: -.055em; font-weight: 760; }
h1 span { color: var(--accent); }
.page-intro p { margin: 0; color: #909ba4; font-size: 12px; }
.search-panel { display: flex; align-items: center; gap: 16px; min-height: 78px; padding: 12px 14px 12px 19px; border: 1px solid #303942; border-radius: 11px; background: linear-gradient(110deg, #181e24, #14191e); box-shadow: 0 14px 36px rgba(0,0,0,.14); }
.search-symbol { color: var(--accent); font-size: 28px; font-family: Georgia, serif; transform: rotate(-15deg); }
.search-control { flex: 1; min-width: 0; }
.search-control label { display: block; margin-bottom: 4px; color: #81909a; font-size: 9px; letter-spacing: .08em; }
.search-control input { width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: #eef1f2; font-size: 13px; }
.search-control input::placeholder { color: #626d77; }
.credentials-panel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 10px 0 11px; padding: 14px 16px; border: 1px solid #293139; border-radius: 9px; background: #12171c; }
.credentials-heading { grid-column: 1 / -1; color: #bdc6cb; font-size: 10px; font-weight: 700; }
.credential-field { min-width: 0; }
.credential-field label { display: block; margin-bottom: 6px; color: #81909a; font-size: 9px; letter-spacing: .06em; }
.credential-field input { width: 100%; min-height: 35px; padding: 7px 9px; border: 1px solid #303942; border-radius: 6px; outline: 0; background: #0e1216; color: #eef1f2; font-size: 11px; }
.credential-field input:focus { border-color: #718246; box-shadow: 0 0 0 2px rgba(215,243,106,.08); }
.credential-field input:disabled { opacity: .6; }
.credentials-note { grid-column: 1 / -1; margin: 0; color: #78858e; font-size: 9px; line-height: 1.5; }
.button { min-height: 40px; display: inline-flex; justify-content: center; align-items: center; gap: 14px; padding: 0 16px; border: 1px solid transparent; border-radius: 7px; font-size: 10px; font-weight: 800; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .7; cursor: wait; }
.button-primary { background: var(--accent); color: #171b12; }
.button-primary:hover:not(:disabled) { background: #e2ff79; }
.button-primary span:last-child { font-size: 16px; }
.search-hint { display: flex; gap: 8px; align-items: center; margin: 11px 0 12px; color: #74808b; font-size: 10px; }
.hint-icon { width: 13px; height: 13px; display: inline-grid; place-items: center; border: 1px solid #68747e; border-radius: 50%; font-size: 8px; }
.download-destination { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 34px; padding: 14px 16px; border: 1px solid #293139; border-radius: 9px; background: #12171c; }
.destination-copy { min-width: 0; }
.destination-copy > strong { display: block; margin-top: 5px; color: #d8e0e3; font-size: 11px; }
.destination-copy > p { margin: 5px 0 0; color: #78858e; font-size: 9px; }
.destination-message { display: block; margin-top: 5px; color: #c2a66f; font-size: 9px; line-height: 1.45; }
.download-progress { margin: -11px 0 22px; padding: 12px 14px; border: 1px solid #293139; border-radius: 8px; background: #12171c; }
.download-progress > div { display: flex; justify-content: space-between; gap: 10px; color: #aeb9b1; font-size: 9px; }
.download-progress > div span { color: #7e8a83; }
.download-progress progress { width: 100%; height: 5px; margin-top: 9px; accent-color: var(--accent); }
.results-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 0 0 15px; }
.results-heading h2 { display: flex; gap: 10px; align-items: center; margin: 7px 0 0; font-size: 17px; letter-spacing: -.025em; }
.count-pill { min-width: 22px; display: inline-grid; place-items: center; padding: 3px 6px; border-radius: 20px; background: #252d34; color: #b5c0c8; font-size: 9px; }
.text-button { padding: 7px 0; border: 0; background: transparent; color: #89949e; font-size: 10px; cursor: pointer; }
.text-button span { padding-left: 4px; font-size: 16px; }
.mod-card { display: grid; grid-template-columns: 225px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--border); border-radius: 11px; background: var(--panel); }
.mod-cover { position: relative; min-height: 235px; background: #1c2228; }
.mod-cover img { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.cover-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: radial-gradient(ellipse at 50% 40%, #28323a, #171c21 72%); color: #68757f; }
.cover-fallback span { font-size: 42px; font-weight: 900; letter-spacing: -.09em; opacity: .42; }
.cover-fallback small { font-size: 7px; letter-spacing: .14em; }
.mod-type { position: absolute; top: 12px; left: 12px; z-index: 1; padding: 5px 7px; border: 1px solid rgba(255,255,255,.13); border-radius: 4px; background: rgba(9,12,14,.68); color: #e1e7ea; font-size: 8px; text-transform: uppercase; }
.mod-info { padding: 22px 25px 19px; }
.mod-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.mod-title-row h2 { margin: 0 0 5px; font-size: 20px; letter-spacing: -.04em; }
.mod-id { color: #7b8791; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; letter-spacing: .05em; }
.version-chip { flex-shrink: 0; padding: 6px 8px; border: 1px solid #38412a; border-radius: 5px; background: rgba(215,243,106,.07); color: #ccdf8b; font-size: 9px; }
.mod-description { margin: 14px 0 17px; color: #a5afb7; font-size: 11px; line-height: 1.6; }
.mod-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 14px 0; border-top: 1px solid #252c33; border-bottom: 1px solid #252c33; }
.mod-facts span { display: block; margin-bottom: 6px; color: #707c86; font-size: 7px; letter-spacing: .1em; font-weight: 800; }
.mod-facts strong { display: block; overflow: hidden; color: #d6dce0; font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.dependency-block { padding-top: 14px; }
.section-heading { display: flex; justify-content: space-between; margin-bottom: 8px; color: #a2adb5; font-size: 8px; letter-spacing: .1em; font-weight: 800; }
.section-heading span:last-child { color: #6f7b84; letter-spacing: 0; font-weight: 500; }
.dependency-row { min-height: 31px; display: flex; align-items: center; gap: 9px; border-top: 1px solid #222930; color: #adb7bd; font-size: 9px; }
.dependency-mark { color: var(--accent); }
.dependency-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dependency-version, .dependency-size { color: #7e8992; font-size: 8px; }
.inline-note { margin: 7px 0 0; color: #77838c; font-size: 8px; }
.card-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.button-secondary { min-height: 32px; border-color: #38414a; background: #1e252b; color: #d4dce0; }
.button-secondary:hover { border-color: #63703e; }
.button-secondary span { color: var(--accent); }
.pending-action { color: #78838b; font-size: 8px; }
.image-strip { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: #212830; }
.image-strip img { width: 100%; height: 96px; object-fit: cover; background: #171c22; }
.result-list { overflow: hidden; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); }
.result-row { width: 100%; min-height: 66px; display: flex; align-items: center; gap: 13px; padding: 9px 15px; border: 0; border-bottom: 1px solid #252c33; background: transparent; text-align: left; cursor: pointer; }
.result-row:last-child { border-bottom: 0; }
.result-row:hover { background: #1d242a; }
.result-thumb { width: 44px; height: 44px; flex: 0 0 auto; border-radius: 6px; object-fit: cover; background: #252d34; }
.result-thumb-empty { display: grid; place-items: center; color: #78848c; font-size: 13px; font-weight: 800; }
.result-main { flex: 1; min-width: 0; }
.result-main strong, .result-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-main strong { color: #dce2e5; font-size: 10px; }
.result-main small { margin-top: 5px; color: #7d8992; font-size: 8px; }
.result-version, .result-size { color: #929da5; font-size: 8px; }
.result-open { color: var(--accent); font-size: 13px; }
.workshop-catalog-intro { margin-bottom: 26px; }
.workshop-catalog-intro h1 { margin-top: 0; }
.workshop-catalog-search { margin-bottom: 25px; }
.workshop-catalog-search .button { min-width: 116px; }
.workshop-catalog-notice { margin-top: 14px; }
.workshop-search-status { margin: 16px 0; color: #9ba6ae; font-size: 11px; }
.workshop-results-heading { display: flex; justify-content: space-between; align-items: baseline; margin: 25px 0 12px; }
.workshop-results-heading h2 { margin: 0; color: #dce2e5; font-size: 16px; }
.workshop-results-heading > span { color: #7e8992; font-size: 10px; }
.workshop-results { display: grid; gap: 9px; }
.workshop-result-card { width: 100%; display: flex; align-items: center; gap: 15px; padding: 12px 15px; border: 1px solid var(--border); border-radius: 9px; background: var(--panel); color: inherit; text-align: left; cursor: pointer; transition: border-color .15s, background .15s; }
.workshop-result-card:hover:not(:disabled), .workshop-result-card:focus-visible { border-color: #56643b; background: #191f24; }
.workshop-result-card:disabled { cursor: default; opacity: .75; }
.workshop-result-image { width: 76px; height: 58px; flex: 0 0 auto; border-radius: 6px; object-fit: cover; background: #20272d; }
.workshop-image-placeholder { display: grid; place-items: center; color: #77838c; font-size: 21px; font-weight: 900; }
.workshop-result-content { min-width: 0; flex: 1; display: grid; gap: 5px; }
.workshop-result-name { overflow: hidden; color: #e0e6e8; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.workshop-result-author { overflow: hidden; color: #88949d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.workshop-result-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: #a6b0b7; font-size: 9px; }
.workshop-result-id, .workshop-details-id { color: #75818a; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.workshop-result-arrow { color: var(--accent); font-size: 16px; }
.workshop-show-more { display: block; min-width: 150px; margin: 18px auto 0; }
.workshop-empty-state { margin-top: 22px; padding: 24px; border: 1px dashed #303941; border-radius: 9px; color: #919ca4; text-align: center; }
.workshop-empty-state strong { color: #dce2e5; font-size: 13px; }
.workshop-empty-state p { margin: 6px 0 0; font-size: 10px; }
.workshop-details-card { padding: 18px; border: 1px solid var(--border); border-radius: 11px; background: var(--panel); }
.workshop-details-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 17px; }
.workshop-details-actions .button { display: inline-flex; align-items: center; justify-content: center; padding: 0 11px; text-decoration: none; }
.workshop-queue-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; margin-left: auto; }
.workshop-queue-action, .dependency-queue-action { position: relative; }
.queue-toast { position: absolute; z-index: 5; right: 0; bottom: calc(100% + 8px); width: max-content; max-width: min(420px, calc(100vw - 48px)); padding: 10px 13px; border: 1px solid #424750; border-radius: 8px; background: rgba(34,37,42,.98); box-shadow: 0 8px 22px rgba(0,0,0,.36); color: #e0e3e7; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; animation: queue-toast-in .18s ease-out both; }
.queue-toast::after { position: absolute; right: 17px; bottom: -5px; width: 8px; height: 8px; border-right: 1px solid #424750; border-bottom: 1px solid #424750; background: #22252a; content: ""; transform: rotate(45deg); }
@keyframes queue-toast-in { from { opacity: 0; transform: translateY(4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.workshop-details-hero { display: flex; gap: 20px; align-items: flex-start; }
.workshop-details-media { width: 230px; flex: 0 0 auto; }
.workshop-details-image { width: 230px; height: 156px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; background: #20272d; }
.workshop-image-open { position: relative; display: block; padding: 0; border: 0; border-radius: 8px; background: transparent; cursor: zoom-in; }
.workshop-image-open .workshop-details-image { display: block; transition: filter .15s ease; }
.workshop-image-open:hover .workshop-details-image { filter: brightness(.78); }
.workshop-image-zoom { position: absolute; right: 8px; bottom: 8px; display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid rgba(255,255,255,.3); border-radius: 6px; background: rgba(9,12,15,.72); color: white; opacity: 0; transition: opacity .15s; }
.workshop-image-open:hover .workshop-image-zoom, .workshop-image-open:focus-visible .workshop-image-zoom { opacity: 1; }
.workshop-image-viewer-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(4,6,8,.91); backdrop-filter: blur(9px); animation: viewer-fade-in .15s ease-out both; }
.workshop-image-viewer { position: relative; display: grid; width: min(92vw, 1400px); height: min(90vh, 920px); place-items: center; outline: none; }
.workshop-image-viewer > img { display: block; max-width: 100%; max-height: 100%; border-radius: 6px; object-fit: contain; box-shadow: 0 22px 80px rgba(0,0,0,.55); }
.workshop-viewer-close, .workshop-viewer-nav { position: absolute; z-index: 1; display: grid; width: 42px; height: 42px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(20,25,30,.78); color: #f1f4f5; cursor: pointer; line-height: 0; transition: background .15s, border-color .15s; }
.workshop-viewer-close:hover, .workshop-viewer-nav:hover { border-color: var(--accent); background: #252e35; }
.workshop-viewer-close { top: 2px; right: 2px; }
.workshop-viewer-nav { top: 50%; transform: translateY(-50%); }
.workshop-viewer-nav.previous { left: 16px; }
.workshop-viewer-nav.next { right: 16px; }
.workshop-viewer-icon { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.workshop-viewer-close .workshop-viewer-icon { width: 15px; height: 15px; stroke-width: 2.4; }
.workshop-viewer-count { position: absolute; bottom: 0; left: 50%; padding: 6px 10px; border-radius: 15px; background: rgba(20,25,30,.78); color: #d5dde1; font-size: 11px; transform: translateX(-50%); }
@keyframes viewer-fade-in { from { opacity: 0; } to { opacity: 1; } }
.workshop-preview-controls { display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 7px; color: #9aa7ad; font-size: 9px; }
.workshop-preview-button { display: grid; width: 26px; height: 24px; place-items: center; padding: 0; border: 1px solid #303940; border-radius: 5px; background: #1a2025; color: #dce4e7; cursor: pointer; line-height: 0; }
.workshop-preview-button:hover { border-color: var(--accent); color: var(--accent); }
.workshop-control-icon { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.workshop-preview-button .workshop-control-icon { width: 14px; height: 14px; }
.workshop-details-heading { min-width: 0; }
.workshop-details-id { margin: 2px 0 8px; font-size: 9px; letter-spacing: .06em; }
.workshop-details-heading h2 { margin: 0 0 8px; color: #e5eaec; font-size: 23px; letter-spacing: -.035em; }
.workshop-details-summary { margin: 12px 0 0; color: #a4afb6; font-size: 11px; line-height: 1.55; }
.workshop-details-description { margin: 6px 0 0; color: #89959d; font-size: 10px; line-height: 1.55; }
.workshop-availability { display: inline-flex; padding: 5px 8px; border: 1px solid #343c42; border-radius: 5px; color: #aeb9be; font-size: 9px; }
.workshop-availability.is-available { border-color: #39452a; background: rgba(215,243,106,.06); color: #cfe48a; }
.workshop-availability.is-unavailable { border-color: #513330; background: rgba(126,49,44,.12); color: #e9aaa1; }
.workshop-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 20px 0 0; padding: 16px 0; border-top: 1px solid #252c33; border-bottom: 1px solid #252c33; }
.workshop-detail-grid > div { min-width: 0; }
.workshop-detail-grid dt { margin-bottom: 6px; color: #78858e; font-size: 8px; letter-spacing: .07em; text-transform: uppercase; }
.workshop-detail-grid dd { overflow: hidden; margin: 0; color: #d3dade; font-size: 10px; text-overflow: ellipsis; }
.workshop-tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.workshop-tag { padding: 5px 9px; border: 1px solid #383e46; border-radius: 13px; background: #1b1e23; color: #c2c7ce; font-size: 11px; line-height: 1.35; }
.workshop-detail-status { margin: 14px 0 0; color: #9aa7ad; font-size: 10px; }
.workshop-detail-error { color: #e2aaa2; }
.workshop-technical-details { margin-top: 18px; border-top: 1px solid #252c33; color: #aab5bb; font-size: 10px; }
.workshop-technical-details summary { padding: 13px 0; color: #d1dadd; cursor: pointer; font-weight: 650; }
.workshop-version-facts { display: flex; gap: 9px 18px; flex-wrap: wrap; padding: 0 0 13px; color: #89959d; font-size: 9px; }
.workshop-table-scroll { overflow-x: auto; }
.workshop-version-table { width: 100%; margin: 8px 0 14px; border-collapse: collapse; font-size: 9px; }
.workshop-version-table th, .workshop-version-table td { padding: 8px; border-bottom: 1px solid #283038; text-align: left; white-space: nowrap; }
.workshop-version-table th { color: #87939c; font-weight: 600; }
.workshop-version-table td { color: #c6cfd3; }
.workshop-version-table td:last-child { text-align: right; }
.version-queue-action { position: relative; display: flex; justify-content: flex-end; }
.workshop-technical-details h3 { margin: 14px 0 7px; color: #d1dadd; font-size: 10px; }
.workshop-api-dependencies { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.workshop-api-dependencies li { display: grid; gap: 4px; padding: 9px; border: 1px solid #283038; border-radius: 6px; }
.workshop-api-dependencies li { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.workshop-api-dependencies li > strong, .workshop-api-dependencies li > span, .workshop-api-dependencies li > small { grid-column: 1; }
.workshop-api-dependencies .dependency-queue-action { grid-column: 2; grid-row: 1 / span 3; }
.button-small { min-height: 29px; padding: 0 9px; font-size: 9px; }
.workshop-api-dependencies strong { color: #d6dfe2; }
.workshop-api-dependencies span, .workshop-api-dependencies small { color: #89959d; font-size: 9px; }
.workshop-file-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.workshop-file-list li { display: grid; grid-template-columns: minmax(150px, 1fr) auto minmax(160px, .8fr); align-items: center; gap: 12px; padding: 9px 10px; border: 1px solid #283038; border-radius: 6px; background: #12171c; }
.workshop-file-list strong { overflow: hidden; color: #d6dfe2; text-overflow: ellipsis; white-space: nowrap; }
.workshop-file-list span, .workshop-file-list small { color: #87939c; font-size: 9px; }
.notice { display: flex; gap: 11px; padding: 13px 15px; margin: 0 0 20px; border-radius: 8px; font-size: 10px; }
.notice > span { width: 17px; height: 17px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; font-size: 9px; font-weight: 800; }
.notice p { margin: 5px 0 0; line-height: 1.5; }
.notice-error { border: 1px solid #513330; background: rgba(126,49,44,.12); color: #ecc0ba; }
.notice-error > span { background: #623a35; color: #ffc0b4; }
.notice-info { border: 1px solid #35423e; background: rgba(80,123,99,.1); color: #bdcfbf; }
.notice-info > span { background: #30443a; color: #d5efaf; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 50px 20px; border: 1px dashed #303941; border-radius: 9px; color: #909aa2; }
.empty-icon { margin-bottom: 9px; color: #78864b; font-size: 25px; }
.empty-state strong { color: #d6dde0; font-size: 12px; }
.empty-state p { margin: 6px 0 0; font-size: 10px; }
.download-queue { margin-top: 23px; padding: 17px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.download-queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.download-queue-heading h2 { margin: 0 0 5px; color: #dce2e5; font-size: 14px; }
.download-queue-heading span, .queue-folder-hint, .queue-empty { color: #8b979f; font-size: 10px; }
.queue-folder-hint { margin: 13px 0 0; color: #c8d78d; }
.queue-empty { margin: 15px 0 0; }
.download-queue-list { display: grid; gap: 7px; margin: 15px 0 0; padding: 0; list-style: none; }
.download-queue-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid #293139; border-radius: 7px; background: #12171c; }
.queue-item-copy { min-width: 0; display: grid; gap: 4px; }
.queue-item-copy strong { overflow: hidden; color: #dce3e6; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.queue-item-copy span, .queue-item-copy small { overflow-wrap: anywhere; color: #849099; font-size: 9px; }
.queue-item-copy small { color: #e1a69c; }
.queue-item-status { color: #a8b2b8; font-size: 9px; white-space: nowrap; }
.status-queued .queue-item-status { color: #cbdc8b; }
.status-completed .queue-item-status { color: #91cba0; }
.status-failed .queue-item-status, .status-cancelled .queue-item-status { color: #e1a69c; }
.queue-remove-button { width: 28px; height: 28px; border: 1px solid #343d44; border-radius: 6px; background: #1a2025; color: #b8c1c6; cursor: pointer; font-size: 17px; }
.queue-remove-button:hover { border-color: #80574e; color: #f2b6a9; }
.trust-note { display: flex; gap: 12px; margin-top: 37px; padding: 14px 16px; border: 1px solid #262e35; border-radius: 8px; background: rgba(255,255,255,.015); }
.trust-icon { color: #bbd763; font-size: 18px; }
.trust-note strong { color: #bdc6cb; font-size: 9px; }
.trust-note p { max-width: 830px; margin: 5px 0 0; color: #7f8b94; font-size: 9px; line-height: 1.6; }
.spinner { width: 12px; height: 12px; border: 2px solid rgba(20,25,13,.25); border-top-color: #202714; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; background: var(--bg); color: #849098; font-size: 10px; }
.boot-logo { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--accent); color: #171b13; font-size: 20px; font-weight: 900; }
#blazor-error-ui { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 20; padding: 12px 16px; border: 1px solid #593b36; border-radius: 7px; background: #291d1b; color: #f0d2cb; font-size: 11px; }

@media (max-width: 940px) {
    .sidebar { width: 204px; }
    .main-area { margin-left: 204px; }
    .mod-card { grid-template-columns: 175px minmax(0, 1fr); }
    .mod-info { padding: 18px; }
    .mod-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workshop-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    .sidebar { position: sticky; top: 0; width: auto; height: auto; padding: 10px 14px; flex-direction: row; align-items: center; gap: 10px; border-right: 0; border-bottom: 1px solid #20262d; }
    .brand { margin: 0 auto 0 0; padding: 0; }
    .brand-mark { width: 31px; height: 31px; }
    .brand small, .nav-label, .nav-state { display: none; }
    .nav-item { min-height: 34px; margin: 0; padding: 0 8px; gap: 6px; font-size: 9px; }
    .nav-icon { width: auto; font-size: 13px; }
    .nav-item-disabled { display: none; }
    .main-area { margin-left: 0; }
    .topbar { height: 47px; padding: 0 16px; }
    .page-content { padding: 34px 16px 45px; }
    .page-intro { align-items: flex-start; margin-bottom: 23px; }
    .search-panel { gap: 10px; min-height: 66px; padding: 9px; }
    .search-symbol { font-size: 22px; }
    .search-control label { font-size: 8px; }
    .search-control input { font-size: 10px; }
    .credentials-panel { grid-template-columns: 1fr; gap: 9px; margin-top: 8px; padding: 11px; }
    .credentials-heading, .credentials-note { grid-column: 1; }
    .credential-field input { min-height: 34px; }
    .workshop-catalog-search { align-items: center; }
    .workshop-catalog-search .button { min-width: auto; padding: 0 10px; }
    .workshop-result-card { gap: 10px; padding: 9px; }
    .workshop-result-image { width: 56px; height: 48px; }
    .workshop-result-meta { gap: 5px 10px; }
    .workshop-details-card { padding: 12px; }
    .workshop-details-hero { flex-direction: column; gap: 13px; }
    .workshop-details-media, .workshop-details-image { width: 100%; }
    .workshop-details-image { height: 170px; }
    .workshop-details-heading h2 { font-size: 19px; }
    .workshop-detail-grid { gap: 12px 8px; }
    .workshop-file-list li { grid-template-columns: 1fr auto; }
    .workshop-file-list small { grid-column: 1 / -1; }
    .button-primary { gap: 6px; padding: 0 9px; font-size: 8px; }
    .search-hint { align-items: flex-start; font-size: 9px; line-height: 1.5; margin-bottom: 29px; }
    .hint-icon { flex: 0 0 auto; margin-top: 1px; }
    .download-destination { align-items: flex-start; flex-direction: column; margin-bottom: 27px; padding: 12px; }
    .destination-copy > p, .destination-message { font-size: 8px; line-height: 1.5; }
    .download-destination .button { align-self: stretch; }
    .download-progress > div { font-size: 8px; }
    .mod-card { grid-template-columns: 1fr; }
    .mod-cover { min-height: 150px; }
    .mod-cover img { object-position: center 38%; }
    .mod-info { padding: 17px; }
    .mod-title-row h2 { font-size: 17px; }
    .image-strip img { height: 66px; }
    .result-row { gap: 8px; padding: 8px; }
    .result-thumb { width: 36px; height: 36px; }
    .result-version { display: none; }
    .result-size { max-width: 62px; text-align: right; }
    .top-link { font-size: 8px; }
}

@media (max-width: 520px) {
    .workshop-image-viewer-backdrop { padding: 8px; }
    .workshop-image-viewer { width: 96vw; height: 86vh; }
    .workshop-viewer-close, .workshop-viewer-nav { width: 36px; height: 36px; }
    .workshop-viewer-nav.previous { left: 5px; }
    .workshop-viewer-nav.next { right: 5px; }
    .download-queue { padding: 12px; }
    .download-queue-heading { align-items: flex-start; flex-direction: column; }
    .download-queue-item { grid-template-columns: minmax(0, 1fr) auto auto; }
    .queue-item-copy { grid-column: 1 / -1; }
    .queue-item-status { grid-column: 1; }
    .download-queue-item .button-small { grid-column: 2; }
    .queue-remove-button { grid-column: 3; grid-row: 2; }
    .queue-toast { right: -4px; max-width: min(360px, calc(100vw - 36px)); font-size: 13px; }
}

/* Experimental command-room visual direction. */
:root {
    --bg: #111214;
    --panel: #191a1e;
    --panel-soft: #202126;
    --border: #34363c;
    --muted: #afb1b8;
    --text: #eceef1;
    --accent: #b9c28d;
    --accent-dim: #292b26;
    --danger: #ff9589;
}
body { font-size: 16px; line-height: 1.5; }
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid #2c2e32; background: rgba(17,18,20,.97); }
.site-header-inner { width: min(100% - 64px, 1480px); min-height: 82px; display: flex; align-items: center; gap: clamp(28px, 5vw, 80px); margin: 0 auto; }
.brand { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 0; margin: 0; }
.brand-mark { width: 43px; height: 43px; display: block; flex: 0 0 auto; border-radius: 12px; background: transparent; box-shadow: none; object-fit: contain; }
.brand strong { font-size: 17px; }
.brand small { margin-top: 4px; font-size: 10px; }
.main-nav { display: flex; align-self: stretch; align-items: center; gap: 8px; }
.nav-item { min-height: 48px; gap: 10px; padding: 0 16px; margin: 0; border-radius: 8px; font-size: 15px; }
a.nav-item:hover { color: var(--text); background: #222329; }
a.nav-item.active { color: var(--accent); background: #292b2f; }
.nav-state { min-width: 22px; display: inline-grid; place-items: center; padding: 1px 6px; border-radius: 20px; background: #373941; color: var(--accent); font-size: 12px; }
.header-actions { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.top-link { color: #c1c3ca; font-size: 14px; }
.top-link:hover { color: var(--accent); }
.language-switcher select { min-height: 42px; padding: 0 30px 0 11px; border: 1px solid #45474d; border-radius: 8px; background: var(--panel); color: var(--text); font-size: 14px; }
.main-area { min-height: calc(100vh - 82px); margin-left: 0; }
.page-content { width: min(100% - 64px, 1380px); max-width: none; padding: 46px 0 84px; }

.page-hero { position: relative; isolation: isolate; min-height: 260px; display: flex; align-items: flex-end; overflow: hidden; margin-bottom: 28px; padding: 36px clamp(28px, 5vw, 68px); border: 1px solid #41434a; border-radius: 16px; background-color: #222329; background-image: linear-gradient(90deg, rgba(15,16,19,.94), rgba(15,16,19,.75) 48%, rgba(15,16,19,.28)), linear-gradient(0deg, rgba(15,16,19,.68), transparent 72%), url('/images/workshop-hero.png'); background-size: cover; background-position: center 53%; }
.page-hero-content { max-width: 740px; outline: none; }
.page-hero h1 { outline: none; }
.hero-instruction-button { min-width: 174px; min-height: 52px; gap: 11px; margin-top: 19px; padding: 0 19px; font-size: 16px; box-shadow: 0 8px 24px rgba(0,0,0,.24); }
.instruction-button-icon { width: 20px; height: 20px; display: inline-grid; flex: 0 0 20px; place-items: center; }
.instruction-button-icon svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.instruction-button-icon .instruction-info-dot { fill: currentColor; stroke: none; }
.hero-instruction-button:focus-visible { outline: 2px solid #f3f5f7; outline-offset: 3px; }
.eyebrow { margin: 0; color: #d0d2d8; font-size: 12px; font-weight: 750; letter-spacing: .16em; }
h1 { margin: 12px 0 10px; font-size: clamp(38px, 5vw, 62px); line-height: 1.03; letter-spacing: -.055em; }
.page-hero-subtitle { max-width: 640px; margin: 0; color: #d0d2d8; font-size: 17px; }
.catalog-hero { min-height: 325px; display: grid; grid-template-columns: 1fr; align-content: end; gap: 26px; }
.queue-hero { min-height: 265px; }
.search-panel { min-height: 76px; gap: 17px; padding: 12px 14px 12px 20px; border-color: #45474d; border-radius: 11px; background: rgba(25,26,30,.97); box-shadow: none; }
.search-symbol { font-size: 31px; }
.search-control label { margin-bottom: 4px; color: #afb1b8; font-size: 12px; letter-spacing: 0; }
.search-control input { min-height: 27px; font-size: 17px; }
.button { min-height: 48px; gap: 12px; padding: 0 20px; border-radius: 8px; font-size: 14px; }
.button-primary { background: var(--accent); color: #171a10; }
.button-secondary { min-height: 48px; border-color: #45474d; background: #24252a; color: #e4e5e9; }
.button-small { min-height: 40px; padding: 0 14px; font-size: 13px; }
.workshop-catalog-search { width: min(100%, 930px); margin: 0; }
.workshop-catalog-search .button { min-width: 145px; }
.workshop-catalog-body { margin-top: 34px; }
.workshop-welcome-state, .workshop-empty-state { min-height: 300px; justify-content: center; border-color: var(--border); border-radius: 12px; background: var(--panel); }
.workshop-welcome-map { width: 160px; height: auto; margin-bottom: 20px; fill: none; stroke: #777e62; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.workshop-welcome-map circle { stroke: var(--accent); }
.workshop-welcome-state h2, .workshop-empty-state strong { font-size: 23px; }
.workshop-welcome-state p, .workshop-empty-state p { font-size: 16px; }
.workshop-results-heading { margin: 30px 0 15px; }
.workshop-results-heading h2 { font-size: 23px; }
.workshop-results-heading > span { font-size: 14px; }
.workshop-results { gap: 9px; }
.workshop-result-card { min-height: 102px; gap: 18px; padding: 12px 16px; border-radius: 10px; background: var(--panel); }
.workshop-result-card:hover:not(:disabled), .workshop-result-card:focus-visible { border-color: #6f725f; background: #202126; }
.workshop-result-card.is-selected { border-color: var(--accent); box-shadow: inset 3px 0 var(--accent); }
.workshop-result-image { width: 118px; height: 76px; border-radius: 7px; }
.workshop-result-name { font-size: 18px; }
.workshop-result-author { font-size: 14px; }
.workshop-result-meta { gap: 15px; font-size: 13px; }
.workshop-result-arrow { font-size: 22px; }
.workshop-show-more { min-width: 180px; }
.workshop-details-card { margin-top: 26px; padding: clamp(18px, 3vw, 32px); border-radius: 14px; background: var(--panel); }
.workshop-details-toolbar { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.workshop-details-toolbar .button { text-decoration: none; }
.workshop-details-hero { display: grid; grid-template-columns: minmax(320px, 1.1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 52px); }
.workshop-details-media { width: auto; min-width: 0; }
.workshop-details-image { width: 100%; height: clamp(250px, 31vw, 420px); border-radius: 9px; }
.workshop-image-open { width: 100%; overflow: hidden; border-radius: 9px; }
.workshop-details-heading h2 { font-size: clamp(30px, 3.2vw, 42px); }
.workshop-details-id { margin: 3px 0 9px; font-size: 13px; }
.workshop-details-summary { margin-top: 16px; color: #dedfe3; font-size: 17px; }
.workshop-description-block { margin-top: 10px; }
.workshop-details-description { max-width: 72ch; margin: 0; color: var(--muted); font-size: 15px; line-height: 1.6; white-space: pre-line; }
.workshop-description-toggle { margin-top: 7px; padding: 3px 0; border: 0; background: transparent; color: var(--accent); font: inherit; font-size: 14px; font-weight: 650; cursor: pointer; }
.workshop-description-toggle:hover { color: var(--text); text-decoration: underline; }
.workshop-availability { margin-top: 6px; padding: 5px 10px; border-radius: 20px; font-size: 13px; }
.workshop-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; margin-top: 24px; padding: 20px 0; }
.workshop-detail-grid dt { font-size: 12px; }
.workshop-detail-grid dd { font-size: 16px; }
.workshop-queue-actions { gap: 10px; margin-top: 18px; }
.workshop-technical-details { margin-top: 20px; font-size: 14px; }
.workshop-technical-details summary { padding: 16px 0; font-size: 16px; }
.workshop-version-table { font-size: 13px; }
.workshop-version-table th, .workshop-version-table td { padding: 11px 10px; }
.workshop-api-dependencies { gap: 9px; }
.workshop-api-dependencies li { padding: 13px; border-radius: 9px; background: #202126; }
.workshop-api-dependencies strong { font-size: 15px; }
.workshop-api-dependencies span, .workshop-api-dependencies small { font-size: 13px; }
.workshop-file-list { gap: 8px; }
.workshop-file-list li { padding: 12px; border-radius: 8px; background: #202126; }
.workshop-file-list span, .workshop-file-list small { font-size: 13px; }

.download-page .queue-search { margin: 0 0 20px; }
.download-destination { margin: 20px 0; padding: 20px 22px; border-color: var(--border); border-radius: 12px; background: var(--panel); }
.destination-copy > strong { font-size: 18px; }
.destination-copy > p, .destination-message { font-size: 14px; }
.download-queue { margin-top: 22px; padding: clamp(18px, 3vw, 28px); border-radius: 14px; background: var(--panel); }
.download-queue-heading h2 { font-size: 24px; }
.download-queue-heading span, .queue-folder-hint, .queue-empty { font-size: 14px; }
.download-queue-list { gap: 10px; margin-top: 18px; }
.download-queue-item { grid-template-columns: 104px minmax(0, 1fr) auto auto; gap: 14px; padding: 13px; border-color: #383a40; border-radius: 10px; background: #1d1e22; }
.queue-item-image { width: 104px; height: 76px; display: block; border-radius: 7px; object-fit: cover; background: #2a2c24; }
.queue-item-image-placeholder { display: grid; place-items: center; color: #92949b; font-size: 29px; font-weight: 900; background: #292a30; }
.queue-item-copy strong { font-size: 17px; }
.queue-item-copy span, .queue-item-copy small { color: #b6b8c0; font-size: 13px; }
.queue-item-copy small { color: #ffada2; }
.queue-item-status { color: #c4c6b9; font-size: 13px; }
.status-queued .queue-item-status { color: #e2edaa; }
.status-completed .queue-item-status { color: #a4d7aa; }
.status-failed .queue-item-status, .status-cancelled .queue-item-status { color: #ffaaa0; }
.queue-item-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.queue-remove-button { width: 42px; height: 42px; }
.download-progress { padding: 13px 15px; border-color: #474a3d; border-radius: 9px; background: #23251f; }
.queue-item-progress { grid-column: 1 / -1; width: 100%; }
.download-progress > div { font-size: 13px; }
.download-progress > div span { color: #c1c3b7; text-align: right; }
.download-progress progress { height: 8px; margin-top: 11px; }
.notice { padding: 15px 17px; border-radius: 9px; font-size: 14px; }
.notice > span { width: 22px; height: 22px; font-size: 12px; }
.notice-error { border-color: #69443e; background: #2b201d; }
.notice-info { border-color: #46533a; background: #22271d; }
.language-switcher select:focus-visible, .button:focus-visible, .queue-remove-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@media (max-width: 900px) {
    .site-header-inner { width: min(100% - 36px, 1480px); gap: 22px; }
    .header-actions { gap: 12px; }
    .top-link { display: none; }
    .page-content { width: min(100% - 36px, 1380px); }
    .workshop-details-hero { grid-template-columns: minmax(240px, .9fr) minmax(0, 1fr); gap: 24px; }
    .download-queue-item { grid-template-columns: 84px minmax(0, 1fr) auto; }
    .queue-item-image { width: 84px; height: 68px; }
    .queue-item-status { grid-column: 2; }
    .queue-item-controls { grid-column: 3; grid-row: 1 / span 2; }
    .queue-item-progress { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .site-header { position: relative; }
    .site-header-inner { width: calc(100% - 28px); min-height: 0; flex-wrap: wrap; gap: 10px 16px; padding: 12px 0 10px; }
    .brand-mark { width: 38px; height: 38px; }
    .brand strong { font-size: 15px; }
    .brand small { font-size: 9px; }
    .main-nav { order: 3; width: 100%; gap: 5px; }
    .nav-item { min-height: 42px; flex: 1; justify-content: center; padding: 0 8px; font-size: 13px; }
    .header-actions { margin-left: auto; }
    .language-switcher select { min-height: 38px; font-size: 12px; }
    .page-content { width: calc(100% - 28px); padding: 24px 0 50px; }
    .page-hero { min-height: 225px; margin-bottom: 20px; padding: 24px 20px; background-position: 58% center; }
    .catalog-hero { min-height: 320px; gap: 20px; }
    .eyebrow { font-size: 10px; }
    h1 { font-size: clamp(35px, 11vw, 48px); }
    .page-hero-subtitle { font-size: 15px; }
    .search-panel { min-height: 66px; gap: 10px; padding: 8px 9px 8px 12px; }
    .search-symbol { font-size: 24px; }
    .search-control label { font-size: 10px; }
    .search-control input { min-height: 23px; font-size: 14px; }
    .search-panel .button { min-height: 43px; padding: 0 10px; font-size: 12px; }
    .workshop-catalog-body { margin-top: 24px; }
    .workshop-welcome-state { min-height: 255px; }
    .workshop-welcome-state h2, .workshop-empty-state strong { font-size: 20px; }
    .workshop-welcome-state p, .workshop-empty-state p { font-size: 14px; }
    .workshop-results-heading h2 { font-size: 20px; }
    .workshop-results-heading > span { font-size: 12px; }
    .workshop-result-card { min-height: 86px; gap: 10px; padding: 9px; }
    .workshop-result-image { width: 74px; height: 62px; }
    .workshop-result-name { font-size: 15px; }
    .workshop-result-author { font-size: 12px; }
    .workshop-result-meta { gap: 4px 8px; font-size: 11px; }
    .workshop-result-id { width: 100%; }
    .workshop-details-card { margin-top: 20px; padding: 16px; }
    .workshop-details-toolbar { margin-bottom: 17px; }
    .workshop-details-toolbar .button { min-height: 42px; padding: 0 10px; font-size: 11px; }
    .workshop-details-hero { grid-template-columns: minmax(0, 1fr); gap: 18px; }
    .workshop-details-image { height: 230px; }
    .workshop-details-heading h2 { font-size: 30px; }
    .workshop-details-summary { font-size: 15px; }
    .workshop-details-description { font-size: 14px; }
    .workshop-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 10px; margin-top: 18px; padding: 16px 0; }
    .workshop-detail-grid dt { font-size: 10px; }
    .workshop-detail-grid dd { font-size: 13px; }
    .workshop-queue-actions { gap: 8px; }
    .workshop-queue-actions .button { min-height: 42px; padding: 0 10px; font-size: 11px; }
    .workshop-file-list li { grid-template-columns: minmax(0, 1fr) auto; }
    .workshop-file-list small { grid-column: 1 / -1; }
    .workshop-technical-details { font-size: 12px; }
    .workshop-technical-details summary { font-size: 13px; }
    .workshop-api-dependencies li { grid-template-columns: minmax(0, 1fr); }
    .workshop-api-dependencies .dependency-queue-action { grid-column: 1; grid-row: auto; }
    .download-queue { padding: 16px; }
    .download-queue-heading { align-items: flex-start; flex-direction: column; }
    .download-queue-heading h2 { font-size: 20px; }
    .download-queue-heading .button { width: 100%; }
    .download-destination { align-items: flex-start; flex-direction: column; padding: 16px; }
    .download-destination .button { width: 100%; }
    .download-queue-item { grid-template-columns: 62px minmax(0, 1fr); gap: 9px; padding: 10px; }
    .queue-item-image { width: 62px; height: 62px; }
    .queue-item-copy strong { white-space: normal; font-size: 15px; }
    .queue-item-copy span, .queue-item-copy small { font-size: 11px; }
    .queue-item-status { grid-column: 2; font-size: 12px; }
    .queue-item-controls { grid-column: 1 / -1; grid-row: auto; justify-content: flex-end; }
    .queue-item-progress { grid-column: 1 / -1; }
    .download-progress > div { flex-direction: column; gap: 5px; font-size: 12px; }
    .download-progress > div span { text-align: left; }
    .mod-card { grid-template-columns: 1fr; }
    .mod-cover { min-height: 190px; }
    .mod-info { padding: 18px; }
    .mod-title-row h2 { font-size: 21px; }
    .mod-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .workshop-image-viewer-backdrop { padding: 8px; }
    .workshop-image-viewer { width: 96vw; height: 86vh; }
    .workshop-viewer-close, .workshop-viewer-nav { width: 40px; height: 40px; }
    .workshop-viewer-nav.previous { left: 5px; }
    .workshop-viewer-nav.next { right: 5px; }
    .credentials-panel { grid-template-columns: 1fr; }
    .credentials-heading, .credentials-note { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* Follow-up polish: soften the accent and open mod details above the results. */
:root { --accent: #b9c28d; --accent-dim: #2b2d2f; }
.brand strong { font-size: 15px; letter-spacing: .015em; }
.brand small { letter-spacing: .07em; }
.brand-mark { background: transparent; }
.button-primary:hover:not(:disabled) { background: #c8d0a0; }
.workshop-welcome-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 42px 24px; text-align: center; }
.workshop-availability.is-available { border-color: #596043; background: #292c23; color: #d3dbad; }
.status-queued .queue-item-status { color: #ccd2ab; }
.queue-folder-hint { color: #d0cfaa; }
.workshop-details-overlay { position: fixed; z-index: 60; inset: 0; display: flex; align-items: center; justify-content: center; overflow-y: auto; overscroll-behavior: contain; padding: 24px; background: rgba(8,9,12,.82); backdrop-filter: blur(4px); }
.workshop-details-dialog { width: min(1180px, 100%); max-height: calc(100vh - 48px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid #484a51; border-radius: 14px; outline: none; box-shadow: 0 24px 80px rgba(0,0,0,.55); }
.workshop-details-dialog .workshop-details-card { margin-top: 0; }
.workshop-details-toolbar .workshop-details-close { display: grid; width: 46px; min-width: 46px; min-height: 46px; place-items: center; margin-left: auto; padding: 0; font-size: 0; line-height: 0; }

@media (max-width: 640px) {
    .workshop-details-overlay { align-items: flex-start; padding: 10px; }
    .workshop-details-dialog { max-height: calc(100vh - 20px); border-radius: 11px; }
}

/* CORS setup dialog and download-queue controls. */
.cors-notice-overlay { position: fixed; z-index: 120; inset: 0; display: grid; place-items: center; overflow-y: auto; padding: 20px; background: rgba(7,8,10,.84); backdrop-filter: blur(5px); }
.cors-notice-dialog { width: min(720px, 100%); max-height: min(92vh, 820px); overflow-y: auto; padding: clamp(22px, 4vw, 34px); border: 1px solid #4a4c53; border-radius: 16px; outline: none; background: var(--panel); color: var(--text); box-shadow: 0 26px 90px rgba(0,0,0,.62); }
.cors-notice-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.cors-notice-heading .eyebrow { margin-bottom: 8px; }
.cors-notice-heading h2 { margin: 0; font-size: clamp(24px, 4vw, 32px); line-height: 1.15; letter-spacing: -.035em; }
.cors-notice-close { width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid #44464d; border-radius: 8px; background: #24252a; color: var(--text); font-size: 25px; line-height: 1; cursor: pointer; }
.cors-notice-instructions { margin: 22px 0 12px; color: #d4d6dc; font-size: 16px; line-height: 1.55; }
.cors-notice-links { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 8px; }
.cors-notice-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent); font-weight: 700; overflow-wrap: anywhere; }
.cors-notice-link:hover { color: var(--text); }
.cors-notice-warning { margin-top: 20px; padding: 14px 16px; border: 1px solid #383a40; border-radius: 9px; background: #1d1e22; color: #c1c3ca; font-size: 14px; line-height: 1.55; }
.cors-explanation { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.cors-explanation h3 { margin: 0 0 8px; font-size: 17px; }
.cors-explanation p { margin: 7px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.cors-notice-actions { display: flex; justify-content: flex-end; margin-top: 22px; }
.cors-notice-actions .button { min-width: 150px; }
.cors-notice-close:focus-visible, .cors-notice-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.download-page .queue-search { padding-right: 28px; }
.download-page .download-destination { padding-right: 28px; }
.download-page .queue-search > .button,
.download-page .download-destination > .button,
.download-page .download-queue-heading > .button { width: 168px; min-width: 168px; min-height: 48px; flex: 0 0 168px; white-space: nowrap; }
.download-notice-toast { position: fixed; z-index: 90; top: 98px; right: 24px; width: min(430px, calc(100vw - 48px)); margin: 0; box-shadow: 0 16px 48px rgba(0,0,0,.48); animation: download-toast-enter .22s ease-out both; }
@keyframes download-toast-enter { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1024px) {
    .site-header-inner { gap: 20px; }
    .header-actions { gap: 12px; }
    .top-link { font-size: 12px; }
}

@media (max-width: 640px) {
    .cors-notice-overlay { align-items: start; padding: 12px; }
    .cors-notice-dialog { max-height: calc(100vh - 24px); border-radius: 12px; }
    .cors-notice-instructions { font-size: 14px; }
    .cors-notice-warning, .cors-explanation p { font-size: 13px; }
    .hero-instruction-button { min-width: 158px; min-height: 48px; margin-top: 15px; padding: 0 15px; font-size: 14px; }
    .download-page .queue-search { display: grid; grid-template-columns: 24px minmax(0, 1fr); padding-right: 12px; }
    .download-page .queue-search > .search-symbol { grid-column: 1; grid-row: 1; }
    .download-page .queue-search > .search-control { grid-column: 2; grid-row: 1; }
    .download-page .queue-search > .button { width: 100%; min-width: 0; min-height: 43px; grid-column: 1 / -1; flex-basis: auto; }
    .download-page .download-destination { padding-right: 16px; }
    .download-page .download-destination > .button,
    .download-page .download-queue-heading > .button { width: 100%; min-width: 0; flex-basis: auto; }
    .download-notice-toast { top: 14px; right: 14px; width: calc(100vw - 28px); }
}

.queue-item-image-button { overflow: hidden; padding: 0; border: 0; border-radius: 7px; background: transparent; cursor: pointer; }
.queue-item-image-button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.queue-item-image-placeholder.queue-item-image-button { color: #aeb2b9; font: inherit; font-size: 29px; font-weight: 800; }
.queue-item-title { max-width: 100%; overflow: hidden; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 750; text-align: left; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.queue-item-title:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.queue-item-image-button:hover { filter: brightness(1.08); }
.queue-item-image-button:focus-visible, .queue-item-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
