/* Guided Device Access Restore — Origin-aligned pro layout */

.device-repair-card.is-command-runway {
  --rp-gutter: 1rem;
  --rp-gutter-top: 1.2rem;
  --rp-inner-inset: 0.75rem;
  --rp-findings-bg: linear-gradient(180deg, rgba(127, 29, 29, 0.32) 0%, rgba(22, 27, 34, 0.98) 85%);
  --rp-findings-border: rgba(248, 113, 113, 0.42);
  --rp-findings-accent: #ef4444;
  --rp-findings-icon-bg: rgba(127, 29, 29, 0.5);
  --rp-findings-icon: #fca5a5;
  --rp-findings-title: #fecaca;
  --rp-findings-body: #f87171;
  --rp-findings-status: #6ee7a0;
  --rp-keys-bg: var(--repair-keys-bg, linear-gradient(180deg, rgba(45, 140, 255, 0.2) 0%, rgba(26, 36, 50, 0.98) 100%));
  --rp-keys-border: var(--repair-keys-border, rgba(77, 163, 255, 0.45));
  --rp-keys-glow: var(--repair-keys-glow, rgba(77, 163, 255, 0.32));
  --rp-kbd-bg: var(--repair-kbd-bg, linear-gradient(180deg, #556579 0%, #434f61 48%, #384452 100%));
  --rp-kbd-text: var(--repair-kbd-text, #f8fafc);
  --rp-kbd-border: var(--repair-kbd-border, #7a8fa8);
  --rp-kbd-shadow: var(--repair-kbd-shadow, inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 2px 0 #252d38, 0 6px 18px rgba(0, 0, 0, 0.28));
  --rp-kbd-size: 3.35rem;
  --rp-kbd-font: 0.84rem;
  --rp-keys-tray-w: 15.5rem;
  --rp-accent: #6eb6ff;
  --rp-text: var(--repair-text, #e5e7eb);
  --rp-muted: var(--repair-text-muted, #9ca3af);
  --rp-border: var(--repair-border, #30363d);
  --rp-panel: var(--repair-panel-bg, #1c2128);
  --rp-surface: var(--repair-bg, #161b22);
  --rp-timer: #6eb6ff;
  --rp-timer-track: rgba(148, 163, 184, 0.14);
  width: min(100%, 40rem) !important;
  max-width: 40rem !important;
  min-height: auto !important;
  max-height: calc(100dvh - 1rem) !important;
  margin-inline: auto;
  overflow: visible !important;
  border-radius: 14px;
  background: var(--rp-surface) !important;
  border-color: var(--rp-border) !important;
}

.device-repair-card.is-command-runway .device-repair-trust-bar {
  display: none !important;
}

.device-repair-card.is-command-runway .device-repair-layout {
  display: block !important;
  min-height: 0;
}

.device-repair-card.is-command-runway .device-repair-main {
  overflow: visible !important;
  min-height: 0;
}

.device-repair-card.is-command-runway .device-repair-workspace {
  padding: 0 !important;
  overflow: visible !important;
  gap: 0 !important;
}

.device-repair-card.is-command-runway .device-repair-layout,
.device-repair-card.is-command-runway .device-repair-main,
.device-repair-card.is-command-runway .runway-shell,
.device-repair-card.is-command-runway .runway-card.runway-pro {
  width: 100%;
  box-sizing: border-box;
}

.device-repair-dialog:has(> .device-repair-card.is-command-runway) {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
}

.device-repair-card.is-command-runway .runway-shell {
  width: 100%;
}

/* Single shell — uniform inset from outer card on all sides */
.runway-pro {
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  max-height: calc(100dvh - 2.5rem);
  padding: var(--rp-gutter-top) var(--rp-gutter) var(--rp-gutter);
  padding-inline: var(--rp-gutter) !important;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.runway-pro__body {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

/* ── Topbar — brand icon inset matches findings; timer mirrors on the right */
.runway-pro__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.75rem;
  padding: 0.55rem var(--rp-inner-inset) 0.9rem var(--rp-inner-inset);
  margin-bottom: 0.15rem;
  border-bottom: 1px solid var(--rp-border);
  overflow: visible;
}

.runway-pro__brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.55rem;
  flex: 1 1 auto;
  min-width: 0;
}

.runway-pro__brand-icon {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 9px;
  background: rgba(53, 199, 89, 0.14);
  border: 1px solid rgba(110, 231, 160, 0.28);
}

.runway-pro__brand-icon svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: #6ee7a0;
}

.runway-pro__brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.12rem;
  min-width: 0;
  text-align: left;
}

.runway-pro__brand strong {
  color: #f3f4f6;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.runway-pro__brand-meta {
  color: #6b7280;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

/* Timer — inset from right edge */
.runway-pro__timer-wrap {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 4.85rem;
  min-height: 4.85rem;
  padding: 0;
  margin: 0;
  overflow: visible;
}

.runway-pro__timer-wrap:has(> .runway-pro__timer.is-hidden) {
  visibility: hidden;
  pointer-events: none;
}

/* Timer — pro digital ring */
.runway-pro__timer {
  --timer-ring-offset: 0;
  --timer-circumference: 150.8;
  position: relative;
  flex-shrink: 0;
  width: 4.85rem;
  height: 4.85rem;
  margin: 0;
  border-radius: 999px;
  background: #1c2128;
  border: 1px solid rgba(77, 163, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    inset 0 0 12px rgba(45, 140, 255, 0.08);
  overflow: visible;
  isolation: isolate;
}

.runway-pro__timer.is-hidden {
  visibility: hidden;
}

.runway-pro__timer-ring {
  position: absolute;
  inset: 0.05rem;
  transform: rotate(-90deg);
  pointer-events: none;
}

.runway-pro__timer-track {
  fill: none;
  stroke: var(--rp-timer-track);
  stroke-width: 2.5;
}

.runway-pro__timer-fill {
  fill: none;
  stroke: var(--rp-timer);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: var(--timer-circumference);
  stroke-dashoffset: var(--timer-ring-offset, 0);
  transition: stroke-dashoffset 0.25s linear, stroke 0.3s ease;
}

.runway-pro__timer-core {
  position: absolute;
  inset: 0.44rem;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  box-sizing: border-box;
  padding-inline: 0.1rem;
  text-align: center;
  pointer-events: none;
}

.runway-pro__timer-label {
  display: block;
  width: 100%;
  font-size: 0.33rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #7eb8ff;
  line-height: 1;
  white-space: nowrap;
}

.runway-pro__timer-value {
  display: block;
  width: 100%;
  max-width: 100%;
  font-family: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1;
  color: #f8fafc;
  white-space: nowrap;
}

.runway-pro__timer.is-warning { --rp-timer: #6eb6ff; }
.runway-pro__timer.is-urgent {
  --rp-timer: #fb923c;
  border-color: rgba(251, 146, 60, 0.42);
  box-shadow:
    0 0 0 1px rgba(251, 146, 60, 0.08) inset,
    inset 0 0 18px rgba(251, 146, 60, 0.1),
    0 4px 14px rgba(251, 146, 60, 0.16);
}
.runway-pro__timer.is-critical {
  --rp-timer: #f87171;
  border-color: rgba(239, 68, 68, 0.52);
  box-shadow:
    0 0 0 1px rgba(239, 68, 68, 0.1) inset,
    inset 0 0 20px rgba(239, 68, 68, 0.28),
    inset 0 0 6px rgba(254, 202, 202, 0.2);
  animation: rp-timer-pulse 0.9s ease-in-out infinite;
}
.runway-pro__timer.is-expired { --rp-timer: #4ade80; }
.runway-pro__timer.is-step-failed { --rp-timer: #ef4444; }
.runway-pro__timer.is-step-failed .runway-pro__timer-fill { stroke: #ef4444; }
.runway-pro__timer.is-step-failed .runway-pro__timer-value { color: #fecaca; }

@keyframes rp-timer-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(239, 68, 68, 0.1) inset,
      inset 0 0 16px rgba(239, 68, 68, 0.22),
      inset 0 0 4px rgba(254, 202, 202, 0.16);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(239, 68, 68, 0.14) inset,
      inset 0 0 28px rgba(239, 68, 68, 0.38),
      inset 0 0 8px rgba(254, 202, 202, 0.28);
  }
}

/* ── Findings — red issue panel */
.runway-pro__findings {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.55rem;
  align-items: start;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 0.65rem;
  padding: 0.65rem var(--rp-inner-inset);
  border: 1px solid var(--rp-findings-border);
  border-radius: 12px;
  background: var(--rp-findings-bg);
  position: relative;
  overflow: hidden;
}

.runway-pro__findings::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--rp-findings-accent);
  border-radius: 12px 0 0 12px;
}

.runway-pro__findings-icon {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 9px;
  color: var(--rp-findings-icon);
  background: var(--rp-findings-icon-bg);
}

.runway-pro__findings-icon svg {
  width: 0.95rem;
  height: 0.95rem;
  fill: currentColor;
}

.runway-pro__findings-copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.runway-pro__findings-copy strong {
  color: var(--rp-findings-title);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.3;
}

.runway-pro__findings-copy p {
  margin: 0;
  color: var(--rp-findings-body);
  font-size: 0.68rem;
  line-height: 1.4;
}

.runway-pro__findings-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.12rem;
  color: var(--rp-findings-status);
  font-size: 0.62rem;
  font-weight: 600;
}

.runway-pro__findings-dot {
  flex-shrink: 0;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 999px;
  background: #22c55e;
  animation: rp-live-pulse 2s ease infinite;
}

@keyframes rp-live-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

/* ── Stage — panel shares exact outer inset */
.runway-pro__stage {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  width: 100%;
  max-width: 100%;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* Main instruction panel — keys centered & prominent */
.runway-pro__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.42rem;
  box-sizing: border-box;
  width: 100%;
  padding: 0.8rem 0.9rem 0.7rem;
  border: 1px solid var(--rp-border);
  border-radius: 12px;
  background: var(--rp-panel);
  box-shadow: var(--repair-panel-shadow, 0 1px 2px rgba(0, 0, 0, 0.28));
  text-align: center;
}

.runway-pro__panel-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 100%;
}

.runway-pro__stage-meta {
  display: block;
  width: 100%;
  color: var(--rp-muted);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

.runway-pro__context {
  margin: 0;
  color: var(--rp-accent);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Hero keys — Origin tray, centered */
.runway-pro__hero {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  width: min(100%, var(--rp-keys-tray-w));
  min-height: calc(var(--rp-kbd-size) + 1.1rem);
  padding: 0.8rem 0.95rem;
  margin: 0.12rem 0 0.02rem;
  border-radius: 12px;
  border: 1px solid var(--rp-keys-border);
  background:
    radial-gradient(circle at 50% 0%, var(--rp-keys-glow), transparent 58%),
    var(--rp-keys-bg);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 6px 20px rgba(0, 0, 0, 0.22);
}

.runway-pro__hero.is-terminal-enter-pair {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  width: min(100%, calc(var(--rp-keys-tray-w) + 2.5rem));
  min-height: calc(var(--rp-kbd-size) + 1.1rem);
  padding: 0.8rem 1.2rem;
}

.runway-pro__hero.is-terminal-enter-pair .runway-pro__join {
  flex: 0 0 auto;
}

.runway-pro__hero.is-terminal-enter-pair .runway-pro__kbd.is-long,
.runway-pro__hero.is-terminal-enter-pair .runway-pro__kbd.is-enter.is-enter-matched {
  flex: 0 0 calc(var(--rp-kbd-size) * 1.68);
  width: calc(var(--rp-kbd-size) * 1.68);
  min-width: calc(var(--rp-kbd-size) * 1.68);
  max-width: calc(var(--rp-kbd-size) * 1.68);
  height: var(--rp-kbd-size);
  min-height: var(--rp-kbd-size);
  padding-inline: 0.5rem;
}

.runway-pro__hero.is-terminal-enter-pair .runway-pro__kbd.is-long {
  font-size: calc(var(--rp-kbd-font) * 0.82);
}

.runway-pro__hero.is-terminal-enter-pair .runway-pro__kbd.is-enter.is-enter-matched {
  font-size: calc(var(--rp-kbd-font) * 0.92);
}

.runway-pro__hero.is-terminal-enter-pair .runway-pro__kbd.is-enter.is-enter-matched::after {
  margin-left: 0.3rem;
  font-size: 1.1rem;
}

.runway-pro__hero.is-key-chord {
  flex-wrap: nowrap;
  width: min(100%, 18.75rem);
  gap: 0.32rem;
  padding: 0.75rem 0.7rem;
}

.runway-pro__hero.is-key-chord .runway-pro__kbd,
.runway-pro__hero.is-key-chord .runway-pro__kbd.is-wide,
.runway-pro__hero.is-key-chord .runway-pro__kbd.is-long {
  flex: 0 0 calc(var(--rp-kbd-size) * 1.06);
  width: calc(var(--rp-kbd-size) * 1.06);
  min-width: calc(var(--rp-kbd-size) * 1.06);
  max-width: calc(var(--rp-kbd-size) * 1.06);
  height: var(--rp-kbd-size);
  padding-inline: 0.28rem;
  font-size: calc(var(--rp-kbd-font) * 0.82);
  flex-shrink: 0;
}

.runway-pro__hero.is-key-chord .runway-pro__join {
  flex-shrink: 0;
  font-size: 0.8rem;
}

.runway-pro__hero.is-modifier-pair {
  display: flex !important;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  width: min(100%, calc(var(--rp-keys-tray-w) + 1.25rem));
  min-height: calc(var(--rp-kbd-size) + 1.1rem);
  padding: 0.75rem 1rem;
}

.runway-pro__hero.is-modifier-pair .runway-pro__join {
  flex: 0 0 auto;
  font-size: 0.84rem;
  line-height: 1;
}

.runway-pro__hero.is-modifier-pair .runway-pro__kbd,
.runway-pro__hero.is-modifier-pair .runway-pro__kbd.is-modifier-key,
.runway-pro__hero.is-modifier-pair .runway-pro__kbd.is-wide,
.runway-pro__hero.is-modifier-pair .runway-pro__kbd.is-long {
  flex: 0 0 calc(var(--rp-kbd-size) * 1.36);
  width: calc(var(--rp-kbd-size) * 1.36);
  min-width: calc(var(--rp-kbd-size) * 1.36);
  max-width: calc(var(--rp-kbd-size) * 1.36);
  height: var(--rp-kbd-size);
  padding-inline: 0.18rem;
  font-size: calc(var(--rp-kbd-font) * 0.72);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.runway-pro__step-timer {
  display: none !important;
}

.runway-pro__kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: var(--rp-kbd-size);
  height: var(--rp-kbd-size);
  min-width: var(--rp-kbd-size);
  border-radius: 10px;
  border: 1px solid var(--rp-kbd-border);
  border-bottom-width: 2px;
  border-bottom-color: #252d38;
  background: var(--rp-kbd-bg);
  color: var(--rp-kbd-text);
  font-family: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
  font-size: var(--rp-kbd-font);
  font-weight: 600;
  line-height: 1;
  box-shadow: var(--rp-kbd-shadow);
}

.runway-pro__kbd.is-wide {
  width: auto;
  min-width: calc(var(--rp-kbd-size) * 1.15);
  padding-inline: 0.6rem;
  font-size: calc(var(--rp-kbd-font) * 0.9);
}

.runway-pro__kbd.is-long {
  width: auto;
  min-width: calc(var(--rp-kbd-size) * 1.4);
  padding-inline: 0.65rem;
  font-size: calc(var(--rp-kbd-font) * 0.82);
}

.runway-pro__kbd.is-enter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: calc(var(--rp-kbd-size) * 1.9);
  padding-inline: 0.9rem;
  font-size: calc(var(--rp-kbd-font) * 0.92);
}

.runway-pro__kbd.is-enter::after {
  content: "↵";
  margin-left: 0.3rem;
  font-size: 1.1rem;
  line-height: 1;
  opacity: 0.9;
}

.runway-pro__kbd.is-enter.is-enter-matched {
  width: 100%;
  min-width: 0;
  max-width: none;
  padding-inline: 0.5rem;
  font-size: calc(var(--rp-kbd-font) * 0.82);
}

.runway-pro__kbd.is-enter.is-enter-matched::after {
  margin-left: 0.2rem;
  font-size: 0.95rem;
}

.runway-pro__kbd-icon {
  width: calc(var(--rp-kbd-size) * 0.38);
  height: calc(var(--rp-kbd-size) * 0.38);
  fill: var(--rp-kbd-text);
}

.runway-pro__join {
  color: var(--rp-accent);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.runway-pro__headline {
  margin: 0;
  max-width: 22rem;
  color: #f3f4f6;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.35;
}

/* Progress rail — equal columns, even connectors */
.runway-pro__rail {
  display: flex;
  align-items: flex-start;
  width: 100%;
  margin: 0.35rem 0 0;
  padding-top: 0.1rem;
  position: relative;
}

.runway-pro__rail::before {
  content: none;
}

.runway-pro__rail-item {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.22rem;
  padding: 0 0.1rem 0.28rem;
  position: relative;
  z-index: 1;
  opacity: 0.42;
  transition: opacity 0.2s ease;
}

.runway-pro__rail-item:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 0.7rem;
  left: calc(50% + 0.75rem);
  right: calc(-50% + 0.75rem);
  height: 2px;
  background: #2d333b;
  pointer-events: none;
  z-index: 0;
}

.runway-pro__rail-item.is-done:not(:last-child)::after {
  background: rgba(53, 199, 89, 0.32);
}

.runway-pro__rail-item.is-active { opacity: 1; }
.runway-pro__rail-item.is-done { opacity: 0.7; }

.runway-pro__rail-num {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 999px;
  border: 1px solid #3d4450;
  background: #1c2128;
  color: #6b7280;
  font-size: 0.58rem;
  font-weight: 700;
}

.runway-pro__rail-item.is-active .runway-pro__rail-num {
  border-color: rgba(77, 163, 255, 0.65);
  background: rgba(30, 58, 95, 0.65);
  color: #dbeafe;
  box-shadow: 0 0 12px rgba(77, 163, 255, 0.3);
}

.runway-pro__rail-item.is-done .runway-pro__rail-num {
  border-color: rgba(53, 199, 89, 0.45);
  background: rgba(22, 101, 52, 0.35);
  color: #bbf7d0;
  font-size: 0;
}

.runway-pro__rail-item.is-done .runway-pro__rail-num::after {
  content: "✓";
  font-size: 0.6rem;
}

.runway-pro__rail-label {
  color: #6b7280;
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.runway-pro__rail-item.is-active .runway-pro__rail-label { color: #93c5fd; }
.runway-pro__rail-item.is-done .runway-pro__rail-label { color: #6ee7a0; }

.runway-pro__rail-keys {
  color: #6b7280;
  font-size: 0.5rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.runway-pro__rail-item.is-active .runway-pro__rail-keys {
  color: #e5e7eb;
  font-weight: 700;
}

/* Hints */
.runway-pro__hint {
  margin: 0;
  width: 100%;
  max-width: 22rem;
  color: var(--rp-muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.runway-pro__hint:not(.is-hidden) { display: block; }
.runway-pro__hint.is-hidden { display: none; }

.runway-pro__hint.is-notice,
.runway-pro__hint.is-error {
  color: #fecaca;
  font-weight: 600;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.14), rgba(239, 68, 68, 0.06));
  text-align: center;
}

/* Footer */
.runway-pro__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  padding: 0.6rem 0 0.05rem;
  border-top: 1px solid var(--rp-border);
  color: #6b7280;
  font-size: 0.62rem;
  line-height: 1.45;
}

.device-repair-card.is-command-runway .device-repair-actions--wizard {
  display: none !important;
}

.device-repair-card.is-command-runway .device-repair-verify-zone {
  margin-top: 0.2rem;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.device-repair-card.is-command-runway .device-repair-confirm-hint {
  color: #fecaca;
  background: linear-gradient(180deg, rgba(239, 68, 68, 0.14), rgba(239, 68, 68, 0.06));
  border: 1px solid rgba(248, 113, 113, 0.45);
}

.device-repair-card.is-command-runway .device-repair-confirm-hint.is-hidden {
  display: none;
}

.device-repair-card.is-command-runway .runway-panel,
.device-repair-card.is-command-runway .runway-alert,
.device-repair-card.is-command-runway .runway-focus,
.device-repair-card.is-command-runway .runway-foot,
.device-repair-card.is-command-runway .runway-launch-counter:not(.runway-pro__timer) {
  display: none !important;
}

/* Confirm dialog — Origin panel style */
.runway-pro-confirm {
  width: min(24rem, calc(100vw - 1.5rem)) !important;
  border: 1px solid #30363d !important;
  border-radius: 12px !important;
  padding: 0 !important;
  color: #e5e7eb !important;
  background: #1c2128 !important;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5) !important;
}

.runway-pro-confirm::backdrop {
  background: rgba(0, 0, 0, 0.72) !important;
}

.runway-pro-confirm__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #2d333b;
  background: linear-gradient(180deg, #1f2630, #1c2128);
}

.runway-pro-confirm__icon {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.28);
}

.runway-pro-confirm__icon svg {
  width: 0.88rem;
  height: 0.88rem;
  fill: #fbbf24;
}

.runway-pro-confirm__head strong {
  color: #f3f4f6;
  font-size: 0.86rem;
  font-weight: 700;
}

.runway-pro-confirm p {
  margin: 0 !important;
  padding: 0.95rem 1rem !important;
  color: #cbd5e1 !important;
  font-size: 0.8rem !important;
  line-height: 1.5 !important;
}

.runway-pro-confirm__actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem !important;
  padding: 0 1rem 1rem !important;
}

.runway-pro-confirm__yes,
.runway-pro-confirm__no {
  min-height: 2.6rem;
  border-radius: 10px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.runway-pro-confirm__yes {
  border: 1px solid rgba(77, 163, 255, 0.45);
  color: #ffffff;
  background: linear-gradient(180deg, var(--primary, #4da3ff), var(--primary-strong, #2d8cff));
  box-shadow:
    0 16px 34px rgba(45, 140, 255, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.runway-pro-confirm__yes:focus-visible {
  outline: 2px solid rgba(125, 185, 255, 0.95);
  outline-offset: 2px;
}

.runway-pro-confirm__no {
  border: 1px solid #3d4450;
  color: #d1d5db;
  background: #161b22;
}

.runway-pro-confirm__yes:hover {
  background: var(--primary-strong, #2d8cff);
  transform: translateY(-1px);
}
.runway-pro-confirm__no:hover {
  border-color: #4b5563;
  color: #f3f4f6;
}

@media (max-width: 520px) {
  .device-repair-card.is-command-runway {
    --rp-kbd-size: 2.95rem;
    --rp-kbd-font: 0.76rem;
    --rp-keys-tray-w: 100%;
  }

  .runway-pro__rail-keys { display: none; }

  .runway-pro__topbar {
    padding-inline: var(--rp-inner-inset);
  }

  .runway-pro__timer-wrap {
    width: 4.2rem;
    min-height: 4.2rem;
  }

  .runway-pro__timer {
    width: 4.2rem;
    height: 4.2rem;
  }

  .runway-pro__timer-core {
    inset: 0.38rem;
    padding-inline: 0.08rem;
  }

  .runway-pro__timer-value {
    font-size: 0.62rem;
  }

  .runway-pro__brand strong {
    font-size: 0.82rem;
  }

  .runway-pro__hero.is-key-chord {
    width: 100%;
    gap: 0.22rem;
    padding: 0.65rem 0.5rem;
  }

  .runway-pro__hero.is-key-chord .runway-pro__kbd,
  .runway-pro__hero.is-key-chord .runway-pro__kbd.is-wide,
  .runway-pro__hero.is-key-chord .runway-pro__kbd.is-long {
    flex: 0 0 calc(var(--rp-kbd-size) * 0.98);
    width: calc(var(--rp-kbd-size) * 0.98);
    min-width: calc(var(--rp-kbd-size) * 0.98);
    max-width: calc(var(--rp-kbd-size) * 0.98);
    padding-inline: 0.22rem;
    font-size: calc(var(--rp-kbd-font) * 0.76);
  }

  .runway-pro__hero.is-modifier-pair {
    width: 100%;
    gap: 0.3rem;
    padding: 0.65rem 0.5rem;
  }

  .runway-pro__hero.is-modifier-pair .runway-pro__kbd,
  .runway-pro__hero.is-modifier-pair .runway-pro__kbd.is-modifier-key,
  .runway-pro__hero.is-modifier-pair .runway-pro__kbd.is-wide,
  .runway-pro__hero.is-modifier-pair .runway-pro__kbd.is-long {
    flex: 0 0 calc(var(--rp-kbd-size) * 1.18);
    width: calc(var(--rp-kbd-size) * 1.18);
    min-width: calc(var(--rp-kbd-size) * 1.18);
    max-width: calc(var(--rp-kbd-size) * 1.18);
    font-size: calc(var(--rp-kbd-font) * 0.64);
    padding-inline: 0.12rem;
  }
}

@media (max-height: 720px) {
  .device-repair-card.is-command-runway {
    --rp-gutter-top: 1rem;
    --rp-kbd-size: 3rem;
  }

  .runway-pro__hero {
    min-height: auto;
    padding: 0.65rem 0.7rem;
  }
}

/* Lock symmetric inset — overrides styles.css v3 block */
.device-repair-card.is-command-runway {
  width: min(100%, 40rem) !important;
  max-width: 40rem !important;
  scrollbar-gutter: auto !important;
  overflow: visible !important;
}

.device-repair-card.is-command-runway .device-repair-workspace {
  padding: 0 !important;
  gap: 0 !important;
}

.device-repair-card.is-command-runway .runway-card.runway-pro {
  padding: 0 !important;
  gap: 0 !important;
  width: 100% !important;
}

.runway-pro__findings,
.runway-pro__stage,
.runway-pro__panel,
.runway-pro__foot {
  width: 100%;
  max-width: 100%;
  margin-inline: 0;
  box-sizing: border-box;
}
