:root { font-family: Inter, "Microsoft YaHei", system-ui, sans-serif; color: #252128; background: #f6f2ee; }
* { box-sizing: border-box; }
body { margin: 0; }
main { width: min(960px, calc(100% - 32px)); margin: 0 auto; padding: 46px 0 72px; }
header { margin-bottom: 22px; }
.eyebrow { color: #8d4f71; font-size: .76rem; font-weight: 700; letter-spacing: .12em; margin: 0 0 8px; }
h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -.04em; }
h2 { font-size: 1.05rem; margin: 0 0 8px; }
p { line-height: 1.55; }
.intro { max-width: 680px; color: #625960; }
.panel { background: #fff; border: 1px solid #e8e0dc; border-radius: 16px; margin: 14px 0; padding: 22px; box-shadow: 0 5px 20px #2b182007; }
.controls { border-left: 5px solid #754165; }
.algorithm-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
select, input, button { font: inherit; }
select, .hex-form input { border: 1px solid #cfc4c2; border-radius: 9px; padding: 9px 11px; background: #fff; }
.check { margin-left: auto; font-size: .92rem; }
.rule { color: #4e3544; background: #fbf4f8; border-radius: 8px; padding: 10px 12px; margin: 16px 0 0; }
.status { margin: 12px 0 0; color: #716870; font-size: .9rem; }
.input-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.input-grid p { min-height: 45px; color: #6c6168; font-size: .92rem; margin: 0 0 12px; }
.hex-form { display: flex; gap: 9px; }
.hex-form input { flex: 1; min-width: 0; text-transform: uppercase; }
button, .upload { border: 0; border-radius: 9px; padding: 10px 14px; background: #45243a; color: #fff; font-weight: 700; cursor: pointer; }
.upload { display: inline-block; background: #7d5b6d; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
#preview { display: block; max-width: 100%; max-height: 430px; border-radius: 10px; }
.hidden { display: none !important; }
.result-head { display: flex; justify-content: space-between; gap: 16px; align-items: center; border-bottom: 1px solid #eee7e3; padding-bottom: 16px; }
.sample { display: flex; align-items: center; gap: 11px; }
.sample > span { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #cfc8c5; display: inline-block; }
.sample b, .sample small { display: block; }
.sample small, #resultMeta { color: #716870; font-size: .85rem; }
.competition { color: #6d3b55; background: #fbf4f8; padding: 10px 12px; border-radius: 8px; }
.results { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding-top: 18px; }
.result { min-width: 0; border: 1px solid #e9e1de; border-radius: 11px; overflow: hidden; }
.result.western { border-color: #cf9d55; }
.swatch { display: block; height: 62px; }
.result-body { padding: 10px; }
.result b, .result small, .result em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result small { margin-top: 4px; font-size: .76rem; color: #716870; }
.result em { font-style: normal; font-size: .75rem; color: #85516a; margin-top: 6px; }
@media (max-width: 680px) { main { width: min(100% - 20px, 960px); padding-top: 24px; } .input-grid { grid-template-columns: 1fr; gap: 16px; } .input-grid p { min-height: 0; } .check { margin-left: 0; } .result-head { align-items: flex-start; flex-direction: column; } .results { grid-template-columns: repeat(2, 1fr); } }
