*, *::before, *::after { box-sizing: border-box; }

:root {
  --header-height: 4rem;
  --client-header-h: var(--header-height);
  --deck-width: clamp(980px, 72vw, 1320px);
  --deck-compact-height: 520px;
  --deck-min-height: var(--deck-compact-height);
  --deck-max-height: var(--deck-compact-height);
  --deck-review-height: calc(100vh - var(--client-header-h) - var(--deck-bottom) - 1rem);
  --deck-bottom: 34px;
  --deck-gap: 0px;
  --scene-safe-bottom: calc(var(--deck-bottom) + var(--deck-compact-height));
  /* Shared step-deck content spacing */
  --deck-content-padding-x: 1.25rem;
  --deck-content-padding-y: 0.85rem;
  --deck-section-gap: 0.85rem;
  --deck-control-gap: 0.5rem;
  --deck-column-gap: 1rem;
  --deck-row-gap: 0.65rem;
  --rail-width: 0px;
  --rail-half: 0px;
  --room-focus-x: 50%;
  /* Control rail */
  --rail-bg: rgba(28, 18, 12, 0.94);
  --rail-surface: rgba(8, 6, 4, 0.88);
  --rail-border: rgba(205, 158, 74, 0.28);
  --rail-text: #faf4ea;
  --rail-label: #f0e6d4;
  --rail-muted: rgba(220, 208, 188, 0.78);
  /* Accents */
  --dojo-gold: #cd9e4a;
  --dojo-gold-bright: #e0b868;
  --dojo-gold-line: rgba(205, 158, 74, 0.32);
  --dojo-cream: #f5ede0;
  --font-serif: 'Cinzel', Georgia, serif;
  --font-jp: 'Noto Serif JP', serif;
  --font-sans: system-ui, -apple-system, 'Segoe UI', sans-serif;
  /* Legacy aliases for advisor panel */
  --dojo-bg: #2a1c12;
  --dojo-muted: var(--rail-muted);
  --dojo-gold-dim: rgba(184, 152, 88, 0.55);
  /* Room light catching panel edges — subtle; must not compete with text */
  --room-rim-strong: rgba(255, 200, 120, 0.32);
  --room-rim-mid: rgba(255, 185, 105, 0.18);
  --room-rim-soft: rgba(255, 175, 95, 0.07);
  --room-rim-glow: rgba(255, 180, 90, 0.06);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--rail-text);
  background: #1a120c;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ═══ DOJO CLIENT PAGE ═══ */

/* Client page — room-background.webp is the stage */
.client-dojo-page,
.dojo-page {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: url("./room-background.webp");
  background-size: cover;
  background-position: var(--room-focus-x) 50%;
  background-repeat: no-repeat;
}

/* Compositional overlays — readability + vignette + center spotlight on pedestal */
.client-dojo-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at var(--room-focus-x) 62%, rgba(255, 190, 95, 0.14), transparent 34%),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.48) 0%,
      rgba(0, 0, 0, 0.22) 22%,
      transparent 48%,
      rgba(0, 0, 0, 0.14) 100%
    ),
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.28) 0%,
      transparent 22%,
      rgba(0, 0, 0, 0.22) 100%
    );
}

/* Premium header — separated from room; warm rim where display light catches the lip */
.dojo-header {
  flex-shrink: 0;
  position: relative;
  z-index: 20;
  height: var(--client-header-h);
  isolation: isolate;
  border-bottom: 1px solid rgba(205, 158, 74, 0.12);
  background: linear-gradient(180deg, rgba(8, 5, 3, 0.97) 0%, rgba(8, 5, 3, 0.93) 100%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.38),
    inset 0 -1px 0 var(--room-rim-mid),
    inset 0 -6px 16px var(--room-rim-soft);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Warm highlight along bottom edge — stronger over the display room */
.dojo-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(255, 190, 95, 0.04) 0%,
    rgba(255, 190, 95, 0.04) calc(var(--rail-width) - 2px),
    var(--room-rim-mid) var(--rail-width),
    var(--room-rim-strong) calc(var(--rail-width) + 16%),
    rgba(255, 200, 125, 0.22) 100%
  );
}

/* Soft downward spill — room light grazing the header underside above the scene */
.dojo-header::before {
  content: "";
  position: absolute;
  left: var(--rail-width);
  right: 0;
  bottom: -8px;
  height: 8px;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
    180deg,
    var(--room-rim-glow) 0%,
    transparent 100%
  );
}

.dojo-header-inner {
  height: 100%;
  padding: 0 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  max-width: none;
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: inherit;
}

.brand-crest {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(205, 158, 74, 0.5);
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.brand-crest-char {
  font-family: var(--font-jp);
  font-size: 1rem;
  color: var(--dojo-gold-bright);
}

.brand-title {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #faf4ea;
  font-weight: 500;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.brand-sub {
  display: block;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(240, 230, 214, 0.78);
  margin-top: 0.12rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.sales-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  font-family: var(--font-serif);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 230, 214, 0.82);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.sales-nav-item {
  padding-bottom: 0.15rem;
  border-bottom: 1px solid transparent;
}

.sales-nav-active {
  color: #e8c070;
  border-bottom-color: rgba(205, 158, 74, 0.45);
}

/* Room layout: scene + step deck (absolute within main) */
.dojo-room {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.dojo-room-layout,
.deck-layout {
  position: relative;
  width: 100%;
  flex: 1;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

@media (max-width: 820px) {
  .dojo-room-layout {
    display: flex;
    flex-direction: column;
    min-height: auto;
  }
  .dojo-scene,
  .armor-scene-layer {
    position: fixed;
    top: var(--client-header-h);
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 0;
  }
  .control-rail,
  .workshop-rail {
    position: relative;
    width: 100%;
    max-height: none;
  }

  .control-rail::after,
  .workshop-rail::after {
    top: 0;
    right: 0;
    left: 0;
    bottom: auto;
    width: auto;
    height: 1px;
    background: linear-gradient(
      90deg,
      rgba(255, 190, 95, 0.04) 0%,
      var(--room-rim-mid) 45%,
      rgba(255, 200, 125, 0.2) 100%
    );
  }

  .control-rail::before,
  .workshop-rail::before {
    top: -6px;
    height: 6px;
  }

  .dojo-header::before {
    left: 0;
  }

  .dojo-header::after {
    background: linear-gradient(
      90deg,
      rgba(255, 190, 95, 0.04) 0%,
      var(--room-rim-mid) 45%,
      rgba(255, 200, 125, 0.2) 100%
    );
  }
}

/* Control rail — smoked ink glass; room light on the display-facing edge */
.control-rail,
.workshop-rail {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 10;
  width: var(--rail-width);
  min-height: calc(100vh - var(--client-header-h));
  padding: 1.35rem 1.15rem 1.75rem;
  overflow-y: auto;
  overflow-x: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(16, 10, 7, 0.97), rgba(8, 5, 3, 0.96)),
    rgba(8, 5, 3, 0.94);
  border-right: 1px solid rgba(205, 158, 74, 0.1);
  box-shadow:
    16px 0 36px rgba(0, 0, 0, 0.45),
    2px 0 10px var(--room-rim-glow),
    inset -1px 0 0 rgba(255, 255, 255, 0.02),
    inset -4px 0 18px var(--room-rim-soft);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  scrollbar-width: thin;
  scrollbar-color: rgba(205, 158, 74, 0.35) transparent;
}

/* Vertical rim — warm light from the display room catching the rail edge */
.control-rail::after,
.workshop-rail::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 2px;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(255, 200, 120, 0.06) 0%,
    var(--room-rim-mid) 28%,
    var(--room-rim-strong) 52%,
    var(--room-rim-mid) 78%,
    rgba(255, 170, 90, 0.12) 100%
  );
}

/* Horizontal spill from room onto the rail's right lip */
.control-rail::before,
.workshop-rail::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 12px;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 195, 110, 0.02) 70%,
    var(--room-rim-glow) 100%
  );
}

.workshop-rail::-webkit-scrollbar {
  width: 5px;
}

.workshop-rail::-webkit-scrollbar-thumb {
  background: rgba(184, 152, 88, 0.22);
  border-radius: 3px;
}

.workshop-rail::-webkit-scrollbar-track {
  background: transparent;
}

.ink-panel fieldset,
.control-rail fieldset,
.workshop-rail fieldset {
  border: none;
  margin: 0;
  padding: 0;
  min-inline-size: 0;
}

.control-rail legend,
.workshop-rail legend {
  padding: 0;
  margin: 0;
}

.control-group {
  margin-bottom: 1.65rem;
  padding-bottom: 0.25rem;
  border: none;
}

.control-group:last-of-type {
  margin-bottom: 0;
}

