/* ==========================================================================
   STUDIO KROMA / CARDCRAFT OS — CORE DESIGN SYSTEM
   Modern Obsidian & Cadmium Yellow Business Card Atelier
   ========================================================================== */

:root {
  /* Color Architecture */
  --bg-canvas: #08090c;
  --surface-01: #0f1015;
  --surface-02: #15161d;
  --surface-03: #1d1e27;
  --surface-04: #262734;

  --border-subtle: #23242e;
  --border-medium: #323442;
  --border-focus: #ffde43;
  --focus-ring: 0 0 0 2px var(--bg-canvas), 0 0 0 4px #ffde43;

  --accent-primary: #ffde43;
  --accent-secondary: #facc15;
  --accent-tertiary: #e69d00;
  --accent-glow: rgba(255, 222, 67, 0.25);

  --text-pure: #ffffff;
  --text-high: #e3e4ea;
  --text-muted: #8c8e9d;
  --text-dim: #82859a; /* lightened from #555768 to meet ~4.5:1 WCAG AA contrast on --surface-01/02 */

  --status-emerald: #10b981;
  --status-red: #ef4444;
  --status-sky: #38bdf8;

  /* Typography */
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'DM Mono', monospace;
  --font-syne: 'Syne', sans-serif;

  /* Dimensions & Durations */
  --header-height: 56px;
  --sidebar-left-width: 380px;
  --sidebar-right-width: 320px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-flip: 0.7s cubic-bezier(0.34, 1.25, 0.64, 1);
}

/* Base Reset & Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  width: 100%;
  background-color: var(--bg-canvas);
  color: var(--text-high);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.5;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background-color: var(--accent-primary);
  color: #000000;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: var(--surface-01);
}
::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* App Shell Container */
.app-shell {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--bg-canvas);
}

/* ==========================================================================
   TOP APP HEADER
   ========================================================================== */
