/* ==========================================================================
   NÉO-MONDRÏAN: STUDIO DE STIJL 2026
   Modernist Interactive Art Canvas & High-DPI Wallpaper Foundry
   ========================================================================== */

:root {
  /* Mondrian Classic Palette */
  --c-red: #E6261F;
  --c-blue: #1040A5;
  --c-yellow: #FED100;
  --c-white: #FAF8F5;
  --c-black: #111111;
  --c-gray: #D5D7DC;
  --c-dark-gray: #2A2A2A;
  --c-cream: #F5F3ED;

  /* Theme Accents */
  --line-weight: 14px;
  --border-color: #111111;
  --canvas-bg: #FAF8F5;
  
  /* Interface UI Colors */
  --ui-bg: rgba(255, 255, 255, 0.94);
  --ui-surface: #FFFFFF;
  --ui-border: #111111;
  --ui-text-primary: #111111;
  --ui-text-muted: #666666;
  --ui-accent: #E6261F;
  --ui-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Space Grotesk', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --font-serif: 'Cinzel', serif;
}

/* Base Reset & Layout */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #EFECE6;
  color: var(--ui-text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   HEADER NAVIGATION
   ========================================================================== */

.studio-header {
  height: 64px;
  width: 100%;
  background: #FFFFFF;
  border-bottom: 3px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 100;
  position: relative;
}

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

.mondrian-logo-icon {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  background: var(--c-white);
  position: relative;
  box-shadow: 2px 2px 0px var(--border-color);
}

.mondrian-logo-icon .logo-red {
  background: var(--c-red);
  grid-column: 1;
  grid-row: 1;
  border-right: 2px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
}

.mondrian-logo-icon .logo-blue {
  background: var(--c-blue);
  grid-column: 2;
  grid-row: 2;
  border-left: 2px solid var(--border-color);
  border-top: 2px solid var(--border-color);
}

.mondrian-logo-icon .logo-yellow {
  background: var(--c-yellow);
  grid-column: 1;
  grid-row: 2;
  border-right: 2px solid var(--border-color);
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edition-badge {
  font-size: 0.65rem;
  background: var(--c-yellow);
  color: var(--c-black);
  padding: 2px 6px;
  font-weight: 800;
  border: 1.5px solid var(--border-color);
  letter-spacing: 0.05em;
}

.brand-subtitle {
  font-size: 0.72rem;
  color: var(--ui-text-muted);
  font-family: var(--font-mono);
  margin-top: 1px;
}

.mode-toggles {
  display: flex;
  background: #F0EEE9;
  padding: 4px;
  border-radius: 8px;
  border: 2px solid var(--border-color);
  gap: 4px;
}

.mode-btn {
  border: none;
  background: transparent;
  padding: 7px 14px;
  border-radius: 5px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #444;
  transition: all 0.15s ease;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.6);
  color: #000;
}

.mode-btn.active {
  background: var(--c-black);
  color: #FFF;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  background: #FFF;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.15s ease;
  box-shadow: 2px 2px 0px var(--border-color);
}

.btn-icon:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--border-color);
}

.btn-icon:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--border-color);
}

.btn-pill {
  padding: 8px 18px;
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 2px solid var(--border-color);
  transition: all 0.15s ease;
}

.btn-primary {
  background: var(--c-red);
  color: #FFF;
  box-shadow: 3px 3px 0px var(--border-color);
}

.btn-primary:hover {
  background: #cc1f18;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px var(--border-color);
}

.btn-primary:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0px var(--border-color);
}

.btn-secondary {
  background: #FFF;
  color: var(--c-black);
  box-shadow: 3px 3px 0px var(--border-color);
}

.btn-secondary:hover {
  background: #F7F5F0;
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0px var(--border-color);
}

/* ==========================================================================
   WORKSPACE LAYOUT
   ========================================================================== */

.studio-workspace {
  display: grid;
  grid-template-columns: 240px 1fr 310px;
  height: calc(100vh - 64px);
  width: 100%;
  position: relative;
  background-color: #E8E5DF;
}

/* ==========================================================================
   LEFT TOOLBAR / PALETTE DOCK
   ========================================================================== */

.palette-dock {
  background: #FFFFFF;
  border-right: 3px solid var(--border-color);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  z-index: 20;
}

.dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dock-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #555;
}

.swatches-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.swatch-btn {
  aspect-ratio: 1;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  background: var(--c);
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 4px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.8);
}

