:root {
  /* Warm Lantern-Lit Workshop Palette */
  --bg-soot: #120e0a;
  --bg-timber: #1b1510;
  --bg-iron: #251d16;
  --bg-iron-hover: #31261d;

  --border-rust: #473627;
  --border-brass: #7a5938;

  /* Button colors inspired by Archive in Between + Wanderworld rust/moss */
  --btn-rust: #a9471d;
  --btn-rust-hover: #be5224;
  --btn-moss: #28352b;
  --btn-moss-hover: #334537;

  --amber: #e8943a;
  --amber-bright: #ffb65c;
  --amber-deep: #9c5119;

  /* Aged Parchment Drafting Sheet */
  --paper-light: #ede0c4;
  --paper-mid: #dfd0ae;
  --ink-dark: #221912;
  --ink-muted: #5e4b39;
  --stamp-red: #9c3424;

  --text-warm: #f2e8d9;
  --text-muted: #b09e89;
  --text-dim: #7c6b58;

  --font-serif: Georgia, "Palatino Linotype", "Book Antiqua", Palatino, serif;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  --font-mono: "Cascadia Code", Consolas, "Courier New", monospace;
}

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

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--bg-soot);
  color: var(--text-warm);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

button,
input,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
}

/* =========================================
   MINIMAL 3-ZONE HEADER
   ========================================= */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(18, 14, 10, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(122, 89, 56, 0.28);
}

.nav-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 12px 24px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.nav-inner.nav-home-spread {
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 28px;
}

.nav-links.nav-links-even {
  flex: 1;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  gap: 16px;
}

.nav-links.nav-links-even a {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #e6dac8;
}

.nav-links.nav-links-even a:hover {
  color: var(--amber-bright);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text-warm);
}

.nav-center-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-logo {
  height: 40px;
  width: auto;
  display: block;
  transition: transform 0.15s ease;
}

.nav-center-brand:hover .nav-logo {
  transform: scale(1.04);
}

.nav-socials {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.nav-socials a,
.footer-socials a {
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  transition: color 0.15s ease;
}

.nav-socials a:hover,
.footer-socials a:hover {
  color: var(--amber-bright);
}

/* =========================================
   HOME: SINGLE-SCREEN ATMOSPHERIC GATEWAY
   ========================================= */
.gateway {
  position: relative;
  min-height: calc(100vh - 140px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  overflow: hidden;
  padding: 60px 20px 5.5vh;
}

.gateway-bg {
  position: absolute;
  inset: 0;
}

.gateway-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: saturate(0.92) brightness(0.86);
}

.gateway-veil {
  position: absolute;
  inset: 0;
  /* Light & clear at top; bottom darkness fade starts higher to anchor the logo & title */
  background: linear-gradient(
    180deg,
    rgba(16, 12, 8, 0.08) 0%,
    rgba(16, 12, 8, 0.06) 22%,
    rgba(16, 12, 8, 0.36) 40%,
    rgba(16, 12, 8, 0.78) 64%,
    rgba(16, 12, 8, 0.94) 84%,
    var(--bg-soot) 100%
  );
}

.gateway-layout {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  text-align: center;
}

.gateway-top {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gateway-emblem {
  width: min(306px, 68vw);
  height: auto;
  display: block;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.88));
}

.gateway-kicker {
  margin: 16px 0 0;
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.6vw, 19.5px);
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--amber-bright);
  text-shadow:
    0 2px 14px rgba(0, 0, 0, 0.96),
    0 0 24px rgba(0, 0, 0, 0.82);
}

.gateway-rule {
  display: block;
  width: 48px;
  height: 1px;
  margin: 22px auto 20px;
  background: rgba(255, 182, 92, 0.45);
}

.gateway-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gateway-list a {
  color: #f6ecde;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 3px 10px;
  text-shadow:
    0 2px 12px rgba(0, 0, 0, 0.95),
    0 0 22px rgba(0, 0, 0, 0.85);
  transition: color 0.15s ease, transform 0.15s ease;
}

.gateway-list a:hover {
  color: var(--amber-bright);
  transform: translateY(-1px);
}

