/* ============================================================
   方圆 500 米 — Dark Theme Mobile-First PWA Styles
   Design tokens:
   - bg: radial-gradient(ellipse 50% 30%, #2a2a4a, #1a1a2e, #0f0f1a)
   - primary: #89b4fa  |  green: #a6e3a1  |  red: #f38ba8  |  yellow: #f9e2af
   - card: rgba(49,50,68,0.6) + backdrop-filter blur(8px)
   ============================================================ */

/* ── Reset ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background: radial-gradient(ellipse at 50% 30%, #2a2a4a, #1a1a2e, #0f0f1a);
  background-attachment: fixed;
  color: #cdd6f4;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ── Container ─────────────────────────────────────────── */

/* ── Page System ───────────────────────────────────────── */
.page {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
}

.page.active {
  display: flex;
  flex-direction: column;
}

/* ── Auth Page ─────────────────────────────────────────── */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 24px;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* ── Background particles ─────────────────────────────── */
.auth-bg-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.auth-bg-particles::before,
.auth-bg-particles::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  animation: floatUp 8s ease-in-out infinite;
}

.auth-bg-particles::before {
  width: 6px;
  height: 6px;
  background: rgba(137, 180, 250, 0.5);
  top: 70%;
  left: 20%;
  box-shadow:
    60px 0 0 rgba(203, 166, 247, 0.35),
    120px -40px 0 rgba(166, 227, 161, 0.3),
    180px 20px 0 rgba(137, 180, 250, 0.4),
    -40px -60px 0 rgba(249, 226, 175, 0.3),
    200px -80px 0 rgba(243, 139, 168, 0.25),
    240px -30px 0 rgba(137, 180, 250, 0.2),
    -80px -100px 0 rgba(203, 166, 247, 0.2),
    300px -60px 0 rgba(166, 227, 161, 0.2);
  animation-delay: 0s;
  animation-duration: 7s;
}

.auth-bg-particles::after {
  width: 5px;
  height: 5px;
  background: rgba(166, 227, 161, 0.4);
  top: 78%;
  right: 25%;
  box-shadow:
    -80px -20px 0 rgba(137, 180, 250, 0.35),
    40px -60px 0 rgba(249, 226, 175, 0.3),
    -140px -50px 0 rgba(203, 166, 247, 0.3),
    100px -30px 0 rgba(243, 139, 168, 0.25),
    -180px -10px 0 rgba(137, 180, 250, 0.3),
    -220px -80px 0 rgba(166, 227, 161, 0.2),
    160px -90px 0 rgba(249, 226, 175, 0.2),
    -60px -110px 0 rgba(137, 180, 250, 0.2);
  animation-delay: 3.5s;
  animation-duration: 7s;
}

/* ── Hero visual ──────────────────────────────────────── */
.auth-hero {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.auth-ripple {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(137, 180, 250, 0.15);
  animation: ripple 4s ease-in-out infinite;
}

.ripple-1 { width: 100%; height: 100%; animation-delay: 0s; }
.ripple-2 { width: 72%; height: 72%; animation-delay: 0.6s; }
.ripple-3 { width: 46%; height: 46%; animation-delay: 1.2s; }

.auth-icon-wrap {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(137, 180, 250, 0.1);
  border: 1px solid rgba(137, 180, 250, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.auth-icon {
  font-size: 34px;
  animation: pulse 2.5s ease-in-out infinite;
}

/* ── Title ────────────────────────────────────────────── */
.auth-title {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 10px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #89b4fa 0%, #74c7ec 40%, #cba6f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-divider {
  width: 48px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(137, 180, 250, 0.5), transparent);
  border-radius: 1px;
  margin-bottom: 10px;
}

/* ── Subtitle ─────────────────────────────────────────── */
.auth-subtitle {
  font-size: 13px;
  color: #6c7086;
  margin-bottom: 20px;
  letter-spacing: 2px;
}

/* ── Permission chips ─────────────────────────────────── */
.auth-perms {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  width: 100%;
  max-width: 340px;
}

.auth-perm-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: rgba(49, 50, 68, 0.4);
  border: 1px solid rgba(137, 180, 250, 0.2);
  border-radius: 14px;
  transition: border-color 0.3s, background 0.3s;
}

.auth-perm-icon {
  font-size: 20px;
  opacity: 0.75;
}

.auth-perm-label {
  font-size: 10px;
  color: #6c7086;
  letter-spacing: 1px;
}

/* ── Privacy ──────────────────────────────────────────── */
.auth-privacy {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #585b70;
  margin-bottom: 20px;
  letter-spacing: 1px;
}

.auth-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #45475a;
  flex-shrink: 0;
}

/* ── Nickname card ────────────────────────────────────── */
.auth-nickname {
  margin-bottom: 24px;
  width: 100%;
  max-width: 300px;
}

.auth-nickname-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #585b70;
  margin-bottom: 10px;
}

.auth-nickname-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 1.5;
  min-height: 33px;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #89b4fa 0%, #cba6f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}


/* ── Refresh button ────────────────────────────────────── */
.btn-refresh {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(137, 180, 250, 0.25);
  background: rgba(137, 180, 250, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  margin: 0 auto;
  transition: opacity 0.3s ease, transform 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
}

.btn-refresh:hover {
  border-color: rgba(137, 180, 250, 0.45);
  background: rgba(137, 180, 250, 0.12);
  transform: translateY(-1px);
}

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

.btn-refresh-icon {
  opacity: 0.55;
  transition: opacity 0.2s;
}

.btn-refresh:hover .btn-refresh-icon {
  opacity: 0.7;
}

.btn-refresh-count {
  position: absolute;
  font-size: 14px;
  font-weight: 700;
  color: #89b4fa;
  font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
  line-height: 1;
}

.btn-refresh.spent {
  opacity: 0.25;
  border-color: rgba(69, 71, 90, 0.1);
  background: rgba(49, 50, 68, 0.1);
  cursor: not-allowed;
  pointer-events: none;
}

.btn-refresh.spent .btn-refresh-icon {
  opacity: 0.3;
}

.btn-refresh.spent .btn-refresh-count {
  display: none;
}

.btn-refresh.spinning .btn-refresh-icon {
  animation: spin 0.5s ease;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Enter button arrow ───────────────────────────────── */
.btn-arrow {
  font-size: 18px;
  transition: transform 0.25s ease;
}

.btn-primary:hover .btn-arrow {
  transform: translateX(3px);
}

/* ── Particles / Ripple animations ────────────────────── */
@keyframes ripple {
  0%, 100% { transform: scale(0.78); opacity: 0.18; }
  50% { transform: scale(1.12); opacity: 0.55; }
}

@keyframes floatUp {
  0% {
    transform: translateY(0) scale(0.8);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  85% {
    opacity: 0;
  }
  100% {
    transform: translateY(-100vh) scale(1.2);
    opacity: 0;
  }
}

/* ── Buttons ───────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #89b4fa, #74c7ec);
  color: #0f0f1a;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px rgba(137, 180, 250, 0.3);
  user-select: none;
  -webkit-user-select: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(137, 180, 250, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(137, 180, 250, 0.2);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 1px solid #45475a;
  border-radius: 12px;
  background: transparent;
  color: #a6adc8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
  -webkit-user-select: none;
}

.btn-ghost:hover {
  border-color: #89b4fa;
  color: #89b4fa;
  transform: translateY(-1px);
}

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

.btn-block {
  width: 100%;
}

.enter-btn-hidden {
  opacity: 0;
  pointer-events: none;
}

.enter-btn-reveal {
  animation: fadeInUp 0.6s ease forwards, breathe 3s 0.6s ease-in-out infinite;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 4px 20px rgba(137, 180, 250, 0.3); }
  50%      { box-shadow: 0 4px 32px rgba(137, 180, 250, 0.55); transform: scale(1.03); }
}

/* ── Main Page ─────────────────────────────────────────── */
#page-main {
  position: relative;
}

#page-main .map-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  flex: none;
  min-height: 0;
  z-index: 0;
}

.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  background: rgba(24, 24, 37, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  z-index: 10;
}

.main-header-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.main-header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.main-header-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

#nearby-count {
  font-size: 11px;
  color: #cdd6f4;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.main-header h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
}

