/* ==========================================================================
 * Living Quarters Secret Safe (生活馆秘密金库)
 * Luxury Walnut & Warm Gold Suite · Ultraviolet ? · Brass Vault · Curse Barrier
 * ========================================================================== */

.ss-body {
  background:
    radial-gradient(ellipse 75% 48% at 50% -5%, rgba(232, 186, 98, 0.16), transparent 65%),
    radial-gradient(ellipse 50% 42% at 88% 92%, rgba(220, 38, 38, 0.14), transparent 60%),
    radial-gradient(ellipse 50% 42% at 12% 88%, rgba(124, 58, 237, 0.10), transparent 60%),
    #080709;
}

.ss-root {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}

/* ==========================================================================
 * TOP INVENTORY & ACT STEPPER DOCK
 * ========================================================================== */

.ss-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(212, 175, 106, 0.28);
  background: linear-gradient(135deg, rgba(32, 22, 16, 0.92), rgba(14, 13, 18, 0.94));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.ss-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.ss-step-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 14, 19, 0.72);
  color: var(--dp-ink-faint);
}

.ss-step-pill.is-done {
  border-color: rgba(34, 197, 94, 0.42);
  color: #86efac;
  background: rgba(34, 197, 94, 0.09);
}

.ss-step-pill.is-active {
  border-color: var(--dp-brass-bright);
  color: var(--dp-brass-bright);
  background: rgba(212, 175, 106, 0.16);
  box-shadow: 0 0 14px rgba(212, 175, 106, 0.25);
}

.ss-pouch {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ss-stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 106, 0.34);
  background: rgba(24, 19, 14, 0.85);
  font-family: var(--dp-font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--dp-brass-bright);
}

.ss-stat-chip.is-cursed {
  border-color: rgba(239, 68, 68, 0.75);
  background: rgba(153, 27, 27, 0.32);
  color: #fca5a5;
  box-shadow: 0 0 18px rgba(220, 38, 38, 0.38);
}

.ss-stat-chip.is-prize {
  border-color: rgba(52, 211, 153, 0.65);
  background: rgba(6, 95, 70, 0.3);
  color: #6ee7b7;
}

/* ==========================================================================
 * SHARED SCENE FRAME & PANEL LAYOUT
 * ========================================================================== */

.ss-scene-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(290px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.ss-scene-stage {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 106, 0.3);
  background: linear-gradient(160deg, #1b130e 0%, #100e14 100%);
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.68), inset 0 1px 0 rgba(255, 224, 150, 0.1);
}

.ss-scene-svg {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.ss-hotspot {
  cursor: pointer;
  transition: filter 0.2s, opacity 0.2s;
}

.ss-hotspot:hover {
  filter: drop-shadow(0 0 10px rgba(242, 213, 145, 0.75));
}

.ss-side-panel {
  border-radius: 18px;
  border: 1px solid rgba(212, 175, 106, 0.24);
  background: linear-gradient(160deg, rgba(26, 20, 17, 0.94), rgba(12, 13, 20, 0.95));
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.5);
}

.ss-panel-heading {
  font-family: var(--dp-font-display);
  font-size: 18px;
  margin: 0;
  color: var(--dp-brass-bright);
  letter-spacing: 0.04em;
}

.ss-panel-sub {
  margin: 0;
  font-size: 13px;
  color: var(--dp-ink-muted);
  line-height: 1.55;
}