.gateway-lower {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 4px;
}

/* Stacked Centered CTA Buttons */
.gateway-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gate-btn {
  display: block;
  width: 100%;
  max-width: 340px;
  padding: 14px 22px;
  border-radius: 3px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff8ee;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.52);
  transition: transform 0.13s ease, background 0.16s ease, border-color 0.16s ease;
}

.gate-btn:hover {
  transform: translateY(-2px);
}

.gate-primary {
  background: var(--btn-rust);
  border: 1px solid rgba(255, 190, 128, 0.35);
}

.gate-primary:hover {
  background: var(--btn-rust-hover);
}

.gate-secondary {
  background: var(--btn-moss);
  border: 1px solid rgba(215, 228, 212, 0.18);
  font-size: 12.5px;
  letter-spacing: 0.12em;
}

.gate-secondary:hover {
  background: var(--btn-moss-hover);
}

/* =========================================
   BARE-BONES FOOTER
   ========================================= */
.site-footer {
  border-top: 1px solid rgba(122, 89, 56, 0.25);
  padding: 26px 20px;
  text-align: center;
  background: var(--bg-soot);
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-bottom: 10px;
}

.footer-copy {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* =========================================
   SHARED BUTTONS & TYPOGRAPHY
   ========================================= */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--amber);
  margin-bottom: 6px;
}

.inline-link {
  color: var(--amber-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-brass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 190, 128, 0.45);
  background: var(--btn-rust);
  color: #fff8ee;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.12s ease;
}

.btn-brass:hover {
  background: var(--btn-rust-hover);
  transform: translateY(-1px);
}

.btn-iron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 15px;
  border-radius: 6px;
  border: 1px solid var(--border-rust);
  background: var(--bg-iron);
  color: var(--text-warm);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-iron:hover {
  background: var(--bg-iron-hover);
  border-color: var(--border-brass);
}

.btn-accent-border {
  border-color: var(--border-brass);
  color: var(--amber-bright);
}

/* =========================================
   BUILDER PAGE: TWIN RUSTIC CRT MONITORS WORKSHOP SCENE
   ========================================= */
.assembly-bay {
  position: relative;
  min-height: calc(100vh - 66px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 4px 0 14px;
  background:
    radial-gradient(circle at 18% 12%, rgba(232, 148, 58, 0.14), transparent 44%),
    radial-gradient(circle at 84% 78%, rgba(124, 178, 56, 0.08), transparent 46%),
    var(--bg-soot);
  overflow: hidden;
}

.assembly-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1460px;
  margin: 0 auto;
  padding: 0 18px;
}

.builder-strip-title {
  margin: 2px 0 6px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: clamp(12.5px, 1.4vw, 15px);
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber-bright);
  line-height: 1.2;
}

.console-header {
  width: 95%;
  max-width: 1345px;
  margin: 0 auto 12px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.console-header h1 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 3vw, 34px);
  color: #fff5e6;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.9);
}

.console-toggles {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Display Mode Switch (Dark CRT <-> Parchment CRT) */
.mode-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 7px 5px 13px;
  border-radius: 999px;
  background: rgba(18, 14, 10, 0.86);
  border: 1px solid var(--border-brass);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.mode-switch-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--text-muted);
}

.mode-switch {
  display: inline-flex;
  background: #0d0a07;
  border: 1px solid var(--border-rust);
  border-radius: 999px;
  padding: 2px;
  gap: 2px;
}

.mode-btn {
  padding: 5px 12px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: background 0.16s ease, color 0.16s ease;
}

.mode-btn:hover {
  color: var(--text-warm);
}

.mode-btn.active {
  background: var(--btn-rust);
  color: #fff8ee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

/* CRT Overlay / Blend Toggle */
.crt-blend-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(18, 14, 10, 0.86);
  border: 1px solid var(--border-brass);
  backdrop-filter: blur(6px);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-warm);
  cursor: pointer;
  user-select: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.crt-blend-toggle input {
  display: none;
}

