:root {
  --wood: #2a1a10;
  --wood-light: #3d2817;
  --gold: #d8b45a;
  --gold-deep: #a5842f;
  --candle: #ffb347;
  --crimson: #d14663;
  --crimson-deep: #b5324a;
  --crimson-glow: rgba(209, 70, 99, 0.4);
  --ink: #ece4d6;
  --muted: #9b8f7e;
  --screen: #0c0a12;
  --glass: rgba(30, 22, 30, 0.55);
  --glass-border: rgba(216, 180, 90, 0.18);
  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --radius: 18px;

  /* ---- Sin-level atmosphere variables (base = tier 0) ---- */
  --atmos-bg-start: #1a1220;
  --atmos-bg-mid: #2a1828;
  --atmos-bg-end: #08060c;
  --atmos-accent-1: rgba(181, 50, 74, 0.15);
  --atmos-accent-2: rgba(201, 162, 39, 0.08);
  --grille-glow: rgba(209, 70, 99, 0.15);
  --lattice-pulse: rgba(181, 50, 74, 0.3);
  --candle-intensity: 1;
  --ember-opacity: 0.6;
  --vignette-strength: 0.7;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  font-family: var(--font-body);
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(181, 50, 74, 0.22), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 110%, rgba(201, 162, 39, 0.12), transparent 70%),
    radial-gradient(circle at 50% 30%, #1a1220 0%, #08060c 90%);
  color: var(--ink);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.screen {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.hidden {
  display: none !important;
}

/* ---------- Setup ---------- */
.booth-frame {
  width: min(720px, 95vw);
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(120%);
  -webkit-backdrop-filter: blur(22px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  padding: 40px 40px 44px;
}

.title {
  text-align: center;
  letter-spacing: 6px;
  margin: 0 0 8px;
  color: var(--gold);
  text-shadow: 0 0 26px rgba(216, 180, 90, 0.45);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
}

.subtitle {
  text-align: center;
  margin: 0 0 28px;
  color: var(--muted);
  font-weight: 300;
  font-size: 15px;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
}

.field {
  display: flex;
  flex-direction: column;
  font-size: 13px;
  letter-spacing: 0.5px;
  opacity: 0.95;
}

.field span {
  margin-bottom: 7px;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1.2px;
}

.field input,
.field select {
  background: rgba(12, 10, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 12px 14px;
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.field input::placeholder {
  color: rgba(155, 143, 126, 0.6);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(12, 10, 18, 0.85);
  box-shadow: 0 0 0 3px rgba(216, 180, 90, 0.15);
}

.enter-btn {
  width: 100%;
  margin-top: 30px;
  padding: 15px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1a0f07;
  border: none;
  border-radius: 14px;
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
  box-shadow: 0 8px 24px rgba(216, 180, 90, 0.22);
}

.enter-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow: 0 12px 32px rgba(216, 180, 90, 0.4);
}

.enter-btn:active {
  transform: translateY(0);
}

/* ---------- Booth ---------- */
.booth-interior {
  width: min(1000px, 96vw);
  height: min(88vh, 800px);
  display: grid;
  grid-template-columns: 360px 1fr;
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(120%);
  -webkit-backdrop-filter: blur(20px) saturate(120%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  overflow: hidden;
  position: relative;
}

.lattice {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0 22px,
      rgba(0, 0, 0, 0.4) 22px 24px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0 22px,
      rgba(0, 0, 0, 0.4) 22px 24px
    ),
    radial-gradient(circle at 50% 36%, #3a1830, var(--screen) 78%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 24px;
  border-right: 1px solid var(--glass-border);
  perspective: 900px;
  animation: latticePulse 5s ease-in-out infinite;
}

@keyframes latticePulse {
  0%, 100% { box-shadow: inset 0 0 60px var(--crimson-glow); }
  50% { box-shadow: inset 0 0 110px rgba(181, 50, 74, 0.7); }
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    circle at 50% 45%,
    transparent 35%,
    rgba(0, 0, 0, 0.85) 100%
  );
  animation: vignetteBreath 6s ease-in-out infinite;
}

@keyframes vignetteBreath {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

.candle {
  display: none;
}

.nun {
  width: 250px;
  margin-bottom: 4px;
  position: relative;
  perspective: 700px;
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
  filter: drop-shadow(0 14px 30px rgba(0, 0, 0, 0.8));
}

.nun svg {
  width: 100%;
  height: auto;
  display: block;
  animation: live 6s ease-in-out infinite;
}

@keyframes live {
  0%, 100% { transform: scale(1) translateY(0); filter: drop-shadow(0 0 22px rgba(181, 50, 74, 0.45)); }
  50% { transform: scale(1.025) translateY(-4px); filter: drop-shadow(0 0 40px rgba(181, 50, 74, 0.85)); }
}

/* head can tilt based on mood */
.head {
  transform-box: fill-box;
  transform-origin: 150px 118px;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.blush-boost {
  transition: opacity 0.7s ease;
}

/* === mood states (set on #nun by JS) === */
.nun.state-seductive .head { transform: rotate(-4deg) translate(3px, -1px); }
.nun.state-shy .head { transform: rotate(5deg) translateY(7px); }
.nun.state-smile .head { transform: rotate(-1.5deg); }
.nun.state-listen .head { transform: rotate(0deg); }

.nun.state-seductive .blush-boost,
.nun.state-smile .blush-boost { opacity: 0.6; }

/* brows can lift when curious/surprised */
.brows { transition: transform 0.5s ease; }
.nun.state-curious .brows { transform: translateY(-3px); }

/* smile crease appears when she smiles / smolders */
.smile-line { transition: opacity 0.5s ease; }
.nun.state-seductive .smile-line,
.nun.state-smile .smile-line { opacity: 0.85; }

.nun.tier-3 .blush-boost { opacity: 0.35; } /* permanent flush */
.nun.tier-3 .smile-line { opacity: 0.4; } /* permanent hint of smile */

/* === TIER 1: Subtle shift — composed but warming === */
.nun.tier-1 .head { transform: rotate(-1.5deg) translateY(-1px); }
.nun.tier-1 .hands { transform: translateY(2px) rotate(-2deg); }
.nun.tier-1 .veil { transform: translateY(1px); }
.nun.tier-1 .cincture { opacity: 0.9; }
.nun.tier-1 .collar { transform: translateY(0.5px); }
.nun.tier-1 .sleeve { transform: translateY(1px); }
.nun.tier-1 .hair-lock { opacity: 0.4; }
.nun.tier-1 .brows { transform: translateY(-0.5px); }

/* === TIER 2: Noticeable shift — inviting, veil slipping, cincture loose === */
.nun.tier-2 .head { transform: rotate(-4deg) translateY(-3px); }
.nun.tier-2 .hands { transform: translateY(6px) rotate(-5deg) scale(1.03); }
.nun.tier-2 .veil { transform: translateY(4px) rotate(1.5deg); opacity: 0.9; }
.nun.tier-2 .cincture { opacity: 0.7; transform: scaleX(1.05); }
.nun.tier-2 .collar { transform: translateY(2px); }
.nun.tier-2 .sleeve { transform: translateY(4px); }
.nun.tier-2 .hair-lock { opacity: 0.7; }
.nun.tier-2 .brows { transform: translateY(-1.5px); }
.nun.tier-2 .bite-lip { opacity: 0.6; }

/* === TIER 3: Fully unguarded — loose veil, open collar, reaching === */
.nun.tier-3 .head { transform: rotate(-7deg) translateY(-5px); }
.nun.tier-3 .hands { transform: translateY(12px) rotate(-8deg) scale(1.08); }
.nun.tier-3 .veil { transform: translateY(10px) rotate(3deg); opacity: 0.75; }
.nun.tier-3 .cincture { opacity: 0.5; transform: scaleX(1.1); }
.nun.tier-3 .collar { transform: translateY(5px); }
.nun.tier-3 .sleeve { transform: translateY(8px); }
.nun.tier-3 .hair-lock { opacity: 1; }
.nun.tier-3 .brows { transform: translateY(-2.5px); }
.nun.tier-3 .bite-lip { opacity: 1; }
.nun.tier-3 .neck { opacity: 1; }

/* Atmosphere elements */
.lattice {
  box-shadow: inset 0 0 80px var(--grille-glow);
}
.lattice::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 38%, var(--atmos-accent-1), transparent 70%);
  pointer-events: none;
  opacity: var(--vignette-strength);
}
.lattice .candle .flame {
  transform-origin: bottom center;
  animation: flicker 1.1s ease-in-out infinite alternate, flameSway 2.3s ease-in-out infinite;
  transform: scale(var(--candle-intensity));
}
.ember { opacity: var(--ember-opacity); }

@keyframes flicker {
  0% { opacity: 0.8; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1.05); }
}

@keyframes flameSway {
  0%, 100% { rotate: -3deg; }
  50% { rotate: 3deg; }
}

/* breathing already exists */

/* ===== SIN TIER PROGRESSION =====
   Applied to <body> by JS based on collective sin average.
   Each tier ramps atmosphere and Lilith's appearance. */

body.tier-1 {
  --atmos-bg-start: #1f1528;
  --atmos-bg-mid: #2d1a2f;
  --atmos-bg-end: #0a070e;
  --atmos-accent-1: rgba(209, 70, 99, 0.18);
  --atmos-accent-2: rgba(216, 180, 90, 0.12);
  --grille-glow: rgba(209, 70, 99, 0.25);
  --lattice-pulse: rgba(209, 70, 99, 0.45);
  --candle-intensity: 1.15;
  --ember-opacity: 0.75;
  --vignette-strength: 0.75;
}

body.tier-1 {
  --atmos-bg-start: #1f1428;
  --atmos-bg-mid: #2d1a2f;
  --atmos-bg-end: #0a070e;
  --atmos-accent-1: rgba(209, 70, 99, 0.18);
  --atmos-accent-2: rgba(216, 180, 90, 0.12);
  --grille-glow: rgba(209, 70, 99, 0.25);
  --lattice-pulse: rgba(209, 70, 99, 0.45);
  --candle-intensity: 1.15;
  --ember-opacity: 0.75;
  --vignette-strength: 0.75;
}

body.tier-2 {
  --atmos-bg-start: #25162e;
  --atmos-bg-mid: #351b38;
  --atmos-bg-end: #0c0810;
  --atmos-accent-1: rgba(209, 70, 99, 0.28);
  --atmos-accent-2: rgba(216, 180, 90, 0.18);
  --grille-glow: rgba(209, 70, 99, 0.38);
  --lattice-pulse: rgba(209, 70, 99, 0.6);
  --candle-intensity: 1.3;
  --ember-opacity: 0.9;
  --vignette-strength: 0.85;
}

body.tier-3 {
  --atmos-bg-start: #2d1835;
  --atmos-bg-mid: #3e1f42;
  --atmos-bg-end: #0e0a12;
  --atmos-accent-1: rgba(209, 70, 99, 0.4);
  --atmos-accent-2: rgba(216, 180, 90, 0.25);
  --grille-glow: rgba(209, 70, 99, 0.55);
  --lattice-pulse: rgba(209, 70, 99, 0.8);
  --candle-intensity: 1.5;
  --ember-opacity: 1;
  --vignette-strength: 0.95;
}

/* Lilith tier appearance shifts */
.nun.tier-1 .head { filter: drop-shadow(0 0 8px rgba(209, 70, 99, 0.3)); }
.nun.tier-1 .lips { fill: #dc4d6b; }

.nun.tier-2 .head {
  filter: drop-shadow(0 0 14px rgba(209, 70, 99, 0.5));
  transform: scale(1.015);
}
.nun.tier-2 .lips { fill: #e05773; }
.nun.tier-2 .eyes-svg circle:last-child { r: 1.8; } /* wider pupils */

.nun.tier-3 .head {
  filter: drop-shadow(0 0 22px rgba(209, 70, 99, 0.75));
  transform: scale(1.03);
}
.nun.tier-3 .lips { fill: #ea5d7a; }
.nun.tier-3 .eyes-svg circle:last-child { r: 2.2; fill: var(--crimson); } /* glowing crimson pupils */
.nun.tier-3 .blush-boost { opacity: 0.35; } /* permanent flush */
.nun.tier-3 .smile-line { opacity: 0.4; } /* permanent hint of smile */

@keyframes breathe {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 22px rgba(181, 50, 74, 0.45)); }
  50% { transform: scale(1.025); filter: drop-shadow(0 0 40px rgba(181, 50, 74, 0.85)); }
}

/* blinking eyes */
.eyes-svg {
  transform-origin: 150px 148px;
  animation: blink 5.5s infinite;
}

@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.08); }
}

/* lips part slightly as she "breathes" / speaks */
.lips {
  transform-origin: 150px 200px;
  animation: lipMove 4s ease-in-out infinite;
}

@keyframes lipMove {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.12); }
}