.app-header {
  height: var(--header-height);
  background-color: var(--surface-01);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 40;
  user-select: none;
  flex-shrink: 0;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo-badge {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000000;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 0 16px rgba(255, 222, 67, 0.3);
}

.brand-meta h1 {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-pure);
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-meta .badge-version {
  font-size: 9px;
  font-family: var(--font-mono);
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(255, 222, 67, 0.12);
  color: var(--accent-primary);
  border: 1px solid rgba(255, 222, 67, 0.25);
}

.brand-meta p {
  font-size: 11px;
  color: var(--text-muted);
}

/* Header Center Controls: Format & Guides */
.header-center-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.control-pill-group {
  display: flex;
  align-items: center;
  background: var(--surface-02);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  gap: 2px;
}

.pill-btn {
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: var(--transition-fast);
}

.pill-btn:hover {
  color: var(--text-pure);
  background: var(--surface-03);
}

.pill-btn.active {
  background: var(--accent-primary);
  color: #000000;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(255, 222, 67, 0.25);
}

.pill-btn .pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pill-btn .pill-dot.red { background-color: var(--status-red); }
.pill-btn .pill-dot.sky { background-color: var(--status-sky); }
.pill-btn .pill-dot.pulse {
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.divider-vertical {
  width: 1px;
  height: 18px;
  background-color: var(--border-subtle);
  margin: 0 4px;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-secondary {
  background: var(--surface-02);
  border: 1px solid var(--border-medium);
  color: var(--text-high);
  font-size: 11px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.btn-secondary:hover {
  background: var(--surface-03);
  border-color: var(--text-muted);
  color: var(--text-pure);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  border: 1px solid var(--accent-primary);
  color: #000000;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 14px rgba(255, 222, 67, 0.28);
  transition: var(--transition-fast);
}

.btn-accent:hover {
  background: var(--accent-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(255, 222, 67, 0.4);
}

/* ==========================================================================
   WORKSPACE 3-COLUMN LAYOUT
   ========================================================================== */
.workspace-container {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}

/* LEFT SIDEBAR: CUSTOMIZER TOOLSET */
.sidebar-left {
  width: var(--sidebar-left-width);
  background: var(--surface-01);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 20;
  overflow: hidden;
}

/* Tabs Navigation Bar */
.tabs-nav {
  display: flex;
  background: var(--surface-02);
  border-bottom: 1px solid var(--border-subtle);
  padding: 4px;
  gap: 3px;
  overflow-x: auto;
  user-select: none;
}

.tab-trigger {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.tab-trigger:hover {
  color: var(--text-pure);
  background: rgba(255, 255, 255, 0.04);
}

.tab-trigger.active {
  background: var(--surface-03);
  color: var(--accent-primary);
  font-weight: 600;
}

.tab-icon {
  font-size: 14px;
}

/* Tab Content Area */
.tab-content-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
}

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.tab-panel.active {
  display: flex;
}

/* Section Titles & Helpers */
.section-header {
  margin-bottom: 4px;
}

.section-tag {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  display: block;
}

.section-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Form Groups & Inputs */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-pure);
  font-family: var(--font-body);
  font-size: 12px;
  padding: 8px 10px;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(255, 222, 67, 0.15);
  background: var(--surface-03);
}

.form-input.font-mono-val {
  font-family: var(--font-mono);
  font-size: 11px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Archetype Grid Cards */
.archetype-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.archetype-card {
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.archetype-card:hover {
  border-color: var(--border-medium);
  background: var(--surface-03);
}

.archetype-card.active {
  border-color: var(--accent-primary);
  background: rgba(255, 222, 67, 0.05);
}

.archetype-preview-thumb {
  height: 52px;
  border-radius: var(--radius-sm);
  background: #09090b;
  border: 1px solid rgba(255, 222, 67, 0.2);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px;
  margin-bottom: 8px;
}

.archetype-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-pure);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.archetype-desc {
  font-size: 10px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

/* Monogram Selector */
.monogram-selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.monogram-btn {
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.monogram-btn:hover {
  background: var(--surface-03);
  color: var(--text-pure);
}

.monogram-btn.active {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: rgba(255, 222, 67, 0.08);
}

/* Custom Logo Upload Dropzone */
.logo-upload-box {
  background: var(--surface-02);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  padding: 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.logo-upload-box:hover {
  border-color: var(--accent-primary);
  background: var(--surface-03);
}

.logo-upload-box input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.logo-upload-icon {
  font-size: 20px;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.logo-preview-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-03);
  border: 1px solid var(--border-subtle);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
}

/* Sliders & Range Inputs */
.range-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.range-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.range-val {
  font-family: var(--font-mono);
  color: var(--accent-primary);
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: var(--surface-03);
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  cursor: pointer;
  box-shadow: 0 0 8px rgba(255, 222, 67, 0.5);
  transition: transform 0.1s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Palette Buttons */
.palette-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.palette-btn {
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-align: left;
  transition: var(--transition-fast);
}

.palette-btn:hover {
  background: var(--surface-03);
  border-color: var(--border-medium);
}

.palette-btn.active {
  border-color: var(--accent-primary);
}

.palette-dot-duo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.palette-dot-inner {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.palette-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-high);
}

/* Color Pickers */
.color-picker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
}

.color-input-bubble {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
}

.color-input-bubble::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-input-bubble::-webkit-color-swatch {
  border: 1px solid var(--border-medium);
  border-radius: 50%;
}

/* Finish Radios */
.finish-options-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.finish-option-item {
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-fast);
}

.finish-option-item:hover {
  background: var(--surface-03);
}

.finish-option-item.active {
  border-color: rgba(255, 222, 67, 0.4);
  background: rgba(255, 222, 67, 0.04);
}

.finish-option-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-pure);
}

.finish-option-price {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-primary);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: 12px 18px;
  background: var(--surface-01);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--text-muted);
}

.sidebar-footer .status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ==========================================================================
   CENTER WORKSPACE: INTERACTIVE 3D CANVAS STAGE
   ========================================================================== */
.main-stage {
  flex: 1;
  background-color: var(--bg-canvas);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Canvas Metadata / Top Ribbon */
.stage-ribbon {
  height: 34px;
  background: var(--surface-01);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  font-size: 11px;
  color: var(--text-muted);
  user-select: none;
  flex-shrink: 0;
}

.stage-spec-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-primary);
  letter-spacing: 0.05em;
}

.stage-guides-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 10px;
}

.legend-guide-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-line {
  width: 10px;
  height: 2px;
}

.legend-line.red { background-color: var(--status-red); }
.legend-line.blue { background-color: var(--status-sky); }
.legend-line.yellow { background-color: var(--accent-primary); }
.pill-dot.yellow { background-color: var(--accent-primary); }

.btn-secondary.active {
  border-color: var(--accent-primary) !important;
  color: var(--accent-primary) !important;
  background: rgba(255, 222, 67, 0.12) !important;
}