/* Act 1 Mechanical Fake Outlet Closeup */
.ss-outlet-box {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 106, 0.34);
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 106, 0.12), rgba(10, 10, 14, 0.92));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ss-outlet-plate {
  width: 176px;
  min-height: 176px;
  border-radius: 14px;
  border: 2px solid rgba(212, 175, 106, 0.45);
  background: linear-gradient(155deg, #272529, #151418);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.08), 0 12px 24px rgba(0, 0, 0, 0.55);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
}

.ss-outlet-plate.is-cavity {
  background: radial-gradient(circle, #181410 0%, #09080c 100%);
  border-color: #fbbf24;
  box-shadow: inset 0 0 28px rgba(245, 158, 11, 0.25), 0 0 24px rgba(245, 158, 11, 0.2);
}

.ss-screw-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid #d4af6a;
  background: radial-gradient(circle at 35% 35%, #f5d896, #7a5c28);
  color: #241807;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  transition: transform 0.25s, opacity 0.25s;
}

.ss-screw-btn:hover:not(:disabled) {
  transform: rotate(90deg) scale(1.1);
}

.ss-screw-btn.is-removed {
  opacity: 0.2;
  border-style: dashed;
  background: transparent;
  color: var(--dp-ink-faint);
}

.ss-hex-slot {
  width: 82px;
  height: 82px;
  clip-path: polygon(50% 0%, 95% 25%, 95% 75%, 50% 100%, 5% 75%, 5% 25%);
  border: none;
  background: linear-gradient(145deg, rgba(212, 175, 106, 0.22), rgba(20, 16, 12, 0.95));
  display: grid;
  place-items: center;
  font-size: 26px;
  color: var(--dp-brass-bright);
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
  box-shadow: inset 0 0 18px rgba(251, 191, 36, 0.35);
}

.ss-hex-slot:hover {
  transform: scale(1.06);
  filter: drop-shadow(0 0 14px rgba(251, 191, 36, 0.7));
}

.ss-hex-slot.is-filled {
  background: linear-gradient(145deg, #fef08a, #b47c2b);
  color: #1c1204;
  animation: ssGoldPulse 2s ease-in-out infinite;
}

@keyframes ssGoldPulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(251, 191, 36, 0.55)); }
  50% { filter: drop-shadow(0 0 22px rgba(254, 240, 138, 0.95)); }
}

/* Act 2 UV Controls */
.ss-uv-control {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  background: rgba(76, 29, 149, 0.14);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ss-uv-slider {
  width: 100%;
  accent-color: #a78bfa;
}

/* ==========================================================================
 * ACT 3: 12-PIECE INTERLOCKING BRASS VAULT LOCK
 * ========================================================================== */

.ss-vault-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.ss-vault-wheel-card {
  position: relative;
  border-radius: 20px;
  border: 1px solid rgba(212, 175, 106, 0.36);
  background:
    radial-gradient(circle at 50% 50%, rgba(212, 175, 106, 0.12), rgba(14, 12, 16, 0.96) 68%),
    #0c0b10;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72);
}

.ss-vault-wheel-card.is-unlocked {
  border-color: #fde68a;
  box-shadow: 0 0 60px rgba(251, 191, 36, 0.35);
}

.ss-vault-svg {
  width: min(470px, 100%);
  height: auto;
  display: block;
}

.ss-socket-group {
  cursor: pointer;
  transition: filter 0.2s;
}

.ss-socket-group:hover {
  filter: drop-shadow(0 0 10px rgba(242, 213, 145, 0.75));
}

.ss-socket-group.is-hinted {
  animation: ssHintGlow 1.2s ease-in-out infinite;
}

@keyframes ssHintGlow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.65)); }
  50% { filter: drop-shadow(0 0 18px rgba(56, 189, 248, 1)); }
}

.ss-piece-tray {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.ss-piece-card {
  padding: 10px 8px;
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 106, 0.26);
  background: linear-gradient(155deg, rgba(35, 28, 20, 0.9), rgba(16, 15, 22, 0.92));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.16s var(--dp-ease), border-color 0.18s, box-shadow 0.18s, opacity 0.2s;
}

.ss-piece-card:hover:not(:disabled) {
  border-color: var(--dp-brass-bright);
  transform: translateY(-2px);
}

.ss-piece-card.is-selected {
  border: 2px solid #fde68a;
  background: rgba(212, 175, 106, 0.18);
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.35);
}

.ss-piece-card.is-hinted {
  border-color: #38bdf8;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.5);
}

.ss-piece-card.is-locked {
  opacity: 0.34;
  border-style: dashed;
  cursor: default;
}

.ss-piece-glyph {
  width: 48px;
  height: 48px;
  transition: transform 0.25s var(--dp-ease);
}

.ss-piece-code {
  font-family: var(--dp-font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--dp-brass-bright);
}

.ss-piece-meta {
  font-size: 10.5px;
  color: var(--dp-ink-muted);
}

/* ==========================================================================
 * ACT 4 & 5: HIDDEN ELEVATOR, TALISMAN SEAL & CURSE BARRIER SANCTUM
 * ========================================================================== */

.ss-sanctum-stage {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(220, 53, 69, 0.42);
  background:
    radial-gradient(ellipse 65% 55% at 50% 20%, rgba(220, 38, 38, 0.22), transparent 65%),
    radial-gradient(ellipse 50% 45% at 50% 45%, rgba(245, 180, 65, 0.16), transparent 60%),
    linear-gradient(180deg, #130b0e 0%, #07070c 100%);
  padding: 28px 22px;
  overflow: hidden;
  text-align: center;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.8), inset 0 0 60px rgba(220, 38, 38, 0.12);
}

