:root {
  color-scheme: dark;
  --ink: #0d0f0e;
  --panel: #141715;
  --panel-2: #1b1f1c;
  --line: #303530;
  --muted: #929a93;
  --paper: #f3f1e8;
  --acid: #c8ff42;
  --orange: #ff7146;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --sans: Inter, "Segoe UI", Arial, system-ui, sans-serif;
  --radius: 18px;
  --topbar-height: 72px;
  --anchor-gap: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-height) + var(--anchor-gap)); }
body { margin: 0; background: var(--ink); color: var(--paper); font-family: var(--sans); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.skip-link { position: fixed; z-index: 99; left: 1rem; top: -5rem; padding: .8rem 1rem; background: var(--acid); color: var(--ink); }
.skip-link:focus { top: 1rem; }
.topbar { height: var(--topbar-height); padding: 0 clamp(1rem, 3vw, 3rem); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--ink) 88%, transparent); backdrop-filter: blur(18px); }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand-mark { width: 31px; aspect-ratio: 1; display: grid; place-items: center; background: var(--acid); color: var(--ink); border-radius: 50%; font-family: var(--mono); }
.brand-name { display: flex; flex-direction: column; line-height: 1; }
.brand-name strong { font-size: 1rem; }
.brand-name small { color: var(--muted); font: .5rem var(--mono); letter-spacing: .05em; margin-top: .22rem; }
.topbar nav { display: flex; gap: 2rem; }
.topbar nav a, .github-link { text-decoration: none; color: var(--muted); font-size: .85rem; }
.topbar nav a:hover, .github-link:hover { color: var(--paper); }

.hero { min-height: 590px; padding: clamp(4rem, 8vw, 8rem) clamp(1rem, 6vw, 6rem) 4rem; display: grid; grid-template-columns: 1fr auto; gap: 4rem; align-items: end; background:
  radial-gradient(circle at 75% 35%, rgba(200,255,66,.09), transparent 24%),
  linear-gradient(135deg, transparent 45%, rgba(255,113,70,.04)); }