.toggle-track {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  background: #3a2d21;
  position: relative;
  transition: background 0.2s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #d8c6a0;
  transition: transform 0.2s ease;
}

.crt-blend-toggle input:checked + .toggle-track {
  background: var(--btn-rust);
}

.crt-blend-toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
  background: var(--amber-bright);
}

/* Unified Steampunk Workshop Twin-Monitor Scene (1670 x 941 — guaranteed to fit full height on screen) */
.dual-console-rig {
  position: relative;
  width: min(95%, calc((100vh - 134px) * 1670 / 941));
  max-width: 1345px;
  aspect-ratio: 1670 / 941;
  margin: 0 auto;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(122, 89, 56, 0.45);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.78);
}

/* Floating Action Buttons OVER top of image, centered over Left Monitor (center X = 28.08%) */
.rig-overlay-left {
  position: absolute;
  left: 28.08%;
  top: 4.2%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

/* Floating Display Switches OVER top of image, centered over Right Monitor (center X = 72.81%) */
.rig-overlay-right {
  position: absolute;
  left: 72.81%;
  top: 4.2%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-compact {
  padding: 8px 13px;
  font-size: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
}

.btn-iron.btn-compact {
  background: rgba(24, 18, 13, 0.86);
}

.rig-bezel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 12;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Exact calibrated screen cutouts tucked smoothly behind the carved superellipse CRT rims */
.crt-screen {
  position: absolute;
  z-index: 2;
  border-radius: 8% / 8%;
  overflow: hidden;
  font-family: var(--font-mono);
  transition: background 0.25s ease, color 0.25s ease;
}

.crt-screen input,
.crt-screen select,
.crt-screen button {
  font-family: var(--font-mono);
}

.rig-screen-left {
  left: 13.65%;
  top: 26.35%;
  width: 28.86%;
  height: 48.25%;
}

.rig-screen-right {
  left: 58.08%;
  top: 26.25%;
  width: 29.46%;
  height: 48.35%;
}

/* CRT Color Wash, Scanlines, Glass Sheen & Weathered Scratches (controlled by CRT Blend toggle) */
.crt-color-wash {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.crt-scanlines {
  position: absolute;
  inset: 0;
  z-index: 9;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(0, 0, 0, 0.22) 0px,
      rgba(0, 0, 0, 0.22) 1px,
      rgba(255, 255, 255, 0.02) 1px,
      transparent 2px,
      transparent 3px
    );
  opacity: 0.64;
  transition: opacity 0.22s ease;
}

.crt-glass-sheen {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 24% 12%, rgba(255, 240, 200, 0.16), transparent 46%),
    radial-gradient(ellipse at 78% 82%, rgba(168, 224, 110, 0.07), transparent 42%),
    radial-gradient(ellipse at 50% 50%, transparent 48%, rgba(0, 0, 0, 0.56) 100%);
  transition: opacity 0.22s ease;
}

/* Subtle Scratches, Corner Hairline Crack & Dusty Edge Grime */
.crt-damage {
  position: absolute;
  inset: 0;
  z-index: 11;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  opacity: 0.72;
  transition: opacity 0.22s ease;
}

.crt-damage-left {
  background-image:
    radial-gradient(circle at 86% 16%, rgba(18, 14, 10, 0.28), transparent 18%),
    radial-gradient(circle at 14% 84%, rgba(24, 18, 12, 0.25), transparent 22%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' preserveAspectRatio='none'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M355 24 L328 52 L308 46 M328 52 L342 78 M328 52 L366 64' stroke='%23000' stroke-opacity='0.38' stroke-width='1.4'/%3E%3Cpath d='M354 23 L327 51 L307 45 M327 51 L341 77 M327 51 L365 63' stroke='%23fff6e0' stroke-opacity='0.34' stroke-width='0.9'/%3E%3Cpath d='M48 112 L94 148' stroke='%23fff5dc' stroke-opacity='0.22' stroke-width='1'/%3E%3Cpath d='M49 113 L95 149' stroke='%23000' stroke-opacity='0.25' stroke-width='1'/%3E%3Cpath d='M282 276 L342 238' stroke='%23fff5dc' stroke-opacity='0.2' stroke-width='0.9'/%3E%3Cpath d='M283 277 L343 239' stroke='%23000' stroke-opacity='0.22' stroke-width='0.9'/%3E%3Cpath d='M62 322 L118 308 M76 336 L102 330' stroke='%23fff5dc' stroke-opacity='0.18' stroke-width='0.8'/%3E%3Cpath d='M165 68 L192 84' stroke='%23fff5dc' stroke-opacity='0.14' stroke-width='0.75'/%3E%3C/g%3E%3Cg fill='%23fff3d6' fill-opacity='0.15'%3E%3Ccircle cx='88' cy='74' r='1.2'/%3E%3Ccircle cx='316' cy='142' r='1'/%3E%3Ccircle cx='72' cy='254' r='1.3'/%3E%3Ccircle cx='294' cy='336' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
}

.crt-damage-right {
  background-image:
    radial-gradient(circle at 14% 86%, rgba(18, 14, 10, 0.28), transparent 20%),
    radial-gradient(circle at 88% 14%, rgba(24, 18, 12, 0.22), transparent 20%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400' preserveAspectRatio='none'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cpath d='M36 364 L68 338 L86 346 M68 338 L52 312 M68 338 L32 328' stroke='%23000' stroke-opacity='0.36' stroke-width='1.3'/%3E%3Cpath d='M35 363 L67 337 L85 345 M67 337 L51 311 M67 337 L31 327' stroke='%23fff6e0' stroke-opacity='0.3' stroke-width='0.85'/%3E%3Cpath d='M294 74 L348 112' stroke='%23fff5dc' stroke-opacity='0.2' stroke-width='0.9'/%3E%3Cpath d='M295 75 L349 113' stroke='%23000' stroke-opacity='0.22' stroke-width='0.9'/%3E%3Cpath d='M52 162 L92 146' stroke='%23fff5dc' stroke-opacity='0.17' stroke-width='0.8'/%3E%3Cpath d='M254 314 L318 296' stroke='%23fff5dc' stroke-opacity='0.16' stroke-width='0.85'/%3E%3C/g%3E%3Cg fill='%23fff3d6' fill-opacity='0.14'%3E%3Ccircle cx='322' cy='218' r='1.2'/%3E%3Ccircle cx='96' cy='62' r='1'/%3E%3Ccircle cx='248' cy='356' r='1.1'/%3E%3C/g%3E%3C/svg%3E");
}

.assembly-bay[data-crt-blend="off"] .crt-color-wash,
.assembly-bay[data-crt-blend="off"] .crt-scanlines,
.assembly-bay[data-crt-blend="off"] .crt-glass-sheen,
.assembly-bay[data-crt-blend="off"] .crt-damage {
  opacity: 0;
}

/* -------- MODE 1: DARK CRT TERMINAL -------- */
.assembly-bay[data-screen-mode="dark"] .crt-screen {
  color: var(--text-warm);
  background-color: #0e140f;
  background-image:
    radial-gradient(ellipse at 50% 42%, rgba(92, 136, 74, 0.24), rgba(9, 13, 10, 0.95) 78%),
    linear-gradient(rgba(164, 218, 136, 0.065) 1px, transparent 1px),
    linear-gradient(90deg, rgba(164, 218, 136, 0.065) 1px, transparent 1px);
  background-size: 100% 100%, 24px 24px, 24px 24px;
}

.assembly-bay[data-screen-mode="dark"][data-crt-blend="on"] .crt-color-wash {
  background:
    radial-gradient(ellipse at 50% 44%, rgba(168, 212, 118, 0.2), rgba(145, 96, 38, 0.16) 72%, rgba(14, 18, 12, 0.32) 100%);
  mix-blend-mode: color;
  opacity: 0.72;
}

.assembly-bay[data-screen-mode="dark"] .sheet-header {
  border-bottom-color: rgba(232, 148, 58, 0.28);
}

.assembly-bay[data-screen-mode="dark"] .sheet-header strong {
  color: #f7ecdc;
}

.assembly-bay[data-screen-mode="dark"] .sheet-header code {
  background: rgba(156, 230, 53, 0.12);
  border-color: rgba(156, 230, 53, 0.35);
  color: #a9ed4d;
}

.assembly-bay[data-screen-mode="dark"] .ruler-ticks,
.assembly-bay[data-screen-mode="dark"] .callout {
  color: rgba(196, 224, 174, 0.56);
  border-left-color: rgba(196, 224, 174, 0.28);
}

.assembly-bay[data-screen-mode="dark"] .callout::before {
  background: rgba(196, 224, 174, 0.28);
}

.assembly-bay[data-screen-mode="dark"][data-crt-blend="on"] .bot-canvas {
  filter: sepia(0.32) hue-rotate(14deg) saturate(0.84) contrast(1.08) brightness(0.94) drop-shadow(0 0 16px rgba(156, 230, 53, 0.28));
}

.assembly-bay[data-screen-mode="dark"] .sheet-footer {
  border-top-color: rgba(232, 148, 58, 0.28);
}

.assembly-bay[data-screen-mode="dark"] .sheet-meta-line {
  color: #d9984c;
}

.assembly-bay[data-screen-mode="dark"] .sheet-memory {
  color: #e9dcc9;
}

/* -------- MODE 2: WARM PARCHMENT CRT -------- */
.assembly-bay[data-screen-mode="parchment"] .crt-screen {
  color: var(--ink-dark);
  background-color: var(--paper-light);
  background-image:
    radial-gradient(ellipse at 50% 45%, rgba(255, 250, 236, 0.58) 0%, rgba(212, 191, 148, 0.45) 68%, rgba(154, 122, 76, 0.55) 100%),
    linear-gradient(rgba(74, 52, 28, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 52, 28, 0.09) 1px, transparent 1px),
    linear-gradient(rgba(74, 52, 28, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 52, 28, 0.04) 1px, transparent 1px);
  background-size: 100% 100%, 56px 56px, 56px 56px, 14px 14px, 14px 14px;
}

.assembly-bay[data-screen-mode="parchment"][data-crt-blend="on"] .crt-color-wash {
  background: radial-gradient(ellipse at 50% 45%, rgba(226, 174, 96, 0.24), rgba(156, 102, 42, 0.28) 100%);
  mix-blend-mode: multiply;
  opacity: 0.55;
}

.assembly-bay[data-screen-mode="parchment"][data-crt-blend="on"] .crt-scanlines {
  opacity: 0.28;
}

.assembly-bay[data-screen-mode="parchment"][data-crt-blend="on"] .crt-glass-sheen {
  background:
    radial-gradient(ellipse at 22% 14%, rgba(255, 252, 240, 0.22), transparent 44%),
    radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(72, 46, 18, 0.42) 100%);
}

/* Composited ink multiply on Parchment mode ONLY when CRT Blend is ON (Layers 1->6 stay opaque over each other) */
.assembly-bay[data-screen-mode="parchment"][data-crt-blend="on"] .bot-canvas {
  filter: sepia(0.28) saturate(0.84) contrast(1.08);
  mix-blend-mode: multiply;
}

/* Parchment Right Monitor Overrides */
.assembly-bay[data-screen-mode="parchment"] .box-title h3,
.assembly-bay[data-screen-mode="parchment"] .l-name {
  color: var(--ink-dark);
}

.assembly-bay[data-screen-mode="parchment"] .box-sub,
.assembly-bay[data-screen-mode="parchment"] .field span,
.assembly-bay[data-screen-mode="parchment"] .l-sub {
  color: var(--ink-muted);
}

.assembly-bay[data-screen-mode="parchment"] .console-block {
  border-bottom-color: rgba(74, 52, 28, 0.25);
}

.assembly-bay[data-screen-mode="parchment"] .field input,
.assembly-bay[data-screen-mode="parchment"] .field select {
  background: rgba(255, 250, 238, 0.78);
  border-color: rgba(94, 70, 44, 0.4);
  color: var(--ink-dark);
}

.assembly-bay[data-screen-mode="parchment"] .layer-card {
  background: rgba(255, 250, 238, 0.58);
  border-color: rgba(94, 70, 44, 0.35);
}

.assembly-bay[data-screen-mode="parchment"] .layer-card.is-expanded {
  border-color: var(--stamp-red);
}

.assembly-bay[data-screen-mode="parchment"] .l-badge {
  background: rgba(156, 52, 36, 0.12);
  border-color: rgba(156, 52, 36, 0.38);
  color: var(--stamp-red);
}

.assembly-bay[data-screen-mode="parchment"] .icon-btn,
.assembly-bay[data-screen-mode="parchment"] .mini-text-btn {
  background: rgba(255, 248, 234, 0.82);
  border-color: rgba(94, 70, 44, 0.4);
  color: var(--ink-dark);
}

.assembly-bay[data-screen-mode="parchment"] .mini-brass-btn {
  background: rgba(156, 52, 36, 0.14);
  border-color: rgba(156, 52, 36, 0.45);
  color: var(--stamp-red);
}

.assembly-bay[data-screen-mode="parchment"] .layer-drawer {
  background: rgba(94, 70, 44, 0.1);
  border-top-color: rgba(94, 70, 44, 0.28);
}

.assembly-bay[data-screen-mode="parchment"] .thumb-btn {
  background: rgba(255, 250, 238, 0.78);
  border-color: rgba(94, 70, 44, 0.32);
  color: var(--ink-muted);
}

.assembly-bay[data-screen-mode="parchment"] .thumb-btn.selected {
  border-color: var(--stamp-red);
  background: rgba(156, 52, 36, 0.14);
  color: var(--ink-dark);
}

/* -------- LEFT SCREEN SAFE INNER LAYOUT (MAXIMIZED WANDERBOT) -------- */
.preview-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 4.2% 6.5% 4.2% 6.5%;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 18px 4px 22px;
  border-bottom: 1px solid rgba(58, 40, 22, 0.32);
}

.sheet-header strong {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.05vw, 14.5px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink-dark);
  white-space: nowrap;
}