.control-group-label {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #dcc088;
  padding-bottom: 0.5rem;
  margin-bottom: 0.95rem;
  border-bottom: 1px solid rgba(205, 158, 74, 0.14);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.control-group-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.product-unavailable-message {
  margin: 0.25rem 0 0;
  padding: 0.75rem 0.85rem;
  border-radius: 6px;
  background: rgba(120, 28, 28, 0.35);
  border: 1px solid rgba(220, 120, 120, 0.25);
  color: #f3d6d6;
  font-size: 0.82rem;
  line-height: 1.45;
}

.product-unavailable-message.hidden {
  display: none;
}

.preview-scope-note {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(245, 230, 200, 0.72);
}

.preview-scope-note.hidden {
  display: none;
}

.dynamic-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.poc-order-details,
.order-details {
  margin-top: 1rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(205, 158, 74, 0.12);
}

.poc-order-summary,
.order-summary {
  cursor: pointer;
  list-style: none;
  margin-bottom: 0.75rem;
}

.poc-order-summary::-webkit-details-marker,
.order-summary::-webkit-details-marker {
  display: none;
}

.poc-order-details[open] .poc-order-summary,
.order-details[open] .order-summary {
  margin-bottom: 0.95rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.field > span:first-child {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--rail-label);
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.field input,
.field select {
  width: 100%;
  min-height: 2.45rem;
  padding: 0.68rem 0.75rem;
  border: none;
  border-radius: 3px;
  font-size: 0.9rem;
  background: rgba(0, 0, 0, 0.38);
  color: var(--rail-text);
  box-shadow: inset 0 0 0 1px rgba(60, 42, 26, 0.65);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  background: rgba(0, 0, 0, 0.48);
  box-shadow:
    inset 0 0 0 1px rgba(205, 158, 74, 0.35),
    0 0 0 1px rgba(205, 158, 74, 0.12);
}

.field input[readonly] {
  color: var(--rail-muted);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: inset 0 0 0 1px rgba(50, 35, 22, 0.45);
}

.field-control {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.field-inline-swatch {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(184, 152, 88, 0.45);
  background: #444;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.field-swatch-row select { flex: 1; }

.field select {
  cursor: pointer;
  appearance: none;
  background-color: rgba(0, 0, 0, 0.38);
  background-image: linear-gradient(45deg, transparent 50%, rgba(200, 160, 90, 0.65) 50%),
    linear-gradient(135deg, rgba(200, 160, 90, 0.65) 50%, transparent 50%);
  background-position: calc(100% - 12px) calc(50% + 2px), calc(100% - 8px) calc(50% + 2px);
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  padding-right: 1.5rem;
}

.qty-stepper {
  display: inline-flex;
  border: none;
  border-radius: 3px;
  max-width: 8rem;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(60, 42, 26, 0.65);
}

.qty-stepper input {
  width: 2.5rem;
  text-align: center;
  border: none;
  border-left: 1px solid rgba(60, 42, 26, 0.5);
  border-right: 1px solid rgba(60, 42, 26, 0.5);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.38);
  color: var(--rail-text);
  box-shadow: none;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.qty-btn {
  width: 2rem;
  border: none;
  background: rgba(0, 0, 0, 0.25);
  color: var(--dojo-gold-bright);
  cursor: pointer;
  font-size: 1rem;
}
.qty-btn:hover { background: rgba(184, 152, 88, 0.15); }

/* Armor scene — opening: full zoom-out, canvas behind wizard; zoom-in raises above cards */
.dojo-scene,
.armor-scene-layer {
  position: fixed;
  top: var(--client-header-h);
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 35;
  overflow: hidden;
  background: transparent;
  transition: bottom 0.3s ease;
}

body.armor-zoom-overlap .dojo-scene,
body.armor-zoom-overlap .armor-scene-layer {
  z-index: 45;
}

body.deck-stage-layout-sync .dojo-scene,
body.deck-stage-layout-sync .armor-scene-layer {
  transition: none;
}

.armor-scene-mount {
  position: absolute;
  inset: 0;
  z-index: 2;
}

.armor-scene-mount:has(.armor-3d-canvas) .preview-placeholder {
  display: none;
}

.armor-3d-canvas-host {
  width: 100%;
  height: 100%;
  background: transparent;
}

.armor-3d-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
  background: transparent !important;
}
.armor-3d-canvas:active { cursor: grabbing; }

/* Hanging model controls banner — right of armor */
.model-controls-banner {
  position: fixed;
  top: calc(var(--client-header-h) + 18%);
  right: clamp(1.25rem, 4vw, 3.5rem);
  z-index: 50;
  width: 7.25rem;
  pointer-events: none;
}

.model-controls-banner-hidden {
  visibility: hidden;
  pointer-events: none;
}

.model-controls-banner__hanger {
  position: relative;
  height: 2.1rem;
  margin-bottom: -0.15rem;
  pointer-events: none;
}

.model-controls-banner__beam {
  position: absolute;
  top: 0;
  left: -1.2rem;
  right: -1.2rem;
  height: 0.35rem;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(90, 62, 38, 0.95), rgba(42, 28, 18, 0.98));
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.model-controls-banner__cord {
  position: absolute;
  top: 0.35rem;
  width: 2px;
  height: 1.75rem;
  background: linear-gradient(180deg, rgba(180, 140, 80, 0.55), rgba(120, 88, 48, 0.85));
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.25);
}

.model-controls-banner__cord--left {
  left: 1.1rem;
  transform: rotate(-4deg);
}

.model-controls-banner__cord--right {
  right: 1.1rem;
  transform: rotate(4deg);
}

.model-controls-banner__body {
  pointer-events: auto;
  padding: 0.65rem 0.55rem 0.75rem;
  border-radius: 0 0 10px 10px;
  background:
    linear-gradient(180deg, rgba(28, 18, 12, 0.96), rgba(12, 8, 5, 0.94)),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.02) 0,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 1px,
      transparent 4px
    );
  border: 1px solid rgba(206, 160, 78, 0.38);
  border-top: none;
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.48),
    inset 0 1px 0 rgba(255, 220, 160, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.model-controls-banner__title {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(206, 160, 78, 0.72);
}

.model-controls-banner__actions {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.armor-component-inspector {
  margin-bottom: 0.5rem;
  padding: 0.45rem 0.4rem 0.5rem;
  border-radius: 6px;
  background: rgba(206, 160, 78, 0.08);
  border: 1px solid rgba(206, 160, 78, 0.28);
}

.armor-component-inspector--hidden {
  display: none;
}

.armor-component-inspector__label {
  margin: 0 0 0.2rem;
  font-size: 0.48rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: rgba(206, 160, 78, 0.65);
}

.armor-component-inspector__name {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  line-height: 1.25;
  text-align: center;
  color: rgba(245, 237, 224, 0.92);
}

.armor-component-inspector__hint {
  margin: 0;
  font-size: 0.48rem;
  line-height: 1.35;
  text-align: center;
  color: rgba(200, 190, 175, 0.55);
}

.banner-control-btn {
  width: 100%;
  padding: 0.38rem 0.45rem;
  border-radius: 6px;
  border: 1px solid rgba(206, 160, 78, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 237, 224, 0.82);
  font-family: var(--font-serif);
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.banner-control-btn:hover:not(:disabled) {
  border-color: rgba(206, 160, 78, 0.45);
  color: var(--dojo-gold-bright);
  box-shadow: 0 0 12px rgba(205, 158, 74, 0.18);
}

.banner-control-btn-accent {
  border-color: rgba(206, 160, 78, 0.42);
  background: rgba(205, 158, 74, 0.12);
  color: #f0e0c0;
}

.banner-control-btn-active {
  color: var(--dojo-gold-bright);
  border-color: rgba(206, 160, 78, 0.55);
}

.view-controls-float {
  display: none !important;
}

.toolbar-btn {
  background: none;
  border: none;
  padding: 0.12rem 0.28rem;
  color: inherit;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  white-space: nowrap;
  transition: color 0.15s ease;
}
.toolbar-btn:hover,
.toolbar-btn-active { color: var(--dojo-gold); }

.toolbar-group {
  display: inline-flex;
  gap: 0.25rem;
}

.toolbar-btn-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(184, 152, 88, 0.2);
  font-size: 0.8rem;
}

.toolbar-btn-fullscreen { margin-left: auto; }

.preview-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: rgba(240, 232, 216, 0.55);
  text-align: center;
  margin: 0;
  font-size: 0.8rem;
  z-index: 1;
  pointer-events: none;
}

.client-preview-error {
  padding: 3rem 1.5rem;
  text-align: center;
  color: rgba(220, 160, 160, 0.9);
}

.preview-error-title {
  font-family: var(--font-serif);
  margin: 0 0 0.35rem;
}

/* Status / handoff — compact block */
.status-handoff,
.handoff-status {
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--rail-border);
}