.main-nickname {
  font-size: 14px;
  color: #cdd6f4;
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a6e3a1;
  box-shadow: 0 0 6px rgba(166, 227, 161, 0.6);
  flex-shrink: 0;
  transition: background 0.3s, box-shadow 0.3s;
}

.connection-status.offline .conn-dot {
  background: #f38ba8;
  box-shadow: 0 0 6px rgba(243, 139, 168, 0.6);
}

.conn-label {
  font-size: 11px;
  color: #a6adc8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.loc-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.loc-gps {
  background: rgba(166, 227, 161, 0.2);
  color: #a6e3a1;
}

.loc-ip {
  background: rgba(249, 226, 175, 0.2);
  color: #f9e2af;
}

.map-container {
  flex: 1;
  min-height: 400px;
  position: relative;
  overflow: hidden;
}

#map {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
}

.recenter-btn {
  position: absolute;
  top: 68px;
  right: 8px;
  z-index: 11;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(24, 24, 37, 0.85);
  border: 1px solid rgba(69, 71, 90, 0.4);
  color: #cdd6f4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s;
}

.recenter-btn:hover {
  background: rgba(49, 50, 68, 0.9);
}

.theme-btn {
  position: absolute;
  top: 68px;
  right: 50px;
  z-index: 11;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(24, 24, 37, 0.85);
  border: 1px solid rgba(69, 71, 90, 0.4);
  color: #cdd6f4;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s;
}

.theme-btn:hover {
  background: rgba(49, 50, 68, 0.9);
}

.map-dark .leaflet-tile-pane {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}

.main-stats {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 14px 20px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: rgba(24, 24, 37, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(69, 71, 90, 0.3);
  position: relative;
  z-index: 10;
  margin-top: auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #89b4fa;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.stat-label {
  font-size: 10px;
  color: #a6adc8;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.fab {
  position: fixed;
  bottom: 100px;
  left: 50%;
  margin-left: -28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #89b4fa, #74c7ec);
  color: #0f0f1a;
  font-size: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(137, 180, 250, 0.4);
  transition: all 0.25s ease;
  z-index: 1000;
  user-select: none;
  -webkit-user-select: none;
}

.fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 32px rgba(137, 180, 250, 0.55);
}

.fab:active {
  transform: translateY(0) scale(0.98);
}

/* ── Create Page ───────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  padding-top: max(16px, env(safe-area-inset-top));
}

.page-header .btn-back {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #45475a;
  background: transparent;
  color: #cdd6f4;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.page-header .btn-back:hover {
  border-color: #89b4fa;
  color: #89b4fa;
}

.page-header h2 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 1px;
}

.create-types {
  position: relative;
  display: flex;
  gap: 0;
  margin: 0 20px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(69, 71, 90, 0.4);
}

.create-type {
  flex: 1;
  padding: 12px 0;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #6c7086;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
}

.create-type + .create-type {
  border-left: 1px solid rgba(69, 71, 90, 0.4);
}

.create-type.active {
  background: rgba(137, 180, 250, 0.15);
  color: #89b4fa;
  box-shadow: inset 0 -2px 0 0 #89b4fa;
}

.create-type:hover:not(.active) {
  color: #a6adc8;
  background: rgba(49, 50, 68, 0.3);
}

.create-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 20px;
  gap: 16px;
  overflow-y: auto;
}

.create-content textarea {
  width: 100%;
  min-height: 160px;
  background: rgba(49, 50, 68, 0.4);
  border: 1px solid rgba(69, 71, 90, 0.4);
  border-radius: 14px;
  padding: 16px;
  color: #cdd6f4;
  font-size: 16px;
  font-family: inherit;
  line-height: 1.6;
  resize: vertical;
  outline: none;
  transition: border-color 0.2s ease;
}

.create-content textarea:focus {
  border-color: #89b4fa;
}

.create-content textarea::placeholder {
  color: #585b70;
}

.text-count {
  text-align: right;
  font-size: 12px;
  color: #6c7086;
  margin-top: -8px;
}

.media-preview {
  background: rgba(49, 50, 68, 0.4);
  border: 1px solid rgba(69, 71, 90, 0.4);
  border-radius: 14px;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-preview img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.media-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #585b70;
  font-size: 14px;
  padding: 40px 20px;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
}


.media-placeholder .media-icon {
  font-size: 48px;
  opacity: 0.4;
}

.create-location {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(49, 50, 68, 0.4);
  border: 1px solid rgba(69, 71, 90, 0.4);
  border-radius: 12px;
  font-size: 13px;
  color: #a6adc8;
}

.create-hint {
  font-size: 12px;
  color: #585b70;
  text-align: center;
  letter-spacing: 1px;
}

/* ── Image Create: Viewfinder ──────────────────────────── */
.viewfinder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  background: rgba(15, 15, 26, 0.5);
  border: 1px solid rgba(69, 71, 90, 0.5);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.viewfinder:active {
  background: rgba(15, 15, 26, 0.7);
}

.vf-grid {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(8, 1fr);
  opacity: 0.04;
  pointer-events: none;
}

.vf-grid div {
  border: 0.5px solid rgba(137, 180, 250, 0.5);
}

.vf-corners {
  position: absolute;
  top: 12px; left: 12px; right: 12px; bottom: 12px;
  border: 1px dashed rgba(137, 180, 250, 0.15);
  border-radius: 6px;
  pointer-events: none;
}

.vf-corners::before,
.vf-corners::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-color: rgba(166, 227, 161, 0.35);
  border-style: solid;
}

.vf-corners::before {
  top: -1px; left: -1px;
  border-width: 2px 0 0 2px;
}