.sheet-header code {
  font-family: var(--font-mono);
  font-size: clamp(7px, 0.62vw, 8.5px);
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(58, 40, 22, 0.1);
  border: 1px solid rgba(58, 40, 22, 0.25);
  color: #4b3420;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.schematic-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  margin: 0;
  overflow: hidden;
}

.ruler-ticks {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: clamp(7.5px, 0.72vw, 9px);
  color: rgba(65, 47, 29, 0.62);
  border-left: 1.5px solid rgba(65, 47, 29, 0.3);
  padding-left: 5px;
  pointer-events: none;
}

.callout-rail {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 64px;
  pointer-events: none;
}

.callout {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: clamp(7.5px, 0.72vw, 9px);
  font-weight: 700;
  color: rgba(65, 47, 29, 0.68);
}

.callout::before {
  content: "";
  width: 10px;
  height: 1px;
  background: rgba(65, 47, 29, 0.35);
}

.bot-canvas {
  position: relative;
  height: 100%;
  aspect-ratio: 476 / 842;
  max-width: 100%;
  z-index: 2;
  transition: filter 0.2s ease;
}

.bot-canvas img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: scale(1.04);
  transform-origin: center 50%;
  user-select: none;
  -webkit-user-drag: none;
}

.sheet-footer {
  padding-top: 4px;
  border-top: 1px solid rgba(58, 40, 22, 0.32);
}