.handoff-messages {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.status-line {
  margin: 0;
  padding-left: 0.65rem;
  font-size: 0.82rem;
  line-height: 1.45;
  border-left: 2px solid transparent;
}
.status-ok { color: rgba(160, 200, 165, 0.88); border-left-color: rgba(120, 160, 125, 0.4); }
.status-info { color: rgba(160, 190, 220, 0.88); border-left-color: rgba(100, 140, 180, 0.35); }
.status-warn { color: rgba(220, 200, 140, 0.88); border-left-color: rgba(180, 150, 80, 0.35); }
.status-error { color: rgba(220, 160, 160, 0.9); border-left-color: rgba(180, 90, 90, 0.4); }

.panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.panel-footnote {
  margin: 0.5rem 0 0;
  font-size: 0.62rem;
  color: var(--dojo-muted);
  line-height: 1.45;
  font-style: italic;
  opacity: 0.85;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.72rem 0.95rem;
  border: none;
  border-radius: 2px;
  font-family: var(--font-serif);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease, opacity 0.2s ease;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-primary-action {
  background: linear-gradient(180deg, #a08048 0%, var(--dojo-gold) 50%, #8a7040 100%);
  color: #140e08;
}
.btn-primary-action:hover:not(:disabled) {
  background: linear-gradient(180deg, #b09058 0%, #c4a060 100%);
}

.btn-secondary-action {
  background: transparent;
  color: var(--dojo-muted);
  border: 1px solid rgba(184, 152, 88, 0.2);
}
.btn-secondary-action:hover:not(:disabled) {
  color: var(--dojo-gold);
  border-color: var(--dojo-gold-dim);
}

.btn-chevron {
  font-size: 1rem;
  margin-left: 0.1rem;
}

.dojo-footer {
  display: none;
}

@media (max-width: 720px) {
  .dojo-header-inner { padding: 0.65rem 1rem; }
}

/* ═══════════════════════════════════════
   PRODUCTION SHEET VIEW
   ═══════════════════════════════════════ */

.view-production {
  background: #eceae4;
  color: #1a1a1a;
  min-height: 100vh;
}

.app-header {
  background: #2c1810;
  color: #f5f0e8;
  padding: 0.85rem 1.5rem 1rem;
}
.app-header h1 { margin: 0 0 0.2rem; font-size: 1.3rem; }

.production-header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.production-header-row h1 { margin: 0; }
.production-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.workflow-strip { margin: 0.65rem 0 0.5rem; }
.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.78rem;
}
.workflow-step {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
}
.workflow-step-active {
  background: rgba(139, 35, 35, 0.55);
  border-color: rgba(255,255,255,0.25);
  font-weight: 600;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
  font-size: 0.7rem;
  font-weight: 700;
}
.workflow-arrow { opacity: 0.55; font-size: 0.85rem; list-style: none; }

.btn-primary { background: #8b2323; color: #fff; }
.btn-primary:hover:not(:disabled) { background: #6b1a1a; }
.btn-secondary { background: #444; color: #fff; }
.btn-secondary:hover:not(:disabled) { background: #222; }

.production-body {
  max-width: 1320px;
  margin: 0 auto 1.25rem;
  padding: 0 1.5rem 1rem;
}

.factory-sheet {
  background: #fff;
  border-radius: 8px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.sev-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.4rem;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 0.35rem;
}
.sev-error { background: #b00020; color: #fff; }
.sev-warning { background: #e65100; color: #fff; }
.sev-info { background: #1565c0; color: #fff; }
.sev-ok { background: #2e7d32; color: #fff; }

.sheet-header h2 { margin: 0 0 0.35rem; }
.sheet-disclaimer {
  margin: 0 0 1rem;
  padding: 0.55rem 0.65rem;
  background: #fff8e1;
  border: 1px solid #ffc107;
  border-left: 4px solid #ffc107;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #5d4e00;
}

.sheet-source-data,
.sheet-field-source {
  margin-bottom: 1rem;
  padding: 0.65rem 0.75rem;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #e9ecef;
}
.sheet-source-data h3,
.sheet-field-source h3 { margin: 0 0 0.5rem; font-size: 0.95rem; }

.sheet-field-source ul {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.84rem;
  color: #444;
}
.sheet-field-source li { margin-bottom: 0.2rem; }
.sheet-field-source code {
  font-size: 0.8rem;
  background: #eee;
  padding: 0.05rem 0.25rem;
  border-radius: 3px;
}

.sheet-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1rem;
  font-size: 0.88rem;
}
.sheet-dl dt { font-weight: 600; color: #555; }
.sheet-dl dd { margin: 0; }

.sheet-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
  margin-top: 0.5rem;
}
.sheet-table th, .sheet-table td {
  border: 1px solid #ddd;
  padding: 0.45rem 0.55rem;
  text-align: left;
  vertical-align: middle;
}
.sheet-table th {
  background: #f0f0f0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.sheet-table-zones tbody tr:nth-child(even) { background: #fafafa; }
.cell-zone-id code { font-size: 0.78rem; color: #8b2323; }
.cell-source { color: #666; font-size: 0.8rem; }
.cell-selected-value strong { font-weight: 600; color: #111; }
.cell-production-code .prod-code {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a1a;
  background: #f5f5f5;
  padding: 0.1rem 0.3rem;
  border-radius: 3px;
}

.value-swatch {
  display: inline-block;
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 2px;
  border: 1px solid rgba(0,0,0,0.2);
  margin-right: 0.35rem;
  vertical-align: middle;
}
.value-swatch-material { border-style: dashed; }

.poc-tag,
.demo-tag {
  display: inline-block;
  background: #ffc107;
  color: #333;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.12rem 0.35rem;
  border-radius: 3px;
  vertical-align: middle;
  letter-spacing: 0.03em;
}

.sheet-note.mockup-note {
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-left: 4px solid #1565c0;
  padding: 0.55rem 0.65rem;
  margin-bottom: 1rem;
  font-size: 0.88rem;
  border-radius: 4px;
}

.sheet-issues { margin: 0; padding-left: 0; list-style: none; }
.sheet-issues .issue { margin-bottom: 0.35rem; display: flex; align-items: flex-start; gap: 0.25rem; }

.sheet-svg-wrap {
  padding: 0.75rem;
  background: #faf9f7;
  border: 1px solid #ddd;
  border-radius: 6px;
  display: inline-block;
}
.sheet-svg-wrap svg { max-width: 420px; height: auto; display: block; }

.sheet-muted { color: #888; font-style: italic; }
.sheet-ok { color: #2e7d32; margin: 0; }

.sheet-advisor-assist {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px dashed #ccc;
}

.sheet-advisor-summary {
  white-space: pre-wrap;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  background: #f5f5f5;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin: 0.5rem 0;
}

.sheet-advisor-status {
  font-size: 0.85rem;
  margin: 0.35rem 0 0.75rem;
}

.sheet-advisor-issues {
  margin: 0.35rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.85rem;
}

/* ═══ Armor Design Advisor (compact, non-chatbot) ═══ */

.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;
}

.advisor-panel {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--dojo-gold-line);
}

.advisor-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.advisor-heading {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dojo-gold);
  font-weight: 500;
}

.advisor-toggle {
  border: 1px solid var(--dojo-gold-line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--dojo-gold-dim);
  font-family: var(--font-serif);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  cursor: pointer;
}

.advisor-toggle:hover {
  border-color: var(--dojo-gold-dim);
  color: var(--dojo-gold);
}

.advisor-body {
  margin-top: 0.55rem;
}

.advisor-collapsed .advisor-body {
  display: none;
}

.advisor-collapsed .advisor-toggle-label::before {
  content: '';
}

.advisor-intro {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  color: var(--dojo-muted);
  line-height: 1.35;
}

.advisor-field {
  margin-bottom: 0.45rem;
}

.advisor-prompt {
  width: 100%;
  min-height: 3.2rem;
  padding: 0.45rem 0.5rem;
  border: 1px solid rgba(184, 152, 88, 0.15);
  background: rgba(0, 0, 0, 0.45);
  color: var(--dojo-cream);
  font-family: var(--font-sans);
  font-size: 0.76rem;
  resize: vertical;
}

.advisor-prompt:focus {
  outline: none;
  border-color: var(--dojo-gold-dim);
}

.advisor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.btn-advisor,
.btn-advisor-secondary {
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--dojo-gold-line);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-advisor {
  background: rgba(92, 34, 34, 0.55);
  color: var(--dojo-cream);
  border-color: rgba(92, 34, 34, 0.6);
}

.btn-advisor:hover {
  background: var(--dojo-oxblood);
}

.btn-advisor-secondary {
  background: rgba(0, 0, 0, 0.35);
  color: var(--dojo-muted);
}

.btn-advisor-secondary:hover {
  border-color: var(--dojo-gold-dim);
  color: var(--dojo-cream);
}

.advisor-output {
  max-height: 14rem;
  overflow-y: auto;
  font-size: 0.74rem;
}

.advisor-card {
  padding: 0.55rem 0.6rem;
  margin-bottom: 0.45rem;
  border: 1px solid rgba(184, 152, 88, 0.12);
  background: rgba(0, 0, 0, 0.28);
}

.advisor-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.advisor-card-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dojo-gold-dim);
}

.advisor-confidence {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dojo-muted);
}

.advisor-confidence-high { color: rgba(160, 200, 165, 0.9); }

.advisor-summary {
  margin: 0 0 0.4rem;
  line-height: 1.4;
  color: var(--dojo-cream);
}

.advisor-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.15rem 0.65rem;
  margin: 0 0 0.4rem;
  font-size: 0.72rem;
}

.advisor-dl dt {
  color: var(--dojo-muted);
  margin: 0;
}

.advisor-dl dd {
  margin: 0;
  color: var(--dojo-cream);
}

.advisor-list {
  margin: 0.25rem 0 0.4rem;
  padding-left: 1rem;
  color: var(--dojo-muted);
}

.advisor-unsupported {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(184, 152, 88, 0.1);
}

.advisor-unsupported-title {
  margin: 0 0 0.25rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(220, 200, 140, 0.85);
}

.advisor-footnote {
  margin: 0.35rem 0 0;
  font-size: 0.65rem;
  color: var(--dojo-muted);
  font-style: italic;
}

.advisor-muted {
  margin: 0;
  color: var(--dojo-muted);
  font-size: 0.72rem;
}

.advisor-issue-list {
  margin: 0.35rem 0;
  padding-left: 1rem;
  list-style: disc;
}

.advisor-issue-error { color: rgba(220, 160, 160, 0.9); }
.advisor-issue-warn { color: rgba(220, 200, 140, 0.88); }
.advisor-issue-info { color: rgba(160, 190, 220, 0.88); }

.advisor-review-flag {
  margin: 0.35rem 0 0;
  color: rgba(220, 200, 140, 0.88);
  font-size: 0.72rem;
}

.advisor-review-ok {
  margin: 0.35rem 0 0;
  color: rgba(160, 200, 165, 0.88);
  font-size: 0.72rem;
}

.advisor-email-subject {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
}

.advisor-email-body {
  white-space: pre-wrap;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  line-height: 1.45;
  margin: 0;
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(184, 152, 88, 0.1);
  max-height: 10rem;
  overflow-y: auto;
}

.advisor-apply-note {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  color: rgba(160, 200, 165, 0.88);
}

/* ═══ STEP DECK — compact floating configurator card ═══ */

.step-deck-mount {
  position: fixed;
  left: 50%;
  bottom: var(--deck-bottom);
  transform: translateX(-50%);
  z-index: 40;
  width: calc(var(--deck-width) + 6.5rem);
  max-width: min(calc(var(--deck-width) + 6.5rem), 98vw);
  height: var(--deck-compact-height);
  min-height: var(--deck-compact-height);
  max-height: var(--deck-compact-height);
  pointer-events: none;
}

.step-deck-mount.step-deck-mount-review-expanded {
  width: min(98vw, calc(var(--deck-width) + 14rem));
  max-width: 98vw;
  height: var(--deck-review-height);
  min-height: var(--deck-review-height);
  max-height: var(--deck-review-height);
}

.step-deck-mount-hidden {
  visibility: hidden;
  pointer-events: none;
}

.step-deck-shell {
  pointer-events: auto;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: 100%;
}

.step-deck-hidden {
  visibility: hidden;
}

.step-deck-nav-arrow {
  position: relative;
  z-index: 50;
  flex-shrink: 0;
  align-self: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  border: 1px solid rgba(206, 160, 78, 0.42);
  background: rgba(8, 5, 3, 0.72);
  color: rgba(245, 237, 224, 0.88);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.step-deck-nav-arrow span {
  display: block;
  margin-top: -0.12rem;
}

.step-deck-nav-arrow:hover:not(:disabled) {
  border-color: rgba(206, 160, 78, 0.68);
  color: var(--dojo-gold-bright);
  box-shadow: 0 0 16px rgba(205, 158, 74, 0.28);
  transform: translateY(-1px);
}

.step-deck-nav-arrow:disabled {
  opacity: 0.32;
  cursor: not-allowed;
  box-shadow: none;
}

.step-deck-card {
  flex: 1 1 var(--deck-width);
  min-width: 0;
  max-width: var(--deck-width);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(20, 14, 10, 0.94), rgba(8, 6, 4, 0.92));
  border: 1px solid rgba(206, 160, 78, 0.34);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--dojo-cream);
}

.step-deck-mount-review-expanded .step-deck-card[data-step-key="review"] {
  max-width: none;
  flex: 1 1 auto;
}

.step-deck-enter {
  animation: deckCardIn 0.28s ease;
}

@keyframes deckCardIn {
  from {
    opacity: 0.65;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.step-deck-progress {
  flex-shrink: 0;
  padding: 0.65rem var(--deck-content-padding-x) 0.5rem;
  border-bottom: 1px solid rgba(206, 160, 78, 0.14);
}

.step-deck-progress-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.step-deck-progress-item {
  display: inline-flex;
  align-items: center;
}

.step-deck-progress-item:not(:last-child)::after {
  content: "·";
  margin: 0 0.35rem;
  color: rgba(220, 208, 188, 0.35);
  font-size: 0.58rem;
  pointer-events: none;
  user-select: none;
}

.step-progress-button {
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 0.22rem 0.2rem;
  margin: 0;
  color: rgba(220, 208, 188, 0.48);
  cursor: pointer;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}

.step-progress-button-label {
  pointer-events: none;
}

.step-progress-button.is-active {
  color: var(--dojo-gold-bright);
  font-weight: 500;
  cursor: default;
}

.step-progress-button.is-complete {
  color: rgba(220, 208, 188, 0.68);
}

.step-progress-button.is-complete:hover,
.step-progress-button.is-upcoming:hover {
  color: var(--dojo-gold-bright);
}

.step-progress-button.is-upcoming {
  color: rgba(220, 208, 188, 0.48);
}

.step-progress-button:focus-visible {
  outline: 1px solid rgba(206, 160, 78, 0.55);
  outline-offset: 2px;
}

.step-progress-button.is-disabled,
.step-progress-button[aria-disabled="true"] {
  cursor: default;
}

/* Legacy step-pill aliases — book wizard only */
.step-pill {
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(220, 208, 188, 0.38);
  white-space: nowrap;
}

.step-pill:not(:last-child)::after {
  content: "·";
  margin-left: 0.35rem;
  opacity: 0.35;
}

.step-pill-active {
  color: var(--dojo-gold-bright);
  font-weight: 500;
}

.step-pill-done {
  color: rgba(220, 208, 188, 0.62);
}

.step-card-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: var(--deck-content-padding-y) var(--deck-content-padding-x);
}

.step-card-header {
  flex-shrink: 0;
  margin-bottom: var(--deck-row-gap);
}

.step-card-heading {
  margin: 0;
}

.step-card-heading .step-card-title {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.step-card-instruction {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(220, 208, 188, 0.72);
}

.step-card-content {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  overflow-y: auto;
}

.step-card-footer {
  flex-shrink: 0;
  margin-top: var(--deck-row-gap);
  padding-top: var(--deck-row-gap);
  border-top: 1px solid rgba(206, 160, 78, 0.12);
}

.step-card-title {
  font-family: var(--font-serif);
  font-weight: 500;
  color: #f5ede0;
}

.step-card-footer-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.btn-deck-secondary,
.btn-deck-primary,
.btn-deck-ghost {
  font-family: var(--font-serif);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.42rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn-deck-secondary {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(206, 160, 78, 0.28);
  color: rgba(245, 237, 224, 0.88);
}

.btn-deck-secondary:hover:not(:disabled) {
  border-color: rgba(206, 160, 78, 0.45);
  color: var(--dojo-gold-bright);
}

.btn-deck-primary {
  background: linear-gradient(180deg, rgba(205, 158, 74, 0.95), rgba(166, 124, 46, 0.95));
  border-color: rgba(120, 88, 40, 0.55);
  color: #1a1008;
}

.btn-deck-primary:hover:not(:disabled) {
  filter: brightness(1.06);
}

.btn-deck-ghost {
  background: transparent;
  border-color: rgba(206, 160, 78, 0.18);
  color: rgba(220, 208, 188, 0.72);
}

.btn-deck-ghost:hover:not(:disabled) {
  color: var(--dojo-gold-bright);
  border-color: rgba(206, 160, 78, 0.32);
}

.btn-deck-secondary:disabled,
.btn-deck-primary:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.deck-message {
  margin: 0;
  font-size: 0.76rem;
  color: rgba(220, 208, 188, 0.78);
}

.deck-message-muted {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(220, 208, 188, 0.55);
  font-style: italic;
}

.deck-message-warn {
  color: rgba(220, 180, 120, 0.92);
}

.deck-step-validation,
.deck-validation {
  margin-top: 0.5rem;
}

.deck-step-validation .status-line,
.deck-validation .status-line {
  font-size: 0.72rem;
  margin: 0.2rem 0;
}

.deck-step-validation .status-error,
.deck-validation .status-error {
  color: rgba(240, 160, 160, 0.92);
}

.deck-step-validation .status-warn,
.deck-validation .status-warn {
  color: rgba(220, 200, 140, 0.88);
}

.deck-step-validation .status-ok,
.deck-validation .status-ok {
  color: rgba(160, 200, 165, 0.88);
}

.armor-step-layout {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.armor-step-columns {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  gap: 0.65rem;
  align-items: start;
}

.armor-step-panel-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(220, 208, 188, 0.62);
}

.armor-series-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}

.series-step-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.series-step-layout .series-card-grid {
  flex: 1;
  align-content: center;
}

.model-step-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.model-browser {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: var(--deck-row-gap);
}

.model-browser-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, 10rem) auto;
  gap: var(--deck-control-gap) var(--deck-column-gap);
  align-items: center;
}

.model-browser-series {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(206, 160, 78, 0.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.model-search-wrap {
  min-width: 0;
}

.model-search-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.32rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(206, 160, 78, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: var(--dojo-cream);
  font-size: 0.68rem;
}

.model-search-input::placeholder {
  color: rgba(220, 208, 188, 0.45);
}

.model-browser-count {
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: rgba(220, 208, 188, 0.58);
  white-space: nowrap;
}

.model-offpage-selection {
  margin: 0;
  font-size: 0.66rem;
  color: rgba(220, 208, 188, 0.78);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.model-jump-selected {
  border: 1px solid rgba(206, 160, 78, 0.28);
  background: rgba(205, 158, 74, 0.1);
  color: var(--dojo-gold-bright);
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  font-size: 0.58rem;
  cursor: pointer;
}

.model-browser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(4.75rem, 1fr);
  gap: var(--deck-control-gap);
  min-height: 0;
  align-content: start;
  overflow-y: auto;
}

.model-page-dots {
  display: flex;
  align-items: center;
  gap: 0.28rem;
}

.model-page-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  border: 1px solid rgba(206, 160, 78, 0.35);
  background: rgba(255, 255, 255, 0.06);
  padding: 0;
  cursor: pointer;
}

.model-page-dot-active {
  background: rgba(206, 160, 78, 0.85);
  border-color: rgba(206, 160, 78, 0.85);
}

.deck-review-expanded {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--deck-section-gap);
}

.review-top-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--deck-control-gap) var(--deck-column-gap);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(206, 160, 78, 0.12);
}

.review-top-bar .deck-status {
  margin-left: auto;
}

.review-section-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--deck-control-gap);
  padding-bottom: 0;
  border-bottom: none;
}

.review-section-chip {
  border: 1px solid rgba(206, 160, 78, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 208, 188, 0.72);
  border-radius: 999px;
  padding: 0.28rem 0.58rem;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: var(--font-serif);
}

.review-section-chip:hover {
  border-color: rgba(206, 160, 78, 0.48);
  color: var(--dojo-gold-bright);
}

.review-dashboard {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13.75rem;
  gap: var(--deck-column-gap);
  align-items: start;
}

.review-expanded-layout {
  display: contents;
}

.review-groups-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--deck-section-gap);
  min-width: 0;
  align-content: start;
}

.review-group-card {
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(206, 160, 78, 0.16);
  background: rgba(0, 0, 0, 0.22);
  min-width: 0;
  min-height: 0;
}

.review-group-card--wide {
  grid-column: span 2;
}

.review-group-card--addons .review-group-body {
  max-height: 11.5rem;
  overflow-y: auto;
}

.review-group-card-status {
  border-color: rgba(206, 160, 78, 0.28);
  background: rgba(205, 158, 74, 0.06);
}

.review-group-title {
  margin: 0 0 0.45rem;
  font-family: var(--font-serif);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(206, 160, 78, 0.88);
}

.review-group-body {
  min-width: 0;
}

.review-status-rail {
  display: flex;
  flex-direction: column;
  gap: var(--deck-section-gap);
  position: sticky;
  top: 0;
}

.review-production-cta {
  width: 100%;
  text-align: center;
}

.deck-review-tabbed {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 0;
}

.review-section-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
}

.review-section-tab {
  border: 1px solid rgba(206, 160, 78, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 208, 188, 0.72);
  border-radius: 999px;
  padding: 0.26rem 0.52rem;
  font-size: 0.56rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.review-section-tab-active {
  border-color: rgba(206, 160, 78, 0.58);
  color: var(--dojo-gold-bright);
  background: rgba(205, 158, 74, 0.12);
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8.5rem, 10.5rem);
  gap: 0.65rem;
  align-items: start;
  min-height: 0;
}

.review-section-body {
  min-width: 0;
}

.review-section-heading {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(220, 208, 188, 0.62);
}

.review-detail-list {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.review-detail-row {
  display: grid;
  grid-template-columns: minmax(6.25rem, 40%) minmax(0, 1fr);
  gap: var(--deck-control-gap);
  align-items: baseline;
  padding: 0.28rem 0;
  border-bottom: 1px solid rgba(206, 160, 78, 0.08);
}

.review-detail-row:last-child {
  border-bottom: none;
}

.review-detail-row dt {
  margin: 0;
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  color: rgba(220, 208, 188, 0.62);
}

.review-detail-row dd {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--dojo-cream);
  word-break: break-word;
}

.review-addon-subgroup {
  margin-bottom: 0.45rem;
}

.review-addon-subgroup:last-child {
  margin-bottom: 0;
}

.review-subgroup-title {
  margin: 0 0 0.25rem;
  font-size: 0.56rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(206, 160, 78, 0.72);
}

.review-status-panel {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-left: 0.55rem;
  border-left: 1px solid rgba(206, 160, 78, 0.14);
}

.review-status-panel .btn-deck-production {
  width: 100%;
  text-align: center;
}

.review-approval-controls {
  margin-top: 0.45rem;
}

.model-step-context {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  color: rgba(206, 160, 78, 0.82);
}

.armor-model-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.model-page-btn {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  border: 1px solid rgba(206, 160, 78, 0.28);
  background: rgba(8, 5, 3, 0.55);
  color: rgba(245, 237, 224, 0.82);
  cursor: pointer;
}

.model-page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.model-page-label {
  font-size: 0.62rem;
  color: rgba(220, 208, 188, 0.62);
}

.deck-fields-fit,
.fit-step-layout.deck-fields-fit {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--deck-section-gap) var(--deck-column-gap);
  align-items: start;
}

