.guest-entry {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 18px;
  border-color: rgba(111, 190, 255, .2);
  background:
    radial-gradient(ellipse at 96% 5%, rgba(71, 186, 255, .14), transparent 36%),
    linear-gradient(135deg, rgba(27, 51, 78, .94), var(--card-bg, #151e2b) 72%);
}
.guest-entry::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 18px;
  left: 18px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(107, 206, 255, .85), transparent);
  content: "";
}
.guest-entry::after {
  position: absolute;
  z-index: -1;
  top: 15px;
  right: 15px;
  width: 84px;
  height: 48px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 56' fill='none'%3E%3Cpath d='M5 43h90M15 41c2-16 15-29 35-29s33 13 35 29' stroke='%2378d3ff' stroke-width='2' stroke-linecap='round'/%3E%3Cpath d='M22 40v-9m56 9v-9' stroke='%2378d3ff' stroke-width='2' stroke-linecap='round' opacity='.65'/%3E%3Ccircle cx='50' cy='12' r='3' fill='%2378d3ff'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .72;
  animation: guest-route-float 5s ease-in-out infinite;
  content: "";
  pointer-events: none;
}
.guest-entry > b {
  display: block;
  max-width: calc(100% - 82px);
  font-size: 16px;
  letter-spacing: -.02em;
}
.guest-entry > p {
  max-width: calc(100% - 100px);
  margin: 8px 0 16px;
  line-height: 1.45;
}
.guest-entry .btn {
  position: relative;
  min-height: 50px;
  height: 52px;
  margin: 0;
  border-radius: 16px;
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
.guest-entry .btn::after {
  margin-left: 2px;
  content: "↗";
  font-size: 18px;
  font-weight: 500;
  transition: transform .18s ease;
}
.guest-entry .btn:hover::after { transform: translate(2px, -2px); }

.guest-dialog {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 12px max(12px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-right, 0px));
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #f3f7fd;
  opacity: 0;
  transition: opacity .24s ease;
}
.guest-dialog[open] { opacity: 0; }
.guest-dialog.is-open { opacity: 1; }
.guest-dialog::backdrop {
  background: rgba(3, 8, 19, .76);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .24s ease;
}
.guest-dialog.is-open::backdrop { opacity: 1; }
.guest-panel {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 480px);
  max-height: min(91dvh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(153, 188, 226, .16);
  border-radius: 28px;
  padding: 10px 20px 22px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(51, 135, 204, .16), transparent 40%),
    linear-gradient(155deg, #172538 0%, #111a29 62%, #101827 100%);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .48), inset 0 1px rgba(255, 255, 255, .035);
  color: #f3f7fd;
  transform: translateY(28px) scale(.985);
  opacity: 0;
  transition: transform .28s cubic-bezier(.2, .9, .25, 1), opacity .22s ease;
  scrollbar-width: none;
}
.guest-panel::-webkit-scrollbar { display: none; }
.guest-dialog.is-open .guest-panel { transform: translateY(0) scale(1); opacity: 1; }
.guest-grabber {
  display: block;
  width: 38px;
  height: 4px;
  margin: 0 auto 17px;
  border-radius: 4px;
  background: rgba(207, 221, 239, .3);
}
.guest-header {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 12px;
}
.guest-emblem {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(113, 199, 255, .25);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(67, 151, 225, .24), rgba(28, 67, 111, .16));
  box-shadow: inset 0 1px rgba(255, 255, 255, .07), 0 8px 22px rgba(28, 115, 189, .12);
  color: #83d5ff;
}
.guest-emblem svg { display: block; width: 29px; height: 29px; }
.guest-brand { min-width: 0; }
.guest-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #91a6bf;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.4;
  text-transform: uppercase;
}
.guest-beta {
  padding: 2px 6px;
  border: 1px solid rgba(106, 192, 255, .22);
  border-radius: 999px;
  background: rgba(70, 157, 231, .12);
  color: #8bd4ff;
  font-size: 9px;
  letter-spacing: .06em;
}
.guest-dialog h2 {
  margin: 2px 0 0;
  color: #f4f8ff;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.2;
}
.guest-close {
  display: grid;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(175, 198, 226, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .045);
  color: #d2dfed;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}
.guest-close svg { width: 18px; height: 18px; }
.guest-close:hover { background: rgba(255, 255, 255, .09); }
.guest-close:active { transform: scale(.94); }
.guest-lead {
  margin: 15px 0 0;
  color: #afbed0;
  font-size: 14px;
  line-height: 1.5;
}
.guest-status {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(140, 173, 207, .12);
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  color: #c9d8e8;
  font-size: 13px;
  line-height: 1.4;
}
.guest-status[hidden] { display: none; }
.guest-status[data-tone="error"] {
  border-color: rgba(255, 114, 125, .2);
  background: rgba(198, 55, 71, .1);
  color: #ffadb4;
}
.guest-status[data-tone="success"] {
  border-color: rgba(91, 211, 157, .2);
  background: rgba(35, 145, 99, .1);
  color: #9ce9c6;
}
.guest-content {
  display: grid;
  gap: 12px;
  margin-top: 17px;
}
.guest-content > * { animation: guest-enter .28s cubic-bezier(.2, .8, .2, 1) both; }
.guest-content > :nth-child(2) { animation-delay: 35ms; }
.guest-content > :nth-child(3) { animation-delay: 70ms; }
.guest-content p { margin: 0; color: #b4c3d4; font-size: 13px; line-height: 1.5; }
.guest-offer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  border: 1px solid rgba(123, 178, 224, .13);
  border-radius: 18px;
  background: rgba(7, 15, 27, .28);
}
.guest-offer-stat {
  position: relative;
  display: flex;
  min-height: 78px;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  padding: 11px 15px;
}
.guest-offer-stat + .guest-offer-stat { border-left: 1px solid rgba(144, 178, 212, .13); }
.guest-offer-stat strong {
  color: #eaf6ff;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.035em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.guest-offer-stat span { color: #92a8c0; font-size: 11px; line-height: 1.35; }
.guest-note {
  padding: 12px 13px;
  border-left: 2px solid rgba(82, 183, 255, .65);
  border-radius: 0 12px 12px 0;
  background: rgba(62, 131, 191, .08);
  color: #b8c8d9 !important;
}
.guest-note--muted { border-color: rgba(155, 174, 197, .3); background: rgba(255, 255, 255, .035); }
.guest-note--eligibility { border-color: rgba(255, 188, 97, .58); background: rgba(181, 121, 44, .08); }
.guest-action {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0;
  padding: 0 18px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 700;
  transition: transform .16s ease, filter .16s ease, opacity .16s ease;
}
.guest-action:hover:not(:disabled) { filter: brightness(1.08); }
.guest-action:active:not(:disabled) { transform: scale(.985); }
.guest-action--secondary {
  border: 1px solid rgba(163, 190, 220, .17) !important;
  background: rgba(255, 255, 255, .055) !important;
  box-shadow: none !important;
  color: #dbe8f6 !important;
}
.guest-action--danger {
  border: 1px solid rgba(255, 110, 123, .2) !important;
  background: rgba(192, 56, 73, .09) !important;
  box-shadow: none !important;
  color: #ff9ca7 !important;
}
.guest-action:disabled { cursor: wait; opacity: .72; }
.guest-action[aria-busy="true"]::after {
  position: absolute;
  right: 18px;
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: guest-spin .7s linear infinite;
  content: "";
}
.guest-pass-item {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 14px;
  border: 1px solid rgba(138, 171, 205, .15);
  border-radius: 17px;
  background: rgba(8, 17, 29, .3);
}
.guest-pass-item p { color: #91a6bc; font-size: 12px; }
.guest-pass-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 7px;
  color: #d5e3f1;
  font-size: 13px;
  font-weight: 650;
}
.guest-pass-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #86a0b9;
  content: "";
}
.guest-pass-status--active::before { background: #58d49a; box-shadow: 0 0 10px rgba(88, 212, 154, .48); }
.guest-pass-status--provisioning::before { background: #70c8ff; animation: guest-pulse 1.3s ease-in-out infinite; }
.guest-pass-status--failed::before, .guest-pass-status--revoked::before { background: #ff7885; }
.guest-state-card {
  display: grid;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(126, 178, 224, .15);
  border-radius: 17px;
  background: rgba(9, 18, 31, .32);
}
.guest-state-card p { color: #96abc1; font-size: 12px; }
.guest-loading { display: grid; gap: 12px; }
.guest-skeleton-line {
  position: relative;
  height: 16px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(149, 177, 207, .1);
}
.guest-skeleton-line::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(185, 217, 246, .13), transparent);
  transform: translateX(-100%);
  animation: guest-shimmer 1.45s ease-in-out infinite;
  content: "";
}
.guest-skeleton-line--wide { width: 100%; height: 74px; border-radius: 17px; }
.guest-skeleton-line--short { width: 68%; }
.guest-dialog button:focus-visible, .guest-entry button:focus-visible {
  outline: 3px solid #8bd5ff;
  outline-offset: 3px;
}

@keyframes guest-enter { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes guest-route-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes guest-shimmer { to { transform: translateX(100%); } }
@keyframes guest-spin { to { transform: rotate(360deg); } }
@keyframes guest-pulse { 50% { opacity: .42; transform: scale(.82); } }

@media (min-width: 600px) {
  .guest-dialog { align-items: center; padding: 24px; }
  .guest-panel { max-height: min(88dvh, 760px); padding-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .guest-entry::after, .guest-content > *, .guest-skeleton-line::after,
  .guest-pass-status--provisioning::before, .guest-action[aria-busy="true"]::after { animation: none; }
  .guest-dialog, .guest-dialog::backdrop, .guest-panel, .guest-close, .guest-action, .guest-entry .btn { transition: none; }
}

/* Quiet guest pass motion and match referral tile to the existing card system. */
.guest-entry {
  overflow: hidden;
  padding: 16px;
  border-color: var(--card-br);
  background: var(--card-bg);
}
.guest-entry::before,
.guest-entry::after {
  display: none;
  animation: none;
  content: none;
}
.guest-entry > b,
.guest-entry > p { max-width: none; }
.guest-entry > p { margin: 8px 0 14px; }
.guest-entry .btn {
  min-height: 56px;
  height: 56px;
  margin: 0;
  border-radius: var(--radius-btn);
  transition: transform .1s;
}
.guest-entry .btn::after { display: none; content: none; }

.guest-dialog { transition: opacity .24s cubic-bezier(.22, .8, .2, 1); }
.guest-dialog::backdrop { transition: opacity .24s cubic-bezier(.22, .8, .2, 1); }
.guest-panel {
  transform: translateY(18px);
  transition: transform .24s cubic-bezier(.22, .8, .2, 1), opacity .18s ease-out;
}
.guest-dialog.is-open .guest-panel { transform: translateY(0); }
.guest-content > *,
.guest-content > :nth-child(2),
.guest-content > :nth-child(3) { animation: none; animation-delay: 0s; }
.guest-pass-status--provisioning::before { animation: none; }
.guest-action { transition: transform .12s ease; }
.guest-action:hover:not(:disabled) { filter: none; }
.guest-state-card--active { border-color: rgba(88, 212, 154, .2); }
.guest-state-title {
  color: #f3f7fd;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}
.guest-state-card--active .guest-state-title { color: #c4efd8; }
.guest-state-copy { color: #aebed0 !important; }

@media (prefers-reduced-motion: reduce) {
  .guest-dialog, .guest-dialog::backdrop, .guest-panel, .guest-action,
  .guest-entry .btn { transition: none; }
}
/* Shared sheet motion: stable entry, complete exit, and reduced-motion support. */
.ov { transition: opacity .18s ease-out; }
.sheet { transform: translate3d(0, 105%, 0); transition: transform .36s cubic-bezier(.22, .88, .24, 1); }
.sheet.on { transform: translate3d(0, 0, 0); }
.bottomsheet-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; animation-duration: .2s; }
.bottomsheet-panel { animation-duration: .32s; animation-timing-function: cubic-bezier(.22, .9, .25, 1); }
@keyframes bottomsheet-rise { from { transform: translate3d(0, 100%, 0); } to { transform: translate3d(0, 0, 0); } }
.guest-dialog[open] { opacity: 1; transition: none; animation: bv-guest-dialog-in .2s ease-out both; }
.guest-dialog[open]::backdrop { opacity: 1; background: rgba(3, 8, 19, .72); backdrop-filter: none; -webkit-backdrop-filter: none; transition: none; animation: bv-guest-backdrop-in .2s ease-out both; }
.guest-panel { transform: translateY(0) scale(1); opacity: 1; transition: none; animation: bv-guest-panel-in .28s cubic-bezier(.22, .9, .25, 1) both; }
.guest-dialog.is-closing { opacity: 0; animation: bv-guest-dialog-out .22s ease-in both; }
.guest-dialog.is-closing::backdrop { opacity: 0; animation: bv-guest-backdrop-out .22s ease-in both; }
.guest-dialog.is-closing .guest-panel { transform: translateY(24px) scale(.99); opacity: 0; animation: bv-guest-panel-out .22s ease-in both; }
@keyframes bv-guest-dialog-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bv-guest-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes bv-guest-panel-in { from { transform: translateY(28px) scale(.985); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes bv-guest-dialog-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes bv-guest-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
@keyframes bv-guest-panel-out { from { transform: translateY(0) scale(1); opacity: 1; } to { transform: translateY(24px) scale(.99); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .ov, .sheet, .bottomsheet-backdrop, .bottomsheet-panel,
  .guest-dialog[open], .guest-dialog[open]::backdrop, .guest-panel,
  .guest-dialog.is-closing, .guest-dialog.is-closing::backdrop, .guest-dialog.is-closing .guest-panel { animation: none !important; transition: none !important; }
  .sheet { transform: none; }
}