.sheet-meta-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: clamp(7.5px, 0.68vw, 9px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 2px;
}

.meta-sep {
  opacity: 0.5;
}

.sheet-memory {
  margin: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: clamp(7.5px, 0.66vw, 9px);
  line-height: 1.28;
  color: #352518;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Console Action Bar above the Workshop Scene */
.rig-actions {
  width: 95%;
  max-width: 1345px;
  margin: 0 auto 14px;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.rig-actions .btn-brass {
  min-width: 165px;
}

/* -------- RIGHT SCREEN SAFE SCROLLABLE CONSOLE -------- */
.controls-scroll {
  position: relative;
  z-index: 2;
  height: 100%;
  overflow-y: auto;
  padding: 6.5% 7.5% 6.5% 7.5%;
}

.controls-scroll::-webkit-scrollbar,
.thumb-grid::-webkit-scrollbar {
  width: 6px;
}

.controls-scroll::-webkit-scrollbar-thumb,
.thumb-grid::-webkit-scrollbar-thumb {
  background: rgba(164, 130, 88, 0.45);
  border-radius: 999px;
}

.console-block {
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(232, 148, 58, 0.2);
}

.console-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 2px;
}

.box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.box-title h3 {
  margin: 0;
  font-family: var(--font-mono);
  font-size: clamp(11.5px, 1vw, 13.5px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-bright);
}

.box-sub {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--text-muted);
}

