/* The Game Boy's card (plaza.js offerGames, gamebox.js): two tabs under its name, Play and Unfinished. The open tab is
   joined to what's under it, like a folder tab; Unfinished opens onto the Game Boy's own screen: a dark bezel (its big
   rounded corner bottom right, as on the real one) round a pea-green LCD, the game names in pixel type. A game waiting on
   you is lit up inverted with a blinking cursor; other people's tables sit in the paler green. */
.pm-gb { width: min(300px, calc(100vw - 24px)); white-space: normal; }
.pm-gb[data-show="play"] [data-pane="mine"], .pm-gb[data-show="mine"] [data-pane="play"] { display: none; }
.pm-gb-tabs { flex: none; display: flex; gap: 4px; margin: -4px 8px 0; padding: 0 0 0; border-bottom: 2px solid var(--pz-line); }
.pm-gb[data-show="play"] .pm-gb-tabs + .pm-gb-scroll { padding-top: 10px; }
.pm-gb-tabs button { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; margin-bottom: -2px;
  padding: 6px 10px; border: 2px solid transparent; border-bottom: 0; border-radius: 10px 10px 0 0; background: none;
  color: var(--pz-ink-2); font: 800 15px/1 var(--pz-rounded); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pm-gb-tabs button[aria-selected="true"] { color: var(--pz-ink); background: var(--pz-chrome); border-color: var(--pz-line); }
.pm-gb-tabs button[data-tab="mine"][aria-selected="true"] { color: #e3e6c8; background: #4c4f63; border-color: #4c4f63; }
.pm-gb-tabs button:focus-visible { outline: 3px solid var(--pz-blue); outline-offset: -3px; }
/* the count on the tab: games of yours that aren't over; red when some are waiting on you (same red as the bubble over its head) */
.pm-gb-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font: normal 800 12px/20px var(--pz-rounded); text-align: center;
  background: var(--pz-line); color: var(--pz-ink); }
.pm-gb-n.turn { background: #f0532d; color: #fff; }
.pm-gb-tabs [aria-selected="true"] .pm-gb-n:not(.turn) { background: #ffffff2e; color: inherit; }

.pm-gb [data-pane="mine"] { border-radius: 0; }
.gbx { margin: 0 8px 8px; padding: 10px 10px 14px; background: #4c4f63; border-radius: 10px 0 26px 10px; }
.gbx-lcd { display: grid; padding: 4px 0; background: #9bbc0f; color: #0f380f; border-radius: 3px; box-shadow: inset 0 0 0 2px #8bac0f; }
.gbx-row { display: grid; grid-template-columns: 14px auto 1fr; grid-template-areas: "cur name line" ". with with"; align-items: baseline;
  column-gap: 6px; width: 100%; min-height: 44px; padding: 6px 10px 7px 6px; border: 0; background: none; color: inherit; text-align: left;
  cursor: pointer; -webkit-tap-highlight-color: transparent; }
.gbx-row + .gbx-row { border-top: 2px dotted #0f380f40; }
.gbx-row b { grid-area: name; font: 400 21px/.9 "Jersey 10", var(--pz-rounded); }
.gbx-line { grid-area: line; min-width: 0; justify-self: end; text-align: right; font: 800 13px/1.15 var(--pz-rounded); }
.gbx-with { grid-area: with; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 12.5px/1.3 var(--pz-rounded); opacity: .8; }
.gbx-cur { grid-area: cur; align-self: center; width: 8px; height: 10px; }
.gbx-row.turn { background: #0f380f; color: #9bbc0f; }
.gbx-row.turn + .gbx-row, .gbx-row + .gbx-row.turn { border-top-color: transparent; }
.gbx-row.turn .gbx-cur { background: currentColor; clip-path: polygon(0 0, 100% 50%, 0 100%); animation: gbx-blink 1s steps(1) infinite; }
.gbx-row.theirs { color: #306230; }
.gbx-row:active { background: #8bac0f; }
.gbx-row.turn:active { background: #306230; }
.gbx-row:focus-visible { outline: 3px solid #0f380f; outline-offset: -3px; }
.gbx-sep { padding: 10px 10px 2px 26px; font: 800 12px/1 var(--pz-rounded); color: #306230; border-top: 2px solid #0f380f; margin-top: 4px; }
.gbx-row.turn + .gbx-sep, .gbx-sep:first-child { border-top: 0; margin-top: 0; }
.gbx-empty { margin: 0; padding: 16px 12px 18px; text-align: center; font: 800 14px/1.4 var(--pz-rounded); }
@keyframes gbx-blink { 50% { opacity: 0; } }

/* over the Game Boy's head: a red bubble with how many games are waiting on you; it pops in when one more is */
.pm-turns { position: absolute; left: 0; bottom: calc(var(--hh) + 12px); transform: translateX(-50%); min-width: 32px; height: 32px; padding: 0 9px;
  border-radius: 16px; background: #f0532d; color: #fff; border: 3px solid #fff; font: 800 17px/26px var(--pz-rounded); text-align: center;
  pointer-events: none; animation: pm-turns-bob 1.4s ease-in-out infinite alternate; }
.pm-turns::after { content: ""; position: absolute; left: 50%; bottom: -9px; margin-left: -6px; border: 6px solid transparent; border-top: 7px solid #fff; border-bottom: 0; }
.pm-turns[hidden] { display: none; }
.pm-turns.pop { animation: pm-turns-pop .36s cubic-bezier(.3, 1.7, .5, 1), pm-turns-bob 1.4s ease-in-out .36s infinite alternate; }
.pm.offering .pm-turns, .pm.talking .pm-turns { display: none; }
@keyframes pm-turns-bob { to { translate: 0 -4px; } }
@keyframes pm-turns-pop { from { transform: translateX(-50%) scale(.3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gbx-row.turn .gbx-cur, .pm-turns, .pm-turns.pop { animation: none; } }
