/* ==========================================================================
   FoldCheck Design System — Warm Editorial Precision + Realistic Hardware
   Unified 12-token :root palette (zero raw color sprawl)
   ========================================================================== */

:root {
  --bg: #FAF9F6;
  --surface: #FFFFFF;
  --dark: #0D0D0F;
  --dark-surface: #18181C;
  --ink: #141416;
  --muted: #5F6368;
  --border: #E4E4DF;
  --accent: #4F46E5;
  --accent-hover: #3730A3;
  --pass: #166534;
  --warn: #92400E;
  --fail: #B91C1C;

  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-display: "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, var(--ink) 6%, transparent);
  --shadow-md: 0 8px 28px color-mix(in srgb, var(--ink) 8%, transparent);
  --shadow-device: 0 28px 64px -16px color-mix(in srgb, var(--dark) 36%, transparent), 0 8px 20px -8px color-mix(in srgb, var(--dark) 22%, transparent);
}

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

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code, pre {
  font-family: var(--font-mono);
}

/* ==========================================================================
   Sticky Frosted Navigation Bar (56px)
   ========================================================================== */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 56px;
  background: rgba(247, 247, 244, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.site-nav-inner {
  width: 100%;
  max-width: min(94vw, 1680px);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-link:hover {
  text-decoration: none;
}

.brand-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--accent-hover);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

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

.nav-links a {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  transition: color 0.15s ease, background 0.15s ease;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.is-current {
  color: var(--ink);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}

.nav-cta {
  background: var(--ink) !important;
  color: var(--surface) !important;
  padding: 7px 14px !important;
  font-weight: 600 !important;
  margin-left: 6px;
}

.nav-cta:hover {
  background: var(--accent) !important;
  color: var(--surface) !important;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* ==========================================================================
   Above-the-Fold Foldable H5 Studio (Full Service Visible Immediately)
   ========================================================================== */

.studio-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Compact Top Command Strip */
.studio-command {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.studio-title-block {
  display: flex;
  flex-direction: column;
  min-width: 210px;
}

.studio-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

.studio-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
  color: var(--ink);
}

.input-mode-group {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 2px;
}

.mode-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.mode-btn.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.url-panel {
  flex: 1 1 340px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.url-form {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px 4px 3px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.url-form:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.url-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  outline: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  border-color: color-mix(in srgb, var(--ink) 26%, transparent);
  background: var(--bg);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--surface);
}

.btn-dark {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

.btn-dark:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.btn-sm {
  font-size: 12px;
  padding: 5px 10px;
}

.preset-strip {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.preset-chip {
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.15s ease;
}

.preset-chip:hover {
  color: var(--ink);
  border-color: var(--accent);
  background: var(--surface);
}

.html-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.html-textarea {
  width: 100%;
  min-height: 92px;
  max-height: 180px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 10px 12px;
  resize: vertical;
}

.html-panel-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* 8-Device Hardware Selector Strip */
.device-rail {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 1px;
  scrollbar-width: thin;
}

.device-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  padding: 6px 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  text-align: left;
}

.device-pill:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.device-pill.is-active {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

.device-mini-icon {
  width: 22px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg);
}

.device-mini-icon.is-book::after {
  content: "";
  width: 1px;
  height: 100%;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
}

.device-mini-icon.is-clamshell {
  width: 15px;
  height: 20px;
}

.device-mini-icon.is-clamshell::after {
  content: "";
  width: 100%;
  height: 1px;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
}

.device-mini-icon.is-trifold {
  width: 26px;
  height: 18px;
}

.device-mini-icon.is-trifold::before,
.device-mini-icon.is-trifold::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: color-mix(in srgb, var(--ink) 35%, transparent);
}

.device-mini-icon.is-trifold::before { left: 33%; }
.device-mini-icon.is-trifold::after { left: 67%; }

.device-pill-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.device-pill-name {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
}

.device-pill-sub {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

/* Status Banner */
.fc-banner {
  border-radius: var(--radius-md);
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border);
}

.fc-banner-info {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--ink);
}

.fc-banner-warn {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--warn) 32%, transparent);
  color: var(--ink);
}

.fc-banner-error {
  background: var(--surface);
  border-color: var(--fail);
  color: var(--fail);
}

/* Main 2-Column Workspace (Stage + Repair Workbench) */
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.38fr) minmax(350px, 0.92fr);
  gap: 14px;
  align-items: stretch;
  min-height: 560px;
  height: calc(100vh - 186px);
  height: calc(100dvh - 186px);
  max-height: 760px;
}

/* Left/Center Hardware Stage */
.stage-card {
  position: relative;
  background:
    radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--ink) 8%, transparent) 1px, transparent 0) 0 0 / 20px 20px,
    var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.stage-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  flex-wrap: wrap;
}

.stage-spec-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.viewport-badge {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.hardware-badge {
  font-size: 12px;
  color: var(--muted);
}

.stage-right-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.telemetry-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.zoom-select {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.stage-viewport-area {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px 110px;
  overflow: auto;
}

.single-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.scaled-device-wrap {
  position: relative;
  flex-shrink: 0;
  transition: width 0.24s cubic-bezier(0.22, 1, 0.36, 1), height 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   Realistic Flagship Hardware Chassis System
   ========================================================================== */

.device-chassis {
  --bezel-px: 11px;
  --outer-radius: 34px;
  --inner-radius: 24px;
  --frame-base: color-mix(in srgb, var(--ink) 14%, var(--surface));
  --frame-edge: color-mix(in srgb, var(--ink) 36%, var(--surface));
  --frame-highlight: var(--surface);

  position: absolute;
  top: 0;
  left: 0;
  transform-origin: top left;
  padding: calc(var(--bezel-px) + 4px);
  border-radius: var(--outer-radius);
  background:
    linear-gradient(145deg, var(--frame-highlight) 0%, var(--frame-base) 28%, var(--frame-edge) 55%, var(--frame-base) 82%, var(--frame-highlight) 100%);
  box-shadow:
    var(--shadow-device),
    inset 0 0 0 1.5px color-mix(in srgb, var(--surface) 65%, transparent),
    inset 0 0 0 4px var(--dark);
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1), border-radius 0.24s ease;
}

/* Authentic Flagship Material Finishes (100% derived from the 12-token :root palette) */
.device-chassis[data-finish="titanium-silver"] {
  --frame-base: color-mix(in srgb, var(--ink) 14%, var(--surface));
  --frame-edge: color-mix(in srgb, var(--ink) 36%, var(--surface));
  --frame-highlight: var(--surface);
}

.device-chassis[data-finish="armor-graphite"] {
  --frame-base: color-mix(in srgb, var(--dark) 82%, var(--surface));
  --frame-edge: var(--dark);
  --frame-highlight: color-mix(in srgb, var(--muted) 72%, var(--surface));
}

.device-chassis[data-finish="cobalt-aluminum"] {
  --frame-base: color-mix(in srgb, var(--accent-hover) 44%, var(--dark));
  --frame-edge: var(--dark);
  --frame-highlight: color-mix(in srgb, var(--accent) 46%, var(--surface));
}

.device-chassis[data-finish="obsidian-gold"] {
  --frame-base: color-mix(in srgb, var(--warn) 22%, var(--dark));
  --frame-edge: var(--dark);
  --frame-highlight: color-mix(in srgb, var(--warn) 56%, var(--surface));
}

.device-chassis[data-finish="porcelain-matte"] {
  --frame-base: var(--bg);
  --frame-edge: var(--border);
  --frame-highlight: var(--surface);
}

.device-chassis[data-finish="titanium-mist"] {
  --frame-base: color-mix(in srgb, var(--muted) 30%, var(--surface));
  --frame-edge: var(--muted);
  --frame-highlight: var(--bg);
}

.device-chassis[data-finish="crimson-gold"] {
  --frame-base: color-mix(in srgb, var(--fail) 34%, var(--dark));
  --frame-edge: var(--dark);
  --frame-highlight: color-mix(in srgb, var(--warn) 58%, var(--surface));
}

.device-chassis[data-finish="titanium-slate"] {
  --frame-base: color-mix(in srgb, var(--muted) 72%, var(--dark));
  --frame-edge: var(--dark-surface);
  --frame-highlight: color-mix(in srgb, var(--muted) 42%, var(--surface));
}

/* Physical Machined Side Buttons */
.device-chassis::before,
.device-chassis::after {
  content: "";
  position: absolute;
  right: -3.5px;
  width: 3.5px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--frame-highlight), var(--frame-edge));
  pointer-events: none;
}