/* Interactive Viewport Canvas */
.canvas-viewport {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
  padding: 40px;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* 3D Perspective Card Wrapper */
.card-perspective-stage {
  perspective: 1400px;
  transform-style: preserve-3d;
  transition: transform 0.2s ease-out;
}

/* The 3D Card Container */
.interactive-card {
  position: relative;
  cursor: pointer;
  user-select: none;
  transform-style: preserve-3d;
  transition: transform var(--transition-flip);
  will-change: transform;
}

.interactive-card.flipped {
  transform: rotateY(180deg);
}

/* Card Sizes: Portrait vs Landscape */
.interactive-card.portrait {
  width: 290px;
  height: 493px; /* Precise 50mm x 85mm aspect ratio */
}

.interactive-card.landscape {
  width: 493px;
  height: 290px; /* Precise 85mm x 50mm aspect ratio */
}

/* Guides: Bleed & Safe Margin Overlays */
.overlay-bleed {
  position: absolute;
  inset: -10px;
  border: 1.5px dashed var(--status-red);
  border-radius: 20px;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.2s ease;
}

.overlay-bleed-label {
  position: absolute;
  top: -18px;
  left: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--status-red);
  background: rgba(0, 0, 0, 0.85);
  padding: 1px 4px;
  border-radius: 2px;
}

.overlay-safe {
  position: absolute;
  inset: 12px;
  border: 1.5px dashed var(--status-sky);
  border-radius: 10px;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.2s ease;
}

.overlay-safe-label {
  position: absolute;
  top: 4px;
  left: 6px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--status-sky);
  background: rgba(0, 0, 0, 0.85);
  padding: 1px 4px;
  border-radius: 2px;
}

/* Die-Cut Trim Line Overlay & Corner Crop Marks */
.overlay-trim {
  position: absolute;
  inset: 0;
  border: 1.5px dashed rgba(255, 222, 67, 0.55);
  border-radius: var(--card-border-radius, 18px);
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.2s ease, border-radius 0.2s ease;
}

.overlay-trim-label {
  position: absolute;
  bottom: -16px;
  right: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--accent-primary);
  background: rgba(0, 0, 0, 0.85);
  padding: 1px 4px;
  border-radius: 2px;
  letter-spacing: 0.05em;
}

.crop-mark {
  position: absolute;
  width: 7px;
  height: 7px;
  pointer-events: none;
}
.crop-mark.top-left { top: -1px; left: -1px; border-top: 1.5px solid #ffde43; border-left: 1.5px solid #ffde43; }
.crop-mark.top-right { top: -1px; right: -1px; border-top: 1.5px solid #ffde43; border-right: 1.5px solid #ffde43; }
.crop-mark.bottom-left { bottom: -1px; left: -1px; border-bottom: 1.5px solid #ffde43; border-left: 1.5px solid #ffde43; }
.crop-mark.bottom-right { bottom: -1px; right: -1px; border-bottom: 1.5px solid #ffde43; border-right: 1.5px solid #ffde43; }

/* Card Faces with Dynamic Bleed/Trim/Safe Background Coverage */
.card-face {
  position: absolute;
  top: var(--card-bg-inset, -10px);
  left: var(--card-bg-inset, -10px);
  right: var(--card-bg-inset, -10px);
  bottom: var(--card-bg-inset, -10px);
  width: auto;
  height: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--card-border-radius, 18px);
  overflow: hidden;
  padding: var(--card-face-padding, 34px) !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.9), 0 0 35px -5px rgba(255, 222, 67, 0.15);
  border: 1px solid rgba(255, 222, 67, 0.2);
  transition: top 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              left 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              right 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              bottom 0.2s cubic-bezier(0.4, 0, 0.2, 1),
              padding 0.2s ease,
              border-radius 0.2s ease,
              border-color 0.2s ease;
}

.card-face.card-back {
  transform: rotateY(180deg);
}

/* Card Textures */
.texture-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.75;
}

.texture-carbon {
  background-image: radial-gradient(rgba(255, 222, 67, 0.08) 1px, transparent 0);
  background-size: 14px 14px;
}

.texture-brushed {
  background: repeating-linear-gradient(90deg, transparent, transparent 2px, rgba(255, 255, 255, 0.02) 2px, rgba(255, 255, 255, 0.02) 4px);
}

.texture-cotton {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 6px 6px;
}

.texture-matte {
  background: none;
}

/* Ambient Ambient Glow Overlays */
.ambient-glow-tl {
  position: absolute;
  top: -50px;
  right: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 222, 67, 0.16) 0%, transparent 70%);
  pointer-events: none;
}