.eyebrow { color: var(--acid); text-transform: uppercase; letter-spacing: .16em; font: 500 .68rem var(--mono); margin: 0 0 1rem; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(3.5rem, 8vw, 8.2rem); line-height: .88; letter-spacing: -.07em; margin: 0 0 2rem; max-width: 1100px; }
h1 span { color: var(--muted); }
.hero-deck { color: #c4c7c1; font-size: clamp(1rem, 1.5vw, 1.25rem); line-height: 1.65; max-width: 650px; }
.hero-actions { display: flex; gap: 1rem; align-items: center; margin-top: 2rem; }
.primary-button, .quiet-button, .text-button, .load-more { border: 0; cursor: pointer; }
.primary-button { display: inline-flex; justify-content: center; align-items: center; padding: .85rem 1.15rem; border-radius: 999px; background: var(--acid); color: var(--ink); text-decoration: none; font-weight: 700; }
.primary-button:hover { background: #d6ff72; }
.text-button { background: transparent; color: var(--paper); padding: .8rem; text-decoration: none; }
.text-button span { color: var(--orange); }
.hero-stats { display: flex; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.hero-stats div { background: var(--panel); width: 145px; min-height: 130px; padding: 1rem; display: flex; flex-direction: column; justify-content: space-between; }
.hero-stats strong { font: 500 2rem var(--mono); color: var(--acid); }
.hero-stats span { color: var(--muted); font-size: .72rem; }

.image-browser { padding: 5rem 0 5rem clamp(1rem, 4vw, 4rem); border-top: 1px solid var(--line); }
.section-heading { padding-right: clamp(1rem, 4vw, 4rem); display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: 2rem; }
.section-heading h2, .filter-heading h2 { font-size: clamp(2rem, 4vw, 4rem); letter-spacing: -.045em; margin: 0; }
.section-heading > p { color: var(--muted); max-width: 440px; line-height: 1.6; }
.reference-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; max-width: 650px; }
.reference-actions p { color: var(--muted); line-height: 1.6; margin: 0; max-width: 430px; }
.reference-actions .primary-button { white-space: nowrap; }
.image-rail { display: flex; gap: 1rem; overflow-x: auto; padding: 0 4rem 1rem 0; scroll-snap-type: x mandatory; scrollbar-color: var(--line) transparent; }
.image-card { position: relative; flex: 0 0 clamp(260px, 27vw, 400px); aspect-ratio: 1.35; padding: 0; color: white; border: 1px solid var(--line); background: var(--panel); overflow: hidden; border-radius: var(--radius); cursor: pointer; scroll-snap-align: start; text-align: left; }
.image-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease, filter .4s; }
.image-card::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.88)); }
.image-card .image-copy { position: absolute; z-index: 2; inset: auto 1rem 1rem; }
.image-card strong { display: block; font-size: 1.05rem; }
.image-card span { color: #c8cbc6; font: .68rem var(--mono); }
.image-card:hover img { transform: scale(1.035); }
.image-card[aria-pressed="true"] { border-color: var(--acid); box-shadow: 0 0 0 1px var(--acid); }
.image-card[aria-pressed="true"]::before { content: "Selected"; position: absolute; z-index: 3; top: 1rem; right: 1rem; padding: .35rem .55rem; border-radius: 999px; background: var(--acid); color: var(--ink); font: 500 .62rem var(--mono); text-transform: uppercase; }

.catalog-shell { display: grid; grid-template-columns: 315px minmax(0, 1fr); border-top: 1px solid var(--line); min-height: 100vh; }
.filters { padding: 2rem 1.4rem 4rem; border-right: 1px solid var(--line); background: #101210; }
.filter-heading { display: flex; justify-content: space-between; align-items: start; margin-bottom: 2rem; }
.filter-heading h2 { font-size: 2.2rem; }
.quiet-button { padding: .55rem .8rem; color: var(--paper); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; font-size: .72rem; }
.quiet-button:hover { border-color: var(--muted); }
.search-field > span:first-child { display: block; color: var(--muted); font: .67rem var(--mono); text-transform: uppercase; margin-bottom: .55rem; }
.search-box { display: flex; align-items: center; gap: .65rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: .78rem; }
.search-box:focus-within { border-color: var(--acid); }
.search-box input { width: 100%; background: transparent; border: 0; outline: 0; color: var(--paper); min-width: 0; }
.search-box input::placeholder { color: #626862; }
.preset-row { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.4rem; }
.preset-row button { border: 1px solid var(--line); background: transparent; color: var(--muted); padding: .38rem .55rem; border-radius: 999px; font-size: .67rem; cursor: pointer; }
.preset-row button:hover { color: var(--paper); border-color: var(--muted); }
.switch-row { display: flex; align-items: center; justify-content: space-between; border-block: 1px solid var(--line); padding: 1rem 0; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: .8rem; }
.switch-row small { color: var(--muted); margin-top: .2rem; font-size: .67rem; }
.switch-row input { accent-color: var(--acid); width: 34px; height: 18px; }
.facet-group { border-bottom: 1px solid var(--line); }
.facet-group summary { padding: 1rem 0; cursor: pointer; list-style: none; display: flex; justify-content: space-between; font-size: .82rem; font-weight: 600; }
.facet-group summary::after { content: "+"; color: var(--muted); font: 1rem var(--mono); }
.facet-group[open] summary::after { content: "−"; }
.facet-options { display: grid; gap: .25rem; padding-bottom: 1rem; max-height: 260px; overflow: auto; }
.facet-option { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: .65rem; width: 100%; color: var(--muted); background: transparent; border: 0; padding: .4rem 0; text-align: left; cursor: pointer; font-size: .73rem; }
.facet-option .state-box { width: 14px; aspect-ratio: 1; border: 1px solid #596059; border-radius: 3px; display: grid; place-items: center; font-size: .65rem; }
.facet-option[data-state="include"] { color: var(--paper); }
.facet-option[data-state="include"] .state-box { background: var(--acid); border-color: var(--acid); color: var(--ink); }
.facet-option[data-state="exclude"] { color: #c48876; }
.facet-option[data-state="exclude"] .state-box { border-color: var(--orange); color: var(--orange); }
.facet-option .count { color: #606660; font: .62rem var(--mono); }
.filter-help { color: #6f756f; font-size: .67rem; line-height: 1.5; margin: 1rem 0; }

.catalog-main { min-width: 0; padding: 2rem clamp(1rem, 3vw, 3rem) 5rem; }
.selected-reference { display: grid; grid-template-columns: 115px minmax(0, 1fr) minmax(230px, 300px) auto; gap: 1.2rem; align-items: center; padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); }
.selected-reference img { width: 115px; height: 76px; object-fit: cover; border-radius: 10px; }
.selected-reference .eyebrow { margin-bottom: .45rem; }
.selected-reference h2 { margin: 0 0 .25rem; font-size: clamp(1.5rem, 3vw, 2.6rem); letter-spacing: -.04em; }
.selected-reference p:last-child { margin: 0; color: var(--muted); font: .7rem var(--mono); }
.reference-space-field { display: block; color: var(--acid); font: .62rem var(--mono); text-transform: uppercase; letter-spacing: .06em; }
.reference-space-field select { display: block; width: 100%; margin-top: .4rem; color: var(--paper); text-transform: none; letter-spacing: 0; }
.reference-space-field small { display: block; margin-top: .4rem; color: var(--muted); font: .55rem/1.45 var(--mono); text-transform: none; letter-spacing: 0; }
.reference-space-field small[data-confidence="embedded"] { color: var(--acid); }
.reference-space-field small[data-confidence="fallback"] { color: #e4b272; }
.mobile-filter-button { display: none; }
.catalog-toolbar { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.catalog-toolbar strong { font-size: .9rem; }
.catalog-toolbar > div span { color: var(--muted); font-size: .68rem; margin-left: .7rem; }
.catalog-toolbar label { color: var(--muted); font: .67rem var(--mono); display: flex; align-items: center; gap: .6rem; }
select { color: var(--paper); background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: .55rem .8rem; outline: 0; }
.active-chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.active-chips button { border: 1px solid var(--line); color: var(--paper); background: var(--panel); border-radius: 999px; padding: .35rem .55rem; font-size: .64rem; cursor: pointer; }
.active-chips button span { color: var(--orange); margin-left: .3rem; }
.lut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 1rem; }
.lut-card { min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; transition: transform .2s, border-color .2s; }
.lut-card:hover { transform: translateY(-3px); border-color: #515851; }
.lut-preview { position: relative; width: 100%; aspect-ratio: 1.45; border: 0; background: #090a09; padding: 0; cursor: pointer; overflow: hidden; color: var(--paper); }
.lut-preview img, .lut-preview canvas { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.lut-card:hover .lut-preview img, .lut-card:hover .lut-preview canvas { transform: scale(1.02); }
.lut-preview .status { position: absolute; top: .65rem; left: .65rem; padding: .28rem .45rem; border-radius: 999px; background: rgba(10,12,10,.76); backdrop-filter: blur(8px); color: #d8dbd5; font: .55rem var(--mono); text-transform: uppercase; }
.lut-preview .status::before { content: ""; display: inline-block; width: 5px; aspect-ratio: 1; margin-right: .35rem; border-radius: 50%; background: var(--acid); }
.lut-preview .no-preview { position: absolute; inset: 0; display: grid; place-items: center; padding: 1.5rem; text-align: center; background: repeating-linear-gradient(135deg,#121512,#121512 8px,#171a17 8px,#171a17 16px); color: var(--muted); font: .65rem/1.5 var(--mono); }
.lut-card-body { padding: .85rem; }
.lut-card-kicker { color: var(--muted); font: .57rem var(--mono); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lut-card h3 { font-size: .88rem; line-height: 1.35; margin: .4rem 0 .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-community-stats { min-height: 1rem; margin: -.25rem 0 .55rem; color: #7f877f; font: .56rem var(--mono); }
.tag-row { display: flex; gap: .3rem; overflow: hidden; min-height: 20px; }
.tag-row span, .viewer-badges span { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .4rem; color: #aab0aa; font: .53rem var(--mono); text-transform: uppercase; }
.lut-card-actions { display: flex; align-items: center; justify-content: space-between; margin-top: .75rem; }
.lut-card-actions button { background: transparent; color: var(--muted); border: 0; padding: 0; font-size: .65rem; cursor: pointer; }
.lut-card-actions button:hover { color: var(--paper); }
.lut-card-actions button.selected { color: var(--acid); }
.load-more { display: block; margin: 2rem auto 0; border: 1px solid var(--line); background: var(--panel); color: var(--paper); border-radius: 999px; padding: .8rem 1.3rem; }
.empty-state { text-align: center; padding: 6rem 1rem; }
.empty-state > span { color: var(--acid); font: 4rem var(--mono); }
.empty-state h3 { font-size: 1.5rem; margin: 1rem 0 .5rem; }
.empty-state p { color: var(--muted); }

.method-section { padding: 7rem clamp(1rem, 6vw, 6rem); border-top: 1px solid var(--line); }
.method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; }
.method-grid h2 { font-size: clamp(2.5rem, 5vw, 5rem); letter-spacing: -.055em; line-height: .98; }
.method-grid p { color: #b2b7b1; line-height: 1.75; max-width: 650px; }
.method-grid a { color: var(--acid); text-underline-offset: 4px; }
footer { padding: 2rem clamp(1rem, 4vw, 4rem); border-top: 1px solid var(--line); display: flex; align-items: center; gap: 2rem; color: var(--muted); font-size: .7rem; }
footer p { margin: 0; }
footer p:nth-child(2) { margin-right: auto; }

.viewer, .compare-dialog { width: min(1180px, calc(100vw - 2rem)); border: 1px solid var(--line); border-radius: 20px; padding: 0; color: var(--paper); background: #111411; box-shadow: 0 30px 100px rgba(0,0,0,.65); }
.viewer::backdrop, .compare-dialog::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(8px); }
.viewer { grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); overflow: hidden; }
.viewer[open] { display: grid; }
.viewer-close { position: absolute; z-index: 5; top: .8rem; right: .8rem; display: grid; place-items: center; width: 36px; min-width: 36px; height: 36px; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(0,0,0,.6); color: white; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.viewer-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.viewer-close:hover { border-color: rgba(255,255,255,.55); background: rgba(255,255,255,.1); transform: rotate(4deg); }
.viewer-close:focus-visible { outline: 2px solid var(--acid); outline-offset: 3px; }
.viewer-media { min-height: 540px; position: relative; background: #050605; overflow: hidden; display: grid; place-items: center; }
.viewer-media > img, .viewer-media > canvas, .viewer-after img, .viewer-after canvas { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
.viewer-after { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 0 0 58%); }
.viewer-media input { position: absolute; z-index: 4; inset: auto 1.5rem 1.5rem; width: calc(100% - 3rem); accent-color: var(--acid); }
.before-label, .after-label { position: absolute; z-index: 3; top: 1rem; padding: .35rem .55rem; border-radius: 99px; background: rgba(0,0,0,.7); font: .58rem var(--mono); text-transform: uppercase; }
.before-label { left: 1rem; }.after-label { right: 1rem; }
.viewer-info { padding: 2rem; overflow: auto; max-height: 80vh; }
.viewer-info h2 { font-size: 2rem; letter-spacing: -.045em; margin-bottom: 1rem; }
.viewer-badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.viewer-info > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; font-size: .8rem; margin: 1.2rem 0; }
.viewer-info dl { display: grid; grid-template-columns: 95px 1fr; gap: .65rem; border-top: 1px solid var(--line); padding-top: 1rem; font-size: .7rem; }
.viewer-info dt { color: var(--muted); }
.viewer-info dd { margin: 0; overflow-wrap: anywhere; }
.viewer-actions { display: flex; align-items: center; gap: .8rem; margin-top: 1.5rem; }
.community-summary { min-height: 1.2rem; margin: -.35rem 0 1rem; color: #b5bbb4; font: .68rem var(--mono); }
.rating-widget { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .25rem .75rem; margin-bottom: 1rem; padding: .8rem; border: 1px solid var(--line); border-radius: 10px; }
.rating-widget > span { color: var(--muted); font: .62rem var(--mono); text-transform: uppercase; }
.rating-widget > div { display: flex; gap: .15rem; }
.rating-widget button { padding: 0 .08rem; border: 0; background: transparent; color: var(--acid); font-size: 1.35rem; line-height: 1; cursor: pointer; }
.rating-widget button:disabled { cursor: wait; opacity: .5; }
.rating-widget small { grid-column: 1 / -1; min-height: .85rem; color: var(--muted); font: .58rem/1.4 var(--mono); }
.report-form { display: grid; gap: .75rem; margin-top: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.report-form label { color: var(--muted); font: .62rem var(--mono); }
.report-form select, .report-form textarea { display: block; width: 100%; margin-top: .35rem; }
.report-form textarea { resize: vertical; min-height: 70px; padding: .65rem; border: 1px solid var(--line); border-radius: 9px; background: #101210; color: var(--paper); }
.report-form > div { display: flex; gap: .5rem; }
.report-form p { min-height: 1rem; margin: 0; color: var(--muted); font: .6rem/1.45 var(--mono); }
.viewer-color-tools { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.viewer-color-tools label, .converter-section label { color: var(--muted); font: .62rem var(--mono); }
.viewer-color-tools select, .converter-section select { display: block; width: 100%; margin-top: .35rem; }
.download-heading, .viewer-color-tools .quiet-button { grid-column: 1 / -1; }
.download-heading { margin-top: .35rem; }
.download-heading strong, .download-heading small { display: block; }
.download-heading strong { font-size: .75rem; }
.download-heading small { color: var(--muted); font-size: .62rem; margin-top: .25rem; }
.viewer-color-tools .quiet-button:disabled, .converter-section button:disabled { opacity: .45; cursor: not-allowed; }
.converter-section { display: grid; grid-template-columns: minmax(0, .9fr) minmax(480px, 1.1fr); gap: clamp(3rem, 8vw, 9rem); padding: 7rem clamp(1rem, 6vw, 6rem); border-top: 1px solid var(--line); background: #0f1210; }
.converter-intro h2 { margin: .7rem 0 1.5rem; font-size: clamp(3rem, 7vw, 7rem); letter-spacing: -.06em; line-height: .9; }
.converter-intro > p:last-child { max-width: 600px; color: var(--muted); line-height: 1.75; }
.converter-workbench { align-self: start; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.file-drop { display: block; padding: 1rem; border: 1px dashed #566056; border-radius: 12px; background: var(--panel); }
.file-drop input { display: block; width: 100%; margin-top: .7rem; color: var(--paper); }
.converter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.2rem 0; }
.converter-grid label:last-child { grid-column: 1 / -1; }
.converter-status { min-height: 3.6rem; padding: .8rem; border-radius: 10px; background: var(--panel); color: var(--muted); font: .65rem/1.5 var(--mono) !important; }
.submission-section { display: grid; grid-template-columns: minmax(0, .75fr) minmax(560px, 1.25fr); gap: clamp(3rem, 8vw, 9rem); padding: 7rem clamp(1rem, 6vw, 6rem); border-top: 1px solid var(--line); background: #0b0e0c; }
.submission-workbench { align-self: start; padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.submission-workbench label { color: var(--muted); font: .62rem var(--mono); }
.submission-workbench input:not([type="checkbox"]), .submission-workbench select { display: block; width: 100%; margin-top: .35rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 9px; background: #101210; color: var(--paper); outline: 0; }
.submission-workbench input:focus, .submission-workbench select:focus, .report-form textarea:focus { border-color: var(--acid); }
.submission-workbench label > span { color: #697069; font-size: .55rem; }
.submission-preflight { min-height: 1.1rem; margin: .75rem 0 0; color: var(--muted); font: .62rem/1.45 var(--mono); }
.submission-preflight[data-state="ready"] { color: var(--acid); }
.submission-preflight[data-state="error"], .submission-submit-row p[data-state="error"] { color: #ff9b7d; }
.submission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.25rem 0; }
.submission-wide { grid-column: 1 / -1; }
.submission-attestation { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: .7rem; padding: 1rem 0; border-top: 1px solid var(--line); line-height: 1.5; }
.submission-attestation input { margin-top: .1rem; accent-color: var(--acid); }
.submission-submit-row { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 1rem; }
.submission-submit-row p { min-height: 1rem; margin: 0; color: var(--muted); font: .62rem/1.45 var(--mono); overflow-wrap: anywhere; }
.submission-submit-row a, .submission-history a { color: var(--acid); text-underline-offset: 3px; }
.submission-history { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.submission-history > strong { font-size: .8rem; }
.submission-history article { display: grid; gap: .2rem; margin-top: .65rem; padding: .65rem; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); font: .6rem/1.45 var(--mono); }
.submission-history article span { color: var(--muted); }
.submission-workbench button:disabled { opacity: .45; cursor: not-allowed; }
.full-preview { width: 100vw; max-width: none; height: 100vh; max-height: none; margin: 0; padding: 0; border: 0; color: var(--paper); background: #030403; overflow: hidden; }
.full-preview[open] { display: block; }
.full-preview::backdrop { background: #030403; }
.full-preview-stage { position: absolute; inset: 0; display: grid; place-items: center; }
.full-preview-stage img, .full-preview-stage canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.full-preview-stage canvas[hidden], .full-preview-stage img[hidden] { display: none; }
.full-preview-close { position: fixed; z-index: 3; top: 1.25rem; right: 1.25rem; }
.full-preview-hud { position: absolute; z-index: 2; top: 0; left: 0; right: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; padding: 1.5rem 5rem 5rem 1.5rem; pointer-events: none; background: linear-gradient(rgba(0,0,0,.78), transparent); }
.full-preview-hud h2 { margin: .25rem 0; font-size: clamp(1.3rem, 3vw, 2.5rem); }
.full-preview-hud p { margin: 0; color: #c0c5bf; font: .68rem/1.5 var(--mono); }
.full-preview-status { max-width: min(500px, 45vw); text-align: right; }
.full-preview-nav { position: absolute; z-index: 2; right: 1.5rem; bottom: 1.5rem; display: flex; gap: .6rem; }
.full-preview-nav span { padding: .45rem .65rem; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; background: rgba(0,0,0,.62); color: #d9ddd7; font: .6rem var(--mono); }
.compare-tray { position: fixed; z-index: 19; left: 50%; bottom: 1rem; transform: translateX(-50%); width: min(720px, calc(100vw - 2rem)); padding: .8rem; background: rgba(20,23,21,.94); backdrop-filter: blur(18px); border: 1px solid #4b524b; border-radius: 16px; display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .7rem; box-shadow: 0 16px 50px rgba(0,0,0,.5); }
.compare-tray > div { min-width: 0; }
.compare-tray strong, .compare-tray span { display: block; }
.compare-tray strong { font-size: .75rem; }
.compare-tray span { color: var(--muted); font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .2rem; }
.compare-dialog { padding: 2rem; max-height: calc(100vh - 2rem); }
.compare-header { display: flex; justify-content: space-between; align-items: flex-start; }
.compare-header h2 { font-size: 2.2rem; margin: 0 0 1.5rem; }
.compare-dialog .viewer-close { position: relative; inset: auto; }
.compare-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.compare-item { min-width: 0; }
.compare-item img, .compare-item canvas { width: 100%; aspect-ratio: 1.45; object-fit: cover; border-radius: 12px; background: #080908; }
.compare-item h3 { margin: .6rem 0 .2rem; font-size: .85rem; }
.compare-item p { color: var(--muted); font: .6rem var(--mono); }
.filter-scrim { display: none; }

@media (max-width: 900px) {
  .topbar nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-stats { width: fit-content; }
  .catalog-shell { grid-template-columns: 1fr; }
  .filters { position: fixed; z-index: 32; left: 0; top: 0; bottom: 0; width: min(340px, 88vw); overflow: auto; transform: translateX(-105%); transition: transform .25s; box-shadow: 20px 0 60px rgba(0,0,0,.5); }
  .filters.open { transform: translateX(0); }
  .filter-scrim.open { display: block; position: fixed; z-index: 31; inset: 0; background: rgba(0,0,0,.68); }
  .mobile-filter-button { display: block; }
  .method-grid { grid-template-columns: 1fr; gap: 2rem; }
  .converter-section, .submission-section { grid-template-columns: 1fr; gap: 2rem; }
  .selected-reference { grid-template-columns: 90px minmax(0, 1fr) minmax(210px, 260px) auto; }
  .viewer[open] { grid-template-columns: 1fr; }
  .viewer-media { min-height: 50vh; }
  .viewer-info { max-height: none; }
}

@media (max-width: 620px) {
  :root { --topbar-height: 60px; --anchor-gap: 12px; }
  .github-link { font-size: .7rem; }
  .hero { padding-top: 4rem; }
  h1 { font-size: 3.5rem; }
  .hero-stats { width: 100%; }
  .hero-stats div { width: 33.33%; min-height: 105px; }
  .hero-stats strong { font-size: 1.5rem; }
  .section-heading { align-items: start; flex-direction: column; }
  .reference-actions { align-items: flex-start; flex-direction: column; }
  .viewer-color-tools, .converter-grid, .submission-grid { grid-template-columns: 1fr; }
  .viewer-color-tools > *, .converter-grid label:last-child, .submission-wide { grid-column: 1; }
  .submission-submit-row { grid-template-columns: 1fr; }
  .selected-reference { grid-template-columns: 70px 1fr auto; align-items: start; }
  .selected-reference img { width: 70px; height: 58px; }
  .selected-reference-copy p:last-child { display: none; }
  .reference-space-field { grid-column: 1 / -1; }
  .catalog-toolbar { align-items: start; flex-direction: column; padding: 1rem 0; }
  .catalog-toolbar > div span { display: block; margin: .25rem 0 0; }
  .lut-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .lut-card-body { padding: .65rem; }
  .tag-row span:nth-child(n+3) { display: none; }
  .compare-tray { grid-template-columns: 1fr auto; }
  .compare-tray .quiet-button { display: none; }
  .compare-grid { grid-template-columns: 1fr; }
  .full-preview-hud { padding: 1rem 4rem 4rem 1rem; }
  .full-preview-status { display: none; }
  .full-preview-nav { left: 1rem; right: auto; bottom: 1rem; }
  footer { align-items: start; flex-direction: column; }
  footer p:nth-child(2) { margin-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
