#dt-app *{box-sizing:border-box}
#dt-app [hidden]{display:none!important}
#dt-app{color-scheme:light;--ink:#202b27;--muted:#59655d;--line:#d7dcd1;--bg:#f6f5f0;--paper:#fffefa;--active:#244935;font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:var(--ink);background:var(--bg)}
#dt-app{margin:0}
#dt-app main{max-width:1240px;margin:auto;padding:26px clamp(16px,4.4vw,64px) 42px}
#dt-app a{color:inherit}
#dt-app .crumb{display:flex;gap:10px;color:var(--muted);font-size:13px}
#dt-app .crumb a{text-decoration:none}
#dt-app .crumb a:hover{text-decoration:underline}
#dt-app header, #dt-app .section-line, #dt-app .color-value-row, #dt-app .caption, #dt-app .gallery-head, #dt-app .picked{display:flex;align-items:center;justify-content:space-between;gap:12px}
#dt-app header{margin:28px 0 22px;flex-wrap:wrap}
#dt-app h1, #dt-app h2, #dt-app p{margin:0}
#dt-app h1{font:650 clamp(34px,4vw,55px)/1.18 "Songti SC","Noto Serif SC",serif;letter-spacing:-.04em}
#dt-app h2{font-size:18px;line-height:1.45}
#dt-app button, #dt-app .upload, #dt-app select, #dt-app input{font:inherit;color:inherit}
#dt-app button, #dt-app .upload, #dt-app select{cursor:pointer}
#dt-app .views, #dt-app #filters{display:flex;flex-wrap:wrap;gap:4px}
#dt-app .views{border:1px solid var(--line);padding:4px;background:var(--paper);border-radius:30px}
#dt-app .views button, #dt-app #filters button{border:0;background:transparent;padding:8px 15px;border-radius:30px;font-size:14px}
#dt-app .views [aria-pressed=true], #dt-app #filters [aria-pressed=true]{background:var(--ink);color:white}
#dt-app .view{background:var(--paper);border:1px solid var(--line);border-radius:16px;overflow:hidden}
#dt-app .wheel-layout{display:grid;grid-template-columns:minmax(140px,.78fr) minmax(220px,2.15fr) minmax(175px,1fr)}
#dt-app .rules, #dt-app .inspector, #dt-app .photo-layout, #dt-app .gallery-head, #dt-app .palette-footer{padding:clamp(17px,2.3vw,32px)}
#dt-app .rules, #dt-app .inspector{align-self:stretch}
#dt-app .rules{border-right:1px solid var(--line)}
#dt-app .inspector{border-left:1px solid var(--line)}
#dt-app #rules{display:grid;gap:5px;margin:17px 0 0}
#dt-app #rules button{border:1px solid transparent;text-align:left;background:none;padding:7px 9px;border-radius:6px;font-size:14px;display:flex;align-items:center;gap:8px}
#dt-app #rules button:before{content:"";width:9px;height:9px;border:1px solid #97a397;border-radius:50%}
#dt-app #rules button[aria-pressed=true]{background:#e9eee5;border-color:#ced7ca}
#dt-app #rules button[aria-pressed=true]:before{background:var(--active);border-color:var(--active)}
#dt-app .wheel-space{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;padding:25px;background:#f2f1eb}
#dt-app #wheel{width:min(100%,342px);aspect-ratio:1;position:relative;border-radius:50%;touch-action:none;user-select:none;cursor:crosshair;background:radial-gradient(circle closest-side,#fff,transparent),conic-gradient(red,#ff0,#0f0,#0ff,#00f,#f0f,red);box-shadow:0 0 0 6px var(--paper),0 0 0 7px var(--line)}
#dt-app #wheel:before{content:"";position:absolute;inset:0;background:#000;opacity:var(--dim,0);border-radius:50%;pointer-events:none}
#dt-app #spokes, #dt-app #handles{width:100%;height:100%;position:absolute;inset:0;overflow:visible;pointer-events:none}
#dt-app #spokes line{stroke:#292b36;stroke-opacity:.4;stroke-width:.55;stroke-dasharray:1.3 1.2}
#dt-app .handle{position:absolute;pointer-events:auto;border:2px solid white;box-shadow:0 0 0 1px #252b2e99,0 1px 5px #0004;border-radius:50%;width:22px;height:22px;transform:translate(-50%,-50%);padding:0;touch-action:none;cursor:grab;font:600 10px ui-monospace,monospace}
#dt-app .handle[aria-pressed=true]{width:28px;height:28px;box-shadow:0 0 0 2px #263731;z-index:2}
#dt-app .handle:active{cursor:grabbing}
#dt-app #slot, #dt-app .hint, #dt-app .caption, #dt-app small{font-size:12px;color:var(--muted);line-height:1.65}
#dt-app #paint{height:89px;border-radius:8px;padding:12px;display:flex;align-items:flex-end;margin:16px 0 5px}
#dt-app #paint strong, #dt-app #sampleHex, #dt-app #rgb, #dt-app #hex, #dt-app .sample-hex, #dt-app #palette button, #dt-app .color-row, #dt-app output{font-family:ui-monospace,monospace}
#dt-app #code{font-size:22px}
#dt-app #rgb{font-size:13px}
#dt-app .color-value-row, #dt-app .range{font-size:13px;padding:10px 0}
#dt-app .color-value-row{border-bottom:1px solid var(--line)}
#dt-app #hex{width:100px;border:1px solid var(--line);border-radius:4px;padding:5px 6px}
#dt-app .range{display:grid;grid-template-columns:auto 1fr;gap:6px}
#dt-app .range output{text-align:right}
#dt-app .range input{grid-column:span 2;width:100%;accent-color:var(--active)}
#dt-app .secondary, #dt-app .upload, #dt-app select{font-size:13px;padding:7px 12px;border:1px solid #bfcbbe;background:var(--paper);border-radius:6px}
#dt-app .secondary:hover, #dt-app .upload:hover{background:#ecf1e9}
#dt-app .palette-footer{border-top:1px solid var(--line)}
#dt-app #palette{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin-top:14px;border-radius:8px;overflow:hidden}
#dt-app #palette button{display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;min-height:100px;min-width:0;border:0;padding:10px;font-size:clamp(10px,1.3vw,17px)}
#dt-app #palette button[aria-pressed=true]{box-shadow:inset 0 -4px currentColor}
#dt-app #palette button span:first-child{font-size:11px}
#dt-app .photo-layout{display:grid;grid-template-columns:1.5fr 1fr;gap:28px}
#dt-app .stage{margin-top:14px;min-height:130px;display:grid;place-items:center;background:#efeee8;border-radius:8px;overflow:hidden}
#dt-app #frame{position:relative;display:flex;max-width:100%;background:repeating-conic-gradient(#f4f4f0 0 25%,#fff 0 50%) 0/16px 16px}
#dt-app #photo{display:block;max-width:100%;max-height:410px;width:auto;height:auto}
#dt-app #pick{position:absolute;inset:0;border:0;background:none;cursor:crosshair;width:100%;height:100%}
#dt-app #pin{position:absolute;width:17px;height:17px;border:2px solid white;box-shadow:0 0 0 1px #111;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:1}
#dt-app .caption{align-items:baseline;margin:8px 0;flex-wrap:wrap;overflow-wrap:anywhere}
#dt-app .upload{position:relative;overflow:hidden}
#dt-app .upload input{position:absolute;opacity:0;inset:0;width:100%;height:100%;cursor:pointer}
#dt-app #distribution, #dt-app .mini{display:flex;overflow:hidden;border-radius:5px}
#dt-app #distribution{height:27px;margin:15px 0}
#dt-app #dominant{display:grid;gap:3px}
#dt-app .color-row{background:none;border:0;border-radius:5px;text-align:left;display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:10px;padding:5px;font-size:14px}
#dt-app .color-row:hover, #dt-app .color-row[aria-pressed=true]{background:#ebeee7}
#dt-app .color-row i{width:24px;height:24px;border:1px solid #0002;border-radius:4px}
#dt-app .analysis .hint{margin:12px 0}
#dt-app .picked{justify-content:flex-start;border-top:1px solid var(--line);padding-top:14px}
#dt-app .picked button{margin-left:auto}
#dt-app .picked strong{display:block}
#dt-app .picked>div:first-child{width:36px;height:36px;border-radius:5px;border:1px solid #0002}
#dt-app .gallery-head{flex-wrap:wrap}
#dt-app #gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 20px;padding:0 clamp(17px,2.3vw,32px) 32px}
#dt-app .theme{min-width:0}
#dt-app .mini button{flex:1;min-width:0;height:78px;border:0}
#dt-app .theme h3{margin:10px 0 5px;font-size:17px}
#dt-app .sample-hex{font-size:11px;color:var(--muted);line-height:1.55;overflow-wrap:anywhere}
#dt-app .theme .secondary{margin-top:9px}
#dt-app #message{font-size:14px;min-height:1.5em;margin-top:10px}
#dt-app button:focus-visible, #dt-app input:focus-visible, #dt-app select:focus-visible, #dt-app .upload:focus-within{outline:3px solid #357691;outline-offset:2px}
#dt-app #palette button:focus-visible, #dt-app .mini button:focus-visible, #dt-app #pick:focus-visible{outline-offset:-4px}