.vf-corners::after {
  bottom: -1px; right: -1px;
  border-width: 0 2px 2px 0;
}

.vf-icon {
  font-size: 36px;
  opacity: 0.45;
  position: relative;
  z-index: 1;
}

.vf-label {
  font-size: 13px;
  color: #89b4fa;
  margin-top: 10px;
  letter-spacing: 1px;
  position: relative;
  z-index: 1;
}

/* ── Image Create: Processing ──────────────────────────── */
.processing-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  gap: 14px;
}

.proc-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(137, 180, 250, 0.1);
  border-top-color: #89b4fa;
  border-radius: 50%;
  animation: proc-spin 1.2s linear infinite;
}

@keyframes proc-spin {
  to { transform: rotate(360deg); }
}

.proc-bar {
  width: 140px;
  height: 3px;
  background: rgba(69, 71, 90, 0.4);
  border-radius: 2px;
  overflow: hidden;
}

.proc-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #89b4fa, #a6e3a1);
  animation: proc-bar-pulse 1.8s ease-in-out infinite;
}

@keyframes proc-bar-pulse {
  0%   { width: 15%; }
  50%  { width: 85%; }
  100% { width: 15%; }
}

.proc-text {
  font-size: 13px;
  color: #a6adc8;
}

.proc-sub {
  font-size: 11px;
  color: #585b70;
}

/* ── Image Create: Before/After Comparison ─────────────── */
.comparison-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.comp-half {
  position: relative;
  background: rgba(49, 50, 68, 0.4);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.comp-half img {
  max-width: 100%;
  max-height: 200px;
  object-fit: contain;
}

.comp-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.comp-tag-original {
  background: rgba(243, 139, 168, 0.12);
  color: #f38ba8;
  border: 1px solid rgba(243, 139, 168, 0.2);
}

.comp-tag-private {
  background: rgba(166, 227, 161, 0.1);
  color: #a6e3a1;
  border: 1px solid rgba(166, 227, 161, 0.18);
}

/* ── Image Create: Confirm Panel ───────────────────────── */
.confirm-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px 0;
}

.confirm-preview {
  width: 160px;
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(166, 227, 161, 0.2);
  box-shadow: 0 0 30px rgba(166, 227, 161, 0.08);
}

.confirm-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.confirm-badge {
  font-size: 11px;
  color: #a6e3a1;
  background: rgba(166, 227, 161, 0.08);
  border: 1px solid rgba(166, 227, 161, 0.15);
  border-radius: 6px;
  padding: 4px 12px;
  letter-spacing: 0.5px;
}

.confirm-hint {
  font-size: 11px;
  color: #585b70;
}

.confirm-image-text {
  width: 100%;
  margin-top: 4px;
}

.image-text-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(69, 71, 90, 0.4);
  background: rgba(49, 50, 68, 0.4);
  color: #cdd6f4;
  font-size: 13px;
  font-family: inherit;
  resize: none;
  min-height: 60px;
  outline: none;
  transition: border-color 0.2s;
}

.image-text-input::placeholder {
  color: #585b70;
}

.image-text-input:focus {
  border-color: rgba(137, 180, 250, 0.5);
}

.confirm-actions {
  display: flex;
  gap: 10px;
}

.btn-retake {
  padding: 8px 20px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid rgba(69, 71, 90, 0.5);
  background: rgba(49, 50, 68, 0.4);
  color: #a6adc8;
  cursor: pointer;
}

.btn-retake:active {
  background: rgba(49, 50, 68, 0.6);
}

/* ── Bottle View Page ──────────────────────────────────── */
.bottle-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px 20px;
  text-align: center;
}

.bottle-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: #f9e2af;
  letter-spacing: 2px;
}

.bottle-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.bottle-text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 32px;
  font-size: 20px;
  line-height: 1.8;
  text-align: center;
  word-break: break-word;
}

.bottle-media {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: 100%;
}

.bottle-media img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 16px;
  object-fit: contain;
}

/* ── Image Bottle: Pixel Skeleton ─────────────────────── */
.bottle-skeleton-pixel {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 3px;
  padding: 8px;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.bottle-skeleton-pixel .sk-cell {
  background: rgba(137, 180, 250, 0.06);
  border-radius: 2px;
  animation: skel-pulse 0.8s ease-in-out infinite alternate;
}

.bottle-skeleton-pixel .sk-cell:nth-child(odd) {
  animation-delay: 0.1s;
}

.bottle-skeleton-pixel .sk-cell:nth-child(3n) {
  animation-delay: 0.25s;
}

.bottle-skeleton-pixel .sk-cell:nth-child(5n+2) {
  animation-delay: 0.4s;
}

@keyframes skel-pulse {
  from { background: rgba(137, 180, 250, 0.06); }
  to   { background: rgba(137, 180, 250, 0.18); }
}

/* ── Image Bottle: Reveal Animation ──────────────────── */
.bottle-media-reveal {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  width: 100%;
  position: relative;
}

.bottle-media-reveal img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 12px;
  object-fit: contain;
  animation: bottle-reveal 1.5s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

@keyframes bottle-reveal {
  0%   {
    filter: blur(20px) grayscale(0.8);
    transform: scale(0.95);
    opacity: 0.6;
  }
  40%  {
    filter: blur(10px) grayscale(0.5);
  }
  70%  {
    filter: blur(3px) grayscale(0.1);
  }
  100% {
    filter: blur(0) grayscale(0);
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Image Bottle: Pixel Border Glow ──────────────────── */
.pixel-border {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border: 2px solid rgba(166, 227, 161, 0.25);
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 24px rgba(166, 227, 161, 0.08);
  animation: pixel-border-glow 0.6s ease-out 1.5s forwards;
  opacity: 0;
}

@keyframes pixel-border-glow {
  0%   { opacity: 0; }
  50%  { opacity: 1; box-shadow: 0 0 32px rgba(166, 227, 161, 0.15); }
  100% { opacity: 0.8; box-shadow: 0 0 24px rgba(166, 227, 161, 0.08); }
}

/* ── Image Bottle: Fullscreen Overlay ─────────────────── */
.image-fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 15, 26, 0.96);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: fs-fade-in 0.3s ease-out;
  -webkit-animation: fs-fade-in 0.3s ease-out;
}

@keyframes fs-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.image-fullscreen-overlay img {
  max-width: 95vw;
  max-height: 75vh;
  border-radius: 14px;
  object-fit: contain;
  border: 2px solid rgba(166, 227, 161, 0.2);
  box-shadow: 0 0 60px rgba(166, 227, 161, 0.12);
}

.fs-image-text {
  color: #cdd6f4;
  font-size: 15px;
  font-style: italic;
  text-align: center;
  margin-top: 12px;
  padding: 0 20px;
  opacity: 0.85;
}

.image-fullscreen-caption {
  margin-top: 16px;
  color: #a6adc8;
  font-size: 14px;
  text-align: center;
}

.image-fullscreen-caption .fs-from {
  color: #89b4fa;
}

.image-fullscreen-caption .fs-time {
  color: #f9e2af;
  margin-left: 12px;
}

.image-fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(49, 50, 68, 0.6);
  border: 1px solid rgba(69, 71, 90, 0.4);
  color: #cdd6f4;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

/* ── Voice Player (custom) ─────────────────────────────── */

.voice-player {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 20px;
  width: 100%;
}

.voice-visualizer-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-visualizer {
  display: block;
  border-radius: 50%;
}

.voice-play-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(137, 180, 250, 0.35);
  background: rgba(137, 180, 250, 0.1);
  color: #89b4fa;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.voice-play-btn:active {
  transform: translate(-50%, -50%) scale(0.94);
}
.voice-play-btn.playing {
  border-color: rgba(166, 227, 161, 0.45);
  background: rgba(166, 227, 161, 0.12);
  color: #a6e3a1;
}

