:root {
  --bg: #f6f3ee;
  --surface: #fffdfa;
  --surface-2: #fbf7f1;
  --text: #2b2622;
  --muted: #8c8175;
  --line: #eae2d7;
  --accent: #b45309;
  --accent-strong: #92400e;
  --accent-soft: #fdf1e3;
  --green: #15803d;
  --green-soft: #e8f5ec;
  --red: #b91c1c;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(70, 45, 20, 0.05), 0 18px 40px -28px rgba(70, 45, 20, 0.35);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

a {
  color: var(--accent);
}

.hidden {
  display: none !important;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(246, 243, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
  color: inherit;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 13px;
  color: var(--muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.conn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cbbfae;
}

.conn.is-online .conn-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

.conn.is-offline .conn-dot {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

.topbar-countdown {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid #f2ddc4;
  padding: 4px 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.me {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.me-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.me-text strong {
  font-size: 13px;
}

.me-text span {
  font-size: 11px;
  color: var(--muted);
}

/* ---------- avatars ---------- */

.avatar {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  overflow: hidden;
  background: linear-gradient(135deg, #e9d8bd, #d9be93);
  color: #6b4a1d;
  font-weight: 800;
  flex: none;
  user-select: none;
}

.avatar::after {
  content: attr(data-initial);
  font-size: 15px;
  line-height: 1;
}

.avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-sm {
  width: 30px;
  height: 30px;
}

.avatar-sm::after {
  font-size: 12px;
}

.avatar-md {
  width: 40px;
  height: 40px;
}

.avatar-lg {
  width: 48px;
  height: 48px;
}

.avatar-lg::after {
  font-size: 18px;
}

/* ---------- layout ---------- */

main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 72px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero {
  background:
    radial-gradient(1200px 400px at 0% -20%, rgba(180, 83, 9, 0.12), transparent 60%),
    var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 34px 32px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: 0.01em;
  line-height: 1.15;
}

.hero-desc {
  margin: 12px 0 0;
  color: #5f564c;
  max-width: 54ch;
}

.countdown {
  display: flex;
  gap: 12px;
  margin-top: 22px;
}

.cd-cell {
  min-width: 74px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 8px;
  text-align: center;
}

.cd-cell strong {
  display: block;
  font-size: 30px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
}

.cd-cell span {
  font-size: 12px;
  color: var(--muted);
}

.hero-ended {
  margin: 18px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: var(--accent-strong);
}

.hero-stats {
  display: grid;
  gap: 12px;
  min-width: 220px;
}

.stat {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-label {
  font-size: 12px;
  color: var(--muted);
}

.stat strong {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
}

/* ---------- panels ---------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel-head h2 {
  margin: 0;
  font-size: 20px;
}

.panel-note {
  font-size: 13px;
  color: var(--muted);
}

.panel-note strong {
  color: var(--text);
}

.login-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  border: 1px dashed #e3cba7;
  background: linear-gradient(135deg, #fdf6ea, #fffdfa);
}

.login-banner h2 {
  margin: 0 0 2px;
  font-size: 18px;
}

/* ---------- people ---------- */

.people {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.person {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
}

.person-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.person-text strong {
  font-size: 13px;
  font-weight: 700;
}

.person-text span {
  font-size: 11px;
  color: var(--muted);
}

.presence {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #cfc4b4;
  margin-left: 2px;
}

.person.is-online .presence {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16);
}

.empty {
  color: var(--muted);
  font-size: 14px;
  margin: 0;
}

/* ---------- rooms ---------- */

.rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.room-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.room-card.is-mine {
  border-color: #e0a458;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.room-card.is-winner {
  border-color: #d8b36a;
  box-shadow: 0 0 0 3px #fdf3dd;
}

.room-card.is-reserved {
  opacity: 0.82;
}

.room-media {
  position: relative;
  aspect-ratio: 3 / 2;
  background: #ece4d8;
  overflow: hidden;
}

.room-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  transition: transform 0.35s ease;
}

.room-card:hover .room-media img {
  transform: scale(1.03);
}

.is-reserved .room-media img {
  filter: grayscale(0.65);
}

.room-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
}

.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(43, 38, 34, 0.72);
  color: #fff;
  backdrop-filter: blur(4px);
}

.badge-reserved {
  background: rgba(185, 28, 28, 0.85);
}

.gallery-btn {
  position: absolute;
  right: 10px;
  bottom: 10px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gallery-btn:hover {
  background: #fff;
}

.room-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.room-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.room-name {
  margin: 0;
  font-size: 17px;
  line-height: 1.35;
}

.room-state {
  flex: none;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface-2);
}

.is-mine .room-state {
  color: var(--accent-strong);
  border-color: #f0d3ad;
  background: var(--accent-soft);
}

.is-winner .room-state {
  color: #92600a;
  border-color: #eed9a8;
  background: #fdf3dd;
}

.room-desc {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.seats-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}

.seats {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.seat {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px 6px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}

.seat.is-mine {
  background: var(--accent-soft);
  border-color: #ecc79b;
}

.seat-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
  flex: 1;
}

.seat-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  min-width: 0;
}

.seat-email {
  font-size: 10.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-amount {
  font-size: 14px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--accent-strong);
  flex: none;
}

.seat-tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--accent-strong);
  background: #fff;
  border: 1px solid #f0d3ad;
  border-radius: 999px;
  padding: 0 6px;
  line-height: 1.6;
}

.seat-tag.lowest {
  color: var(--red);
  border-color: #f1c1c1;
  background: #fdf3f3;
}

.seat-empty {
  justify-content: center;
  color: var(--muted);
  border-style: dashed;
  font-size: 12px;
  background: transparent;
}

.bid-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
}

.field input,
.field select {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-variant-numeric: tabular-nums;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: #d9a660;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input:disabled,
.field select:disabled {
  background: #f4efe7;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.05s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--muted);
}

.btn-ghost:hover {
  border-color: #d8c9b4;
  color: var(--text);
}

.bid-quick,
.bid-button {
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  padding: 10px 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.bid-quick {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

.bid-quick:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.bid-quick:disabled {
  background: #d8cdbd;
  border-color: #d8cdbd;
  cursor: not-allowed;
}

.bid-button {
  border: 1px solid #e3c9a4;
  background: #fff;
  color: var(--accent-strong);
}

.bid-button:hover:not(:disabled) {
  background: var(--accent-soft);
}

.bid-button:disabled {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--muted);
  cursor: not-allowed;
}

.form-hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  min-height: 18px;
}

.history {
  font-size: 13px;
}

.history summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  user-select: none;
}

.history-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  flex-wrap: wrap;
}