.device-chassis::before {
  top: 132px;
  height: 54px;
}

.device-chassis::after {
  top: 204px;
  height: 76px;
}

/* Folded Cover Left Metallic Hinge Spine Rib */
.device-chassis[data-hinge-edge="left"] {
  box-shadow:
    var(--shadow-device),
    -4px 0 0 -1px var(--frame-edge),
    inset 4px 0 6px -2px color-mix(in srgb, var(--dark) 50%, transparent),
    inset 0 0 0 1.5px color-mix(in srgb, var(--surface) 60%, transparent),
    inset 0 0 0 4px var(--dark);
}

/* Black Inner Display Bezel & Screen Mask */
.device-screen {
  position: relative;
  border-radius: var(--inner-radius);
  overflow: hidden;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--dark) 18%, transparent);
}

.device-screen iframe {
  display: block;
  border: 0;
  background: var(--surface);
}

/* Hinge Knuckle Caps (Unfolded Book / Clamshell / Tri-Fold) */
.fc-hinge-caps {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 8;
}

.fc-hinge-center-v::before,
.fc-hinge-center-v::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--frame-edge), var(--frame-highlight), var(--frame-edge));
  box-shadow: 0 1px 2px color-mix(in srgb, var(--dark) 45%, transparent);
}

.fc-hinge-center-v::before { top: 1px; }
.fc-hinge-center-v::after { bottom: 1px; }

.fc-hinge-center-h::before,
.fc-hinge-center-h::after {
  content: "";
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 24px;
  width: 7px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--frame-edge), var(--frame-highlight), var(--frame-edge));
}

.fc-hinge-center-h::before { left: 1px; }
.fc-hinge-center-h::after { right: 1px; }

.fc-hinge-trifold-v::before,
.fc-hinge-trifold-v::after {
  content: "";
  position: absolute;
  top: 1px;
  width: 20px;
  height: 7px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--frame-edge), var(--frame-highlight), var(--frame-edge));
}

.fc-hinge-trifold-v::before { left: 33.3%; transform: translateX(-50%); }
.fc-hinge-trifold-v::after { left: 66.7%; transform: translateX(-50%); }

/* Authentic Camera Cutouts */
.fc-cutout {
  position: absolute;
  z-index: 12;
  pointer-events: none;
}

.fc-cutout-none {
  display: none;
}

.fc-cutout-punch-right {
  top: 14px;
  right: 20px;
}

.fc-cutout-punch-center {
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
}

.fc-cutout-punch-right-pane {
  top: 12px;
  left: 75%;
  transform: translateX(-50%);
}

.fc-cutout-punch-top-right {
  top: 14px;
  right: 24px;
}

.fc-cutout-punch-left-pane {
  top: 12px;
  left: 16.6%;
  transform: translateX(-50%);
}

.fc-camera-ring {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 36%, color-mix(in srgb, var(--accent) 45%, var(--dark)) 0%, var(--dark) 52%, var(--dark-surface) 100%);
  box-shadow: 0 0 0 2px var(--dark), inset 0 0 2px color-mix(in srgb, var(--surface) 40%, transparent);
}

/* Galaxy Z Flip 7 Dual Rear Lenses inside Cover FlexWindow */
.fc-cutout-flip-dual-lens,
.fc-cutout-razr-dual-lens {
  bottom: 14px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--dark);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--dark) 50%, transparent);
}

.fc-lens {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 40%, var(--dark)) 0%, var(--dark) 62%, var(--dark-surface) 100%);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 30%, var(--dark));
}

.fc-flash {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--warn) 45%, var(--surface));
}

/* Realistic Translucent OS Status Bar & Home Pill */
.fc-status-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  padding: 6px 18px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 78%, transparent) 0%, transparent 100%);
  pointer-events: none;
  z-index: 10;
}

.fc-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.fc-battery {
  width: 18px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 2.5px;
  padding: 1px;
  display: inline-flex;
}

.fc-battery::after {
  content: "";
  width: 82%;
  height: 100%;
  background: currentColor;
  border-radius: 1px;
}

.fc-home-bar {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 118px;
  height: 4px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--ink) 42%, transparent);
  pointer-events: none;
  z-index: 10;
}

/* Optical Fold Crease Specular Overlay */
.fc-device-creases {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 11;
}

.fc-crease {
  position: absolute;
  pointer-events: none;
  opacity: var(--crease-alpha, 0.55);
}

.fc-crease-vertical {
  top: 0;
  bottom: 0;
  left: var(--crease-pos, 50%);
  transform: translateX(-50%);
  width: 28px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    color-mix(in srgb, var(--dark) 12%, transparent) 38%,
    color-mix(in srgb, var(--surface) 45%, transparent) 50%,
    color-mix(in srgb, var(--dark) 12%, transparent) 62%,
    transparent 100%
  );
}

.fc-crease-vertical.is-labeled {
  border-left: 1px dashed color-mix(in srgb, var(--accent) 48%, transparent);
  border-right: 1px dashed color-mix(in srgb, var(--accent) 48%, transparent);
}

.fc-crease-horizontal {
  left: 0;
  right: 0;
  top: var(--crease-pos, 50%);
  transform: translateY(-50%);
  height: 28px;
  background: linear-gradient(
    180deg,
    transparent 0%,
    color-mix(in srgb, var(--dark) 12%, transparent) 38%,
    color-mix(in srgb, var(--surface) 45%, transparent) 50%,
    color-mix(in srgb, var(--dark) 12%, transparent) 62%,
    transparent 100%
  );
}

.fc-crease-horizontal.is-labeled {
  border-top: 1px dashed color-mix(in srgb, var(--accent) 48%, transparent);
  border-bottom: 1px dashed color-mix(in srgb, var(--accent) 48%, transparent);
}