/* drifting embers / dust motes */
.embers {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.ember {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  background: radial-gradient(circle, #ffd27a, transparent 70%);
  border-radius: 50%;
  opacity: 0;
  animation: rise linear infinite;
}

@keyframes rise {
  0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: translateY(-260px) translateX(20px) scale(0.3); opacity: 0; }
}

.confessor-label {
  font-size: 13px;
  letter-spacing: 2px;
  color: var(--gold);
  opacity: 0.9;
  text-align: center;
  text-shadow: 0 0 12px rgba(181, 50, 74, 0.7);
  animation: labelPulse 4s ease-in-out infinite;
}

@keyframes labelPulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

/* ---------- Chat ---------- */
.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: linear-gradient(180deg, rgba(18, 12, 22, 0.4), rgba(10, 8, 14, 0.6));
  padding: 20px 22px;
}

.messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.msg {
  max-width: 82%;
  padding: 13px 17px;
  border-radius: 18px;
  line-height: 1.55;
  font-size: 15.5px;
  font-weight: 300;
  white-space: pre-wrap;
  animation: msgIn 0.5s ease both;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(10px); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.msg.confessor {
  align-self: flex-start;
  background: linear-gradient(135deg, rgba(58, 24, 48, 0.7), rgba(38, 20, 34, 0.7));
  border: 1px solid rgba(209, 70, 99, 0.28);
  color: #f4e9d8;
  border-bottom-left-radius: 5px;
}

.msg.penitent {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(216, 180, 90, 0.16), rgba(165, 132, 47, 0.12));
  border: 1px solid rgba(216, 180, 90, 0.35);
  color: var(--ink);
  border-bottom-right-radius: 5px;
}