.swatch-btn:hover {
  transform: scale(1.05);
}

.swatch-btn.active {
  outline: 3px solid #000;
  outline-offset: 2px;
  transform: scale(1.06);
  box-shadow: 3px 3px 0px var(--c-yellow);
}

.color-shortcut {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  background: rgba(0, 0, 0, 0.6);
  color: #FFF;
  padding: 1px 4px;
  border-radius: 3px;
  pointer-events: none;
}

/* Custom Color Picker: Any Shape Any Color */
.custom-color-picker-box {
  background: #F7F5F0;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 6px;
}

.custom-color-label {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #111;
}

.custom-picker-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.styled-color-input {
  -webkit-appearance: none;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  width: 38px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  background: transparent;
}

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

.styled-color-input::-webkit-color-swatch {
  border: none;
  border-radius: 2px;
}

.color-hex-tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  background: #FFF;
  border: 1px solid var(--border-color);
  padding: 4px 8px;
  border-radius: 4px;
  color: #111;
  flex: 1;
  text-align: center;
}

.dock-divider {
  height: 2px;
  background: #E8E5DF;
  margin: 2px 0;
}

.tool-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.tool-btn {
  padding: 9px 8px;
  background: #F7F5F0;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-display);
  transition: all 0.15s ease;
}

.tool-btn i {
  font-size: 1.15rem;
}

.tool-btn:hover {
  background: #FFF;
  border-color: var(--c-blue);
}

.tool-btn.active {
  background: var(--c-black);
  color: #FFF;
  border-color: var(--c-black);
  box-shadow: 2px 2px 0px var(--c-yellow);
}

.thickness-control {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.control-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #555;
}

input[type="range"] {
  accent-color: var(--c-red);
  cursor: pointer;
}

.styled-select {
  width: 100%;
  padding: 8px;
  border: 2px solid var(--border-color);
  border-radius: 5px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  background: #FFF;
  cursor: pointer;
  outline: none;
}

.btn-clear {
  margin-top: auto;
  padding: 10px;
  background: #FFF;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.15s ease;
  box-shadow: 2px 2px 0px var(--border-color);
}

.btn-clear:hover {
  background: #FEE7E6;
  border-color: var(--c-red);
  color: var(--c-red);
}

/* ==========================================================================
   CENTER ARTBOARD STAGE
   ========================================================================== */

.stage-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 30px;
  position: relative;
  overflow: hidden;
  background: radial-gradient(#D6D1C6 1.5px, transparent 1.5px), #E5E1D7;
  background-size: 24px 24px;
}

.canvas-aspect-wrapper {
  width: min(92%, 880px);
  height: min(80vh, 680px);
  background: var(--c-white);
  border: var(--line-weight) solid var(--border-color);
  box-shadow: 12px 16px 40px rgba(0, 0, 0, 0.16), 0 0 0 1px rgba(0,0,0,0.2);
  position: relative;
  display: flex;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

/* MONDRIAN GRID CONTAINER */
.mondrian-grid {
  width: 100%;
  height: 100%;
  position: relative;
  background: var(--c-white);
  user-select: none;
}

/* Grid Cell representation */
.m-cell {
  position: absolute;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.2s ease, filter 0.15s ease;
}

.m-cell:hover {
  filter: brightness(0.96);
}

.m-cell::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px dashed transparent;
  pointer-events: none;
  transition: border-color 0.15s ease;
}

.m-cell:hover::after {
  border-color: rgba(0, 0, 0, 0.3);
}