.fc-crease-label {
  position: absolute;
  top: 34px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.fc-crease-horizontal .fc-crease-label {
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
}

.fc-companion-hint {
  width: 112px;
  height: 300px;
  border: 1.5px dashed color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: var(--radius-lg);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  gap: 6px;
}

/* Compare Cover + Inner Side-by-Side Stage */
.compare-stage {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 24px;
  flex-wrap: nowrap;
}

.compare-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.compare-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.fc-mini-score.fc-tone-pass { color: var(--pass); }
.fc-mini-score.fc-tone-warn { color: var(--warn); }
.fc-mini-score.fc-tone-fail { color: var(--fail); }

/* ==========================================================================
   Floating Frosted-Charcoal Hardware Control Dock (Doan Labs Inspired!)
   ========================================================================== */

.floating-dock-wrap {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 25;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  pointer-events: none;
}

.floating-dock {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--dark);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid color-mix(in srgb, var(--surface) 14%, transparent);
  border-radius: var(--radius-pill);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--dark) 36%, transparent);
  color: var(--surface);
}

.dock-divider {
  width: 1px;
  height: 18px;
  background: color-mix(in srgb, var(--surface) 16%, transparent);
  margin: 0 2px;
}

.dock-slider-group {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 4px;
}

.dock-slider {
  width: 82px;
  accent-color: var(--accent);
  cursor: pointer;
}

.dock-readout {
  font-family: var(--font-mono);
  font-size: 12px;
  min-width: 34px;
  color: var(--surface);
}

.dock-btn {
  border: 0;
  background: transparent;
  color: var(--surface);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 0.14s ease, color 0.14s ease;
}

.dock-btn:hover {
  background: var(--dark-surface);
  color: var(--surface);
}

.dock-btn.is-active {
  background: var(--accent);
  color: var(--surface);
}

.dock-btn-fix.is-active {
  background: var(--pass);
  color: var(--surface);
}

.fc-state-dim {
  font-family: var(--font-mono);
  font-size: 12px;
  opacity: 0.75;
}

.dock-hint {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  background: var(--surface);
  padding: 1px 10px;
  border-radius: var(--radius-pill);
}

/* ==========================================================================
   Right Inspector & H5 Repair Workbench
   ========================================================================== */

.workbench-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.score-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
}

.score-ring {
  --score-pct: 100%;
  --ring-color: var(--pass);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring-color) var(--score-pct), var(--border) 0);
  position: relative;
}

.score-ring[data-tone="pass"] { --ring-color: var(--pass); }
.score-ring[data-tone="warn"] { --ring-color: var(--warn); }
.score-ring[data-tone="fail"] { --ring-color: var(--fail); }

.score-ring::before {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  background: var(--surface);
}

.score-value {
  position: relative;
  z-index: 1;
  font-family: var(--font-mono);
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
}

.score-summary {
  flex: 1;
  min-width: 0;
}

.score-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.status-pill[data-tone="pass"] {
  background: var(--bg);
  border: 1px solid var(--pass);
  color: var(--pass);
}

.status-pill[data-tone="warn"] {
  background: var(--bg);
  border: 1px solid var(--warn);
  color: var(--warn);
}

.status-pill[data-tone="fail"] {
  background: var(--bg);
  border: 1px solid var(--fail);
  color: var(--fail);
}

.score-delta {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--pass);
  color: var(--pass);
}

.score-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted);
}

.score-batch-actions {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

/* Workbench Tabs */
.wb-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.wb-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  padding: 10px 6px;
  cursor: pointer;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.wb-tab:hover {
  color: var(--ink);
}

.wb-tab.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  background: var(--surface);
}

.wb-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
}

/* Issues Panel */
.fc-issue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fc-clean-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--pass) 9%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--pass) 28%, transparent);
}

.fc-clean-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--pass);
  color: var(--surface);
  display: grid;
  place-items: center;
  font-weight: 800;
  flex-shrink: 0;
}

.fc-clean-card p {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.fc-issue-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.fc-issue-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
}

.fc-issue-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent);
}

.fc-issue-head {
  display: flex;
  align-items: center;
  gap: 7px;
}

.fc-sev {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 5px;
}

.fc-sev-high {
  background: var(--bg);
  border: 1px solid var(--fail);
  color: var(--fail);
}

.fc-sev-medium {
  background: var(--bg);
  border: 1px solid var(--warn);
  color: var(--warn);
}

.fc-sev-low {
  background: var(--bg);
  border: 1px solid var(--accent);
  color: var(--accent-hover);
}

.fc-sev-info {
  background: var(--bg);
  color: var(--muted);
}

.fc-issue-title {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.fc-issue-penalty {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.fc-issue-detail {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--muted);
}

.fc-issue-sels {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.fc-issue-sels code {
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 1px 6px;
  border-radius: 5px;
  color: var(--ink);
}

.fc-issue-fix {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ink);
}

/* Repair Kit Workbench Panel */
.repair-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  background: var(--bg);
}

.repair-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.repair-block h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.repair-block p {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
}

.repair-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.code-box {
  margin: 8px 0 0;
  background: var(--dark);
  color: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.5;
  overflow: auto;
  max-height: 210px;
  white-space: pre-wrap;
  word-break: break-word;
}

.meta-fix-alert {
  margin: 6px 0;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--warn) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--warn) 32%, transparent);
  font-size: 12px;
}

/* Matrix Table */
.fc-matrix-meta {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--muted);
}

.fc-matrix-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.fc-matrix-table th,
.fc-matrix-table td {
  padding: 5px 4px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.fc-matrix-table th:first-child {
  text-align: left;
  font-weight: 700;
}

.fc-matrix-cell {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 5px 4px;
  background: var(--bg);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.15;
}

.fc-matrix-cell strong {
  font-family: var(--font-mono);
  font-size: 13px;
}

.fc-matrix-cell span {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.fc-matrix-cell.fc-tone-pass {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--pass) 30%, transparent);
  color: var(--pass);
}

.fc-matrix-cell.fc-tone-warn {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--warn) 30%, transparent);
  color: var(--warn);
}

.fc-matrix-cell.fc-tone-fail {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--fail) 28%, transparent);
  color: var(--fail);
}

/* ==========================================================================
   Editorial Sections (Alternating Warm Light & Obsidian Dark like Doan Labs)
   ========================================================================== */

.section-band {
  padding: 64px 20px;
  border-top: 1px solid var(--border);
}

.section-dark {
  background: var(--dark);
  color: var(--bg);
  border-top-color: color-mix(in srgb, var(--surface) 10%, transparent);
}

.section-inner {
  max-width: 1220px;
  margin: 0 auto;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 10px;
}

.section-dark .section-eyebrow {
  color: var(--bg);
}

.section-title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.section-lead {
  margin: 0 0 32px;
  max-width: 68ch;
  font-size: 16px;
  color: var(--muted);
}

.section-dark .section-lead {
  color: var(--bg);
}

/* Device Fleet Cards (Dark Showcase Section) */
.fleet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}

.fleet-card {
  background: var(--dark-surface);
  border: 1px solid color-mix(in srgb, var(--surface) 11%, transparent);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.fleet-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.fleet-vendor {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--bg);
  text-transform: uppercase;
}

.fleet-name {
  margin: 2px 0 0;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--surface);
}

.fleet-tier {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  background: var(--dark);
  border: 1px solid var(--accent);
  color: var(--surface);
}

.fleet-hw {
  margin: 0;
  font-size: 12.5px;
  color: var(--bg);
}

.fleet-dims {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 2px;
}

.fleet-dim-item {
  background: var(--dark);
  border: 1px solid color-mix(in srgb, var(--surface) 8%, transparent);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
}

.fleet-dim-item span {
  color: var(--bg);
}

.fleet-dim-item strong {
  color: var(--surface);
}

.fleet-card .btn {
  margin-top: auto;
  background: var(--dark);
  border-color: var(--muted);
  color: var(--surface);
}

