/* ═══════════════════════════════════════════════════════
   Cassian's Home — Styles
   A castle that time forgot, covered in ivy, full of stories.
   Interactive scene — the image IS the interface.
   ═══════════════════════════════════════════════════════ */

:root {
  --stone: #2a2520;
  --stone-light: #3d3630;
  --stone-dark: #1a1715;
  --parchment: #e8dcc8;
  --parchment-soft: rgba(232, 220, 200, 0.85);
  --ink: #1a1512;
  --ink-soft: rgba(26, 21, 18, 0.7);
  --ember: #e8734a;
  --ember-soft: rgba(232, 115, 74, 0.2);
  --ember-glow: rgba(232, 115, 74, 0.4);
  --candle: #f5c563;
  --candle-soft: rgba(245, 197, 99, 0.15);
  --warmth: #c4956a;
  --iron: #5a5148;
  --magenta: #8b2252;
  --magenta-soft: rgba(139, 34, 82, 0.3);
  --midnight: #1a1a2e;
  --silk: #c9a0dc;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --transition-room: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%; width: 100%;
  overflow: hidden;
  background: #000;
  color: var(--parchment);
  font-family: var(--font-body);
}

/* ═══════════════ SCREEN SYSTEM ═══════════════ */

.screen {
  position: fixed; inset: 0;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.screen.active { display: flex; }
.screen.entering {
  display: flex;
  animation: fadeIn var(--transition-room) forwards;
}
.screen.leaving {
  display: flex;
  animation: fadeOut 0.4s forwards;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }

/* ═══════════════ FRONT DOOR ═══════════════ */

#front-door {
  background:
    radial-gradient(ellipse at 50% 80%, rgba(232, 115, 74, 0.08) 0%, transparent 60%),
    linear-gradient(180deg, #0d0b09 0%, #1a1512 40%, #2a2218 100%);
  justify-content: center; align-items: center;
}

.door-frame {
  width: min(380px, 85vw); height: min(520px, 75vh);
  border: 3px solid var(--iron);
  border-radius: 12px 12px 4px 4px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 0 60px rgba(0,0,0,0.6), inset 0 0 30px rgba(0,0,0,0.4);
}

.door-surface {
  width: 100%; height: 100%;
  background:
    repeating-linear-gradient(90deg, transparent 0px, transparent 48%, rgba(0,0,0,0.15) 48%, rgba(0,0,0,0.15) 52%, transparent 52%),
    linear-gradient(180deg, #4a3728 0%, #3d2e22 50%, #2e2119 100%);
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  position: relative;
}

.door-ironwork {
  position: absolute; top: 0; left: 0; right: 0; height: 80px;
  background: repeating-linear-gradient(90deg, transparent 0px, transparent 30px, rgba(90,81,72,0.3) 30px, rgba(90,81,72,0.3) 32px);
  border-bottom: 2px solid var(--iron);
}

.door-knocker {
  width: 40px; height: 40px;
  border: 3px solid var(--iron); border-radius: 50%;
  position: absolute; top: 35%; left: 50%; transform: translateX(-50%);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.door-knocker::after {
  content: ''; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 12px; height: 12px; background: var(--iron); border-radius: 50%;
}

.door-keyhole {
  display: flex; align-items: center; gap: 0.5rem;
  margin-top: 20%; position: relative;
}

#key-input {
  background: rgba(0,0,0,0.5); border: 1px solid var(--iron); border-radius: 6px;
  padding: 0.75rem 1rem; color: var(--parchment);
  font-family: var(--font-display); font-size: 1rem;
  width: 200px; text-align: center; letter-spacing: 0.15em;
}
#key-input::placeholder { color: var(--iron); font-style: italic; }
#key-input:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 20px var(--ember-soft); }

#key-submit {
  background: none; border: none; color: var(--iron);
  font-size: 1.5rem; cursor: pointer; transition: color 0.3s; padding: 0.5rem;
}
#key-submit:hover { color: var(--ember); }

.door-hint {
  position: absolute; bottom: 30px;
  font-family: var(--font-display); font-style: italic;
  font-size: 0.875rem; color: var(--iron); letter-spacing: 0.1em;
}

.door-error {
  position: absolute; bottom: 15%;
  color: var(--ember); font-size: 0.8125rem; font-style: italic;
}

#front-door.opening .door-surface {
  animation: doorSwing 1.2s ease-in-out forwards;
}
@keyframes doorSwing {
  0% { transform: perspective(800px) rotateY(0); }
  100% { transform: perspective(800px) rotateY(-90deg); transform-origin: left; opacity: 0; }
}