.voice-time {
  color: #bac2de;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  font-variant-numeric: tabular-nums;
}
.voice-time-current { color: #cdd6f4; }
.voice-time-sep { color: #6c7086; margin: 0 4px; }
.voice-time-total { color: #6c7086; }

.bottle-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  font-size: 14px;
  color: #f9e2af;
  background: rgba(249, 226, 175, 0.08);
  border: 1px solid rgba(249, 226, 175, 0.2);
  border-radius: 12px;
  margin: 0 20px;
}

.bottle-from {
  text-align: center;
  padding: 12px 20px;
  font-size: 13px;
  color: #6c7086;
}

.bottle-only-you {
  text-align: center;
  padding: 8px 20px 20px;
  font-size: 12px;
  color: #585b70;
  letter-spacing: 1px;
}

/* ── Success Page ──────────────────────────────────────── */

/* ── Glass Card Utility ────────────────────────────────── */

/* ── Error / Empty States ──────────────────────────────── */

/* ── Location Permission Prompt ────────────────────────── */

/* ── Animations ────────────────────────────────────────── */
@keyframes typewriter-cursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

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

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ── Toast ────────────────────────────────────────────── */
#toast {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(24, 24, 37, 0.94);
  border: 1px solid rgba(137, 180, 250, 0.2);
  color: #cdd6f4;
  font-size: 14px;
  padding: 10px 24px;
  border-radius: 8px;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#toast.toast-show {
  opacity: 1;
}

/* ── Bottle Markers (on map) ───────────────────────────── */
.bottle-marker {
  background: transparent !important;
  border: none !important;
  width: auto !important;
  height: auto !important;
}
.bottle-marker > div {
  filter: drop-shadow(0 0 8px rgba(137, 180, 250, 0.4));
}
/* ── Remove button ─────────────────────────────────────── */

/* ── Quick-fade for splash transition ─────────────────── */

/* ── Bottle List Overlay ─────────────────────── */
.bottle-list-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
}

.bottle-list-sheet {
  background: #181825;
  border-radius: 20px 20px 0 0;
  max-height: 70vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.bottle-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  color: #cdd6f4;
  font-size: 16px;
  font-weight: 500;
}

.btn-close {
  background: none;
  border: none;
  color: #6c7086;
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

.bottle-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 24px;
}

.bottle-list-item {
  background: #313244;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity 0.2s;
}

.bottle-list-item:active {
  opacity: 0.7;
}

.bottle-list-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.bottle-list-info {
  flex: 1;
  min-width: 0;
}

.bottle-list-from {
  font-size: 13px;
  color: #cdd6f4;
  margin-bottom: 2px;
}

.bottle-list-dist {
  font-size: 11px;
  color: #585b70;
}

.bottle-list-timer {
  font-family: monospace;
  font-size: 14px;
  font-weight: 600;
  flex-shrink: 0;
}

.bottle-list-empty {
  text-align: center;
  padding: 40px 20px;
  color: #585b70;
  font-size: 14px;
}

/* ── Bottle Detail (inside list) ───────────────── */

/* ── Map Marker Animations ───────────────────────────── */
.self-marker-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ripple-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(137, 180, 250, 0.25);
  animation: ripple-expand 3s ease-out infinite;
}

.ripple-1 { animation-delay: 0s; }
.ripple-2 { animation-delay: 1s; }
.ripple-3 { animation-delay: 2s; }

.self-dot {
  position: relative;
  z-index: 1;
}

@keyframes ripple-expand {
  0%   { width: 26px; height: 26px; opacity: 0.5; }
  100% { width: 90px; height: 90px; opacity: 0; }
}

.user-dot-marker {
  overflow: visible !important;
}

.user-dot-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: marker-breathe 3s ease-in-out infinite;
}

.user-marker .self-marker-wrap {
  animation: marker-breathe 3s ease-in-out infinite;
}

.bottle-wrap {
  animation: bottle-drift 4s ease-in-out infinite;
}

.bottle-time {
  text-shadow: 0 0 4px rgba(0, 0, 0, 0.7), 0 1px 2px rgba(0, 0, 0, 0.5);
}

@keyframes marker-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.2); }
}

@keyframes bottle-drift {
  0%, 100% { transform: scale(1) translateY(0); }
  25%      { transform: scale(1.08) translateY(-2px); }
  50%      { transform: scale(1.13) translateY(-4px); }
  75%      { transform: scale(1.08) translateY(-2px); }
}

/* ── Mobile User Tip ──────────────────────────────────── */
.user-tip {
  background: rgba(24, 24, 37, 0.92) !important;
  border: 1px solid rgba(137, 180, 250, 0.25) !important;
  border-radius: 6px !important;
  color: #cdd6f4 !important;
  font-size: 12px !important;
  padding: 3px 8px !important;
  white-space: nowrap !important;
  box-shadow: none !important;
  animation: tipIn 0.4s ease;
}

.user-tip::before {
  border-top-color: rgba(24, 24, 37, 0.92) !important;
}

@keyframes tipIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Drop Success Overlay ─────────────────────────────── */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}

.drop-overlay-show {
  opacity: 1;
}

.drop-card {
  text-align: center;
}

/* ── Drop Animation Stage ────────────────────── */

