/* GM-104: station terminal brand palette. */
:root {
  --bg: #f2f6f9;
  --ink: #10222f;
  --muted: #5b6b78;
  --line: #d8e2e8;
  --panel: #ffffff;
  --panel-2: #eaf1f5;
  --coal: #0b1118;
  --teal: #0396e6;
  --teal-2: #e6f4fc;
  --green: #1b8e5a;
  --amber: #9b6500;
  --amber-2: #fff4d6;
  --red: #a43826;
  --red-2: #fff0eb;
  --blue: #71a6e6;
  --blue-2: #eaf2fc;
  --coral: #ff6b4a;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  background: var(--bg);
}

body {
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(420px, 1fr);
  gap: 28px;
  padding: 30px;
  background:
    linear-gradient(115deg, rgba(3, 150, 230, .10), transparent 38%),
    linear-gradient(245deg, rgba(255, 107, 74, .10), transparent 44%),
    var(--bg);
}

.phone-shell {
  width: min(100%, 410px);
  height: min(880px, calc(100vh - 60px));
  min-height: 760px;
  justify-self: end;
  border: 10px solid #171b1f;
  border-radius: 34px;
  background: #171b1f;
  overflow: hidden;
  position: sticky;
  top: 30px;
}

.phone {
  height: 100%;
  background: var(--panel);
  border-radius: 23px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.statusbar, .top, .object-lock, main, .bottom-actions {
  display: grid;
}

.statusbar {
  height: 28px;
  padding: 7px 16px 0;
  color: rgba(255,255,255,.82);
  background: var(--coal);
  font-size: 11px;
  display: flex;
  justify-content: space-between;
}

.top {
  background: var(--coal);
  color: #fff;
  padding: 10px 16px 14px;
  gap: 10px;
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.station b {
  display: block;
  font-size: 20px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.station span { display: block; margin-top: 4px; color: rgba(255,255,255,.68); font-size: 12px; }
.chip { min-height: 28px; border: 1px solid rgba(255,255,255,.28); border-radius: 999px; padding: 6px 9px; font-size: 12px; white-space: nowrap; }
.auth-chip {
  min-height: 52px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,255,255,.08);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  white-space: nowrap;
}
.auth-chip .auth-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #f6c454;
  box-shadow: 0 0 0 4px rgba(246,196,84,.14);
}
.auth-chip strong { display: block; font-size: 11px; line-height: 1.1; }
.auth-chip small { display: block; margin-top: 3px; color: rgba(255,255,255,.58); font-size: 9px; font-weight: 700; }
.auth-chip.authenticated { border-color: rgba(81,220,190,.42); background: rgba(3,150,230,.22); }
.auth-chip.authenticated .auth-dot { background: #51dcbe; box-shadow: 0 0 0 4px rgba(81,220,190,.13); }
.auth-chip:focus-visible,
.auth-panel button:focus-visible {
  outline: 3px solid #f6c454;
  outline-offset: 2px;
}
.route { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.route span { height: 5px; border-radius: 999px; background: rgba(255,255,255,.18); }
.route span.done { background: var(--teal); }
.route span.now { background: #f6c454; }

.object-lock {
  margin: 12px 14px 0;
  border: 1px solid var(--line);
  background: var(--teal-2);
  border-radius: 8px;
  padding: 10px;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.object-lock small { display: block; color: var(--muted); font-size: 11px; }
.object-lock strong { display: block; margin-top: 3px; font-size: 15px; line-height: 1.25; }
.scan-ok { width: 58px; height: 58px; border-radius: 8px; border: 2px solid var(--teal); display: grid; place-items: center; font-weight: 800; color: var(--teal); background: rgba(255,255,255,.5); }

main {
  flex: 1;
  overflow: auto;
  padding: 12px 14px 132px;
}

.task-card, .voice-card, .panel, .check-row, .evidence {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.task-card { padding: 14px; }
.task-meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.priority { border-radius: 999px; padding: 4px 8px; color: #fff; background: var(--amber); font-weight: 700; }
h1 { margin: 0 0 8px; font-size: 24px; line-height: 1.15; text-wrap: balance; }
.instruction { margin: 0; font-size: 15px; line-height: 1.55; color: #32383d; }
.report-rhythm { display: grid; gap: 4px; margin-top: 10px; padding: 9px 10px; border-left: 1px solid var(--teal); border-radius: 7px; background: var(--teal-2); }
.report-rhythm small { color: var(--teal); font-size: 10px; font-weight: 900; }
.report-rhythm strong { font-size: 13px; line-height: 1.3; }
.report-rhythm b { color: #175b83; font-size: 11px; line-height: 1.35; }
.report-rhythm em { color: #0c6faa; font-size: 10px; font-style: normal; font-weight: 900; line-height: 1.35; }
.report-rhythm span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.report-rhythm-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
.report-rhythm-summary strong { min-width: 0; overflow-wrap: anywhere; }
.report-rhythm-compact { display: grid; gap: 2px; min-width: 0; }
.report-rhythm-more { margin-top: 1px; min-width: 0; }
.report-rhythm-more summary { width: fit-content; color: var(--teal); font-size: 11px; font-weight: 800; cursor: pointer; }
.report-rhythm-more span { display: block; margin-top: 4px; }
.evidence-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.evidence { padding: 10px; min-height: 72px; background: #f9f6ef; }
.evidence small { color: var(--muted); font-size: 11px; }
.evidence b { display: block; margin-top: 6px; font-size: 18px; line-height: 1.05; }
.evidence.warn { background: var(--amber-2); border-color: #e6c46a; }
.evidence.mode-handoff { grid-column: 1 / -1; background: #eef4ff; border-color: #c6d7f5; }
.evidence.mode-handoff b { font-size: 13px; line-height: 1.35; }

.voice-card { margin-top: 12px; border-color: #c9b26a; background: #fff8e4; padding: 12px; gap: 10px; display: grid; }
.voice-title { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--amber); font-weight: 800; }
.voice-text { font-size: 16px; line-height: 1.35; font-weight: 700; }
.field-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.field-diff div { background: rgba(255,255,255,.66); border: 1px solid rgba(170,108,0,.25); border-radius: 8px; padding: 8px; }
.field-diff small { display: block; color: var(--muted); margin-bottom: 4px; }

.checks { margin-top: 12px; display: grid; gap: 8px; }
.check-row { min-height: 46px; display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 8px; padding: 8px; font-size: 13px; }
.mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--green); color: var(--green); display: grid; place-items: center; font-size: 13px; font-weight: 900; }
.mark.blocked { border-color: var(--red); color: var(--red); }
.check-row em { color: var(--muted); font-style: normal; font-size: 11px; white-space: nowrap; }

.secondary-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
.secondary-actions button { min-height: 52px; border: 1px solid var(--line); background: #fff; font-size: 13px; }
.secondary-actions button:first-child { color: var(--red); border-color: #e2aaaa; background: var(--red-2); }
.secondary-actions button:last-child { color: #245b8f; border-color: #b8d0ee; background: var(--blue-2); }

.bottom-actions {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,253,248,.96);
  border-top: 1px solid var(--line);
  padding: 10px 12px 14px;
  grid-template-columns: 1fr 1.25fr 1fr;
  gap: 8px;
  backdrop-filter: blur(10px);
}

button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  padding: 10px 8px;
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  background: var(--panel-2);
  cursor: pointer;
}

button.active { outline: 2px solid rgba(3, 150, 230, .35); }
.ptt { min-height: 68px; background: var(--coal); color: #fff; display: grid; place-items: center; gap: 2px; }
.ptt span { display: block; font-size: 11px; color: rgba(255,255,255,.65); font-weight: 600; }
.confirm { background: var(--teal); color: #fff; }

.side { align-self: start; max-width: 860px; display: grid; gap: 16px; }
.side h2 { margin: 0; font-size: 32px; line-height: 1.08; }
.side p { margin: 0; color: #3a4146; line-height: 1.6; max-width: 760px; }
.panel { border: 1px solid var(--line); background: rgba(255,253,248,.82); border-radius: 8px; padding: 16px; }
.process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.process { min-height: 66px; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 10px; text-align: left; font-size: 13px; display: grid; align-content: space-between; }
.process.active { color: #fff; background: var(--teal); border-color: var(--teal); }
.process small { display: block; margin-top: 6px; color: inherit; opacity: .72; font-weight: 600; }
.state-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.state { border-radius: 8px; border: 1px solid var(--line); background: #fff; padding: 10px; min-height: 78px; font-size: 12px; }
.state b { display: block; margin-bottom: 6px; font-size: 14px; }
.state.now { border-color: var(--amber); background: var(--amber-2); }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; line-height: 1.45; }
.spec-table th, .spec-table td { border-bottom: 1px solid var(--line); padding: 9px 8px; text-align: left; vertical-align: top; }
.spec-table th { color: var(--muted); font-size: 12px; font-weight: 800; }

.toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 96px;
  background: var(--coal);
  color: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.25);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  font-size: 13px;
  line-height: 1.4;
}
.toast.show { transform: translateY(0); opacity: 1; }

.auth-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  visibility: hidden;
  pointer-events: none;
}
.auth-layer.show { visibility: visible; pointer-events: auto; }
.auth-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  border-radius: 0;
  padding: 0;
  background: rgba(11,15,18,.56);
  opacity: 0;
  backdrop-filter: blur(3px);
  transition: opacity .18s ease;
}
.auth-layer.show .auth-scrim { opacity: 1; }
.auth-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: 88%;
  overflow: auto;
  border-top: 1px solid rgba(255,255,255,.68);
  border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background: var(--panel);
  box-shadow: 0 -24px 60px rgba(0,0,0,.22);
  transform: translateY(26px);
  opacity: 0;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
}
.auth-layer.show .auth-panel { transform: translateY(0); opacity: 1; }
.auth-kicker { color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .12em; display: flex; align-items: center; gap: 7px; }
.auth-kicker span { width: 18px; height: 2px; background: var(--teal); }
.card-pulse {
  width: 68px;
  height: 68px;
  margin: 14px 0 12px;
  border: 1px solid rgba(3,150,230,.3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--teal);
  background: radial-gradient(circle, rgba(3,150,230,.14), rgba(3,150,230,.04) 54%, transparent 55%);
  position: relative;
}
.card-pulse::after { content: ""; position: absolute; inset: -7px; border: 1px solid rgba(3,150,230,.18); border-radius: inherit; animation: identity-pulse 1.8s ease-out infinite; }
.card-pulse span { position: absolute; width: 34px; height: 22px; border: 2px solid currentColor; border-radius: 5px; }
.card-pulse b { position: relative; margin-top: 1px; font-size: 11px; }
.auth-panel h2 { margin: 0; font-size: 26px; line-height: 1.05; }
.auth-panel > p { margin: 9px 0 0; color: #4e565c; font-size: 13px; line-height: 1.55; }
.auth-binding { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.auth-binding div { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 9px; background: #f7f3eb; }
.auth-binding dt { color: var(--muted); font-size: 10px; }
.auth-binding dd { margin: 4px 0 0; overflow: hidden; font-size: 12px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.auth-primary,
.auth-secondary,
.auth-ghost { width: 100%; }
.auth-primary { min-height: 64px; color: #fff; background: var(--teal); display: grid; place-items: center; gap: 2px; }
.auth-primary span { font-size: 10px; color: rgba(255,255,255,.7); font-weight: 600; }
.auth-primary:disabled,
.auth-secondary:disabled { opacity: .56; cursor: wait; }
.auth-secondary { margin-top: 8px; min-height: 52px; color: #245b8f; border: 1px solid #b8d0ee; background: var(--blue-2); }
.short-code-fallback { display: grid; gap: 7px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.short-code-fallback label { color: var(--muted); font-size: 11px; font-weight: 800; }
.short-code-fallback input { width: 100%; min-height: 52px; border: 1px solid #c5d2cc; border-radius: 9px; padding: 0 12px; color: var(--ink); background: #fff; font: inherit; font-size: 18px; letter-spacing: .2em; text-align: center; }
.short-code-fallback input:focus { outline: 3px solid rgba(3,150,230,.18); border-color: var(--teal); }
.auth-ghost { margin-top: 6px; min-height: 52px; color: var(--muted); background: transparent; }
.auth-footnote { display: block; margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.4; text-align: center; }

@keyframes identity-pulse {
  0% { transform: scale(.88); opacity: .8; }
  70%, 100% { transform: scale(1.18); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-scrim, .auth-panel { transition: none; }
  .card-pulse::after { animation: none; }
}

.tweaks { position: fixed; right: 18px; bottom: 18px; z-index: 20; display: grid; gap: 8px; justify-items: end; }
.tweaks > button { min-height: 40px; background: var(--coal); color: #fff; padding: 8px 12px; }
.tweaks-panel { width: 250px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(21,25,28,.95); color: #fff; padding: 12px; display: none; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.tweaks-panel.show { display: grid; gap: 10px; }
.tweaks-panel label { display: grid; gap: 5px; font-size: 12px; color: rgba(255,255,255,.72); }
.tweaks-panel select, .tweaks-panel input { width: 100%; min-height: 34px; border-radius: 6px; border: 1px solid rgba(255,255,255,.22); background: rgba(255,255,255,.08); color: #fff; padding: 5px 8px; }

.compact main { padding-bottom: 118px; }
.compact .evidence { min-height: 60px; padding: 8px; }
.compact .checks { gap: 6px; }
.compact .check-row { min-height: 40px; }
.high-contrast { --panel: #fff; --bg: #edf2f5; --line: #aebbc4; --teal: #007fc4; --coal: #080d12; }

@media (max-width: 980px) {
  body { grid-template-columns: 1fr; padding: 16px; }
  .phone-shell {
    justify-self: center;
    position: relative;
    top: 0;
    height: calc(100dvh - 32px);
    min-height: 0;
    max-height: 820px;
  }
  .process-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .state-line { grid-template-columns: 1fr; }
  .tweaks { position: static; justify-items: stretch; }
  .tweaks-panel { width: auto; }
}

@media (max-width: 600px) {
  body { overflow: hidden; }
  .side, .tweaks { display: none; }
}

/* GM-194: Impeccable day-night station skin. */
:root {
  --station-night: #070c12;
  --station-rail: #0b1118;
  --station-command: #131e29;
  --station-command-raised: #1b2a38;
  --station-work: #f2f5f4;
  --station-paper: #ffffff;
  --station-ink: #12202a;
  --station-muted: #63717a;
  --station-line: #d8e1e5;
  --station-brand: #0396e6;
  --station-lake: #71a6e6;
  --station-success: #19b97a;
  --station-warning: #f0a62a;
  --station-danger: #ff5f4a;
  --station-body: 16px;
  --station-touch: 52px;
  --bg: var(--station-work);
  --ink: var(--station-ink);
  --muted: var(--station-muted);
  --line: var(--station-line);
  --panel: var(--station-paper);
  --panel-2: #edf2f4;
  --coal: var(--station-rail);
  --teal: var(--station-brand);
  --teal-2: #e4f3fb;
  --green: var(--station-success);
  --amber: var(--station-warning);
  --amber-2: #fff1d5;
  --red: var(--station-danger);
  --red-2: #ffebe7;
  --blue: var(--station-lake);
  --blue-2: #eaf2fc;
  --coral: var(--station-danger);
}

html, body { color: var(--station-ink); background: var(--station-work); }

body {
  color: var(--station-ink);
  background: var(--station-work);
  background-image: none;
  font-size: var(--station-body);
  font-variant-numeric: tabular-nums;
}

::selection { color: #ffffff; background: var(--station-brand); }

.phone-shell {
  border-color: var(--station-night);
  background: var(--station-night);
  box-shadow: 0 28px 70px rgba(7, 12, 18, .18);
}

.phone { color: var(--station-ink); background: var(--station-work); }
.statusbar, .top { color: #ffffff; background: var(--station-rail); }
.top { border-bottom: 3px solid var(--station-brand); }
.station b { font-size: 22px; }
.station span { color: #b5c2ca; font-size: 13px; }

.auth-chip,
.chip {
  min-height: var(--station-touch);
  border-color: #354957;
  border-radius: 9px;
  background: var(--station-command);
}

.route span { height: 4px; border-radius: 0; background: #314451; }
.route span.done { background: var(--station-success); }
.route span.now { background: var(--station-lake); }

.object-lock,
.task-card,
.voice-card,
.panel,
.check-row,
.evidence,
.auth-binding div {
  border-color: var(--station-line);
  border-radius: 9px;
  color: var(--station-ink);
  background: var(--station-paper);
  box-shadow: none;
}

.object-lock {
  border-left: 1px solid var(--station-brand);
  background: var(--station-paper);
}

main { padding-inline: 14px; }
.task-card { padding: 15px; }
h1 { font-size: clamp(20px, 5.8vw, 24px); }
.instruction { color: #34454f; font-size: var(--station-body); }

.report-rhythm {
  border-left-color: var(--station-brand);
  border-radius: 7px;
  background: #edf6fb;
}

.report-rhythm :is(small, em) { color: #087abb; }
.report-rhythm b { color: #225e80; }

:is(.task-meta, .report-rhythm, .evidence, .check-row) { font-size: var(--station-body); }
:is(.task-meta, .report-rhythm, .evidence, .check-row) :is(span, small, b, strong, em) { font-size: inherit; }

.evidence {
  min-height: 86px;
  background: #f7f9f9;
}

.evidence b,
.task-card [data-critical-value],
.station-reading {
  color: var(--station-ink);
  font-size: clamp(28px, 8vw, 36px);
  font-weight: 800;
  letter-spacing: -.045em;
}

.voice-card { border-left: 1px solid var(--station-lake); }
.voice-title { color: #31699a; }
.voice-text { font-size: 18px; }
.check-row { min-height: var(--station-touch); }

button,
input,
select,
textarea,
.ptt,
.auth-primary,
.auth-secondary,
.auth-ghost {
  min-height: var(--station-touch);
  border-radius: 9px;
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--station-brand);
  outline-offset: 2px;
}

.ptt,
.auth-primary {
  color: #ffffff;
  background: var(--station-brand);
}

.auth-secondary {
  border-color: #aac6e5;
  color: #285c8a;
  background: #eaf2fc;
}

.auth-panel {
  border-color: var(--station-line);
  border-radius: 18px 18px 0 0;
  color: var(--station-ink);
  background: var(--station-paper);
  box-shadow: 0 -18px 52px rgba(7, 12, 18, .2);
}

.auth-panel > p { color: var(--station-muted); }
.short-code-fallback input { border-color: #c6d3d9; color: var(--station-ink); background: var(--station-paper); }
.short-code-fallback input::placeholder { color: var(--station-muted); }
.priority { color: #3d2900; background: #ffd98e; }
.scan-ok { border-color: var(--station-success); color: #08794e; background: #e1f5ec; }
.card-pulse { border-color: rgba(3, 150, 230, .35); color: var(--station-brand); background: #edf6fb; }
.card-pulse::after { animation: none; }

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  border-color: #d7dfe2;
  color: #8c979c;
  background: #e8edef;
  cursor: not-allowed;
  opacity: 1;
}

@media (max-width: 600px) {
  .phone-shell {
    width: 100%;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
  }
  .phone { border-radius: 0; }
}

@media (prefers-reduced-motion: reduce) {
  :is(.auth-scrim, .auth-panel, button, .check-row) { transition: none !important; }
  .card-pulse::after { animation: none !important; }
}

/* GM-213 · 关键温控资料只读提示，不增加工位报单动作。 */
.production-quality-panel {
  display: grid;
  gap: 8px;
  min-height: 52px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #b7cbd4;
  border-left: 1px solid var(--station-brand);
  border-radius: 9px;
  color: var(--station-ink);
  background: #f4f8f9;
}

.production-quality-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.production-quality-heading small,
.production-quality-heading strong,
.production-quality-heading span,
.production-quality-panel p,
.production-quality-modes article span,
.production-quality-modes article small {
  display: block;
}

.production-quality-heading small {
  color: var(--station-muted);
  font-size: 11px;
}

.production-quality-heading strong {
  margin-top: 2px;
  color: var(--station-ink);
  font-size: 15px;
}

.production-quality-heading span {
  flex: 0 0 auto;
  padding: 5px 7px;
  border-radius: 999px;
  color: #08794e;
  background: #e1f5ec;
  font-size: 11px;
  font-weight: 800;
}

.production-quality-panel.is-attention .production-quality-heading span,
.production-quality-panel.is-unavailable .production-quality-heading span {
  color: #7c4d00;
  background: #fff1d5;
}

.production-quality-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.production-quality-modes article {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: 1px solid #d7e2e6;
  border-radius: 7px;
  background: var(--station-paper);
}

.production-quality-modes article b {
  color: var(--station-brand);
  font-size: 11px;
}

.production-quality-modes article span {
  color: var(--station-ink);
  font-size: 15px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.production-quality-modes article small {
  color: var(--station-muted);
  font-size: 11px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.production-quality-panel p {
  margin: 0;
  color: var(--station-muted);
  font-size: 11px;
  line-height: 1.4;
}

@media (max-width: 360px) {
  .production-quality-modes { grid-template-columns: 1fr; }
  .production-quality-modes article { grid-template-columns: auto 1fr; align-items: center; column-gap: 7px; }
  .production-quality-modes article b { grid-row: span 2; }
  .production-quality-modes article small { grid-column: 2; }
}

/* GM-SCI-FI: Obsidian bridge skin for the 5.5-inch station. */
:root {
  --cosmic-void: #05080d;
  --cosmic-panel: #0b1622;
  --cosmic-cyan: #21d4fd;
  --cosmic-violet: #8b5cf6;
  --cosmic-amber: #f7b955;
}

.phone-shell--cosmic {
  position: relative;
  isolation: isolate;
  border-color: var(--cosmic-cyan);
  background: var(--cosmic-void);
  box-shadow: 0 28px 70px rgba(5, 8, 13, .42), 0 0 28px rgba(33, 212, 253, .16);
}

.phone-shell--cosmic::before {
  position: absolute;
  z-index: -1;
  inset: 10px;
  border: 1px solid rgba(33, 212, 253, .18);
  pointer-events: none;
  content: "";
}

.phone-shell--cosmic .top {
  position: relative;
  border-bottom-color: var(--cosmic-cyan);
  background:
    linear-gradient(90deg, rgba(33, 212, 253, .1), transparent 55%),
    var(--station-rail);
}

.phone-shell--cosmic .top::after {
  position: absolute;
  right: 14px;
  bottom: -3px;
  width: 56px;
  height: 2px;
  background: var(--cosmic-violet);
  box-shadow: 0 0 10px rgba(139, 92, 246, .65);
  content: "";
}

.phone-shell--cosmic .route span.now {
  background: var(--cosmic-cyan);
  box-shadow: 0 0 10px rgba(33, 212, 253, .68);
}

.phone-shell--cosmic .scan-ok {
  border-color: rgba(33, 212, 253, .52);
  color: var(--cosmic-cyan);
  background: rgba(33, 212, 253, .08);
}

@media (prefers-reduced-motion: reduce) {
  .phone-shell--cosmic::before { animation: none !important; }
}

/* GM-SCI-FI: Crystal kitchen OS — the station reads like a tagged white GN pan. */
:root {
  --crystal-snow: #f7fbff;
  --crystal-gn: #ffffff;
  --crystal-gn-rim: #cfe4ea;
  --crystal-ice: #dff6ff;
  --crystal-mint: #b9f4e8;
  --crystal-blue: #0396e6;
  --crystal-gold: #f7c66a;
}

.phone-shell--crystal {
  position: relative;
  isolation: isolate;
  border-color: rgba(3, 150, 230, .42);
  background: var(--crystal-snow);
  box-shadow: 0 28px 70px rgba(52, 112, 143, .18), 0 0 24px rgba(3, 150, 230, .12);
}

.phone-shell--crystal::before {
  position: absolute;
  z-index: 0;
  inset: 10px;
  border: 1px solid rgba(3, 150, 230, .2);
  pointer-events: none;
  content: "";
}

.phone-shell--crystal .phone,
.phone-shell--crystal main { position: relative; z-index: 1; }
.phone-shell--crystal .top {
  border-bottom-color: var(--crystal-blue);
  background: linear-gradient(120deg, rgba(223, 246, 255, .96), rgba(255, 255, 255, .96));
}
.phone-shell--crystal .station b,
.phone-shell--crystal .task-card h1 { color: #123247; }
.phone-shell--crystal .station span,
.phone-shell--crystal .instruction { color: #55788b; }
.phone-shell--crystal .route span.now { background: var(--crystal-blue); box-shadow: 0 0 10px rgba(3, 150, 230, .4); }
.phone-shell--crystal .scan-ok { border-color: rgba(3, 150, 230, .42); color: var(--crystal-blue); background: var(--crystal-ice); }
.phone-shell--crystal .task-card { border-color: rgba(3, 150, 230, .24); box-shadow: 0 10px 24px rgba(36, 107, 135, .08); }
.phone-shell--crystal .task-card,
.phone-shell--crystal .object-lock,
.phone-shell--crystal .evidence { background: linear-gradient(180deg, var(--crystal-gn), var(--crystal-snow)); box-shadow: inset 0 2px 0 var(--crystal-gn-rim), 0 10px 24px rgba(36, 107, 135, .08); }

@media (prefers-reduced-motion: reduce) {
  .phone-shell--crystal::before { animation: none !important; }
}

/* GM-303 5.5寸独立工位终端：白瓷主工作面与不锈钢细边。 */
:root {
  --gm303-paper: #ffffff;
  --gm303-steel: #cfdde5;
  --gm303-blue: #0396e6;
  --gm303-green: #19b97a;
  --gm303-ink: #17365c;
  --gm303-muted: #5f7890;
  --gm303-work: #f2f5f4;
}
.phone-shell--crystal {
  border-color: var(--gm303-steel) !important;
  background: #e7eef3 !important;
  box-shadow: 0 24px 54px rgba(23,54,92,.18) !important;
}
.phone-shell--crystal .phone { color: var(--gm303-ink) !important; background: var(--gm303-work) !important; }
.phone-shell--crystal .top { min-height: 76px !important; padding: 14px 16px 16px !important; background: linear-gradient(135deg,#0b1118,#142534) !important; border-bottom: 3px solid var(--gm303-blue) !important; }
.phone-shell--crystal .station b { color: #fff !important; font-size: 22px !important; }
.phone-shell--crystal .station span { color: rgba(255,255,255,.78) !important; font-size: 13px !important; }
.phone-shell--crystal main { padding: 16px 14px 132px !important; background: var(--gm303-work) !important; }
.phone-shell--crystal :is(.object-lock, .task-card, .voice-card, .panel, .check-row, .evidence, .production-quality-panel) { color: var(--gm303-ink) !important; background: var(--gm303-paper) !important; border-color: var(--gm303-steel) !important; border-radius: 12px !important; box-shadow: 0 8px 24px rgba(23,54,92,.08) !important; }
.phone-shell--crystal .object-lock { padding: 14px !important; }
.phone-shell--crystal .object-lock small { color: var(--gm303-muted) !important; font-size: 13px !important; }
.phone-shell--crystal .object-lock strong { color: var(--gm303-ink) !important; font-size: 20px !important; }
.phone-shell--crystal .scan-ok { width: 58px !important; height: 58px !important; color: var(--gm303-blue) !important; border-color: var(--gm303-blue) !important; background: #eef7fc !important; }
.phone-shell--crystal .task-card { padding: 16px !important; }
.phone-shell--crystal .task-meta { color: var(--gm303-muted) !important; font-size: 13px !important; }
.phone-shell--crystal .task-card h1 { color: var(--gm303-ink) !important; font-size: 24px !important; line-height: 1.2 !important; }
.phone-shell--crystal .instruction { color: var(--gm303-ink) !important; font-size: 16px !important; line-height: 1.5 !important; }
.phone-shell--crystal .report-rhythm { border-left-color: var(--gm303-blue) !important; background: #eef7fc !important; }
.phone-shell--crystal .report-rhythm :is(small, b, em, span) { color: var(--gm303-muted) !important; font-size: 13px !important; line-height: 1.45 !important; }
.phone-shell--crystal .report-rhythm strong { color: var(--gm303-ink) !important; font-size: 16px !important; }
.phone-shell--crystal .report-rhythm-summary { gap: 10px !important; }
.phone-shell--crystal .report-rhythm-summary small,
.phone-shell--crystal .report-rhythm-more summary { color: var(--fm-blue-deep) !important; font-size: 12px !important; }
.phone-shell--crystal .report-rhythm-compact { gap: 2px !important; }
.phone-shell--crystal .report-rhythm-more span { margin-top: 4px !important; }
.phone-shell--crystal .evidence { min-height: 86px !important; padding: 12px !important; background: #f6f9fb !important; }
.phone-shell--crystal .evidence small { color: var(--gm303-muted) !important; font-size: 13px !important; }
.phone-shell--crystal .evidence b { color: var(--gm303-ink) !important; font-size: 28px !important; line-height: 1.1 !important; }
.phone-shell--crystal .station-action,
.phone-shell--crystal .secondary-actions button,
.phone-shell--crystal .bottom-actions button { min-height: 52px !important; font-size: 16px !important; }
.phone-shell--crystal .bottom-actions { background: rgba(255,255,255,.98) !important; border-top-color: var(--gm303-steel) !important; box-shadow: 0 -4px 14px rgba(23,54,92,.08) !important; }
.phone-shell--crystal .ptt,
.phone-shell--crystal .auth-primary { color: #fff !important; background: var(--gm303-blue) !important; }
.phone-shell--crystal .confirm { color: #fff !important; background: var(--gm303-green) !important; }
.phone-shell--crystal :is(button, input, select, textarea):focus-visible { outline-color: var(--gm303-blue) !important; }

/* GM-304 现场屏页头统一白瓷材质，和中控及品牌蓝保持一致。 */
.phone-shell--crystal .top {
  color: var(--gm303-ink) !important;
  background: rgba(255,255,255,.96) !important;
  border-bottom: 2px solid #bfe2f2 !important;
  box-shadow: 0 8px 24px rgba(23,54,92,.08) !important;
  backdrop-filter: blur(12px) !important;
}
.phone-shell--crystal .station b { color: var(--gm303-ink) !important; }
.phone-shell--crystal .station span { color: var(--gm303-muted) !important; }

/* GM-306: keep station work surfaces bright; reserve dark ink for the small
   identity strip only, so operators read the task like a white GN pan. */
.phone-shell--crystal .statusbar {
  color: var(--gm303-muted) !important;
  background: #f7fafc !important;
  border-bottom: 1px solid #e5edf2 !important;
}
.phone-shell--crystal .tweaks > button {
  color: var(--gm303-ink) !important;
  background: #ffffff !important;
  border: 1px solid var(--gm303-steel) !important;
  box-shadow: 0 4px 12px rgba(23,54,92,.08) !important;
}
.phone-shell--crystal .tweaks-panel {
  color: var(--gm303-ink) !important;
  background: rgba(255,255,255,.98) !important;
  border-color: var(--gm303-steel) !important;
  box-shadow: 0 10px 26px rgba(23,54,92,.12) !important;
}
.phone-shell--crystal .tweaks-panel label { color: var(--gm303-muted) !important; }
.phone-shell--crystal .tweaks-panel select,
.phone-shell--crystal .tweaks-panel input {
  color: var(--gm303-ink) !important;
  background: #ffffff !important;
  border-color: var(--gm303-steel) !important;
}

/* GM-308: FamilyMart-inspired station palette. Keep the 5.5-inch view bright,
   high-contrast and calm: blue guides the next action, green confirms it. */
.phone-shell--crystal {
  --fm-blue: #0085ca;
  --fm-blue-deep: #005b91;
  --fm-blue-soft: #eaf6fc;
  --fm-green: #43b02a;
  --fm-green-deep: #287d1a;
  --fm-green-soft: #edf8e9;
  --fm-white: #ffffff;
  --fm-canvas: #f4fafc;
  --fm-line: #d4e5ec;
  --fm-ink: #173b55;
  --fm-muted: #5d7486;
  color: var(--fm-ink) !important;
  background: #e9f3f7 !important;
  border-color: #b8d7e5 !important;
  box-shadow: 0 24px 54px rgba(0, 91, 145, .16) !important;
}

.phone-shell--crystal .phone,
.phone-shell--crystal main {
  color: var(--fm-ink) !important;
  background: var(--fm-canvas) !important;
}

.phone-shell--crystal .top {
  color: var(--fm-blue-deep) !important;
  background: linear-gradient(180deg, #fff 0%, #f4fbfd 100%) !important;
  border-bottom: 3px solid var(--fm-blue) !important;
  box-shadow: 0 6px 16px rgba(0, 91, 145, .09) !important;
}

.phone-shell--crystal .station b { color: var(--fm-blue-deep) !important; }
.phone-shell--crystal .station span,
.phone-shell--crystal .instruction,
.phone-shell--crystal .task-meta { color: var(--fm-muted) !important; }

/* Keep the identity controls on the white FamilyMart header; the legacy
   station skin otherwise brings back a dark command-chip background. */
.phone-shell--crystal :is(.auth-chip, .chip) {
  color: var(--fm-blue-deep) !important;
  background: var(--fm-blue-soft) !important;
  border-color: #b9d8e5 !important;
}
.phone-shell--crystal .auth-chip small { color: var(--fm-muted) !important; }
.phone-shell--crystal .auth-chip.authenticated {
  background: var(--fm-green-soft) !important;
  border-color: #b8ddb0 !important;
}
.phone-shell--crystal .auth-chip.authenticated .auth-dot {
  background: var(--fm-green) !important;
  box-shadow: 0 0 0 4px rgba(67, 176, 42, .14) !important;
}
.phone-shell--crystal .route span { background: #c9e0ea !important; }
.phone-shell--crystal .route span.done { background: var(--fm-green) !important; }

.phone-shell--crystal :is(.object-lock, .task-card, .voice-card, .panel,
  .check-row, .evidence, .production-quality-panel, .station-pack-completion-card,
  .receiving-workbench, .fixed-workbench, .qa-workbench, .sorting-workbench,
  .delivery-workbench, .seasoning-workbench) {
  color: var(--fm-ink) !important;
  background: var(--fm-white) !important;
  background-image: none !important;
  border-color: var(--fm-line) !important;
  box-shadow: 0 8px 22px rgba(0, 91, 145, .08) !important;
}

.phone-shell--crystal .scan-ok {
  color: var(--fm-blue-deep) !important;
  background: var(--fm-blue-soft) !important;
  border-color: #8bcbe5 !important;
}

.phone-shell--crystal .route span.now {
  background: var(--fm-blue) !important;
  box-shadow: 0 0 0 4px rgba(0, 133, 202, .14) !important;
}

.phone-shell--crystal .report-rhythm {
  border-left-color: var(--fm-green) !important;
  background: var(--fm-green-soft) !important;
}

.phone-shell--crystal .bottom-actions {
  color: var(--fm-ink) !important;
  background: rgba(255, 255, 255, .98) !important;
  border-top-color: var(--fm-line) !important;
  box-shadow: 0 -6px 18px rgba(0, 91, 145, .1) !important;
}

.phone-shell--crystal :is(.station-action, .secondary-actions button,
  .bottom-actions button, .ptt, .auth-primary) {
  color: #fff !important;
  background: var(--fm-blue) !important;
  border-color: var(--fm-blue) !important;
  box-shadow: 0 6px 14px rgba(0, 133, 202, .18) !important;
}

.phone-shell--crystal :is(.confirm, .station-action.confirm, button[data-action="confirm"]) {
  color: #fff !important;
  background: var(--fm-green) !important;
  border-color: var(--fm-green) !important;
  box-shadow: 0 6px 14px rgba(67, 176, 42, .2) !important;
}

.phone-shell--crystal :is(input, select, textarea) {
  color: var(--fm-ink) !important;
  background: #fff !important;
  border-color: #b9d8e5 !important;
}

.phone-shell--crystal :is(input, select, textarea):focus-visible,
.phone-shell--crystal :is(button, a):focus-visible {
  outline: 3px solid rgba(0, 133, 202, .24) !important;
  outline-offset: 2px;
}

/* GM-309: remove the last legacy-dark utility surfaces from the light station
   presentation. These controls remain secondary and never compete with the
   blue production action or green completion action. */
.phone-shell--crystal ~ .tweaks > button {
  color: var(--fm-blue-deep) !important;
  background: var(--fm-blue-soft) !important;
  border: 1px solid #b9d8e5 !important;
  box-shadow: 0 6px 14px rgba(0, 91, 145, .12) !important;
}
.phone-shell--crystal ~ .tweaks .tweaks-panel {
  color: var(--fm-ink) !important;
  background: rgba(255, 255, 255, .98) !important;
  border-color: var(--fm-line) !important;
  box-shadow: 0 12px 28px rgba(0, 91, 145, .14) !important;
}
.phone-shell--crystal ~ .tweaks .tweaks-panel label {
  color: var(--fm-muted) !important;
}
.phone-shell--crystal ~ .tweaks .tweaks-panel :is(select, input) {
  color: var(--fm-ink) !important;
  background: #ffffff !important;
  border-color: #b9d8e5 !important;
}
.phone-shell--crystal .toast {
  color: var(--fm-blue-deep) !important;
  background: var(--fm-blue-soft) !important;
  border: 1px solid #b9d8e5 !important;
  box-shadow: 0 10px 24px rgba(0, 91, 145, .14) !important;
}
.phone-shell--crystal .auth-scrim {
  background: rgba(0, 91, 145, .16) !important;
}

/* 鲜小傅附件标准：现场屏与中控共用白瓷、品牌蓝和湖绿色。 */
.phone-shell--crystal { border-color: #d9e6dd !important; background: #fff !important; box-shadow: 0 18px 44px rgba(20,59,54,.12) !important; }
.phone-shell--crystal .statusbar,
.phone-shell--crystal .top { color: #143b36 !important; background: #fff !important; border-bottom-color: #bfe2f2 !important; }
.phone-shell--crystal .station b { color: #143b36 !important; }
.phone-shell--crystal .station span { color: #5d736c !important; }
.phone-shell--crystal .auth-chip { color: #143b36 !important; background: #edf6fc !important; border-color: #bfe2f2 !important; }
.phone-shell--crystal .auth-chip small { color: #5d736c !important; }
.phone-shell--crystal .route span { background: #d9e6dd !important; }
.phone-shell--crystal .route span.done { background: #007f3d !important; }
.phone-shell--crystal .route span.now { background: #0099df !important; }
.phone-shell--crystal main { background: #fafbf7 !important; }
.phone-shell--crystal :is(.task-card, .voice-card, .panel, .check-row, .evidence) { min-width: 0; max-width: 100%; border-color: #d9e6dd !important; box-shadow: 0 8px 24px rgba(20,59,54,.08) !important; }
.phone-shell--crystal .report-rhythm { background: #eff7ed !important; border-left-color: #007f3d !important; }
.phone-shell--crystal .report-rhythm-summary,
.phone-shell--crystal .report-rhythm-summary > * { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.phone-shell--crystal .station-scan-button { background: #0099df !important; border-color: #0099df !important; }
.phone-shell--crystal .station-action.primary { background: #007f3d !important; border-color: #007f3d !important; }
.phone-shell--crystal .station-action.voice { color: #006eaa !important; background: #edf6fc !important; border-color: #bfe2f2 !important; }

/* GM-335: the attached 鲜小傅 skin standard is shared with the 5.5-inch
   station. Keep the dark identity header, but use the approved light work
   surface, brand blue and primary green for all actionable content. */
.phone-shell--crystal {
  --fm-blue: #0099df !important;
  --fm-blue-deep: #006eaa !important;
  --fm-blue-soft: #edf6fc !important;
  --fm-green: #007f3d !important;
  --fm-green-deep: #143b36 !important;
  --fm-green-soft: #eff7ed !important;
  --fm-white: #ffffff !important;
  --fm-canvas: #fafbf7 !important;
  --fm-line: #d9e6dd !important;
  --fm-ink: #143b36 !important;
  --fm-muted: #5d736c !important;
  background: #ffffff !important;
  border-color: #d9e6dd !important;
}
.phone-shell--crystal :is(.task-card, .voice-card, .panel, .check-row,
  .evidence, .object-lock, .production-quality-panel, .receiving-workbench,
  .fixed-workbench, .sorting-workbench, .delivery-workbench,
  .seasoning-workbench, .station-pack-completion-card) {
  background-image: none !important;
  background: #ffffff !important;
  color: #143b36 !important;
  border-color: #d9e6dd !important;
  box-shadow: none !important;
}
.phone-shell--crystal .top {
  background: #ffffff !important;
  color: #143b36 !important;
  border-bottom: 1px solid #d9e6dd !important;
  box-shadow: none !important;
}
.phone-shell--crystal :is(.station-action, .secondary-actions button,
  .bottom-actions button, .ptt, .auth-primary) {
  background: #007f3d !important;
  border-color: #007f3d !important;
  box-shadow: 0 4px 12px rgba(0, 127, 61, .16) !important;
}
.phone-shell--crystal .station-scan-button,
.phone-shell--crystal .station-action.scan {
  background: #0099df !important;
  border-color: #0099df !important;
}
.phone-shell--crystal :is(input, select, textarea) {
  background: #ffffff !important;
  color: #143b36 !important;
  border-color: #82998c !important;
}

@media (max-width: 600px) {
  body { display: block; min-width: 0; width: 100%; padding: 0; overflow-x: hidden; }
  .phone-shell--crystal { width: 100%; height: 100dvh; min-height: 0; max-height: none; border: 0 !important; border-radius: 0; box-shadow: none !important; }
  .phone-shell--crystal .phone { border-radius: 0; }
  .phone-shell--crystal .topline { min-width: 0; align-items: flex-start; }
  .phone-shell--crystal .station { min-width: 0; }
  .phone-shell--crystal .station b { white-space: normal; overflow-wrap: anywhere; }
  .phone-shell--crystal .auth-chip { flex: 0 0 auto; min-height: 44px; }
}