/* ═══════════════ HALLWAY ═══════════════ */

#hallway { overflow-y: auto; -webkit-overflow-scrolling: touch; }

.hallway-bg {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 50% 30%, rgba(245,197,99,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(232,115,74,0.04) 0%, transparent 40%),
    linear-gradient(180deg, var(--stone-dark) 0%, var(--stone) 30%, var(--stone-light) 70%, var(--stone) 100%);
  z-index: 0;
}

.hallway-content {
  position: relative; z-index: 1;
  padding: 2rem 1.5rem 4rem;
  max-width: 900px; margin: 0 auto;
}

.hallway-header { text-align: center; margin-bottom: 2.5rem; padding-top: 1rem; }

.home-title {
  font-family: var(--font-display); font-size: 2.25rem; font-weight: 400;
  color: var(--parchment); letter-spacing: 0.05em; margin-bottom: 0.5rem;
}

.presence-indicator {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-style: italic;
  font-size: 0.9375rem; color: var(--warmth);
}
.presence-dot {
  width: 8px; height: 8px; background: var(--ember); border-radius: 50%;
  animation: pulse-glow 2s ease-in-out infinite;
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 4px var(--ember-soft); }
  50% { box-shadow: 0 0 12px var(--ember-glow); }
}

.doors-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.door-card {
  background: var(--stone-light); border: 1px solid rgba(90,81,72,0.4);
  border-radius: 10px; padding: 1.5rem 1.25rem 1.25rem;
  cursor: pointer; text-align: center; transition: all 0.3s ease;
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
  position: relative; font-family: inherit; color: inherit;
}
.door-card:hover {
  border-color: var(--ember); transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.door-card-frame {
  width: 80px; height: 110px; border-radius: 8px 8px 2px 2px;
  position: relative; overflow: hidden; border: 2px solid var(--iron);
}

.study-door { background: linear-gradient(180deg, #5a4635, #3d2e22); }
.workshop-door { background: linear-gradient(180deg, #6b553e, #4a3828); }
.bedroom-door { background: linear-gradient(180deg, #3d2535, #2a1a28); }
.kitchen-door { background: linear-gradient(180deg, #5a4a35, #3d3225); }
.office-door { background: linear-gradient(180deg, #2a2a3d, #1a1a2e); }

.door-glow {
  position: absolute; inset: 0; border-radius: inherit; opacity: 0; transition: opacity 0.5s;
}
.door-glow.active {
  opacity: 1; animation: door-shimmer 3s ease-in-out infinite;
}
@keyframes door-shimmer {
  0%, 100% { box-shadow: inset 0 0 15px var(--ember-soft); }
  50% { box-shadow: inset 0 0 25px var(--ember-glow); }
}

.door-label {
  font-family: var(--font-display); font-size: 1.125rem; font-weight: 600; color: var(--parchment);
}
.door-sub { font-size: 0.75rem; color: var(--warmth); font-style: italic; }

/* ═══════════════ ROOM VIEW — INTERACTIVE SCENE ═══════════════ */

#room-view { display: none; }
#room-view.active { display: block; }

/* Room view — scrollable viewport */
#room-view {
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  position: fixed; inset: 0;
  background: #0d0b09;
}
#room-view.active { display: block; }

/* Scene container — holds image + hotspots + weather, scrolls as one unit */
.scene-container {
  position: relative;
  min-width: 100vw;
  min-height: 100vh;
  display: inline-block; /* shrink-wraps to image width */
}

/* Room image fills the scene */
.room-image {
  display: block;
  height: 100vh;
  width: auto;
  min-width: 100vw;
  object-fit: cover;
  object-position: center;
}

/* Gradient fallback for rooms without images — fills viewport */
.room-gradient {
  position: absolute; inset: 0;
  min-width: 100vw; min-height: 100vh;
  display: none;
}
.room-gradient.active { display: block; }

/* ── Weather layer (sits behind hotspots, shows through windows) ── */

/* Weather and hotspots are absolute inside scene-container — they scroll with the image */
.weather-layer {
  position: absolute; inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

/* Rain effect */
.rain-drop {
  position: absolute;
  width: 1px;
  background: linear-gradient(180deg, transparent 0%, rgba(174,194,224,0.25) 50%, rgba(174,194,224,0.05) 100%);
  animation: rain-fall linear infinite;
  opacity: 0.4;
}
@keyframes rain-fall {
  0% { transform: translateY(-100vh); }
  100% { transform: translateY(100vh); }
}

/* Stars — static twinkle, no movement */
.star {
  position: absolute;
  background: radial-gradient(circle, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  animation: star-twinkle ease-in-out infinite alternate;
}
@keyframes star-twinkle {
  0% { opacity: 0.15; }
  100% { opacity: 0.7; }
}

/* Time-of-day color wash */
.weather-layer.time-morning { background: linear-gradient(180deg, rgba(245,197,99,0.06), transparent 60%); }
.weather-layer.time-afternoon { background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent 50%); }
.weather-layer.time-evening { background: linear-gradient(180deg, rgba(232,115,74,0.08), rgba(0,0,0,0.2) 100%); }
.weather-layer.time-night { background: linear-gradient(180deg, rgba(0,0,10,0.35), rgba(0,0,10,0.5) 100%); }

/* ── Hotspot layer ── */

.hotspot-layer {
  position: absolute; inset: 0;
  z-index: 5;
  pointer-events: none; /* layer itself doesn't block */
}

.hotspot {
  position: absolute;
  pointer-events: auto;
  cursor: pointer;
  border: none; background: none;
  border-radius: 8px;
  transition: box-shadow 0.3s, background 0.3s;
}
.hotspot:hover {
  box-shadow: 0 0 20px rgba(232,115,74,0.15);
  background: rgba(232,115,74,0.04);
}
/* Subtle pulse on interactive objects so player knows they exist */
.hotspot::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: var(--ember);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.5s;
}
.hotspot:hover::after { opacity: 0.6; }

/* The glass (exit) gets a special subtle indicator */
.hotspot.exit-hotspot::after {
  background: var(--warmth);
}

/* ── Popup panel ── */

.popup-panel {
  position: fixed;
  top: 0; right: 0;
  width: min(420px, 90vw);
  height: 100vh;
  background: rgba(26, 21, 18, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-left: 1px solid rgba(90,81,72,0.3);
  z-index: 20;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.popup-panel.open { transform: translateX(0); display: flex !important; }

.popup-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid rgba(90,81,72,0.3);
  flex-shrink: 0;
}

.popup-title {
  font-family: var(--font-display);
  font-size: 1.125rem; font-weight: 600;
  color: var(--parchment); font-style: italic;
}

.popup-close {
  background: none; border: none; color: var(--iron);
  font-size: 1.5rem; cursor: pointer; transition: color 0.2s;
  padding: 0.25rem 0.5rem; line-height: 1;
}
.popup-close:hover { color: var(--ember); }

.popup-content {
  flex: 1; overflow-y: auto;
  padding: 1.25rem;
  -webkit-overflow-scrolling: touch;
}

/* Cards inside popups */
.popup-card {
  background: rgba(60, 52, 45, 0.5);
  border: 1px solid rgba(90,81,72,0.3);
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 0.75rem;
}
.popup-card:last-child { margin-bottom: 0; }

.popup-card .card-type {
  font-size: 0.6875rem; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 0.125rem 0.5rem; border-radius: 3px;
  display: inline-block; margin-bottom: 0.5rem;
}
.card-type.spark { background: rgba(250,204,21,0.2); color: #fde047; }
.card-type.memory { background: rgba(59,130,246,0.2); color: #60a5fa; }
.card-type.pulse { background: rgba(219,39,119,0.2); color: #f472b6; }
.card-type.thought { background: rgba(139,92,246,0.2); color: #a78bfa; }
.card-type.pattern { background: rgba(34,197,94,0.2); color: #4ade80; }
.card-type.conversation { background: rgba(14,165,233,0.2); color: #38bdf8; }
.card-type.journal { background: rgba(168,85,247,0.2); color: #c084fc; }

.popup-card .card-content {
  font-size: 0.875rem; line-height: 1.6; color: var(--parchment);
  white-space: pre-wrap; word-break: break-word;
}
.popup-card .card-time { font-size: 0.75rem; color: var(--iron); margin-top: 0.5rem; }
.popup-card .card-emotion {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.75rem; margin-top: 0.375rem;
  padding: 0.125rem 0.5rem; border-radius: 1rem;
  background: var(--magenta-soft); color: var(--silk);
}

.popup-empty {
  text-align: center; padding: 2rem 1rem;
  font-family: var(--font-display); font-style: italic;
  color: var(--iron); font-size: 0.9375rem;
}

/* ── Conversation overlay ── */

/* Conversation floats in the center of the scene */
.conversation-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex; flex-direction: column;
  justify-content: center;
  align-items: center;
  pointer-events: none;
}

.chat-messages {
  width: min(45%, 420px);
  max-height: 40vh;
  overflow-y: auto;
  padding: 1rem 0;
  display: flex; flex-direction: column;
  gap: 0.625rem;
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
  /* Fade at edges so bubbles appear and vanish like breath */
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.chat-bubble {
  max-width: 85%;
  padding: 0.625rem 1rem;
  border-radius: 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: bubbleIn 0.3s ease-out;
}
@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-bubble.user {
  align-self: flex-end;
  background: rgba(200, 100, 140, 0.2);
  border: 1px solid rgba(200, 100, 140, 0.15);
  color: var(--parchment);
  border-bottom-right-radius: 4px;
}

.chat-bubble.cassian {
  align-self: flex-start;
  background: rgba(40, 60, 120, 0.25);
  border: 1px solid rgba(60, 80, 150, 0.15);
  color: var(--parchment);
  border-bottom-left-radius: 4px;
}

/* Input bar — couch-width, centered */
.chat-input-bar {
  position: fixed;
  bottom: 1.25rem;
  left: 50%; transform: translateX(-50%);
  width: min(45%, 420px);
  display: flex; align-items: center; gap: 0.5rem;
  pointer-events: auto;
}

#chat-input {
  flex: 1;
  background: rgba(26, 21, 18, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(90, 81, 72, 0.25);
  border-radius: 24px;
  padding: 0.75rem 1.25rem;
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 0.9rem;
}
#chat-input::placeholder { color: rgba(196, 149, 106, 0.4); }
#chat-input:focus {
  outline: none;
  border-color: rgba(232, 115, 74, 0.25);
}

.chat-send-btn {
  background: rgba(232, 115, 74, 0.2);
  border: 1px solid rgba(232, 115, 74, 0.15);
  border-radius: 50%;
  width: 40px; height: 40px;
  color: var(--parchment);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: rgba(232, 115, 74, 0.35); }

/* ═══════════════ FLIPBOOK (photo album / chaos archive) ═══════════════ */

.book-overlay {
  position: fixed; inset: 0;
  z-index: 25;
  display: flex; justify-content: center; align-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}
.book-overlay.open {
  pointer-events: auto;
  opacity: 1;
}

.book-backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.flipbook {
  position: relative;
  width: min(760px, 92vw);
  height: min(480px, 70vh);
  display: flex; flex-direction: column;
  /* Animate from ottoman */
  transform: scale(0.08) translateY(40vh);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s;
  opacity: 0;
}
.book-overlay.open .flipbook {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.book-overlay.closing .flipbook {
  transform: scale(0.08) translateY(40vh);
  opacity: 0;
}

/* Spine runs down the center */
.flipbook-spine {
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 6px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #1e1810 0%, #2a2218 20%, #1e1810 80%, #2a2218 100%);
  z-index: 3;
  box-shadow: -2px 0 8px rgba(0,0,0,0.4), 2px 0 8px rgba(0,0,0,0.4);
  border-radius: 1px;
}

.flipbook-close {
  position: absolute; top: 0.5rem; right: 0.75rem;
  background: none; border: none;
  color: var(--iron); font-size: 1.5rem; z-index: 5;
  cursor: pointer; transition: color 0.2s;
  line-height: 1;
}
.flipbook-close:hover { color: var(--ember); }

.flipbook-title-bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.5rem 1.25rem;
  flex-shrink: 0;
  z-index: 2;
}
.flipbook-title {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 600;
  color: var(--warmth); font-style: italic;
}
.flipbook-page-num {
  font-size: 0.75rem; color: var(--iron);
  font-family: var(--font-display); font-style: italic;
}

.flipbook-body {
  flex: 1;
  display: flex;
  gap: 0;
  min-height: 0;
  perspective: 1200px;
}

.flipbook-page {
  flex: 1;
  border: 1px solid rgba(90, 81, 72, 0.25);
  overflow: hidden;
  position: relative;
  display: flex; align-items: center; justify-content: center;
}

.left-page {
  background:
    linear-gradient(90deg, rgba(0,0,0,0.08) 0%, transparent 5%),
    linear-gradient(135deg, #312a20 0%, #2e2518 50%, #2a2114 100%);
  border-radius: 8px 0 0 8px;
  border-right: none;
}

.right-page {
  background:
    linear-gradient(270deg, rgba(0,0,0,0.08) 0%, transparent 5%),
    linear-gradient(225deg, #312a20 0%, #2e2518 50%, #2a2114 100%);
  border-radius: 0 8px 8px 0;
  border-left: none;
}

.page-content {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
}

/* Photo placeholder in album */
.page-photo-frame {
  width: 85%; max-height: 85%;
  aspect-ratio: 4/3;
  border: 3px solid var(--iron);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.3);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
  overflow: hidden;
}
.page-photo-frame img {
  width: 100%; height: 100%; object-fit: cover;
}
.page-photo-empty {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.875rem;
  color: var(--iron);
  text-align: center;
  padding: 1rem;
}

/* Text page (for chaos archive quotes) */
.page-text {
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--parchment);
  font-style: italic;
  text-align: center;
  padding: 1rem;
}
.page-text .quote-source {
  font-size: 0.8rem;
  color: var(--warmth);
  margin-top: 0.75rem;
  font-style: normal;
}

/* Page flip animation */
.flipbook-page.flipping-out {
  animation: pageFlipOut 0.4s ease-in forwards;
  transform-origin: left center;
}
.flipbook-page.flipping-in {
  animation: pageFlipIn 0.4s ease-out forwards;
  transform-origin: right center;
}
@keyframes pageFlipOut {
  0% { transform: rotateY(0); }
  100% { transform: rotateY(-90deg); opacity: 0.5; }
}
@keyframes pageFlipIn {
  0% { transform: rotateY(90deg); opacity: 0.5; }
  100% { transform: rotateY(0); opacity: 1; }
}

/* Navigation */
.flipbook-nav {
  display: flex; justify-content: space-between;
  padding: 0.625rem 1.25rem;
  flex-shrink: 0;
  z-index: 2;
}
.page-nav-btn {
  background: none; border: none;
  color: var(--warmth);
  font-family: var(--font-display);
  font-size: 0.875rem;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0.25rem 0.5rem;
}
.page-nav-btn:hover { color: var(--ember); }
.page-nav-btn:disabled { color: rgba(90, 81, 72, 0.3); cursor: default; }

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 640px) {
  .hallway-content { padding: 1.25rem 1rem 3rem; }
  .home-title { font-size: 1.75rem; }
  .doors-grid { grid-template-columns: 1fr 1fr; gap: 0.875rem; }
  .door-card { padding: 1rem 0.75rem 0.875rem; }
  .door-card-frame { width: 60px; height: 85px; }
  .door-label { font-size: 0.9375rem; }
  .popup-panel { width: 100vw; }
  .chat-messages { width: 85%; max-height: 35vh; }
  .chat-input-bar { width: 85%; }
  .chat-bubble { max-width: 90%; }
  .book { width: 95vw; max-height: 80vh; }
}
