/* Small extras on top of Tailwind (palette lives in base.html tailwind.config). */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C2CDD2; border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: #147A8A; }

@keyframes speakingRing {
  0% { box-shadow: 0 0 0 0 rgba(20, 122, 138, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(20, 122, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(20, 122, 138, 0); }
}
.speaking-pulse { animation: speakingRing 1.8s infinite; }

@keyframes floatUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: floatUp 0.22s ease-out forwards; }

/* Room chat wallpaper: soft tint with a faint dot pattern, WhatsApp-like but on-brand. */
.chat-wallpaper {
  background-color: #EEF4F5;
  background-image: radial-gradient(rgba(20, 122, 138, 0.07) 1px, transparent 1px);
  background-size: 18px 18px;
}

/* Privacy / terms page text */
.legal h2 { font-family: Lora, Georgia, serif; font-size: 1.15rem; font-weight: 600; color: #051A24; margin: 1.75rem 0 0.5rem; }
.legal p { margin: 0.6rem 0; }
.legal ul { list-style: disc; padding-left: 1.25rem; margin: 0.5rem 0; }
.legal li { margin: 0.3rem 0; }
.legal a { color: #0E5B68; text-decoration: underline; }

/* Room countdown: amber pulse once time is up. */
.room-timer.timer-done { background-color: #F59E0B; color: #051A24; animation: timer-pulse 1s ease-in-out infinite; }
.room-timer.timer-done svg { color: #051A24; }
@keyframes timer-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .room-timer.timer-done { animation: none; } }

/* Smooth in-page jumps (landing page "Sign in" / section links). */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* App navigation offsets: room for the fixed sidebar (desktop) or bottom tab bar (smaller screens). */
:root { --app-bottombar: calc(3.75rem + env(safe-area-inset-bottom)); }
@media (min-width: 1024px) {
  body:has(#app-sidebar) { padding-left: 18rem; }
}
@media (max-width: 1023.98px) {
  body:has(#app-bottombar) { padding-bottom: var(--app-bottombar); }
  /* Full-height pages (Messages) must stop above the tab bar, not under it. */
  body:has(#app-bottombar) .app-fill { height: calc(100dvh - var(--app-bottombar)) !important; }
  body:has(#app-bottombar) #toast-stack { bottom: calc(var(--app-bottombar) + 0.75rem); }
}
.legal h3 { font-size: 1rem; font-weight: 600; color: #051A24; margin: 1.25rem 0 0.4rem; }
.legal strong { color: #051A24; font-weight: 600; }

/* Feel like an app on phones: no double-tap zoom on buttons, and no auto-zoom when typing
   (iOS zooms into any field with text smaller than 16px). Pinch-zoom still works. */
html { -webkit-text-size-adjust: 100%; touch-action: manipulation; }
@media (max-width: 640px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]), select, textarea { font-size: 16px !important; }
}
/* Game areas: taps go to the game, never to scrolling or zooming the page. */
#arcade-stage { touch-action: none; -webkit-user-select: none; user-select: none; }

/* Modern dropdowns everywhere: custom chevron, soft hover, clear focus ring (native menus stay
   accessible and keyboard/touch friendly). */
:root { accent-color: #147A8A; }
select:not([multiple]),
.pj-select-button {
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23147A8A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  background-size: 1rem;
  padding-right: 2.6rem !important;
  cursor: pointer;
  font-weight: 600;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
select:not([multiple]):hover,
.pj-select-button:hover { border-color: rgba(20, 122, 138, 0.45); background-color: #fff; }
select:not([multiple]):focus,
select:not([multiple]):focus-visible,
.pj-select-button:focus-visible,
.pj-select-button[aria-expanded="true"] { outline: none; border-color: #147A8A; box-shadow: 0 0 0 4px rgba(20, 122, 138, 0.15); background-color: #fff; }
select option { color: #051A24; background: #fff; font-weight: 500; }
