/* ---- High-end mirror showroom ---- */
:root {
  --vh: 1vh;
  --mirror-width: min(50vmin, 380px);
  --mirror-height: min(48vmin, 360px);
  --showroom-bg: #f5f3f0;
  --showroom-wall: #ebe8e4;
  --frame-color: #2a2522;
  --frame-light: #4a4540;
  --text: #1c1a18;
  --text-muted: #5c5752;
  --accent: #3d3935;
  --brass: #b8860b;
  --brass-light: #d4a84b;
  --marble: #e8e6e2;
  --shadow-soft: rgba(0, 0, 0, 0.06);
  --shadow-medium: rgba(0, 0, 0, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html {
  font-size: clamp(14px, 2vmin, 18px);
  overflow: hidden;
  height: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: calc(var(--vh, 1vh) * 100);
  overflow: hidden;
  font-family: "Outfit", "Cormorant Garamond", Georgia, serif;
  background: #0d2438;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

/* Full-page water video background */
.page-bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.page-bg-video__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-bg-video__fallback {
  display: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0d2840 0%, #0f3a5c 50%, #134a70 100%);
  background-size: 400% 400%;
  animation: waterFlow 12s ease-in-out infinite;
}
.page-bg-video__fallback.is-visible {
  display: block;
}
.page-bg-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.25) 0%, transparent 20%, transparent 80%, rgba(0,0,0,0.35) 100%);
  pointer-events: none;
}

