/* Answer Vault — star/galaxy theme: dark blue & purple (shared styles) */
* { box-sizing: border-box; }
:root {
  --brass: #9aa3b2;
  --brass-hi: #eef1f6;
  --brass-lo: #4a5160;
  --parchment: #e8ecf3;
  --blood: #fb7185;
}
body {
  margin: 0;
  padding: 0;
  font-family: Palatino, 'Palatino Linotype', Georgia, 'Times New Roman', serif;
  background:
    radial-gradient(ellipse 60% 40% at 20% 8%, rgba(120,140,170,.14), transparent 60%),
    radial-gradient(ellipse 50% 35% at 85% 82%, rgba(90,110,140,.12), transparent 60%),
    linear-gradient(180deg, #0b0d12 0%, #050608 100%);
  color: var(--parchment);
  min-height: 100vh;
  min-height: 100dvh;
}
#stars { position: fixed; inset: 0; pointer-events: none; z-index: 2; overflow: hidden; }
#stars span { position: absolute; border-radius: 50%; background: #eef;
  animation: twinkle linear infinite; }
@keyframes twinkle { 0%,100% { opacity: .15; } 50% { opacity: .9; } }
.dust { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.dust span { position: absolute; bottom: -10px; width: 3px; height: 3px; border-radius: 50%;
  background: rgba(220,228,240,.5); animation: rise linear infinite; }
@keyframes rise { to { transform: translateY(-105vh); opacity: 0; } }

/* ---------- full-viewport vault stage ---------- */
.vault-stage {
  position: relative; z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 7fr 5fr;
}
.door-cell { position: relative; overflow: hidden; background: #060614; min-height: 100vh; min-height: 100dvh; }
.scene { position: absolute; inset: 0; }

.panel {
  background:
    radial-gradient(ellipse 80% 30% at 50% 0%, rgba(180,195,215,.10), transparent 60%),
    linear-gradient(180deg, rgba(38,44,56,.72), rgba(16,19,26,.78));
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  backdrop-filter: blur(22px) saturate(1.4);
  border-left: 1px solid rgba(255,255,255,.14);
  box-shadow: inset 0 0 60px rgba(0,0,0,.5), inset 1px 0 0 rgba(255,255,255,.08);
  display: flex;
}
.panel-inner {
  margin: auto;
  width: 100%;
  max-width: 440px;
  padding: 36px 30px;
  max-height: 100vh;
  max-height: 100dvh;
  overflow-y: auto;
  text-align: center;
}
.keeper { margin-top: 18px; color: #6b7280; font-style: italic; font-size: 13px; }

h1 { margin: 10px 0 6px; font-weight: normal; letter-spacing: .3em; text-indent: .3em;
  color: var(--brass-hi); text-shadow: 0 0 22px rgba(160,175,200,.35), 0 2px 0 #000; }
h2 { font-weight: normal; letter-spacing: .1em; }
p.muted { color: #9aa3b8; margin-top: 0; font-size: 14px; }
.rule { display: flex; align-items: center; gap: 12px; margin: 10px auto 4px; max-width: 340px;
  color: var(--brass); font-size: 13px; letter-spacing: .3em; }
.rule::before, .rule::after { content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass-lo)); }
.rule::after { background: linear-gradient(90deg, var(--brass-lo), transparent); }
#doorStatus { font-size: 12px; letter-spacing: .4em; text-indent: .4em; color: #8d8d9a; margin: 12px 0 14px; }
#doorStatus b { color: var(--blood); }
#doorStatus.open b { color: #67e8f9; }

/* ---------- real-photo vault layer ---------- */
.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ph.closed { object-position: center 30%; }
.ph.open { object-position: center 40%; }
.ph.open { opacity: 0; transition: opacity 2s ease .4s; }
#frame.open .ph.open { opacity: 1; }

/* (photo overlays retired — the vault shows as a plain still image) */

/* ---------- admin / shared boxes ---------- */
.container {
  position: relative; z-index: 1;
  width: calc(100% - 48px);
  max-width: 560px;
  margin: 24px auto;
  background: linear-gradient(180deg, #1a2029, #0b0e14);
  border: 1px solid var(--brass-lo);
  border-radius: 10px;
  padding: 32px 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,.75), inset 0 0 40px rgba(0,0,0,.55);
  text-align: center;
}
.container.wide { max-width: 900px; }
.card {
  background: rgba(255,255,255,.06);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 20px;
  margin-top: 18px;
  text-align: left;
  box-shadow: 0 12px 32px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.1);
}
label { display: block; margin: 12px 0 6px; font-size: 12px; letter-spacing: .22em; color: #aeb6c6; }
input, textarea {
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.35);
  color: var(--parchment);
  font-size: 15px;
  font-family: Georgia, serif;
}
input:focus, textarea:focus { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(150,170,200,.28); outline: none; }
textarea { min-height: 130px; resize: vertical; }
button {
  margin-top: 16px;
  width: 100%;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 14px;
  background: linear-gradient(180deg, #f2f4f8, #c3c9d6 55%, #8e96a6);
  color: #14171d;
  font-family: Georgia, serif;
  font-size: 16px;
  letter-spacing: .12em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,.6), inset 0 1px 1px rgba(255,255,255,.35);
}
button:hover { filter: brightness(1.15); }
button:active { transform: translateY(1px); }
button.secondary { background: rgba(255,255,255,.08); color: #c6cddb; border: 1px solid rgba(255,255,255,.14); box-shadow: none; }
button.danger { background: #2a0f1e; color: var(--blood); border: 1px solid #7a2a4d;
  width: auto; padding: 8px 14px; font-size: 14px; box-shadow: none; }
.hidden { display: none !important; }
.success {
  background: rgba(0,0,0,.4);
  border: 2px solid #67e8f9;
  padding: 20px 16px;
  border-radius: 8px;
  margin-top: 16px;
  transform: rotate(-1deg);
}
.success h2 { color: #67e8f9; letter-spacing: .35em; text-indent: .35em;
  text-shadow: 0 0 14px rgba(103,232,249,.5); }
.success p { color: #c9c9ec; font-style: italic; }
.error { color: var(--blood); font-style: italic; font-size: 14px; margin-top: 8px; min-height: 18px; }
.steps { display: flex; gap: 8px; margin: 16px 0; }
.step { flex: 1; height: 6px; border-radius: 99px; background: #262c38; }
.step.active { background: var(--brass); box-shadow: 0 0 10px rgba(200,210,225,.5); }
table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
th, td { border: 1px solid rgba(255,255,255,.1); padding: 8px; text-align: left; vertical-align: top; word-break: break-word; }
th { background: rgba(255,255,255,.06); color: var(--brass-hi); font-weight: normal;
  letter-spacing: .15em; font-size: 12px; }
td { color: #d5dae4; }
.toolbar { display: flex; gap: 10px; margin-top: 14px; }
.toolbar button { margin-top: 0; }
a.link { color: #9fb4d8; font-size: 14px; font-style: italic; text-decoration: none; }
a.link:hover { color: var(--brass-hi); }
.topbar { display: flex; justify-content: space-between; align-items: center; }

/* ---------- small screens: door on top, panel below ---------- */
@media (max-width: 860px) {
  .vault-stage { grid-template-columns: 1fr; min-height: 0; }
  .door-cell { min-height: 0; height: 46vh; height: 46dvh; }
  .panel { border-left: none; border-top: 1px solid var(--brass-lo); }
  .panel-inner { max-height: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dust span, #stars span { animation: none !important; }
}
