:root {
  color-scheme: light;
  --board: #e8edf2;
  --paper: #fcfaf4;
  --ink: #18273a;
  --rule: #aab8c7;
  --muted: #4d5a6c;
  font: 100%/1.5 "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--board); color: var(--ink); }
.workbench { width: min(62rem, calc(100% - 2rem)); margin-inline: auto; padding: clamp(1rem, 3vw, 2.5rem) 0 1rem; }
.top { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin-bottom: .7rem; }
.top h1 { margin: 0; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: clamp(1.7rem, 4vw, 2.7rem); letter-spacing: .11em; line-height: 1.15; }
.top p { margin: 0; font-size: .85rem; color: var(--muted); }
.sheet { position: relative; height: clamp(15rem, 48vw, 28rem); overflow: hidden; background: var(--paper); border: 1px solid #b4bac0; box-shadow: 0 4px 10px #293f5014; }
#paper { display: block; width: 100%; height: 100%; }
.sheet-caption { display: flex; justify-content: space-between; gap: .3rem; position: absolute; inset: auto .75rem .55rem; font-size: .78rem; color: var(--muted); pointer-events: none; }
#paper-recipe, output { font-variant-numeric: tabular-nums; }
.controls { display: grid; grid-template-columns: 1fr 1fr 1.25fr auto; align-items: end; gap: .75rem; margin-top: 1rem; }
.paint { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; gap: .25rem .55rem; }
.paint > span { grid-column: 1 / -1; }
.paint > output { font-size: .82rem; }
input[type=color] { display: block; width: 44px; height: 44px; padding: 2px; border: 1px solid var(--rule); background: white; border-radius: 3px; cursor: pointer; }
.ratio { display: grid; align-items: center; grid-template-rows: auto 44px; }
.ratio span { display: flex; justify-content: space-between; gap: .4rem; }
.ratio output { font-size: .85rem; }
input[type=range] { width: 100%; margin: 0; height: 44px; accent-color: var(--ink); cursor: pointer; }
label { min-width: 0; font-size: .875rem; }
button { font: inherit; color: inherit; min-height: 44px; padding: .45rem .8rem; border: 1px solid var(--rule); border-radius: 3px; background: #f7f9fb; cursor: pointer; }
#mix { color: white; background: var(--ink); border-color: var(--ink); }
:focus-visible { outline: 3px solid #2966aa; outline-offset: 3px; }
.result { display: flex; align-items: center; gap: .7rem; margin-top: 1rem; border-top: 1px solid var(--rule); padding-top: .75rem; }
.result > div { display: grid; gap: .05rem; }
.result > div span { font-size: .83rem; color: var(--muted); }
#result-swatch { width: 44px; aspect-ratio: 1; border: 1px solid #26364755; border-radius: 3px; }
#result-hex { user-select: all; font-weight: 700; }
#copy { margin-left: auto; font-size: .83rem; }
.status { min-height: 1.5rem; font-size: .85rem; margin: .25rem 0 0; color: var(--muted); }
@media (max-width: 610px) {
  .controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem .75rem; }
}
@media (max-width: 355px) {
  .workbench { width: calc(100% - 1.25rem); }
  .ratio span { font-size: .76rem; }
  #mix, #copy { padding-inline: .45rem; }
}