.drop-stage {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.drop-envelope {
  position: absolute;
  font-size: 64px;
  opacity: 0;
  animation: envelopePack 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 2;
}

@keyframes envelopePack {
  0%   { opacity: 0; transform: translateY(-60px) scale(0.3) rotate(-8deg); }
  20%  { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
  55%  { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
  75%  { opacity: 0.7; transform: translateY(30px) scale(0.5) rotate(4deg); }
  92%  { opacity: 0; transform: translateY(55px) scale(0.1); }
  100% { opacity: 0; transform: translateY(55px) scale(0); }
}

.drop-bottle-anim {
  position: absolute;
  font-size: 80px;
  opacity: 0;
  animation: bottleThrow 2.2s 0.85s cubic-bezier(0.25, 0, 0.35, 1) forwards;
  z-index: 1;
}

@keyframes bottleThrow {
  /* Cork pop — bottle receives envelope */
  0%   { opacity: 0; transform: scale(0.5); }
  8%   { opacity: 1; transform: scale(1.18); }
  14%  { opacity: 1; transform: scale(0.9); }
  20%  { opacity: 1; transform: scale(1); }
  /* Brief pause, then throw */
  38%  { opacity: 1; transform: scale(1) rotate(0deg) translate(0, 0); }
  65%  { opacity: 0.7; transform: scale(0.55) rotate(25deg) translate(75px, -60px); }
  100% { opacity: 0; transform: scale(0.15) rotate(42deg) translate(240px, -200px); }
}

/* Sparkle particles that burst when bottle launches */
.drop-sparkle {
  position: absolute;
  font-size: 24px;
  opacity: 0;
  pointer-events: none;
}

.drop-sparkle.s1 {
  top: 42%; left: 44%;
  animation: sparkleFly 0.75s 1.55s ease-out forwards;
}
.drop-sparkle.s2 {
  top: 38%; left: 52%;
  animation: sparkleFly 0.75s 1.65s ease-out forwards;
}
.drop-sparkle.s3 {
  top: 48%; left: 42%;
  animation: sparkleFly 0.7s 1.7s ease-out forwards;
}
.drop-sparkle.s4 {
  top: 36%; left: 46%;
  animation: sparkleFly 0.8s 1.6s ease-out forwards;
}

@keyframes sparkleFly {
  0%   { opacity: 1; transform: translate(0, 0) scale(0); }
  15%  { opacity: 1; transform: scale(1.3); }
  50%  { opacity: 0.6; }
  100% { opacity: 0; transform: translate(var(--sx, -30px), var(--sy, -45px)) scale(0.2); }
}

.drop-anim-title {
  font-size: 20px;
  color: #cdd6f4;
  margin-top: 4px;
  opacity: 0;
  animation: dropTextIn 0.45s 1.9s ease forwards;
}

.drop-anim-sub {
  font-size: 13px;
  color: #6c7086;
  margin-top: 6px;
  margin-bottom: 4px;
  opacity: 0;
  animation: dropTextIn 0.45s 2.1s ease forwards;
}

@keyframes dropTextIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Pick Animation (reverse of drop) ────────── */

.pick-stage {
  position: relative;
  width: 300px;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.pick-bottle {
  position: absolute;
  font-size: 80px;
  opacity: 0;
  animation: pickBottleIn 1.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 1;
}

@keyframes pickBottleIn {
  0%   { opacity: 0; transform: scale(0.3); }
  12%  { opacity: 1; transform: scale(1.15); }
  20%  { opacity: 1; transform: scale(1); }
  50%  { opacity: 1; transform: scale(1) rotate(0deg); }
  65%  { opacity: 0.5; transform: scale(0.85) rotate(-10deg); }
  100% { opacity: 0; transform: scale(0.4) rotate(-15deg); }
}

.pick-envelope {
  position: absolute;
  font-size: 60px;
  opacity: 0;
  animation: pickEnvRise 1.3s 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 2;
}

@keyframes pickEnvRise {
  0%   { opacity: 0; transform: translateY(42px) scale(0.15); }
  18%  { opacity: 1; transform: translateY(18px) scale(0.55); }
  45%  { opacity: 1; transform: translateY(-28px) scale(1); }
  75%  { opacity: 1; transform: translateY(-28px) scale(1); }
  100% { opacity: 0; transform: translateY(-28px) scale(0.25); }
}

.pick-letter-open {
  position: absolute;
  font-size: 68px;
  opacity: 0;
  animation: pickLetterReveal 0.5s 1.65s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  z-index: 3;
}

@keyframes pickLetterReveal {
  0%   { opacity: 0; transform: scale(0.2) translateY(12px); }
  60%  { opacity: 1; transform: scale(1.15) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

.pick-sparkle {
  position: absolute;
  font-size: 22px;
  opacity: 0;
  pointer-events: none;
}

.pick-sparkle.ps1 {
  top: 35%; left: 48%;
  animation: sparkleFly 0.7s 0.9s ease-out forwards;
}
.pick-sparkle.ps2 {
  top: 40%; left: 55%;
  animation: sparkleFly 0.7s 1.0s ease-out forwards;
}
.pick-sparkle.ps3 {
  top: 32%; left: 42%;
  animation: sparkleFly 0.65s 0.95s ease-out forwards;
}

.pick-anim-title {
  font-size: 20px;
  color: #cdd6f4;
  margin-top: 4px;
  opacity: 0;
  animation: dropTextIn 0.45s 1.5s ease forwards;
}

.pick-anim-sub {
  font-size: 13px;
  color: #6c7086;
  margin-top: 6px;
  margin-bottom: 4px;
  opacity: 0;
  animation: dropTextIn 0.45s 1.7s ease forwards;
}

/* ── User List ─────────────────────────────── */

.user-list-overlay {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  z-index: 1000;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
}

.user-list-sheet {
  background: #181825;
  border-radius: 20px 20px 0 0;
  max-height: 70vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

.user-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  color: #cdd6f4;
  font-size: 16px;
  font-weight: 500;
}

.user-list-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 24px;
}

.user-list-item {
  background: #313244;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.user-list-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.user-list-dot.online {
  background: #a6e3a1;
  box-shadow: 0 0 6px rgba(166, 227, 161, 0.5);
}

.user-list-dot.offline {
  background: #585b70;
}

.user-list-info {
  flex: 1;
  min-width: 0;
}

.user-list-name {
  font-size: 13px;
  color: #cdd6f4;
  margin-bottom: 2px;
}

.user-list-dist {
  font-size: 11px;
  color: #585b70;
}

.user-list-empty {
  text-align: center;
  padding: 40px 20px;
  color: #585b70;
  font-size: 14px;
}

/* stat-item 可点击提示 */
.stat-item[data-clickable] {
  cursor: pointer;
}

.stat-item[data-clickable]:active {
  opacity: 0.7;
}

/* ═══════════════════════════════════════════════════════════
   UI/UX Polish — Page Transitions, Animations, and Effects
   ═══════════════════════════════════════════════════════════ */

/* ── Page Transition ───────────────────────────────────── */
.page.fade-out {
  animation: pageOut 0.3s ease forwards;
}

.page.fade-in {
  animation: pageIn 0.3s ease forwards;
}

@keyframes pageOut {
  to { opacity: 0; transform: scale(0.96); }
}

@keyframes pageIn {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: scale(1); }
}

/* ── Title Shimmer ─────────────────────────────────────── */
.auth-title.shimmer {
  background-size: 200% 100%;
  animation: shimmer 2s ease-in-out 1;
}

@keyframes shimmer {
  0% { background-position: 200% center; }
  100% { background-position: 0% center; }
}

/* ── Enter Button Loading ──────────────────────────────── */
.btn-primary.loading {
  animation: btn-pulse 1.5s ease-in-out infinite;
  cursor: wait;
}

@keyframes btn-pulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(137, 180, 250, 0.3); }
  50%      { box-shadow: 0 4px 36px rgba(137, 180, 250, 0.6); }
}

.btn-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #0f0f1a;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ── Nickname Cursor Blink ─────────────────────────────── */
.nickname-cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: #89b4fa;
  margin-left: 2px;
  vertical-align: text-bottom;
  animation: cursor-blink 0.5s step-end 2;
  opacity: 0;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

/* ── Create Type Indicator ─────────────────────────────── */
.create-type-indicator {
  position: absolute;
  bottom: 0;
  height: 2px;
  background: #89b4fa;
  border-radius: 1px;
  transition: left 0.2s ease, width 0.2s ease;
}

.create-content.crossfade {
  animation: crossfade 0.2s ease;
}

@keyframes crossfade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── TTS Toggle ──────────────────────────────────────────── */
.tts-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(137, 180, 250, 0.06);
  border: 1px solid rgba(137, 180, 250, 0.12);
  cursor: pointer;
  color: #89b4fa;
  font-size: 14px;
  font-weight: 500;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.2s, border-color 0.2s;
}
.tts-toggle:hover {
  background: rgba(137, 180, 250, 0.1);
  border-color: rgba(137, 180, 250, 0.25);
}
.tts-toggle input[type="checkbox"] {
  accent-color: #89b4fa;
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

/* ── TTS Voice Tags ──────────────────────────────────────── */
.tts-voice-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tts-voice-tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 14px;
  border: 1px solid rgba(137, 180, 250, 0.15);
  background: rgba(137, 180, 250, 0.05);
  color: #bac2de;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.tts-voice-tag:active {
  background: rgba(137, 180, 250, 0.12);
}
.tts-voice-tag.active {
  background: rgba(137, 180, 250, 0.2);
  border-color: rgba(137, 180, 250, 0.45);
  color: #89b4fa;
  font-weight: 600;
}

/* ── Bottle Skeleton Loading ───────────────────────────── */
.bottle-skeleton {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}

.bottle-skeleton-icon {
  font-size: 48px;
  animation: bottle-float 1.5s ease-in-out infinite;
  margin-bottom: 16px;
}

@keyframes bottle-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

.bottle-skeleton-line {
  height: 14px;
  width: 80%;
  background: rgba(137, 180, 250, 0.08);
  border-radius: 7px;
  margin-bottom: 8px;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.bottle-skeleton-line:nth-child(2) { width: 70%; animation-delay: 0.15s; }
.bottle-skeleton-line:nth-child(3) { width: 50%; animation-delay: 0.3s; }
.bottle-skeleton-line:nth-child(4) { width: 60%; animation-delay: 0.45s; }

.bottle-skeleton-text {
  color: #585b70;
  font-size: 13px;
  margin-top: 8px;
}

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.3; }
}

