/*
 * 3MK Elevator — Design System v3 "Quiet Luxury"
 * - Soft, humanist typography (Fraunces display + Manrope text), sentence case
 * - Restrained palette: warm mist, graphite ink, champagne bronze; brand red only as a signal dot
 * - Separation by whitespace, not boxes. Soft radii, pill buttons, side drawer instead of modal
 */

:root {
  --bg: #f4f2ee;
  --surface: #fbfaf8;
  --surface-2: #ebe8e3;
  --ink: #1d1f21;
  --ink-2: #4a4e52;
  --ink-3: #8a8d90;
  --line: rgba(29, 31, 33, 0.09);
  --line-strong: rgba(29, 31, 33, 0.16);
  --accent: #9c7b55;
  --accent-soft: rgba(156, 123, 85, 0.12);
  --brand: #b3262e;
  --deep: #1b1d1f;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- Typography ---------- */
.font-display {
  font-family: 'Fraunces', Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: 'SOFT' 50, 'WONK' 0;
  letter-spacing: -0.015em;
}
.display-xl {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 340;
  font-size: clamp(2.6rem, 4.8vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-variation-settings: 'SOFT' 60;
}
.display-lg {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 360;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: 'SOFT' 60;
}
.display-md {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: 1.4rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.italic-accent { font-style: italic; color: var(--accent); font-weight: 320; }
.text-ink { color: var(--ink); }
.text-ink-2 { color: var(--ink-2); }
.text-ink-3 { color: var(--ink-3); }
.text-accent { color: var(--accent); }
.tabular { font-variant-numeric: tabular-nums; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}
.section-index {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  color: var(--ink-3);
  font-size: 15px;
}

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.005em;
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  cursor: pointer;
  white-space: nowrap;
}
.btn-sm { height: 38px; padding: 0 16px; font-size: 13px; }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-primary { background: var(--ink); color: #f7f5f1; border: 1px solid var(--ink); }
.btn-primary:hover { background: #000; }

.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-strong); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-soft { background: var(--surface); color: var(--ink); border: 1px solid transparent; box-shadow: 0 1px 2px rgba(0,0,0,0.04); }
.btn-soft:hover { background: #fff; }

.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
.link-arrow::after {
  content: '';
  position: absolute;
  left: 0;
  right: 22px;
  bottom: -3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0.25);
  transform-origin: left;
  opacity: 0.5;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}
.link-arrow:hover::after { transform: scaleX(1); opacity: 1; }
.link-arrow .arrow { transition: transform 0.35s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ---------- Header ---------- */
.site-header {
  background: rgba(244, 242, 238, 0.78);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  transition: box-shadow 0.3s var(--ease);
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--line); }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.25s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--ink); }

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--ink-2);
  background: transparent;
  border: 1px solid var(--line-strong);
  transition: all 0.3s var(--ease);
  cursor: pointer;
}
.icon-btn:hover { color: var(--ink); border-color: var(--ink); }
.icon-btn.is-on { background: var(--ink); color: #f7f5f1; border-color: var(--ink); }

/* ---------- Surfaces & media ---------- */
.surface { background: var(--surface); border-radius: var(--radius-lg); }
.media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-2);
}
.media img { transition: transform 1.1s var(--ease); }
.media:hover img { transform: scale(1.035); }
.media-tag {
  position: absolute;
  left: 14px;
  top: 14px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: rgba(251, 250, 248, 0.82);
  backdrop-filter: blur(8px);
}
.divider { height: 1px; background: var(--line); border: 0; }

/* ---------- Segmented control ---------- */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(29, 31, 33, 0.055);
}
.seg-item {
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.3s var(--ease);
  cursor: pointer;
  background: transparent;
  border: 0;
}
.seg-item:hover { color: var(--ink); }
.seg-item.is-active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 2px 8px rgba(0,0,0,0.04);
}
.seg-item:disabled, .seg-item.is-disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Form fields ---------- */
.field {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
select.field {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%234a4e52' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.field::placeholder { color: var(--ink-3); }
.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }

input[type='range'].range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--ink) var(--fill, 30%), rgba(29,31,33,0.12) var(--fill, 30%));
  outline: none;
}
input[type='range'].range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--line-strong);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  cursor: pointer;
  transition: transform 0.2s var(--ease);
}
input[type='range'].range::-webkit-slider-thumb:hover { transform: scale(1.1); }
input[type='range'].range::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 50%;
  background: #fff; border: 1px solid var(--line-strong); box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