.trim-color-step-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--deck-column-gap);
  align-items: stretch;
  overflow: hidden;
}

.trim-color-column {
  display: flex;
  flex-direction: column;
  gap: var(--deck-section-gap);
  min-width: 0;
  min-height: 0;
}

.trim-color-column .field-block-stack {
  display: flex;
  flex-direction: column;
  gap: var(--deck-section-gap);
  min-height: 0;
}

.trim-color-column-title,
.color-step-column-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(206, 160, 78, 0.88);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(206, 160, 78, 0.12);
  flex-shrink: 0;
}

.trim-color-subtitle {
  margin: 0 0 0.35rem;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: rgba(220, 208, 188, 0.72);
}

.trim-color-color-block + .trim-color-color-block {
  margin-top: var(--deck-section-gap);
}

.trim-color-column-colors .swatch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.35rem, 1fr));
  gap: var(--deck-control-gap);
}

/* Trim & Color — compact layout: fit fixed deck height before scrolling */
.step-deck-card[data-step-key="trimColor"] {
  --trim-section-gap: 0.48rem;
  --trim-control-gap: 0.32rem;
}

.step-deck-card[data-step-key="trimColor"] .step-card-header {
  margin-bottom: 0.4rem;
}

.step-deck-card[data-step-key="trimColor"] .step-card-instruction {
  margin-top: 0.18rem;
  font-size: 0.76rem;
  line-height: 1.32;
}

