.mill-ui{--mill-brass:#e8bc78;--mill-cream:#fff2d6;color:var(--mill-cream);background:#193b37;border:1px solid #827459;border-radius:12px;overflow:hidden}
.plan-token.mill-plan-machine{border:2px solid #c5a36d;background:#31584e;color:#fff0d4}
.mill-stages{counter-reset:stage;display:flex;list-style:none;padding:0;margin:0;background:#112e2b}
.mill-stages li{counter-increment:stage;flex:1;padding:.62rem .25rem;text-align:center;border-bottom:2px solid #4f6257;font-size:.81rem;color:#c5c7b7}
.mill-stages li:before{content:counter(stage) ' · ';font-variant-numeric:tabular-nums}
.mill-stages li[aria-current]{color:#ffe7b0;border-color:var(--mill-brass);background:#29463e}
.mill-stages .complete{color:#d0e7ce;border-color:#76a894}
.mill-bench{display:grid;grid-template-columns:minmax(0,1.04fr) minmax(0,1fr);align-items:center;gap:clamp(.65rem,2vw,1.2rem);padding:clamp(.6rem,2vw,1.05rem)}
.mill-board{width:100%;height:auto;display:block;background:radial-gradient(ellipse at 45% 28%,#345d53,#1a3b36);border:1px solid #799483;border-radius:4px;box-shadow:0 2px 6px #0e25284d}
.mill-controls{display:grid;align-content:center;gap:.56rem;min-width:0}
.mill-feed{position:relative;min-width:0}.mill-feed canvas{object-fit:contain;font-size:0}
.mill-countdown{position:absolute;inset:0;display:grid;place-items:center;background:#142e2880;color:#ffedc5;font:700 clamp(1.6rem,5vw,3rem)/1 Georgia,serif;text-shadow:0 2px 6px #172f29;pointer-events:none}
.mill-sew-score{font-variant-numeric:tabular-nums;font-size:.85rem}.mill-pedals{display:flex;gap:.5rem}
.mill-ui .mill-pedals button{flex:1;min-height:44px;font-size:1.55rem;touch-action:none;user-select:none;-webkit-touch-callout:none}
.mill-ui .mill-pedals .held{background:#e5b369;box-shadow:inset 0 2px 5px #644a2d70}
.mill-ui .mill-kicker{font:700 .69rem/1.3 system-ui,sans-serif;letter-spacing:.065em;text-transform:uppercase;color:#ecc38b}
.mill-ui h3{margin:0;color:#ffedc9;font:600 clamp(1.05rem,3vw,1.38rem)/1.13 Georgia,serif}
.mill-ui p,.mill-ui output{color:#eee2c9;font-size:.85rem;line-height:1.35;margin:0}.mill-ui output{font-variant-numeric:tabular-nums}
.mill-ui button{background:#f1d5a5;border:1px solid #ffe4af;color:#26382d;font-weight:650;line-height:1.15;min-height:38px;border-radius:5px}
.mill-ui button:hover,.mill-ui button:focus-visible{background:#ffedca;color:#172e29;outline:2px solid #e8ba6e;outline-offset:2px}
.mill-board .mill-pin{cursor:pointer;outline:none}.mill-pin circle{fill:#294d47;stroke:#e1c59a;stroke-width:.7}.mill-pin text{fill:white;pointer-events:none;font:bold 5px system-ui}
.mill-pin[data-state=next] circle,.mill-pin:focus-visible circle{fill:#805222;stroke:#ffe3a0;stroke-width:1.3}.mill-pin[data-state=done] circle{fill:#66a78b}
.mill-chart{display:flex;gap:3px}.mill-chart span{flex:1;min-width:0;text-align:center;background:var(--yarn);border:2px solid transparent;border-radius:3px;line-height:1.6;color:#172d2a;text-shadow:0 0 2px white}
.mill-chart .next{outline:2px solid #ffe5a4;outline-offset:0}.mill-chart .woven{opacity:.52}
.mill-yarns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.36rem}.mill-yarns button{border-left:7px solid var(--yarn);padding:.26rem;font-size:.8rem}
.mill-dial{position:relative;margin:10px 6px 3px;height:20px;border-radius:3px;border:1px solid #a69266;background:repeating-linear-gradient(90deg,transparent 0 calc(10% - 1px),#869b86 calc(10% - 1px) 10%),#21342f}
.mill-zone{position:absolute;height:100%;background:#dfb767}.mill-needle{position:absolute;top:-5px;bottom:-4px;width:3px;background:white;transform:translateX(-50%);box-shadow:0 0 2px #172a26}
.mill-controls input[type=range],.mill-controls progress{width:100%;min-width:0;accent-color:#e6bc7e}
.mill-award{display:grid;justify-items:center;gap:.2rem;padding:.7rem;background:radial-gradient(ellipse at center,#50644c,#193b37 70%);text-align:center}
.mill-award .bag-art{width:clamp(72px,18vh,136px);height:auto}.mill-award strong{font:600 1.35rem Georgia,serif}.mill-award span{color:#ecd3a4}
.mill-ui .mill-caption{text-align:center}.mill-actions{display:flex;justify-content:center;gap:.65rem;padding:.8rem}.mill-reconnect{margin:.5rem}
@media(max-width:480px) and (orientation:portrait){.mill-bench{grid-template-columns:1fr}.mill-board{max-height:28vh}.mill-controls{gap:.42rem}}
@media(max-height:500px) and (orientation:landscape){.mill-bench{padding:.45rem .7rem}.mill-board{max-height:44vh}.mill-stages li{padding:.25rem}.mill-controls{gap:.3rem}.mill-ui button{min-height:32px}}