@media(max-width:830px){#dt-app .wheel-layout{grid-template-columns:minmax(210px,1.4fr) minmax(160px,1fr)}
#dt-app .rules{grid-column:1/-1;border-right:0;border-bottom:1px solid var(--line)}
#dt-app #rules{display:flex;flex-wrap:wrap;gap:3px;margin-top:8px}
#dt-app #rules button{padding:5px 8px}
#dt-app .wheel-space{padding:21px;min-height:280px}
#dt-app #gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:620px){#dt-app main{padding:16px 12px}
#dt-app header{margin:20px 0 14px;gap:15px}
#dt-app .views button{padding:6px 11px}
#dt-app .wheel-layout, #dt-app .photo-layout{grid-template-columns:1fr}
#dt-app .inspector{border-left:0;border-top:1px solid var(--line);display:grid;grid-template-columns:1fr 1fr;gap:4px 15px}
#dt-app .inspector .section-line, #dt-app .inspector #paint{grid-column:1/-1}
#dt-app #paint{height:56px;margin:5px 0}
#dt-app #wheel{width:min(84%,280px)}
#dt-app .inspector .secondary{align-self:center}
#dt-app .wheel-space{gap:12px}
#dt-app .palette-footer{padding:14px 10px}
#dt-app #palette button{padding:7px 4px;min-height:75px}
#dt-app .photo-layout{gap:20px}
#dt-app .photo-layout>*, #dt-app .color-value-row{min-width:0}
#dt-app #hex{width:80px}
#dt-app .gallery-head{gap:8px}
#dt-app #filters button{padding:6px 8px}
#dt-app .mini button{height:48px}
#dt-app #gallery{gap:16px 12px}
#dt-app #photo{max-height:305px}
}#dt-app #preview{display:block;width:100%;aspect-ratio:240/155;margin:14px 0 4px;border-radius:6px}
#dt-app #paint{height:auto;min-height:32px;margin:0;padding:5px 9px}
#dt-app #code{font-size:14px}
#dt-app .wheel-space{min-height:345px}
@media(max-width:620px){#dt-app #preview{grid-column:1/-1;max-height:180px;background:#eee}
#dt-app #paint{margin:0}
#dt-app .wheel-space{min-height:0}
}

@supports (background:conic-gradient(in srgb,red,blue)){#dt-app #wheel{background:radial-gradient(circle closest-side in srgb,#fff,transparent),conic-gradient(in srgb,red,#ff0,#0f0,#0ff,#00f,#f0f,red)}
}
