body[data-guest-mode="1"] .guest-readonly-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.guest-readonly-banner__copy {
  display: grid;
  gap: 3px;
}

.guest-readonly-banner__copy small {
  color: var(--muted);
  font-size: .8rem;
}

.guest-safety-warning {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid rgba(220, 38, 38, .26);
  border-left: 4px solid #dc2626;
  border-radius: 18px;
  color: #7f1d1d;
  background: linear-gradient(135deg, rgba(254, 242, 242, .98), rgba(255, 247, 237, .96));
  box-shadow: 0 14px 38px rgba(127, 29, 29, .1);
}

.guest-safety-warning[hidden] { display: none; }
.guest-safety-warning__icon { display:grid;place-items:center;width:46px;height:46px;border-radius:14px;color:#fff;background:linear-gradient(135deg,#dc2626,#f97316); }
.guest-safety-warning__icon svg { width: 23px; height: 23px; }
.guest-safety-warning__copy { display: grid; gap: 5px; }
.guest-safety-warning__copy strong { font-size: 1rem; }
.guest-safety-warning__copy p { margin: 0; color: #7f1d1d; font-size: .86rem; line-height: 1.5; }
.guest-safety-warning__copy small { color: #9f3d2d; }
.guest-safety-warning__copy a { color: #991b1b; font-weight: 800; }
.guest-safety-warning__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; max-width: 360px; }
.guest-safety-warning__actions .btn { justify-content: center; text-align: center; }

.guest-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(5, 12, 28, .72);
  backdrop-filter: blur(8px);
}

.guest-auth-modal[hidden] { display: none; }

.guest-auth-modal__card {
  position: relative;
  width: min(500px, 100%);
  padding: 28px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 28px 80px rgba(2, 6, 23, .35);
}

.guest-auth-modal__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 14px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.guest-auth-modal__icon svg { width: 24px; height: 24px; }
.guest-auth-modal h2 { margin: 0 42px 8px 0; font-size: clamp(1.35rem, 4vw, 1.75rem); }
.guest-auth-modal p { margin: 0; color: var(--muted); line-height: 1.55; }

.guest-auth-modal__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 22px;
}

.guest-auth-modal__actions .btn { min-height: 46px; justify-content: center; }
.guest-auth-modal__note { display: block; margin-top: 13px; color: var(--muted); text-align: center; font-size: .76rem; }

.guest-auth-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: var(--cloud);
  font-size: 1.35rem;
  cursor: pointer;
}

body.guest-auth-open { overflow: hidden; }

/* The far side of the sign-in hand-off: what happened to the favourites the
   visitor asked to keep, and the one action that follows from it. */
.fav-transfer {
  position: fixed;
  z-index: 1200;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: grid;
  gap: 12px;
  width: min(440px, calc(100vw - 28px));
  padding: 16px 18px;
  border: 1px solid rgba(148, 163, 184, .28);
  border-left: 4px solid var(--accent);
  border-radius: 16px;
  background: var(--card);
  box-shadow: 0 22px 60px rgba(2, 6, 23, .3);
}

.fav-transfer--error { border-left-color: #b45309; }
.fav-transfer__copy { margin: 0; font: 700 .9rem/1.45 var(--font-body); }

.fav-transfer__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fav-transfer__actions .btn { justify-content: center; }

@media (max-width: 620px) {
  .guest-readonly-banner { align-items: stretch; flex-direction: column; }
  .guest-readonly-banner .btn { width: 100%; justify-content: center; min-height: 44px; }
  .guest-auth-modal { align-items: end; padding: 0; }
  .guest-auth-modal__card {
    width: 100%;
    max-height: min(92dvh, 720px);
    overflow-y: auto;
    padding: 24px 18px max(22px, env(safe-area-inset-bottom));
    border-radius: 22px 22px 0 0;
  }
  .guest-auth-modal__actions { grid-template-columns: 1fr; }
  .guest-safety-warning { grid-template-columns: auto 1fr; align-items: start; padding: 16px; }
  .guest-safety-warning__actions { grid-column: 1 / -1; display: grid; width: 100%; max-width: none; }
  .guest-safety-warning__actions .btn { width: 100%; min-height: 44px; }
}