.ambient-glow-br {
  position: absolute;
  bottom: -50px;
  left: -50px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 204, 21, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* Dynamic Specular Shimmer / Light Glare following mouse */
.card-specular-glare {
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.14) 0%, rgba(255, 222, 67, 0.08) 30%, transparent 70%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 15;
}

.interactive-card:hover .card-specular-glare {
  opacity: 1;
}

/* Corner Cut / Architectural Accent Triangle */
.architectural-corner {
  position: absolute;
  bottom: -1px;
  right: -1px;
  width: 50px;
  height: 50px;
  background: rgba(255, 222, 67, 0.2);
  transform: rotate(45deg);
  transform-origin: bottom right;
  pointer-events: none;
}

/* ==========================================================================
   PORTRAIT CARD FACE CONTENT STYLING
   ========================================================================== */
.portrait-layout-front, .portrait-layout-back {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  position: relative;
  z-index: 10;
}

/* Front Top Bar */
.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.card-brandmark-box {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%);
  padding: 2px;
  box-shadow: 0 4px 16px rgba(255, 222, 67, 0.25);
  flex-shrink: 0;
}

.card-brandmark-inner {
  width: 100%;
  height: 100%;
  background: #000000;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-brandmark-inner svg {
  width: 22px;
  height: 22px;
  fill: var(--accent-primary);
}

.card-brandmark-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-serial-wrap {
  text-align: right;
}

.card-serial-text {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--accent-primary);
  text-transform: uppercase;
}

.card-serial-accent-bar {
  width: 26px;
  height: 2px;
  background-color: var(--accent-primary);
  margin-top: 4px;
  margin-left: auto;
  border-radius: 1px;
}

/* Front Middle: Protagonist Name & Title */
.card-middle-content {
  margin: auto 0;
  padding: 8px 0;
}

.card-role-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--accent-primary);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-role-indicator {
  display: inline-block;
  width: 8px;
  height: 2px;
  background-color: var(--accent-primary);
}

.card-protagonist-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text-pure);
  word-break: break-word;
}

.card-protagonist-highlight {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, #fff7a1 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}

.card-bio-tagline {
  font-size: 11.5px;
  color: #a1a1aa;
  font-weight: 300;
  line-height: 1.45;
  margin-top: 10px;
}

/* Front Bottom Bar */
.card-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-location-meta span:first-child {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  font-weight: 600;
  display: block;
}

.card-location-meta span:last-child {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-high);
}

.card-action-arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #121318;
  border: 1px solid rgba(255, 222, 67, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 11px;
  font-weight: bold;
}

/* ==========================================================================
   BACK CARD FACE CONTENT STYLING
   ========================================================================== */
.card-back-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.card-back-header-text p {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  font-weight: 700;
}

.card-back-header-text h3 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-pure);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.card-status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-primary);
  animation: pulse-dot 2s infinite;
}

/* Contact List Stack */
.card-contact-stack {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-icon-box {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: #14151c;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  font-size: 13px;
  flex-shrink: 0;
}

.contact-info-col {
  overflow: hidden;
}

.contact-label {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  font-weight: 600;
  display: block;
}

.contact-value {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-high);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-value.accent-colored {
  color: var(--accent-primary);
}

/* Back QR Scanner Section */
.card-qr-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  gap: 10px;
}

.qr-meta-text span:first-child {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-primary);
  display: block;
}

.qr-meta-text span:last-child {
  font-size: 8px;
  color: var(--text-muted);
}

.card-qr-wrapper {
  width: 52px;
  height: 52px;
  background: var(--accent-primary);
  border-radius: var(--radius-md);
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(255, 222, 67, 0.25);
  flex-shrink: 0;
}

.card-qr-wrapper img, .card-qr-wrapper canvas, .card-qr-wrapper svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ==========================================================================
   LANDSCAPE CARD FACE LAYOUT REFLOW
   ========================================================================== */
.landscape-layout-front {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  height: 100%;
  gap: 20px;
  position: relative;
  z-index: 10;
}

.landscape-front-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.landscape-front-right {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  padding-left: 20px;
}

.landscape-layout-back {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  height: 100%;
  gap: 20px;
  position: relative;
  z-index: 10;
}