.step-deck-card[data-step-key="trimColor"] .step-card-content {
  overflow-y: hidden;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-step-layout,
.step-deck-card[data-step-key="trimColor"] .trim-color-column {
  gap: var(--trim-section-gap);
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column .field-block-stack {
  gap: var(--trim-section-gap);
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-title {
  padding-bottom: 0.22rem;
  font-size: 0.7rem;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-subtitle {
  margin: 0 0 0.18rem;
  font-size: 0.64rem;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-color-block + .trim-color-color-block {
  margin-top: 0;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-colors {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--trim-section-gap) 0.65rem;
  align-content: start;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-colors > .trim-color-column-title {
  grid-column: 1 / -1;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-color-block {
  min-width: 0;
}

.step-deck-card[data-step-key="trimColor"] .deck-selected-value {
  display: none;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-color-block .deck-field-swatches > .deck-field-label {
  display: none;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-details .deck-field {
  gap: var(--trim-control-gap);
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-details .deck-select {
  min-height: 1.9rem;
  padding: 0.32rem 0.55rem;
  font-size: 0.72rem;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-details .option-chip-grid {
  flex-wrap: nowrap;
  gap: var(--trim-control-gap);
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-details .option-chip {
  flex: 1 1 0;
  min-width: 0;
  min-height: 1.7rem;
  padding: 0.24rem 0.35rem;
  font-size: 0.6rem;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-colors .swatch-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--trim-control-gap);
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-colors .swatch-chip {
  position: relative;
  width: auto;
  padding: 0.18rem;
  gap: 0;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-colors .swatch-chip-color {
  width: 1.32rem;
  height: 1.32rem;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-colors .swatch-chip-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Per-column scroll only when compact layout still overflows */
.step-deck-card[data-step-key="trimColor"] .trim-color-column-details {
  overflow: visible;
}

.step-deck-card[data-step-key="trimColor"] .trim-color-column-colors {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(206, 160, 78, 0.35) transparent;
}

.addons-step-layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) minmax(10.5rem, 12.5rem);
  gap: var(--deck-column-gap);
  align-items: stretch;
}

.addons-rail {
  display: flex;
  flex-direction: column;
  gap: var(--deck-control-gap);
  min-width: 0;
}

.addons-rail-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(206, 160, 78, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 208, 188, 0.78);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.addons-rail-btn:hover {
  border-color: rgba(206, 160, 78, 0.42);
  color: var(--dojo-gold-bright);
}

.addons-rail-btn-active {
  border-color: rgba(206, 160, 78, 0.58);
  background: rgba(205, 158, 74, 0.12);
  color: var(--dojo-gold-bright);
}

.addons-rail-label {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  line-height: 1.25;
}

.addons-rail-count {
  font-size: 0.58rem;
  color: rgba(220, 208, 188, 0.55);
}

.addons-main {
  display: flex;
  flex-direction: column;
  gap: var(--deck-row-gap);
  min-width: 0;
  min-height: 0;
}

.addons-panel-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(206, 160, 78, 0.88);
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(206, 160, 78, 0.12);
}

.addons-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--deck-section-gap);
}

.addons-summary {
  display: flex;
  flex-direction: column;
  gap: var(--deck-row-gap);
  min-width: 0;
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  border: 1px solid rgba(206, 160, 78, 0.16);
  background: rgba(0, 0, 0, 0.18);
  overflow-y: auto;
  max-height: 100%;
}

.addons-summary-title {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(206, 160, 78, 0.82);
}

.addons-summary-group {
  margin: 0;
}

.addons-summary-group-title {
  margin: 0 0 0.25rem;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(220, 208, 188, 0.55);
}

.addons-summary-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.addons-summary-item {
  font-size: 0.72rem;
  line-height: 1.35;
  color: rgba(245, 237, 224, 0.88);
}

.addons-summary-item-label {
  color: rgba(220, 208, 188, 0.62);
}

.addons-step {
  display: flex;
  flex-direction: column;
  gap: var(--deck-row-gap);
}

.addons-subgroup-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--deck-control-gap);
}

.addons-subgroup-tab {
  border: 1px solid rgba(206, 160, 78, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(220, 208, 188, 0.72);
  border-radius: 999px;
  padding: 0.28rem 0.55rem;
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.addons-subgroup-tab-active {
  border-color: rgba(206, 160, 78, 0.58);
  color: var(--dojo-gold-bright);
  background: rgba(205, 158, 74, 0.12);
}

.addons-subgroup-panel {
  min-height: 0;
}

.review-approval-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.review-approval-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.review-approval-controls .deck-field-quantity {
  margin: 0;
}

.series-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(5.5rem, 1fr));
  gap: var(--deck-control-gap);
}

.series-step-layout .series-card {
  min-height: 5.5rem;
  height: 100%;
  padding: 0.85rem 0.95rem;
  justify-content: flex-start;
}

.series-step-layout .series-card-title {
  font-size: 0.82rem;
  line-height: 1.3;
}

.series-step-layout .series-card-sub {
  font-size: 0.68rem;
  line-height: 1.4;
  flex: 1;
}

.series-step-layout .series-card-meta {
  margin-top: auto;
  font-size: 0.62rem;
}

.model-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--deck-control-gap);
}

.model-card-grid .model-card {
  min-height: 4.75rem;
  height: 100%;
  padding: 0.6rem 0.7rem;
}

.model-card-grid .model-card-title {
  font-size: 0.76rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.model-card-grid .model-card-thumb {
  width: 2.75rem;
  height: 2.75rem;
}

.model-page-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--deck-control-gap);
  margin-top: 0;
  padding-top: 0.15rem;
}

.deck-overview-compact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.overview-top-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
}

.overview-armor-summary-compact {
  padding: 0;
  border: none;
  background: none;
}

.overview-line-compact {
  margin: 0 0 0.15rem;
}

.overview-line-compact .overview-line-value {
  font-size: 0.82rem;
}

.overview-groups-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.75rem;
}

.overview-group-compact {
  margin: 0;
}

.overview-chip-list-compact {
  gap: 0.25rem;
}

.overview-chip-compact {
  padding: 0.32rem 0.48rem;
}

.overview-chip-compact .overview-chip-label {
  font-size: 0.54rem;
}

.overview-chip-compact .overview-chip-value {
  font-size: 0.74rem;
}

.overview-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.overview-quantity-inline {
  max-width: 9rem;
  flex-shrink: 0;
}

.overview-quantity-inline .deck-field-label {
  display: none;
}

.btn-deck-production {
  margin-left: auto;
  white-space: nowrap;
}

.deck-validation-compact .status-line {
  margin: 0.15rem 0 0;
  font-size: 0.66rem;
}

.deck-status {
  margin: 0;
  padding: 0.28rem 0.45rem;
  font-size: 0.62rem;
  white-space: nowrap;
}

.deck-fields {
  gap: 0.6rem;
}

.deck-fields.field-card-grid {
  display: flex;
  flex-direction: column;
  gap: var(--deck-section-gap);
  align-items: stretch;
}

.field-block,
.deck-field {
  display: flex;
  flex-direction: column;
  gap: var(--deck-control-gap);
  min-width: 0;
}

.field-label,
.deck-field-label {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: rgba(206, 160, 78, 0.82);
  line-height: 1.3;
}

.field-control {
  min-width: 0;
}

.field-selected-value,
.deck-selected-value {
  margin: 0;
  font-size: 0.72rem;
  color: rgba(220, 208, 188, 0.72);
  line-height: 1.35;
}

.field-selected-value strong,
.deck-selected-value strong {
  color: var(--dojo-cream);
  font-weight: 500;
}

.deck-field-label {
  font-size: 0.68rem;
}

.deck-fields .swatch-grid {
  gap: 0.4rem;
}

.deck-fields .swatch-chip {
  width: 3.1rem;
  padding: 0.32rem 0.22rem 0.36rem;
}

.deck-fields .option-chip-grid {
  gap: 0.35rem;
}

.deck-fields .option-chip {
  min-height: 1.95rem;
  padding: 0.32rem 0.5rem;
  font-size: 0.68rem;
}

.field-block-stack {
  display: flex;
  flex-direction: column;
  gap: var(--deck-section-gap);
  min-width: 0;
}

.series-card,
.model-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
  max-width: none;
  border-radius: 10px;
  border: 1px solid rgba(206, 160, 78, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--dojo-cream);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  height: 100%;
}

.model-card-grid .model-card {
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
}

.series-card:hover,
.model-card:hover {
  border-color: rgba(206, 160, 78, 0.38);
  background: rgba(255, 255, 255, 0.07);
}

.series-card-selected,
.model-card-selected {
  border-color: rgba(206, 160, 78, 0.62);
  background: rgba(205, 158, 74, 0.12);
  box-shadow: 0 0 0 1px rgba(205, 158, 74, 0.22);
}

.series-card-title,
.model-card-title {
  font-family: var(--font-serif);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.series-card-sub,
.model-card-sku {
  font-size: 0.66rem;
  color: rgba(220, 208, 188, 0.62);
  line-height: 1.35;
}

.series-card-meta,
.model-card-price {
  font-size: 0.58rem;
  color: var(--dojo-gold-dim);
  letter-spacing: 0.04em;
}

.model-card-thumb {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(206, 160, 78, 0.18);
}

.model-card-thumb-empty {
  background: rgba(255, 255, 255, 0.06);
}

.model-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.deck-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.deck-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.deck-field-label {
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(206, 160, 78, 0.72);
}

.deck-select {
  width: 100%;
  min-height: 2.15rem;
  padding: 0.45rem 0.65rem;
  border-radius: 8px;
  border: 1px solid rgba(206, 160, 78, 0.22);
  background: rgba(0, 0, 0, 0.35);
  color: var(--dojo-cream);
  font-size: 0.78rem;
}

.field-card-grid,
.option-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(206, 160, 78, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 237, 224, 0.88);
  font-size: 0.68rem;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.option-chip-selected {
  border-color: rgba(206, 160, 78, 0.58);
  background: rgba(205, 158, 74, 0.14);
  color: #f5ede0;
}

.swatch-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.swatch-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  width: 3.4rem;
  padding: 0.35rem 0.25rem 0.4rem;
  border-radius: 8px;
  border: 1px solid rgba(206, 160, 78, 0.18);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.12s ease;
}

.swatch-chip-selected {
  border-color: rgba(206, 160, 78, 0.62);
  box-shadow: 0 0 0 1px rgba(205, 158, 74, 0.28);
}

.swatch-chip-color {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 50%;
  background: var(--swatch-color, #666);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25);
}

.swatch-chip-label {
  font-size: 0.52rem;
  line-height: 1.2;
  text-align: center;
  color: rgba(220, 208, 188, 0.72);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.deck-selected-value {
  margin: 0.15rem 0 0;
  font-size: 0.68rem;
  color: rgba(220, 208, 188, 0.65);
}

.deck-qty-stepper {
  align-self: flex-start;
}

.deck-overview {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.overview-armor-summary {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(206, 160, 78, 0.14);
}

.overview-line {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  margin: 0 0 0.35rem;
}

.overview-line-label {
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(206, 160, 78, 0.62);
}

.overview-line-value {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  color: #f5ede0;
}

.deck-status {
  margin: 0.35rem 0 0;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  font-size: 0.68rem;
}

.deck-status-ready {
  background: rgba(90, 130, 80, 0.18);
  color: rgba(160, 210, 165, 0.92);
  border: 1px solid rgba(90, 130, 80, 0.28);
}

.deck-status-pending {
  background: rgba(180, 140, 60, 0.12);
  color: rgba(220, 200, 140, 0.88);
  border: 1px solid rgba(180, 140, 60, 0.22);
}

.overview-groups {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.overview-group-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-serif);
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(206, 160, 78, 0.68);
}

.overview-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.overview-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.06rem;
  padding: 0.32rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(206, 160, 78, 0.14);
  max-width: 100%;
}

.overview-chip-label {
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(206, 160, 78, 0.55);
}

.overview-chip-value {
  font-size: 0.72rem;
  color: #f5ede0;
  line-height: 1.3;
}

.overview-quantity {
  max-width: 12rem;
}

/* ═══ BOOK WIZARD — legacy (unused; kept for reference) ═══ */

.book-wizard-mount {
  position: absolute;
  left: 50%;
  bottom: var(--book-bottom);
  transform: translateX(-50%);
  z-index: 12;
  width: var(--book-width);
  min-width: min(760px, 92vw);
  max-width: 1040px;
  height: var(--book-height);
  pointer-events: none;
}

.book-wizard-mount .commission-book {
  pointer-events: auto;
}

.book-wizard-hidden {
  visibility: hidden;
  pointer-events: none;
}

.commission-book {
  position: relative;
  height: 100%;
  perspective: 1400px;
  perspective-origin: 50% 100%;
}

/* Wooden pedestal / ledge beneath the open book */
.book-pedestal {
  position: absolute;
  left: -6%;
  right: -6%;
  bottom: -18px;
  height: 28px;
  z-index: 0;
  pointer-events: none;
}

.book-pedestal-surface {
  position: absolute;
  inset: 0;
  border-radius: 4px 4px 2px 2px;
  background:
    linear-gradient(180deg, rgba(110, 82, 58, 0.96) 0%, rgba(52, 34, 22, 0.98) 55%, rgba(32, 20, 12, 1) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 210, 150, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.4),
    0 6px 0 rgba(20, 12, 6, 0.85);
}

.book-pedestal-ledge {
  position: absolute;
  left: -2%;
  right: -2%;
  top: -4px;
  height: 6px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(140, 105, 72, 0.9), rgba(70, 48, 30, 0.95));
  box-shadow: inset 0 1px 0 rgba(255, 220, 160, 0.25);
}

.book-pedestal-shadow {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: -14px;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.48), transparent 70%);
  filter: blur(5px);
}