.history-list .tag {
  font-weight: 800;
  color: var(--accent-strong);
}

.history-list .tag.release {
  color: var(--red);
}

.history-list .tag.raise {
  color: #1d4ed8;
}

.history-list time {
  font-variant-numeric: tabular-nums;
}

.history-list .who {
  color: var(--text);
  font-weight: 600;
}

/* ---------- split ---------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.split-card {
  position: relative;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.split-pct {
  font-size: 30px;
  font-weight: 900;
  color: var(--accent);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.split-card h3 {
  margin: 0;
  font-size: 15px;
}

.split-card strong {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

/* ---------- floor plan ---------- */

.floorplan-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  cursor: zoom-in;
}

.floorplan-button img {
  width: 100%;
  height: auto;
}

/* ---------- rules ---------- */

.rules {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #4d453c;
}

.rules strong {
  color: var(--accent-strong);
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 22px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- dialogs ---------- */

.swal-note {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: #8c8175;
}

.swal2-popup {
  font-family: var(--font);
  border-radius: var(--radius);
}

.swal2-title {
  font-size: 20px !important;
}

.swal2-html-container {
  font-size: 14px !important;
}

/* ---------- toasts ---------- */

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(92vw, 380px);
}

.toast {
  background: #2b2622;
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 14px 34px -18px rgba(0, 0, 0, 0.6);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-success {
  background: var(--green);
}

.toast-error {
  background: var(--red);
}

/* ---------- lightbox ---------- */

.lightbox {
  border: none;
  padding: 0;
  background: transparent;
  max-width: none;
  max-height: none;
}

.lightbox::backdrop {
  background: rgba(25, 20, 15, 0.82);
}

.lightbox-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 78vh;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  background: #fff;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lightbox-bar button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.lightbox-bar button:hover {
  background: rgba(255, 255, 255, 0.24);
}