.landscape-back-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.landscape-back-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 1px solid var(--border-subtle);
  padding-left: 20px;
  text-align: center;
  gap: 10px;
}

.landscape-back-right .card-qr-wrapper {
  width: 80px;
  height: 80px;
}

/* ==========================================================================
   FLOATING CANVAS BOTTOM CONTROLS
   ========================================================================== */
.stage-floating-bar {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(18, 19, 25, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: 9999px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 30;
  user-select: none;
}

.floating-btn {
  background: transparent;
  border: none;
  color: var(--text-high);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 9999px;
  transition: var(--transition-fast);
}

.floating-btn:hover {
  color: var(--accent-primary);
  background: rgba(255, 255, 255, 0.05);
}

.floating-btn.active {
  color: #000000;
  background: var(--accent-primary);
}

.floating-divider {
  width: 1px;
  height: 14px;
  background: var(--border-medium);
}

.floating-hint {
  font-size: 10px;
  color: var(--text-muted);
}

/* ==========================================================================
   RIGHT SIDEBAR: PRINT PREFLIGHT & PRODUCTION AUDIT
   ========================================================================== */
.sidebar-right {
  width: var(--sidebar-right-width);
  background: var(--surface-01);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 20;
  overflow-y: auto;
}

.preflight-header {
  padding: 14px 16px;
  background: var(--surface-02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.preflight-header h2 {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-pure);
}

.badge-pass {
  background: rgba(16, 185, 129, 0.12);
  color: var(--status-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sidebar-right-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Preflight Checklist */
.checklist-item {
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
}

.checklist-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-high);
}

.checklist-icon {
  color: var(--status-emerald);
  font-size: 13px;
}

.checklist-value {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent-primary);
  font-weight: 600;
}

/* Layer Manager */
.layer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-high);
  transition: var(--transition-fast);
}

.layer-row:hover {
  background: var(--surface-02);
}

.layer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layer-toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 13px;
  padding: 2px;
}

.layer-toggle-btn:hover {
  color: var(--text-pure);
}

/* Production Cost Summary Box */
.cost-calculator-card {
  background: linear-gradient(145deg, var(--surface-02) 0%, #0d0e14 100%);
  border: 1px solid rgba(255, 222, 67, 0.25);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cost-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.cost-row-total {
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.cost-total-amount {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-primary);
}

/* ==========================================================================
   MODAL & TOAST DIALOGS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--surface-01);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 30px rgba(255, 222, 67, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modal-slide-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-slide-in {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 16px 20px;
  background: var(--surface-02);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-pure);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
}

.modal-close-btn:hover {
  color: var(--text-pure);
}

.modal-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.export-option-card {
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: var(--transition-fast);
}

.export-option-card:hover {
  border-color: var(--accent-primary);
  background: var(--surface-03);
}

.export-option-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.export-option-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: rgba(255, 222, 67, 0.1);
  border: 1px solid rgba(255, 222, 67, 0.25);
  color: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.export-option-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-pure);
}

.export-option-desc {
  font-size: 11px;
  color: var(--text-muted);
}

/* Toast Notifications */
.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--surface-02);
  border: 1px solid var(--accent-primary);
  color: var(--text-pure);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 222, 67, 0.2);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 200;
  pointer-events: none;
}

.toast-notification.active {
  transform: translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--accent-primary);
  font-size: 16px;
}

/* Responsive Breakpoints */
@media (max-width: 1200px) {
  .sidebar-right {
    display: none;
  }
}

@media (max-width: 860px) {
  .sidebar-left {
    width: 320px;
  }
}

/* ==========================================================================
   MINDNROBOTICS DUAL-TONE SPLIT ARCHETYPE STYLES
   Exact replica styling of user's physical card (Black Top / Yellow Bottom)
   ========================================================================== */

/* Card face without default padding for split layout */
.card-face.duotone-split-mode {
  padding: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: stretch !important;
  overflow: hidden !important;
}

/* FRONT FACE (PORTRAIT) */
.duotone-portrait-front {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
}