/* Individual Cell Color states */
.m-cell[data-color="red"]    { background-color: var(--c-red) !important; color: #FFF; }
.m-cell[data-color="blue"]   { background-color: var(--c-blue) !important; color: #FFF; }
.m-cell[data-color="yellow"] { background-color: var(--c-yellow) !important; color: #111; }
.m-cell[data-color="white"]  { background-color: var(--c-white) !important; color: #111; }
.m-cell[data-color="black"]  { background-color: var(--c-black) !important; color: #FFF; }
.m-cell[data-color="gray"]   { background-color: var(--c-gray) !important; color: #111; }

/* Grid Dividing Lines (Movable Splitters) */
.m-divider-v, .m-divider-h {
  position: absolute;
  background-color: var(--border-color);
  z-index: 10;
  touch-action: none;
}

.m-divider-v::after, .m-divider-h::after {
  content: "";
  position: absolute;
  touch-action: none;
}

.m-divider-v::after {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 28px;
  transform: translateX(-50%);
}

.m-divider-h::after {
  left: 0;
  right: 0;
  top: 50%;
  height: 28px;
  transform: translateY(-50%);
}

.m-divider-v {
  top: 0;
  bottom: 0;
  width: var(--line-weight);
  cursor: col-resize;
  transform: translateX(-50%);
}

.m-divider-h {
  left: 0;
  right: 0;
  height: var(--line-weight);
  cursor: row-resize;
  transform: translateY(-50%);
}

.m-divider-v:hover, .m-divider-h:hover,
.m-divider-v.dragging, .m-divider-h.dragging {
  background-color: var(--c-red) !important;
  box-shadow: 0 0 10px rgba(230, 38, 31, 0.5);
}

/* Subtle Oil Paint Texture Layer */
.canvas-grain-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  z-index: 15;
  transition: opacity 0.3s ease;
}

body:not(.texture-canvas) .canvas-grain-layer {
  opacity: 0;
}

/* ==========================================================================
   FLOATING INTERACTIVE WIDGETS (DRAGGABLE & MOVABLE)
   ========================================================================== */

.floating-widget {
  position: absolute;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 2px solid var(--border-color);
  border-radius: 6px;
  box-shadow: 4px 6px 20px rgba(0, 0, 0, 0.15);
  z-index: 18;
  cursor: grab;
  user-select: none;
}

.floating-widget:active {
  cursor: grabbing;
}

.manifesto-widget {
  top: 24px;
  right: 24px;
  width: 250px;
}

.clock-widget {
  bottom: 24px;
  left: 24px;
  width: 170px;
}

.widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-bottom: 2px solid var(--border-color);
  background: #F4F2EC;
}

.widget-dot {
  width: 10px;
  height: 10px;
  background: var(--c-red);
  border: 1px solid #000;
}

.widget-dot.yellow {
  background: var(--c-yellow);
}

.widget-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.widget-close {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.widget-body {
  padding: 10px;
}

.manifesto-quote {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-style: italic;
  line-height: 1.35;
  color: #111;
}

.manifesto-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  color: #555;
}

.opus-code {
  color: var(--c-red);
}

.clock-display {
  padding: 10px 10px 4px;
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-align: center;
}

.rhythm-meter {
  display: flex;
  gap: 3px;
  height: 8px;
  padding: 4px 10px 8px;
}

.rhythm-meter .bar {
  flex: 1;
  background: #DDD;
  border-radius: 2px;
  transition: background-color 0.2s;
}

.rhythm-meter .bar-1 { background: var(--c-red); }
.rhythm-meter .bar-2 { background: var(--c-blue); }
.rhythm-meter .bar-3 { background: var(--c-yellow); }
.rhythm-meter .bar-4 { background: var(--c-black); }

/* HUD Bottom Info Bar */
.canvas-hud {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 14px;
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  padding: 6px 16px;
  border-radius: 30px;
  box-shadow: 2px 2px 0px var(--border-color);
}

.hud-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hud-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: #777;
}

.hud-value {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 700;
}

.text-gold {
  color: #8c7300;
}

.hud-item.hint {
  color: #555;
  font-size: 0.75rem;
  border-left: 1px solid #CCC;
  padding-left: 16px;
  font-weight: 500;
}

/* ==========================================================================
   RIGHT CURATION & DISCOVERY PANEL
   ========================================================================== */

.curator-panel {
  background: #FFFFFF;
  border-left: 3px solid var(--border-color);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
  z-index: 20;
}

.curator-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.curator-header p {
  font-size: 0.75rem;
  color: var(--ui-text-muted);
  font-family: var(--font-mono);
}

.curator-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-title {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-desc {
  font-size: 0.73rem;
  color: #666;
  line-height: 1.3;
}

.module-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.module-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #F7F5F0;
  border: 1.5px solid var(--border-color);
  border-radius: 6px;
  cursor: grab;
  transition: all 0.15s ease;
}

.module-card:hover {
  background: #FFF;
  transform: translateX(2px);
  box-shadow: 2px 2px 0px var(--border-color);
}

.module-icon {
  width: 28px;
  height: 28px;
  background: #FFF;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.module-info {
  flex: 1;
}

.module-info h4 {
  font-size: 0.78rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.module-info p {
  font-size: 0.68rem;
  color: #666;
}

.btn-inject {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 1.5px solid var(--border-color);
  background: #FFF;
  cursor: pointer;
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
}

.btn-inject:hover {
  background: var(--c-yellow);
}

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

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  font-weight: 600;
  color: #555;
}

.button-row {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}

.w-full {
  width: 100%;
}

.wallpaper-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.quick-wall-btn {
  padding: 10px 8px;
  background: #F7F5F0;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  transition: all 0.15s ease;
  box-shadow: 2px 2px 0px var(--border-color);
}

.quick-wall-btn:hover {
  background: #FFF;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--c-blue);
  border-color: var(--c-blue);
}

.quick-wall-btn i {
  font-size: 1.1rem;
}

/* ==========================================================================
   INTERACTIVE CELL EMBEDDED WIDGETS
   ========================================================================== */

.cell-content-wrapper {
  width: 100%;
  height: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cell-synth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: inherit;
}

.synth-keys {
  display: flex;
  gap: 4px;
}

.synth-key {
  width: 22px;
  height: 38px;
  background: rgba(255,255,255,0.8);
  border: 1.5px solid #000;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.1s, background-color 0.1s;
}

.synth-key:hover, .synth-key:active {
  background: #FFF;
  transform: scaleY(0.95);
}

.cell-quote-card {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.3;
  padding: 6px;
}

.cell-seal-badge {
  border: 2px solid currentColor;
  padding: 6px 10px;
  font-family: var(--font-serif);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* BROADWAY BOOGIE PULSE MODE */
.boogie-mode .m-cell[data-color="yellow"] {
  animation: boogiePulse 1.2s infinite alternate ease-in-out;
}

.boogie-mode .m-cell[data-color="red"] {
  animation: boogieColorHop 0.8s infinite alternate ease-in-out;
}

.boogie-mode .m-cell[data-color="blue"] {
  animation: boogieColorHop 1.4s infinite alternate ease-in-out;
}

@keyframes boogiePulse {
  0% { filter: brightness(1); }
  100% { filter: brightness(1.2) saturate(1.4); }
}

@keyframes boogieColorHop {
  0% { transform: scale(1); }
  50% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

/* Play Painting Radar Scan Line */
.mondrian-scan-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--c-red), var(--c-yellow), var(--c-blue));
  box-shadow: 0 0 16px rgba(230, 38, 31, 0.85), 0 0 8px #FFF;
  z-index: 25;
  display: none;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.mondrian-scan-line.active {
  display: block;
}

.cell-playing-hit {
  filter: brightness(1.6) saturate(1.4) !important;
  z-index: 10 !important;
  box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.9), 0 0 25px rgba(255, 208, 0, 0.7) !important;
  transition: filter 0.08s ease, box-shadow 0.08s ease;
}

/* ==========================================================================
   MODALS: INTERIOR LIVING ROOM PREVIEW & EXPORT STUDIO
   ========================================================================== */

.interior-modal-overlay,
.export-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.interior-modal-overlay.open,
.export-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.interior-modal-container,
.export-modal-container {
  background: #FFF;
  border: 3px solid var(--border-color);
  box-shadow: 10px 14px 0px rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  width: min(94vw, 1100px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.interior-modal-header,
.export-header {
  padding: 16px 24px;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FAF8F5;
}

.modal-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-title-wrap i {
  font-size: 1.4rem;
  color: var(--c-red);
}

.modal-title-wrap h2,
.export-header h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 800;
}

.export-header p {
  font-size: 0.8rem;
  color: #666;
  margin-top: 2px;
}

.interior-view-tabs {
  display: flex;
  background: #EAE7E0;
  border: 1.5px solid var(--border-color);
  padding: 3px;
  border-radius: 6px;
  gap: 3px;
}

.interior-tab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  border-radius: 4px;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.interior-tab.active {
  background: #FFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 6px;
}

/* VIRTUAL LIVING ROOM INTERIOR STAGE */
.interior-stage {
  height: 520px;
  background: #252422;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-environment {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s ease;
}

/* Modern Loft Scene Backdrop */
.scene-modern-loft {
  background: linear-gradient(180deg, #EFECE6 0%, #D8D3C8 68%, #3A352F 68%, #201E1B 100%);
}

.scene-museum-white {
  background: linear-gradient(180deg, #FFFFFF 0%, #F0EEEA 80%, #6E5F52 80%, #463C33 100%);
}

.scene-phone-mockup {
  background: radial-gradient(circle at center, #2C3E50 0%, #000000 100%);
}

.scene-macbook-mockup {
  background: linear-gradient(135deg, #1A1A24 0%, #0E0E14 100%);
}

/* Frame Hung On Wall */
.artwork-frame {
  width: 440px;
  height: 330px;
  background: #111111;
  padding: 18px;
  border-radius: 2px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 5;
  transition: transform 0.4s ease, width 0.4s ease, height 0.4s ease;
}

/* Mockup variations */
.scene-phone-mockup .artwork-frame {
  width: 220px;
  height: 440px;
  border-radius: 36px;
  padding: 10px;
  border: 4px solid #444;
  box-shadow: 0 20px 50px rgba(0,0,0,0.8);
}

.scene-phone-mockup .frame-plaque {
  display: none;
}

.scene-phone-mockup .frame-passepartout {
  border-radius: 28px;
  padding: 0;
}

.frame-passepartout {
  flex: 1;
  background: #FAF8F5;
  padding: 18px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
  display: flex;
  overflow: hidden;
}

.artwork-clone-viewport {
  width: 100%;
  height: 100%;
  position: relative;
  background: #FAF8F5;
  border: 6px solid #111;
  overflow: hidden;
}

.frame-plaque {
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 0.65rem;
  color: #DDD;
  text-align: center;
  letter-spacing: 0.05em;
}

/* Architectural silhouette fixtures */
.sofa-silhouette {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 580px;
  height: 80px;
  background: #1C1B19;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.4);
  z-index: 10;
}

.scene-phone-mockup .sofa-silhouette,
.scene-macbook-mockup .sofa-silhouette {
  display: none;
}

.plant-silhouette {
  position: absolute;
  bottom: 30px;
  left: 60px;
  width: 70px;
  height: 160px;
  background: radial-gradient(ellipse at bottom, #111 60%, transparent 70%);
  opacity: 0.8;
}

.scene-phone-mockup .plant-silhouette,
.scene-macbook-mockup .plant-silhouette {
  display: none;
}

.gallery-spotlight {
  position: absolute;
  top: 0;
  width: 500px;
  height: 350px;
  background: radial-gradient(ellipse at top, rgba(255, 255, 240, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.interior-footer {
  padding: 12px 24px;
  background: #FAF8F5;
  border-top: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.interior-footer p {
  font-size: 0.78rem;
  color: #555;
}

/* ==========================================================================
   EXPORT & PRINT MODAL
   ========================================================================== */

.export-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 24px;
  gap: 24px;
  overflow-y: auto;
}

.export-preview-column {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F0EDE6;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 20px;
}

.print-preview-frame {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 3 / 4;
  background: #111111;
  padding: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  display: flex;
}

.print-mat-board {
  flex: 1;
  background: #FFF;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.print-artwork-embed {
  flex: 1;
  position: relative;
  border: 6px solid #111;
  overflow: hidden;
}

.print-curator-plaque {
  margin-top: 16px;
  border-top: 1.5px solid #111;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.plaque-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.plaque-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: #666;
}

.plaque-signature {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  font-family: var(--font-serif);
  font-size: 0.7rem;
  font-style: italic;
}

.edition-sig {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-style: normal;
  color: #888;
}

.export-options-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.option-card {
  background: #FAF8F5;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option-card h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.option-card p {
  font-size: 0.76rem;
  color: #666;
  line-height: 1.35;
}

.radio-resolutions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.res-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: #FFF;
  border: 1.5px solid var(--border-color);
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.res-choice.active {
  border-color: var(--c-red);
  background: #FFF5F5;
}

.res-info {
  display: flex;
  flex-direction: column;
}

.res-info strong {
  font-size: 0.75rem;
  font-family: var(--font-display);
}

.res-info span {
  font-size: 0.65rem;
  color: #777;
  font-family: var(--font-mono);
}

.export-buttons-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ==========================================================================
   DIRECT ARCHIVAL PRINT STYLES (@media print)
   ========================================================================== */

.printable-gallery-page {
  display: none;
}

@media print {
  body {
    background: #FFF !important;
    overflow: visible !important;
  }

  .studio-header,
  .palette-dock,
  .curator-panel,
  .canvas-hud,
  .interior-modal-overlay,
  .export-modal-overlay,
  .floating-widget {
    display: none !important;
  }

  .printable-gallery-page {
    display: block !important;
    width: 100vw;
    height: 100vh;
    padding: 2cm;
    page-break-after: always;
    box-sizing: border-box;
  }

  .print-border-frame {
    width: 100%;
    height: 100%;
    border: 12px solid #000;
    padding: 3cm;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .print-inner-canvas {
    flex: 1;
    position: relative;
    border: 8px solid #000;
  }

  .print-museum-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5cm;
    border-top: 2px solid #000;
    padding-top: 0.5cm;
    font-family: 'Space Grotesk', sans-serif;
  }

  .print-museum-footer h3 {
    font-size: 14pt;
    font-weight: 800;
  }

  .print-museum-footer p {
    font-size: 9pt;
    font-family: 'Space Mono', monospace;
  }
}

/* Responsive adjustments */
@media (max-width: 1100px) {
  .studio-workspace {
    grid-template-columns: 200px 1fr;
  }
  .curator-panel {
    display: none;
  }
}

/* ==========================================================================
   CUSTOM FRAME & PRINT SIZING STUDIO STYLES
   ========================================================================== */

.print-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

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

.control-group-compact label {
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #444;
  display: flex;
  align-items: center;
  gap: 5px;
}

.select-compact, .input-compact {
  width: 100%;
  padding: 6px 8px;
  font-size: 0.78rem;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  background: #FFF;
  color: #111;
  font-family: var(--font-sans);
  outline: none;
}

.custom-dimensions-box {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  background: #F0EDE6;
  padding: 8px;
  border-radius: 5px;
  border: 1px dashed #BBB;
  transition: opacity 0.2s, max-height 0.2s;
}

.custom-dimensions-box.hidden {
  display: none;
}

.orientation-pill-group {
  display: flex;
  gap: 4px;
}

.orient-pill {
  flex: 1;
  padding: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  background: #FFF;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.orient-pill:hover {
  background: #EEE;
}

.orient-pill.active {
  background: #111;
  color: #FFF;
  border-color: #111;
}

/* Dynamic Frame Border Classes */
.frame-black {
  background: #111111 !important;
  border: 14px solid #111111 !important;
  box-shadow: 0 15px 40px rgba(0,0,0,0.45) !important;
}

.frame-walnut {
  background: #3E2723 !important;
  border: 14px solid #4E342E !important;
  box-shadow: 0 15px 40px rgba(62,39,35,0.45) !important;
}

.frame-white {
  background: #FDFBF7 !important;
  border: 14px solid #E5E7EB !important;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2) !important;
}

.frame-gold {
  background: #B45309 !important;
  border: 14px solid #D4AF37 !important;
  box-shadow: 0 15px 40px rgba(212,175,55,0.35) !important;
}

.frame-frameless {
  background: transparent !important;
  border: 0px none !important;
  padding: 0 !important;
  box-shadow: 0 15px 35px rgba(0,0,0,0.25) !important;
}

/* Dynamic Mat Board Classes */
.mat-none { padding: 0px !important; }
.mat-slim { padding: 12px !important; }
.mat-classic { padding: 22px !important; }
.mat-wide { padding: 34px !important; }


/* Mobile studio shell */
@media (max-width: 900px) {
  html, body { height: 100dvh; }
  .studio-header {
    height: auto;
    min-height: 52px;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
  }
  .brand-subtitle, .edition-badge, .brand-titles p { display: none; }
  .studio-header button { min-width: 40px; min-height: 40px; }
  .export-body, .export-modal-body, .modal-body, .print-controls-grid { grid-template-columns: 1fr; }
  .export-modal-container, .export-modal-dialog, .modal-dialog, .modal-card, .interior-modal-container {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    max-height: 88dvh;
  }
  .sofa-silhouette { width: min(580px, 100%); }
  .picasso-stage, .kandinsky-stage, .monet-art-stage, .dali-art-stage,
  .stage-surface, .emin-stage-surface, .mondrian-grid,
  .stage-collage-surface, .stage-flora-surface, .stage-dali-surface,
  .p-collage-item, .m-flora-item, .dali-entity, .klimt-entity, .kusama-entity,
  .kahlo-entity, .haring-entity, .emin-entity, .k-entity {
    touch-action: none;
  }
}
