dialog{border:0;border-radius:20px;padding:18px;width:min(94vw,470px);max-height:88vh;max-height:88dvh;overflow-y:auto;color:var(--ink);background:var(--paper);box-shadow:0 24px 80px #12322f40}dialog::backdrop{background:#102b2866;backdrop-filter:blur(3px)}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}h2{font-size:21px;margin:0}.close{width:44px;height:44px;font-size:27px;background:transparent}.tabs{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}.tabs .active{background:var(--ink);color:#fff}.level-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.level-tile{padding:11px;text-align:left;min-height:84px;display:flex;flex-direction:column;gap:7px}.level-tile b{font-size:15px}.level-tile span{font-size:14px;color:var(--muted)}.level-tile.current{border:2px solid var(--green)}.panel-text{font-size:16px;line-height:1.65}.panel-text p{margin:10px 0}.panel-note{font-size:14px;line-height:1.55;color:var(--muted);margin:12px 0}.menu-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.hint{margin:9px 0;padding:12px;border-left:3px solid #c88c46;background:#efeee1;border-radius:0 10px 10px 0;font-size:16px;line-height:1.6}.wide{width:100%;margin-top:10px;min-height:48px}.trace{font-size:14px;border-collapse:collapse;width:100%;margin:10px 0}.trace td,.trace th{padding:9px 3px;border-bottom:1px solid var(--line);text-align:center}.error-screen{padding:30px 20px;font-size:17px;line-height:1.7}.primary.danger{background:#9b5428;border-color:#9b5428}.pill{display:inline-block;padding:3px 6px;border-radius:7px;background:#e5f1e2;font-size:13px;color:#286553}
:root {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #e9f0f1; background: #8a999f; font-synthesis: none;
  --ink: #243840; --paper: #f2f4f0; --green: #387f70; --muted: #6e7e80; --line: #ccd5d3;
  --glass: linear-gradient(145deg, #2d414ce8, #172b34e8);
}
* { box-sizing: border-box; }
body { margin: 0; overflow: hidden; }
button {
  min-height: 44px; border: 1px solid #a2b9c24d; border-radius: 10px;
  background: var(--glass); color: #e9f0f1; font: inherit; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
button:disabled { cursor: default; opacity: .48; }
button:focus-visible { outline: 2px solid #f5cd8b; outline-offset: 2px; }
button:active:not(:disabled) { filter: brightness(1.12); }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: middle; }
#app { position: relative; width: 100%; height: 100vh; height: 100dvh; overflow: hidden; isolation: isolate; }
.workspace,.machine,#scene-slot,.scene-host { position: absolute; inset: 0; width: 100%; height: 100%; }
.workspace { overflow: hidden; }
.machine { z-index: 0; }
.workspace::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(#12232c26, transparent 24%, transparent 73%, #12232c42);
}
.scene-host canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.topbar {
  position: absolute; z-index: 3; top: max(8px, env(safe-area-inset-top)); left: 12px; right: 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px; pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 7px; text-shadow: 0 1px 6px #102330a6; }
.brandmark {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #f2cf94;
  background: var(--glass); border: 1px solid #cedde04d; box-shadow: inset 0 1px #ffffff26, 0 2px 6px #10263322;
}
.brandmark .icon { width: 18px; height: 18px; }
h1 { font-size: 12px; font-weight: 650; letter-spacing: .04em; line-height: 1.25; margin: 0; }
.eyebrow { font-size: 10px; color: #dbe6e8; margin-top: 3px; }
.game-menu { display: flex; gap: 0; pointer-events: auto; }
.game-menu button,.action-row > button:not(.primary) {
  position: relative; isolation: isolate; width: 44px; height: 44px; padding: 0; border: 0;
  display: grid; place-items: center; background: transparent; color: #dce8eb;
}
.game-menu button::before,.action-row > button:not(.primary)::before {
  content: ''; position: absolute; inset: 6px; z-index: -1; border-radius: 10px;
  background: linear-gradient(145deg, #3a4e5bf0, #172d38f2);
  border: 1px solid #b2c6d357; box-shadow: inset 0 1px 0 #ffffff24, inset 0 -1px 0 #0006, 0 3px 7px #112b3a30;
}
.game-menu .icon,.action-row > button:not(.primary) .icon { width: 17px; height: 17px; filter: drop-shadow(0 1px 1px #00121e9c); }
.order,.stats,.cards { position: absolute; z-index: 2; }
.order {
  top: calc(max(8px, env(safe-area-inset-top)) + 48px); left: 12px; width: min(310px, calc(100% - 24px));
  padding: 7px 9px; border-radius: 11px; background: var(--glass); border: 1px solid #d5e5e733;
  box-shadow: inset 0 1px #ffffff14, 0 4px 14px #142a3520; pointer-events: none;
}
.order-line { display: flex; align-items: center; justify-content: space-between; gap: 5px; font-size: 11px; }
.level-name { min-width: 0; }
.stage-number { margin-right: 3px; font-variant-numeric: tabular-nums; color: #f0cc90; font-size: 13px; font-weight: 750; }
.resource-line { display: flex; gap: 7px; color: #ccdade; font-size: 11px; white-space: nowrap; }
.resource-line .icon { margin-right: 2px; color: #dfc495; }
.goal-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 9px; margin-top: 5px; font-size: 11px; }
.goal-line strong { color: #a7ddc7; font-size: 13px; font-weight: 650; }
.constraint { color: #e7cfa5; font-size: 10px; }
.stats {
  top: calc(max(8px, env(safe-area-inset-top)) + 114px); left: 12px; width: max-content;
  max-width: calc(100% - 24px); display: flex; gap: 5px; pointer-events: none;
}
.metric {
  flex: 0 1 auto; min-width: 65px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 5px 9px; background: #233b47bf; border: 1px solid #b2c8cf38; border-radius: 9px;
  box-shadow: inset 0 1px #ffffff12;
}
.metric-label { display: flex; align-items: center; gap: 3px; font-size: 10px; color: #c6d8dc; white-space: nowrap; }
.metric-label .icon { width: 11px; height: 11px; }
.reading { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.reading strong { font-size: 17px; line-height: 1.1; font-weight: 600; font-variant-numeric: tabular-nums; }
.metric.ok { border-color: #85cbb778; }
.reading .icon,.preview-value { color: #a3dfc6; }
.reading .icon { width: 12px; height: 12px; }
.preview-value { font-size: 11px; font-weight: 600; }
.cards {
  bottom: calc(82px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 12px); display: flex; justify-content: center; gap: 5px;
  padding: 5px; border-radius: 16px; background: #152b353d; border: 1px solid #dce9eb26; backdrop-filter: blur(8px);
  box-shadow: 0 8px 20px #10293626;
}
.card {
  --accent: #8de3c6;
  flex: 0 0 auto; width: 60px; height: 85px; min-width: 44px; min-height: 44px; padding: 5px 3px 4px;
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: linear-gradient(155deg, #3c525e, #243c49 48%, #1d303a); border: 1px solid #9eb7c057; border-radius: 12px;
  color: #e5eff2; line-height: 1.1; box-shadow: inset 0 1px #ffffff20, inset 0 -2px #061b2938, 0 3px 5px #12293633;
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
}
.cards:has(.card:nth-child(5)) .card { width: clamp(44px, calc((100vw - 56px) / 6), 56px); }
.card[data-card="U"] { --accent: #99c8f5; }
.card[data-card="R"] { --accent: #f0c477; }
.card[data-card="P"] { --accent: #c0b3ec; }
.card[data-card="H"] { --accent: #efaa92; }
.card[data-card="T"] { --accent: #eab1cb; }
.card::before { content: ''; position: absolute; top: 4px; left: 35%; right: 35%; height: 2px; background: var(--accent); opacity: .7; border-radius: 2px; }
.card .tool-art { width: 32px; height: 29px; pointer-events: none; filter: drop-shadow(0 2px 1px #05172460); }
.card b { font-size: 11px; font-weight: 550; letter-spacing: .03em; pointer-events: none; }
.card-effect,.card small { display: flex; align-items: center; gap: 3px; font-size: 10px; white-space: nowrap; pointer-events: none; font-variant-numeric: tabular-nums; }
.card-effect { color: #d9e6e9; }
.card-effect span { display: inline-flex; align-items: center; gap: 1px; }
.card-effect .icon,.card small .icon { width: 9px; height: 9px; }
.card small { color: #d5bc90; }
.card small > span { margin-left: 3px; color: #a9bec9; }
.card[data-unavailable="true"] { background: linear-gradient(145deg, #33434b, #25343d); border-color: #8b9fa844; color: #bcc9cf; }
.card[data-unavailable="true"] .tool-art { opacity: .58; }
.card.selected { border-color: var(--accent); background: linear-gradient(150deg, #3d615f, #28494c 60%, #1a343e); box-shadow: inset 0 1px #d7ffe433, 0 0 0 2px #9bffcf16, 0 4px 10px #0a243b44; }
.card.selected::after { content: ''; position: absolute; right: 5px; top: 6px; width: 4px; height: 4px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 5px var(--accent); }
.controls {
  position: absolute; z-index: 3; bottom: max(7px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 16px); display: flex; align-items: center; flex-direction: column; gap: 2px; pointer-events: none;
}
.feedback { max-width: min(320px, calc(100vw - 24px)); min-height: 20px; padding: 3px 9px; border-radius: 9px; background: #1b323ed4; text-align: center; font-size: 11px; line-height: 1.35; color: #d9e5e8; box-shadow: 0 2px 8px #142a3520; }
.feedback.success { color: #b7edd7; }
.feedback.warning { color: #f0c99b; }
.action-row { display: grid; grid-template-columns: 44px 156px 44px; gap: 5px; pointer-events: auto; align-items: center; }
.action-row .primary { position: relative; isolation: isolate; display: flex; align-items: center; justify-content: center; height: 44px; min-height: 44px; padding: 0 10px; background: none; border: 0; font-size: 13px; font-weight: 650; color: #3b3121; gap: 5px; box-shadow: none; }
.action-row .primary::before {
  content: ''; position: absolute; inset: 4px 0; z-index: -1; border-radius: 11px;
  background: linear-gradient(170deg, #f6dca7, #dbb77b 70%, #c9a264); border: 1px solid #fff1cc9c;
  box-shadow: inset 0 1px #fff8df99, inset 0 -2px #8a663a40, 0 4px 10px #2c302b2e;
}
.action-row .primary:disabled { opacity: 1; color: #b7c8cc; }
.action-row .primary:disabled::before { background: linear-gradient(155deg, #455e68de, #2e4552de); border-color: #9ab5be4d; box-shadow: inset 0 1px #ffffff12; }
.primary { background: #e4c18a; color: #3b3121; font-weight: 650; }
.scene-help { position: absolute; top: calc(max(8px, env(safe-area-inset-top)) + 169px); left: 15px; font-size: 10px; color: #28434a; text-shadow: 0 1px 2px #fff9; pointer-events: none; opacity: .75; }
.scene-loading { position: absolute; inset: 40% 15px auto; text-align: center; color: #143546; font-size: 14px; }
.scene-loading button { padding: 8px; }
/* The entire projected machine is the drop target, including frame openings. */
.drop-target {
  position: absolute; z-index: 1; padding: 0; min-height: 0; border: 0;
  border-radius: 0; background: transparent; box-shadow: none; color: #e1fff1;
  touch-action: manipulation; transition: filter .1s;
}
.drop-target[hidden] { display: none; }
.drop-target>svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.drop-target polygon { fill: #82edb216; stroke: #b1ffd7c9; stroke-width: 1.5px; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.drop-target span { position: absolute; top: 43%; left: 50%; transform: translate(-50%,-50%); pointer-events: none; white-space: nowrap; font-size: 10px; padding: 4px 6px; border-radius: 5px; background: #183d38e8; color: #d4f4e4; box-shadow: 0 2px 6px #102a3b20; }
.drop-target.drop-hover polygon { fill: #90ffbf40; stroke: #d2ffe4; stroke-width: 3px; }
.drop-target.drop-hover span { background: #2b7654; color: #fff; }
.tool-drag-ghost { position: fixed; z-index: 100; pointer-events: none; opacity: .95; box-shadow: 0 10px 20px #0d263a66; border-color: #ead4a8; }
.tool-drag-ghost.drop-ready { border-color: #b2ebd4; filter: brightness(1.15); }
.stamp { position: absolute; top: 32%; right: 15%; padding: 6px 10px; display: flex; align-items: center; gap: 4px; background: #214d43e6; color: #bdebd5; border: 1px solid #a3d4be; border-radius: 9px; transform: rotate(-7deg); font-size: 16px; font-weight: 650; box-shadow: inset 0 1px #ffffff24, 0 4px 12px #11322730; pointer-events: none; animation: stamp-in .27s ease-out; }
.notice { position: absolute; z-index: 5; left: 10px; right: 10px; top: 56px; padding: 8px; border-radius: 9px; color: #624726; background: #efe0bb; font-size: 13px; }
.notice button { padding: 4px 8px; }
dialog { border: 1px solid #d5dfda; border-radius: 18px; box-shadow: 0 20px 60px #1129344d; }
dialog button { color: var(--ink); background: linear-gradient(#fcfdf9, #e9efeb); border-color: #cbd5d0; box-shadow: inset 0 1px #fff, 0 2px 4px #193b2b0a; }
dialog h2 { font-size: 18px; }
dialog .primary { background: linear-gradient(#f5dfb5, #dfbd87); }
.tile-medal { display: flex; width: 100%; align-items: center; justify-content: space-between; }
.tile-medal b { padding: 4px 6px; border-radius: 6px; background: #dfe9e2; }
.tile-medal .icon { color: var(--green); }
.error-screen { position: relative; z-index: 5; background: #edf6fc; color: var(--ink); }
@keyframes stamp-in { from { opacity: 0; transform: rotate(-18deg) scale(1.2); } }
@media (max-width: 350px) {
  .brandmark { display: none; }
  .topbar { left: 12px; right: 6px; }
  h1 { font-size: 11px; }
  .cards { gap: 4px; padding: 4px; }
}
@media (max-height: 650px) {
  .scene-help { display: none; }
  .cards { bottom: calc(78px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-height: 480px) and (min-width: 600px) {
  .stats { top: calc(max(8px, env(safe-area-inset-top)) + 111px); }
  .cards { left: auto; right: 12px; bottom: 78px; transform: none; }
  .controls { left: auto; right: 12px; transform: none; }
  .scene-help { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; } }
/* One illustrated manual, shared by the opening dialog and menu. */
.play-guide { font-size: 14px; line-height: 1.65; }
.guide-intro { padding: 20px 14px; border-radius: 14px; color: #e6f1ef; background: linear-gradient(135deg,#294953,#173a36); text-align: center; }
.guide-kicker { font-size: 11px; letter-spacing: 2px; color: #efd4a7; }
.guide-intro p { margin: 8px 0 12px; font-size: 20px; font-weight: 700; }
.guide-intro>div { font-size: 12px; color: #c0ded2; display: flex; align-items: center; justify-content: center; gap: 8px; }
.play-guide h3 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.play-guide h3>span { width: 27px; height: 27px; border-radius: 8px; background: #dbe8e0; color: #376757; display: inline-grid; place-items: center; font-size: 12px; }
.play-guide h3 small { margin-left: auto; font-size: 11px; color: #6e7e80; font-weight: 400; }
.guide-step { margin-top: 24px; }
.guide-step p { margin: 10px 0 0; }
.guide-drawing { display: block; width: 100%; height: auto; border-radius: 12px; background: #e4ece8; font-family: inherit; }
.guide-drag-demo,.guide-result { padding: 20px 14px; display: flex; align-items: center; justify-content: space-around; gap: 10px; border-radius: 12px; background: #e4ece8; }
.guide-demo-tool { padding: 8px 10px; border-radius: 10px; background: linear-gradient(#375461,#1d333d); color: #e6f1ef; text-align: center; box-shadow: 0 5px 9px #264a4a29; }
.guide-demo-tool svg { width: 40px; height: 36px; display: block; }
.guide-demo-tool b { font-size: 12px; }
.guide-drag-path { font-size: 12px; color: #3c685a; text-align: center; }
.guide-drag-path small { display: block; margin-top: 6px; color: #607a72; font-size: 11px; }
.guide-demo-target { display: flex; flex-direction: column; align-items: center; color: #33715b; font-size: 11px; gap: 6px; }
.guide-demo-target>.icon { width: 44px; height: 44px; padding: 8px; border: 1px solid #6da68e; border-radius: 50%; box-shadow: 0 0 0 5px #acd7bd45; }
.guide-result>span { display: flex; flex-direction: column; align-items: center; font-size: 12px; }
.guide-result b { font-size: 32px; color: #36565f; line-height: 1.3; }
.guide-result .guide-pass b { color: #39765d; }
.guide-pass .icon { width: 22px; }
.guide-result-tool svg { width: 44px; height: 40px; }
.guide-example { text-align: center; padding: 9px; border-radius: 0 0 10px 10px; background: #d9e7dc; color: #35614e; font-size: 12px; }
.guide-toolbox,.guide-acceptance { margin-top: 26px; }
.guide-tool-list { border: 1px solid #d4dfd9; border-radius: 12px; overflow: hidden; }
.guide-tool-row { display: flex; align-items: center; gap: 10px; padding: 11px; background: #ffffff75; }
.guide-tool-row+.guide-tool-row { border-top: 1px solid #d9e3dd; }
.guide-tool-row>span { display: grid; place-items: center; width: 44px; height: 44px; background: #2a424d; border-radius: 9px; flex: none; }
.guide-tool-row svg { width: 36px; height: 34px; }
.guide-tool-row b { font-size: 13px; }
.guide-tool-row p { margin: 1px 0 0; font-size: 11px; color: #607574; }
.guide-tool-row>small { margin-left: auto; color: #856531; white-space: nowrap; }
.guide-tool-row>small svg { width: 13px; height: 13px; }
.guide-rule,.guide-foot { color: #607574; font-size: 12px; }
.guide-acceptance { padding: 15px; border: 1px solid #cddfd3; border-radius: 12px; background: #e6eee6; }
.guide-acceptance ul { padding-left: 18px; margin: 0; }
.guide-acceptance li+li { margin-top: 8px; }
.guide-foot { margin: 20px 0; }
.guide-foot p { margin: 8px 0; }
.guide-start { position: sticky; bottom: -1px; box-shadow: 0 -7px 15px #f2f4f0 !important; }
@media(max-width:350px) { .guide-intro p { font-size: 18px; } .guide-drag-demo { padding: 16px 8px; gap: 8px; } }
.game-values { padding: 1px 5px; border: 1px solid #d9c29865; border-radius: 4px; color: #f4d5a4; font-size: 10px; white-space: nowrap; }
.station-label { position: absolute; z-index: 1; transform: translate(-50%,-100%); padding: 3px 6px; color: #f5d798; background: #20323ddf; border-radius: 5px; font-size: 10px; font-weight: 650; white-space: nowrap; pointer-events: none; }
.station-label.leveler-label { color: #c4eef6; }
.guide-intro .guide-flow { gap: 4px; }
.guide-flow span { display: grid; place-content: center; min-height: 44px; flex: 1; background: #ffffff16; border-radius: 6px; line-height: 1.2; }
.guide-flow span:last-child { color: #f9ddab; background: #f3cc841f; }
.guide-flow .icon { width: 11px; }
.guide-intro>small { display: block; margin-top: 10px; color: #d4e7df; font-size: 11px; }
.guide-stations { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.guide-stations>div { display: grid; grid-template-columns: 37px 1fr; align-items: center; padding: 7px; border-radius: 8px; background: #e3ebe4; column-gap: 7px; }
.guide-stations svg { width: 36px; height: 36px; grid-row: span 2; padding: 2px; border-radius: 7px; background: #2a424d; }
.guide-stations b { font-size: 13px; }
.guide-stations span { font-size: 11px; }
.guide-demo-target .tool-art { width: 44px; height: 40px; padding: 3px; background: #294b52; border-radius: 7px; }
@media (max-width: 350px) {
  .station-label { font-size: 9px; padding: 3px 5px; transform: translate(-70%, -100%); }
  .station-label.leveler-label { transform: translate(-30%, -100%); }
}

/* First order: use the workpiece itself as the measuring station. */
.first-order {
  --gauge-amber: #f6cb79;
  --gauge-green: #a3ebd0;
}
.first-order .stats {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px;
}
.first-guide {
  display: flex; align-items: center;
  background: linear-gradient(135deg,#2d434c,#1c3038);
  border: 1px solid #93acb5; border-radius: 12px;
  box-shadow: inset 0 1px #ffffff1c, 0 3px 8px #20323a22;
  pointer-events: auto;
}
.first-steps { display: flex; align-items: center; gap: 7px; padding: 4px 8px; }
.first-step {
  display: inline-flex; align-items: center; gap: 4px;
  color: #c1ced1; white-space: nowrap; font-size: 12px;
}
.first-step b { font-weight: 550; }
.first-step svg { width: 17px; height: 17px; }
.first-step[aria-current] { color: var(--gauge-amber); }
.first-steps i { font-style: normal; color: #91a4aa; }
#first-manual {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-left: 1px solid #ffffff26; border-radius: 0 11px 11px 0;
  background: transparent; color: #d6e6e9;
}
.first-order .scene-help { display: none; }
.first-order:has(.plate-gauge:not([hidden])) .metric { display: none; }
.before-measure .cards { visibility: hidden; }
.before-measure .order .goal-line strong { color: #b1e7d2; }
#measure-face {
  position: absolute; z-index: 1; padding: 0; min-height: 0;
  border: 0; border-radius: 0; background: #ffe3a12a;
  touch-action: manipulation;
}
.plate-gauge {
  --pin-height: 44px;
  position: absolute; z-index: 1; transform: translate(-50%,var(--pin-height));
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 5px 11px; border: 1px solid #9cafa9; border-radius: 10px;
  background: #20333a; color: #f2f5ec; white-space: nowrap;
  box-shadow: 0 3px 9px #142a3545, inset 0 1px #ffffff24;
}
.plate-gauge[hidden],#measure-face[hidden] { display: none; }
.plate-gauge::before,.plate-gauge::after {
  content: ''; position: absolute; left: calc(50% + var(--pin-x)); pointer-events: none;
}
.plate-gauge::before {
  bottom: 100%; width: 2px; height: var(--pin-height); background: #fbe3ad;
  box-shadow: 1px 0 1px #44342080;
}
.plate-gauge::after {
  bottom: calc(100% + var(--pin-height) - 5px); width: 8px; height: 8px;
  transform: translateX(-3px); border: 2px solid #fff0c5; border-radius: 50%;
  background: #56442e; box-shadow: 0 0 0 2px #70502b80;
}
.gauge-action {
  min-height: 44px; font-size: 14px; font-weight: 650; color: #332813;
  border-color: #fff0b9; background: linear-gradient(165deg,#ffedbd,#eab85e);
}
.gauge-action .icon { width: 19px; height: 19px; }
.gauge-value { pointer-events: none; font-size: 11px; min-height: 40px; }
.gauge-value b { display: block; color: var(--gauge-amber); font-size: 19px; line-height: 1.1; }
.gauge-value span:last-child b,.gauge-value.at-goal b { color: var(--gauge-green); }
.gauge-scale { display: flex; align-items: flex-end; gap: 3px; align-self: center; margin-right: 2px; }
.gauge-scale i { width: 9px; border-radius: 1px 1px 0 0; color: var(--gauge-amber);
  background: repeating-linear-gradient(to top,currentColor 0 3px,transparent 3px 4px); }
.gauge-scale i:last-child,.at-goal .gauge-scale i { color: var(--gauge-green); }
@media (max-height: 650px) { .plate-gauge { --pin-height: 24px; } }
/* The opening instruction card leaves the actual plate available to touch. */
.before-measure .stats { min-height: 46px; }
.before-measure .first-guide {
  position: fixed; left: 50%; bottom: calc(70px + env(safe-area-inset-bottom,0px));
  transform: translateX(-50%); display: grid; grid-template-columns: 1fr 44px;
  width: min(310px,calc(100% - 24px)); padding: 9px 10px 10px;
  background: linear-gradient(135deg,#304850,#1b313a 75%); border-color: #a5b6b5;
}
.guide-goal { padding-left: 6px; font-size: 15px; color: #f0f4ec; align-self: center; }
.guide-goal b { font-size: 21px; color: var(--gauge-green); }
.before-measure #first-manual {
  grid-row: 1; grid-column: 2; border: 0; margin-top: -4px; margin-bottom: -4px;
}
.before-measure .first-steps { grid-column: span 2; justify-content: space-between; padding: 7px 5px 0; }
.before-measure .first-step { flex-direction: column; gap: 3px; }
.before-measure .first-step svg { width: 25px; height: 25px; }
.before-measure .first-step[aria-current] { color: #ffdb92; }
#workspace.before-measure:has(.gauge-action:not([hidden])) ~ .controls :is(#feedback,#primary,#undo) {
  visibility: hidden;
}
@media (max-width: 350px) {
  .first-order:not(.before-measure) .first-steps { gap: 4px; padding-inline: 6px; }
  .first-order:not(.before-measure) .first-step { gap: 2px; }
}