.fleet-card .btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* Workflow / Feature Cards */
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.info-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.info-card .card-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
}

/* ==========================================================================
   Subpages Layout (Guide, Checklist, SDK, CLI, Legal)
   ========================================================================== */

.page-shell {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}

.page-shell > * {
  min-width: 0;
}

.page-hero code,
.prose-section p code {
  white-space: nowrap;
}

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}

.page-hero {
  margin-bottom: 32px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
}

.page-hero p {
  margin: 0;
  font-size: 16.5px;
  color: var(--muted);
  max-width: 66ch;
}

.prose-section {
  margin-top: 36px;
}

.prose-section h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.prose-section p,
.prose-section li {
  color: var(--muted);
  max-width: 72ch;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table th,
.data-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--bg);
  font-weight: 700;
  color: var(--ink);
}

/* Interactive Checklist Page */
.progress-bar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.progress-track {
  flex: 1 1 220px;
  height: 10px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  background: var(--pass);
  transition: width 0.2s ease;
}

.check-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 12px;
  transition: border-color 0.15s ease, opacity 0.15s ease;
}

.check-card.is-done {
  border-color: color-mix(in srgb, var(--pass) 40%, var(--border));
  background: color-mix(in srgb, var(--pass) 4%, var(--surface));
}

.check-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.check-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--pass);
  flex-shrink: 0;
}

/* CLI Builder & Source Viewer */
.builder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

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

.field-group label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.field-group input,
.field-group select {
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

.source-pre {
  max-height: 460px;
  overflow: auto;
  background: var(--dark);
  color: var(--bg);
  padding: 16px;
  border-radius: var(--radius-md);
  font-size: 12px;
  line-height: 1.5;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
}

.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

.faq-item p {
  margin: 10px 0 0;
  font-size: 14px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 20px;
}

.site-footer-inner {
  max-width: 1220px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--ink);
}

/* ==========================================================================
   Responsive Breakpoints (FoldCheck Itself Must Score 100/100 on Foldables!)
   ========================================================================== */

@media (max-width: 1080px) {
  .studio-grid {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }

  .stage-card {
    min-height: 540px;
  }

  .workbench-card {
    min-height: 480px;
  }
}

@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-cta {
    margin-left: 0;
    text-align: center;
  }

  .studio-shell {
    padding: 10px 12px 18px;
  }

  .floating-dock {
    border-radius: var(--radius-lg);
  }
}

@media (max-height: 500px) {
  .site-nav {
    position: static;
  }
}

/* ---- engine-only additions ---- */
.source-pre, #cli-source-code { white-space: pre; overflow-x: auto; }
[data-fc-bookmarklet] { cursor: grab; }
.fc-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }



/* ---- SEO, GEO, A11y & UX Polish Additions ---- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 200;
  background: var(--ink);
  color: var(--surface);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
}
.skip-link:focus {
  left: 16px;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.stage-viewport-area {
  min-height: 440px;
}
.workbench-card {
  min-height: 480px;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
}
@media (max-width: 760px) {
  .nav-links a {
    min-height: 44px;
  }
}
.checklist-phase-title {
  margin: 28px 0 12px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.check-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--ink);
}
.check-meta-cat {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.faq-item summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
}
.faq-item summary::-webkit-details-marker {
  display: none;
}
.faq-item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
  flex-shrink: 0;
}
.faq-item[open] summary::after {
  content: "−";
}
.related-strip {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.related-strip h2 {
  margin: 0 0 14px;
  font-size: 20px;
}
.prose-section h3 {
  margin: 20px 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}
.prose-section ul, .prose-section ol {
  padding-left: 1.25rem;
  margin: 10px 0 14px;
}
.prose-section li {
  margin-bottom: 6px;
}
/* ==========================================================================
   v21 Gallery Studio 3D Orbit, Safari 27.1 Chrome, Unified Split & AEO Blocks
   100% derived from the 12-token :root palette (0 extra colors, >= 12px text)
   ========================================================================== */

.stage-viewport-area {
  background:
    radial-gradient(ellipse 68% 58% at 50% 44%, color-mix(in srgb, var(--accent) 5%, var(--surface)) 0%, var(--bg) 74%);
  cursor: grab;
  user-select: none;
}

.stage-viewport-area.is-orbiting {
  cursor: grabbing;
}

.single-stage {
  perspective: 1800px;
  transform-style: preserve-3d;
}

.scaled-device-wrap {
  filter: drop-shadow(0 28px 34px color-mix(in srgb, var(--dark) 18%, transparent));
}

.device-chassis {
  transform-style: preserve-3d;
  will-change: transform;
}

.device-chassis.is-dragging {
  transition: none !important;
}

/* Dynamic glossy rim & studio reflection sweeping across bezel during 3D orbit */
.fc-glass-sheen {
  position: absolute;
  inset: 0;
  border-radius: var(--inner-radius);
  pointer-events: none;
  z-index: 13;
  background: linear-gradient(
    var(--sheen-angle, 125deg),
    color-mix(in srgb, var(--surface) 18%, transparent) 0%,
    transparent 34%,
    transparent 68%,
    color-mix(in srgb, var(--surface) 10%, transparent) 100%
  );
  opacity: var(--sheen-opacity, 0.35);
  transition: opacity 0.2s ease;
}

/* Interactive physical side button (click to toggle Cover <-> Inner) */
.fc-side-btn {
  position: absolute;
  right: -6px;
  top: 130px;
  width: 7px;
  height: 62px;
  border: 0;
  padding: 0;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, var(--frame-highlight), var(--frame-edge));
  cursor: pointer;
  z-index: 20;
  box-shadow: 1px 0 3px color-mix(in srgb, var(--dark) 35%, transparent);
}

.fc-side-btn:hover {
  background: var(--accent);
}

/* Authentic iOS Dynamic Island for iPhone Duo Cover */
.fc-cutout-dynamic-island {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 24px;
  border-radius: 999px;
  background: var(--dark);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 7px;
  box-shadow: 0 2px 6px color-mix(in srgb, var(--dark) 35%, transparent);
}

.fc-cutout-dynamic-island .fc-camera-ring {
  width: 11px;
  height: 11px;
}

/* Safari 27.1 / Mobile Browser Address Bar Simulation */
.fc-browser-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  margin: 0 12px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface) 92%, var(--bg));
  border: 1px solid var(--border);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--dark) 14%, transparent);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  pointer-events: none;
  z-index: 12;
}

.fc-browser-bar-url {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 72%;
  font-weight: 500;
}

.fc-browser-bar-tag {
  font-size: 12px;
  color: var(--muted);
}

/* Unified Split-Screen Companion Pane (sits cleanly beside active split frame) */
.fc-companion-hint {
  width: 168px;
  height: 360px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  text-align: left;
  padding: 16px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 12.5px;
  gap: 8px;
}

.fc-companion-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-hover);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}

.fc-companion-lines {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fc-companion-lines span {
  display: block;
  height: 8px;
  border-radius: 4px;
  background: var(--border);
}

.fc-companion-lines span:nth-child(2) { width: 82%; }
.fc-companion-lines span:nth-child(3) { width: 64%; }
.fc-companion-lines span:nth-child(4) { width: 90%; }

/* 3D Angle Pill in top bar */
.orbit-pill {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-hover);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}

.orbit-pill:hover {
  border-color: var(--accent);
}