.mini-brass-btn {
  padding: 4px 8px;
  border-radius: 5px;
  border: 1px solid var(--border-brass);
  background: rgba(232, 148, 58, 0.16);
  color: var(--amber-bright);
  font-size: 10.5px;
  font-weight: 700;
}

.mini-brass-btn:hover {
  background: rgba(232, 148, 58, 0.28);
}

.mini-text-btn {
  background: transparent;
  border: 1px solid var(--border-rust);
  border-radius: 5px;
  padding: 3px 8px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 600;
}

.mini-text-btn:hover {
  color: var(--text-warm);
  border-color: var(--border-brass);
}

.identity-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.field-full {
  grid-column: 1 / -1;
}

.field span {
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field input,
.field select {
  width: 100%;
  padding: 5px 8px;
  border-radius: 5px;
  border: 1px solid rgba(122, 89, 56, 0.45);
  background: rgba(8, 12, 9, 0.78);
  color: var(--text-warm);
  font-size: 11.5px;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--amber);
}

.layer-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layer-card {
  background: rgba(8, 12, 9, 0.66);
  border: 1px solid rgba(122, 89, 56, 0.36);
  border-radius: 7px;
  overflow: hidden;
  transition: border-color 0.15s ease;
}

.layer-card.is-expanded {
  border-color: var(--amber);
}