/* ---------- Material swatches ---------- */
.swatch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink-2);
  transition: color 0.25s var(--ease);
}
.swatch {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08), 0 4px 14px rgba(0,0,0,0.08);
  outline: 1.5px solid transparent;
  outline-offset: 4px;
  transition: outline-color 0.3s var(--ease), transform 0.3s var(--ease);
}
.swatch-btn:hover .swatch { transform: translateY(-2px); }
.swatch-btn.is-active { color: var(--ink); }
.swatch-btn.is-active .swatch { outline-color: var(--ink); }
.swatch-label { font-size: 12px; font-weight: 600; text-align: center; line-height: 1.3; }

/* ---------- Lists ---------- */
.row-link {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: padding 0.4s var(--ease);
}
.row-link:hover { padding-left: 8px; }
.row-link .row-arrow {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  transition: all 0.35s var(--ease);
}
.row-link:hover .row-arrow { background: var(--ink); border-color: var(--ink); color: #f7f5f1; }

/* ---------- 3D viewport chrome (Dark Architectural Showroom Stage) ---------- */
.viewport-shell {
  --ink: #f3f1ec;
  --ink-2: #b9bcc4;
  --ink-3: #848892;
  --line: rgba(255, 255, 255, 0.10);
  --line-strong: rgba(255, 255, 255, 0.18);
  border-radius: 22px;
  background: radial-gradient(88% 72% at 50% 42%, #2b2f38 0%, #1c1e24 52%, #111317 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 24px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  position: relative;
  transition: border-radius 0.75s var(--ease), background 0.75s var(--ease), box-shadow 0.75s var(--ease);
}

/* ---------- Mode Interior (Full-screen studio transition + Explode HUD) ---------- */
.site-header {
  transition: box-shadow 0.3s var(--ease), transform 0.65s var(--ease), opacity 0.55s var(--ease);
}
.site-main {
  transition: transform 0.75s var(--ease), opacity 0.55s var(--ease);
  will-change: transform, opacity;
}
.viewport-aside {
  transition: width 0.8s var(--ease), top 0.8s var(--ease), right 0.8s var(--ease), bottom 0.8s var(--ease), left 0.8s var(--ease), height 0.8s var(--ease), padding 0.8s var(--ease), background-color 0.65s var(--ease);
}

body.interior-mode {
  overflow: hidden;
}
body.interior-mode .site-header {
  transform: translateY(-108%);
  opacity: 0;
  pointer-events: none;
}
body.interior-mode .site-main {
  transform: translateX(-110px) scale(0.985);
  opacity: 0;
  pointer-events: none;
}
body.interior-mode .viewport-aside {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 14px !important;
  background-color: #0b0c10;
  z-index: 55 !important;
}
body.interior-mode .viewport-shell {
  border-radius: 24px;
  background: radial-gradient(76% 68% at 50% 44%, #2d313b 0%, #1b1d23 54%, #0f1115 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 28px 80px rgba(0, 0, 0, 0.55);
}
body.lighting-ambient .viewport-shell,
body.interior-mode.lighting-ambient .viewport-shell {
  background: radial-gradient(72% 62% at 50% 44%, #191c24 0%, #101217 58%, #090a0d 100%);
}

/* Hide standard floor-mode chrome smoothly in Interior Mode */
.standard-hud {
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
}
body.interior-mode .standard-hud {
  opacity: 0 !important;
  transform: translateY(14px);
  pointer-events: none !important;
}

/* Show Interior Mode floating HUD smoothly */
.interior-hud {
  opacity: 0;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease) 0.18s, transform 0.65s var(--ease) 0.18s;
}
.interior-hud-top {
  transform: translateY(-16px);
}
body.interior-mode .interior-hud {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
body.interior-mode .interior-hud.interior-hud-bottom {
  pointer-events: none;
}
body.interior-mode .interior-hud.interior-hud-bottom .interior-dock {
  pointer-events: auto;
}
.interior-dock {
  background: rgba(18, 20, 26, 0.78);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 26px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.glass-pill {
  background: rgba(18, 20, 26, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.36);
}
.viewport-shell .seg {
  background: rgba(255, 255, 255, 0.08);
}
.viewport-shell .seg-item {
  color: #b7bac2;
}
.viewport-shell .seg-item:hover {
  color: #ffffff;
}
.viewport-shell .seg-item.is-active {
  background: #f4f2ed;
  color: #16181c;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.viewport-shell .btn-primary,
.viewport-shell #viewport-interior-btn {
  background: #f4f2ed;
  color: #16181c;
}
.viewport-shell .btn-primary:hover,
.viewport-shell #viewport-interior-btn:hover {
  background: #ffffff;
  color: #0e1013;
}
.viewport-shell input[type='range'].range {
  background: linear-gradient(to right, #f4f2ed var(--fill, 30%), rgba(255, 255, 255, 0.18) var(--fill, 30%));
}
.viewport-shell input[type='range'].range::-webkit-slider-thumb {
  background: #f4f2ed;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.viewport-shell input[type='range'].range::-moz-range-thumb {
  background: #f4f2ed;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.floor-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.3s var(--ease);
  font-variant-numeric: tabular-nums;
}
.floor-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.12); }
.floor-btn.is-active { background: #f4f2ed; color: #16181c; }
.tool-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: all 0.3s var(--ease);
}
.tool-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.12); }
.tool-btn.is-on { background: #f4f2ed; color: #16181c; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); display: inline-block; }

/* ---------- LED Color Plate Swatches & Rainbow Picker ---------- */
.led-plate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(29, 31, 33, 0.055);
}
.viewport-shell .led-plate {
  background: rgba(255, 255, 255, 0.08);
}
.led-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  cursor: pointer;
  padding: 0;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s var(--ease);
}
.led-dot:hover {
  transform: scale(1.16);
}
.led-dot.is-active {
  transform: scale(1.16);
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(29, 31, 33, 0.45), 0 0 10px rgba(255, 255, 255, 0.45);
}
.viewport-shell .led-dot.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.28), 0 0 12px rgba(255, 255, 255, 0.55);
}
.led-picker-wrap {
  position: relative;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: conic-gradient(#ff4d4d, #ffbe3b, #3be87a, #38d6ff, #8c66ff, #ff4da6, #ff4d4d);
  padding: 2px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease);
}
.led-picker-wrap:hover {
  transform: scale(1.14);
}
.led-picker-wrap.is-active {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.8);
}
.led-picker-wrap input[type='color'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
}
.led-picker-core {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffbe52;
  border: 1.5px solid rgba(18, 20, 26, 0.75);
  pointer-events: none;
}

