:root { color-scheme: light; --ink:#233630; --muted:#515f57; --accent:#2d655b; --ground:#f4f3ea; --line:#d9dfd3; --paper:#fffefa; font:100%/1.5 system-ui,sans-serif; color:var(--ink); background:var(--ground); }
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; }
.shell { width:min(1100px, 100%); margin-inline:auto; padding-inline:23px; }
.top { background:var(--paper); border-bottom:1px solid var(--line); }
.header-inner { display:flex; min-height:64px; align-items:center; justify-content:space-between; gap:14px; font-size:.91rem; }
a { color:var(--accent); text-underline-offset:3px; }
.brand { color:var(--ink); text-decoration:none; display:flex; gap:10px; align-items:center; font-weight:700; }
.brand span { display:grid; place-items:center; width:31px; height:31px; border-radius:50%; color:white; background:var(--accent); font-size:1.15rem; }
.intro { margin:clamp(40px,7vw,70px) 0 29px; }
h1 { font:500 clamp(2.8rem,6vw,4.65rem)/1 Georgia,serif; letter-spacing:-.06em; margin:0 0 11px; }
.intro p, #status, #empty { color:var(--muted); margin:0; }
.worktop { display:grid; grid-template-columns:minmax(0,1.33fr) minmax(0,1fr); gap:13px; }
.panel { min-width:0; border:1px solid var(--line); border-radius:12px; padding:19px; background:var(--paper); }
h2 { font-size:1.01rem; margin:0 0 12px; }
.row { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
button, select, input { font:inherit; }
button, input::file-selector-button, select, input[type=text] { border:1px solid var(--line); padding:7px 9px; border-radius:6px; font-size:.85rem; color:var(--ink); background:var(--paper); }
button { cursor:pointer; color:white; background:var(--accent); border-color:var(--accent); font-weight:650; }
button.quiet { color:var(--accent); background:var(--paper); border-color:var(--line); }
button:hover:not(:disabled), input::file-selector-button:hover { box-shadow:0 0 0 1px var(--accent); }
button:disabled { opacity:.5; cursor:default; }
:focus-visible { outline:2px solid var(--accent); outline-offset:2px; }
input[type=file] { max-width:100%; color:var(--muted); font-size:.83rem; }
input::file-selector-button { cursor:pointer; margin-right:7px; }
.checker { background-color:#f6f5ef; background-image:conic-gradient(#e0e4d8 25%,transparent 0 50%,#e0e4d8 0 75%,transparent 0); background-size:16px 16px; }
.source-image { display:grid; place-items:center; margin:10px 0; min-height:175px; padding:10px; border:1px solid var(--line); border-radius:7px; }
canvas { display:block; width:auto; height:auto; max-width:100%; max-height:340px; cursor:crosshair; }
.source-image p { margin:0; color:var(--muted); font-size:.86rem; background:var(--paper); border-radius:7px; padding:5px 9px; }
.source-tools { justify-content:space-between; }
label { font-size:.84rem; font-weight:630; }
.swatch-well { border:1px solid var(--line); border-radius:7px; height:102px; overflow:hidden; margin-bottom:12px; }
#swatch { height:100%; }
#enter-color input[type=text] { flex:1 1 80px; font-family:ui-monospace,monospace; }
input[type=color] { width:38px; height:35px; border:0; padding:0; background:transparent; }
dl { display:grid; gap:5px; margin:11px 0; }
dl div { display:grid; grid-template-columns:2.4em minmax(0,1fr) auto; align-items:center; gap:5px; }
dt, dd { margin:0; font-size:.82rem; }
dd { font-family:ui-monospace,monospace; overflow-wrap:anywhere; }
#status { margin:10px 0; min-height:1.5em; font-size:.86rem; }
.palette { margin-bottom:25px; }
.palette-head { justify-content:space-between; }
.palette-head h2 { margin:0; }
#empty { margin-top:11px; font-size:.85rem; }
#colors { list-style:none; display:grid; grid-template-columns:repeat(auto-fill,minmax(126px,1fr)); gap:8px; margin:8px 0 0; padding:0; }
#colors li { border:1px solid var(--line); border-radius:7px; overflow:hidden; display:grid; grid-template-columns:1fr auto; }
#colors .chip { grid-column:1/-1; min-height:37px; }
#colors .quiet { border:0; font-family:ui-monospace,monospace; }
#colors .remove { border:0; color:var(--muted); background:var(--paper); }
.info { max-width:730px; }
@media(max-width:730px) { .shell { padding-inline:15px; } .worktop { grid-template-columns:1fr; } .panel { padding:15px; } }