.layer-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  cursor: pointer;
}

.layer-row:hover {
  background: rgba(232, 148, 58, 0.07);
}

.part-thumb-mini {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 5px;
  background: var(--paper-mid);
  border: 1px solid #785d3c;
  overflow: hidden;
}

.part-thumb-mini img {
  position: absolute;
  max-width: none;
  height: auto;
  filter: sepia(0.14);
  mix-blend-mode: multiply;
}

.layer-meta-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.l-badge {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(232, 148, 58, 0.16);
  border: 1px solid rgba(232, 148, 58, 0.38);
  color: var(--amber-bright);
}

.l-name {
  font-size: 12px;
  font-weight: 700;
}

.l-sub {
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--text-muted);
}

.layer-btns {
  display: flex;
  gap: 4px;
}

.icon-btn {
  width: 25px;
  height: 25px;
  border-radius: 5px;
  border: 1px solid rgba(122, 89, 56, 0.45);
  background: rgba(28, 22, 16, 0.85);
  color: var(--text-warm);
  font-size: 10.5px;
  display: grid;
  place-items: center;
}

.icon-btn:hover {
  background: var(--bg-iron-hover);
  border-color: var(--amber);
}

.icon-btn.is-locked {
  border-color: var(--amber);
  color: var(--amber-bright);
  background: rgba(232, 148, 58, 0.22);
}

.layer-drawer {
  display: none;
  padding: 7px 8px 8px;
  border-top: 1px solid rgba(122, 89, 56, 0.3);
  background: rgba(0, 0, 0, 0.25);
}

.layer-card.is-expanded .layer-drawer {
  display: block;
}

.thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
  gap: 5px;
  max-height: 150px;
  overflow-y: auto;
}

.thumb-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3px;
  border-radius: 5px;
  border: 1px solid rgba(122, 89, 56, 0.35);
  background: rgba(22, 18, 13, 0.85);
  color: var(--text-muted);
}

.thumb-btn:hover {
  border-color: var(--border-brass);
}