.lightbox-bar span {
  color: #fff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  min-width: 52px;
  text-align: center;
}

#lb-close {
  position: absolute;
  top: -52px;
  right: 0;
  width: 38px;
  height: 38px;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 26px 22px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    min-width: 0;
    gap: 10px;
  }
}

@media (max-width: 560px) {
  .topbar-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px max(14px, env(safe-area-inset-left)) 10px max(14px, env(safe-area-inset-right));
  }

  .brand-sub {
    display: none;
  }

  .topbar-right {
    justify-content: space-between;
    gap: 8px;
  }

  .topbar-countdown,
  .me-text span {
    display: none;
  }

  .conn {
    font-size: 11px;
  }

  main {
    padding: 14px max(12px, env(safe-area-inset-left)) calc(48px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-right));
    gap: 14px;
  }

  .panel {
    padding: 16px 14px;
    border-radius: var(--radius);
  }

  .panel-head {
    margin-bottom: 12px;
  }

  .panel-head h2 {
    font-size: 18px;
  }

  .hero {
    padding: 20px 16px;
    border-radius: var(--radius);
    gap: 18px;
  }

  .eyebrow {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero-desc {
    font-size: 13.5px;
    margin-top: 8px;
  }

  .countdown {
    gap: 8px;
    margin-top: 16px;
  }

  .cd-cell {
    min-width: 0;
    flex: 1;
    padding: 8px 4px;
    border-radius: 12px;
  }

  .cd-cell strong {
    font-size: 22px;
  }

  .cd-cell span {
    font-size: 11px;
  }

  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .stat {
    padding: 10px;
    border-radius: 12px;
  }

  .stat-label {
    font-size: 11px;
  }

  .stat strong {
    font-size: 16px;
  }

  .login-banner {
    padding: 16px 14px;
    gap: 12px;
  }

  .login-banner h2 {
    font-size: 16px;
  }

  .login-banner .btn {
    width: 100%;
    min-height: 46px;
  }

  .people {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .person {
    padding: 5px 10px 5px 5px;
    gap: 8px;
    min-width: 0;
  }

  .avatar-md {
    width: 34px;
    height: 34px;
  }

  .person-text {
    min-width: 0;
  }

  .person-text strong {
    font-size: 12.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .person-text span {
    font-size: 10.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .presence {
    margin-left: 0;
  }

  .rooms {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .room-media {
    aspect-ratio: 16 / 10;
  }

  .room-body {
    padding: 14px;
    gap: 12px;
  }

  .room-name {
    font-size: 16px;
  }

  .room-desc {
    font-size: 12.5px;
  }

  .seat {
    padding: 6px 8px 6px 6px;
    gap: 7px;
  }

  .seat-amount {
    font-size: 13.5px;
  }

  .bid-form {
    grid-template-columns: 1.3fr 1fr;
    align-items: stretch;
  }

  .bid-form .field {
    grid-column: 1 / -1;
  }

  .field {
    font-size: 11.5px;
  }

  .field input {
    font-size: 16px;
    padding: 11px 12px;
  }

  .bid-quick,
  .bid-button {
    font-size: 14px;
    min-height: 46px;
    padding: 0 10px;
    width: 100%;
  }

  .form-hint {
    font-size: 11.5px;
  }

  .history summary {
    font-size: 12px;
    padding: 4px 0;
  }

  .history-list li {
    font-size: 11.5px;
    padding: 6px 8px;
    gap: 6px;
  }

  .split {
    gap: 10px;
  }

  .split-card {
    padding: 14px;
  }

  .split-pct {
    font-size: 26px;
  }

  .rules {
    font-size: 13.5px;
    gap: 6px;
    padding-left: 20px;
  }

  .footer {
    padding: 18px;
    font-size: 11px;
  }

  .toasts {
    left: 12px;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    max-width: none;
  }

  .toast {
    font-size: 12.5px;
  }

  .lightbox img {
    max-width: 94vw;
    max-height: 72vh;
  }

  #lb-close {
    top: auto;
    bottom: -54px;
    right: 0;
  }
}