.ss-sanctum-stage.is-keeper {
  border-color: rgba(212, 175, 106, 0.45);
  background:
    radial-gradient(ellipse 65% 50% at 50% 15%, rgba(212, 175, 106, 0.18), transparent 65%),
    linear-gradient(180deg, #14110e 0%, #07080d 100%);
}

.ss-shatter-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6;
}

.ss-talisman-door {
  max-width: 440px;
  margin: 14px auto;
  padding: 36px 24px;
  border-radius: 18px;
  border: 2px solid rgba(212, 175, 106, 0.42);
  background: linear-gradient(180deg, #1a1512, #0d0b0f);
  position: relative;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.7);
}

.ss-talisman-strip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 26px;
  border-radius: 8px;
  border: 2px solid #fbbf24;
  background: linear-gradient(180deg, #7f1d1d, #450a0a);
  color: #fef08a;
  font-family: var(--dp-font-display);
  cursor: pointer;
  box-shadow: 0 0 32px rgba(220, 38, 38, 0.45);
  transition: transform 0.25s var(--dp-ease), box-shadow 0.25s;
}

.ss-talisman-strip:hover {
  transform: scale(1.05) rotate(-1deg);
  box-shadow: 0 0 46px rgba(251, 191, 36, 0.65);
}

.ss-pedestal-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto 20px;
  padding: 26px 18px;
  border-radius: 20px;
  border: 1px solid rgba(248, 113, 113, 0.48);
  background: rgba(14, 8, 12, 0.8);
  box-shadow: 0 0 50px rgba(220, 38, 38, 0.28), inset 0 0 36px rgba(245, 158, 11, 0.14);
}

.ss-barrier-dome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 36px;
  border-radius: 999px;
  border: 2px solid rgba(251, 191, 36, 0.72);
  background:
    radial-gradient(circle, rgba(220, 38, 38, 0.34), rgba(245, 158, 11, 0.14) 55%, rgba(12, 8, 12, 0.85) 100%);
  box-shadow:
    0 0 40px rgba(220, 38, 38, 0.55),
    inset 0 0 28px rgba(251, 191, 36, 0.45);
  animation: ssBarrierCrack 2.6s ease-in-out infinite;
  margin-bottom: 16px;
}

@keyframes ssBarrierCrack {
  0%, 100% {
    box-shadow: 0 0 36px rgba(220, 38, 38, 0.5), inset 0 0 24px rgba(251, 191, 36, 0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 60px rgba(248, 113, 113, 0.8), inset 0 0 36px rgba(254, 240, 138, 0.65);
    transform: scale(1.025);
  }
}

.ss-prize-token {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 3px solid #fde68a;
  background: radial-gradient(circle at 32% 30%, #fef9c3, #d97706 58%, #78350f 100%);
  color: #1c1003;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--dp-font-mono);
  font-weight: 800;
  box-shadow: 0 0 26px rgba(251, 191, 36, 0.75);
}

.ss-covenant-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 660px;
  margin: 0 auto 22px;
  text-align: left;
}

.ss-covenant-box {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(12, 13, 20, 0.85);
}

.ss-covenant-box.is-reward {
  border-color: rgba(52, 211, 153, 0.42);
}

.ss-covenant-box.is-curse {
  border-color: rgba(248, 113, 113, 0.55);
  background: rgba(127, 29, 29, 0.2);
}

.ss-curse-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid #f87171;
  background: rgba(153, 27, 27, 0.42);
  color: #fecaca;
  font-family: var(--dp-font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.12em;
  box-shadow: 0 0 36px rgba(220, 38, 38, 0.65);
  margin-bottom: 14px;
}

.ss-discovery-log {
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 106, 0.18);
  background: rgba(12, 13, 19, 0.82);
  padding: 10px 14px;
}

.ss-discovery-item {
  font-size: 12.5px;
  color: var(--dp-ink-muted);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ss-discovery-item:last-child {
  border-bottom: none;
}

/* ==========================================================================
 * RESPONSIVE (Mobile 390×844 & Tablet)
 * ========================================================================== */

@media (max-width: 920px) {
  .ss-scene-grid,
  .ss-vault-wrap {
    grid-template-columns: 1fr;
  }

  .ss-covenant-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .ss-piece-tray {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ss-barrier-dome {
    padding: 18px 20px;
    gap: 14px;
  }

  .ss-prize-token {
    width: 64px;
    height: 64px;
    font-size: 12px;
  }
}
