/* rejoin-1130: "Return to your game" (home card, auto prompt banner, mid-game drop veil). Same glass + gold system as theme.css:
   frosted navy glass, brass trim, 3D press buttons, Fredoka display type. Think of the brass "Reserved" plate a casino host
   leaves on your chair: calm, one gold action, your piece on its pedestal. Animations are transform/opacity only and stop
   under prefers-reduced-motion. Taps are 44 px or more. */

/* ---------------------------------------------------------------- home card (first thing in #joinBox, both panes) */
#joinBox > .rj-home { order: -1; }
.rj-home { position: relative; margin: 0 0 18px; padding: 14px 14px 12px; border-radius: 18px;
  background: var(--glass2b) padding-box, linear-gradient(135deg, #fff1b8 0%, #e9b23c 30%, #8a5a12 60%, #ffd76a 100%) border-box; border: 2px solid transparent;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .45), 0 0 26px rgba(255, 200, 80, .18), inset 0 1px 0 rgba(255, 255, 255, .1);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); animation: rjIn .45s cubic-bezier(.2, 1.2, .4, 1) both; }
.rj-home.hidden { display: none; }
.rj-head { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; }
.rj-bix { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 35%, #3a4a9a, #141b40 70%) padding-box, var(--trim) border-box; border: 2px solid transparent; box-shadow: 0 4px 10px rgba(0, 0, 0, .4); }
.rj-bix img { width: 40px; height: auto; }
.rj-title { margin: 0; font: 700 20px/1.15 var(--font-display); color: var(--gold2); letter-spacing: .02em; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); }
.rj-sub { margin: 2px 0 0; font: 700 13.5px/1.3 Nunito, system-ui, sans-serif; color: #dfe4f7; }
.rj-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rj-game { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px;
  background: rgba(6, 9, 26, .62); box-shadow: inset 0 0 0 1.5px rgba(255, 214, 120, .28), inset 0 2px 6px rgba(0, 0, 0, .35); }
.rj-ped { position: relative; flex: none; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 60%), radial-gradient(circle, #222c5e, #0f1536); box-shadow: 0 0 0 3px var(--pc, #f2b632), 0 0 14px color-mix(in srgb, var(--pc, #f2b632) 55%, transparent), 0 4px 8px rgba(0, 0, 0, .45); }
.rj-ped img { width: 50px; height: 50px; object-fit: contain; filter: drop-shadow(0 3px 2px rgba(0, 0, 0, .45)); }
.rj-info { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rj-code { display: flex; align-items: baseline; gap: 8px; }
.rj-tlabel { font: 700 11.5px var(--font-display); letter-spacing: .16em; text-transform: uppercase; color: #ffd76a; }
.rj-code b { font: 700 24px/1 var(--font-display); letter-spacing: .14em; color: var(--gold3); text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.rj-meta { font: 700 13.5px/1.3 Nunito, system-ui, sans-serif; color: #dfe4f7; overflow-wrap: anywhere; }
.rj-chips { display: flex; flex-wrap: wrap; gap: 5px 6px; margin-top: 2px; }
.rj-chip { display: inline-flex; align-items: center; min-height: 24px; padding: 2px 9px; border-radius: 8px; font: 700 12.5px/1.2 Nunito, system-ui, sans-serif; color: #e4e7f6; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 214, 120, .22); }
.rj-board { gap: 4px; padding-left: 6px; } .rj-board svg { width: 14px; height: 14px; color: #ffd76a; flex: none; }
.rj-vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }   /* "On" for screen readers; the pin says it */
.rj-chip.rj-st.you { color: #3d2400; background: linear-gradient(180deg, #fff3b0, #f2b632); box-shadow: 0 1px 0 #8a5a12; }
.rj-chip.rj-st.wait { color: #bfefff; background: rgba(60, 170, 210, .16); box-shadow: inset 0 0 0 1px rgba(142, 230, 245, .35); }
.rj-chip.rj-st.them { color: var(--gold3); }
.rj-go { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; min-width: 132px; padding: 10px 18px; font-size: 18px; }
.rj-go svg { width: 22px; height: 22px; flex: none; }
.rj-go.busy, .rj-drop-btn.busy { filter: saturate(.7) brightness(.92); }

/* phone: the Rejoin button gets its own full-width row under the table details */
@media (max-width: 560px) {
  .rj-home { padding: 12px 10px 10px; margin-bottom: 14px; }
  .rj-game { grid-template-columns: auto 1fr; gap: 10px 12px; padding: 10px; }
  .rj-game .rj-go { grid-column: 1 / -1; width: 100%; }
  .rj-ped { width: 52px; height: 52px; } .rj-ped img { width: 44px; height: 44px; }
  .rj-code b { font-size: 22px; }
  .rj-meta { font-size: 13px; }
}

/* ---------------------------------------------------------------- auto prompt banner (bottom, thumb reach) */
.rj-banner { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 4800; width: min(520px, calc(100% - 20px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 10px; border-radius: 18px;
  background: var(--glass) padding-box, var(--trim) border-box; border: 2px solid transparent; box-shadow: 0 14px 34px rgba(0, 0, 0, .55), 0 0 24px rgba(255, 200, 80, .22);
  -webkit-backdrop-filter: blur(14px) saturate(1.25); backdrop-filter: blur(14px) saturate(1.25); animation: rjUp .4s cubic-bezier(.2, 1.2, .4, 1) both; }
.rj-banner.hidden, body:not([data-screen="home"]) .rj-banner { display: none; }
.rj-banner .rj-ped { width: 44px; height: 44px; box-shadow: 0 0 0 2.5px var(--pc, #f2b632), 0 3px 6px rgba(0, 0, 0, .45); }
.rj-banner .rj-ped img { width: 38px; height: 38px; }
.rj-btext { flex: 1; min-width: 0; margin: 0; font: 700 15px/1.25 var(--font-display); color: var(--ink); }
.rj-btext b { color: var(--gold3); letter-spacing: .1em; white-space: nowrap; }
.rj-banner .rj-go { min-width: 0; min-height: 46px; padding: 8px 14px; font-size: 16px; }
.rj-x { flex: none; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border-radius: 12px; }
.rj-x svg { width: 20px; height: 20px; }
@media (max-width: 380px) { .rj-btext { font-size: 14px; } .rj-banner .rj-go svg { display: none; } }

.rj-banner-on #home { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }   /* the page scrolls clear of the banner */

/* ---------------------------------------------------------------- mid-game drop veil (replaces the thin Reconnecting strip) */
.rj-drop { position: fixed; inset: 0; z-index: 7100; display: grid; place-items: center; padding: 56px 16px 16px;
  background: rgba(5, 8, 24, .74); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.rj-drop.hidden { display: none; }
html.rj-dropped .conn { display: none; }
.rj-drop-card { width: min(380px, 100%); }
.rj-drop-card h2.pv-title { margin: 0; }
.rj-drop-card .pv-why b { color: var(--gold3); letter-spacing: .1em; }
.rj-drop-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 54px; margin-top: 6px; padding: 12px 18px; font-size: 20px; }
.rj-drop-btn svg { width: 24px; height: 24px; flex: none; }
.rj-drop-msg { min-height: 1.3em; margin: 12px 0 0; font: 700 13.5px/1.3 Nunito, system-ui, sans-serif; color: #dfe4f7; }

@keyframes rjIn { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes rjUp { from { opacity: 0; transform: translate(-50%, 16px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .rj-home, .rj-banner, .rj-drop-card, .rj-bix img { animation: none !important; transition: none !important; } }