.duotone-top-black-banner {
  background-color: #0b0c10;
  padding: 22px 20px 18px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.duotone-logo-text {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: var(--accent-primary, #ffde43);
  letter-spacing: 0.02em;
  text-transform: lowercase;
  line-height: 1.1;
  text-shadow: 0 0 16px rgba(255, 222, 67, 0.25);
}

.duotone-legal-name {
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.08em;
  line-height: 1.45;
  text-transform: uppercase;
  margin-top: 8px;
  max-width: 230px;
  opacity: 0.95;
}

.duotone-bottom-yellow-block {
  background-color: var(--accent-primary, #ffde43);
  color: #000000;
  flex: 1;
  padding: 20px 22px 14px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.duotone-hero-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #000000;
  text-transform: uppercase;
  line-height: 1.1;
}

.duotone-hero-role {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: #000000;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 4px;
}

.duotone-contact-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin: 12px 0;
}

.duotone-contact-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #000000;
  font-weight: 600;
}

.duotone-icon-bubble {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.duotone-icon-bubble svg {
  width: 14px;
  height: 14px;
  stroke: #000000;
  fill: none;
}

.duotone-contact-text {
  font-size: 11px;
  line-height: 1.35;
  color: #000000;
  letter-spacing: 0.02em;
}

.duotone-address-text {
  font-size: 9.5px;
  line-height: 1.4;
  color: #000000;
}

.duotone-footer-website {
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  color: #000000;
  margin-top: auto;
  text-transform: lowercase;
}

/* BACK FACE (PORTRAIT) */
.duotone-portrait-back {
  background-color: #0a0b0e;
  height: 100%;
  width: 100%;
  padding: 24px 20px 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  position: relative;
}

.duotone-services-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
}

.duotone-service-item {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  color: #e5e7eb;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.4;
}

.duotone-qr-center-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: auto 0;
}

.duotone-scan-me-label {
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.26em;
  color: #ffffff;
  text-transform: uppercase;
  margin-top: 6px;
  margin-bottom: 8px;
  opacity: 0.9;
}

.duotone-white-qr-box {
  background: #ffffff;
  padding: 6px;
  border-radius: 12px;
  width: 105px;
  height: 105px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  position: relative;
}

.duotone-white-qr-box canvas, .duotone-white-qr-box img, .duotone-white-qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.duotone-white-qr-center-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22px;
  height: 22px;
  background: #ffffff;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  color: #000000;
  box-shadow: 0 0 6px rgba(0,0,0,0.3);
  pointer-events: none;
}

.duotone-footer-website-dark {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: #e5e7eb;
  text-align: center;
  text-transform: lowercase;
  opacity: 0.9;
}

/* LANDSCAPE VARIATION FOR DUOTONE */
.duotone-landscape-front {
  display: grid;
  grid-template-columns: 42% 58%;
  height: 100%;
  width: 100%;
}

.duotone-landscape-front-left {
  background-color: #0b0c10;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(0,0,0,0.4);
}

.duotone-landscape-front-right {
  background-color: var(--accent-primary, #ffde43);
  color: #000000;
  padding: 22px 22px 14px 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.duotone-landscape-back {
  background-color: #0a0b0e;
  height: 100%;
  width: 100%;
  padding: 24px;
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  gap: 20px;
}

.duotone-landscape-back-left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  text-align: left;
}

.duotone-landscape-back-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   PRESTIGE OBSIDIAN & GOLD SUITE (HAZMAN ADANAN • EXECUTIVE EDITION)
   High-end Swiss typography, authentic gold foil, precision luxury detailing
   ========================================================================== */

.card-face.prestige-mode {
  background: #08090d !important;
  border: 1px solid rgba(255, 222, 67, 0.3) !important;
  box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.95), 0 0 35px rgba(255, 222, 67, 0.12) !important;
  padding: var(--card-face-padding, 34px) !important;
  overflow: hidden !important;
}

.prestige-card-wrap {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  position: relative;
  z-index: 10;
}

.prestige-ambient-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.prestige-hairline-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  z-index: 2;
}

/* TOP BAR */
.prestige-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 222, 67, 0.18);
  position: relative;
  z-index: 10;
}

