:root {
  --maroon: #651a2b;
  --maroon-2: #8f2940;
  --maroon-dark: #2f0b14;
  --cream: #fff4df;
  --cream-2: #f3dfbd;
  --ink: #2a1820;
  --muted: rgba(42, 24, 32, 0.68);
  --panel: rgba(255, 248, 235, 0.88);
  --panel-strong: rgba(255, 248, 235, 0.96);
  --gold: #d49a42;
  --shadow: rgba(44, 10, 18, 0.24);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 226, 169, 0.8), transparent 29%),
    radial-gradient(circle at 78% 14%, rgba(177, 63, 90, 0.24), transparent 28%),
    radial-gradient(circle at 55% 88%, rgba(101, 26, 43, 0.38), transparent 34%),
    linear-gradient(145deg, #fff8eb 0%, #f7deb9 44%, #7d2135 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.45) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.45) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.18;
  mix-blend-mode: soft-light;
}

button {
  font: inherit;
}

.loader-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at center, #fff7e8 0%, #f4ddb9 48%, #5b1525 120%);
  transition: opacity 0.65s ease, visibility 0.65s ease;
}

.loader-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-card {
  width: min(480px, 92vw);
  padding: 34px 30px 32px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 36px;
  background: rgba(255, 248, 236, 0.76);
  box-shadow: 0 34px 90px rgba(47, 11, 20, 0.24);
  text-align: center;
  backdrop-filter: blur(22px);
  animation: floatCard 4s ease-in-out infinite;
}

@keyframes floatCard {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.loader-room-icon {
  width: 92px;
  height: 92px;
  margin: 0 auto 18px;
  position: relative;
  transform: rotateX(58deg) rotateZ(45deg);
  transform-style: preserve-3d;
}

.loader-room-icon span {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #ffcf73, #ef7c8e);
  box-shadow: 0 18px 38px rgba(101, 26, 43, 0.22);
}

.loader-room-icon span:nth-child(2) {
  transform: translateZ(14px) translateX(-18px);
  background: linear-gradient(135deg, #7fcbd4, #6488ee);
}

.loader-room-icon span:nth-child(3) {
  transform: translateZ(28px) translateY(18px);
  background: linear-gradient(135deg, #99dd96, #f1c36a);
}

.loader-kicker,
.mini-label,
.panel-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--maroon-2);
}

.loader-card h1,
.brand-card h1 {
  margin: 8px 0 12px;
  color: var(--maroon-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(42px, 7vw, 70px);
  line-height: 0.88;
  letter-spacing: -0.05em;
}

.loader-card h1 span,
.brand-card h1 span {
  color: var(--maroon);
}

.loader-copy {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.mobile-copy {
  display: none;
}

.enter-btn {
  margin-top: 22px;
  border: none;
  border-radius: 999px;
  padding: 13px 24px;
  background: linear-gradient(135deg, var(--maroon), var(--maroon-2));
  color: #fff9ee;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 16px 34px rgba(101, 26, 43, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.enter-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 22px 44px rgba(101, 26, 43, 0.32);
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

#roomCanvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#roomCanvas.is-dragging {
  cursor: grabbing;
}

.brand-card,
.folio-panel,
.room-hud,
.section-tabs,
.bottom-help {
  position: fixed;
  z-index: 5;
  backdrop-filter: blur(22px);
}

.brand-card {
  left: 24px;
  top: 24px;
  width: min(340px, calc(100vw - 48px));
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 248, 235, 0.86), rgba(255, 239, 212, 0.62));
  box-shadow: 0 26px 65px var(--shadow);
}

.brand-card h1 {
  margin-bottom: 0;
  font-size: 42px;
}

.sound-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 16px;
  color: #fff8eb;
  background: var(--maroon);
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(101, 26, 43, 0.24);
}

.sound-btn.is-muted {
  background: rgba(101, 26, 43, 0.18);
  color: var(--maroon);
}

.section-tabs {
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  padding: 9px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 248, 236, 0.72);
  box-shadow: 0 20px 60px rgba(47, 11, 20, 0.2);
}

.section-tab {
  border: none;
  border-radius: 999px;
  padding: 11px 16px;
  color: rgba(42, 24, 32, 0.7);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s ease;
}

.section-tab:hover,
.section-tab.active {
  color: #fff8eb;
  background: linear-gradient(135deg, var(--maroon), var(--maroon-2));
  transform: translateY(-2px);
}

.room-hud {
  right: 24px;
  top: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(255, 248, 235, 0.76);
  box-shadow: 0 24px 60px rgba(47, 11, 20, 0.2);
}

.room-hud div {
  min-width: 138px;
  text-align: center;
}