.book-cover-wrap {
  position: relative;
  z-index: 1;
  height: 100%;
  transform: rotateX(3.5deg);
  transform-origin: 50% 100%;
  filter: drop-shadow(0 22px 32px rgba(0, 0, 0, 0.42));
}

.book-leather-edge {
  position: absolute;
  inset: -6px -8px auto -8px;
  height: 12px;
  border-radius: 10px 10px 2px 2px;
  background:
    linear-gradient(90deg, #120804 0%, #2a1408 12%, #4a2814 28%, #6a4020 50%, #4a2814 72%, #2a1408 88%, #120804 100%);
  box-shadow:
    0 -3px 8px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 200, 120, 0.15),
    inset 0 -2px 4px rgba(0, 0, 0, 0.35);
  z-index: 3;
}

.book-cover-edge-left,
.book-cover-edge-right {
  position: absolute;
  top: 6px;
  bottom: 0;
  width: 8px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg, #2a180c, #120804);
  box-shadow: inset -2px 0 4px rgba(0, 0, 0, 0.35);
}

.book-cover-edge-left {
  left: -6px;
  border-radius: 4px 0 0 2px;
}

.book-cover-edge-right {
  right: -6px;
  border-radius: 0 4px 2px 0;
  box-shadow: inset 2px 0 4px rgba(0, 0, 0, 0.35);
}