/* ── Bottle Text Reveal ────────────────────────────────── */
.bottle-text-reveal {
  position: relative;
}

.bottle-text-reveal::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(249, 226, 175, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.bottle-text-word {
  display: inline;
  opacity: 0;
  animation: wordFadeIn 0.03s forwards;
}

@keyframes wordFadeIn {
  to { opacity: 1; }
}

/* ── Timer Urgency Pulse ───────────────────────────────── */
.bottle-timer.urgent {
  color: #f38ba8;
  animation: urgent-pulse 0.8s ease-in-out infinite;
}

@keyframes urgent-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(1.03); }
}

/* ── Auth Permission Card Description ──────────────────── */
.auth-perm-desc {
  font-size: 9px;
  color: #585b70;
  text-align: center;
  line-height: 1.3;
  margin-top: 0;
}

/* ── Notification Overlay ──────────────────────────── */
.notification-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: flex-end;
}

.notification-sheet {
  background: #181825;
  border-radius: 20px 20px 0 0;
  max-height: 70vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px 12px;
  color: #cdd6f4;
  font-size: 16px;
  font-weight: 500;
  flex-shrink: 0;
}

.notification-body {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px 24px;
}

.notification-item {
  background: #313244;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity 0.2s;
}

.notification-item:active {
  opacity: 0.7;
}

.notification-item.unread {
  border-left: 3px solid #89b4fa;
}

.notification-item .notification-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.notification-item .notification-info {
  flex: 1;
  min-width: 0;
}

.notification-item .notification-title {
  font-size: 13px;
  color: #cdd6f4;
  margin-bottom: 2px;
}

.notification-item .notification-time {
  font-size: 11px;
  color: #585b70;
}

/* ── Notification Action Buttons ─────────────────── */
.notification-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.notif-action-btn {
  flex: 1;
  padding: 10px 0;
  border: 1px solid rgba(137, 180, 250, 0.3);
  border-radius: 10px;
  background: rgba(137, 180, 250, 0.08);
  color: #89b4fa;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.notif-action-btn:active {
  background: rgba(137, 180, 250, 0.18);
}

.notif-action-danger {
  border-color: rgba(243, 139, 168, 0.3);
  background: rgba(243, 139, 168, 0.08);
  color: #f38ba8;
}

.notif-action-danger:active {
  background: rgba(243, 139, 168, 0.18);
}

.notification-empty {
  text-align: center;
  padding: 40px 20px;
  color: #585b70;
  font-size: 14px;
}

/* ── Notification Badge ────────────────────────────── */
#notification-badge.has-unread {
  color: #f38ba8;
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.6; }
}

/* ── Bottle Reply Section ──────────────────────────── */
.bottle-reply-section {
  padding: 16px 20px;
  margin: 0 20px 12px;
  background: rgba(49, 50, 68, 0.5);
  border: 1px solid rgba(137, 180, 250, 0.15);
  border-radius: 12px;
}

.bottle-reply-header {
  font-size: 13px;
  color: #6c7086;
  margin-bottom: 10px;
}

.bottle-reply-content {
  font-size: 15px;
  color: #cdd6f4;
  padding: 12px;
  background: #313244;
  border-radius: 8px;
  margin-bottom: 10px;
  word-break: break-word;
  line-height: 1.5;
}

.bottle-reply-input-area {
  display: flex;
  gap: 8px;
}

.bottle-reply-input {
  flex: 1;
  background: #313244;
  border: 1px solid #45475a;
  border-radius: 8px;
  padding: 10px 12px;
  color: #cdd6f4;
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s;
}

.bottle-reply-input:focus {
  border-color: #89b4fa;
}

.bottle-reply-input::placeholder {
  color: #585b70;
}

.bottle-reply-send {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #89b4fa, #74c7ec);
  color: #0f0f1a;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  font-family: inherit;
  transition: opacity 0.2s;
}

.bottle-reply-send:active {
  opacity: 0.8;
}