/* ---- Text background layer (click "1"): text left and right of mirror only ---- */
.text-background-layer {
  position: fixed;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  min-height: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.text-background-layer.is-visible {
  visibility: visible;
  opacity: 1;
  z-index: 2;
}
/* Above .page (z10) so pan/scroll hits the columns on iOS; gap stays pointer-events:none → mirror still receives touches through. */
body.text-layer-visible .text-background-layer.is-visible {
  z-index: 12;
  pointer-events: none;
}
body.text-layer-visible .text-background-layer.is-visible .text-background-left,
body.text-layer-visible .text-background-layer.is-visible .text-background-right {
  pointer-events: auto;
  touch-action: pan-y pinch-zoom;
  height: 100%;
  max-height: 100%;
  align-self: stretch;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
/* Left column: scrollable text, no text under mirror */
.text-background-left {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
/* Center: empty gap where the mirror sits */
.text-background-gap {
  flex: 0 0 auto;
  width: var(--mirror-width);
  min-width: var(--mirror-width);
  pointer-events: none;
}
/* Right column: scrollable text, no text under mirror */
.text-background-right {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  overscroll-behavior: contain;
}
/* Transparent / invisible scrollbars on text columns */
.text-background-left,
.text-background-right {
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}
.text-background-left::-webkit-scrollbar,
.text-background-right::-webkit-scrollbar {
  width: 10px;
}
.text-background-left::-webkit-scrollbar-track,
.text-background-right::-webkit-scrollbar-track {
  background: transparent;
}
.text-background-left::-webkit-scrollbar-thumb,
.text-background-right::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 4px;
}
.text-background-left::-webkit-scrollbar-thumb:hover,
.text-background-right::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.08);
}
.text-background-left::-webkit-scrollbar-corner,
.text-background-right::-webkit-scrollbar-corner {
  background: transparent;
}
/* When text is open: only the text panels scroll, page stays fixed */
body.text-layer-visible {
  overflow: hidden;
  /* Override body { touch-action: manipulation } so nested overflow columns can receive vertical pan on iOS */
  touch-action: auto;
}
/* Page below text layer (z12): mirror gap sees through; header/footer re-enable pointer-events where needed */
body.text-layer-visible .page {
  z-index: 10;
  pointer-events: none;
}
/* Header/footer must not capture touch scrolling — text columns sit under .page on phones; swipes were eaten here. */
body.text-layer-visible .page .showroom-header {
  pointer-events: none;
}
body.text-layer-visible .page .stage,
body.text-layer-visible .page .footer-actions {
  pointer-events: auto;
}
body.text-layer-visible .page .stage {
  position: fixed;
  top: 4.5rem;
  left: 0;
  right: 0;
  bottom: 4rem;
  width: 100%;
  z-index: 4;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.text-layer-visible .page .stage .mirror-wrap,
body.text-layer-visible .page .stage .objects {
  pointer-events: auto;
}
body.text-layer-visible .page .footer-actions {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, 100%);
  max-width: 100%;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  padding-bottom: env(safe-area-inset-bottom, 0);
  pointer-events: none;
}
body.text-layer-visible .page .footer-actions .sound-btn,
body.text-layer-visible .page .footer-actions .camera-btn,
body.text-layer-visible .page .footer-actions .about-btn {
  pointer-events: auto;
}
body.text-layer-visible .page .showroom-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
}
/* Text layer controls: above text layer + page */
.text-background-controls {
  position: fixed;
  inset: 0;
  z-index: 13;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
body.text-layer-visible .text-background-controls {
  visibility: visible;
  opacity: 1;
}
.text-background-controls .text-background-close,
.text-background-controls .text-background-controls-cluster,
.text-background-controls .text-background-reload,
.text-background-controls .text-background-audio {
  pointer-events: auto;
}
.text-background-controls-cluster {
  position: absolute;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0));
  left: calc(1rem + env(safe-area-inset-left, 0));
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  max-width: calc(100% - 5rem);
}
.text-background-controls .text-background-close {
  position: absolute;
  top: calc(1rem + env(safe-area-inset-top, 0));
  right: calc(1rem + env(safe-area-inset-right, 0));
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.text-background-controls .text-background-close:hover {
  background: rgba(0, 0, 0, 0.65);
  transform: scale(1.05);
}
.text-background-controls .text-background-close-icon {
  flex-shrink: 0;
}
.text-background-controls .text-background-reload {
  position: static;
  padding: 0.5rem 0.75rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  cursor: pointer;
}
.text-background-controls .text-background-reload:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
.text-background-controls .text-background-audio {
  padding: 0.5rem 0.75rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 4px;
  cursor: pointer;
}
/* Ensure Play audio is visible when JS clears [hidden] (some browsers keep display:none on button) */
body.text-layer-visible .text-background-controls .text-background-audio:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.text-background-controls .text-background-audio:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
}
.text-background-controls .text-background-audio[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.55);
}
.text-background-content {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
}
.text-background-left .text-background-content { padding-right: 1.5rem; }
.text-background-right .text-background-content { padding-left: 1.5rem; }
body.text-layer-visible .text-background-left .text-background-content,
body.text-layer-visible .text-background-right .text-background-content {
  padding-top: max(2rem, calc(3.5rem + env(safe-area-inset-top, 0px)));
  padding-bottom: max(3rem, calc(4.5rem + env(safe-area-inset-bottom, 0px)));
}
.text-background-layer .text-body {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.text-background-layer .text-body p {
  margin: 0 0 1em;
}
.text-background-layer .text-body p:last-child {
  margin-bottom: 0;
}
.text-background-layer .text-body p.text-preserve-whitespace {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.page.showroom {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  height: calc(var(--vh, 1vh) * 100);
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  padding-top: env(safe-area-inset-top, 0);
  background: transparent;
  overflow: hidden;
}

/* ---- Top-left: full 水月镜花 image (Copy) ---- */
.topleft-title-img {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: 16vmin;
  max-height: 10rem;
  max-width: 28rem;
  object-fit: contain;
  object-position: left top;
  pointer-events: none;
  z-index: 2;
  opacity: 0.92;
}
.topright-title-img {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  width: auto;
  height: 16vmin;
  max-height: 10rem;
  max-width: 28rem;
  object-fit: contain;
  object-position: right top;
  pointer-events: none;
  z-index: 2;
  opacity: 0.92;
}
.bottomleft-title-img {
  position: fixed;
  bottom: 0.75rem;
  left: 0.75rem;
  width: auto;
  height: 16vmin;
  max-height: 10rem;
  max-width: 28rem;
  object-fit: contain;
  object-position: left bottom;
  pointer-events: none;
  z-index: 2;
  opacity: 0.92;
}
.bottomright-title-img {
  position: fixed;
  bottom: 0.75rem;
  right: 0.75rem;
  width: auto;
  height: 16vmin;
  max-height: 10rem;
  max-width: 28rem;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  z-index: 2;
  opacity: 0.92;
}

@media (max-width: 600px) {
  .topleft-title-img { height: 12vmin; max-height: 6.5rem; top: 0.5rem; left: 0.5rem; }
  .topright-title-img { height: 12vmin; max-height: 6.5rem; top: 0.5rem; right: 0.5rem; }
  .bottomleft-title-img { height: 12vmin; max-height: 6.5rem; bottom: 0.5rem; left: 0.5rem; }
  .bottomright-title-img { height: 12vmin; max-height: 6.5rem; bottom: 0.5rem; right: 0.5rem; }
}

/* ---- Showroom header: minimal, luxury ---- */
.showroom-header {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}
.showroom-name {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(0.85rem, 2vmin, 1rem);
  font-weight: 600;
  letter-spacing: 0.28em;
  color: rgba(255, 255, 255, 0.95);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.showroom-tagline {
  font-family: "Outfit", sans-serif;
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  color: rgba(255, 255, 255, 0.75);
  text-transform: uppercase;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.showroom-byline {
  display: block;
  margin-top: 0.2rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ---- Stage: one mirror, centered ---- */
.stage {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 1rem;
}

/* ---- Designer objects: furniture aesthetic ---- */
.objects {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}
.objects > * { pointer-events: auto; }

.obj {
  position: absolute;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  cursor: grab;
  transition: transform 0.25s ease;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}
.obj:hover {
  transform: scale(1.08);
}
.obj:active { cursor: grabbing; }
.obj.dragging {
  opacity: 0.92;
  transform: scale(1.12);
  z-index: 100;
  cursor: grabbing;
}
.obj.obj-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Number icons only */
.obj-icon--num {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.8), 0 1px 4px rgba(0, 0, 0, 0.6), 0 2px 6px rgba(0, 0, 0, 0.4);
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

.obj-label {
  display: none;
}

/* Number icons: scattered around */
.obj--num1 { top:  6%;  left:  18%; }
.obj--num2 { top:  10%; right: 22%; }
.obj--num3 { top:  35%; left:  4%; }
.obj--num4 { top:  40%; right:  6%; }
.obj--num5 { bottom: 28%; left:  15%; }
.obj--num6 { bottom:  8%;  right: 20%; }
.obj--num7 { top:  18%; left:  55%; }
.obj--num8 { bottom: 22%; right: 12%; }

@media (max-width: 600px) {
  :root {
    --mirror-width: min(44vmin, 78vw);
    --mirror-height: min(42vmin, 74vw);
  }
  .obj { width: 52px; height: 52px; min-width: 44px; min-height: 44px; }
  .obj--num .obj-icon { width: 34px; height: 34px; min-width: 34px; min-height: 34px; font-size: 1rem; }
  .obj--num1 { top:  5%;  left:  8%; }
  .obj--num2 { top:  8%;  right: 10%; }
  .obj--num3 { top:  32%; left:  2%; }
  .obj--num4 { top:  38%; right:  2%; }
  .obj--num5 { bottom: 30%; left:  8%; }
  .obj--num6 { bottom:  6%;  right: 12%; }
  .obj--num7 { top:  15%; left: 50%; transform: translateX(-50%); }
  .obj--num8 { bottom: 20%; right:  8%; }
  .text-background-content {
    padding: 1.25rem 1rem 2.5rem;
  }
  .text-background-layer .text-body {
    font-size: 1.05rem;
  }
  .sound-btn,
  .camera-btn,
  .about-btn {
    min-height: 44px;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

/* ---- Mirror: one colour, real mirror look ---- */
.mirror-wrap {
  position: relative;
  width: var(--mirror-width);
  height: var(--mirror-height);
  flex-shrink: 0;
  border-radius: 50% / 48%;
  overflow: hidden;
  box-shadow:
    0 24px 64px var(--shadow-medium),
    0 8px 24px var(--shadow-soft),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* Mirror surface: Water2.MOV video */
.mirror-surface-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mirror-surface-fallback {
  display: none;
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0d2840 0%, #0f3a5c 50%, #134a70 100%);
  background-size: 400% 400%;
  animation: waterFlow 8s ease-in-out infinite;
}

/* Clear reflection (like a real mirror) – top portion */
.mirror-reflection-layer {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 48%, transparent 48%);
  mask-image: linear-gradient(to bottom, black 0%, black 48%, transparent 48%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  pointer-events: none;
}
.camera-mirror {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  transform: scaleX(-1);
}
.camera-mirror.active {
  opacity: 1;
  visibility: visible;
}

/* Live water effect: lower half of mirror shows flowing water */
.mirror-water-layer {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(to top, black 0%, black 52%, transparent 52%);
  mask-image: linear-gradient(to top, black 0%, black 52%, transparent 52%);
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  pointer-events: none;
}
.mirror-wrap > *:last-child {
  pointer-events: none;
}
.mirror-wrap .ripple-canvas,
.mirror-wrap .sunk-objects {
  pointer-events: none;
}

.water-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
}

.water-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    #0d2840 0%,
    #0f3a5c 25%,
    #134a70 50%,
    #0f3a5c 75%,
    #0d2840 100%
  );
  background-size: 400% 400%;
  animation: waterFlow 8s ease-in-out infinite;
}
.water-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(30, 70, 100, 0.4) 50%,
    transparent 100%
  );
  animation: waterShine 6s ease-in-out infinite;
}

@keyframes waterFlow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
@keyframes waterShine {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.camera-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  transform: scaleX(-1);
}
.camera-overlay.active {
  opacity: 0.78;
  visibility: visible;
  mix-blend-mode: overlay;
}

.mirror-reflection {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,0.06) 0%,
    transparent 50%,
    rgba(0,0,0,0.1) 100%
  );
}

.ripple-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.sunk-objects {
  position: absolute;
  inset: 0;
}

.sunk-item {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: sinkIn 2.2s ease-in forwards;
  transform-origin: center center;
  color: var(--text);
}
.sunk-item .obj-icon {
  margin: 0 auto;
}
.sunk-item .obj-label {
  font-size: 0.55rem;
  color: var(--text-muted);
}
.sunk-item .obj-icon--num {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Outfit", sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.8), 0 1px 4px rgba(0, 0, 0, 0.6);
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
}

@keyframes sinkIn {
  0% { opacity: 1; transform: scale(1); }
  25% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0; transform: scale(0.6) translateY(30%); }
}

