/* BrainWhim Parlor Kit — shared look for every live game room. Matches the live chess room:
   glass header, glass game switcher, dark-glass pop-ups, glass side cards, flat hero board.
   Before sitting: the parlor photo, sharp.  After sitting: the same photo blurred behind.
   Phones and narrow tablets: the board fills the screen and a floating glass bar holds the menus.
   The page sets --pk-bg (photo) on <body>. Games draw only their own board inside .pk-stage. */
:root{
  --navy:#1A2744; --whim:#7EB6D9; --gold:#d4af37;
  --pk-hdr:80px;           /* header height (measured from chess) */
  --pk-sw:65px;            /* game switcher row (pill + spacing) */
  --pk-side:260px;         /* side card width on desktop */
  --pk-bar:64px;           /* floating bar height on phones */
  --pk-glass:rgba(255,255,255,.08);
  --pk-glass-line:rgba(255,255,255,.1);
  --pk-dark:rgba(15,23,42,.72);
  --pk-btn:rgba(255,255,255,.05);
  --pk-btn-line:rgba(255,255,255,.15);
}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%}
html{background:#1c2430}   /* dark from the first paint, so a room never flashes white while it loads (Oct 24) */
body.pk{font-family:Montserrat,system-ui,sans-serif;color:#fff;background:#1c2430;min-height:100dvh;overflow-x:hidden}
body.pk::before{content:"";position:fixed;inset:0;z-index:0;background:var(--pk-bg,none) center 58%/cover no-repeat;transition:filter .5s,transform .5s}
body.pk.seated::before{filter:blur(3px) saturate(.9) brightness(.6);transform:scale(1.08)}   /* lighter room blur (Oct 29, Judy: option D; C was 6px, the original 18px, saturate .7, brightness .55) */

/* ---------- glass header (same as chess) ---------- */
.pk header{position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 40px;height:var(--pk-hdr);
  background:rgba(15,23,42,.45);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border-bottom:1px solid rgba(255,255,255,.12)}
.pk .brand{display:flex;align-items:center;color:#fff;text-decoration:none;font-size:26px}
.pk .brand img{width:64px;height:64px;object-fit:contain;margin-right:-8px}
.pk .whim{font-family:Pacifico,cursive;color:var(--whim);font-size:1em;line-height:1;font-weight:400}
.pk .hdr{display:flex;align-items:center;gap:16px}
.pk .hdr a{color:#fff;font-weight:700;font-size:15px;text-decoration:none}

/* ---------- game switcher (glass rectangle) ---------- */
.pk-room{position:relative;z-index:1;display:flow-root;min-height:calc(100dvh - var(--pk-hdr))}
.pk-games{position:relative;z-index:3;display:flex;width:max-content;max-width:calc(100% - 32px);margin:14px auto 0;padding:8px 24px;gap:20px;overflow-x:auto;scrollbar-width:none;
  background:linear-gradient(rgba(10,16,30,.5),rgba(10,16,30,.42));backdrop-filter:blur(16px) saturate(1.2);-webkit-backdrop-filter:blur(16px) saturate(1.2);border:1px solid rgba(255,255,255,.2);border-radius:12px;box-shadow:0 4px 24px rgba(0,0,0,.22)}   /* dark frosted pill: white names read on sunlit rooms (Nov 20) */
.pk-games::-webkit-scrollbar{display:none}
.pk-games a{flex:0 0 auto;color:#fff;font-weight:700;font-size:15px;line-height:17px;letter-spacing:.45px;text-decoration:none;padding:7px 12px;border-radius:6px;text-shadow:0 2px 4px rgba(0,0,0,.4);white-space:nowrap;border:1px solid transparent}
.pk-games a:hover{background:rgba(255,255,255,.1)}
.pk-games a.on{background:rgba(255,255,255,.18);border-color:rgba(255,255,255,.45);box-shadow:inset 0 1px 0 rgba(255,255,255,.25);padding:7px 16px}

/* ---------- before sitting: a slim invitation under the switcher ---------- */
.pk-intro{position:relative;z-index:2;display:flex;justify-content:center;padding:0 16px;margin-top:14px}
body.pk.seated .pk-intro{display:none}
.pk-introcard{width:auto;max-width:100%;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:8px 8px 8px 24px;border-radius:12px;
  background:rgba(255,255,255,.12);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid rgba(255,255,255,.25);box-shadow:0 4px 30px rgba(0,0,0,.05)}
.pk-introtxt{min-width:0;text-align:left}
.pk-introtxt .pk-tag{white-space:nowrap}
.pk-tag{margin:0;font-size:15px;font-weight:600;letter-spacing:.3px;color:#fff;text-shadow:0 2px 4px rgba(0,0,0,.4)}
.pk-introcard .pk-btn{width:auto;white-space:nowrap;padding:8px 20px;min-height:0;border-radius:6px;background:rgba(15,23,42,.72);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.2);box-shadow:0 2px 10px rgba(0,0,0,.25);color:#e6c25a;font-size:15px;font-weight:700;letter-spacing:.45px;line-height:17px;text-shadow:0 1px 3px rgba(0,0,0,.45)}
.pk-introcard .pk-btn:hover{background:rgba(15,23,42,.85);color:#f0d27a}

/* ---------- buttons: glass, rounded rectangles (never pills) ---------- */
.pk-btn{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:32px;padding:10px 12px;border-radius:8px;
  background:var(--pk-btn);color:rgba(255,255,255,.85);border:1px solid var(--pk-btn-line);font:650 13px/1.2 Montserrat,system-ui,sans-serif;cursor:pointer;text-decoration:none;width:100%}
.pk-btn:hover{background:rgba(255,255,255,.14);color:#fff}
.pk-btn.primary{background:#1A2744;border-color:#1A2744;color:#fff}
.pk-btn.primary:hover{background:#25365f}
.pk-btn[disabled]{opacity:.5;cursor:default}

/* ---------- after sitting ---------- */
.pk-play{display:none;position:relative;z-index:1}
body.pk.seated .pk-play{display:grid;grid-template-columns:var(--pk-side) minmax(0,1fr) var(--pk-side);gap:18px;align-items:stretch;padding:20px 16px 20px;min-height:calc(100dvh - var(--pk-hdr) - var(--pk-sw))}
.pk-stage{min-width:0;display:flex;flex-direction:column;align-items:center;gap:10px}
.pk-side{height:0;min-height:100%;overflow:auto;scrollbar-width:none;display:flex;flex-direction:column;gap:16px;padding:20px 20px 32px;border-radius:12px;background:var(--pk-glass);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px);border:1px solid var(--pk-glass-line);box-shadow:0 16px 40px rgba(0,0,0,.22);color:rgba(255,255,255,.88)}
.pk-card{background:none;border:0;box-shadow:none;padding:0;color:inherit}
.pk-card h3{margin:0 0 8px;font-size:12px;letter-spacing:.08em;text-transform:uppercase;font-weight:700;color:rgba(255,255,255,.85)}
.pk-status{font-size:13px;font-weight:700;line-height:1.2;margin:0 0 6px;padding:8px 12px;border-radius:6px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.12);color:#fff;text-align:center}
.pk-sub{font-size:12px;opacity:.85;margin:0}
.pk-players{display:grid;gap:6px;margin-top:10px}
.pk-pl{display:flex;align-items:center;gap:8px;padding:7px 9px;border-radius:6px;background:rgba(255,255,255,.1);border:1px solid transparent;font-size:13px;font-weight:600}
.pk-pl.turn{background:rgba(255,255,255,.26);border-color:rgba(255,255,255,.55)}
.pk-pl .sw{width:16px;height:16px;border-radius:50%;flex:0 0 16px;box-shadow:0 1px 3px rgba(0,0,0,.4)}
.pk-pl .nm{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pk-pl .sc{font-size:15px;font-weight:700}
.pk-acct{font-size:13px;line-height:1.45}
.pk-acct .pk-btn{margin-top:8px;min-height:36px;font-size:12px}
.pk-actions{display:flex;flex-direction:column;gap:8px}
.pk-sets{display:flex;flex-direction:column;gap:6px}
.pk-set{display:flex;align-items:center;gap:8px;text-align:left;border:1px solid var(--pk-btn-line);background:var(--pk-btn);color:#fff;border-radius:6px;padding:8px 10px;font:600 14px Montserrat,system-ui,sans-serif;letter-spacing:.14px;cursor:pointer;width:100%}
.pk-set.on{background:#1A2744;border-color:#1A2744;color:#fff}
.pk-set.lock{opacity:.7}
.pk-set .dots{display:flex;gap:3px}
.pk-set .dots i{width:14px;height:14px;border-radius:50%;box-shadow:0 1px 2px rgba(0,0,0,.4)}
.pk-set small{display:block;font-weight:500;color:rgba(255,255,255,.62);font-size:11px;letter-spacing:.44px;font-style:italic;margin-top:2px}
.pk-set .nm{flex:1}
.pk-mini,.pk-bar,.pk-scrim{display:none}

/* ---------- phones & narrow tablets ---------- */
@media (max-width:999px){
  :root{--pk-hdr:56px;--pk-sw:0px}
  .pk header{padding:0 14px}
  .pk .brand{font-size:20px}.pk .brand img{width:46px;height:46px}
  .pk .hdr a{font-size:13px}.pk .hdr{gap:10px}
  body.pk.seated .hdr a:not(.up),body.pk.seated .pk-games{display:none}   /* the bar holds the menus while playing; the room's own section link (.up: Lobby, Cards or Puzzles) stays (Oct 24, Nov 20) */
  .pk-games{margin-top:10px}
  body.pk.seated .pk-play{display:block;padding:8px 8px calc(var(--pk-bar) + 18px + env(safe-area-inset-bottom));min-height:calc(100dvh - var(--pk-hdr))}
  .pk-stage{gap:10px;justify-content:center;min-height:calc(100dvh - var(--pk-hdr) - var(--pk-bar) - 34px - env(safe-area-inset-bottom))}
  .pk-mini{display:flex;gap:8px;width:var(--pk-size,100%);margin:0 auto}
  .pk-mini .pk-pl{flex:1;background:rgba(255,250,242,.2);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.3);padding:8px 10px}
  .pk-mini .pk-pl.turn{background:rgba(255,255,255,.4)}
  .pk-side{position:fixed;left:8px;right:8px;bottom:calc(var(--pk-bar) + 22px + env(safe-area-inset-bottom));z-index:60;height:auto;min-height:0;max-height:60dvh;overflow:auto;align-self:auto;padding:16px;transform:translateY(130%);visibility:hidden;transition:transform .25s,visibility .25s}
  .pk-side{background:rgba(15,23,42,.88)}
  body.pk.sheet-left .pk-left,body.pk.sheet-right .pk-right{transform:none;visibility:visible}
  .pk-room,.pk-play{z-index:auto}   /* no stacking context here, so the slide-up cards sit above the dimmer and take taps */
  .pk-scrim{display:block;position:fixed;inset:0;z-index:55;background:rgba(8,12,22,.45);opacity:0;pointer-events:none;transition:opacity .2s}
  body.pk.sheet-left .pk-scrim,body.pk.sheet-right .pk-scrim{opacity:1;pointer-events:auto}
  body.pk.seated .pk-bar{display:flex;position:fixed;left:8px;right:8px;bottom:calc(10px + env(safe-area-inset-bottom));height:var(--pk-bar);z-index:70;align-items:center;gap:8px;padding:8px;border-radius:18px;background:var(--pk-dark);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);border:1px solid rgba(255,255,255,.2);box-shadow:0 10px 30px rgba(0,0,0,.28)}
  .pk-bar .pk-btn{width:auto;min-height:44px;padding:0 16px}
  .pk-bar .pk-bstat{flex:1;min-width:0;text-align:center;font-weight:700;font-size:14px;color:#fff;line-height:1.15;overflow:hidden;cursor:pointer;background:none;border:0;font-family:inherit}
  .pk-bar .pk-bstat small{display:block;font-weight:600;font-size:11px;opacity:.75}
  }
@media (min-width:1000px) and (max-width:1180px){ :root{--pk-side:215px} body.pk.seated .pk-play{gap:14px;padding:16px 14px} }

/* ---------- pop-ups: dark glass, same as the chess "Take your seat" window ---------- */
.pk-veil{position:fixed;inset:0;z-index:100;display:none;align-items:center;justify-content:center;padding:16px;background:rgba(8,12,22,.45);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.pk-veil.on{display:flex}
.pk-modal{width:min(420px,94vw);max-height:84dvh;overflow:auto;padding:22px;border-radius:18px;background:var(--pk-dark);border:1px solid rgba(255,255,255,.18);box-shadow:0 24px 50px rgba(0,0,0,.4);color:#fff}
.pk-modal h2{margin:0 0 12px;text-align:center;font-size:21px}
.pk-modal p{margin:0 0 10px;font-size:14px;line-height:1.5;color:rgba(255,255,255,.9)}
.pk-modal ol,.pk-modal ul{margin:0 0 12px;padding-left:20px;font-size:14px;line-height:1.5;color:rgba(255,255,255,.9)}
.pk-modal li{margin:0 0 6px}
.pk-modal p.pk-kick{text-align:center;color:var(--gold);font-size:12px;margin:0 0 14px}
.pk-modal .pk-stack{display:flex;flex-direction:column;gap:12px}
.pk-modal .pk-btn{min-height:0;padding:12px 14px;border-radius:12px;background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.2);color:#fff;font-weight:700}
.pk-modal .pk-btn.quiet{background:transparent;color:rgba(255,255,255,.75)}
.pk-modal .pk-row{display:flex;gap:10px;margin-top:14px}
.pk-modal .pk-row .pk-btn{flex:1}
.pk-field{display:flex;gap:10px}
.pk-field input{flex:1;min-width:0;padding:12px;border-radius:12px;background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.2);color:#fff;font:400 13.33px Montserrat,system-ui,sans-serif;outline:0}
.pk-field input::placeholder{color:rgba(255,255,255,.6)}
.pk-field .pk-btn{width:auto;padding:12px 18px}
.pk-pts{text-align:center;font-weight:700}
.pk-pts.good{color:#8fe0a8}
@media (max-width:560px){ .pk .hdr a:not(.up){display:none} }
@media (max-width:760px){ .pk-introcard{width:100%;border-radius:12px;flex-direction:column;align-items:stretch;text-align:center;padding:14px} .pk-introtxt{text-align:center} .pk-introtxt .pk-tag{white-space:normal} .pk-tag span{display:block} .pk-introcard .pk-btn{width:100%;padding:10px 20px} }

/* ---------- menu groups, Switch Game list, first-visit hint ---------- */
.pk-menu{display:flex;flex-direction:column;gap:16px}
.pk-legal{margin:0;font-size:11.5px;text-align:center;opacity:.7}.pk-legal a{color:inherit;margin:0 5px;text-decoration:underline;text-underline-offset:2px}
.pk-group h3{margin:0 0 8px}
.pk-group.pk-phone{display:none}
.pk-menu .pk-sub{margin:0}
.pk-gamelist{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.pk-modal .pk-gamelist .pk-btn{padding:11px 10px}
.pk-modal .pk-gamelist .pk-btn.on{background:rgba(255,255,255,.22);border-color:rgba(255,255,255,.45);color:#e6c25a}
.pk-hint{display:none}
@media (max-width:999px){
  .pk-group.pk-phone{display:block}
  .pk-menu .pk-group h3{color:var(--gold);letter-spacing:.14em;font-size:11px}
  body.pk.seated .pk-hint.on{display:block;position:fixed;left:12px;bottom:calc(var(--pk-bar) + 24px + env(safe-area-inset-bottom));z-index:75;max-width:230px;padding:10px 14px;border-radius:12px;background:var(--pk-dark);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(212,175,55,.55);color:#fff;font-size:13px;font-weight:600;line-height:1.35;box-shadow:0 10px 24px rgba(0,0,0,.35);animation:pk-hint-in .3s ease-out}
  body.pk.seated .pk-hint.on::after{content:"";position:absolute;left:34px;bottom:-7px;width:12px;height:12px;background:inherit;border-right:1px solid rgba(212,175,55,.55);border-bottom:1px solid rgba(212,175,55,.55);transform:rotate(45deg)}
  .pk-bar .pk-btn.primary{padding:0 14px}
}
@keyframes pk-hint-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* ---------- flying pieces, level line, Sound & Motion window ---------- */
.pk-flyer{position:fixed;left:0;top:0;z-index:150;pointer-events:none;will-change:transform;display:flex;align-items:center;justify-content:center;filter:drop-shadow(0 12px 8px rgba(0,0,0,.3))}
.pk-flyer > *{width:100%;height:100%}
.pk-level{margin-top:10px;color:rgba(255,255,255,.75)}
.pk-modal p.pk-lvlnote{text-align:center;color:var(--gold);font-size:13px;margin:0 0 10px}
.pk-setrow{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:0 0 14px;font-size:14px;font-weight:600}
.pk-seg{display:flex;gap:6px}
.pk-modal .pk-seg .pk-btn{width:auto;min-width:84px;padding:9px 12px;border-radius:8px}
.pk-modal .pk-seg .pk-btn.sel{background:rgba(255,255,255,.22);border-color:rgba(255,255,255,.45);color:#e6c25a}
.pk-range{flex:1;max-width:190px;accent-color:#d4af37}
.pk-modal p.pk-setnote{font-size:12px;color:rgba(255,255,255,.65);margin:2px 0 6px}

/* desktop: the game switcher spans the same width as the room below it, edge to edge with the side cards */
@media (min-width:1000px){
  .pk-games{width:calc(100% - 32px);max-width:none;justify-content:space-evenly;gap:8px;padding:8px 12px}
}
@media (min-width:1000px) and (max-width:1180px){ .pk-games{width:calc(100% - 28px)} }
/* phones: the bar sits above the open menu so Menu can also close it */
@media (max-width:999px){ body.pk.seated .pk-bar{z-index:70} }

/* ---------- the "Tap for Whims" card (desktop: every room; phones: rooms with whim:true) ---------- */
/* bright frost (from the backgammon room, Oct 24) so it never looks flat on a dark room blur */
.pk-whim{display:block;width:100%;margin-top:auto;padding:16px;text-align:center;cursor:pointer;color:#fff;font-family:inherit;text-shadow:0 1px 3px rgba(0,0,0,.35);
  background:linear-gradient(180deg,rgba(255,255,255,.3),rgba(255,255,255,.16));border:1px solid rgba(255,255,255,.42);border-radius:12px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5),inset 0 -1px 0 rgba(255,255,255,.12),0 10px 28px rgba(0,0,0,.28);
  backdrop-filter:blur(26px) saturate(1.6) brightness(1.3);-webkit-backdrop-filter:blur(26px) saturate(1.6) brightness(1.3)}
.pk-whim:hover{background:linear-gradient(180deg,rgba(255,255,255,.38),rgba(255,255,255,.2))}
.pk-whim-label{display:block;margin:0 0 8px;font:400 16px Pacifico,cursive;letter-spacing:.2px;color:#a9d4ef}
.pk-whim-line{display:block;margin:0;font-size:13px;font-weight:500;line-height:1.5}
.pk-whim-m{display:none}
@media (max-width:999px){
  .pk-whim-desk{display:none}
  /* wide boards: the board and scores sit low near the bar; the Whim card is centered in the space above them */
  /* three equal gaps: header to Whim card, Whim card to the board group, board group to the bar */
  body.pk.pk-has-whim .pk-stage{justify-content:flex-start;padding:0}
  body.pk.pk-has-whim .pk-whim-m{display:block;width:var(--pk-size,100%);max-width:100%;margin:auto auto 0;padding:20px 16px}
  body.pk.pk-has-whim .pk-mini-top{margin-top:auto}
  body.pk.pk-has-whim .pk-mini-bot{margin-bottom:auto}
  body.pk.pk-has-whim .pk-whim-m .pk-whim-label{font-size:18px}
  body.pk.pk-has-whim .pk-whim-m .pk-whim-line{font-size:14px}
}
@media (max-width:999px) and (max-height:520px) and (orientation:landscape){ body.pk.pk-has-whim .pk-whim-m{display:none} }

.pk-info{margin-top:10px;color:rgba(255,255,255,.85);font-weight:600}
.pk-info:empty{display:none}

/* ---------- online table notes (Oct 24): "… is back at the table" ---------- */
.pk-modal p.pk-center{text-align:center}
.pk-toast{position:fixed;left:50%;top:84px;z-index:95;transform:translate(-50%,-12px);opacity:0;pointer-events:none;max-width:min(360px,90vw);padding:10px 16px;border-radius:12px;
  background:rgba(15,23,42,.82);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border:1px solid rgba(212,175,55,.55);color:#fff;font-size:13px;font-weight:600;text-align:center;
  box-shadow:0 10px 24px rgba(0,0,0,.35);transition:opacity .25s,transform .25s}
.pk-toast.on{opacity:1;transform:translate(-50%,0)}

/* ---------- desktop: a compact left card when the window is too short for it (Oct 24) ----------
   The kit measures the left card; if it doesn't fit, body gets pk-tight (then pk-tighter), so the Whim card
   stays in view at the bottom on shorter laptop screens instead of dropping below the fold. */
@media (min-width:1000px){
  body.pk.pk-tight .pk-left{gap:10px;padding:14px 16px 16px}
  body.pk.pk-tight .pk-left .pk-card h3{margin-bottom:6px}
  body.pk.pk-tight .pk-left .pk-status{padding:6px 10px;margin-bottom:4px}
  body.pk.pk-tight .pk-left .pk-players{gap:5px;margin-top:6px}
  body.pk.pk-tight .pk-left .pk-acct{font-size:12px;line-height:1.35}
  body.pk.pk-tight .pk-left .pk-acct .pk-btn{margin-top:6px;min-height:30px}
  body.pk.pk-tight .pk-left .pk-sets{gap:4px}
  body.pk.pk-tight .pk-left .pk-set{padding:6px 10px;font-size:13px}
  body.pk.pk-tight .pk-left .pk-set small{margin-top:0;font-size:10.5px}
  body.pk.pk-tight .pk-whim-desk{padding:10px 12px}
  body.pk.pk-tight .pk-whim-desk .pk-whim-label{margin-bottom:4px;font-size:15px}
  body.pk.pk-tight .pk-whim-desk .pk-whim-line{font-size:12px;line-height:1.4}
  body.pk.pk-tighter .pk-left{gap:8px;padding:12px 14px 12px}
  body.pk.pk-tighter .pk-left .pk-set small{display:none}
  body.pk.pk-tighter .pk-left .pk-set{padding:5px 10px}
  body.pk.pk-tighter .pk-left .pk-sub{font-size:11px}
  body.pk.pk-tighter .pk-left .pk-acct > div:not(.pk-me){display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  body.pk.pk-tighter .pk-whim-desk{padding:8px 12px}
  body.pk.pk-tighter .pk-whim-desk .pk-whim-label{margin-bottom:2px;font-size:14px}
}

/* ---------- "Your Chess game with judy is still open" under the invitation card (Oct 24) ---------- */
.pk-intro{flex-direction:column;align-items:center;gap:8px}
.pk-yours{display:flex;flex-direction:column;gap:6px;max-width:100%}
.pk-yours[hidden]{display:none}
.pk-yourline{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:6px 6px 6px 18px;border-radius:12px;
  background:rgba(15,23,42,.62);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid rgba(212,175,55,.55);box-shadow:0 6px 20px rgba(0,0,0,.25)}
.pk-yourtxt{margin:0;font-size:14px;font-weight:600;color:#fff}
.pk-yourtxt b{color:#e6c25a}
.pk-youracts{display:flex;gap:6px;flex:none}
.pk-yourline .pk-btn{width:auto;white-space:nowrap;padding:7px 14px;min-height:0;border-radius:6px;background:rgba(212,175,55,.16);border:1px solid rgba(212,175,55,.7);color:#f0d27a;font-size:13px;font-weight:700;text-decoration:none;margin:0}
.pk-yourline .pk-btn:hover{background:rgba(212,175,55,.28)}
.pk-yourline .pk-btn.quiet{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.25);color:rgba(255,255,255,.82)}
@media (max-width:760px){ .pk-yours{width:100%} .pk-yourline{flex-direction:column;align-items:stretch;text-align:center;padding:10px 12px;gap:8px} .pk-youracts .pk-btn{flex:1;padding:9px 12px} }

/* ---------- Guided Lesson: the coach card (Oct 24) ----------
   desktop: the first card in the right side panel; phones: a glass card floating at the top of the screen */
.pk-coach{border-radius:12px;padding:14px 16px;background:rgba(15,23,42,.78);border:1px solid rgba(212,175,55,.6);box-shadow:0 10px 26px rgba(0,0,0,.3);color:#fff;text-align:left}
.pk-coach[hidden]{display:none!important}
.pk-coachkick{margin:0 0 4px;font-size:11px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:#e6c25a}
.pk-coach h3{margin:0 0 6px;font-size:17px;font-weight:700;letter-spacing:0;text-transform:none;color:#fff}
.pk-coachtxt{font-size:13.5px;line-height:1.5;color:rgba(255,255,255,.92)}
.pk-coachtxt p{margin:0 0 6px}.pk-coachtxt p:last-child{margin:0}
.pk-coachtxt b{color:#f0d27a}
.pk-coachrow{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.pk-coachrow .pk-btn{flex:1 1 auto;width:auto;min-height:34px;padding:7px 12px;font-size:13px;background:rgba(212,175,55,.18);border:1px solid rgba(212,175,55,.7);color:#f0d27a}
.pk-coachrow .pk-btn:hover{background:rgba(212,175,55,.3)}
.pk-coachrow .pk-btn.quiet{background:rgba(255,255,255,.07);border-color:rgba(255,255,255,.25);color:rgba(255,255,255,.88)}
@media (min-width:1000px){ .pk-right .pk-coach{margin:0 0 4px} }
@media (max-width:999px){
  body > .pk-coach{position:fixed;left:8px;right:8px;top:calc(6px + env(safe-area-inset-top));z-index:65;max-height:40dvh;overflow:auto;padding:10px 12px;background:rgba(15,23,42,.9);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px)}
  body > .pk-coach h3{font-size:15px;margin-bottom:4px}
  body > .pk-coach .pk-coachtxt{font-size:13px;line-height:1.4}
  body > .pk-coach .pk-coachrow{margin-top:8px}
  /* Nov 1: the buttons always show; only the lesson text scrolls (long text used to push Next out of sight) */
  body > .pk-coach:not(.min){display:flex;flex-direction:column;overflow:hidden}
  body > .pk-coach:not(.min) .pk-coachtxt{flex:1 1 auto;min-height:2.6em;overflow-y:auto;overscroll-behavior:contain}
  body > .pk-coach:not(.min) .pk-coachkick,body > .pk-coach:not(.min) h3,body > .pk-coach:not(.min) .pk-coachrow{flex:none}
  body.pk.seated.pk-coaching .pk-hint{display:none!important}
}
/* Nov 1: short phones (iPhone SE and the like): a little more room for the lesson panel, and tighter type and buttons */
@media (max-width:999px) and (max-height:620px){
  body > .pk-coach{max-height:50dvh;padding:8px 10px}
  body > .pk-coach .pk-coachkick{font-size:10px;margin-bottom:2px}
  body > .pk-coach h3{font-size:14px;margin-bottom:3px}
  body > .pk-coach .pk-coachtxt{font-size:12.5px;line-height:1.36}
  body > .pk-coach .pk-coachtxt p{margin-bottom:4px}
  body > .pk-coach .pk-coachrow{gap:5px;margin-top:6px}
  body > .pk-coach .pk-coachrow .pk-btn{min-height:30px;padding:5px 10px;font-size:12.5px}
}
body:not(.seated) > .pk-coach{display:none!important}

/* the coach card's fold button (phones only) */
.pk-coachfold{display:none}
@media (max-width:999px){
  body > .pk-coach{padding-right:44px}
  .pk-coachfold{display:block;position:absolute;right:6px;top:6px;width:32px;height:32px;border-radius:6px;border:1px solid rgba(255,255,255,.25);background:rgba(255,255,255,.08);color:#f0d27a;font-size:14px;line-height:1;cursor:pointer}
  body > .pk-coach.min .pk-coachtxt,body > .pk-coach.min .pk-coachrow{display:none}
  body > .pk-coach.min h3{margin:0}
  body > .pk-coach.min{padding-top:8px;padding-bottom:8px}
  body > .pk-coach.min.news{animation:pk-coachnews 1.2s ease-out 2}
}
@keyframes pk-coachnews{0%,100%{box-shadow:0 10px 26px rgba(0,0,0,.3)}40%{box-shadow:0 0 0 2px rgba(242,199,90,.9),0 0 22px 4px rgba(242,199,90,.5)}}

/* ---------- avatars (Oct 26): seat rows, phone score strips, Account card, result window ---------- */
.bwa-av{display:inline-flex;flex:none;line-height:0}
.bwa-av svg{width:100%;height:100%;display:block}
.pk-pl .av{width:28px;height:28px;margin:-6px 0 -6px -4px}
.pk-pl .av:empty{display:none}
.pk-mini .pk-pl .av{width:24px;height:24px;margin:-5px 0 -5px -5px}
.pk-acct .pk-me{display:flex;align-items:center;gap:10px}
.pk-acct .pk-me .av{width:72px;height:72px;margin:-10px -6px -10px -10px;padding:0;border:0;background:none;cursor:pointer;border-radius:50%}
.pk-acct .pk-me .av:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.pk-acct .pk-me small{display:block;color:var(--gold);font-weight:700;font-size:11.5px;letter-spacing:.02em;margin:1px 0}
/* shorter screens: Avatar and Join the Club side by side, a smaller avatar (Oct 26) */
@media (min-width:1000px){
  body.pk.pk-tight .pk-left .pk-acct{display:grid;grid-template-columns:1fr 1fr;column-gap:6px}
  body.pk.pk-tight .pk-left .pk-acct > :not(.pk-btn),body.pk.pk-tight .pk-left .pk-acct > .pk-btn:last-child:nth-child(odd){grid-column:1/-1}
  body.pk.pk-tight .pk-left .pk-acct .pk-btn{padding-left:6px;padding-right:6px}
  body.pk.pk-tight .pk-left .pk-acct .pk-me .av{width:62px;height:62px;margin:-8px -4px -8px -8px}
  body.pk.pk-tighter .pk-left .pk-acct .pk-me .av{width:54px;height:54px;margin:-7px -4px -7px -8px}
}
.pk-modal .pk-duo{display:flex;justify-content:center;align-items:flex-start;gap:8px;margin:0 0 10px}
.pk-modal .pk-duo .p{display:flex;flex-direction:column;align-items:center;width:124px;text-align:center}
.pk-modal .pk-duo .p b{font-size:13.5px;margin-top:2px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pk-modal .pk-duo .p i{font-style:normal;font-size:11.5px;color:rgba(255,255,255,.65);margin-top:1px}
.pk-modal .pk-duo .vs{font-style:italic;color:rgba(255,255,255,.6);margin-top:54px;font-size:15px}
.pk-modal .pk-duo .bwa-av{width:124px;height:124px}
.pk-modal .pk-duo .bwa-av>span{width:100%!important;height:100%!important}.pk-modal .pk-duo .bwa-av>span>svg{width:70.13%;height:70.13%}   /* the House (no ring) keeps the same face size as a ringed avatar (108/154) instead of stretching (Nov 20) */
@media (max-width:700px) and (max-height:800px){.pk-modal .pk-duo .bwa-av{width:108px;height:108px}.pk-modal .pk-duo .vs{margin-top:46px}}

/* one seat row: avatar · name · score; the colour dot steps aside when avatars show, and games where both sides'
   pieces share the board (pip:true) show the colour as a small pip on the avatar (Oct 26) */
body.pk.pk-avatars .pk-pl .sw{display:none}
.pk-pl .av,.pk-chip{position:relative}
.pk-pl .av .pip,.pk-chip .pip{position:absolute;right:-2px;bottom:-1px;width:11px;height:11px;border-radius:50%;border:1.5px solid rgba(15,23,42,.92);box-shadow:0 1px 2px rgba(0,0,0,.5)}
.pk-mini .pk-pl .av .pip{width:10px;height:10px}
.pk-chip{display:inline-flex;width:22px;height:22px;margin:-4px 7px -4px 0;vertical-align:middle}
.pk-chip .pip{width:9px;height:9px;right:-2px;bottom:-1px}

/* ---------- card rooms and one-player rooms (Oct 26) ---------- */
.pk-games span.soon{flex:0 0 auto;color:rgba(255,255,255,.42);font-weight:700;font-size:15px;line-height:17px;letter-spacing:.45px;padding:7px 12px;white-space:nowrap;cursor:default;text-shadow:0 2px 4px rgba(0,0,0,.4)}
.pk-modal .pk-gamelist span.pk-btn.soon{opacity:.5;cursor:default;display:flex;flex-direction:column;align-items:center;gap:2px}
.pk-modal .pk-gamelist .pk-btn small{font-size:10px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.7)}
body.pk-solo .pk-mini{display:none!important}
.pk-duo.pk-duo1{justify-content:center}

/* phones: a handle on the slide-up cards; pull or flick down to close (Oct 26) */
.pk-handle{display:none}
@media (max-width:999px){
  .pk-handle{display:flex;flex:none;align-items:center;justify-content:center;height:22px;margin:-10px 0 0;cursor:grab;touch-action:none}
  .pk-handle span{width:44px;height:5px;border-radius:3px;background:rgba(255,255,255,.42)}
  .pk-side{overscroll-behavior:contain}
  body.pk.sheet-left,body.pk.sheet-right{overflow:hidden}
}

/* partnership rooms (Oct 28): each seat-window choice has a line under it; the result window shows you and your partner against The House */
.pk-opt{display:flex;flex-direction:column;gap:4px;margin:0 0 4px}
.pk-opt>small{font:500 12.5px/1.35 Montserrat,sans-serif;color:rgba(255,255,255,.66);text-align:center;padding:0 6px}
.pk-opt .pk-field{margin-top:6px}
.pk-duo.trio .p .bwa-av{transform:scale(.86)}

/* ---------- phones held sideways (Oct 31): rooms that opt in with land:true in Parlor.init ----------
   The whole height goes to the board: the header hides (Menu still has the Lobby), the floating bar becomes a slim
   rail down the left, the coach card and slide-up cards sit beside it. The room sets --pk-landR (its right-hand column). */
@media (max-width:999px) and (orientation:landscape) and (max-height:540px){
  body.pk.pk-land{--pk-rail:100px;--pk-landR:120px}
  body.pk.pk-land.seated header{display:none}
  body.pk.pk-land.seated .pk-play{padding:8px calc(8px + env(safe-area-inset-right)) 8px calc(var(--pk-rail) + 16px + env(safe-area-inset-left));min-height:100dvh}
  body.pk.pk-land.seated .pk-stage{min-height:calc(100dvh - 16px);justify-content:center;padding-right:calc(var(--pk-landR) + 8px)}
  body.pk.pk-land.seated .pk-bar{left:calc(8px + env(safe-area-inset-left));right:auto;top:8px;bottom:8px;width:var(--pk-rail);height:auto;flex-direction:column;align-items:stretch;padding:8px 6px;gap:8px;border-radius:16px}
  body.pk.pk-land.seated .pk-bar .pk-btn{min-height:46px;padding:6px;white-space:normal;text-align:center;font-size:12.5px;line-height:1.2}
  body.pk.pk-land.seated .pk-bar .pk-bstat{flex:1;display:flex;flex-direction:column;justify-content:center;font-size:12.5px;line-height:1.25;white-space:normal}
  body.pk.pk-land.seated .pk-bar .pk-bstat small{margin-top:4px}
  body.pk.pk-land .pk-side{left:calc(var(--pk-rail) + 16px + env(safe-area-inset-left));right:auto;width:min(400px,calc(100vw - var(--pk-rail) - 40px));bottom:8px;max-height:calc(100dvh - 16px)}
  body.pk.pk-land.seated .pk-hint.on{left:calc(var(--pk-rail) + 24px + env(safe-area-inset-left));bottom:auto;top:14px}
  body.pk.pk-land.seated .pk-hint.on::after{left:-7px;bottom:auto;top:18px;border-right:0;border-left:1px solid rgba(212,175,55,.55)}
  body.pk.pk-land > .pk-coach{left:auto;right:calc(8px + env(safe-area-inset-right));top:8px;width:var(--pk-landR);max-height:calc(100dvh - 24px - var(--pk-landTools,0px))}
  body.pk.pk-land > .pk-coach{padding:9px 40px 10px 12px}
  body.pk.pk-land > .pk-coach h3{font-size:14.5px}
  body.pk.pk-land > .pk-coach .pk-coachtxt{font-size:12.5px;line-height:1.38}
  body.pk.pk-land > .pk-coach .pk-coachrow{gap:5px;margin-top:7px}
  body.pk.pk-land > .pk-coach .pk-coachrow .pk-btn{flex:1 1 100%;min-height:30px;padding:6px 8px;font-size:12px}
  body.pk.pk-land.seated .pk-toast{top:14px}
}

/* ---------- daily puzzles: the streak card in the result window (Oct 31) ---------- */
.pk-streak{margin:12px 0 2px;padding:12px 14px;border-radius:12px;text-align:center;border:1px solid rgba(231,199,122,.8);background:linear-gradient(180deg,rgba(212,175,55,.24),rgba(212,175,55,.08));box-shadow:0 0 18px rgba(212,175,55,.18)}
.pk-streak b.t{display:block;margin:0 0 4px;color:#f0d27a;font-size:16px;font-weight:800;letter-spacing:.2px}
.pk-modal .pk-streak p{margin:0 0 10px;font-size:13px;line-height:1.45;text-align:center}
.pk-modal .pk-streak .pk-btn{width:100%;background:#d4af37;border-color:#d4af37;color:#1a1405;font-weight:800}
.pk-modal .pk-streak .pk-btn:hover{background:#e6c25a;color:#1a1405}
.pk-streak.saved{padding:9px 12px;border-color:rgba(255,255,255,.18);background:rgba(255,255,255,.05);box-shadow:none}
.pk-modal .pk-streak.saved p{margin:0 0 4px;font-size:12.5px}
.pk-modal .pk-streak.saved p:last-child{margin:0}
.pk-modal .pk-streak p.pk-gold{color:#f0d27a;font-weight:600}
.pk-modal .pk-streak p.pk-club{color:rgba(255,255,255,.72)}
.pk-streak .pk-club a{color:#f0d27a;font-weight:700;text-decoration:none;white-space:nowrap}

/* the Club card under a House Guest's streak (Oct 31): the saved line sits plain above it, no box in a box */
.pk-modal .pk-streak.saved.plain{padding:0;border:0;background:none;box-shadow:none;margin-top:10px}
.pk-modal .pk-streak.saved.plain > p{color:rgba(255,255,255,.7);font-size:12px;margin:0 0 8px}
.pk-clubcard{padding:12px 14px 14px;border-radius:12px;text-align:center;border:1px solid rgba(231,199,122,.8);background:linear-gradient(180deg,rgba(212,175,55,.22),rgba(212,175,55,.07));box-shadow:0 0 18px rgba(212,175,55,.16);animation:pkClubIn .5s ease-out .25s both}
.pk-clubcard b.t{display:block;margin:0 0 5px;color:#f0d27a;font-size:15px;line-height:1.3;font-weight:800;letter-spacing:.2px}
.pk-modal .pk-streak .pk-clubcard p{margin:0 0 11px;font-size:12.5px;line-height:1.45;color:rgba(255,255,255,.85)}
.pk-modal .pk-streak .pk-clubcard .pk-btn{width:100%;padding:10px 14px}
@media (max-width:600px){ .pk-clubcard{padding:10px 12px 12px} .pk-clubcard b.t{font-size:14.5px;margin:0 0 3px} .pk-modal .pk-streak .pk-clubcard p{margin:0 0 9px;font-size:12px} }
@keyframes pkClubIn{from{opacity:0}to{opacity:1}}
@media (prefers-reduced-motion:reduce){.pk-clubcard{animation:none}}

/* Nov 12: eleven board games (Connect Four joined) — tighten the switcher bar on laptops and iPads so it never scrolls */
@media (min-width:1000px) and (max-width:1320px){.pk-games a{padding:7px 8px;font-size:14px;letter-spacing:.3px}.pk-games a.on{padding:7px 12px}}@media (min-width:1000px) and (max-width:1120px){.pk-games{padding:8px 6px;gap:2px}.pk-games a{padding:7px 6px;font-size:13px;letter-spacing:.2px}.pk-games a.on{padding:7px 9px}}