.prestige-brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.prestige-crest {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: linear-gradient(135deg, #161720 0%, #0a0b10 100%);
  border: 1px solid rgba(255, 222, 67, 0.5);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.15), 0 4px 12px rgba(0, 0, 0, 0.6), 0 0 16px rgba(255, 222, 67, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 5px;
}

.prestige-crest svg {
  width: 100%;
  height: 100%;
}

.prestige-brand-title {
  font-family: var(--font-display, 'Space Grotesk'), sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.07em;
  line-height: 1.1;
}

.prestige-brand-legal {
  font-family: var(--font-body, 'Plus Jakarta Sans'), sans-serif;
  font-size: 8.5px;
  font-weight: 600;
  color: #8c8fa7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 3px;
  line-height: 1.25;
}

.prestige-serial-badge {
  font-family: var(--font-mono, 'JetBrains Mono'), monospace;
  font-size: 8.5px;
  color: #8a8d9f;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 4px 7px;
  border-radius: 4px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* CENTER PROTAGONIST HERO */
.prestige-center-hero {
  margin: auto 0;
  padding: 8px 0;
  position: relative;
  z-index: 10;
}

.prestige-role-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.prestige-role-label {
  font-family: var(--font-mono, 'JetBrains Mono'), monospace;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-primary, #ffde43);
}

.prestige-role-rule {
  flex-grow: 1;
  height: 1.5px;
}

.prestige-name-display {
  font-family: var(--font-display, 'Space Grotesk'), sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.prestige-gold-foil {
  display: inline-block;
  text-shadow: 0 0 20px rgba(255, 222, 67, 0.35);
}

.prestige-discipline-tagline {
  font-family: var(--font-body, 'Plus Jakarta Sans'), sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  color: #a6aac0;
  line-height: 1.45;
  letter-spacing: 0.02em;
}

/* BOTTOM CONTACTS & LOCATION */
.prestige-bottom-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 222, 67, 0.22);
  position: relative;
  z-index: 10;
}

.prestige-contact-pills {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prestige-contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #ffffff;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.prestige-contact-item svg {
  flex-shrink: 0;
  width: 13px;
  height: 13px;
}

.prestige-location-tag {
  font-family: var(--font-mono, 'JetBrains Mono'), monospace;
  font-size: 9.5px;
  color: #8c8fa7;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  font-weight: 600;
}

/* REVERSE FACE STYLING */
.prestige-back-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 222, 67, 0.22);
}

.prestige-security-chip {
  font-family: var(--font-mono, 'JetBrains Mono'), monospace;
  font-size: 8.5px;
  font-weight: 700;
  background: rgba(255, 222, 67, 0.1);
  border: 1px solid rgba(255, 222, 67, 0.35);
  padding: 4px 8px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.08em;
}

.prestige-back-core {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: auto 0;
}

.prestige-pillars-container {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.prestige-pillar-item {
  display: flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 7px 11px;
}

.prestige-pillar-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.prestige-pillar-text {
  font-family: var(--font-display, 'Space Grotesk'), sans-serif;
  font-size: 10.5px;
  font-weight: 700;
  color: #f1f2f6;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* QR Hero Box: Generous Print-Friendly Dimensions */
.prestige-qr-hero-card {
  display: flex;
  align-items: center;
  background: #0f1017;
  border: 1px solid rgba(255, 222, 67, 0.3);
  border-radius: 9px;
  padding: 9px 13px;
  gap: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.prestige-qr-square-frame {
  width: 72px;
  height: 72px;
  background: #ffffff;
  border-radius: 7px;
  padding: 4px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 222, 67, 0.2);
}

.prestige-white-qr-box {
  width: 100%;
  height: 100%;
}

.prestige-white-qr-box canvas, .prestige-white-qr-box img, .prestige-white-qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.prestige-qr-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.prestige-qr-title {
  font-family: var(--font-mono, 'JetBrains Mono'), monospace;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prestige-qr-sub {
  font-size: 11.5px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.prestige-back-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 222, 67, 0.2);
  font-size: 9.5px;
}

.prestige-footer-address {
  color: #8c8fa7;
  font-size: 8.5px;
  max-width: 65%;
  line-height: 1.35;
  font-weight: 500;
}

/* ==========================================================================
   1:1 REAL PHYSICAL LIFE SIZE (85×50MM) RULER & CALIBRATION STYLES
   ========================================================================== */
.physical-ruler-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
  background: rgba(15, 16, 23, 0.95);
  border: 1px solid rgba(255, 222, 67, 0.35);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 222, 67, 0.12);
  z-index: 40;
  backdrop-filter: blur(8px);
}

.physical-ruler-track {
  height: 22px;
  border-bottom: 1.5px solid #ffde43;
  position: relative;
  display: flex;
  align-items: flex-end;
}

/* 85mm exact physical width representation */
.physical-ruler-track.landscape-ruler {
  width: 321.26px; /* 85mm @ 96dpi */
}

.physical-ruler-track.portrait-ruler {
  width: 188.98px; /* 50mm @ 96dpi */
}

.ruler-tick {
  position: absolute;
  bottom: 0;
  width: 1px;
}