.typing {
  color: var(--crimson);
  opacity: 0.75;
  font-size: 13px;
  font-style: italic;
  padding: 6px 2px;
  height: 24px;
  letter-spacing: 0.5px;
}

.chat-form {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}

.chat-form input {
  flex: 1;
  background: rgba(12, 10, 18, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 14px 16px;
  border-radius: 14px;
  font-family: inherit;
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-form input::placeholder {
  color: rgba(155, 143, 126, 0.6);
}

.chat-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(216, 180, 90, 0.15);
}

.chat-form button {
  padding: 0 24px;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1a0f07;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.18s, box-shadow 0.18s;
}

.chat-form button:hover {
  filter: brightness(1.08);
  box-shadow: 0 6px 20px rgba(216, 180, 90, 0.35);
}

.messages::-webkit-scrollbar {
  width: 6px;
}
.messages::-webkit-scrollbar-thumb {
  background: rgba(216, 180, 90, 0.25);
  border-radius: 4px;
}
.messages::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- Auth screen ---------- */
.auth-frame {
  width: min(440px, 95vw);
}

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  padding: 5px;
  background: rgba(12, 10, 18, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.tab {
  flex: 1;
  padding: 11px;
  background: transparent;
  color: var(--muted);
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tab.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: #1a0f07;
  font-weight: 600;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-error {
  color: #e0566a;
  font-size: 14px;
  min-height: 18px;
  text-align: center;
  font-style: italic;
}

.link-btn {
  margin-top: 16px;
  width: 100%;
  background: none;
  border: none;
  color: var(--gold);
  font-family: inherit;
  font-size: 13px;
  letter-spacing: 1px;
  cursor: pointer;
  text-decoration: underline;
  opacity: 0.8;
}

.link-btn:hover {
  opacity: 1;
}

/* ---------- Chat header + rating ---------- */
.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.chat-title {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 1px;
  color: var(--gold);
  text-shadow: 0 0 14px rgba(209, 70, 99, 0.4);
}

.rating {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
}

.rating-label {
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 500;
}

.rating-bar {
  width: 110px;
  height: 8px;
  background: rgba(12, 10, 18, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
}

.rating-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #5fae6a, #9bd17f);
  border-radius: 8px;
  transition: width 0.8s ease, background 0.8s ease;
}

.rating-num {
  min-width: 22px;
  text-align: right;
  color: var(--crimson);
  font-weight: 600;
}

.clear-btn {
  margin-left: 6px;
  padding: 6px 13px;
  background: rgba(12, 10, 18, 0.6);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-btn:hover {
  border-color: var(--crimson);
  color: var(--crimson);
  background: rgba(209, 70, 99, 0.1);
}

/* ---------- Collective sin (public) ---------- */
.collective {
  margin: 24px 0 4px;
  padding: 18px;
  background: rgba(12, 10, 18, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
}

.collective-label {
  text-align: center;
  color: var(--muted);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-weight: 500;
  font-size: 11px;
  margin-bottom: 12px;
}

.rating-bar.big {
  width: 100%;
  height: 12px;
}

.collective-stats {
  display: flex;
  justify-content: space-around;
  margin-top: 14px;
  font-size: 11px;
  letter-spacing: 0.5px;
  color: var(--muted);
  text-transform: uppercase;
}

.collective-stats span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.collective-stats b {
  color: var(--gold);
  font-size: 20px;
  font-weight: 600;
}

@media (max-width: 760px) {
  .screen {
    padding: 0;
    align-items: stretch;
  }
  .booth-frame {
    width: 100%;
    min-height: 100%;
    border-radius: 0;
    border: none;
    padding: 28px 20px 30px;
    overflow-y: auto;
  }
  .title {
    font-size: 24px;
    letter-spacing: 5px;
  }
  .setup-grid {
    grid-template-columns: 1fr;
  }

  /* booth becomes a vertical phone layout: Lilith on top, chat below */
  .booth-interior {
    grid-template-columns: 1fr;
    grid-template-rows: 42vh auto;
    height: 100dvh;
    width: 100%;
    border-radius: 0;
    border-width: 0;
  }
  .lattice {
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
    justify-content: center;
    padding-bottom: 0;
  }
  .nun {
    width: 165px;
    align-self: center;
  }
  .confessor-label {
    position: absolute;
    bottom: 8px;
    width: 100%;
    text-align: center;
  }
  .chat-panel {
    border-left: none;
    min-height: 0;
    padding: 12px 14px;
  }
  .chat-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .messages {
    font-size: 15px;
  }
  .msg {
    font-size: 15px;
    max-width: 92%;
  }
  .chat-form input {
    font-size: 16px;
    padding: 14px;
  }
  .chat-form button {
    padding: 0 16px;
    font-size: 13px;
  }
}

@media (max-width: 380px) {
  .nun {
    width: 140px;
  }
  .title {
    font-size: 20px;
    letter-spacing: 3px;
  }
}
