/* Scan coin, the weight question and the Label step (docs/plans/cloud-studio-2026-10-24/design/SCAN-COIN.md).
   Tokens only from studio.css (--ink, --panel, --rule, --soft, --chip, --ok, --warn, --focus ...), so dark mode follows. */

/* the nav's Scan coin: a small filled button after the links */
nav .navscan { margin-left: 8px; padding: 5px 12px; font-size: 13.5px; border-radius: 7px; white-space: nowrap; }
@media (max-width: 640px) { nav .navscan { margin-left: auto; } }
@media (max-width: 480px) { nav .navscan { padding: 5px 10px; } }

/* the Coins page: the one filled button, its remembered scanner, the chooser and the notices under it */
.scan-start { display: grid; justify-items: end; gap: 4px; }
.scan-start .scan-on { margin: 0; display: flex; gap: 4px; align-items: baseline; }
.scan-start .scan-on button.link { font-size: inherit; padding: 0; }
#scan-under:empty { display: none; }
#scan-under { margin: 0 0 16px; }
#scan-under .notice { margin: 0; }
.scan-choose { padding: 14px 16px; border: 1px solid var(--ink); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
.scan-choose .acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 640px) { .scan-start { justify-items: stretch; width: 100%; } .scan-start #quickcoin { width: 100%; } }

/* the temporary name, wherever it shows */
.chip.tmp-name { border: 1px dashed var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); color: var(--ink2); }
.journey .title-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; min-width: 0; }
.journey .title-row .chip[hidden] { display: none; }
.coin-text .chip.tmp-name { justify-self: start; margin-top: 2px; font-size: 11px; }

/* the weight question, under the steps while side A scans */
#while-scan:empty { display: none; }
.while-scan { margin-top: 12px; padding: 14px 16px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius);
              box-shadow: var(--shadow-sm); }
.while-scan h3 { margin: 0 0 2px; font-size: 15px; font-weight: 600; }
.while-scan > p { margin: 0 0 10px; color: var(--ink2); }
.while-scan.saved { border-color: color-mix(in srgb, var(--ok) 45%, var(--rule)); }
.while-scan.saved p { margin: 0; color: var(--ink); }
.ws-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 10px 14px; align-items: start; }
.ws-form label { display: grid; gap: 4px; font-size: 13px; color: var(--ink2); min-width: 0; }
.ws-form input { width: 100%; min-width: 0; }
.w-pair { display: flex; gap: 6px; min-width: 0; }
.w-pair input { flex: 1 1 6em; min-width: 0; }
.w-pair select { flex: 0 1 auto; min-width: 0; max-width: 60%; }
.ws-grams { color: var(--ink); font-variant-numeric: tabular-nums; min-height: 1.2em; }
.ws-acts { grid-column: 1 / -1; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ws-bad { color: var(--bad); }
@media (max-width: 560px) { .ws-form { grid-template-columns: minmax(0, 1fr); } }
.grid-form .w-pair select { max-width: 55%; }

/* the label card: the reading on its way, the AI's proposal beside what was measured and entered */
.lc-reading { margin: 12px 0; padding: 12px 14px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--focus) 40%, var(--rule));
              background: color-mix(in srgb, var(--focus) 5%, var(--panel)); }