/* ==========================================================================
   AEO BLUF Summary Box, "For Whom" Persona Grid, Resource Directory & 4-Way Hub
   ========================================================================== */

.bluf-box {
  margin: 18px 0 22px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.bluf-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-hover);
  margin-bottom: 6px;
}

.bluf-box p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink);
}

.persona-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.persona-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.persona-tag {
  display: inline-block;
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-hover);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
}

.persona-card h3 {
  margin: 2px 0 0;
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
}

.persona-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.resource-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.resource-source {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}

.resource-card a {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent-hover);
}

.resource-card p {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.card-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 1024px) {
  .persona-grid,
  .card-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .persona-grid,
  .resource-grid,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }
}
/* ---- v22 Single-Row Floating Dock & Mobile Non-Overlap Polish ---- */
.telemetry-pill,
.orbit-pill {
  white-space: nowrap;
}

.stage-right-meta {
  flex-wrap: wrap;
}

.stage-viewport-area {
  padding: 14px 18px 96px;
}

.floating-dock {
  gap: 3px;
  padding: 5px 8px;
  flex-wrap: nowrap;
  max-width: 100%;
  overflow-x: auto;
}

.floating-dock .fc-state-dim {
  display: none;
}

.dock-btn {
  padding: 5px 7px;
  white-space: nowrap;
}

.dock-slider {
  width: 68px;
}

.dock-hint {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .stage-viewport-area {
    padding: 14px 12px 16px;
    min-height: 360px;
  }

  .floating-dock-wrap {
    position: static;
    padding: 0 10px 12px;
    pointer-events: auto;
  }

  .floating-dock {
    flex-wrap: wrap;
    border-radius: var(--radius-md);
    justify-content: center;
  }

  .dock-hint {
    display: none;
  }
}

/* ==========================================================================
   v36 Framed Sticky Workstation · Minimal Topbar · Crisp Mobile & Touch Scroll
   ========================================================================== */

.site-nav-inner {
  max-width: min(96vw, 1740px);
}

.gallery-studio {
  width: 100%;
  max-width: min(96vw, 1740px);
  margin: 0 auto;
  padding: 14px 18px 34px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gallery-hero {
  width: 100%;
  max-width: 780px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.gallery-hero .studio-h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 35px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--ink);
}

.studio-sub {
  margin: 0;
  max-width: 660px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--muted);
}

/* --- Framed Flagship Studio Workstation Block (Preserves Sticky Children!) --- */
.studio-block {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 16px 20px 22px;
  box-shadow: 0 12px 42px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  scroll-margin-top: 66px;
}

/* --- Fixed-Hierarchy Input Deck --- */
.input-deck {
  width: 100%;
  max-width: 820px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 9px 12px 11px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.input-deck-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.input-mode-tabs {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.deck-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 13px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease;
}

.deck-tab:hover { color: var(--ink); }
.deck-tab.is-active { background: var(--ink); color: var(--surface); }
.deck-hint { font-size: 12.5px; color: var(--muted); }
.deck-panel { display: flex; flex-direction: column; gap: 7px; }

.input-deck .url-form {
  width: 100%;
  height: 44px;
  padding: 3px 4px 3px 13px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-deck .url-form:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(20, 20, 22, 0.08);
}

.url-lead-icon { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); flex-shrink: 0; }

.input-deck .url-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  outline: none !important;
  box-shadow: none !important;
}

.input-deck .url-input:focus,
.input-deck .url-input:focus-visible { outline: none !important; box-shadow: none !important; }

.url-clear {
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.url-clear:hover { background: var(--border); color: var(--ink); }
.input-deck .btn-dark { height: 36px; padding: 0 20px; font-size: 13.5px; font-weight: 600; }

.deck-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 0 4px;
}

.preset-links,
.history-strip {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12.5px;
  color: var(--muted);
}

.preset-label { font-weight: 600; color: var(--muted); }

.link-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 3px 10px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  border-radius: var(--radius-pill);
  transition: border-color 0.14s ease, background 0.14s ease;
}

.link-chip:hover { border-color: var(--ink); background: var(--bg); }

.hist-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  max-width: 185px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hist-chip:hover { color: var(--ink); border-color: var(--ink); }
.hist-clear { border: 0; background: transparent; color: var(--muted); font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 5px; }
.hist-clear:hover { color: var(--fail); }

.input-deck .html-textarea {
  width: 100%;
  min-height: 92px;
  max-height: 180px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 10px 12px;
  resize: vertical;
  outline: none;
}

.input-deck .html-textarea:focus { border-color: var(--ink); }

/* --- Two-Zone Sticky PC Workbench (Sticky Left Phone Stage · Scrollable Right Devices + Audit) --- */
.studio-workbench {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(380px, 30vw, 468px);
  gap: 20px;
  align-items: start;
}

.stage-column {
  min-width: 0;
  position: sticky;
  top: 70px;
  align-self: start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 12px 14px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.stage-topbar-clean {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 2px 4px;
}

.stage-meta-left,
.stage-meta-right {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}

.spec-dim {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink);
  font-weight: 600;
}

.finish-chip,
.stage-action-chip {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease;
}

.finish-chip:hover,
.stage-action-chip:hover { border-color: var(--ink); }

.stage-action-chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--surface);
}

/* --- Right Column: Compact 2-Column 8-Device Selector + Integrated Audit Console --- */
.studio-right-col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sidebar-panel {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sidebar-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.sidebar-head h2 { margin: 0; font-family: var(--font-display); font-size: 14.5px; font-weight: 700; color: var(--ink); }
.sidebar-count { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

.brand-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 11px;
}

.brand-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  padding: 4px;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
}

.brand-tab:hover { color: var(--ink); }
.brand-tab.is-active { background: var(--ink); color: var(--surface); }

.device-list-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.device-row {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 12px;
  padding: 7px 9px;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: border-color 0.14s ease, background 0.14s ease;
}

