:root {
  --paper: #f4f2ec;
  --paper-2: #ebe8df;
  --card: #faf8f2;
  --ink: #171a15;
  --muted: #73766a;
  --line: rgba(23,26,21,.12);
  --line-strong: rgba(23,26,21,.22);
  --accent: #7bff00;
  --accent-soft: rgba(123,255,0,.12);
  --radius: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 280px;
  background: radial-gradient(circle at 6% 0%, rgba(123,255,0,.065), transparent 30%), var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid rgba(83,180,0,.65); outline-offset: 3px; }

.shell { width: min(100% - 44px, 1520px); margin: 0 auto; }
.site-header {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(23,26,21,.08); background: #111;
}
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand-copy { display: grid; min-width: 0; }
.brand-copy strong { font-size: 14px; letter-spacing: .1em; white-space: nowrap; }
.brand-copy small { font-size: 9px; color: var(--muted); letter-spacing: .16em; }
.nav-tabs {
  display: inline-flex; align-items: center; gap: 4px; background: rgba(255,255,255,.58);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px;
}
.nav-tab {
  border: 0; background: transparent; padding: 10px 15px; border-radius: 999px; cursor: pointer;
  color: var(--ink); font-size: 12px; font-weight: 750; transition: background .18s ease, color .18s ease, transform .18s ease;
}
.nav-tab:hover:not(.is-active) { background: rgba(23,26,21,.06); }
.nav-tab:active { transform: translateY(1px); }
.nav-tab.is-active { background: var(--ink); color: var(--paper); }

.view { display: none; padding: 68px 0 96px; }
.view.is-active { display: block; }
.hero-row { display: flex; justify-content: space-between; gap: 40px; align-items: end; margin-bottom: 28px; }
.eyebrow { margin: 0 0 12px; font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--muted); }
h1 { margin: 0; max-width: 800px; font-size: clamp(40px, 5vw, 78px); line-height: .95; letter-spacing: -.055em; }
.intro { margin: 20px 0 0; max-width: 640px; color: var(--muted); line-height: 1.55; }
.tool-head { margin-bottom: 44px; }
.search-area { width: min(390px,100%); }
.search-box {
  width: 100%; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,.76);
  border: 1px solid var(--line); border-radius: 999px; padding: 0 16px; height: 48px;
}
.search-box svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; color: var(--muted); flex: 0 0 auto; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); }
.search-box input::placeholder { color: #989990; }
.search-hint { margin: 8px 12px 0; color: var(--muted); font-size: 10px; line-height: 1.4; }
.search-hint b { color: var(--ink); font-weight: 750; }
.archive-meta {
  display: flex; gap: 10px; align-items: center; padding: 14px 0 22px; border-top: 1px solid var(--line);
  font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--muted);
}
.archive-dot { font-size: 7px; color: var(--accent); }

.palette-grid { display: grid; grid-template-columns: repeat(auto-fill, 220px); gap: 20px 16px; align-items: start; justify-content: start; }
.palette-card { width: 100%; border: 0; padding: 0; background: transparent; text-align: left; cursor: zoom-in; color: inherit; content-visibility: auto; contain-intrinsic-size: 220px 330px; }
.palette-media { position: relative; overflow: hidden; border-radius: 16px; background: var(--paper-2); box-shadow: 0 0 0 1px rgba(30,33,25,.06); transition: box-shadow .22s ease, transform .22s ease; }
.palette-media::after {
  content: "OPEN"; position: absolute; right: 12px; bottom: 12px; padding: 8px 10px; border-radius: 999px;
  background: rgba(20,20,18,.84); color: white; font-size: 9px; font-weight: 800; letter-spacing: .13em;
  opacity: 0; transform: translateY(4px); transition: .2s ease;
}
.palette-card img { display: block; width: 100%; aspect-ratio: 1080/1360; object-fit: cover; transition: transform .3s cubic-bezier(.2,.7,.2,1), filter .3s ease; }
.palette-card:hover .palette-media { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(23,26,21,.09), 0 0 0 1px rgba(30,33,25,.08); }
.palette-card:hover img { transform: scale(1.018); filter: saturate(1.03); }
.palette-card:hover .palette-media::after { opacity: 1; transform: translateY(0); }
.palette-meta { padding: 10px 6px 8px; }
.palette-meta > strong { display: block; font-size: 13px; line-height: 1.25; }
.palette-meta > span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.card-swatches { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-top: 9px; }
.card-swatches i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); }
.empty-state { padding: 80px 0; text-align: center; color: var(--muted); }