.ruler-tick.major {
  height: 12px;
  background: #ffde43;
}

.ruler-tick.minor {
  height: 6px;
  background: rgba(255, 255, 255, 0.3);
}

.ruler-tick-label {
  position: absolute;
  bottom: 13px;
  font-family: var(--font-mono);
  font-size: 7.5px;
  color: #ffde43;
  transform: translateX(-50%);
  font-weight: 600;
}

.physical-ruler-caption {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: #d1d5db;
  display: flex;
  align-items: center;
  gap: 8px;
}

.physical-ruler-caption span.accent {
  color: #ffde43;
  font-weight: 700;
}

/* ==========================================================================
   ELEMENT LAYER VISIBILITY SYSTEM
   ========================================================================== */
.layer-hidden,
.hidden,
[data-layer].layer-hidden,
[data-layer].hidden {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.layer-toggle-btn {
  background: var(--surface-02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--accent-primary);
  width: 34px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: var(--transition-fast);
  user-select: none;
}

.layer-toggle-btn:hover {
  background: var(--surface-03);
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(255, 222, 67, 0.25);
}

.layer-toggle-btn.layer-off {
  color: #555768;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  opacity: 0.55;
  filter: grayscale(1);
}

.layer-row.layer-row-muted {
  opacity: 0.45;
  transition: opacity var(--transition-fast);
}

.layer-row.layer-row-muted .layer-left span:last-child {
  text-decoration: line-through;
  color: var(--text-dim);
}

/* ==========================================================================
   QA AUDIT FIXES — keyboard focus, drag-and-drop, busy state, layer availability
   ========================================================================== */

/* Visible keyboard focus indicator for custom controls that previously
   relied on :hover only (or explicitly removed the outline) */
.pill-btn:focus-visible,
.archetype-card:focus-visible,
.monogram-btn:focus-visible,
.palette-btn:focus-visible,
.layer-toggle-btn:focus-visible,
.modal-close-btn:focus-visible,
.btn-secondary:focus-visible,
.btn-accent:focus-visible,
.floating-btn:focus-visible,
.tab-trigger:focus-visible,
.export-option-card:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

input[type="range"]:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.form-input:focus-visible, .form-select:focus-visible, .form-textarea:focus-visible,
input[type="color"]:focus-visible, input[type="radio"]:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

.finish-option-item:focus-within {
  box-shadow: var(--focus-ring);
}

/* Drag-and-drop affordance for the logo / QR upload dropzones */
.logo-upload-box.drag-over {
  border-color: var(--accent-primary);
  background: var(--surface-03);
}

/* Export options disabled while a render/export is in progress */
.export-option-card.is-busy,
#btnHeaderExportPDF.is-busy {
  pointer-events: none;
  opacity: 0.5;
  cursor: progress;
}

/* Layer toggle rows for layers that don't exist on the current archetype */
.layer-row.layer-row-unavailable {
  opacity: 0.35;
}

.layer-row.layer-row-unavailable .layer-toggle-btn {
  cursor: not-allowed;
}

/* Reverse Face UI Badges & Micro Controls */
.badge-reverse-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 8.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(255, 222, 67, 0.12);
  border: 1px solid rgba(255, 222, 67, 0.35);
  color: var(--accent-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 6px;
  vertical-align: middle;
}

.btn-micro-flip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 9px;
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text-high);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-micro-flip:hover {
  background: rgba(255, 222, 67, 0.15);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.btn-micro-flip.accent-tint {
  background: rgba(255, 222, 67, 0.1);
  border-color: rgba(255, 222, 67, 0.3);
  color: var(--accent-primary);
}

.btn-micro-flip.accent-tint:hover {
  background: rgba(255, 222, 67, 0.22);
}

.form-hint-row {
  margin-top: 5px;
}

.form-hint-text {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.4;
  display: block;
}

/* Atelier Monochrome Service Pillars Stack */
.atelier-services-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.atelier-service-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  color: #f1f2f6;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.atelier-service-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Accreditation / Certification Logo Strip (Back Face Footer) */
.cert-badges-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.cert-badges-row img {
  height: 26px;
  width: auto;
  max-width: 84px;
  object-fit: contain;
  /* Kept in original brand colors — these are official certification
     marks, not recolorable decorative icons. A small white backing chip
     (below) keeps them legible against the dark card. */
  background: #ffffff;
  border-radius: 3px;
  padding: 2px 5px;
}