.thumb-btn.selected {
  border-color: var(--amber-bright);
  background: rgba(232, 148, 58, 0.2);
  color: #fff;
}

.thumb-box {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 4px;
  background: var(--paper-light);
  overflow: hidden;
}

.thumb-box img {
  position: absolute;
  max-width: none;
  height: auto;
  filter: sepia(0.14);
  mix-blend-mode: multiply;
}

.thumb-btn span {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
}

/* =========================================
   ABOUT PAGE (SHORT & CLEAN)
   ========================================= */
.about-page {
  padding: 56px 24px 72px;
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 148, 58, 0.08), transparent 46%),
    var(--bg-soot);
}

.about-wrap {
  max-width: 620px;
  margin: 0 auto;
}

.about-emblem {
  width: 112px;
  height: auto;
  display: block;
  margin-bottom: 18px;
}

.about-wrap h1 {
  margin: 0 0 18px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 4vw, 38px);
  color: #fff5e6;
}

.about-copy p {
  margin: 0 0 16px;
  font-size: 15.5px;
  line-height: 1.7;
  color: #ddd0be;
}

.about-block {
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--border-rust);
}

.about-block h2 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 21px;
  color: #fff5e6;
}

.about-block p {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-muted);
}

.dispatch-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dispatch-form input {
  flex: 1 1 220px;
  padding: 11px 13px;
  border-radius: 6px;
  border: 1px solid var(--border-rust);
  background: var(--bg-timber);
  color: var(--text-warm);
  font-size: 14px;
}

.dispatch-form input:focus {
  outline: none;
  border-color: var(--amber);
}

.about-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.about-socials {
  margin-top: 36px;
  padding-top: 22px;
  border-top: 1px solid var(--border-rust);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}

.about-socials a {
  color: var(--text-warm);
  text-decoration: none;
  font-weight: 700;
}

.about-socials a:hover {
  color: var(--amber-bright);
}

/* Modal & Toast */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(8, 6, 4, 0.78);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-box {
  position: relative;
  max-width: 500px;
  width: 100%;
  background: var(--bg-timber);
  border: 1px solid var(--border-brass);
  border-radius: 10px;
  padding: 22px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-rust);
  background: var(--bg-soot);
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
}

.modal-box h3 {
  margin: 0 0 8px;
  font-family: var(--font-serif);
  font-size: 20px;
}

.modal-box p {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.submission-preview {
  margin: 0 0 16px;
  padding: 12px;
  border-radius: 6px;
  background: var(--bg-soot);
  border: 1px solid var(--border-rust);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--amber-bright);
  white-space: pre-wrap;
}

.modal-actions {
  display: flex;
  gap: 10px;
}

.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  padding: 10px 16px;
  border-radius: 999px;
  background: #1b1510;
  border: 1px solid var(--amber);
  color: #fff5e6;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 140;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Responsive */
.page-builder .site-footer {
  position: relative;
  z-index: 2;
}

@media (max-width: 900px) {
  .dual-console-rig {
    width: 100%;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: none;
    box-shadow: none;
    overflow: visible;
  }

  .rig-overlay-left,
  .rig-overlay-right {
    position: static;
    transform: none;
    flex-wrap: wrap;
  }

  .rig-bezel {
    display: none;
  }

  .crt-screen {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    border: 8px solid #4e4736;
    border-radius: 16px;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.7), 0 0 0 2px #262018 inset;
  }

  .rig-screen-left {
    height: 520px !important;
  }

  .rig-screen-right .controls-scroll {
    max-height: 520px;
  }
}

@media (max-width: 640px) {
  .nav-inner {
    padding: 10px 16px;
  }

  .nav-links {
    gap: 12px;
  }

  .nav-links a {
    font-size: 12px;
  }

  .nav-logo {
    height: 34px;
  }

  .preview-inner {
    padding: 14px 14px 12px;
  }

  .controls-scroll {
    padding: 14px 12px;
  }

  .identity-fields {
    grid-template-columns: 1fr;
  }

  .callout-rail,
  .ruler-ticks {
    display: none;
  }
}