/* ---- Footer: subtle, showroom style ---- */
.footer-actions {
  flex-shrink: 0;
  margin-top: auto;
  padding: 0.5rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  max-width: 420px;
}
.sound-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.95);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s, border-color 0.2s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.sound-btn:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}
.sound-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}
.sound-btn-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpolygon points='11 5 6 9 2 9 2 15 6 15 11 19 11 5'/%3E%3Cpath d='M19.07 4.93a10 10 0 0 1 0 14.14M15.54 8.46a5 5 0 0 1 0 7.07'/%3E%3C/svg%3E") center/contain no-repeat;
}
.camera-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.95);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s, border-color 0.2s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.camera-btn:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}
.camera-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.camera-btn[aria-pressed="true"] {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
}
.camera-btn-icon {
  width: 18px;
  height: 18px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z'/%3E%3Ccircle cx='12' cy='13' r='4'/%3E%3C/svg%3E") center/contain no-repeat;
}
.about-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.1rem;
  font-family: "Outfit", sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s, border-color 0.2s;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.about-btn:hover {
  transform: scale(1.02);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}
.footer-actions .hint {
  margin: 0;
  text-align: center;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ---- Popup modal: luxury feel ---- */
.popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.popup {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow: hidden;
  background: var(--showroom-bg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  box-shadow: 0 24px 64px var(--shadow-medium);
  display: flex;
  flex-direction: column;
}
.popup-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.popup-close:hover {
  color: var(--text);
  background: var(--shadow-soft);
}
.popup-title {
  margin: 0;
  padding: 1.5rem 3rem 0.5rem 1.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}
.popup-body {
  flex: 1;
  overflow: auto;
  padding: 0 1.5rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}
.popup-body img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 0.5rem 0;
}
.popup-body p { margin: 0.5em 0; }
.popup-body p:first-child { margin-top: 0; }
.popup-body code {
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
}

/* ---- About overlay ---- */
.about-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.about-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.about-popup {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 85vh;
  overflow: hidden;
  background: var(--showroom-bg);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  box-shadow: 0 24px 64px var(--shadow-medium);
  display: flex;
  flex-direction: column;
}
.about-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.about-close:hover {
  color: var(--text);
  background: var(--shadow-soft);
}
.about-title {
  margin: 0;
  padding: 1.5rem 3rem 0.5rem 1.5rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text);
}
.about-body {
  flex: 1;
  overflow: auto;
  padding: 0 1.5rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text);
}
.about-body p { margin: 0.5em 0; }
.about-body p:first-child { margin-top: 0; }
.about-body code {
  font-size: 0.85em;
  padding: 0.15em 0.4em;
  background: rgba(0,0,0,0.06);
  border-radius: 4px;
}