.lc-reading p { margin: 6px 0 0; color: var(--ink2); }
.bar-track.wait i { width: 30%; animation: lc-wait 1.6s ease-in-out infinite; }
@keyframes lc-wait { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { .bar-track.wait i { animation: none; width: 100%; opacity: .4; } }

.lc-groups { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin: 14px 0 6px; }
.lc-groups h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lc-groups .parts { margin: 8px 0; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
/* a tile is its name, its value, then whose it is, stacked at every width (a long relief line never squeezes the value) */
.lc-groups .parts li { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.lc-groups .parts .v { font-size: 15px; margin-bottom: 6px; }
.lc-groups .parts .chip { margin-top: auto; }
.lc-ai { padding: 14px 16px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--warn) 70%, var(--rule));
         background: color-mix(in srgb, var(--warn) 5%, var(--panel)); min-width: 0; }
.lc-ai-label { margin: 0 0 4px; font-size: 21px; font-weight: 600; letter-spacing: -.01em; line-height: 1.25; overflow-wrap: anywhere; text-wrap: balance; }
.lc-have { min-width: 0; }
.lc-conf, .lc-grade, .lc-conflict { margin: 6px 0 0; color: var(--ink2); }
.lc-grade { padding-top: 8px; border-top: 1px solid var(--rule); }
.lc-conflict { color: var(--ink); }
.chip.src-ai { border: 1px dashed var(--warn); background: var(--panel); }
.lc-acts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0 6px; }
.lc-acts button:not(.ghost):not(.link) { padding: 9px 18px; }
.label-card .why { margin: 0 0 4px; font-size: 12px; color: var(--muted); }
.lc-msg:empty { display: none; }
.lc-msg { margin: 10px 0 0; padding: 8px 12px; border-radius: 8px; background: var(--soft); color: var(--ink); }
@media (max-width: 760px) { .lc-groups { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .lc-groups .parts { grid-template-columns: minmax(0, 1fr); }
                            .lc-groups .parts .v { margin-bottom: 4px; } .lc-groups .parts .chip { margin-top: 2px; }
                            .lc-ai { padding: 12px; } .lc-ai-label { font-size: 18px; } }

/* the label card's own tiles (the label in use, no reader, used up): name, value, then whose it is, stacked at phone
   width as in the proposal view, so a long source chip never squeezes the value to a letter a line */
@media (max-width: 560px) {
  .label-card .parts li { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
  .label-card .parts .v { margin-bottom: 2px; }
  .label-card .parts .chip { margin-top: 2px; }
}
.lc-waits { margin: 4px 0 0; color: var(--ink2); }
.lc-improve { margin: 12px 0 0; color: var(--ink2); }
.lc-improve > p { margin: 0 0 2px; color: var(--ink); }
.lc-improve > ul { margin: 0 0 4px; padding-left: 18px; }
.lc-improve details ul { margin: 4px 0 0; padding-left: 18px; }
.lc-improve summary { cursor: pointer; }

/* the facts form: the name has room for a temporary or an AI name; the weight's unit stays readable */
.grid-form label.f-name { grid-column: span 2; }
@media (max-width: 560px) { .grid-form label.f-name { grid-column: 1 / -1; } }
.grid-form .w-pair select { min-width: 4.5em; }

/* at phone width the weight question comes first in the rail, where the owner looks while side A sweeps */
@media (max-width: 560px) {
  .rail-wrap { display: flex; flex-direction: column; }
  .rail-wrap > #j-error { order: -2; }
  .rail-wrap > #while-scan { order: -1; }
  .rail-wrap > #while-scan .while-scan { margin: 0 0 12px; }
}
@media (max-width: 640px) { .scan-start { margin-bottom: 12px; } }

/* the coin's outline on the frame-check picture (owner decision 13): the circle the frame check chose, how sure it is,
   and a person's own circle, dragged onto the coin (views/outline.js) */
.step.attention { border-color: color-mix(in srgb, var(--warn) 65%, var(--rule)); background: color-mix(in srgb, var(--warn) 6%, var(--panel));
                  margin: 3px 0; z-index: 1; }
.step.attention .num, .step.attention .tag { border-color: var(--warn); color: var(--warn); }
.outline-card { margin-top: 22px; }
.outline-card[hidden] { display: none; }
.ol-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.ol-conf { font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--rule);
           color: var(--ink2); background: var(--chip); }
.ol-conf.low { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 60%, var(--rule)); background: color-mix(in srgb, var(--warn) 10%, var(--panel)); }
.ol-conf.high { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 50%, var(--rule)); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }
.ol-conf.person { color: var(--focus); border-color: color-mix(in srgb, var(--focus) 50%, var(--rule)); }
.ol-words { margin: 6px 0; color: var(--ink); max-width: 72ch; }
.ol-confline, .ol-read, .ol-how, .ol-after { margin: 6px 0; max-width: 72ch; }
.ol-check:empty { display: none; }
.ol-check { margin: 4px 0; color: var(--bad); }
.ol-msg { margin: 6px 0; font-weight: 500; }
.ol-fig { margin: 10px 0 4px; }
.ol-fig figcaption { margin-top: 4px; }
.ol-pic { position: relative; width: 100%; max-height: 72vh; margin: 0 auto; background: var(--stage); border-radius: 10px; overflow: hidden; }
.ol-pic img { display: block; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; pointer-events: none; }
.ol-pic.ol-turned { transform: rotate(180deg); }
.ol-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.ol-svg.editing { touch-action: none; cursor: grab; }
.ol-svg.editing.dragging { cursor: grabbing; }
.ol-svg:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.ol-halo { fill: none; stroke: rgba(0, 0, 0, .6); stroke-width: 6; }
.ol-ring { fill: none; stroke: #4fc3ff; stroke-width: 2.5; }
.ol-ring.low { stroke: #ffb000; stroke-dasharray: 8 5; }
.ol-ring.editing { stroke: #4fc3ff; fill: rgba(79, 195, 255, .08); }
.ol-cand { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 1.25; stroke-dasharray: 4 4; }
.ol-cand.ring { stroke: rgba(255, 176, 0, .55); }
.ol-cand.on { stroke: transparent; }
.ol-hit { fill: transparent; }
.ol-dot { fill: #4fc3ff; stroke: rgba(0, 0, 0, .7); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.ol-dot[data-d="move"] { fill: #fff; }
.ol-choices { margin: 10px 0 4px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ol-choices p { flex: 1 0 100%; margin: 0; }
.ol-choice, .ol-fine button { min-height: 44px; }
.ol-choice.on { border-color: var(--focus); box-shadow: inset 0 0 0 1px var(--focus); }
.ol-fine { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.ol-fine button { min-width: 64px; }
.ol-note { display: grid; gap: 4px; margin: 10px 0 0; color: var(--ink2); max-width: 520px; }
.ol-note input { width: 100%; }
.outline-card .acts { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.outline-card .acts button { min-height: 44px; }
.rv-outline { width: min(980px, 96vw); }
.rv-outline .outline-card { margin: 0; padding: 16px 18px; }
.rv-side-links { display: flex; gap: 14px; flex-wrap: wrap; }

/* what Use this label (and the identity tick) replaces of the person's own entries, before the click */
.lc-replaces, .rv-oc-replaces { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; border: 1px solid color-mix(in srgb, var(--warn) 55%, var(--rule));
                                background: color-mix(in srgb, var(--warn) 6%, var(--panel)); }
.lc-replaces p, .rv-oc-replaces p { margin: 0 0 4px; }
.lc-replaces ul, .rv-oc-replaces ul { margin: 4px 0; padding-left: 18px; }
.lc-replaces li, .rv-oc-replaces li { overflow-wrap: anywhere; }
.lc-replaces .k, .rv-oc-replaces .k { color: var(--ink2); margin-right: 6px; }
.lc-replaces del, .rv-oc-replaces del { color: var(--muted); }
/* the frame-check picture turned a quarter turn (the one display frame, NEXT-FIXES 16): the frame takes the turned
   shape and the picture with its circle turns inside it about its centre */
.ol-frame { position: relative; margin: 0 auto; max-width: 100%; background: var(--stage); border-radius: 10px; overflow: hidden; }
.ol-frame .ol-pic.ol-q { position: absolute; left: 50%; top: 50%; max-height: none; border-radius: 0; transform-origin: 50% 50%; }

/* the grade tiles (NEXT-FIXES item 11): the estimate's one line of confidence and limitation, the designation beside it */
.parts .lc-grade-tile .lc-tile-line { line-height: 1.35; }
.parts .lc-grade-tile .lc-tile-extra { line-height: 1.35; color: var(--ink2); }
