:root {
  --ink: #0b0f12;
  --graphite: #10161a;
  --panel: #171e23;
  --panel-raised: #1e272d;
  --steel: #aeb8be;
  --muted: #829099;
  --line: #334049;
  --paper: #f1f4f5;
  --blue: #2d99d4;
  --blue-dark: #176b9a;
  --amber: #f4a51c;
  --amber-dark: #bd7100;
  --red: #ef5c55;
  --green: #54b885;
  --display: "Arial Narrow", "Roboto Condensed", "Helvetica Neue", sans-serif;
  --body: Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "Roboto Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--ink);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background:
    linear-gradient(140deg, rgba(45,153,212,.08), transparent 35%),
    repeating-linear-gradient(90deg, transparent 0, transparent 79px, rgba(255,255,255,.018) 80px),
    var(--graphite);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: min(1160px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) clamp(16px, 3vw, 38px) env(safe-area-inset-bottom);
}

.masthead {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: baseline;
  height: 42px;
  padding: 5px 8px;
  color: #101417;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
  font: 900 27px/1 var(--display);
  letter-spacing: -2px;
}

.brand-mark i { font-size: 15px; font-style: normal; margin: 0 2px; }
.brand-copy { display: grid; text-transform: uppercase; }
.brand-copy strong { font: 800 19px/1 var(--display); letter-spacing: .08em; }
.brand-copy small { margin-top: 4px; color: var(--muted); font: 700 10px/1 var(--body); letter-spacing: .17em; }
.mast-actions { display: flex; align-items: center; gap: 8px; }

.mode-badge, .connection-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid currentColor;
  border-radius: 3px;
  font: 800 11px/1 var(--body);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.mode-dry { color: var(--steel); }
.mode-armed { color: var(--amber); background: rgba(244,165,28,.08); }
.mode-done { color: var(--green); background: rgba(84,184,133,.1); }
.mode-stop { color: var(--red); background: rgba(239,92,85,.1); }