.bottle-reply-send:disabled {
  opacity: 0.5;
}

/* ── Voice Recorder ──────────────────────────────────── */
.voice-recorder {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  gap: 12px;
}

.vr-mic-icon {
  font-size: 48px;
  opacity: 0.8;
}

.vr-status {
  font-size: 14px;
  color: #a6adc8;
}

.vr-timer {
  font-size: 28px;
  font-weight: 600;
  color: #cdd6f4;
  font-variant-numeric: tabular-nums;
}

.vr-record-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid rgba(243, 139, 168, 0.6);
  background: rgba(243, 139, 168, 0.15);
  color: #f38ba8;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  user-select: none;
  -webkit-user-select: none;
}

.vr-record-btn:active {
  transform: scale(0.95);
}

.vr-record-btn.recording {
  border-color: #f38ba8;
  background: rgba(243, 139, 168, 0.3);
  animation: rec-pulse 1.5s infinite;
}

@keyframes rec-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(243, 139, 168, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(243, 139, 168, 0); }
}

.vr-hint {
  font-size: 12px;
  color: #585b70;
}

/* ── Expiry Selector ────────────────────────────────── */
.expiry-selector {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
}

.expiry-label {
  font-size: 11px;
  color: #6c7086;
  letter-spacing: 1px;
}

.expiry-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.expiry-tag {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 14px;
  border: 1px solid rgba(137, 180, 250, 0.15);
  background: rgba(137, 180, 250, 0.05);
  color: #bac2de;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.expiry-tag:active {
  background: rgba(137, 180, 250, 0.12);
}

.expiry-tag.active {
  background: rgba(137, 180, 250, 0.2);
  border-color: rgba(137, 180, 250, 0.45);
  color: #89b4fa;
  font-weight: 600;
}

/* ── PWA 安装引导 ──────────────────────────────── */

.pwa-install-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(15, 15, 26, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.pwa-install-overlay-show {
  opacity: 1;
}

.pwa-install-card {
  background: #1e1e2e;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 420px;
  padding: 0 0 env(safe-area-inset-bottom, 16px) 0;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pwa-install-card-show {
  transform: translateY(0);
}

.pwa-install-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 4px;
}

.pwa-install-title {
  font-size: 17px;
  font-weight: 600;
  color: #cdd6f4;
}

.pwa-install-close {
  background: none;
  border: none;
  color: #6c7086;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  transition: background 0.15s;
}

.pwa-install-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.pwa-install-body {
  padding: 12px 20px 20px;
}

.pwa-install-desc {
  font-size: 14px;
  color: #a6adc8;
  margin: 0;
  text-align: center;
}

.pwa-install-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pwa-install-step {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #cdd6f4;
}

.pwa-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(137, 180, 250, 0.15);
  color: #89b4fa;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.pwa-step-icon {
  display: inline-flex;
  align-items: center;
  color: #89b4fa;
}

.pwa-install-footer {
  padding: 0 20px 20px;
}

.pwa-install-btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: #cdd6f4;
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s;
}

.pwa-install-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.pwa-install-btn-primary {
  background: linear-gradient(135deg, #89b4fa, #cba6f7);
  color: #1e1e2e;
  box-shadow: 0 4px 20px rgba(137, 180, 250, 0.3);
}

.pwa-install-btn-primary:hover {
  background: linear-gradient(135deg, #96c0fb, #d3b2f8);
}

/* ── Scene Containers ──────────────────────────────────── */
.scene-container {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

/* ── Island Scene ──────────────────────────────────────── */
.scene-island-bg {
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.35) 100%), url('/images/island.jpg') center/cover no-repeat;
  position: relative;
  overflow: hidden;
}
.island-sun {
  position: absolute;
  top: 8px; right: 20px;
  width: 50px; height: 50px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF8DC, #FFD700, #FFA500);
  box-shadow: 0 0 30px rgba(255,215,0,0.5), 0 0 80px rgba(255,200,0,0.25);
  animation: island-sun-glow 3s ease-in-out infinite;
}
@keyframes island-sun-glow {
  0%, 100% { box-shadow: 0 0 30px rgba(255,215,0,0.5), 0 0 80px rgba(255,200,0,0.25); transform: scale(1); }
  50% { box-shadow: 0 0 50px rgba(255,215,0,0.8), 0 0 120px rgba(255,200,0,0.4); transform: scale(1.12); }
}
.island-cloud {
  position: absolute;
  background: rgba(255,255,255,0.45);
  border-radius: 20px;
  box-shadow: 0 0 10px rgba(255,255,255,0.15);
}
.island-cloud.c1 { top: 15px; left: 5%; width: 80px; height: 24px; animation: cloud-drift 18s linear infinite; }
.island-cloud.c2 { top: 30px; left: 50%; width: 60px; height: 18px; animation: cloud-drift 22s linear infinite; animation-delay: 5s; }
@keyframes cloud-drift {
  from { transform: translateX(0); }
  to { transform: translateX(60px); }
}
.island-bird { position: absolute; font-size: 18px; animation: bird-fly 6s ease-in-out infinite; }
.island-bird.b1 { top: 18px; left: 20%; }
.island-bird.b2 { top: 10px; left: 55%; animation-delay: 3s; }
@keyframes bird-fly {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(30px, -10px); }
  75% { transform: translate(-30px, -8px); }
}
.island-tree { position: absolute; bottom: 18%; font-size: 20px; animation: tree-sway 3.5s ease-in-out infinite; transform-origin: bottom center; }
.island-tree.t1 { left: 6%; }
.island-tree.t2 { right: 8%; animation-delay: 1.5s; }
@keyframes tree-sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}
.island-wave { position: absolute; left: 0; right: 0; height: 3px; background: rgba(255,255,255,0.2); animation: wave-drift 3s ease-in-out infinite; }
.island-wave.w1 { top: 55%; }
.island-wave.w2 { top: 62%; animation-delay: 1s; }
.island-wave.w3 { top: 70%; animation-delay: 2s; }
@keyframes wave-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(15px); }
}
.island-beach {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 18%;
  background: linear-gradient(180deg, #E8D5A3, #D4B896, #C4A882);
}

/* ── Universe Scene ────────────────────────────────────── */
.scene-universe-bg {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.2) 100%), url('/images/universe.jpg') center/cover no-repeat;
  position: relative; overflow: hidden;
}
.universe-stars {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 66.67%;
  overflow: hidden;
}
.universe-nebula {
  position: absolute;
  top: 25%; right: 15%;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(203,166,247,0.1), transparent);
  box-shadow: 0 0 40px rgba(203,166,247,0.05);
  animation: nebula-pulse 6s ease-in-out infinite;
}
@keyframes nebula-pulse {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}
.star {
  position: absolute;
  border-radius: 50%;
  background: white;
  animation: star-twinkle 3s ease-in-out infinite;
}
@keyframes star-twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