/* ---------- Mode Interior Side Studio Cards & Material Swatch Chips ---------- */
.interior-side-card {
  width: 286px;
  max-height: calc(100% - 246px);
  overflow-y: auto;
  overflow-x: hidden;
  background: rgba(16, 18, 24, 0.78);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 22px;
  padding: 13px 14px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.22) transparent;
}
.interior-side-card::-webkit-scrollbar { width: 5px; }
.interior-side-card::-webkit-scrollbar-track { background: transparent; }
.interior-side-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.22); border-radius: 999px; border: 0; }

.mat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 9px 5px 6px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  text-align: left;
}
.mat-chip:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.mat-chip.is-active {
  background: var(--ink);
  color: #f7f5f1;
  border-color: var(--ink);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.14);
}
.viewport-shell .mat-chip {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  color: #c2c5ce;
}
.viewport-shell .mat-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}
.viewport-shell .mat-chip.is-active {
  background: #f4f2ed;
  color: #15171b;
  border-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.38);
}
.mat-chip-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.28);
}

/* ---------- 3-Piece Wall Panel Selector (Kabin Standar) ---------- */
.piece-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 6px 5px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink-2);
  cursor: pointer;
  transition: all 0.22s var(--ease);
}
.piece-slot:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.piece-slot.is-active {
  border-color: var(--accent);
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 0 0 2px rgba(179, 38, 46, 0.16);
}
.piece-slot-bar {
  width: 100%;
  height: 36px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  position: relative;
  overflow: hidden;
}
.piece-slot-bar.is-mirror::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, rgba(255,255,255,0.65) 0%, rgba(255,255,255,0.06) 44%, rgba(255,255,255,0.42) 56%, rgba(0,0,0,0.12) 100%);
}
.viewport-shell .piece-slot {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #c6c9d2;
}
.viewport-shell .piece-slot:hover {
  border-color: rgba(255, 255, 255, 0.36);
  color: #ffffff;
}
.viewport-shell .piece-slot.is-active {
  background: rgba(255, 255, 255, 0.15);
  border-color: #f4f2ed;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(244, 242, 237, 0.28);
}
.viewport-shell .piece-slot-bar {
  height: 28px;
  border-color: rgba(255, 255, 255, 0.24);
}

/* ---------- Drawer (replaces modal) ---------- */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 18, 22, 0.48);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s var(--ease);
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  width: min(540px, 100%);
  background: var(--surface);
  border-radius: 28px 0 0 28px;
  box-shadow: -24px 0 60px rgba(0,0,0,0.22);
  transform: translateX(104%);
  transition: transform 0.6s var(--ease), width 0.35s var(--ease);
  display: flex;
  flex-direction: column;
}
body.consult-drawer-open .drawer {
  width: min(680px, 100%);
}
body.drawer-open .drawer-backdrop { opacity: 1; pointer-events: auto; }
body.drawer-open .drawer { transform: translateX(0); }
body.drawer-open { overflow: hidden; }

/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #cfcbc4; border-radius: 999px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #a9a49c; }

::selection { background: var(--ink); color: #f7f5f1; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}