.icon-button, .text-button {
  border: 0;
  color: var(--steel);
  background: transparent;
  cursor: pointer;
}
.icon-button { min-height: 40px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.text-button { padding: 8px 0; text-decoration: underline; text-underline-offset: 4px; }
.icon-button:hover, .text-button:hover { color: white; }
/* Clear order: quiet until armed, then unmistakably destructive. */
.text-button.danger { color: #e2a2a2; }
.text-button.danger:hover { color: #ffbdbd; }
.text-button.go { color: #8fd9b3; }
.text-button.go:hover { color: #c4f2da; }
.text-button.warn { color: #e8c98a; }
.text-button.warn:hover { color: #ffdf9e; }
.text-button.warn.is-armed { color: #1b1b1b; background: #d99b1f; padding: 8px 12px; border-radius: 8px; text-decoration: none; }
.text-button.danger.is-armed { color: #fff; background: #a02b2b; padding: 8px 12px; border-radius: 8px; text-decoration: none; }

main { padding: clamp(28px, 6vw, 62px) 0; }
.dashboard { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .9fr); gap: 22px; }
.request-panel, .job-ticket, .browser-panel, .review-card, .orders-panel, .auth-card {
  border: 1px solid var(--line);
  background: rgba(23,30,35,.94);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
}
.request-panel { padding: clamp(20px, 4vw, 34px); }
.job-ticket { grid-column: 2; grid-row: 1 / span 2; min-height: 440px; padding: 24px; }
.browser-panel { grid-column: 1 / -1; overflow: hidden; padding: clamp(18px, 3vw, 28px); }
.review-card { grid-column: 1; display: grid; grid-template-columns: 9px 1fr; overflow: hidden; }
.orders-panel { grid-column: 1 / -1; padding: clamp(20px, 4vw, 30px); }

.panel-heading, .ticket-header, .review-heading, .section-heading, .composer-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font: 800 11px/1 var(--body);
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2 { margin: 0; font-family: var(--display); text-transform: uppercase; letter-spacing: .02em; }
h1 { font-size: clamp(28px, 5vw, 48px); line-height: .98; }
h2 { font-size: clamp(21px, 3vw, 28px); line-height: 1; }
.lede { max-width: 560px; color: var(--steel); line-height: 1.6; }

.connection-pill { border-color: var(--line); color: var(--muted); white-space: nowrap; }
.connection-pill i { width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: currentColor; }
.connection-pill.online { color: var(--green); }
.connection-pill.offline { color: var(--red); cursor: pointer; }

textarea, input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 2px;
  outline: none;
  color: var(--paper);
  background: var(--ink);
}
textarea {
  min-height: 162px;
  margin: 25px 0 16px;
  padding: 18px;
  resize: vertical;
  font-size: 17px;
  line-height: 1.5;
}
input { height: 50px; padding: 0 14px; margin: 8px 0 16px; }
textarea:focus, input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,153,212,.12); }
.composer-footer { align-items: center; }
.composer-footer p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.4; }

.composer-photos { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.photo-hint { flex: 1 1 180px; color: var(--muted); font-size: 12px; line-height: 1.4; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.photo-thumb { position: relative; width: 74px; height: 74px; margin: 0; border: 1px solid var(--line); background: var(--ink); overflow: hidden; }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-remove {
  position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(12,14,16,.82); color: var(--paper);
  font: 700 15px/1 var(--body); cursor: pointer;
}
.photo-remove:hover { background: var(--red); color: #17120a; }
.photo-reading {
  margin: 0 0 12px; padding: 11px 13px; border-left: 3px solid var(--green);
  background: rgba(84,184,133,.07); color: var(--paper); font-size: 13px; line-height: 1.5;
}
.photo-reading.is-unread { border-left-color: var(--amber); background: rgba(244,165,28,.07); color: var(--steel); }

.primary-button, .approval-button {
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 2px;
  color: #071015;
  background: var(--blue);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: inset 0 -3px rgba(0,0,0,.2);
}
.primary-button:hover { background: #48aee4; }
.primary-button:disabled, .approval-button:disabled { opacity: .5; cursor: wait; }
.primary-button.compact { display: inline-flex; align-items: center; gap: 20px; min-width: 185px; justify-content: space-between; }
.primary-button b { font-size: 22px; }

.status-rail {
  position: relative;
  display: grid;
  gap: 20px;
  margin: 28px 0;
  padding: 4px 0;
  list-style: none;
}
.status-rail::before { content: ""; position: absolute; top: 15px; bottom: 15px; left: 7px; width: 2px; background: var(--line); }
.status-rail li { position: relative; display: flex; align-items: center; gap: 13px; color: var(--muted); font: 800 12px/1 var(--body); letter-spacing: .08em; text-transform: uppercase; }
.status-rail i { z-index: 1; width: 16px; height: 16px; border: 2px solid var(--line); border-radius: 50%; background: var(--panel); }
.status-rail li.done { color: var(--steel); }
.status-rail li.done i { border-color: var(--green); background: var(--green); box-shadow: inset 0 0 0 3px var(--panel); }
.status-rail li.active { color: var(--amber); }
.status-rail li.active i { border-color: var(--amber); box-shadow: 0 0 0 4px rgba(244,165,28,.12); }

.activity-log { min-height: 130px; padding-top: 18px; border-top: 1px solid var(--line); }
.activity-log p { margin: 0 0 10px; color: var(--steel); font-size: 13px; line-height: 1.5; }
.activity-log .agent-message { min-height: 1.5em; padding-bottom: 12px; border-bottom: 1px solid rgba(255,255,255,.06); white-space: pre-wrap; color: var(--paper); }
.activity-log .activity-entry { color: var(--muted); }
.empty-state { color: var(--muted) !important; }

.browser-panel-header, .browser-caption, .browser-toolbar, .browser-type-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.live-lamp {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(84,184,133,.1);
}
.browser-status {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--green);
  font: 800 10px/1 var(--body);
  letter-spacing: .08em;
  text-transform: uppercase;
}
.browser-status.needs-tap { color: var(--amber); border-color: rgba(244,165,28,.55); }
.browser-notice { margin: 13px 0 16px; color: var(--steel); font-size: 13px; }
.live-viewport {
  position: relative;
  display: block;
  width: 100%;
  min-height: 180px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 2px;
  background:
    linear-gradient(135deg, rgba(45,153,212,.06), transparent 45%),
    #080b0d;
  cursor: default;
  touch-action: manipulation;
}
.live-viewport:not(:disabled) { border-color: var(--amber); cursor: crosshair; }
.live-viewport:not(:disabled)::before,
.live-viewport:not(:disabled)::after {
  content: "";
  position: absolute;
  z-index: 2;
  width: 34px;
  height: 34px;
  pointer-events: none;
}
.live-viewport:not(:disabled)::before { left: 8px; top: 8px; border-left: 3px solid var(--amber); border-top: 3px solid var(--amber); }
.live-viewport:not(:disabled)::after { right: 8px; bottom: 8px; border-right: 3px solid var(--amber); border-bottom: 3px solid var(--amber); }
.live-viewport img { display: block; width: 100%; height: auto; min-height: 180px; object-fit: contain; user-select: none; }
.live-tap-hint {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  min-width: max-content;
  padding: 9px 12px;
  color: #17120a;
  background: var(--amber);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  font: 900 11px/1 var(--body);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.live-touch-pulse {
  position: absolute;
  z-index: 4;
  width: 38px;
  height: 38px;
  margin: -19px 0 0 -19px;
  border: 4px solid var(--amber);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.live-touch-pulse.is-active { animation: touch-pulse .8s ease-out; }
@keyframes touch-pulse {
  0% { opacity: 1; transform: scale(.35); }
  100% { opacity: 0; transform: scale(1.8); }
}
@media (prefers-reduced-motion: reduce) {
  .live-touch-pulse.is-active { animation-duration: .01ms; }
}
.browser-toolbar { justify-content: flex-start; margin-top: 12px; }
.browser-tool {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  color: var(--paper);
  background: var(--panel-raised);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.browser-tool:hover:not(:disabled) { border-color: var(--blue); }
.browser-tool:disabled { opacity: .38; cursor: default; }
.browser-cancel { margin-left: auto; color: var(--red); border-color: rgba(239,92,85,.5); }
.browser-type-form { justify-content: flex-start; margin-top: 10px; }
.browser-type-form input { flex: 1; height: 42px; margin: 0; font-size: 13px; }
.browser-caption { margin-top: 12px; color: var(--muted); font: 10px/1.4 var(--mono); }
.browser-caption span:last-child { text-align: right; }

.safety-stripe { background: repeating-linear-gradient(-45deg, var(--amber) 0 9px, #1a1a16 9px 18px); }
/* Paid and done: the hazard stripe would keep claiming money is still at stake. */
.review-card.is-complete .safety-stripe { background: var(--green); }
.job-ticket.is-complete { border-color: rgba(84,184,133,.4); }
.review-body { padding: clamp(22px, 4vw, 34px); }
.review-body pre { overflow: auto; margin: 25px 0; padding: 18px; border: 1px solid var(--line); background: var(--ink); color: var(--paper); font: 13px/1.65 var(--mono); white-space: pre-wrap; }
.approval-controls { padding: 18px; border: 1px solid rgba(244,165,28,.45); background: rgba(244,165,28,.06); }
.approval-controls p { margin: 0 0 15px; color: var(--steel); font-size: 13px; line-height: 1.5; }
.approval-button { width: 100%; color: #17120a; background: var(--amber); }
.approval-button:hover { background: #ffb93b; }
.review-notice { margin: 14px 0 0; color: var(--muted); font-size: 12px; }

.orders-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.order-row { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; padding: 16px; border: 1px solid var(--line); background: rgba(11,15,18,.46); }
.order-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.order-row small { color: var(--muted); font: 11px/1.4 var(--mono); }
.order-row .order-total { color: var(--paper); font-weight: 800; }
.order-status { color: var(--blue); text-transform: uppercase; letter-spacing: .08em; }

.center-card, .auth-view { min-height: 62vh; display: grid; place-items: center; }
.center-card { color: var(--muted); text-align: center; }
.loader { width: 34px; height: 34px; margin: auto; border: 3px solid var(--line); border-top-color: var(--amber); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.auth-card { width: min(620px, 100%); padding: clamp(28px, 7vw, 58px); }
.auth-card-compact { width: min(500px, 100%); }
.auth-card label { display: block; margin-top: 24px; color: var(--steel); font-size: 13px; font-weight: 700; }
.auth-card .primary-button { width: 100%; margin-top: 8px; }
.form-error { min-height: 20px; margin: 14px 0 0; color: var(--red); font-size: 13px; }

dialog { width: min(500px, calc(100% - 28px)); border: 1px solid var(--line); padding: 0; color: var(--paper); background: var(--panel); }
dialog::backdrop { background: rgba(3,7,9,.84); backdrop-filter: blur(4px); }
.dialog-card { position: relative; padding: 34px; }
.dialog-card h2 { margin-bottom: 16px; }
.dialog-card p { color: var(--steel); line-height: 1.5; }
.dialog-card label { display: block; margin-top: 22px; color: var(--steel); font-size: 13px; font-weight: 700; }
.dialog-card .approval-button { margin-top: 8px; }
.dialog-close { position: absolute; right: 12px; top: 8px; border: 0; color: var(--steel); background: transparent; font-size: 28px; cursor: pointer; }
.device-code { display: block; margin: 25px 0; padding: 18px; border: 1px dashed var(--amber); color: var(--amber); background: var(--ink); text-align: center; font: 800 28px/1 var(--mono); letter-spacing: .16em; }
.link-button { display: grid; place-items: center; text-decoration: none; }
.dialog-note { margin-bottom: 0; font-size: 12px; }

.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); max-width: calc(100% - 30px); transform: translate(-50%, 30px); padding: 12px 16px; border: 1px solid var(--line); opacity: 0; pointer-events: none; color: var(--paper); background: #273239; transition: .2s ease; box-shadow: 0 8px 30px rgba(0,0,0,.4); font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

footer { display: flex; justify-content: space-between; padding: 22px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; }
.is-hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 820px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .masthead { min-height: 70px; }
  .brand-copy small { display: none; }
  .dashboard { display: flex; flex-direction: column; }
  /* Phone order: progress first, then the step you act on; the composer moves below. */
  .job-ticket { order: 1; min-height: 0; }
  .options-card { order: 2; }
  .browser-panel { order: 3; }
  .review-card { order: 4; }
  .request-panel { order: 5; }
  .orders-panel { order: 6; }
  .request-panel { order: 1; }
  .job-ticket { order: 2; min-height: auto; }
  .browser-panel { order: 3; }
  .review-card { order: 4; }
  .orders-panel { order: 5; }
  .status-rail { grid-template-columns: repeat(6, 1fr); gap: 0; margin: 25px 0; }
  .status-rail::before { top: 7px; bottom: auto; left: 8%; right: 8%; width: auto; height: 2px; }
  .status-rail li { display: grid; justify-items: center; gap: 9px; font-size: 9px; text-align: center; }
  .status-rail i { width: 16px; height: 16px; }
  .orders-list { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .mode-badge { min-height: 27px; padding: 0 7px; font-size: 9px; }
  #installButton, #logoutButton { font-size: 10px; }
  .panel-heading { display: block; }
  .connection-pill { margin-top: 18px; }
  textarea { min-height: 190px; }
  .composer-footer { display: grid; }
  .primary-button.compact { width: 100%; margin-top: 12px; }
  .review-body pre { margin-left: -10px; margin-right: -10px; padding: 14px 10px; font-size: 11px; }
  .browser-panel { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; border-left: 0; border-right: 0; }
  .browser-panel-header { align-items: flex-start; }
  .browser-toolbar { display: grid; grid-template-columns: 1fr 1fr 1fr; }
  .browser-tool { padding: 0 8px; }
  .browser-cancel { grid-column: 1 / -1; margin-left: 0; }
  .browser-type-form { align-items: stretch; }
  .browser-caption { display: grid; }
  .browser-caption span:last-child { text-align: left; }
  footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ---- Two-step flow: option cards ---- */
.options-card {
  grid-column: 1;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid var(--line);
  background: var(--panel);
}
.order-chip { color: var(--muted); font: 11px/1.4 var(--mono); }
.options-notes { margin: 8px 0 12px; color: var(--steel); font-size: 14px; line-height: 1.5; }
.clarifying-list { margin: 0 0 14px; padding-left: 18px; color: var(--amber); font-size: 14px; }
.clarifying-list:empty { display: none; }
.options-list { display: grid; gap: 12px; }
.option-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 14px;
  padding: 16px;
  border: 1px solid var(--line);
  background: rgba(11,15,18,.46);
}
.option-card.is-chosen { border-color: var(--green); }
.option-card .option-vendor { grid-column: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font: 700 12px/1.3 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--blue); }
.option-badges { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.option-rank { padding: 3px 7px; border-radius: 2px; font: 700 9px/1.2 var(--mono); letter-spacing: .05em; }
.rank-value { background: rgba(84,184,133,.18); color: var(--green); }
.rank-lowest { background: rgba(244,165,28,.16); color: var(--amber); }
.rank-fastest { background: rgba(85,163,220,.18); color: var(--blue); }
.option-items { grid-column: 1; display: grid; gap: 9px; }
.option-line + .option-line { padding-top: 9px; border-top: 1px solid rgba(255,255,255,.07); }
.option-card .option-title { grid-column: 1; font-size: 15px; font-weight: 700; color: var(--paper); }
.option-card .option-meta { grid-column: 1; color: var(--muted); font: 12px/1.5 var(--mono); }
.option-card .option-why { grid-column: 1 / -1; color: var(--steel); font-size: 13px; line-height: 1.45; }
.option-card .option-warning { grid-column: 1 / -1; margin: 0; padding: 8px 10px; border-left: 3px solid var(--red);
  background: rgba(239,92,85,.12); color: var(--red); font-size: 13px; line-height: 1.45; font-weight: 600; border-radius: 4px; }
.option-card .option-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; }
.option-card .option-links a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.option-card .option-total { grid-column: 2; grid-row: 1 / span 2; align-self: start; text-align: right; max-width: 190px; }
.option-card .option-total strong { display: block; font: 800 22px/1 var(--display); color: var(--paper); }
.option-card .option-total small { display: block; margin-top: 4px; color: var(--muted); font: 11px/1.3 var(--mono); }
.option-card .option-total .option-note { font: 11px/1.35 var(--body); color: var(--steel); letter-spacing: 0; }
.confidence-chip { display: inline-block; margin-top: 8px; padding: 3px 8px; border-radius: 2px; font: 700 10px/1.2 var(--mono); letter-spacing: .06em; }
.eta-chip { display: block; margin-top: 8px; color: var(--blue); font: 700 11px/1.3 var(--mono); }
.confidence-HIGH { background: rgba(84,184,133,.18); color: var(--green); }
.confidence-MEDIUM { background: rgba(244,165,28,.18); color: var(--amber); }
.confidence-LOW { background: rgba(239,92,85,.18); color: var(--red); }
.option-card .option-buy { grid-column: 1 / -1; margin-top: 6px; }
.option-card .option-buy button { width: 100%; }
.refine-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 16px; }
.refine-form input { min-width: 0; padding: 12px 14px; border: 1px solid var(--line); background: var(--ink); color: var(--paper); font: 14px var(--body); }
.duplicate-notice { margin-top: 14px; padding: 14px; border: 1px solid var(--amber-dark); color: var(--steel); font-size: 14px; }
.duplicate-notice button { margin-top: 10px; }
.order-row { cursor: pointer; }
.order-row:hover, .order-row.is-current { border-color: var(--blue); }
@media (max-width: 900px) {
  .refine-form { grid-template-columns: 1fr; }
  .option-card .option-total { grid-column: 1; grid-row: auto; text-align: left; }
}


/* ---- Live view v2 ---- */
.live-viewport {
  position: relative;
  display: block;
  width: 100%;
  max-height: 70vh;
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--ink);
  touch-action: pan-x pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.live-viewport img { display: block; width: 100%; height: auto; }
.live-viewport.is-natural img { width: auto; max-width: none; }
.live-viewport.is-owner { border-color: var(--amber); cursor: crosshair; }
.live-viewport.is-owner img { touch-action: none; }
.browser-tool.browser-primary { border-color: var(--amber); color: var(--amber); }
.browser-tool.browser-continue { border-color: var(--green); color: var(--green); }
.browser-status.needs-owner { color: var(--amber); }
.browser-status.is-executing { color: var(--blue); }

.ticket-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 14px; }
/* Four one-word actions must not each break across three lines on a phone. */
.ticket-actions .text-button { white-space: nowrap; }

.rehearse-result { margin-top: 10px; white-space: pre-wrap; color: var(--steel); font: 12px/1.5 var(--mono); }
.rehearse-result:empty { display: none; }
.live-viewport.is-holding { outline: 3px solid var(--amber); outline-offset: -3px; }