.device-row:hover { border-color: var(--ink); }
.device-row.is-active { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.device-row-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.device-row-top strong { font-size: 12.5px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-row.is-active .device-row-top strong { color: var(--surface); }
.device-form-tag { font-size: 12px; font-weight: 500; color: var(--muted); flex-shrink: 0; }
.device-row.is-active .device-form-tag { color: var(--border); }
.device-row-dims { font-family: var(--font-mono); font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-row.is-active .device-row-dims { color: var(--border); }

/* --- Hardware Stage (Crisp Flat Rendering on Mobile; Preserve-3D ONLY When Folded/Orbiting!) --- */
.gallery-stage {
  width: 100%;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 14px 18px;
  position: relative;
  cursor: grab;
  background: radial-gradient(ellipse 64% 58% at 50% 48%, var(--surface) 0%, transparent 74%);
}

.gallery-stage.is-orbiting { cursor: grabbing; user-select: none; }

.single-stage {
  perspective: none;
  transform-style: flat;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.single-stage.is-3d {
  perspective: 2100px;
  transform-style: preserve-3d;
}

.mold-stage-wrap {
  position: relative;
  flex-shrink: 0;
  transform-style: flat;
  transition: width 0.26s cubic-bezier(0.22, 1, 0.36, 1), height 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.mold-stage-wrap.is-3d {
  transform-style: preserve-3d;
}

.mold-chassis {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: flat;
  will-change: auto;
  transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.mold-chassis[data-folded="v"],
.mold-chassis[data-folded="h"],
.mold-chassis.is-tilted {
  transform-style: preserve-3d;
  will-change: transform;
}

.mold-chassis.is-dragging { transition: none !important; }

/* Zero CSS filter on ancestor of iframe so iOS/Android render crisp native Retina text! */
.mold-flat-shell {
  position: relative;
  width: 100%;
  height: 100%;
}

.mold-flat-shell::before {
  content: "";
  position: absolute;
  inset: 3% 4%;
  z-index: 0;
  border-radius: var(--slot-radius, 28px);
  box-shadow: var(--shadow-x, 0px) calc(22px + var(--shadow-y, 0px)) 44px -8px rgba(0, 0, 0, 0.22),
              0 6px 16px -4px rgba(0, 0, 0, 0.12);
  pointer-events: none;
}

.fold-floor-shadow {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -22px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.22) 0%, rgba(0, 0, 0, 0.08) 46%, transparent 74%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mold-stage-wrap.is-folded .fold-floor-shadow { opacity: 1; }

.mold-screen-slot {
  position: absolute;
  z-index: 2;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--slot-radius, 18px);
  touch-action: pan-y;
}

.mold-pane-main {
  position: relative;
  flex: 1 1 100%;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--surface);
}

.mold-chassis[data-state="split"] .mold-pane-main { flex: 0 0 50%; width: 50%; }
.mold-chassis[data-state="split"][data-split-axis="vertical"] .mold-screen-slot { flex-direction: column; }
.mold-chassis[data-state="split"][data-split-axis="vertical"] .mold-pane-main { flex: 0 0 calc(50% - 3px); width: 100%; height: calc(50% - 3px); }
.mold-chassis[data-state="split"][data-split-axis="vertical"] .fc-split-divider { flex: 0 0 6px; width: 100%; height: 6px; }
.mold-chassis[data-state="split"][data-split-axis="vertical"] .fc-split-handle { width: 44px; height: 3px; }
.mold-chassis[data-state="split"][data-split-axis="vertical"] .fc-split-companion { flex: 1 1 auto; width: 100%; height: auto; }

.mold-screen-slot[data-safe-chin="1"] { flex-direction: column; background: var(--dark); }
.mold-screen-slot[data-safe-chin="1"] > .mold-pane-main,
.mold-screen-slot[data-safe-chin="1"] > .mold-iframe-host {
  flex: 0 0 var(--safe-h, 77.6%);
  height: var(--safe-h, 77.6%);
  width: 100%;
  border-radius: 0 0 14px 14px;
  overflow: hidden;
}

.mold-iframe-host {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  background: var(--surface);
  touch-action: pan-x pan-y;
  -webkit-overflow-scrolling: touch;
}

.mold-iframe-host iframe {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: 0 0;
  background: var(--surface);
  pointer-events: auto;
  touch-action: pan-x pan-y;
}

.stage-loader {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(250, 249, 246, 0.88);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

.stage-spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2.5px solid var(--border);
  border-top-color: var(--ink);
  animation: fc-spin 0.75s linear infinite;
}

.stage-loader-text {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
}

@keyframes fc-spin { to { transform: rotate(360deg); } }

.mold-overlay-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  z-index: 12;
  pointer-events: none;
  user-select: none;
  display: block;
}

.mold-browser-bar {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 12px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: var(--ink);
  z-index: 6;
  pointer-events: none;
}

.mold-bb-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.mold-bb-tag { font-family: var(--font-mono); font-size: 12px; color: var(--muted); flex-shrink: 0; }

.fc-split-divider { flex: 0 0 6px; width: 6px; background: var(--dark); display: flex; align-items: center; justify-content: center; z-index: 8; }
.fc-split-handle { width: 3px; height: 36px; border-radius: var(--radius-pill); background: rgba(255, 255, 255, 0.5); }
.fc-split-companion { flex: 1 1 auto; min-width: 0; height: 100%; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font-family: var(--font-sans); overflow: hidden; }
.fc-comp-body { flex: 1 1 auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.fc-comp-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.fc-comp-head strong { font-size: 17px; font-weight: 700; color: var(--ink); }
.fc-comp-tag { font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border); color: var(--accent-hover); }
.fc-comp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.fc-comp-card-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 5px; }
.fc-comp-card p { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.fc-comp-checks { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fc-comp-checks li { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink); }
.fc-comp-checks i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--pass); flex-shrink: 0; }

/* --- True 3D Solid Metallic Fold Assembly --- */
.mold-fold-shell {
  --depth: 12px;
  --rail-grad-v: linear-gradient(90deg, rgba(252,252,253,0.98) 0%, rgba(202,204,210,0.98) 28%, rgba(246,247,249,1) 54%, rgba(154,158,166,0.98) 84%, rgba(214,216,222,0.98) 100%);
  --rail-grad-h: linear-gradient(180deg, rgba(252,252,253,0.98) 0%, rgba(196,198,205,0.98) 38%, rgba(244,245,248,1) 64%, rgba(150,154,162,0.98) 100%);
  --back-grad: linear-gradient(145deg, rgba(236,237,240,0.98) 0%, rgba(202,205,212,0.98) 55%, rgba(176,180,188,0.98) 100%);
  --rail-band-col: rgba(95, 99, 108, 0.55);
  --rail-btn-col: rgba(255, 255, 255, 0.92);
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  transform-style: preserve-3d;
}

.mold-chassis[data-metal="dark"] .mold-fold-shell {
  --rail-grad-v: linear-gradient(90deg, rgba(84,88,96,0.98) 0%, rgba(36,38,44,0.98) 32%, rgba(110,114,124,0.98) 56%, rgba(24,25,30,0.98) 86%, rgba(62,65,72,0.98) 100%);
  --rail-grad-h: linear-gradient(180deg, rgba(84,88,96,0.98) 0%, rgba(36,38,44,0.98) 40%, rgba(104,108,118,0.98) 68%, rgba(22,23,28,0.98) 100%);
  --back-grad: linear-gradient(145deg, rgba(46,48,54,0.98) 0%, rgba(24,25,30,0.98) 55%, rgba(16,17,20,0.98) 100%);
  --rail-band-col: rgba(18, 18, 22, 0.85);
  --rail-btn-col: rgba(128, 132, 142, 0.9);
}

.mold-chassis[data-folded="h"] .mold-fold-shell { flex-direction: column; }
.mold-fold-wing { position: relative; overflow: visible; transform-style: preserve-3d; }
.mold-fold-face { position: relative; width: 100%; height: 100%; overflow: hidden; transform: translateZ(0.6px); backface-visibility: hidden; }
.fold-back { position: absolute; inset: 1px; border-radius: 18px; background: var(--back-grad); transform: translateZ(calc(var(--depth) * -1)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.18); pointer-events: none; }
.fold-rail { position: absolute; pointer-events: none; backface-visibility: visible; }

.mold-chassis[data-folded="v"] .mold-fold-wing { flex: 0 0 50%; width: 50%; height: 100%; }
.mold-chassis[data-folded="v"] .mold-fold-wing-a { transform-origin: 100% 50%; transform: rotateY(var(--fold-a, 54deg)); }
.mold-chassis[data-folded="v"] .mold-fold-wing-b { transform-origin: 0% 50%; transform: rotateY(var(--fold-b, -5deg)); }
.mold-chassis[data-folded="v"] .mold-fold-wing .mold-fold-inner { position: relative; width: 200%; height: 100%; }
.mold-chassis[data-folded="v"] .mold-fold-wing-b .mold-fold-inner { margin-left: -100%; }

.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing { flex: 0 0 33.3333%; width: 33.3333%; }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing .mold-fold-inner { width: 300%; }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing-b .mold-fold-inner { margin-left: -100%; }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing-c .mold-fold-inner { margin-left: -200%; }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing-a { transform-origin: 100% 50%; transform: rotateY(var(--fold-a, 52deg)); }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing-b { transform-origin: 50% 50%; transform: rotateY(-3deg); }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing-c { transform-origin: 0% 50%; transform: rotateY(var(--fold-c, -46deg)); }

.mold-chassis[data-folded="v"] .fold-rail-outer-a {
  left: calc(var(--depth) * -1); top: 5.5%; bottom: 5.5%; width: var(--depth);
  background: var(--rail-grad-v); border-radius: 3px;
  transform-origin: 100% 50%; transform: rotateY(-90deg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), inset 0 -1px 0 rgba(0,0,0,0.35), 0 0 0 0.5px rgba(0,0,0,0.16);
}
.mold-chassis[data-folded="v"] .fold-rail-outer-b,
.mold-chassis[data-folded="v"][data-trifold="1"] .fold-rail-outer-c {
  right: calc(var(--depth) * -1); top: 5.5%; bottom: 5.5%; width: var(--depth);
  background: var(--rail-grad-v); border-radius: 3px;
  transform-origin: 0% 50%; transform: rotateY(90deg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), inset 0 -1px 0 rgba(0,0,0,0.35);
}
.mold-chassis[data-folded="v"][data-trifold="1"] .fold-rail-outer-b { display: none; }
.mold-chassis[data-folded="v"] .fold-rail-top { left: 9%; right: 0; top: calc(var(--depth) * -1); height: var(--depth); background: var(--rail-grad-h); transform-origin: 50% 100%; transform: rotateX(90deg); }
.mold-chassis[data-folded="v"] .fold-rail-bot { left: 9%; right: 0; bottom: calc(var(--depth) * -1); height: var(--depth); background: var(--rail-grad-h); transform-origin: 50% 0%; transform: rotateX(-90deg); }
.mold-chassis[data-folded="v"] .mold-fold-wing-b .fold-rail-top,
.mold-chassis[data-folded="v"] .mold-fold-wing-b .fold-rail-bot { left: 0; right: 9%; }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing-b .fold-rail-top,
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing-b .fold-rail-bot { left: 0; right: 0; }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing-c .fold-rail-top,
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-wing-c .fold-rail-bot { left: 0; right: 9%; }

.rail-band { position: absolute; left: 0; right: 0; height: 3px; background: var(--rail-band-col); }
.rail-band-t { top: 9%; }
.rail-band-b { bottom: 9%; }
.rail-btn { position: absolute; left: 22%; right: 22%; border-radius: 999px; background: var(--rail-btn-col); box-shadow: 0 0 0 1px rgba(0,0,0,0.22); }
.rail-btn-1 { top: 24%; height: 9%; }
.rail-btn-2 { top: 36%; height: 9%; }
.rail-btn-pwr { top: 28%; height: 12%; }

.fold-hinge-spine { position: absolute; pointer-events: none; z-index: 5; background: var(--rail-grad-v); box-shadow: 0 0 8px rgba(0, 0, 0, 0.28); }
.mold-chassis[data-folded="v"] .fold-hinge-spine { left: calc(50% - 4px); top: 0.6%; bottom: 0.6%; width: 8px; border-radius: 4px; transform: translateZ(-5px); }
.mold-chassis[data-folded="v"][data-trifold="1"] .fold-hinge-spine { left: calc(33.3333% - 3px); width: 6px; }

.mold-chassis[data-folded="h"] .mold-fold-wing { flex: 0 0 50%; width: 100%; height: 50%; }
.mold-chassis[data-folded="h"] .mold-fold-wing-a { transform-origin: 50% 100%; transform: rotateX(var(--fold-a-h, -52deg)); }
.mold-chassis[data-folded="h"] .mold-fold-wing-b { transform-origin: 50% 0%; transform: rotateX(var(--fold-b-h, 5deg)); }
.mold-chassis[data-folded="h"] .mold-fold-wing .mold-fold-inner { position: relative; width: 100%; height: 200%; }
.mold-chassis[data-folded="h"] .mold-fold-wing-b .mold-fold-inner { margin-top: -100%; }
.mold-chassis[data-folded="h"] .fold-rail-top { left: 3%; right: 3%; top: calc(var(--depth) * -1); height: var(--depth); background: var(--rail-grad-h); transform-origin: 50% 100%; transform: rotateX(90deg); }
.mold-chassis[data-folded="h"] .fold-rail-bot { left: 3%; right: 3%; bottom: calc(var(--depth) * -1); height: var(--depth); background: var(--rail-grad-h); transform-origin: 50% 0%; transform: rotateX(-90deg); }
.mold-chassis[data-folded="h"] .fold-rail-outer-a { left: calc(var(--depth) * -1); top: 2%; bottom: 0; width: var(--depth); background: var(--rail-grad-v); transform-origin: 100% 50%; transform: rotateY(-90deg); }
.mold-chassis[data-folded="h"] .fold-rail-outer-b { right: calc(var(--depth) * -1); top: 0; bottom: 2%; width: var(--depth); background: var(--rail-grad-v); transform-origin: 0% 50%; transform: rotateY(90deg); }
.mold-chassis[data-folded="h"] .fold-hinge-spine { top: calc(50% - 4px); left: 0.8%; right: 0.8%; height: 8px; border-radius: 4px; background: var(--rail-grad-h); transform: translateZ(-5px); }

.mold-fold-shade { position: absolute; inset: 0; z-index: 15; pointer-events: none; }
.mold-chassis[data-folded="v"] .mold-fold-shade-a { background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, transparent 32%, rgba(0, 0, 0, var(--fold-ao, 0.22)) 50%, transparent 50%); }
.mold-chassis[data-folded="v"] .mold-fold-shade-b { background: linear-gradient(90deg, transparent 50%, rgba(0, 0, 0, calc(var(--fold-ao, 0.22) * 1.15)) 50%, transparent 68%, rgba(255, 255, 255, 0.04) 100%); }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-shade-a { background: linear-gradient(90deg, rgba(255, 255, 255, 0.08) 0%, transparent 22%, rgba(0, 0, 0, var(--fold-ao, 0.2)) 33.3%, transparent 33.3%); }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-shade-b { background: linear-gradient(90deg, transparent 33.3%, rgba(0, 0, 0, calc(var(--fold-ao, 0.2) * 0.9)) 33.3%, transparent 44%, transparent 56%, rgba(0, 0, 0, calc(var(--fold-ao, 0.2) * 0.9)) 66.7%, transparent 66.7%); }
.mold-chassis[data-folded="v"][data-trifold="1"] .mold-fold-shade-c { background: linear-gradient(90deg, transparent 66.7%, rgba(0, 0, 0, var(--fold-ao, 0.2)) 66.7%, transparent 78%, rgba(255, 255, 255, 0.06) 100%); }
.mold-chassis[data-folded="h"] .mold-fold-shade-a { background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, transparent 32%, rgba(0, 0, 0, var(--fold-ao, 0.22)) 50%, transparent 50%); }
.mold-chassis[data-folded="h"] .mold-fold-shade-b { background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, calc(var(--fold-ao, 0.22) * 1.15)) 50%, transparent 68%, rgba(255, 255, 255, 0.04) 100%); }