.book-page-stack {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -3px;
  height: 5px;
  z-index: 0;
  border-radius: 0 0 2px 2px;
  background:
    repeating-linear-gradient(
      180deg,
      #e8dcc4 0px,
      #e8dcc4 1px,
      #d4c4a8 1px,
      #d4c4a8 2px
    );
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
}

.book-pages-wrap {
  position: relative;
  height: 100%;
  margin-top: 6px;
  border-radius: 6px 6px 3px 3px;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(60, 38, 20, 0.5),
    inset 4px 0 16px rgba(0, 0, 0, 0.06),
    inset -4px 0 16px rgba(0, 0, 0, 0.06);
}

.book-pages-wrap::before,
.book-pages-wrap::after {
  content: "";
  position: absolute;
  top: 6%;
  bottom: 5%;
  width: 18px;
  pointer-events: none;
  z-index: 2;
}

.book-pages-wrap::before {
  left: 0;
  border-radius: 0 85% 85% 0 / 0 48% 48% 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.14), transparent 85%);
}

.book-pages-wrap::after {
  right: 0;
  border-radius: 85% 0 0 85% / 48% 0 0 48%;
  background: linear-gradient(270deg, rgba(0, 0, 0, 0.12), transparent 85%);
}

.book-spread {
  display: grid;
  grid-template-columns: 1fr 12px 1fr;
  grid-template-rows: auto 1fr;
  height: 100%;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.045'/%3E%3C/svg%3E"),
    linear-gradient(180deg, rgba(252, 244, 224, 0.98), rgba(235, 218, 185, 0.99)),
    #efe2c8;
  color: #2a1c12;
  transition: opacity 0.28s ease, transform 0.32s ease;
}

.book-spread-enter {
  animation: bookPageIn 0.32s ease;
}

@keyframes bookPageIn {
  from {
    opacity: 0.55;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.book-page {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0.55rem 0.85rem 0.65rem;
  overflow: hidden;
  grid-row: 2;
}

.book-page-left {
  border-right: none;
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(circle at 18% 22%, rgba(255, 255, 255, 0.38), transparent 52%),
    linear-gradient(180deg, rgba(252, 244, 224, 0.96), rgba(238, 224, 196, 0.93));
  box-shadow: inset -8px 0 18px rgba(0, 0, 0, 0.06);
}

.book-page-right {
  background:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E"),
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.32), transparent 48%),
    linear-gradient(180deg, rgba(250, 241, 220, 0.97), rgba(236, 222, 194, 0.95));
  box-shadow: inset 8px 0 18px rgba(0, 0, 0, 0.06);
}

.book-spine {
  grid-row: 2;
  background:
    linear-gradient(180deg, #4a2e18 0%, #2a180c 30%, #120804 50%, #2a180c 70%, #4a2e18 100%);
  box-shadow:
    inset 0 0 14px rgba(0, 0, 0, 0.5),
    inset 3px 0 6px rgba(255, 200, 120, 0.1),
    inset -3px 0 6px rgba(0, 0, 0, 0.3),
    -4px 0 8px rgba(0, 0, 0, 0.08),
    4px 0 8px rgba(0, 0, 0, 0.08);
}

.book-kicker {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(90, 60, 30, 0.72);
}

.book-step-title {
  margin: 0.2rem 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  color: #3a2818;
}

.book-step-guidance {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(50, 34, 20, 0.78);
}

.book-left-summary {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.book-summary-heading {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(90, 60, 30, 0.75);
}

.book-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.book-summary-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.book-summary-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.06rem;
  padding: 0.32rem 0.5rem;
  border-radius: 4px;
  background: rgba(255, 252, 245, 0.72);
  border: 1px solid rgba(120, 80, 40, 0.14);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  max-width: 100%;
}

.book-summary-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-bottom: 0;
  border-bottom: none;
}

.book-summary-label {
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(80, 55, 30, 0.65);
}

.book-summary-value {
  font-size: 0.78rem;
  color: #2a1c12;
}

.book-muted {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(60, 42, 24, 0.62);
  font-style: italic;
}

.book-step-progress {
  grid-column: 1 / -1;
  grid-row: 1;
  padding: 0.45rem 0.75rem 0.35rem;
  border-bottom: 1px solid rgba(120, 80, 40, 0.16);
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.55), transparent);
}

.book-step-progress-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.25rem 0.55rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-step {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-family: var(--font-serif);
  font-size: 0.54rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(70, 48, 28, 0.42);
  white-space: nowrap;
}

.book-step:not(:last-child)::after {
  content: "›";
  margin-left: 0.35rem;
  opacity: 0.35;
  font-size: 0.65rem;
}

