/* Games pages look: the Memphis scope for the Games home and the pg-* furniture shared by every
   screen. Azulejos screens add .az-page and take their colors from azulejos.css (its :root tokens
   are NOT restated here). Portrait phone inside the TV Remote WebView; the TV's weak-ARM rules of
   the launcher hold: only transform/opacity animate, no backdrop-filter. Fonts are self-hosted
   (woff2, OFL texts beside them in fonts/). No published method is implemented here. */

@font-face { font-family: "Rubik Mono One"; font-weight: 400; font-display: swap; src: url("fonts/rubik-mono-one-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 400; font-display: swap; src: url("fonts/space-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }

/* ---- Memphis scope (values from launcher/src/styles/base.css) ---- */
.pg-memphis {
  --ink: #111;
  --paper: #fffaf0;
  --yellow: #ffd23f;
  --pink: #ff3ea5;
  --pink-soft: #ff8fcf;
  --teal: #00c2c2;
  --teal-soft: #7ee8e8;
  --purple: #6c4bd8;
  --purple-soft: #b9a6ff;
  --red: #ff4b55;
  --green: #3ddc84;
  --orange: #ff8a3d;
  --display: 'Rubik Mono One', sans-serif;
  --body: 'Space Grotesk', sans-serif;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
}
.pg-memphis .pg-title { font-family: var(--display); font-size: 1.6rem; margin: .8em .6em .4em; }
.pg-memphis .pg-row { background: var(--yellow); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.pg-memphis .pg-game-row { font-family: var(--display); background: var(--teal-soft); }
.pg-memphis .pg-switch-knob { background: var(--purple-soft); border: 3px solid var(--ink); }
.pg-memphis .pg-switch-knob.pg-on { background: var(--green); }

/* ---- Games home, phone, tablet and desktop (#323, #360; mockups Phone-Games, Friend-Games,
   Tablet-Games, Desktop-Games). Phone layout up to 480px, desktop look from 481px; the side column
   drops below the list up to 900px (the .pg-wrap rule in the shared furniture section). ---- */
.pg-games-home {
  position: relative; overflow: hidden; color: #f7f3ff;
  background:
    repeating-linear-gradient(45deg, transparent 0 22px, rgba(255, 255, 255, .07) 22px 26px),
    linear-gradient(180deg, #050816, #0B1026 50%, #1D2B64);
}
.pg-games-home::before { content: ""; position: absolute; width: 85px; height: 85px; border-radius: 50%; background: #ff3ea5; border: 5px solid var(--ink); right: -21.5px; bottom: 132.5px; box-sizing: border-box; }
.pg-games-home::after { content: ""; position: absolute; width: 57px; height: 57px; border-radius: 50%; background: #ffd23f; border: 5px solid var(--ink); left: -16.5px; bottom: 61.5px; box-sizing: border-box; }
.pg-games-header { position: relative; z-index: 1; height: 60px; flex: none; box-sizing: content-box; background: #fffaf0; color: var(--ink); border-bottom: 4px solid var(--ink); }
.pg-games-header-inner { width: 100%; max-width: 1040px; height: 100%; margin: 0 auto; padding: 0 16px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; }
.pg-games-home .pg-title { font-size: 22px; margin: 0; }
.pg-avatar-box { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; }
.pg-avatar { width: 38px; height: 38px; box-sizing: border-box; border-radius: 50%; border: 3px solid var(--ink); background: #7ee8e8; color: var(--ink); font-family: var(--display); font-size: 15px; display: flex; align-items: center; justify-content: center; }
.pg-avatar-name { font-weight: 700; }
.pg-games-home .pg-games-wrap { position: relative; z-index: 1; width: 100%; box-sizing: border-box; }
.pg-kick { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 8px; }
.pg-invites:not(:empty) { margin-bottom: 18px; }
.pg-games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
.pg-game-card, .pg-alerts-card, .pg-invite-card { background: #fffaf0; color: var(--ink); border: 4px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); box-sizing: border-box; }
/* a flex column, not block: a stretched <button> would center its block content, shifting the art
   and text down from the board's top-aligned layout */
.pg-game-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; text-align: left; font: inherit; }
.pg-game-art { height: 92px; display: flex; align-items: center; justify-content: center; gap: 4px; --tile: 24px; box-sizing: content-box; background: radial-gradient(circle farthest-corner at 50% 40%, #6699aa, #1f4b5b 55%, #040c0f); border-bottom: 4px solid var(--ink); }
.pg-game-art .az-tile { width: var(--tile); height: var(--tile); flex: none; }
.pg-game-art .az-tile img { width: 100%; height: 100%; display: block; }
.pg-game-name { font-family: var(--display); font-size: 14px; padding: 8px 10px 2px; }
.pg-game-meta { font-size: 12px; font-weight: 500; opacity: .7; padding: 0 10px 10px; }
.pg-game-slot { border: 4px dashed rgba(247, 243, 255, .45); border-radius: 16px; box-sizing: border-box; }
.pg-alerts-card { padding: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.pg-phone-icon, .pg-bell-icon { width: 34px; height: 34px; flex: none; display: block; }
.pg-phone-icon svg, .pg-bell-icon svg { width: 100%; height: 100%; display: block; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-games-home .pg-bell-icon { display: none; }
.pg-alerts-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pg-alerts-title { font-size: 15px; font-weight: 700; }
.pg-alerts-text { font-size: 13px; font-weight: 500; color: #4a4a4a; line-height: 1.35; }
.pg-games-home .pg-alerts-desktop { display: none; }
.pg-pill { height: 46px; padding: 0 16px; box-sizing: content-box; border: 3px solid var(--ink); border-radius: 30px; box-shadow: 3px 3px 0 var(--ink); font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); display: flex; align-items: center; justify-content: center; flex: none; }
.pg-setup { background: #7ee8e8; }
.pg-invite-card { padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.pg-invite-text { display: flex; flex-direction: column; gap: 2px; }
.pg-invite-line { font-size: 17px; font-weight: 700; }
.pg-invite-with { font-size: 13px; font-weight: 500; color: #4a4a4a; }
.pg-invite-buttons { display: flex; gap: 10px; }
.pg-invite-buttons .pg-pill { flex: 1; }
.pg-invite-join { background: #3ddc84; }
.pg-invite-no { background: #fffaf0; }
.pg-alerts-switch { flex-basis: 100%; }
.pg-alerts-switch:empty { display: none; }
@media (max-width: 480px) {
  .pg-games-home .pg-games-wrap { flex: 1; display: flex; flex-direction: column; align-items: stretch; gap: 18px; padding: 16px 16px 20px; }
  .pg-games-home .pg-main { flex: 1; }
  .pg-games-home .pg-desktop-only, .pg-games-home .pg-avatar-name { display: none; }
  .pg-games-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .pg-slot-extra { display: none; }
}
@media (min-width: 481px) {
  .pg-games-home::before { width: 129px; height: 129px; right: -34.5px; bottom: 125.5px; }
  .pg-games-home::after { width: 73px; height: 73px; left: -20.5px; bottom: 63.5px; }
  .pg-games-header { height: 68px; }
  /* the Desktop-Games board's kicker sections sit 10px above their cards; the phone keeps 8px */
  .pg-games-home .pg-kick { margin: 0 0 10px; }
  .pg-games-header-inner { padding: 0 24px; }
  .pg-games-home .pg-title { font-size: 24px; }
  .pg-avatar { width: 40px; height: 40px; }
  .pg-avatar-name { font-size: 15px; }
  .pg-games-home .pg-main { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
  .pg-invites:not(:empty) { margin-bottom: 0; }
  .pg-game-art { height: 120px; gap: 5px; --tile: 28px; }
  .pg-game-name { font-size: 15px; padding: 10px 12px 2px; }
  .pg-game-meta { font-size: 13px; color: #4a4a4a; opacity: 1; padding: 0 12px 12px; }
  /* the board slot is min-height 170px content + 10px padding + 4px border = 198px (the TV menu slot
   keeps its own size rule) */
  .pg-games-home .pg-game-slot { min-height: 170px; padding: 10px; box-sizing: content-box; }
  .pg-alerts-card { padding: 18px; flex-direction: column; align-items: stretch; gap: 12px; }
  .pg-games-home .pg-phone-icon { display: none; }
  .pg-games-home .pg-bell-icon { display: block; }
  .pg-alerts-body { flex: none; gap: 4px; }
  .pg-alerts-title { font-size: 16px; }
  .pg-alerts-text { font-size: 14px; line-height: 1.4; }
  .pg-games-home .pg-alerts-phone { display: none; }
  .pg-games-home .pg-alerts-desktop { display: block; }
  .pg-invite-card { padding: 18px 20px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
  .pg-invite-text { flex: 1 1 260px; }
  .pg-invite-line { font-size: 19px; }
  .pg-invite-with { font-size: 14px; }
  .pg-invite-buttons { flex: 0 1 300px; }
}

/* ---- shared furniture ---- */
.pg-screen { min-height: 100vh; display: flex; flex-direction: column; }
.pg-list { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px; }
.pg-row { display: block; width: 100%; text-align: left; font: inherit; font-weight: 500; min-height: 48px; padding: 12px 14px; border-radius: 10px; border: 0; color: inherit; }
.pg-section { padding: 8px 0; }
.pg-section-title { font-size: 1rem; font-weight: 700; margin: .6em 16px .3em; }
.pg-empty { margin: 0 16px; opacity: .8; }
.pg-menu { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px; }
.pg-panel { padding: 8px 16px; }
.pg-panel-text { margin: 8px 0; }

.pg-banner { margin: 8px 16px; padding: 12px 14px; border-radius: 10px; background: var(--red, #ff4b55); color: #fff; font-weight: 700; }
.pg-banner-holder:empty { display: none; }

.pg-switch-row { padding: 8px 16px; }
.pg-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.pg-switch-label { font-weight: 700; }
.pg-switch-knob { width: 56px; height: 32px; border-radius: 16px; border: 2px solid currentColor; background: transparent; position: relative; }
.pg-switch-knob.pg-on::after { content: ""; position: absolute; right: 2px; top: 2px; bottom: 2px; width: 24px; border-radius: 12px; background: currentColor; }
.pg-switch-knob:not(.pg-on)::after { content: ""; position: absolute; left: 2px; top: 2px; bottom: 2px; width: 24px; border-radius: 12px; background: currentColor; opacity: .4; }

.pg-dialog { position: fixed; inset: 0; z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(0, 0, 0, .45); padding: 24px; }
.pg-dialog-title { margin: 0 0 .4em; }
.pg-dialog-title, .pg-dialog-text { padding: 14px 18px 0; }
.pg-dialog-text { margin: 0; }
.pg-dialog-buttons { display: flex; gap: 10px; padding: 16px 18px; border-radius: 12px; margin-top: 10px; }
.pg-button { flex: 1; min-height: 48px; font: inherit; font-weight: 700; border-radius: 10px; border: 2px solid currentColor; background: transparent; color: inherit; }
.pg-button.pg-danger { background: var(--red, #ff4b55); border-color: var(--red, #ff4b55); color: #fff; }

/* ---- Azulejos screens (colors come from azulejos.css :root) ---- */
.az-page { background: radial-gradient(circle at 50% 30%, var(--teal-center) 0%, var(--teal-mid) 45%, var(--teal-edge) 100%); color: var(--cream); font-family: var(--body); }
.az-page .az-header { position: sticky; top: 0; z-index: 5; }
.az-page .pg-row { background: var(--cream); color: var(--ink); font-weight: 700; }
.az-page .pg-new-game { background: var(--clay); }
.az-page .pg-section-title { color: var(--cream); font-family: var(--display); }
.az-page .pg-banner { background: var(--clay); color: var(--ink); }

/* ---- Azulejos screen kit (#322). Motion: transform/opacity only; no backdrop blur. ---- */
.az-header.az-head { height: 56px; box-sizing: border-box; display: flex; align-items: center; padding: 0 8px 0 4px; gap: 10px; background: var(--ink); color: var(--cream); }
.az-back { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border: 0; background: transparent; color: inherit; padding: 0; }
.az-head-title { font-family: var(--display); font-weight: 700; font-size: 24px; margin: 0; }
.az-head-right { margin-left: auto; font-family: var(--body); font-weight: 400; font-size: 13px; color: #BDB2A2; padding-right: 8px; }
.az-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.az-card { background: var(--cream); color: var(--ink); border-radius: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.az-card-dark { background: rgba(4, 12, 15, .6); color: var(--cream); border-radius: 18px; }
.az-btn { font: inherit; font-weight: 700; border-radius: 5px; height: 48px; width: 100%; box-sizing: border-box; }
.az-btn-primary { background: var(--clay); color: var(--ink); border: 0; }
.az-btn-tall { height: 52px; }
.az-btn-outline { background: transparent; color: var(--cream); border: 1.5px solid rgba(242, 235, 221, .5); }
.az-pill { display: inline-block; border-radius: 999px; padding: 0 .9em; }
.az-strip { display: flex; gap: 6px; }
.az-strip .az-tile { width: 40px; height: 40px; box-sizing: border-box; border: 3px solid; border-radius: 6px; overflow: hidden; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); }
.az-strip .az-tile::after { content: none; }
.az-strip .az-blue { border-color: #A6CFE5 #264F65 #264F65 #A6CFE5; }
.az-strip .az-yellow { border-color: #FFD593 #805514 #805514 #FFD593; }
.az-strip .az-red { border-color: #E9A39E #6A231F #6A231F #E9A39E; }
.az-strip .az-black { border-color: #808080 #000000 #000000 #808080; }
.az-strip .az-white { border-color: #FFFFFF #808080 #808080 #FFFFFF; }

.az-chevron svg { width: 24px; height: 24px; display: block; }

/* Azulejos home (#324, board Phone-Azulejos) */
.az-home { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; }
.az-home > .pg-banner-holder, .az-home > .az-head { flex: none; }
.az-home-intro, .az-home-actions, .az-home .pg-section { margin: 0 16px; }
.az-home-intro { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 6px 0 2px; }
.az-tagline { margin: 0; font-size: 13px; color: #C9D6DA; }
.az-home-actions { display: flex; gap: 8px; }
.az-home-actions .az-btn { width: auto; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 15px; padding: 0 16px; cursor: pointer; }
.az-home-actions .pg-new-game { flex: 1; font-size: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.az-btn-icon, .az-row-chevron { display: inline-flex; flex: none; }
.az-btn-icon svg { width: 20px; height: 20px; display: block; }
.az-row-chevron svg { width: 20px; height: 20px; display: block; }
.az-home .pg-section { padding: 0; display: flex; flex-direction: column; gap: 8px; }
.az-home .az-label { margin: 0; }
.az-active-card { padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.az-active-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.az-active-names { font-family: var(--display); font-size: 18px; font-weight: 700; }
.az-turn-pill { background: var(--clay); color: var(--ink); font-size: 12px; font-weight: 700; padding: 4px 10px; white-space: nowrap; }
.az-active-scores { margin: 0; font-size: 13px; color: #5E554B; }
.az-open { height: 44px; border: 0; border-radius: 5px; background: var(--ink); color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.az-row-text { display: flex; flex-direction: column; gap: 2px; text-align: left; }
.az-row-names { font-size: 15px; font-weight: 600; }
.az-row-line { font-size: 12px; color: #C9D6DA; }
.az-home .pg-waiting-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 0; font: inherit; width: 100%; box-sizing: border-box; cursor: pointer; }
.az-home .pg-saved-list { display: flex; flex-direction: column; }
.az-home .pg-saved-row { padding: 12px 14px; border-bottom: 1px solid rgba(242, 235, 221, .12); }
.az-home:not(.az-tv-page) .pg-saved-row { display: flex; align-items: center; justify-content: space-between; }
.pg-saved-switch { height: 40px; padding: 0 14px; border-radius: 5px; border: 0; background: rgba(242, 235, 221, .14); color: var(--cream); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.az-home .pg-saved-row:last-child { border-bottom: 0; }
.az-wins-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.az-win-tile { background: rgba(4, 12, 15, .6); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; align-items: center; }
.az-win-num { font-family: var(--display); font-size: 24px; font-weight: 700; }
.az-win-name { font-size: 12px; color: #C9D6DA; }
.az-link { align-self: flex-start; background: none; border: 0; padding: 0; font: inherit; font-size: 13px; font-weight: 600; color: #FFD7BF; text-decoration: underline; cursor: pointer; }
.pg-tv .az-home .az-link, .pg-tv .az-home .az-open { min-height: 72px; }

/* Guest Join (#326, board Phone-Guest) */
.az-guest { display: flex; flex-direction: column; gap: 20px; padding: 36px 20px 20px; box-sizing: border-box; }
.az-guest > .pg-banner-holder { flex: none; }
.az-guest-intro { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.az-guest .az-strip .az-tile { width: 36px; height: 36px; }
.az-guest-title { margin: 0; font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; }
.az-guest-sub { margin: 0; font-size: 15px; color: #C9D6DA; text-align: center; }
.az-guest-card { padding: 18px; gap: 14px; display: flex; flex-direction: column; }
.az-guest-label { font-size: 13px; font-weight: 600; color: #5E554B; }
.az-guest .pg-code-input { height: 60px; width: 100%; box-sizing: border-box; border-radius: 8px; border: 2px solid var(--ink); background: #fff; color: var(--ink); font-family: var(--display); font-size: 34px; font-weight: 700; letter-spacing: 6px; text-align: center; }
.az-guest .pg-guest-preview { gap: 14px; }
.az-guest-row { display: flex; justify-content: space-between; font-size: 14px; }
.az-guest-value { font-weight: 700; }
.az-guest-card .pg-join-yes { font-size: 16px; cursor: pointer; }
.az-guest-space { flex-grow: 1; }
.az-guest-note { margin: 0; font-size: 13px; line-height: 1.5; color: #C9D6DA; text-align: center; }
.az-guest-signin { background: none; border: 0; padding: 0; min-height: 44px; font: inherit; font-size: 13px; color: #FFD7BF; text-decoration: underline; text-align: center; cursor: pointer; }

/* cancel bottom sheet */
.pg-sheet { justify-content: flex-end; padding: 0; background: rgba(4, 12, 15, .78); }
.pg-sheet-panel { width: 100%; max-width: 390px; box-sizing: border-box; background: var(--cream); color: var(--ink); border-radius: 18px 18px 0 0; padding: 22px 16px 24px; display: flex; flex-direction: column; gap: 14px; animation: pg-sheet-up .25s ease-out; }
.pg-sheet .pg-dialog-title, .pg-sheet .pg-dialog-text, .pg-sheet .pg-dialog-buttons { padding-left: 0; padding-right: 0; }
/* board Phone-Cancel: column, gap 14px; names and status 2px apart; buttons 4px lower */
.pg-sheet .pg-dialog-title, .pg-sheet .pg-sheet-players, .pg-sheet .pg-sheet-status, .pg-sheet .pg-dialog-text { margin: 0; padding: 0; }
.pg-sheet .pg-sheet-players { font-size: 16px; font-weight: 700; }
.pg-sheet .pg-sheet-status { font-size: 13px; color: #5E554B; }
/* only a status line pulls up under the names; with no status (Waiting) the 14px gap stays */
.pg-sheet .pg-sheet-players + .pg-sheet-status { margin-top: -12px; }
.pg-sheet .pg-dialog-text { font-size: 15px; line-height: 1.45; }
.pg-sheet .pg-dialog-title { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1.1; }
.pg-sheet .pg-dialog-buttons { gap: 8px; padding: 0; margin: 4px 0 0; }
.pg-sheet .az-btn { flex: 1; width: 50%; border: 0; color: #fff; font-size: 16px; }
.pg-sheet .pg-keep { background: var(--ink); }
.pg-sheet .pg-danger { background: #A8321F; }
@keyframes pg-sheet-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
.pg-tv .pg-sheet-panel { border-radius: 18px; animation: none; }
/* the TV keeps its earlier sheet spacing */
.pg-tv .pg-sheet-panel { display: block; padding: 20px 16px; }
.pg-tv .pg-sheet .pg-dialog-title { margin: 0 0 .4em; }
.pg-tv .pg-sheet .pg-sheet-players { font-size: inherit; margin: 0; padding-top: 6px; }
.pg-tv .pg-sheet .pg-sheet-status { padding-top: 2px; }
.pg-tv .pg-sheet .pg-sheet-players + .pg-sheet-status { margin-top: 0; }
.pg-tv .pg-sheet .pg-dialog-text { font-size: inherit; line-height: inherit; padding-top: 14px; }
.pg-tv .pg-sheet .pg-dialog-buttons { gap: 48px; padding: 16px 0; margin-top: 32px; }

/* seat pick (new game), waiting screen, join ask */
.pg-seats { display: flex; flex-direction: column; gap: 10px; padding: 8px 16px; }
.pg-seat { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.pg-seat-state { margin-left: auto; font-weight: 700; }
.pg-seat-state.is-joined { color: var(--green, #3ddc84); }
.pg-seat-state.is-declined { color: var(--red, #ff4b55); }
.pg-guests { display: flex; align-items: center; gap: 14px; padding: 8px 16px; }
.pg-guest-count { font-family: var(--display); font-size: 1.4rem; min-width: 2ch; text-align: center; }
.pg-start { margin: 16px; }
.pg-join-block { padding: 16px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.pg-guest-preview { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.pg-guest-preview:empty { display: none; }
.pg-join-code { font-family: var(--display); font-size: 2rem; letter-spacing: .2em; }
.pg-qr img { width: 180px; height: 180px; }
.pg-share-url { word-break: break-all; text-align: center; }
.pg-seat-drop { min-height: 44px; padding: 0 12px; font: inherit; font-weight: 700; border-radius: 8px; border: 2px solid currentColor; background: transparent; color: inherit; }

/* play screen */
.pg-play { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.pg-pager { flex: 1; width: 100%; min-width: 0; position: relative; overflow: hidden; touch-action: pan-y; }
.pg-pages { display: flex; height: 100%; transition: transform .25s ease; }
.pg-page { min-width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.pg-page-other { gap: 10px; }
.pg-page-name { font-family: var(--display); font-size: 28px; line-height: 34px; font-weight: 700; text-align: center; color: var(--cream); }
.pg-dots { display: flex; justify-content: center; align-items: center; gap: 8px; }
.pg-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(242, 235, 221, .35); }
.pg-dot.is-on { background: var(--cream); }
.pg-own { padding: 6px 0 10px; }
.pg-controls { display: flex; width: 100%; flex-shrink: 0; height: 32px; padding: 0 8px; box-sizing: border-box; }
.pg-controls.is-off, .pg-actions.is-off, .pg-sent.is-off, .pg-turn-pill.is-off { display: none; }
.pg-actions { width: 100%; display: flex; gap: 4px; }
.pg-undo, .pg-confirm { flex: 1 1 0; height: 32px; border-radius: 5px; border: 0; font: inherit; font-size: 14px; padding: 0; }
.pg-undo { background: var(--ink); color: #FFFFFF; font-weight: 600; }
.pg-confirm { background: #BFE3C6; color: #10301C; font-weight: 700; position: relative; overflow: hidden; }
.pg-confirm-progress { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; transform: scaleX(0); transform-origin: left; background: #4CAF6A; }
.pg-confirm-label { position: relative; }
.pg-sent { align-self: center; font-size: 14px; font-weight: 600; text-align: left; color: var(--ink); }
.pg-colorbox { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: rgba(0, 0, 0, .5); }
.pg-colorbox-title { font-family: var(--display); font-size: 1.6rem; color: var(--cream); }
.pg-colorbox-tiles { display: flex; gap: 14px; }
.pg-colorbox-tiles .az-tile { width: 64px; height: 64px; }
.is-pulse { animation: pg-pulse 1s ease-in-out infinite; }
@keyframes pg-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--clay); }
  50% { box-shadow: 0 0 0 4px var(--clay); }
}

/* ---- TV mode (#227): the launcher hosts these pages in an iframe with ?tv=1. Landscape, driven by
   the remote: a focus ring instead of a pointer, larger type, a static watch-only table. ---- */
.pg-tv { font-size: 28px; }
.pg-tv button { font: inherit; cursor: default; min-height: 72px; padding: 0 1.2em; text-align: left; }
.pg-tv .is-tv-focus { outline: 6px solid #ffd23f; outline-offset: 4px; box-shadow: 0 0 0 10px rgba(0, 0, 0, .55); }
.pg-tv .pg-memphis .is-tv-focus { outline-color: #ff3ea5; }
.pg-tv .pg-menu, .pg-tv .pg-list { gap: 18px; padding: 12px 48px; }
.pg-tv .pg-title { font-size: 2.4rem; }
.pg-tv .pg-dialog { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(4, 12, 15, .78); color: #fff; padding: 48px; }
.pg-tv .pg-dialog-buttons { display: flex; gap: 48px; margin-top: 32px; }
.pg-tv .pg-danger { background: #ff4b55; color: #fff; }
/* The TV watch table (#332, boards TV-Games-2p, TV-Games-3p, TV-Games at 1920x1080): the header is 96 px,
   the boards stand on the sides, the factories sit on an ellipse in the middle. Every px of the boards
   is a fraction of --tile (44 for 3 and 4 players, 52 for 2) so one set of rules serves all three. */
.az-page.pg-tv-play .az-header { height: 96px; padding: 0 48px; box-sizing: border-box; gap: 0; }
.pg-tv-play .az-title { font-size: 48px; font-weight: 700; }
.pg-tv-play .az-roller { flex: 1 1 auto; min-width: 0; height: 36px; margin: 20px 0 0 24px; text-align: left; font-family: var(--body); font-size: 24px; font-weight: 400; color: #BDB2A2; }
.pg-tv-play .az-round-label, .pg-tv-play .az-final-pill { line-height: 36px; }
.pg-tv-play .az-final-pill span { font-size: 24px; padding: 0 .9em; }
.pg-tv-play .az-turn-pill { font-size: 28px; padding: 10px 28px; }
.pg-tv-play .az-table.az-tv { flex-direction: row; align-items: stretch; justify-content: flex-start; height: calc(100vh - 96px); padding: 32px 48px; gap: 40px; }
.pg-tv-play .az-sides { flex: none; width: calc(var(--tile) * 548 / 44); gap: calc(var(--tile) * 32 / 44); }
.pg-tv-play .az-p2 .az-sides { width: calc(var(--tile) * 756 / 44); align-items: center; }
.pg-tv-play .az-seat { display: block; }
.pg-tv-play .az-middle { display: block; flex: 1; }
.pg-tv-play .az-factories { display: block; }
.pg-tv-play .az-factory { position: absolute; width: calc(var(--factory-tile) * 150 / 42); height: calc(var(--factory-tile) * 150 / 42); left: calc(50% + var(--fx) * var(--factory-tile) * 236 / 42 - var(--factory-tile) * 75 / 42); top: calc(50% + var(--fy) * var(--factory-tile) * 365 / 42 - var(--factory-tile) * 75 / 42); }
.pg-tv-play .az-p2 .az-factory { width: calc(var(--factory-tile) * 186 / 52); height: calc(var(--factory-tile) * 186 / 52); left: calc(50% + var(--fx) * var(--factory-tile) * 310 / 52 - var(--factory-tile) * 93 / 52); top: calc(50% + var(--fy) * var(--factory-tile) * 330 / 52 - var(--factory-tile) * 93 / 52); }
.pg-tv-play .az-factory-tiles { left: 50%; top: 50%; width: auto; height: auto; margin: 0; transform: translate(-50%, -50%); grid-template-columns: repeat(2, var(--factory-tile)); gap: calc(var(--factory-tile) * 22 / 42); }
.pg-tv-play .az-center { position: absolute; left: 50%; top: 50%; width: 0; height: 0; }

/* tiles: the art with a 4 px bevel border, as the boards draw them */
.pg-tv-play .az-tile { box-sizing: border-box; border: 4px solid; border-radius: calc(var(--tile) * 7 / 44); overflow: hidden; }
.pg-tv-play .az-tile::after { content: none; }
.pg-tv-play .az-blue { border-color: #A6CFE5 #264F65 #264F65 #A6CFE5; }
.pg-tv-play .az-yellow { border-color: #FFD593 #805514 #805514 #FFD593; }
.pg-tv-play .az-red { border-color: #E9A39E #6A231F #6A231F #E9A39E; }
.pg-tv-play .az-black { border-color: #808080 #000000 #000000 #808080; }
.pg-tv-play .az-white { border-color: #FFFFFF #808080 #808080 #FFFFFF; }
.pg-tv-play .az-token { border-color: #F9F5EE #79766F #79766F #F9F5EE; }

/* the board */
.pg-tv-play .az-board { width: auto; height: auto; padding: calc(var(--tile) * 24 / 44); border-radius: calc(var(--tile) * 22 / 44); gap: calc(var(--tile) * 12 / 44); box-shadow: 0 12px 32px rgba(0, 0, 0, .4); }
.pg-tv-play .az-play { height: auto; }
.pg-tv-play .az-lines, .pg-tv-play .az-arrows { gap: calc(var(--tile) * 5 / 44); }
.pg-tv-play .az-lines { width: calc(var(--tile) * 240 / 44); }
.pg-tv-play .az-line { gap: calc(var(--tile) * 5 / 44); }
.pg-tv-play .az-slot { flex: none; border: 0; border-radius: calc(var(--tile) * 7 / 44); background: #E2D8C6; box-shadow: inset 0 0 0 1px #CDBFA7; }
.pg-tv-play .az-arrows { width: calc(var(--tile) * 19 / 44); }
.pg-tv-play .az-board .az-arrow { font-size: 0; position: relative; }
.pg-tv-play .az-arrow::before { content: ""; width: calc(var(--tile) * 7 / 44); height: calc(var(--tile) * 7 / 44); border-top: 1.5px solid #9A8E7E; border-right: 1.5px solid #9A8E7E; transform: translateX(-2px) rotate(45deg); }
.pg-tv-play .az-wall { margin-left: 0; gap: calc(var(--tile) * 5 / 44); grid-template-columns: repeat(5, var(--tile)); }
.pg-tv-play .az-cell.az-empty { border: 0; background: none; }
.pg-tv-play .az-foot { height: auto; justify-content: space-between; align-items: center; }
.pg-tv-play .az-floor { width: auto; gap: calc(var(--tile) * 5 / 44); }
.pg-tv-play .az-floor .az-slot { display: flex; align-items: center; justify-content: center; background: #E9DED0; }
.pg-tv-play .az-pen { position: static; font-size: calc(var(--tile) * 17 / 44); font-weight: 600; color: #8A3B1C; }
.pg-tv-play .az-floor .az-tile { position: absolute; left: 0; top: 0; }
.pg-tv-play .az-stats { margin: 0; height: auto; align-items: flex-end; text-align: right; }
.pg-tv-play .az-name { font-size: calc(var(--tile) * 20 / 44); line-height: calc(var(--tile) * 24 / 44); font-weight: 700; color: #5E554B; }
.pg-tv-play .az-score { font-size: calc(var(--tile) * 34 / 44); line-height: calc(var(--tile) * 36 / 44); font-weight: 700; color: var(--ink); }
.pg-tv-play .az-pts { font-family: var(--body); font-size: calc(var(--tile) * 16 / 44); font-weight: 700; letter-spacing: .5px; color: #5E554B; }
.pg-tv-play .az-seat.is-current .az-board, .pg-tv-play .az-seat.is-scoring .az-board { box-shadow: 0 0 0 7px var(--clay), 0 12px 32px rgba(0, 0, 0, .4); }

/* round scoring on the TV (TV-RoundScore-Anim): one step per seat line, motion on transform and opacity only */
.pg-tv-play .is-go .az-move { transform: translateX(calc((63 + 49 * var(--col)) * var(--tile) / 44)); z-index: 3; }
.pg-tv-play .is-go .az-leave { transform: translateX(var(--tile)); }
.pg-tv-play .az-step-floor.is-go .az-leave { transform: translateY(calc(var(--tile) * 40 / 44)); }
.pg-tv-play .az-float { font-family: var(--body); left: calc(var(--tile) * (24 + 259 + 22 + 49 * var(--col)) / 44); top: calc(var(--tile) * (24 + 49 * var(--row) - 36) / 44); font-size: calc(var(--tile) * 35 / 44); font-weight: 700; line-height: 1; white-space: nowrap; animation-name: az-float-tv; }
.pg-tv-play .az-float.az-float-floor { left: calc(var(--tile) * (24 + 34 + 49 * var(--n)) / 44); top: calc(var(--tile) * (24 + 265) / 44); }
@keyframes az-float-tv {
  0% { transform: translate(-50%, 16px); opacity: 0; }
  25% { opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translate(-50%, -40px); opacity: 0; }
}
.pg-tv-play .az-step-line .az-score { color: #1F6E43; }
.pg-tv-play .az-step-floor .az-score { color: #8A3B1C; }
.pg-tv-play .az-step-floor .az-floor { box-shadow: 0 0 0 4px #8A3B1C; border-radius: calc(var(--tile) * 9 / 44); }

/* ---- Azulejos round scoring and game over (#231). Onn 4K stick rule: motion is CSS
   transitions/keyframes on transform and opacity only, one class flip per scoring step (the
   classes come from azulejos/web/scoring.js); nothing here animates filter, box-shadow or
   backdrop-filter. The ring above is the static one, never transitioned. ---- */
.az-page .az-header { display: flex; align-items: center; gap: .7em; }
.az-title { font-family: var(--display); }
.az-roller { position: relative; overflow: hidden; height: 1.5em; min-width: 8em; text-align: center; }
.az-round-label, .az-final-pill { position: absolute; left: 0; right: 0; top: 0; line-height: 1.5em; transition: transform .5s ease, opacity .5s ease; }
.az-round-label { transform: translateY(0); opacity: 1; }
.az-final-pill { transform: translateY(100%); opacity: 0; }
.az-header.is-final .az-round-label { transform: translateY(-100%); opacity: 0; }
.az-header.is-final .az-final-pill { transform: translateY(0); opacity: 1; }
.az-final-pill span { display: inline-block; background: var(--white); color: var(--ink); font-weight: 800; border-radius: 999px; padding: 0 .9em; }
.az-turn-pill { margin-left: auto; background: var(--clay); color: var(--ink); font-family: var(--body); font-weight: 700; border-radius: 999px; padding: .15em .9em; white-space: nowrap; }

/* the scoring step motion: the wall tile snaps right, the leftovers leave, one is-go flip */
.az-move, .az-leave { transition: transform .8s ease, opacity .8s ease; }
.is-go .az-move { transform: translateX(calc(var(--dx) * var(--tile))); }
.is-go .az-leave { transform: translateX(var(--tile)); opacity: 0; }

/* the +n / −n float: large white number, hard black drop shadow, no pill, one continuous
   upward float of about 1.1 s — in by 25%, out over the last 40%, no hold */
.az-float { position: absolute; left: calc(var(--fx) * var(--tile)); top: calc(var(--fy) * var(--tile)); z-index: 4; pointer-events: none; color: var(--white); font-family: var(--display); font-size: 35px; font-weight: 800; text-shadow: 3px 3px 0 #000; animation: az-float 1.1s ease-out forwards; }
@keyframes az-float {
  0% { transform: translateY(16px); opacity: 0; }
  25% { opacity: 1; }
  60% { opacity: 1; }
  100% { transform: translateY(-40px); opacity: 0; }
}

/* the new round's factories fade in */
.az-factories.az-fill { opacity: 0; transition: opacity .6s ease; }
.az-factories.az-fill.is-go { opacity: 1; }

/* the phone scoring stage: each other player's board slides in from the right, done boards
   leave to the left (Phone-RoundScore-Anim, owner 2026-11-29) */
.az-stage { position: absolute; inset: 0; overflow: hidden; z-index: 6; }
.az-stage-slot { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; transform: translateX(105%); transition: transform .55s ease, opacity .55s ease; }
.az-stage-slot.is-in { transform: translateX(0); }
.az-stage-slot.is-out { transform: translateX(-105%); opacity: 0; }

/* The game-over panel (TV-GameOver, Phone-GameOver, Phone-GameOver-Tie, owner-approved
   2026-11-29; built by azulejos/web/scoring.js overPanel). Solid colors only, nothing
   see-through over the table (vault games-screens); the winner rings are static box-shadows,
   never transitioned. Shared parts first, then the TV and the phone layouts. */
.az-over { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; box-sizing: border-box; color: var(--cream); font-family: var(--body); background: radial-gradient(circle farthest-corner at 50% 35%, var(--teal-center), var(--teal-mid) 50%, var(--teal-edge)); }
.az-over-words { display: flex; flex-direction: column; }
.az-over-title { font-family: var(--display); font-weight: 700; line-height: 1; color: var(--cream); }
.az-over-byline { color: #C9D6DA; }
.az-over-strip { display: flex; }
.az-over-badge { background: var(--clay); color: var(--ink); font-weight: 700; border-radius: 999px; white-space: nowrap; }
.az-over-final { font-family: var(--display); font-weight: 700; }
.az-over-tie { background: var(--ink); color: var(--cream); display: flex; align-items: flex-start; }
.az-over-tie-icon { flex-shrink: 0; color: #F2B48F; font-weight: 800; line-height: 1; }
.az-over-buttons { display: flex; }
.az-over-again, .az-over-games { font: inherit; font-weight: 700; border-radius: 8px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; text-align: center; }
.az-over-again { background: var(--clay); color: var(--ink); border: 0; }
.az-over-games { background: #0A1A1F; color: var(--cream); border: 2px solid #8E9B9A; }
.az-over-wins { color: #C9D6DA; }
.az-over-wins:empty { display: none; }

/* the game-over boards move the gradient up over the panel: phone 195px 220px of 390x844 (26%), TV 960px 400px of 1920x1080 (37%) */
/* TV: headline left, tile strip right; the cream table; buttons left, Wins now right */
.az-over-tv { padding: 56px 160px 48px; gap: 40px; }
.az-over-tv.az-over { background: radial-gradient(circle farthest-corner at 50% 37%, var(--teal-center), var(--teal-mid) 50%, var(--teal-edge)); }
.az-over-tv .az-over-top { display: flex; flex-direction: row-reverse; align-items: flex-end; justify-content: space-between; }
.az-over-tv .az-over-words { gap: 14px; }
.az-over-tv .az-over-title { font-size: 120px; }
.az-over-tv .az-over-byline { font-size: 28px; }
.az-over-tv .az-over-strip { gap: 14px; }
.az-over-tv .az-over-strip .az-tile { width: 84px; height: 84px; }
.az-over-tv .az-over-tie { border-radius: 14px; padding: 16px 22px; gap: 14px; font-size: 24px; }
.az-over-tv .az-over-tie-icon { font-size: 28px; }
.az-over-tv .az-over-table { background: var(--cream); color: var(--ink); border-radius: 24px; padding: 12px 36px; }
.az-over-tv .az-over-tr { display: grid; grid-template-columns: 1fr 170px 170px 200px 200px 190px; align-items: center; padding: 20px; margin: 0 -20px; border-radius: 16px; border-bottom: 1px solid #E2D8C6; }
.az-over-tv .az-over-tr:last-child, .az-over-tv .az-over-tr.is-won { border-bottom: 0; }
.az-over-tv .az-over-tr.is-won { background: var(--white); box-shadow: 0 0 0 4px var(--clay); }
.az-over-tv .az-over-head { padding: 18px 0; margin: 0; border-radius: 0; border-bottom: 2px solid #CDBFA7; font-size: 18px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #5E554B; }
.az-over-tv .az-over-th { text-align: right; }
.az-over-tv .az-over-th-name { text-align: left; }
.az-over-tv .az-over-name { display: flex; align-items: center; gap: 18px; }
.az-over-tv .az-over-player { font-family: var(--display); font-size: 40px; font-weight: 700; }
.az-over-tv .az-over-badge { font-size: 20px; padding: 6px 16px; }
.az-over-tv .az-over-cell { display: flex; flex-direction: column; align-items: flex-end; }
.az-over-tv .az-over-pts { font-size: 30px; font-weight: 600; }
.az-over-tv .az-over-count { font-size: 17px; color: #5E554B; }
.az-over-tv .az-over-final { text-align: right; font-size: 52px; }
.az-over-tv .az-over-foot { display: flex; justify-content: space-between; align-items: center; }
.az-over-tv .az-over-buttons { gap: 24px; }
.az-over-tv .az-over-again, .az-over-tv .az-over-games { height: 72px; min-height: 72px; padding: 0 34px; font-size: 26px; }
.az-over-tv .az-over-wins { font-size: 24px; }
.pg-tv .az-over-tv .az-over-again, .pg-tv .az-over-tv .az-over-games { font-weight: 700; }
.pg-tv .az-over-tv .is-tv-focus { outline: 5px solid var(--cream); outline-offset: 4px; box-shadow: 0 0 0 4px #0A1A1F; }

/* phone: the strip above the headline; the tie box above one card per player; buttons stacked */
.az-over-phone { padding: 20px 16px 16px; gap: 14px; overflow-y: auto; }
.az-over-phone.az-over { background: radial-gradient(circle farthest-corner at 50% 26%, var(--teal-center), var(--teal-mid) 50%, var(--teal-edge)); }
.az-over-phone .az-over-top { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.az-over-phone .az-over-words { align-items: center; gap: 8px; }
.az-over-phone .az-over-title { font-size: 40px; line-height: 1.05; }
.az-over-phone .az-over-byline { font-size: 14px; }
.az-over-phone .az-over-strip { gap: 6px; }
.az-over-phone .az-over-strip .az-tile { width: 32px; height: 32px; }
.az-over-phone .az-over-tie { border-radius: 14px; padding: 12px 14px; gap: 10px; font-size: 13px; line-height: 1.45; }
.az-over-phone .az-over-tie-icon { font-size: 18px; }
.az-over-cards { display: flex; flex-direction: column; gap: 8px; }
.az-over-card { background: rgba(4, 12, 15, .6); color: var(--cream); border-radius: 18px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.az-over-card.is-won { background: var(--cream); color: var(--ink); box-shadow: 0 0 0 3px var(--clay); }
.az-over-card-top { display: flex; align-items: center; gap: 8px; }
.az-over-card .az-over-player { font-family: var(--display); font-size: 19px; font-weight: 700; flex-grow: 1; }
.az-over-card .az-over-badge { font-size: 12px; padding: 4px 10px; }
.az-over-card .az-over-final { font-size: 26px; min-width: 40px; text-align: right; }
.az-over-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.az-over-stat { display: flex; flex-direction: column; }
.az-over-label { font-size: 11px; font-weight: 600; color: #C9D6DA; }
.az-over-card.is-won .az-over-label { color: #5E554B; }
.az-over-val { font-size: 14px; font-weight: 700; }
.az-over-phone .az-over-foot { margin-top: auto; }
.az-over-phone .az-over-buttons { flex-direction: column; gap: 8px; }
.az-over-phone .az-over-again { height: 52px; border-radius: 5px; font-size: 16px; }
.az-over-phone .az-over-games { height: 48px; border-radius: 5px; border-width: 1.5px; font-size: 15px; font-weight: 600; }

/* ---- How to play, Azulejos Wins, Past games (#232). Rule steps are cream cards with ink text;
   the score example borrows the +n float look (white, display font, hard black drop shadow) but
   sits still — no animation, no pill (owner comment 2026-11-29). Sizes are em so the TV's 28px
   base scales them for the couch. Look per mockup v88 row "How to play, Wins, past games (#232)". ---- */
.az-page .pg-back { width: auto; margin: 8px 16px; }
/* How to play per Phone-HowToPlay / TV-HowToPlay (#327): cream step cards, Fraunces titles with a clay number. */
.az-rules { display: flex; flex-direction: column; gap: 14px; padding-bottom: 32px; }
.az-rules > .pg-banner-holder, .az-rules > .az-head { flex: none; }
.az-rules-intro { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 16px 8px; }
.az-rules-intro .az-strip .az-tile { width: 36px; height: 36px; }
.az-rules-sub { margin: 0; font-size: 13px; color: #C9D6DA; text-align: center; }
.az-rule-list { display: flex; flex-direction: column; gap: 14px; margin: 0 16px; }
.az-rule-step { display: flex; flex-direction: column; gap: 10px; box-sizing: border-box; text-align: left; font: inherit; background: var(--cream); color: var(--ink); border: 0; border-radius: 18px; padding: 16px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.az-rule-title { font-family: var(--display); font-size: 22px; font-weight: 700; margin: 0; line-height: 1.2; }
.az-rule-num { color: var(--clay); }
.az-rule-line { margin: 0; font-size: 15px; line-height: 1.5; }
.az-rule-line .az-token { --tile: 1.25em; vertical-align: middle; margin: 0 2px; font-size: 1em; }
.az-rule-line .az-token { background: #E2D8C6; border: 1px solid #CDBFA7; border-radius: 4px; box-sizing: border-box; }
.az-rule-line .az-token::after { content: none; }
.az-rule-art { display: flex; gap: 4px; }
.az-rule-row { display: flex; gap: 4px; align-items: center; }
.az-rule-art .az-tile:not(.az-token), .az-rule-row .az-tile { width: 30px; height: 30px; box-sizing: border-box; border-style: solid; border-width: 2.5px; border-radius: 5px; overflow: hidden; flex: none; }
.az-rule-art .az-tile::after, .az-rule-row .az-tile::after { content: none; }
.az-rule-art .az-blue, .az-rule-row .az-blue { border-color: #A6CFE5 #264F65 #264F65 #A6CFE5; }
.az-rule-art .az-yellow { border-color: #FFD593 #805514 #805514 #FFD593; }
.az-rule-art .az-red { border-color: #E9A39E #6A231F #6A231F #E9A39E; }
.az-rule-art .az-black { border-color: #808080 #000000 #000000 #808080; }
.az-rule-art .az-white { border-color: #FFFFFF #808080 #808080 #FFFFFF; }
.az-rule-slot { width: 30px; height: 30px; border-radius: 5px; background: #E2D8C6; box-shadow: inset 0 0 0 1px #CDBFA7; display: block; flex: none; }
.az-floor-cost { width: 30px; height: 30px; border-radius: 5px; background: #E9DED0; box-shadow: inset 0 0 0 1px #CDBFA7; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #8A3B1C; }
.az-art-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.az-bonus-chip { background: #E2D8C6; border-radius: 10px; padding: 8px; display: flex; flex-direction: column; align-items: center; }
.az-bonus-n { font-family: var(--display); font-size: 20px; font-weight: 700; }
.az-bonus-what { font-size: 12px; color: #5E554B; }
.az-rules-setup { background: rgba(4, 12, 15, .6); border-radius: 18px; padding: 14px 16px; margin: 0 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; color: #C9D6DA; }
.az-rules-setup-title { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--cream); }
.az-tile.is-dim { opacity: .22; filter: grayscale(.6); }
.az-rule-score { color: var(--white); font-family: var(--display); font-size: 1.4em; font-weight: 800; text-shadow: 3px 3px 0 #000; }
/* Wins and Past games (#328, boards Phone-Wins, Phone-PastGames, Phone-PastGames-Error) */
.az-wins, .az-past { display: flex; flex-direction: column; min-height: 100vh; }
.pg-body { flex-grow: 1; min-height: 0; padding: 16px; box-sizing: border-box; display: flex; flex-direction: column; }
.pg-wins-body { gap: 12px; }
.pg-past-body { gap: 10px; }
.az-wins .pg-wins-list, .az-past .pg-past-list { display: flex; flex-direction: column; margin: 0; padding: 0; }
.az-wins .pg-wins-list { gap: 12px; }
.az-past .pg-past-list { gap: 10px; }
.pg-win-row, .pg-past-row { border: 0; font: inherit; text-align: left; box-sizing: border-box; display: flex; flex-direction: column; }
.pg-win-row { padding: 14px 16px; gap: 10px; }
.pg-past-row { padding: 12px 14px; gap: 8px; }
.pg-win-lead { box-shadow: 0 0 0 3px var(--clay), 0 8px 24px rgba(0, 0, 0, .35); }
.pg-win-top { display: flex; align-items: center; gap: 10px; }
.pg-win-who { flex-grow: 1; display: flex; flex-direction: column; gap: 2px; }
.pg-win-name { font-family: var(--display); font-size: 22px; font-weight: 700; }
.pg-win-note { font-size: 12px; color: #C9D6DA; }
.pg-win-lead .pg-win-note { color: #5E554B; }
.pg-win-count { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; }
.pg-pips { gap: 5px; flex-wrap: wrap; }
.pg-pips .az-tile { width: 28px; height: 28px; border-width: 2.5px; border-radius: 5px; box-shadow: none; }
.pg-wins-notes { display: flex; flex-direction: column; gap: 4px; padding: 4px 2px; line-height: 1.5; }
.pg-wins-note { font-size: 13px; color: #C9D6DA; margin: 0; }
.pg-past-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pg-past-day { font-size: 14px; font-weight: 700; }
.pg-past-result { font-family: var(--display); font-size: 16px; font-weight: 700; color: #F2B48F; }
.pg-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pg-chip { height: 30px; box-sizing: border-box; padding: 0 10px; display: inline-flex; align-items: center; gap: 6px; background: #E2D8C6; color: var(--ink); font-size: 13px; font-weight: 600; }
.pg-chip-won { background: #F2B48F; }
.pg-chip-guest { font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #5E554B; }
.pg-past-note { font-size: 12px; color: #C9D6DA; }
.pg-chip-score { font-family: var(--display); font-size: 15px; font-weight: 700; }
.pg-past-error { padding: 18px; box-sizing: border-box; display: flex; flex-direction: column; gap: 10px; }
.pg-past-error-box:empty { display: none; }
.pg-past-error-box:not(:empty) { margin-bottom: 4px; }
.pg-error-title { font-family: var(--display); font-size: 20px; font-weight: 700; margin: 0; }
.pg-error-text { font-size: 15px; line-height: 1.5; margin: 0; }
.pg-error-safe { font-size: 13px; line-height: 1.5; color: #5E554B; margin: 0; }
.pg-error-retry { background: var(--ink); color: #FFFFFF; border: 0; cursor: pointer; }
.az-past .pg-empty { margin: 0; }

/* TV: full-width rows, text left, at least 72px tall, readable from the couch */
.pg-tv .pg-win-row, .pg-tv .pg-past-row { width: 100%; box-sizing: border-box; text-align: left; min-height: 72px; }
.pg-tv .az-rules { padding: 64px 96px; gap: 40px; box-sizing: border-box; min-height: 100vh; }
.az-rules-top { display: flex; align-items: flex-end; justify-content: space-between; }
.az-rules-titles { display: flex; flex-direction: column; gap: 14px; }
.pg-tv .az-rules .az-header.az-head { height: auto; padding: 0; background: transparent; position: static; }
.pg-tv .az-rules .az-head-title { font-size: 96px; line-height: 1; }
.pg-tv .az-rules-sub { font-size: 26px; text-align: left; }
.az-rules-actions { display: flex; gap: 24px; }
.pg-tv .az-tv-btn { display: inline-flex; align-items: center; height: 72px; padding: 0 34px; border-radius: 8px; font: inherit; font-size: 26px; font-weight: 700; box-sizing: border-box; border: 2px solid rgba(242, 235, 221, .5); background: transparent; color: var(--cream); }
.pg-tv .az-tv-new { background: var(--clay); color: var(--ink); border: 0; }
.pg-tv .az-rule-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin: 0; flex-grow: 1; }
.pg-tv .az-rule-step { border-radius: 24px; padding: 32px; gap: 22px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); width: auto; min-height: 0; }
.pg-tv .az-rule-title { font-size: 48px; line-height: 1; }
.pg-tv .az-rule-line { font-size: 26px; line-height: 1.4; }
.pg-tv .az-rule-art { height: 150px; align-items: center; gap: 6px; }
.pg-tv .az-rule-art .az-tile:not(.az-token), .pg-tv .az-rule-row .az-tile { width: 52px; height: 52px; border-width: 4px; border-radius: 8px; }
.pg-tv .az-rule-slot, .pg-tv .az-floor-cost { width: 52px; height: 52px; border-radius: 8px; }
.pg-tv .az-floor-cost { font-size: 20px; }
.pg-tv .az-art-tv-place { flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px; }
.pg-tv .az-rule-floor-label { font-size: 18px; font-weight: 700; color: #8A3B1C; width: 64px; }
.az-rule-plate { position: relative; width: 150px; height: 150px; display: flex; align-items: center; justify-content: center; }
.az-rule-plate-img { position: absolute; inset: 0; width: 150px; height: 150px; }
.az-rule-plate-tiles { position: relative; display: grid; grid-template-columns: 42px 42px; gap: 22px; }
.pg-tv .az-rule-art .az-rule-plate-tiles .az-tile:not(.az-token) { width: 42px; height: 42px; }
.pg-tv .az-rule-plate-tiles .az-tile.is-picked { transform: none; animation: none; box-shadow: 0 0 0 4px var(--clay); z-index: auto; }
.az-rule-yellow { position: relative; display: block; }
.pg-tv .az-rule-yellow .az-tile.is-picked { transform: none; animation: none; box-shadow: 0 0 0 4px var(--clay); z-index: auto; }
.pg-tv .az-rule-yellow .az-rule-score { position: absolute; left: 50%; top: -44px; transform: translateX(-50%); font-size: 35px; font-weight: 700; line-height: 1; white-space: nowrap; }
.pg-tv .az-art-tv-win { flex-direction: column; align-items: flex-start; justify-content: center; gap: 10px; }
.pg-tv .az-art-tv-win .az-strip { gap: 6px; }
.pg-tv .az-art-tv-win .az-strip .az-tile { width: 52px; height: 52px; box-shadow: none; }
.az-rule-caption { font-size: 20px; font-weight: 700; color: #5E554B; }

/* ---- Desktop and tablet (#296). Site pages: a centered column, the Games home with a side column
   that drops below the list under 900 px (mockups Desktop-Games, Tablet-Games, Desktop-Account, v132).
   Game screens: the 390x844 phone screen scaled to the window height, centered, the game background
   outside (Desktop-Game, Tablet-Game). Only transform is used for the scale. ---- */
.pg-wrap { max-width: 1040px; margin: 0 auto; padding: 32px 24px 48px; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.pg-column { max-width: 640px; margin: 0 auto; padding: 32px 24px 48px; box-sizing: border-box; }
@media (max-width: 900px) {
  .pg-wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .pg-wrap { padding: 16px; }
}
.pg-fit { display: flex; justify-content: center; overflow: hidden; height: 100vh; height: 100dvh; background: radial-gradient(circle farthest-corner at 50% 36%, #1F4B5B, #040C0F 70%); }
.pg-fit > .pg-screen { flex: none; width: 390px; height: 844px; min-height: 0; overflow-y: auto; transform: scale(var(--pg-scale, 1)); transform-origin: top center; box-shadow: 0 0 40px rgba(0, 0, 0, .55); }
.pg-fit > .pg-play { height: 844px; overflow: hidden; }

/* Game menu (canvas v134): dropdown under the 56 px play header, ink panel, 48 px rows */
.pg-menu-button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; }
.pg-menu-button.is-off { display: none; }
.pg-menu-button svg { width: 22px; height: 22px; }
.pg-play .az-header.pg-play-head { height: 56px; flex-shrink: 0; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 8px 0 16px; background: var(--ink); font-family: var(--body); }
.pg-head-text { display: flex; flex-direction: column; min-width: 0; }
.pg-head-text .az-title { font-family: var(--display); font-size: 20px; font-weight: 700; line-height: 24px; }
.pg-head-round { font-weight: 400; font-size: 12px; line-height: 16px; color: #BDB2A2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-head-right { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.pg-turn-pill { font-size: 13px; font-weight: 700; line-height: 16px; padding: 6px 12px; border-radius: 999px; color: var(--ink); white-space: nowrap; background: var(--clay); }
/* the boards' header padding is 16px both sides; in play the 8px right edge is for the ☰ button, so the Game over pill takes it back */
.pg-turn-pill.is-over { margin-right: 8px; }
.pg-turn-pill.is-waiting { background: #BDB2A2; }
.pg-play { position: relative; }
.pg-game-menu { position: absolute; top: 60px; right: 8px; z-index: 6; width: 240px; box-sizing: border-box; background: var(--ink); color: var(--cream); border-radius: 14px; padding: 6px 0 10px; }
.pg-game-menu-row { display: block; width: 100%; height: 48px; padding: 0 16px; text-align: left; font: inherit; font-weight: 600; color: inherit; background: transparent; border: 0; }
.pg-game-menu-note { margin: 6px 16px 0; font-size: 13px; color: #C9D6DA; }
.pg-menu-backdrop { position: absolute; left: 0; right: 0; top: 56px; bottom: 0; z-index: 5; border: 0; padding: 0; background: rgba(4, 12, 15, .78); }

/* ---- New game, Waiting and Join ask (#325): Phone-NewGame, Phone-Waiting, Phone-Accept ---- */
.pg-newgame-body { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 18px; }
.pg-block { display: flex; flex-direction: column; gap: 8px; }
.pg-spacer { flex: 1; }
.pg-bottom { display: flex; flex-direction: column; gap: 10px; }
.pg-note, .pg-alert-line, .pg-cancel-note, .pg-seat-random { font-size: 13px; line-height: 1.45; color: #C9D6DA; }
.az-card .pg-seat { min-height: 56px; padding: 0 14px; box-sizing: border-box; border-bottom: 1px solid rgba(28, 26, 23, .12); }
.az-card .pg-seat:last-child { border-bottom: 0; }
.pg-seat-group { padding: 10px 14px 4px; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #5E554B; }
.az-tv-who .pg-seat-group { grid-column: 1 / -1; padding: 0; font-size: 22px; letter-spacing: 2px; color: var(--cream); }
.az-card .pg-seat-name { font-size: 17px; font-weight: 600; }
.pg-seats.az-card { padding: 0; gap: 0; }
.pg-seat input { width: 24px; height: 24px; margin: 0; accent-color: var(--clay); flex-shrink: 0; }
.pg-you { font-size: 13px; color: #5E554B; }
.pg-guests.az-card-dark { padding: 10px 14px; gap: 12px; }
.pg-guests.az-card-dark .pg-guest-label { font-size: 15px; flex-grow: 1; }
.pg-guest-btn { width: 44px; height: 44px; padding: 0; border-radius: 5px; border: 1.5px solid rgba(242, 235, 221, .5); background: transparent; color: var(--cream); font: inherit; font-size: 20px; font-weight: 700; }
.pg-guest-btn:disabled { border-color: rgba(242, 235, 221, .2); color: rgba(242, 235, 221, .35); }
.pg-guests.az-card-dark .pg-guest-count { font-family: var(--display); font-size: 28px; font-weight: 700; width: 24px; min-width: 0; text-align: center; }
.pg-seat-line { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px; }
.pg-seat-count { font-size: 15px; font-weight: 600; }
.pg-newgame-body .pg-start { margin: 0; border: 0; font-size: 16px; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.pg-seats-head { display: flex; justify-content: space-between; align-items: baseline; }
.pg-seats-count { font-size: 13px; color: #C9D6DA; }
.az-card .pg-seat-state { font-size: 12px; font-weight: 700; padding: 4px 10px; }
.az-pill.is-joined { background: #1F4B5B; color: var(--cream); }
.az-pill.is-waiting { background: #E4DACA; color: #5E554B; }
.az-pill.is-declined { background: var(--clay); color: var(--ink); }
.az-card .pg-seat-drop { min-height: 40px; height: 40px; padding: 0 12px; border: 1.5px solid #9A8E7E; border-radius: 5px; color: var(--ink); font-size: 13px; font-weight: 600; }
.pg-join-block.az-card-dark { flex-direction: row; align-items: center; gap: 14px; padding: 14px; }
.pg-join-block.az-card-dark .pg-qr { width: 96px; height: 96px; flex-shrink: 0; border-radius: 10px; background: #fff; overflow: hidden; }
.pg-join-block.az-card-dark .pg-qr img { width: 96px; height: 96px; display: block; }
.pg-join-col { display: flex; flex-direction: column; gap: 8px; flex-grow: 1; min-width: 0; }
.pg-join-label { font-size: 12px; color: #C9D6DA; }
.pg-join-block.az-card-dark .pg-join-code { font-size: 34px; font-weight: 700; letter-spacing: 4px; line-height: 1; }
.pg-code-a { margin-right: .3em; }
.pg-share { height: 40px; border-radius: 5px; border: 0; background: var(--cream); color: var(--ink); font: inherit; font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px; }
.pg-newgame-body .pg-cancel { font-size: 15px; font-weight: 600; height: 48px; }
.pg-ask { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.pg-ask-title { font-family: var(--display); font-size: 26px; font-weight: 700; line-height: 1.15; margin: 0; }
.pg-ask-seats { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.pg-ask-seat { display: flex; justify-content: space-between; }
.pg-ask-name.is-you { font-weight: 700; }
.pg-ask-state { color: #5E554B; }
.pg-ask-state.is-joined { color: #1F4B5B; font-weight: 700; }
.pg-ask-rule { margin: 0; font-size: 13px; color: #5E554B; line-height: 1.4; }
.pg-ask-buttons { display: flex; gap: 8px; }
.pg-ask-buttons .az-btn { width: 50%; font-size: 16px; }
.pg-ask-buttons .pg-join-no { background: var(--ink); color: #fff; border: 1.5px solid rgba(242, 235, 221, .5); }
.pg-ask-buttons .pg-join-yes { border: 0; }
.pg-you-right { margin-left: auto; }

/* ---- Invite a friend (#269, board Family-Invite) and its card on the Games home ---- */
.pg-invite-friend { display: block; width: 100%; box-sizing: border-box; padding: 16px 18px; background: #fffaf0; color: var(--ink); border: 4px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); font-family: var(--body); font-size: 16px; font-weight: 700; text-align: left; margin-top: 18px; }
.pg-games-home .pg-side { display: flex; flex-direction: column; }
.pg-friends {
  min-height: 100vh; color: #f7f3ff; box-sizing: border-box;
  background:
    repeating-linear-gradient(45deg, transparent 0 22px, rgba(255, 255, 255, .07) 22px 26px),
    linear-gradient(180deg, #050816, #0B1026 50%, #1D2B64);
}
.pg-friends .pg-banner-holder { flex: none; }
.pg-friends-header { height: 60px; flex: none; box-sizing: content-box; display: flex; align-items: center; gap: 6px; padding: 0 16px 0 4px; background: #fffaf0; color: var(--ink); border-bottom: 4px solid var(--ink); }
.pg-friends-back { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: inherit; padding: 0; }
.pg-friends-chevron { width: 22px; height: 22px; display: block; }
.pg-friends-chevron svg { width: 100%; height: 100%; display: block; }
.pg-friends-title { font-family: var(--display); font-size: 20px; font-weight: 400; margin: 0; }
.pg-friends-body { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 16px; box-sizing: border-box; display: flex; flex-direction: column; gap: 18px; }
.pg-friends-card { background: #fffaf0; color: var(--ink); border: 4px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink); box-sizing: border-box; }
.pg-friends-form { padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.pg-friends-label { display: flex; flex-direction: column; gap: 6px; }
.pg-friends-label-text { font-size: 14px; font-weight: 700; }
.pg-friends-field { height: 52px; width: 100%; box-sizing: border-box; border: 3px solid var(--ink); border-radius: 12px; background: #fff; padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink); }
.pg-friends-help { font-size: 13px; font-weight: 500; line-height: 1.4; color: #4a4a4a; }
.pg-friends-send { height: 52px; box-sizing: content-box; background: var(--yellow); font-size: 16px; }
.pg-friends-sent:empty { display: none; }
.pg-friends-sent { display: flex; gap: 10px; align-items: center; background: #ddf8e8; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px; }
.pg-friends-check { width: 20px; height: 20px; flex: none; display: block; }
.pg-friends-check svg { width: 100%; height: 100%; display: block; }
.pg-friends-sent-text { font-size: 14px; font-weight: 500; }
.pg-friends-section { display: flex; flex-direction: column; gap: 8px; }
.pg-friends-section .pg-kick { margin: 0; color: #f7f3ff; }
.pg-friends-list { display: flex; flex-direction: column; overflow: hidden; }
.pg-friends-row { box-sizing: content-box; display: flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 14px; border-bottom: 2px solid var(--ink); }
.pg-friends-row:last-child { border-bottom: 0; }
.pg-friends-name { flex-grow: 1; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.pg-friends-pending .pg-friends-name { font-weight: 500; color: #4a4a4a; }
.pg-friends-by { font-size: 13px; font-weight: 500; color: #4a4a4a; }
.pg-friends-chip { font-size: 13px; font-weight: 700; background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 2px 8px; flex: none; }
.pg-friends-empty { margin: 0; padding: 16px 14px; font-size: 14px; color: #4a4a4a; }
.pg-friends-note { font-size: 13px; line-height: 1.4; color: #c9cef0; }
.pg-friends .pg-banner { margin: 12px 16px 0; }

/* ---- Account page and first sign-in name (#270, boards Friend-Account, Desktop-Account, Friend-PickName) ---- */
.pg-name-head { display: flex; flex-direction: column; gap: 8px; }
.pg-name-kick { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.pg-name-title { font-family: var(--display); font-size: 28px; line-height: 1.15; font-weight: 400; margin: 0; color: #fffaf0; text-shadow: 3px 3px 0 var(--ink); }
.pg-name .pg-friends-body { padding: 56px 20px 24px; gap: 24px; }
.pg-name .pg-friends-header + .pg-friends-body { padding-top: 24px; }
.pg-name .pg-friends-form { padding: 20px 18px; gap: 14px; }
.pg-name .pg-friends-field { height: 56px; font-size: 20px; font-weight: 700; }
.pg-name .pg-friends-help { font-size: 14px; color: #3a3a3a; }
.pg-name-error:empty { display: none; }
.pg-name-error { display: flex; gap: 10px; align-items: flex-start; background: #ffe3f1; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px; }
.pg-name-error-icon { width: 20px; height: 20px; flex: none; margin-top: 1px; display: block; }
.pg-name-error-icon svg { width: 100%; height: 100%; display: block; fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; }
.pg-name-error-text { font-size: 14px; font-weight: 500; line-height: 1.4; }
.pg-name-spacer { flex-grow: 1; }
.pg-name-go { height: 56px; box-sizing: content-box; background: var(--pink); font-size: 17px; }
.pg-acct .pg-friends-body { padding: 16px; gap: 18px; }
.pg-acct-h1 { display: none; margin: 0; font-family: var(--display); font-size: 28px; font-weight: 400; color: #fffaf0; text-shadow: 3px 3px 0 var(--ink); }
.pg-acct-title-desk { display: none; }
.pg-acct-card { display: flex; flex-direction: column; overflow: hidden; }
.pg-acct-row { box-sizing: content-box; display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 0 14px; border: 0; border-bottom: 2px solid var(--ink); background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.pg-acct-card > .pg-acct-row:last-child, .pg-acct-card > .pg-acct-panel:last-child { border-bottom: 0; }
.pg-acct-text { display: flex; flex-direction: column; flex-grow: 1; min-width: 0; }
.pg-acct-label { font-size: 12px; font-weight: 700; color: #4a4a4a; }
.pg-acct-row-plain .pg-acct-label { font-size: 16px; color: var(--ink); }
.pg-acct-value { font-size: 16px; font-weight: 500; overflow-wrap: anywhere; }
.pg-acct-name { font-size: 17px; font-weight: 700; }
.pg-acct-change { font-size: 14px; font-weight: 700; text-decoration: underline; flex: none; }
.pg-acct-panel { display: none; flex-direction: column; gap: 12px; padding: 14px; border-bottom: 2px solid var(--ink); background: #fff5df; }
.pg-acct-panel.pg-open { display: flex; }
.pg-acct-codestep { display: none; flex-direction: column; gap: 12px; }
.pg-acct-codestep.pg-open { display: flex; }
.pg-acct .pg-friends-send { background: var(--yellow); }
.pg-acct-alerts { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.pg-acct-ios-hint { display: flex; gap: 10px; align-items: flex-start; background: #e3fafa; border: 3px solid var(--ink); border-radius: 12px; padding: 10px 12px; }
.pg-acct-ios-icon { width: 20px; height: 20px; flex: none; margin-top: 1px; display: block; }
.pg-acct-ios-icon svg { width: 100%; height: 100%; display: block; fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pg-acct-ios-text { font-size: 13px; font-weight: 500; line-height: 1.4; }
.pg-acct-switch .pg-switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 0; }
.pg-acct-switch .pg-switch-label { display: flex; flex-direction: column; gap: 2px; font-size: 16px; font-weight: 700; }
/* the switch looks like the boards (Friend-Account, Desktop-Account): 52x30, grey track off and
   green on, cream round knob, 3px ink borders (#271) */
.pg-acct-switch .pg-switch-knob { width: 52px; height: 30px; flex: none; box-sizing: border-box; padding: 0; border-radius: 20px; border: 3px solid var(--ink, #111); background: #ddd; }
.pg-acct-switch .pg-switch-knob::after { content: ""; position: absolute; top: 2px; left: 2px; right: auto; bottom: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--paper, #fffaf0); border: 3px solid var(--ink, #111); box-sizing: border-box; opacity: 1; }
.pg-acct-switch .pg-switch-knob.pg-on { background: var(--green, #3ddc84); }
.pg-acct-switch .pg-switch-knob.pg-on::after { left: 24px; }
.pg-acct-switch-note { font-size: 13px; font-weight: 500; color: #4a4a4a; }
.pg-acct-alerts .pg-friends-help { font-size: 13px; color: #4a4a4a; }
.pg-acct-signout { height: 52px; box-sizing: content-box; background: #fffaf0; font-size: 16px; }
.pg-acct-desk-only { display: none; }
.pg-acct .pg-friends-sent { margin-top: 8px; }
@media (min-width: 900px) {
  .pg-acct .pg-friends-header { height: 68px; padding: 0 max(24px, calc((100% - 1040px) / 2 + 12px)); }
  .pg-acct-title-phone { display: none; }
  .pg-acct-title-desk { display: block; font-family: var(--display); font-size: 24px; }
  .pg-acct .pg-friends-body { padding: 32px 24px 48px; gap: 22px; }
  .pg-acct-h1 { display: block; }
  .pg-acct-row { min-height: 62px; padding: 0 18px; }
  .pg-acct-alerts { padding: 14px 18px; }
  .pg-acct { position: relative; overflow: hidden; }
  .pg-acct::before { content: ""; position: absolute; width: 160px; height: 160px; border-radius: 50%; background: var(--teal-soft); border: 5px solid var(--ink); box-sizing: border-box; right: -50px; top: 160px; }
  .pg-acct .pg-friends-body { position: relative; }
  .pg-acct-phone-only, .pg-acct-alerts-line, .pg-acct-ios-hint { display: none; }
  .pg-acct-desk-only { display: inline; }
  .pg-acct-desk-line { display: block; }
  .pg-acct-signout { align-self: flex-start; padding: 0 28px; height: 50px; }
  .pg-acct .pg-name-spacer { display: none; }
}
.pg-name { position: relative; overflow: hidden; }
.pg-name::before { content: ""; position: absolute; width: 100px; height: 100px; border-radius: 50%; background: var(--teal-soft); border: 5px solid var(--ink); box-sizing: border-box; right: -30px; bottom: 150px; }
.pg-name::after { content: ""; position: absolute; width: 48px; height: 48px; background: var(--yellow); border: 5px solid var(--ink); box-sizing: border-box; left: 26px; bottom: 48px; transform: rotate(14deg); }
.pg-name .pg-friends-body, .pg-name .pg-friends-header { position: relative; z-index: 1; }

/* ---- TV screens (#330): boards TV-Menu, TV-Azulejos, TV-Cancel, TV-NewGame, TV-Join, TV-Wins,
   TV-PastGames, 1920x1080. Remote focus is the board's cream ring. Onn 4K rules: no backdrop-filter;
   nothing here animates (the TV-Menu focus lift is static). ---- */
.pg-tv .az-tv-page { padding: 64px 96px; gap: 48px; box-sizing: border-box; min-height: 100vh; }
.pg-tv .az-tv-page .is-tv-focus { outline: 5px solid var(--cream); outline-offset: 5px; box-shadow: none; }
.pg-tv .az-tv-page .pg-win-lead.is-tv-focus { box-shadow: 0 0 0 5px var(--clay), 0 16px 40px rgba(0, 0, 0, .4); }
.pg-tv .az-tv-page .pg-sheet .is-tv-focus { outline-color: var(--ink); }
.az-tv-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 48px; }
.az-tv-titles { display: flex; flex-direction: column; gap: 14px; }
.az-tv-title { margin: 0; font-family: var(--display); font-size: 96px; font-weight: 700; line-height: 1; }
.az-tv-title-s { font-size: 72px; }
.az-tv-sub { margin: 0; font-size: 28px; line-height: 31px; color: #C9D6DA; text-align: left; }
.az-tv-actions { display: flex; gap: 24px; }
.az-tv-top .az-strip { gap: 14px; }
.az-tv-top .az-strip .az-tile { width: 84px; height: 84px; border-width: 5px; border-radius: 10px; box-shadow: 0 12px 28px rgba(0, 0, 0, .4); }
.az-tv-buttons { display: flex; gap: 24px; }
.pg-tv .az-tv-btn { display: inline-flex; align-items: center; justify-content: center; height: 72px; min-height: 72px; padding: 0 34px; border-radius: 8px; font: inherit; font-size: 26px; font-weight: 700; box-sizing: border-box; text-align: center; white-space: nowrap; border: 2px solid rgba(242, 235, 221, .5); background: transparent; color: var(--cream); }
.pg-tv .az-tv-primary { background: var(--clay); color: var(--ink); border: 0; }
.pg-tv .az-tv-soft { background: rgba(242, 235, 221, .14); color: var(--cream); border: 0; }
.pg-tv .az-tv-dark { background: var(--ink); color: #fff; border: 0; }
.pg-tv .az-tv-outline { border: 2px solid rgba(242, 235, 221, .5); }
.pg-tv .az-tv-square { width: 72px; padding: 0; }
.az-tv-icon { display: block; width: 30px; height: 30px; }
.az-tv-icon svg, .az-tv-tick svg { width: 100%; height: 100%; display: block; }
.az-tv-kick, .az-home .az-tv-kick { margin: 0; font-family: var(--body); font-size: 20px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--cream); }
.az-tv-panel { background: rgba(4, 12, 15, .6); border-radius: 24px; padding: 28px 32px; display: flex; align-items: center; gap: 28px; box-sizing: border-box; color: var(--cream); font: inherit; }
.az-tv-cream { background: var(--cream); color: var(--ink); box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.az-tv-panel.az-active-card { flex-direction: row; padding: 28px 32px; gap: 28px; }
.az-tv-panel .az-row-text { flex-grow: 1; gap: 6px; min-width: 0; }
.az-tv-panel .az-row-names { font-family: var(--display); font-size: 36px; font-weight: 700; }
.az-tv-panel .az-row-line { font-size: 22px; color: #C9D6DA; }
.az-tv-cream .az-row-line { color: #5E554B; }
.az-tv-cols { display: grid; grid-template-columns: 1fr 560px; gap: 48px; flex-grow: 1; }
.az-tv-left { display: flex; flex-direction: column; gap: 18px; }
.az-tv-left > .pg-section { display: flex; flex-direction: column; gap: 18px; }
.az-tv-page.az-home .pg-section { margin: 0; }
.az-tv-page.az-home .az-tv-left > .pg-waiting { margin-top: 12px; }
.az-tv-page.az-home .az-tv-panel.pg-waiting-row { padding: 28px 32px; }
.az-tv-left > .pg-waiting { margin-top: 12px; }
.az-tv-list { display: flex; flex-direction: column; gap: 18px; }
.az-tv-list .pg-saved-row { border: 0; padding: 28px 32px; }
.az-tv-page .pg-wins-box { display: flex; flex-direction: column; gap: 18px; align-self: start; }
.pg-tv .pg-wins-panel { flex-direction: column; align-items: stretch; gap: 0; padding: 12px 32px; text-align: left; min-height: 0; width: 100%; border: 0; }
.az-tv-win { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid rgba(242, 235, 221, .12); }
.az-tv-win:last-child { border-bottom: 0; }
.az-tv-win .az-win-name { font-size: 28px; font-weight: 600; color: var(--cream); }
.az-tv-win .az-win-num { font-family: var(--display); font-size: 48px; font-weight: 700; }
.az-tv-page .az-tv-left .az-open { min-height: 72px; height: 72px; padding: 0 34px; font-size: 26px; border-radius: 8px; }

/* TV-Menu: Memphis look */
.pg-tv .pg-tv-menu { position: relative; overflow: hidden; box-sizing: border-box; padding: 40px 80px 0; gap: 44px; color: var(--ink); background: repeating-linear-gradient(45deg, transparent 0 33px, rgba(255, 255, 255, .18) 33px 37px), linear-gradient(180deg, #2B1055, #B24592 50%, #FF7E5F); }
.pg-tv-menu::before { content: ""; position: absolute; left: 170px; top: 890px; width: 120px; height: 120px; border-radius: 50%; background: #FFD23F; }
.pg-tv-menu::after { content: ""; position: absolute; left: 1822px; top: 586px; width: 80px; height: 80px; border-radius: 50%; background: #FF3EA5; }
.pg-tv-menu-head { position: relative; display: flex; align-items: center; gap: 24px; }
.pg-tv .pg-tv-menu-title { margin: 0; font-family: var(--display); font-size: 46px; font-weight: 400; background: #FFFAF0; border: 5px solid #111; border-radius: 50px; padding: 6px 30px; box-shadow: 8px 8px 0 #111; }
.pg-tv-menu-hint { font-size: 20px; font-weight: 700; color: #FFFAF0; }
.pg-tv-menu-all { position: relative; display: flex; flex-direction: column; gap: 22px; }
.pg-tv-kick { font-size: 18px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #FFFAF0; }
.pg-tv-menu-row { display: flex; gap: 40px; }
.pg-tv-card-wrap { position: relative; width: 520px; height: 380px; flex: none; }
.pg-tv .pg-tv-menu .pg-game-card { display: flex; flex-direction: column; width: 520px; height: 380px; min-height: 0; padding: 0; background: #FFFAF0; color: #111; border: 5px solid #111; border-radius: 18px; box-shadow: 10px 10px 0 #111; overflow: hidden; text-align: left; font-family: var(--body); }
.pg-tv .pg-tv-menu .pg-game-card.is-tv-focus { outline: none; transform: translate(-6px, -6px) rotate(-1deg); box-shadow: 18px 18px 0 #FF3EA5; }
.pg-tv-menu .pg-game-art { flex-grow: 1; height: auto; gap: 12px; --tile: 64px; border-bottom: 5px solid #111; }
.pg-tv-card-info { padding: 18px 26px 20px; display: flex; flex-direction: column; gap: 6px; }
.pg-tv-menu .pg-game-name { padding: 0; font-family: var(--display); font-size: 34px; line-height: 1; }
.pg-tv-menu .pg-game-meta { padding: 0; font-size: 21px; font-weight: 700; color: #111; opacity: 1; }
.pg-going { position: absolute; right: 31px; bottom: 25px; background: #FFD23F; color: #111; border: 3px solid #111; border-radius: 30px; padding: 4px 14px; font-size: 18px; font-weight: 700; box-shadow: 3px 3px 0 #111; transform-origin: -139px -129px; }
.pg-going:empty { display: none; }
.pg-game-card.is-tv-focus + .pg-going { transform: translate(-6px, -6px) rotate(-1deg); }
.pg-tv .pg-tv-menu .pg-game-slot { width: 520px; height: 380px; border: 5px dashed rgba(255, 250, 240, .6); border-radius: 18px; }

/* TV-Cancel: the cream box */
.pg-tv .pg-sheet { justify-content: center; }
.pg-tv .pg-sheet .pg-sheet-panel { width: 880px; max-width: none; padding: 56px 64px; border-radius: 24px; box-shadow: 0 24px 64px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 28px; }
.pg-tv .pg-sheet .pg-dialog-title { margin: 0; font-size: 64px; line-height: 1; }
.pg-tv .pg-sheet .pg-sheet-players { font-size: 30px; font-weight: 700; padding: 0; }
.pg-tv .pg-sheet .pg-sheet-status { font-size: 24px; padding: 0; }
.pg-tv .pg-sheet .pg-sheet-players + .pg-sheet-status { margin-top: -22px; }
.pg-tv .pg-sheet .pg-dialog-text { font-size: 26px; line-height: 1.45; padding: 0; }
.pg-tv .pg-sheet .pg-dialog-buttons { gap: 24px; padding: 0; margin-top: 8px; }
.pg-tv .pg-sheet .az-btn { flex: 1; width: auto; height: 72px; min-height: 72px; border-radius: 8px; font-size: 26px; font-weight: 700; text-align: center; padding: 0 34px; }
.pg-tv .pg-sheet .pg-danger { background: #A8321F; color: #fff; }
.pg-tv .pg-sheet .pg-drop-list { flex-direction: column; }
.pg-tv .pg-sheet .pg-drop-pick { background: var(--ink); }

/* TV-NewGame */
.az-tv-new-game .pg-newgame-tv { display: grid; grid-template-columns: 1fr 600px; gap: 64px; flex-grow: 1; }
.az-tv-new-game .az-tv-left { gap: 24px; }
.az-tv-who { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; padding: 0; }
.pg-tv .az-tv-who .pg-seat-toggle { height: 200px; min-height: 200px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 0; font-size: 40px; font-weight: 700; border: 0; box-sizing: border-box; background: rgba(4, 12, 15, .6); color: var(--cream); text-align: center; margin: 0; }
.pg-tv .az-tv-who .pg-seat-toggle.is-ticked { background: var(--cream); color: var(--ink); box-shadow: 0 16px 40px rgba(0, 0, 0, .4); font-weight: 700; }
.az-tv-box { width: 44px; height: 44px; border-radius: 8px; display: flex; align-items: center; justify-content: center; box-sizing: border-box; border: 3px solid rgba(242, 235, 221, .6); }
.az-tv-tick { display: none; width: 28px; height: 28px; }
.is-ticked .az-tv-box { background: var(--clay); border: 0; color: var(--ink); }
.is-ticked .az-tv-tick { display: block; }
.az-tv-who .az-tv-who-name { font-size: 40px; }
.az-tv-new-game .pg-guests { margin-top: 12px; }
.az-tv-guest-title { font-size: 32px; font-weight: 700; }
.az-tv-new-game .pg-guest-count { font-family: var(--display); font-size: 64px; font-weight: 700; width: 56px; min-width: 0; text-align: center; }
.pg-tv .az-tv-new-game .pg-start { margin: 0; }
.az-tv-summary { flex-direction: column; align-items: stretch; gap: 24px; padding: 40px; }
.az-tv-sum-names { font-family: var(--display); font-size: 48px; font-weight: 700; line-height: 1.1; }
.az-tv-sum-seats { font-size: 26px; color: #C9D6DA; }
.az-tv-sum-alert { font-size: 24px; line-height: 1.45; }
.az-tv-grow { flex-grow: 1; }

/* TV-Join */
.az-tv-join .az-tv-join-cols { display: grid; grid-template-columns: 1000px 1fr; gap: 64px; flex-grow: 1; align-items: start; }
.az-tv-join .pg-share-box:empty { display: none; }
.az-tv-join-card { background: var(--cream); color: var(--ink); border-radius: 32px; padding: 56px; box-shadow: 0 24px 64px rgba(0, 0, 0, .45); display: flex; flex-direction: row; gap: 56px; align-items: center; justify-content: flex-start; box-sizing: border-box; }
.az-tv-join .pg-qr { flex-shrink: 0; width: 320px; height: 320px; border-radius: 20px; background: #fff; box-shadow: inset 0 0 0 3px var(--ink); display: flex; align-items: center; justify-content: center; }
.az-tv-join .pg-qr-img { width: 280px; height: 280px; display: block; }
.az-tv-join-col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.az-tv-join .pg-join-label { font-size: 28px; font-weight: 600; color: #5E554B; }
.az-tv-join .pg-join-code { font-family: var(--display); font-size: 110px; font-weight: 700; letter-spacing: 10px; line-height: 1; white-space: nowrap; }
.az-tv-join-scan { font-size: 24px; line-height: 1.4; }
.az-tv-join-foot { display: flex; gap: 16px; align-items: center; }
.az-tv-seats-left { background: var(--clay); color: var(--ink); padding: 10px 20px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 2px; flex-shrink: 0; }
.az-tv-seats-left-label { font-size: 18px; font-weight: 700; line-height: 1.1; }
.az-tv-seats-left-num { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 1; }
.az-tv-join-stop { font-size: 22px; color: #5E554B; }
.az-tv-join-side { display: flex; flex-direction: column; gap: 24px; }
.az-tv-seats { padding: 0; gap: 0; background: rgba(4, 12, 15, .6); border-radius: 24px; overflow: hidden; }
.az-tv-seats .pg-seat { gap: 20px; min-height: 96px; padding: 0 32px; border-bottom: 1px solid rgba(242, 235, 221, .12); }
.az-tv-seats .pg-seat:last-child { border-bottom: 0; }
.az-tv-seats .pg-seat-name { font-size: 32px; font-weight: 600; flex-grow: 1; }
.az-tv-seats .pg-seat-state { margin-left: 0; font-size: 22px; font-weight: 700; padding: 8px 18px; border-radius: 999px; background: rgba(242, 235, 221, .14); color: var(--cream); }
.az-tv-seats .pg-seat-state.is-joined { background: var(--cream); color: #1F4B5B; }
.az-tv-join-buttons { display: flex; gap: 20px; }
.pg-tv .az-tv-join-buttons .az-tv-btn { height: 64px; min-height: 64px; padding: 0 28px; font-size: 24px; }
.az-tv-join-note { margin: 0; font-size: 22px; line-height: 1.45; color: #C9D6DA; }

/* TV-Wins and TV-PastGames */
.az-tv-page .pg-wins-body, .az-tv-page .pg-past-body { display: flex; flex-direction: column; gap: 24px; padding: 0; margin: 0; }
.az-tv-page .pg-wins-list { display: flex; flex-direction: column; gap: 24px; padding: 0; }
.pg-tv .az-wins .pg-win-row { display: flex; flex-direction: row; align-items: center; text-align: left; gap: 40px; padding: 32px 40px; border-radius: 24px; border: 0; width: 100%; min-height: 0; color: var(--cream); background: rgba(4, 12, 15, .6); }
.pg-tv .az-wins .pg-win-row.pg-win-lead { background: var(--cream); color: var(--ink); box-shadow: 0 0 0 5px var(--clay), 0 16px 40px rgba(0, 0, 0, .4); }
.pg-tv .az-wins .pg-win-who { width: 300px; flex-grow: 0; flex-shrink: 0; display: flex; flex-direction: column; gap: 8px; }
.pg-tv .az-wins .pg-win-name { font-family: var(--display); font-size: 56px; font-weight: 700; line-height: 1; }
.pg-tv .az-wins .pg-win-note { font-size: 22px; color: #C9D6DA; }
.pg-tv .az-wins .pg-win-lead .pg-win-note { color: #5E554B; }
.pg-tv .az-wins .pg-pips { flex-grow: 1; justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
.pg-tv .az-wins .pg-pips .az-tile { width: 64px; height: 64px; border-width: 5px; border-radius: 9px; box-shadow: 0 6px 14px rgba(0, 0, 0, .3); }
.pg-tv .az-wins .pg-win-count { font-family: var(--display); font-size: 112px; font-weight: 700; line-height: 1; min-width: 140px; text-align: right; }
.az-tv-page .pg-wins-notes { gap: 8px; padding: 0; font-size: 24px; }
.az-tv-page .pg-wins-note { font-size: 24px; }
.az-past .pg-past-card { background: var(--cream); color: var(--ink); border-radius: 24px; padding: 8px 40px; gap: 0; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.pg-tv .az-past .pg-past-row { display: grid; grid-template-columns: 250px 1fr 400px; align-items: center; gap: 24px; padding: 20px 0; min-height: 0; border: 0; border-radius: 0; border-bottom: 1px solid #E2D8C6; background: transparent; color: var(--ink); width: 100%; }
.pg-tv .az-past .pg-past-row:last-child { border-bottom: 0; }
.pg-tv .az-past .pg-past-row.is-tv-focus { outline: 5px solid var(--ink); outline-offset: -5px; }
.az-past .pg-past-top { display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 4px; }
.az-past .pg-past-day { font-size: 28px; font-weight: 700; }
.az-past .pg-past-time { font-size: 20px; color: #5E554B; }
.az-past .pg-chips { gap: 12px; }
.az-past .pg-chip { height: 52px; padding: 0 18px; gap: 10px; border-radius: 999px; font-size: 24px; background: #E2D8C6; }
.az-past .pg-chip-won { background: #F2B48F; }
.az-past .pg-chip-guest { font-size: 16px; letter-spacing: 1px; }
.az-past .pg-chip-score { font-family: var(--display); font-size: 28px; }
.az-past .pg-past-end { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.az-past .pg-past-result { font-size: 32px; color: var(--ink); }
.az-past .pg-past-end .pg-past-note { font-size: 20px; color: #5E554B; }