/* --- Floating Frosted Charcoal Dock --- */
.gallery-dock-wrap { position: relative; z-index: 25; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; }

.floating-dock {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
  padding: 7px 12px;
  background: var(--dark);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-pill);
  box-shadow: 0 18px 44px -10px rgba(0, 0, 0, 0.34);
  color: var(--surface);
  max-width: 100%;
}

.dock-seg { display: inline-flex; align-items: center; gap: 2px; }
.dock-btn { padding: 5px 10px; font-size: 13px; font-weight: 600; }
.dock-slider { width: 84px; }

button.dock-readout {
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--dark-surface);
  color: var(--surface);
  border-radius: var(--radius-pill);
  padding: 2px 8px;
  cursor: pointer;
  min-width: 46px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
}

button.dock-readout:hover { background: var(--accent); border-color: var(--accent); }
.dock-btn-fix { background: var(--dark-surface); border: 1px solid rgba(255, 255, 255, 0.16); }
.dock-btn-fix:hover { background: var(--accent); border-color: var(--accent); }

.dock-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  background: var(--dark-surface);
  color: var(--surface);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.dock-score-pill:hover { background: var(--surface); color: var(--ink); text-decoration: none; }
.dock-caption { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }

.view-popover {
  position: absolute;
  bottom: calc(100% + 10px);
  z-index: 40;
  width: 244px;
  background: var(--dark);
  color: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 7px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.36);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pop-item {
  border: 0;
  background: transparent;
  color: var(--surface);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 11px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.pop-item:hover { background: var(--dark-surface); }
.pop-state { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.pop-item.is-active .pop-state { color: var(--surface); font-weight: 700; }
.pop-sep { height: 1px; background: rgba(255, 255, 255, 0.12); margin: 4px 6px; }

/* --- Integrated Right-Column Audit & CSS Repair Console --- */
.audit-console {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  scroll-margin-top: 74px;
}

.audit-console-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--surface);
}