.book-step-dot {
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 50%;
  border: 1px solid rgba(100, 70, 35, 0.3);
  background: rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.book-step-active {
  color: #5a3a18;
  font-weight: 500;
}

.book-step-active .book-step-dot {
  background: #b8862a;
  border-color: #8a6420;
  box-shadow: 0 0 5px rgba(184, 134, 42, 0.4);
}

.book-step-done {
  color: rgba(70, 48, 28, 0.68);
}

.book-step-done .book-step-dot {
  background: rgba(90, 130, 80, 0.5);
  border-color: rgba(70, 100, 60, 0.45);
}

.book-step-fields,
.book-overview {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.book-right-heading {
  margin: 0 0 0.15rem;
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(80, 55, 30, 0.68);
}

.book-field {
  margin-bottom: 0;
  padding: 0.45rem 0.55rem;
  border-radius: 4px;
  background: rgba(255, 252, 245, 0.55);
  border: 1px solid rgba(120, 80, 40, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.book-field span {
  color: rgba(50, 34, 20, 0.82);
  font-size: 0.68rem;
}

.book-field select,
.book-field input[type="text"],
.book-field input[type="number"] {
  background: rgba(255, 252, 245, 0.92);
  border: 1px solid rgba(120, 80, 40, 0.22);
  color: #2a1c12;
  min-height: 2.1rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.82rem;
}

.book-right-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 0.1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 80, 40, 0.25) transparent;
}

.book-right-content::-webkit-scrollbar {
  width: 4px;
}

.book-right-content::-webkit-scrollbar-thumb {
  background: rgba(120, 80, 40, 0.22);
  border-radius: 2px;
}

/* Overview — commission cards and chips (not table rows) */
.book-overview-summary-card {
  padding: 0.65rem 0.75rem;
  border-radius: 4px;
  background: rgba(255, 252, 245, 0.65);
  border: 1px solid rgba(120, 80, 40, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.book-overview-meta {
  margin: 0 0 0.5rem;
}

.book-meta-row {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  padding: 0.2rem 0;
}

.book-meta-row:not(:last-child) {
  border-bottom: 1px solid rgba(120, 80, 40, 0.08);
  margin-bottom: 0.15rem;
  padding-bottom: 0.35rem;
}

.book-meta-row dt {
  margin: 0;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(80, 55, 30, 0.62);
}

.book-meta-row dd {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 0.82rem;
  color: #2a1c12;
}

.book-readiness {
  margin: 0;
  padding: 0.35rem 0.55rem;
  border-radius: 3px;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
}

.book-readiness-ready {
  background: rgba(90, 130, 80, 0.15);
  color: #2a5a32;
  border: 1px solid rgba(90, 130, 80, 0.25);
}

.book-readiness-pending {
  background: rgba(180, 140, 60, 0.12);
  color: #6a4a12;
  border: 1px solid rgba(180, 140, 60, 0.22);
}

.book-overview-selections {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.book-overview-quantity {
  margin-top: 0.15rem;
}

.book-overview-quantity .book-field {
  max-width: 12rem;
}

.book-chip-section {
  margin: 0;
}

.book-chip-section-title {
  margin: 0 0 0.3rem;
  font-family: var(--font-serif);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(80, 55, 30, 0.72);
}

.book-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.book-chip {
  display: inline-flex;
  flex-direction: column;
  gap: 0.06rem;
  padding: 0.35rem 0.55rem;
  border-radius: 4px;
  background: rgba(255, 252, 245, 0.85);
  border: 1px solid rgba(120, 80, 40, 0.16);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  max-width: 100%;
}

.book-chip-label {
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(80, 55, 30, 0.58);
}

.book-chip-value {
  font-size: 0.76rem;
  color: #2a1c12;
  line-height: 1.3;
}

.book-overview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.book-overview-actions .btn {
  width: auto;
  flex: 1 1 auto;
  min-width: 8rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.68rem;
}

.book-overview-actions .btn-primary-action {
  flex: 1.4 1 auto;
}

.book-step-validation {
  margin-top: 0.5rem;
}

.book-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.55rem;
}

.book-nav-right {
  justify-content: flex-end;
}

.btn-book-nav {
  font-family: var(--font-serif);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45rem 0.85rem;
  border-radius: 3px;
  border: 1px solid rgba(100, 70, 35, 0.35);
  background: rgba(255, 250, 240, 0.75);
  color: #3a2818;
  cursor: pointer;
}

.btn-book-nav:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-book-primary {
  background: linear-gradient(180deg, #c9a04a, #a67c2e);
  color: #1a1008;
  border-color: rgba(80, 55, 20, 0.45);
}

.book-validation .status-line {
  color: #2a1c12;
}

.book-validation .status-error {
  color: #7a1e1e;
}

.book-validation .status-warn {
  color: #6a4a12;
}

.book-validation .status-info {
  color: #2a4a6a;
}

.book-validation .status-ok {
  color: #2a5a32;
}

.book-advisor {
  margin-top: 0.5rem;
  max-height: 8rem;
  overflow: hidden;
  border: 1px solid rgba(120, 80, 40, 0.16);
  border-radius: 4px;
  background: rgba(255, 252, 245, 0.55);
}

.book-advisor .advisor-heading {
  color: #3a2818;
  font-size: 0.68rem;
}

.book-advisor .advisor-body {
  color: #2a1c12;
}

.exit-focus-btn {
  position: fixed;
  top: calc(var(--client-header-h) + 0.65rem);
  right: 1.25rem;
  z-index: 25;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  padding: 0.45rem 0.85rem;
  background: rgba(8, 5, 3, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(205, 158, 74, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

/* Focus armor mode — hide book, enlarge scene */
body.armor-focus-mode {
  --scene-safe-bottom: 0px;
}

body.armor-focus-mode .step-deck-mount {
  visibility: hidden;
  pointer-events: none;
}

body.armor-focus-mode .dojo-header {
  opacity: 0.28;
  transform: translateY(-40%);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

body.armor-focus-mode .model-controls-banner {
  visibility: hidden;
  pointer-events: none;
}

body.armor-focus-mode .dojo-scene {
  bottom: 0;
}

@media (max-width: 820px) {
  :root {
    --deck-width: min(96vw, 760px);
    --deck-compact-height: 420px;
    --deck-min-height: var(--deck-compact-height);
    --deck-max-height: var(--deck-compact-height);
    --deck-review-height: calc(100vh - var(--client-header-h) - var(--deck-bottom) - 0.75rem);
    --deck-gap: 10px;
    --deck-bottom: 24px;
    --deck-gap: 32px;
  }

  .step-deck-mount {
    width: min(98vw, calc(var(--deck-width) + 4rem));
  }

  .step-deck-nav-arrow {
    width: 2rem;
    height: 2rem;
    font-size: 1.15rem;
  }

  .trim-color-step-layout,
  .color-step-layout {
    grid-template-columns: 1fr;
  }

  .step-deck-card[data-step-key="trimColor"] .step-card-header {
    margin-bottom: 0.3rem;
  }

  .step-deck-card[data-step-key="trimColor"] .step-card-instruction {
    display: none;
  }

  .step-deck-card[data-step-key="trimColor"] .trim-color-step-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .step-deck-card[data-step-key="trimColor"] .trim-color-column-details {
    flex: 0 0 auto;
    min-height: auto;
    overflow: visible;
  }

  .step-deck-card[data-step-key="trimColor"] .trim-color-column-details .field-block-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--trim-section-gap) 0.55rem;
  }

  .step-deck-card[data-step-key="trimColor"] .trim-color-column-details .field-block:first-child {
    grid-column: 1 / -1;
  }

  .step-deck-card[data-step-key="trimColor"] .trim-color-column-colors {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .step-deck-card[data-step-key="trimColor"] .trim-color-column-colors .swatch-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .step-deck-card[data-step-key="trimColor"] .trim-color-column-colors .swatch-chip-color {
    width: 1.18rem;
    height: 1.18rem;
  }

  .addons-step-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .addons-rail {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .addons-rail-btn {
    flex: 1 1 calc(50% - 0.35rem);
  }

  .review-dashboard {
    grid-template-columns: 1fr;
  }

  .review-groups-grid,
  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-group-card--wide {
    grid-column: span 2;
  }

  .deck-fields-fit,
  .fit-step-layout.deck-fields-fit {
    grid-template-columns: 1fr;
  }

  .review-status-rail {
    position: static;
  }

  .overview-groups-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .series-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .model-browser-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, auto));
  }

  .model-controls-banner {
    top: auto;
    bottom: calc(var(--deck-bottom) + var(--deck-compact-height) + 0.75rem);
    right: 0.75rem;
    width: 6.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .step-deck-enter,
  .dojo-scene,
  .view-controls-float {
    transition: none;
  }
}

@media print {
  body { background: #fff; font-size: 11pt; color: #1a1a1a; }

  .no-print,
  #clientView,
  .app-header-production .workflow-strip,
  .production-actions { display: none !important; }

  #productionView.hidden { display: block !important; }

  .production-body { padding: 0; margin: 0; max-width: none; }
  .factory-sheet { box-shadow: none; padding: 0; }

  .sheet-disclaimer {
    display: block !important;
    background: #fff8e1 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .sheet-svg-wrap svg { max-width: 480px !important; min-width: 360px; }

  .sev-badge, .poc-tag, .demo-tag, .value-swatch {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