.shooting-star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 0 3px 1px rgba(200,220,255,0.8);
  pointer-events: none;
  z-index: 5;
  animation: shooting-star-fly linear forwards;
}
.shooting-star::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 2px;
  transform: translateY(-50%);
  width: 60px;
  height: 1px;
  background: linear-gradient(270deg, transparent, rgba(255,255,255,0.8) 80%);
  border-radius: 1px;
}
.shooting-star-wrap {
  position: absolute;
  pointer-events: none;
  z-index: 5;
}
@keyframes shooting-star-fly {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  8% {
    opacity: 1;
  }
  70% {
    opacity: 0.5;
  }
  100% {
    opacity: 0;
    transform: translateX(-500px);
  }
}

/* ── Desert Scene ──────────────────────────────────────── */
.scene-desert-bg {
  width: 100%; height: 100%;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%), url('/images/desert.jpg') center/cover no-repeat;
  position: relative; overflow: hidden;
}
.desert-sun {
  position: absolute;
  top: 8px; right: 18px;
  width: 55px; height: 55px;
  border-radius: 50%;
  background: radial-gradient(circle, #FFF8DC, #FFD700, #FF8C00);
  box-shadow: 0 0 40px rgba(255,140,0,0.5), 0 0 100px rgba(255,100,0,0.25);
  animation: desert-sun-pulse 2.5s ease-in-out infinite;
}
@keyframes desert-sun-pulse {
  0%, 100% { box-shadow: 0 0 40px rgba(255,140,0,0.5), 0 0 100px rgba(255,100,0,0.25); transform: scale(1); }
  50% { box-shadow: 0 0 60px rgba(255,140,0,0.8), 0 0 140px rgba(255,100,0,0.4); transform: scale(1.15); }
}
.desert-dune {
  position: absolute; left: 0; right: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.08);
}
.desert-dune.d1 { bottom: 40%; height: 30px; }
.desert-dune.d2 { bottom: 30%; height: 25px; }
.desert-dune.d3 { bottom: 20%; height: 20px; }
.desert-heat {
  position: absolute;
  top: 40%; left: 0; right: 0;
  height: 100px;
  background: linear-gradient(180deg, transparent, rgba(249,226,175,0.12), transparent);
  animation: heat-shimmer 3s ease-in-out infinite;
}
@keyframes heat-shimmer {
  0%, 100% { opacity: 0.4; transform: scaleY(0.9); }
  50% { opacity: 1; transform: scaleY(1.1); }
}
.desert-cactus { position: absolute; bottom: 35%; font-size: 26px; animation: cactus-sway 4s ease-in-out infinite; transform-origin: bottom center; }
.desert-cactus.c1 { left: 15%; }
.desert-cactus.c2 { right: 25%; animation-delay: 1.5s; }
@keyframes cactus-sway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
.desert-animal { position: absolute; bottom: 25%; right: 15%; font-size: 22px; animation: lizard-crawl 10s ease-in-out infinite; }
@keyframes lizard-crawl {
  0%, 100% { transform: translate(0, 0); }
  15% { transform: translate(-20px, -4px); }
  30% { transform: translate(-40px, -1px); }
  50% { transform: translate(-15px, -6px); }
  65% { transform: translate(-45px, -2px); }
  80% { transform: translate(-25px, -4px); }
}

/* Island sparkle particles */
.island-sparkle {
  position: absolute;
  width: 3px; height: 3px;
  background: #FFF8DC;
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  animation: sparkle-fade 2s ease-in-out infinite;
}
@keyframes sparkle-fade {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50% { opacity: 0.9; transform: scale(1.2); }
}

/* Desert dust particles */
.desert-dust {
  position: absolute;
  width: 3px; height: 3px;
  background: rgba(249,226,175,0.8);
  border-radius: 50%;
  pointer-events: none;
  z-index: 2;
  animation: dust-float 6s linear infinite;
}
@keyframes dust-float {
  0% { opacity: 0; transform: translate(0, 0); }
  10% { opacity: 0.7; }
  90% { opacity: 0.2; }
  100% { opacity: 0; transform: translate(-50px, -60px); }
}

/* ── Canvas Markers ────────────────────────────────────── */
.canvas-bottle-marker {
  transition: transform 0.2s;
}
.canvas-bottle-marker:hover {
  transform: scale(1.3);
}
.canvas-user-dot {
  transition: transform 0.2s;
}

/* ── World Select Page ─────────────────────────────────── */
.ws-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 16px;
}
.ws-title {
  font-size: 22px;
  font-weight: bold;
  color: #cdd6f4;
  margin-bottom: 4px;
}
.ws-subtitle {
  font-size: 12px;
  color: #6c7086;
  margin-bottom: 20px;
}
.ws-cards {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}
.ws-card {
  width: 200px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  transition: all 0.3s ease;
  cursor: pointer;
  background: rgba(30,30,46,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  position: relative;
}
.ws-card-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}
.ws-card-body {
  padding: 12px 14px 14px;
  text-align: center;
}
.ws-card-name {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 20px rgba(0,0,0,0.5);
  white-space: nowrap;
  pointer-events: none;
  z-index: 1;
}
.ws-card-desc {
  font-size: 11px;
  color: #9399b2;
  line-height: 1.4;
  margin-bottom: 4px;
}
.ws-card-range {
  font-size: 10px;
  color: #6c7086;
}

/* Side cards — smaller, dimmer */
.ws-card-left,
.ws-card-right {
  transform: scale(0.82);
  opacity: 0.55;
  pointer-events: auto;
}

/* Center card — prominent */
.ws-card-center {
  transform: scale(1.05);
  opacity: 1;
  z-index: 2;
}

/* Card slide-in animations */
.ws-anim-from-right {
  animation: ws-slide-from-right 0.3s ease both;
}
.ws-anim-from-left {
  animation: ws-slide-from-left 0.3s ease both;
}
@keyframes ws-slide-from-right {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ws-slide-from-left {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}
.ws-enter-btn {
  margin-top: 20px;
  max-width: 300px;
}
.ws-hint {
  font-size: 11px;
  color: #585b70;
  margin-top: 8px;
}

/* ── World Switcher ────────────────────────────────────── */
.world-switcher {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(49,50,68,0.6);
  border: none;
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  color: #cdd6f4;
  white-space: nowrap;
}
.world-switch-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.world-switch-panel {
  background: rgba(30,30,46,0.97);
  border-radius: 16px;
  padding: 20px;
  max-width: 280px;
  width: 90%;
}
.world-switch-title {
  text-align: center;
  font-size: 15px;
  color: #cdd6f4;
  margin-bottom: 14px;
}
.world-switch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.world-switch-item {
  background: rgba(49,50,68,0.6);
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  border: 1px solid transparent;
}
.world-switch-item.active {
  /* border and shadow set inline via style attr */
}
.world-switch-item-img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
}
.world-switch-item-name {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 14px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 0 16px rgba(0,0,0,0.5);
  pointer-events: none;
}