.audit-head-left { display: flex; align-items: center; gap: 12px; }
.audit-head-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.audit-console .wb-tabs { background: var(--surface); padding: 0 10px; display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.audit-console .wb-tab { padding: 10px 10px; font-size: 12.5px; white-space: nowrap; }
.audit-console-body { padding: 12px 14px 16px; }

.fc-issue-list { display: flex; flex-direction: column; gap: 8px; }

.fc-issue-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.fc-issue-card:hover { border-color: var(--ink); }
.fc-issue-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.14); }
.fc-sev-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.fc-sev-dot-high { background: var(--fail); }
.fc-sev-dot-medium { background: var(--warn); }
.fc-sev-dot-low { background: var(--accent); }
.fc-sev-dot-info { background: var(--muted); }
.fc-issue-expand { display: none; margin-top: 9px; padding-top: 9px; border-top: 1px solid var(--border); }
.fc-issue-card.is-selected .fc-issue-expand { display: block; }

.repair-stack { display: flex; flex-direction: column; gap: 12px; }
.wb-helper { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.inline-more { font-size: 13px; font-weight: 600; }

.compare-stage {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 44px);
  flex-wrap: wrap;
  width: 100%;
}

/* --- Sleek Floating Toast Notification (Bottom-Right on Desktop, Centered Bottom on Mobile — Zero Overlap!) --- */
.fc-toast {
  position: fixed;
  bottom: 22px;
  right: 24px;
  z-index: 120;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--dark);
  color: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.34);
  max-width: min(92vw, 520px);
}

.fc-toast-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.fc-toast[data-tone="pass"] .fc-toast-dot { background: var(--pass); }
.fc-toast[data-tone="warn"] .fc-toast-dot { background: var(--warn); }

.section-inner,
.footer-inner {
  max-width: min(95vw, 1520px);
}

.fleet-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

@media (max-width: 1120px) {
  .studio-workbench {
    grid-template-columns: 1fr;
  }
  .stage-column {
    position: static;
  }
}

@media (max-width: 640px) {
  .gallery-studio { padding: 6px 4px 20px; gap: 8px; }
  .studio-block { padding: 8px 4px 12px; border-radius: 18px; gap: 10px; }
  .stage-column { padding: 6px 0 10px; border: 0; background: transparent; border-radius: 14px; }
  .gallery-stage { padding: 4px 0 10px; min-height: 440px; }
  .input-deck { padding: 8px 9px 10px; border-radius: 14px; }
  .input-deck .url-form { height: 44px; padding: 3px 4px 3px 11px; }
  .device-list-compact { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
  .stage-topbar-clean { padding: 0 6px; }
  .floating-dock { border-radius: 20px; padding: 7px 9px; }
  .fc-toast { left: 50%; right: auto; bottom: 16px; transform: translateX(-50%); }
}

/* === V39 OVERRIDES === */
/* Subtle floating top-center pill loader ONLY during network fetch — NEVER dims or blanks the phone! */
.stage-loader {
  position: absolute;
  inset: auto;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: var(--dark);
  color: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: none;
  pointer-events: none;
}

.stage-spinner {
  width: 14px;
  height: 14px;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.26);
  border-top-color: var(--surface);
}

.stage-loader-text {
  font-size: 12px;
  font-weight: 600;
  color: var(--surface);
  background: transparent;
  border: 0;
  padding: 0;
  white-space: nowrap;
}

/* Authentic 3D fold rail materials per flagship phone finish */
.mold-chassis[data-metal="blue"] .mold-fold-shell {
  --rail-grad-v: linear-gradient(90deg, rgba(164,180,206,0.98) 0%, rgba(92,106,130,0.98) 32%, rgba(186,200,224,1) 56%, rgba(68,80,102,0.98) 86%, rgba(132,146,170,0.98) 100%);
  --rail-grad-h: linear-gradient(180deg, rgba(164,180,206,0.98) 0%, rgba(92,106,130,0.98) 40%, rgba(180,196,220,1) 68%, rgba(64,76,98,0.98) 100%);
  --back-grad: linear-gradient(145deg, rgba(84,96,118,0.98) 0%, rgba(52,62,80,0.98) 55%, rgba(36,44,58,0.98) 100%);
  --rail-band-col: rgba(30, 38, 52, 0.78);
  --rail-btn-col: rgba(208, 218, 236, 0.92);
}

.mold-chassis[data-metal="gold"] .mold-fold-shell {
  --rail-grad-v: linear-gradient(90deg, rgba(246,218,154,0.98) 0%, rgba(176,140,82,0.98) 32%, rgba(254,232,178,1) 56%, rgba(142,110,60,0.98) 86%, rgba(214,180,116,0.98) 100%);
  --rail-grad-h: linear-gradient(180deg, rgba(246,218,154,0.98) 0%, rgba(176,140,82,0.98) 40%, rgba(252,226,168,1) 68%, rgba(138,106,56,0.98) 100%);
  --back-grad: linear-gradient(145deg, rgba(206,172,110,0.98) 0%, rgba(162,130,78,0.98) 55%, rgba(126,98,54,0.98) 100%);
  --rail-band-col: rgba(96, 74, 38, 0.72);
  --rail-btn-col: rgba(255, 240, 200, 0.94);
}

.mold-screen-slot {
  cursor: grab;
}

.mold-iframe-host iframe {
  overscroll-behavior: contain;
}