.tool-card,
.color-stage,
.converter-panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.56); overflow: hidden;
}
.converter-layout { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(420px,1.2fr); gap: 18px; align-items: stretch; }
.color-stage { display: flex; flex-direction: column; min-height: 520px; }
.color-preview { min-height: 440px; flex: 1; display: flex; align-items: end; padding: 28px; background: #27187e; transition: background .2s ease; }
.color-preview span { color: white; mix-blend-mode: difference; font-size: clamp(26px,4vw,56px); font-weight: 800; letter-spacing: -.04em; }
.picker-row { height: 78px; display: flex; gap: 12px; align-items: center; padding: 0 22px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
input[type="color"] { border: 1px solid var(--line); padding: 0; background: transparent; cursor: pointer; overflow: hidden; }
#native-color { width: 38px; height: 38px; border-radius: 50%; }
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: 0; }
#native-color::-webkit-color-swatch { border-radius: 50%; }
.converter-panel { padding: clamp(24px,4vw,52px); }
.big-input-label,.option-label,.contrast-field label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.big-input-wrap { display: flex; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
#color-input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; font-size: clamp(24px,4vw,48px); font-weight: 800; letter-spacing: -.04em; text-transform: uppercase; }
.solid-button,.ghost-button,.mini-action {
  min-height: 46px; display: inline-flex; align-items: center; justify-content: center; padding: 0 18px; border-radius: 999px;
  font-size: 12px; font-weight: 800; cursor: pointer; transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease;
}
.solid-button:hover:not(:disabled) { background: #252922; }
.ghost-button:hover,.mini-action:hover { background: rgba(23,26,21,.055); border-color: var(--line-strong); }
.solid-button:active:not(:disabled),.ghost-button:active,.mini-action:active { transform: translateY(1px); }
.solid-button { border: 1px solid var(--ink); background: var(--ink); color: var(--paper); }
.ghost-button,.mini-action { border: 1px solid var(--line); background: transparent; color: var(--ink); }
.solid-button:disabled { opacity: .4; cursor: not-allowed; }
.mini-action { min-height: 34px; padding-inline: 12px; font-size: 10px; }
.full-button { width: 100%; }
.input-help { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.color-error { margin: 12px 0 0; color: #9e2e2e; font-size: 12px; font-weight: 700; }
.results { margin-top: 40px; border-top: 1px solid var(--line); }
.result-row { width: 100%; min-height: 74px; display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; padding: 0; text-align: left; cursor: pointer; color: inherit; }
.result-row > span { font-size: 10px; font-weight: 800; letter-spacing: .14em; color: var(--muted); }
.result-row strong { font-size: clamp(15px,2vw,21px); overflow-wrap: anywhere; }
.result-row em { font-style: normal; font-size: 10px; font-weight: 800; text-transform: uppercase; opacity: 0; transition: opacity .2s ease; }
.result-row:hover em { opacity: .55; }

/* Contrast */
.contrast-layout { display: grid; grid-template-columns: minmax(300px,.75fr) minmax(420px,1.25fr); gap: 18px; }
.contrast-controls,.contrast-result { padding: clamp(24px,4vw,46px); }
.contrast-controls { display: flex; flex-direction: column; justify-content: center; }
.contrast-field + .contrast-field { margin-top: 0; }
.dual-color-input { display: grid; grid-template-columns: 52px 1fr; gap: 10px; }
.dual-color-input input[type="color"] { width: 52px; height: 52px; border-radius: 14px; }
.dual-color-input input[type="text"],.dual-color-input input:not([type]) { min-width: 0; }
#contrast-fg,#contrast-bg { width: 100%; height: 52px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); padding: 0 16px; outline: none; font-weight: 800; text-transform: uppercase; }
.swap-button { align-self: flex-start; margin: 16px 0; border: 0; background: transparent; color: var(--muted); font-size: 18px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.swap-button span { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.contrast-controls .full-button { margin-top: 24px; }
.contrast-result { display: flex; flex-direction: column; gap: 24px; }
.contrast-preview { min-height: 260px; border-radius: 18px; padding: clamp(24px,4vw,44px); display: flex; flex-direction: column; justify-content: end; background: #f4f2ec; color: #171a15; transition: .2s ease; }
.contrast-preview p { margin: 0 0 8px; font-size: 10px; font-weight: 900; letter-spacing: .16em; }
.contrast-preview strong { font-size: clamp(32px,4vw,60px); line-height: .95; letter-spacing: -.05em; }
.contrast-preview span { margin-top: 14px; font-size: 14px; }
.ratio-line { display: flex; align-items: end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.ratio-line span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.ratio-line strong { font-size: clamp(34px,5vw,64px); letter-spacing: -.06em; }
.wcag-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.wcag-item { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wcag-item span { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.wcag-item strong { font-size: 11px; padding: 5px 8px; border-radius: 999px; background: #e9ece5; }
.wcag-item strong[data-pass="true"] { background: #dff5ce; color: #284d12; }
.wcag-item strong[data-pass="false"] { background: #f2d7d3; color: #78251c; }

/* Extractor */
.extractor-layout { display: grid; grid-template-columns: minmax(320px,.9fr) minmax(420px,1.1fr); gap: 18px; }
.extractor-input,.extractor-output { min-height: 540px; padding: clamp(22px,3vw,34px); }
.extractor-input { display: flex; position: relative; isolation: isolate; }
.extractor-input::after {
  content: "DROP TO REPLACE IMAGE";
  position: absolute; inset: 14px; z-index: 5; display: grid; place-items: center; border: 2px dashed #67cf00; border-radius: 18px;
  background: rgba(244,242,236,.94); color: var(--ink); font-size: 12px; font-weight: 900; letter-spacing: .14em;
  opacity: 0; pointer-events: none; transform: scale(.99); transition: .16s ease;
}
.extractor-input.is-dragging::after { opacity: 1; transform: scale(1); }
.drop-zone { width: 100%; min-height: 470px; border: 1px dashed var(--line-strong); border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; cursor: pointer; transition: .2s ease; padding: 28px; }
.drop-zone:hover,.drop-zone.is-dragging { background: var(--accent-soft); border-color: #6cd900; }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.drop-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--paper); font-size: 28px; margin-bottom: 8px; }
.drop-zone strong { font-size: 19px; }
.drop-zone small,.extractor-replace-hint { color: var(--muted); line-height: 1.5; }
.extractor-replace-hint { display: block; text-align: center; font-size: 10px; margin-top: -4px; }
.extractor-preview-wrap { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.extractor-preview-wrap img { width: 100%; flex: 1; min-height: 0; max-height: 450px; object-fit: contain; background: #e2dfd7; border-radius: 18px; }
.extractor-output { display: flex; flex-direction: column; }
.extractor-options { display: flex; justify-content: space-between; align-items: end; gap: 20px; }
.segmented { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 3px; background: rgba(255,255,255,.55); }
.segmented button { width: 38px; height: 34px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-size: 11px; font-weight: 800; transition: background .18s ease, color .18s ease, transform .18s ease; }
.segmented button:hover:not(.is-active) { background: rgba(23,26,21,.055); }
.segmented button:active { transform: translateY(1px); }
.segmented button.is-active { background: var(--ink); color: var(--paper); }
.extracted-colors { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 24px; }
.extracted-swatch { min-width: 0; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.62); overflow: hidden; transition: border-color .18s ease, box-shadow .18s ease; }
.extracted-swatch:hover { border-color: var(--line-strong); box-shadow: 0 7px 18px rgba(23,26,21,.05); }
.extracted-color-main { width: 100%; min-height: 88px; border: 0; background: transparent; padding: 10px; display: flex; align-items: stretch; gap: 12px; text-align: left; color: inherit; cursor: copy; }
.extracted-color-main i { width: 58px; min-height: 66px; flex: 0 0 auto; border-radius: 11px; background: var(--swatch); border: 1px solid rgba(0,0,0,.08); }
.extracted-color-main span { display: grid; align-content: center; gap: 3px; min-width: 0; }
.extracted-color-main small { color: var(--muted); font-size: 8px; letter-spacing: .12em; }
.extracted-color-main strong { font-size: 15px; }
.extracted-color-main em { color: var(--muted); font-size: 9px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.extracted-swatch-actions { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--line); }
.extract-action { min-width: 0; height: 36px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-size: 9px; font-weight: 800; letter-spacing: .02em; transition: background .16s ease; }
.extract-action:last-child { border-right: 0; }
.extract-action:hover { background: rgba(23,26,21,.055); }
.extract-action:active { background: rgba(23,26,21,.09); }

/* Palette dialog */
.palette-dialog { width: min(1160px,calc(100% - 32px)); max-height: calc(100dvh - 32px); border: 0; padding: 0; border-radius: 26px; background: var(--card); color: var(--ink); box-shadow: 0 28px 100px rgba(0,0,0,.28); overflow: hidden; }
.palette-dialog::backdrop { background: rgba(19,20,17,.58); backdrop-filter: blur(8px); }
.dialog-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(330px,.85fr); min-height: min(760px,88dvh); }
.dialog-image-wrap { min-height: 0; overflow: auto; background: #ddd9d2; }
.dialog-image-wrap img { width: 100%; height: 100%; display: block; object-fit: contain; }
.dialog-info { padding: clamp(28px,4vw,52px); display: flex; flex-direction: column; justify-content: center; overflow: auto; }
.dialog-info h2 { margin: 0; font-size: clamp(38px,5vw,68px); line-height: .95; letter-spacing: -.055em; }
.dialog-copy { color: var(--muted); line-height: 1.55; margin-bottom: 0; }
.dialog-colors-section { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.dialog-section-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 14px; }
.dialog-section-top > strong { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.micro-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.dialog-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.color-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 14px; padding: 7px 10px 7px 7px; background: transparent; cursor: pointer; color: inherit; }
.color-chip.is-active { border-color: rgba(23,26,21,.4); background: rgba(255,255,255,.85); box-shadow: inset 0 0 0 1px rgba(23,26,21,.12); }
.color-chip i,.selected-swatch { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); flex: 0 0 auto; }
.chip-copy { display: grid; text-align: left; }
.chip-copy b { font-size: 10px; }
.chip-copy small { font-size: 8px; color: var(--muted); margin-top: 2px; }
.selected-color-panel { margin-top: 17px; border: 1px solid var(--line); background: rgba(255,255,255,.6); border-radius: 20px; padding: 16px; }
.selected-color-top { display: flex; gap: 12px; align-items: center; }
.selected-label { margin: 0 0 3px; font-size: 8px; color: var(--muted); letter-spacing: .16em; font-weight: 800; }
#selected-color-name { display: block; font-size: 14px; }
#selected-color-hex { display: block; margin-top: 2px; font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.selected-color-values { display: grid; gap: 8px; margin-top: 14px; }
.selected-value { width: 100%; display: flex; justify-content: space-between; gap: 14px; align-items: center; text-align: left; border: 1px solid var(--line); background: rgba(255,255,255,.65); border-radius: 13px; padding: 9px 11px; cursor: pointer; color: inherit; }
.selected-value span { font-size: 9px; font-weight: 800; color: var(--muted); letter-spacing: .12em; }
.selected-value strong { font-size: 12px; overflow-wrap: anywhere; }
.dialog-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 28px; }
.dialog-actions-small { margin-top: 13px; }
.dialog-close { position: absolute; z-index: 2; top: 16px; right: 16px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(0,0,0,.1); background: rgba(255,255,255,.9); font-size: 28px; line-height: 1; cursor: pointer; }

.toast { position: fixed; left: 50%; bottom: max(24px,env(safe-area-inset-bottom)); z-index: 100; transform: translate(-50%,18px); opacity: 0; pointer-events: none; padding: 11px 16px; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 12px; font-weight: 800; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
footer { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .14em; }

/* Search/share detail pages generated by the updater */
.palette-page { min-height: 100dvh; }
.palette-page-main { width: min(100% - 44px,1120px); margin: 0 auto; padding: 46px 0 80px; }
.palette-page-back { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; margin-bottom: 28px; }
.palette-page-card { display: grid; grid-template-columns: minmax(280px,1.1fr) minmax(300px,.9fr); overflow: hidden; border: 1px solid var(--line); border-radius: 26px; background: var(--card); }
.palette-page-card > img { width: 100%; height: 100%; object-fit: contain; background: #ddd9d2; }
.palette-page-content { padding: clamp(30px,5vw,62px); display: flex; flex-direction: column; justify-content: center; }
.palette-page-content h1 { font-size: clamp(44px,6vw,78px); }
.palette-page-colors { display: grid; gap: 8px; margin-top: 28px; }
.palette-page-color { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--line); padding-top: 10px; }
.palette-page-color i { width: 24px; height: 24px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); }
.palette-page-color span { display: grid; }
.palette-page-color b { font-size: 12px; }
.palette-page-color small { color: var(--muted); }

@media (min-width: 1650px) {
  .shell { width: min(88vw,1760px); }
  .palette-grid { grid-template-columns: repeat(auto-fill,230px); gap: 22px 18px; }
}
@media (min-width: 2200px) {
  .shell { width: min(82vw,2100px); }
  .site-header { min-height: 112px; }
  .palette-grid { grid-template-columns: repeat(auto-fill,240px); gap: 24px 20px; }
  body { font-size: 18px; }
}
@media (max-width: 1050px) {
  .site-header { align-items: flex-start; padding: 20px 0; flex-direction: column; }
  .nav-tabs { width: 100%; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
  .nav-tabs::-webkit-scrollbar { display: none; }
  .hero-row { display: grid; align-items: start; }
  .search-area { width: 100%; }
  .palette-grid { grid-template-columns: repeat(auto-fill,185px); gap: 18px 14px; }
  .converter-layout,.contrast-layout,.extractor-layout { grid-template-columns: 1fr; }
  .color-stage { min-height: 380px; }
  .color-preview { min-height: 300px; }
  .palette-dialog { overflow: auto; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-image-wrap { max-height: 58dvh; }
  .dialog-info { min-height: 300px; overflow: visible; }
  .palette-page-card { grid-template-columns: 1fr; }
  .palette-page-card > img { max-height: 72dvh; }
}
@media (max-width: 680px) {
  .shell { width: min(100% - 24px,1540px); }
  .site-header { min-height: 78px; }
  .brand-copy small { display: none; }
  .brand-copy strong { font-size: 11px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 10px; }
  .nav-tab { padding: 9px 12px; font-size: 11px; }
  .view { padding: 48px 0 72px; }
  h1 { font-size: clamp(38px,12vw,58px); }
  .palette-grid { grid-template-columns: repeat(auto-fill,150px); gap: 14px 10px; }
  .palette-media { border-radius: 13px; }
  .palette-meta { padding: 8px 3px 4px; }
  .palette-meta > strong { font-size: 11px; }
  .palette-meta > span { font-size: 8px; }
  .card-swatches i { width: 11px; height: 11px; }
  .archive-meta { flex-wrap: wrap; }
  .big-input-wrap { display: grid; }
  .result-row { grid-template-columns: 54px 1fr; }
  .result-row em { display: none; }
  .wcag-grid { grid-template-columns: 1fr; }
  .extracted-colors { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .extractor-options { align-items: stretch; flex-direction: column; }
  .extractor-options .solid-button { width: 100%; }
  .drop-zone { min-height: 330px; }
  .extractor-input,.extractor-output { min-height: auto; }
  .dialog-actions > * { flex: 1; }
  .dialog-section-top { align-items: flex-start; flex-direction: column; }
  .micro-actions { width: 100%; }
  .selected-value { align-items: flex-start; flex-direction: column; }
  footer { align-items: flex-start; flex-direction: column; justify-content: center; }
  .palette-page-main { width: min(100% - 24px,1120px); padding-top: 24px; }
}
@media (max-width: 480px) {
  .extracted-colors { grid-template-columns: 1fr; }
  .extracted-color-main { min-height: 82px; }
  .extract-action { font-size: 9px; }
}
@media (max-width: 390px) {
  .palette-grid { grid-template-columns: repeat(2,140px); gap: 12px 8px; }
  .nav-tab { padding-inline: 10px; }
  .segmented button { width: 34px; }
  .ratio-line { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 310px) {
  .palette-grid { grid-template-columns: minmax(0,180px); }
}
@media (hover:none) {
  .palette-media::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}

.not-found-card { padding: clamp(32px,7vw,90px); }