.room-hud p {
  margin: 0;
  color: var(--maroon-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.room-hud h2 {
  margin: 2px 0 0;
  color: var(--maroon-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 21px;
  line-height: 1;
}

.circle-btn {
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: #fff8eb;
  color: var(--maroon);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(101, 26, 43, 0.08), 0 12px 28px rgba(101, 26, 43, 0.16);
  transition: transform 0.25s ease, background 0.25s ease;
}

.circle-btn:hover {
  transform: scale(1.07);
  background: #ffe3bb;
}

.folio-panel {
  right: 24px;
  bottom: 92px;
  width: min(420px, calc(100vw - 48px));
  max-height: min(70vh, 620px);
  overflow: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 32px;
  background: var(--panel-strong);
  box-shadow: 0 32px 80px rgba(47, 11, 20, 0.28);
  transform: translateY(18px) scale(0.97);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s ease, opacity 0.32s ease;
}

.folio-panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.close-panel {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(101, 26, 43, 0.1);
  color: var(--maroon);
  font-size: 24px;
  cursor: pointer;
}

.panel-kicker {
  display: block;
  padding-right: 40px;
}

.folio-panel h3 {
  margin: 10px 0 12px;
  color: var(--maroon-dark);
  font-family: "Playfair Display", Georgia, serif;
  font-size: 34px;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.folio-panel p {
  margin: 0;
  color: rgba(42, 24, 32, 0.74);
  font-size: 14px;
  line-height: 1.72;
}

.folio-panel ul {
  display: grid;
  gap: 9px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.folio-panel li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: rgba(42, 24, 32, 0.82);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.folio-panel li::before {
  content: "✦";
  color: var(--maroon-2);
  font-size: 12px;
  line-height: 1.6;
}

.hover-label {
  position: fixed;
  z-index: 6;
  transform: translate(-50%, calc(-100% - 18px));
  padding: 9px 13px;
  border-radius: 999px;
  color: #fff8eb;
  background: rgba(47, 11, 20, 0.82);
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(47, 11, 20, 0.2);
  pointer-events: none;
}

.hover-label.hidden {
  display: none;
}

.bottom-help {
  left: 24px;
  bottom: 24px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: min(430px, calc(100vw - 48px));
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 248, 235, 0.68);
  box-shadow: 0 20px 55px rgba(47, 11, 20, 0.16);
}

.bottom-help span {
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(101, 26, 43, 0.08);
  color: rgba(42, 24, 32, 0.72);
  font-size: 11px;
  font-weight: 900;
}

@media (max-width: 920px) {
  .brand-card {
    left: 14px;
    top: 14px;
    width: min(260px, calc(100vw - 28px));
    padding: 16px;
    border-radius: 24px;
  }

  .brand-card h1 {
    font-size: 31px;
  }

  .mini-label {
    font-size: 9px;
  }

  .room-hud {
    right: 14px;
    top: auto;
    bottom: 88px;
    padding: 8px;
  }

  .room-hud div {
    min-width: 110px;
  }

  .room-hud h2 {
    font-size: 17px;
  }

  .circle-btn {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .section-tabs {
    left: 14px;
    right: 14px;
    bottom: 14px;
    transform: none;
    overflow-x: auto;
    justify-content: flex-start;
    border-radius: 22px;
  }

  .section-tab {
    padding: 10px 12px;
    font-size: 12px;
  }

  .folio-panel {
    left: 14px;
    right: 14px;
    bottom: 76px;
    width: auto;
    padding: 22px;
    border-radius: 26px;
  }

  .bottom-help {
    display: none;
  }

  .desktop-copy {
    display: none;
  }

  .mobile-copy {
    display: block;
  }
}

@media (max-width: 520px) {
  .brand-card {
    width: 190px;
  }

  .brand-card h1 {
    font-size: 25px;
  }

  .sound-btn {
    width: 38px;
    height: 38px;
  }

  .room-hud {
    width: calc(100vw - 28px);
    justify-content: space-between;
  }

  .room-hud div {
    flex: 1;
  }

  .loader-card {
    padding: 28px 22px;
    border-radius: 28px;
  }
}


/* Clean Sooah-inspired mode: no persistent navbar, brand card, or footer. */
.floating-sound {
  position: fixed;
  z-index: 8;
  left: 24px;
  top: 24px;
  backdrop-filter: blur(18px);
  background: rgba(255, 248, 235, 0.78);
  color: var(--maroon);
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 18px 45px rgba(47, 11, 20, 0.18);
}

.floating-sound:hover {
  transform: translateY(-2px);
  background: rgba(255, 239, 212, 0.88);
}

.floating-sound.is-muted {
  background: rgba(255, 248, 235, 0.52);
  color: rgba(101, 26, 43, 0.52);
}

.room-hud {
  right: 24px;
  top: 24px;
  padding: 8px 10px;
  background: rgba(255, 248, 235, 0.62);
  box-shadow: 0 18px 45px rgba(47, 11, 20, 0.15);
}

.room-hud div {
  min-width: 112px;
}

.room-hud h2 {
  font-size: 18px;
}

.circle-btn {
  width: 38px;
  height: 38px;
  font-size: 23px;
}

.folio-panel {
  bottom: 24px;
  background: rgba(255, 248, 235, 0.92);
}

@media (max-width: 920px) {
  .floating-sound {
    left: 14px;
    top: 14px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .room-hud {
    right: 14px;
    top: 14px;
    bottom: auto;
  }

  .folio-panel {
    bottom: 14px;
  }
}

@media (max-width: 520px) {
  .room-hud {
    width: auto;
    max-width: calc(100vw - 72px);
    left: auto;
  }

  .room-hud div {
    min-width: 86px;
  }

  .room-hud h2 {
    font-size: 15px;
  }
}
