/* Portrait moments share the table's warm velvet, parchment and aged gold. */
html:has(.player-presence-overlay), body:has(> .player-presence-overlay) { overflow:hidden; }
.player-presence-button { width:auto; min-height:36px; padding:7px 13px; margin:0; border:1px solid #b99d6b66; border-radius:13px; color:#ead6ad; background:linear-gradient(#423039,#281e27); font:14px 'EB Garamond',Georgia,serif; box-shadow:inset 0 1px #fff1; }
.player-presence-button:focus-visible,.player-presence-overlay button:focus-visible,.presence-arrival button:focus-visible { outline:2px solid #e6c78c; outline-offset:3px; }
.player-presence-button:disabled { opacity:.5; cursor:default; }
.player-row > .player-presence-button { margin-left:auto; flex-shrink:0; }
.presence-guest-switch { display:flex; align-items:center; gap:14px; margin:0 0 22px; color:#c8b596; font:15px 'EB Garamond',Georgia,serif; }
.presence-guest-switch button { width:38px; min-height:38px; margin:0; padding:0; border:1px solid #b99d6b66; border-radius:12px; background:#30252f; color:#ead6ad; font:26px Georgia,serif; }
.player-presence-overlay { position:fixed; inset:0; z-index:32000; display:grid; place-items:center; padding:20px; background:#0d0a10d9; backdrop-filter:blur(9px); overflow:auto; box-sizing:border-box; }
.presence-card { width:min(760px,100%); max-height:calc(100dvh - 40px); overflow:auto; border:1px solid #b99d6b66; border-radius:25px; color:#ebdeca; background:radial-gradient(ellipse at 5% 0%,#65434d44,transparent 65%),linear-gradient(145deg,#291e29,#17131c); box-shadow:0 25px 90px #0009,inset 0 1px #f9e5b814; box-sizing:border-box; }
.presence-card { scrollbar-width:thin; scrollbar-color:#ad8e5b77 transparent; }
.presence-card > header { display:flex; align-items:flex-start; gap:18px; justify-content:space-between; padding:25px 28px 18px; border-bottom:1px solid #b99d6b33; }
.presence-eyebrow { display:block; color:#c8af83; font:10px Cinzel,Georgia,serif; letter-spacing:.16em; line-height:1.6; margin:0 0 9px; }
.presence-card h2 { font:clamp(23px,4vw,34px) Cinzel,Georgia,serif; color:#e9d6ab; margin:0; overflow-wrap:anywhere; }
.presence-close,.presence-arrival-dismiss { flex-shrink:0; width:42px; min-height:42px; margin:0; padding:0; border:1px solid #b99d6b66; border-radius:50%; background:#1d1622; color:#e9d6ab; font:26px Georgia,serif; }
.presence-layout { display:grid; grid-template-columns:minmax(0,1.15fr) minmax(0,1fr); align-items:center; gap:26px; padding:22px 28px 28px; }
.presence-portrait { height:400px; position:relative; border-radius:45% 45% 20px 20px; background:radial-gradient(ellipse at 50% 40%,#89705e2e,transparent 70%); overflow:hidden; }
.presence-portrait::after { content:''; position:absolute; inset:8px; border:1px solid #b99d6b29; border-radius:inherit; pointer-events:none; }
.presence-portrait img { width:100%; height:100%; object-fit:contain; filter:drop-shadow(0 12px 15px #0008); }
.presence-view-switch { display:flex; justify-content:center; gap:7px; margin-top:10px; }
.presence-view-switch button { min-height:42px; width:auto; padding:9px 16px; margin:0; border:1px solid #b99d6b55; border-radius:13px; background:#30252f; color:#e4d5bb; font:16px 'EB Garamond',Georgia,serif; }
.presence-view-switch button[aria-pressed=true] { background:linear-gradient(#785554,#573e46); border-color:#c1a478aa; }
.presence-story h3 { font:25px/1.35 Cinzel,Georgia,serif; margin:0 0 28px; color:#e8d4ab; }
.presence-badge { display:flex; align-items:flex-start; gap:14px; border-top:1px solid #b99d6b33; padding-top:22px; }
.presence-badge .profile-medallion { flex-shrink:0; margin:0; width:50px; height:50px; }
.presence-badge strong { display:block; font:22px/1.2 'EB Garamond',Georgia,serif; color:#eddbb8; }
.presence-badge p,.presence-unwritten,.presence-note { font:18px/1.45 'EB Garamond',Georgia,serif; color:#cdbfae; }
.presence-badge p { margin:8px 0 0; }
.presence-note { margin-top:30px; font-style:italic; font-size:16px; color:#b6a38b; }
.presence-arrival { position:fixed; z-index:18000; right:22px; bottom:22px; width:min(390px,calc(100vw - 32px)); display:grid; grid-template-columns:106px minmax(0,1fr); gap:12px; padding:17px 40px 17px 12px; box-sizing:border-box; border:1px solid #b99d6b77; border-radius:22px; color:#e9d9bd; background:radial-gradient(ellipse at top left,#5a3c4a,#241b27 85%); box-shadow:0 12px 45px #0009,inset 0 1px #fff1; animation:presence-arrives .4s ease-out; }
.presence-arrival > img { width:106px; height:155px; object-fit:contain; align-self:center; filter:drop-shadow(0 5px 8px #0008); }
.presence-arrival-copy { min-width:0; align-self:center; }
.presence-arrival-copy > strong { display:block; font:22px/1.2 Cinzel,Georgia,serif; overflow-wrap:anywhere; }
.presence-arrival-copy > span { display:block; margin-top:7px; font:16px/1.2 'EB Garamond',Georgia,serif; color:#d1bfa2; }
.presence-arrival-copy > .presence-arrival-badge { color:#e3c78f; font-style:italic; }
.presence-arrival-copy > button { min-height:36px; width:auto; margin:12px 0 0; padding:6px 11px; border:1px solid #b99d6b66; border-radius:11px; background:#503841; color:#f0dfbf; font:15px 'EB Garamond',Georgia,serif; }
.presence-arrival .presence-arrival-dismiss { position:absolute; top:9px; right:9px; min-height:30px; height:30px; width:30px; font-size:20px; }
@keyframes presence-arrives { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@media(max-width:560px) {
  .player-row > .player-presence-button { padding:7px 9px; font-size:13px; }
  .presence-guest-switch { justify-content:center; }
  .player-presence-overlay { padding:10px; }
  .presence-card { max-height:calc(100dvh - 20px); border-radius:20px; }
  .presence-card > header { padding:20px 18px 14px; }
  .presence-layout { grid-template-columns:1fr; gap:22px; padding:16px 22px 24px; }
  .presence-portrait { height:290px; max-width:290px; margin:auto; }
  .presence-story { text-align:center; }
  .presence-story h3 { font-size:22px; margin-bottom:20px; }
  .presence-badge { text-align:left; }
  .presence-arrival { right:16px; bottom:16px; grid-template-columns:80px minmax(0,1fr); }
  .presence-arrival > img { width:80px; height:136px; }
}
@media(prefers-reduced-motion:reduce) { .presence-arrival { animation:none; } }
