
.iad-board-view-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin: 0 0 10px;
}
.iad-board-view-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.iad-board-view-opt {
  font-size: 0.78rem;
  font-weight: 600;
  color: #0f172a;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.iad-board-view-opt input { margin: 0; cursor: pointer; }
.iad-board-view-open-audience {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 5px 10px;
  background: #fff;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.iad-board-view-open-audience:hover {
  border-color: #059669;
  color: #047857;
}
.iad-board-view-audience-banner {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
  color: #e2e8f0;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.iad-board-view-audience-banner[hidden] { display: none !important; }
.iad-board-audience-match-bar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.iad-board-audience-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}
.iad-board-audience-card--p1 { border-top: 3px solid #059669; }
.iad-board-audience-card--p2 { border-top: 3px solid #7c3aed; }
.iad-board-audience-card-role {
  font-size: 0.72rem;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.iad-board-audience-card-name {
  font-weight: 800;
  font-size: 0.92rem;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Player 2 view: rotate board scene 180°; counter-rotate direct children for upright labels. */
.iad-board-view-scene--p2 {
  transform: rotate(180deg);
  transform-origin: center center;
}
.iad-board-view-scene--p2 > * {
  transform: rotate(180deg);
}
html.iad-board-view--audience .iad-board-view-bar { display: none !important; }
html.iad-board-view--audience .iad-board-audience-host {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(260px, 520px) minmax(120px, 1fr);
  gap: 12px;
  align-items: start;
}
html.iad-board-view--audience .iad-board-audience-board {
  grid-column: 2;
  grid-row: 1;
}
html.iad-board-view--audience .iad-board-audience-side--p2 {
  grid-column: 1;
  grid-row: 1;
}
html.iad-board-view--audience .iad-board-audience-side--p1 {
  grid-column: 3;
  grid-row: 1;
}
html.iad-board-view--audience .iad-board-audience-hide-in-audience {
  display: none !important;
}
@media (max-width: 900px) {
  html.iad-board-view--audience .iad-board-audience-host {
    grid-template-columns: 1fr;
  }
  html.iad-board-view--audience .iad-board-audience-board,
  html.iad-board-view--audience .iad-board-audience-side--p2,
  html.iad-board-view--audience .iad-board-audience-side--p1 {
    grid-column: 1;
    grid-row: auto;
  }
  .iad-board-audience-match-bar { order: -1; }
}


  /* Fill the layout middle column (between left/right ad areas); avoid a narrow inner max-width */
  .aeris-pall-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    margin: 12px auto 28px;
    padding: 0 12px;
  }
  .aeris-pall-intro {
    width: 100%;
    max-width: none;
    margin-bottom: 0.5rem;
  }
  .aeris-pall-intro p {
    margin: 0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.4;
    max-width: none;
  }
  .aeris-pall-hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #7c2d12 50%, #0f172a 100%);
    color: #fef3c7; border-radius: 16px; padding: 20px 18px; margin-bottom: 16px;
    border: 1px solid rgba(251, 191, 36, 0.25);
  }
  .aeris-pall-hero h1 { margin: 0 0 8px; font-size: 1.35rem; color: #fff; }
  .aeris-pall-hero p { margin: 0; opacity: 0.92; font-size: 0.95rem; line-height: 1.5; }
  .aeris-pall-nav {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px;
  }
  .aeris-pall-nav a {
    text-decoration: none; padding: 6px 10px; border-radius: 8px;
    border: 1px solid #cbd5e1; background: #f8fafc; color: #0f172a; font-weight: 700;
  }
  .aeris-pall-nav a.aeris-pall-nav--here {
    border-color: #b45309; background: #fff7ed; color: #9a3412;
  }
  .aeris-pall-gallery {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px;
    margin-bottom: 16px;
  }
  .aeris-pall-photo {
    margin-bottom: 0; border-radius: 16px; overflow: hidden;
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: #1c1917;
    box-shadow: 0 16px 40px rgba(0,0,0,0.35);
  }
  .aeris-pall-photo img {
    display: block; width: 100%; height: auto; max-height: 280px;
    object-fit: contain;
  }
  .aeris-pall-photo figcaption {
    padding: 10px 14px; font-size: 0.78rem; color: #a8a29e;
    background: rgba(0,0,0,0.35);
    border-top: 1px solid rgba(255,255,255,0.06);
  }
  .aeris-pall-photo figcaption a { color: #fde68a; }
  .aeris-pall-playfield {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  .aeris-pall-board-column {
    display: flex;
    flex-direction: column;
    gap: 0;
    min-width: 0;
  }
  /* Player 2 view: whole block rotated 180° so Player 2’s row + bank are near / down (as if the board were turned toward you). */
  .aeris-pall-visual-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .aeris-pall-visual-wrap--p2 {
    transform: rotate(180deg);
    transform-origin: center center;
  }
  .aeris-pall-visual-wrap--p2 > * {
    transform: rotate(180deg);
  }
  /* After the global flip, restore dresser orientation: north strip is now at the bottom (needs inverted drawer like default south); south strip is now at top (normal cabinet). */
  .aeris-pall-visual-wrap--p2 .aeris-pall-drawer-strip--north .aeris-pall-drawer-cabinet,
  .aeris-pall-visual-wrap--p2 .aeris-pall-drawer-strip--north .aeris-pall-bank-inner {
    transform: rotate(180deg);
  }
  .aeris-pall-visual-wrap--p2 .aeris-pall-drawer-strip--south .aeris-pall-drawer-cabinet,
  .aeris-pall-visual-wrap--p2 .aeris-pall-drawer-strip--south .aeris-pall-bank-inner {
    transform: none;
  }
  .aeris-pall-board-view-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
  }
  .aeris-pall-board-view-opt {
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap;
  }
  .aeris-pall-board-view-opt input {
    margin: 0;
    cursor: pointer;
  }
  /* Dresser drawers: north bank above the board, south bank below — full width, not side-by-side */
  .aeris-pall-drawer-strip {
    position: relative;
    z-index: 2;
    padding: 0 4px;
  }
  .aeris-pall-drawer-strip--north {
    margin-bottom: 0;
    padding-bottom: 0;
  }
  .aeris-pall-drawer-strip--south {
    margin-top: 4px;
    padding-top: 2px;
    padding-bottom: 8px;
  }
  .aeris-pall-controls-near-board {
    width: 100%;
    max-width: 100%;
    margin: 4px auto 0;
    padding: 0 6px;
  }
  .aeris-pall-controls-near-board .aeris-pall-status {
    margin-top: 0;
    margin-bottom: 0;
    padding: 6px 8px;
    font-size: 0.82rem;
  }
  .aeris-pall-controls-near-board .aeris-pall-actions {
    margin-top: 4px;
    margin-bottom: 0;
  }
  #pall-board-view-mount {
    margin: 4px 0 2px;
  }
  /* Move time + shell speed on one row */
  .aeris-pall-timer-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 6px 10px;
    margin-top: 6px;
    padding: 5px 8px;
    border-radius: 10px;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  /* Guard against global header/theme CSS overrides */
  #pall-timer-row {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
  }
  #pall-timer-row > * {
    flex: 0 0 auto;
  }
  .aeris-pall-timer-row label[for="pall-anim-speed"] {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }
  .aeris-pall-timer-label {
    font-size: 0.72rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .aeris-pall-timer-display {
    font-family: ui-monospace, 'Cascadia Code', 'Segoe UI Mono', monospace;
    font-size: 1.12rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #0f172a;
    min-width: 3.2ch;
    text-align: center;
  }
  .aeris-pall-timer-display.aeris-pall-timer-display--urgent {
    color: #b91c1c;
    animation: aeris-pall-timer-pulse 0.9s ease-in-out infinite;
  }
  @keyframes aeris-pall-timer-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
  }
  .aeris-pall-timer-limit-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
  }
  .aeris-pall-timer-row select {
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    font-size: 0.78rem;
    font-weight: 600;
    color: #0f172a;
    background: #fff;
    cursor: pointer;
    max-width: 100%;
  }
  #pall-timer-row select {
    width: auto !important;
    min-width: 0 !important;
  }
  .aeris-pall-options-sep {
    display: inline-block;
    width: 1px;
    height: 1.1rem;
    margin: 0 2px;
    background: #cbd5e1;
    flex-shrink: 0;
    align-self: center;
  }
  @media (max-width: 700px) {
    .aeris-pall-timer-row {
      flex-wrap: wrap;
      overflow-x: visible;
    }
    .aeris-pall-options-sep {
      width: 100%;
      height: 1px;
      margin: 4px 0;
    }
  }
  .aeris-pall-drawer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  .aeris-pall-drawer-caption {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0.01em;
    color: #334155;
    margin-bottom: 3px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }
  .aeris-pall-drawer-cabinet {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 3px 6px 0;
    border-radius: 8px 8px 4px 4px;
    background:
      linear-gradient(180deg, rgba(255,255,255,0.35) 0%, transparent 45%),
      linear-gradient(165deg, #c9b8a4 0%, #a89886 35%, #8a7b6c 100%);
    box-shadow:
      0 3px 0 #5c5248,
      0 10px 24px rgba(0, 0, 0, 0.18),
      inset 0 1px 0 rgba(255,255,255,0.45);
  }
  /* Bottom bank is visually inverted */
  .aeris-pall-drawer-strip--south .aeris-pall-drawer-cabinet {
    transform: rotate(180deg);
  }
  .aeris-pall-drawer-strip--south .aeris-pall-bank-inner {
    transform: rotate(180deg);
  }
  .aeris-pall-drawer-caption--below {
    margin-top: 3px;
    margin-bottom: 0;
  }
  .aeris-pall-drawer-lip {
    height: 5px;
    margin: 0 4px 1px;
    border-radius: 2px;
    background: linear-gradient(180deg, #292524 0%, #1c1917 100%);
    opacity: 0.5;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.6);
  }
  .aeris-pall-drawer-tray {
    position: relative;
    margin: 0 -2px;
    padding: 4px 6px 5px;
    border-radius: 4px 4px 6px 6px;
    background: linear-gradient(180deg, #faf7f2 0%, #ebe4dc 55%, #ddd3c7 100%);
    border: 1px solid #a8a29e;
    border-top-color: #d6d3d1;
    box-shadow:
      inset 0 2px 4px rgba(255,255,255,0.85),
      0 12px 14px rgba(0, 0, 0, 0.14);
    transform: translateY(6px);
    transition: transform 0.45s cubic-bezier(0.34, 1.3, 0.64, 1), box-shadow 0.35s ease;
  }
  .aeris-pall-drawer-unit:hover .aeris-pall-drawer-tray {
    transform: translateY(12px);
    box-shadow:
      inset 0 2px 4px rgba(255,255,255,0.85),
      0 18px 22px rgba(0, 0, 0, 0.18);
  }
  .aeris-pall-drawer-handle {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 3px;
    background: linear-gradient(180deg, #d6d3d1 0%, #a8a29e 100%);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
    pointer-events: none;
  }
  .aeris-pall-bank-inner {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: center;
    gap: 2px 2px;
    padding: 6px 4px 3px;
    min-height: 22px;
    max-height: 42px;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .aeris-pall-bank-inner .aeris-shell--bank {
    position: relative;
    left: auto;
    top: auto;
    width: 11px;
    height: 8px;
    transform: none;
    flex-shrink: 0;
  }
  .aeris-pall-bank-count {
    margin-top: 4px;
    font-size: 0.8rem;
    font-weight: 800;
    color: #44403c;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
  .aeris-pall-drawer-strip--north .aeris-pall-savings {
    margin-top: 3px;
    margin-bottom: 0;
  }
  .aeris-pall-savings {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.75;
  }
  .aeris-pall-savings:disabled {
    cursor: not-allowed;
  }
  .aeris-pall-savings.aeris-pall-savings--active {
    border-color: #0ea5e9;
    background: #e0f2fe;
    color: #0c4a6e;
    cursor: pointer;
    opacity: 1;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.35);
  }
  .aeris-pall-savings.aeris-pall-savings--active:hover {
    filter: brightness(1.02);
  }
  .aeris-pall-savings-label { font-weight: 700; }
  .aeris-pall-savings-count {
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    color: inherit;
  }
  @media (prefers-reduced-motion: reduce) {
    .aeris-pall-drawer-tray,
    .aeris-pall-drawer-unit:hover .aeris-pall-drawer-tray {
      transform: translateY(6px);
      transition: none;
    }
  }
  .aeris-pall-board {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    border-radius: 18px;
    width: 100%;
    max-width: 1040px;
    margin: 0 auto;
    padding: 8px 12px 12px;
    /* Carved wooden board (grain + warm inlay) */
    background:
      radial-gradient(140% 130% at 50% -8%, rgba(255,255,255,0.62) 0%, rgba(255,255,255,0) 52%),
      /* Polished rosewood: smooth base + subtle “natural” speckle */
      radial-gradient(18px 18px at 18% 22%, rgba(125, 52, 35, 0.12) 0%, transparent 60%),
      radial-gradient(26px 26px at 72% 28%, rgba(170, 90, 60, 0.10) 0%, transparent 62%),
      radial-gradient(34px 34px at 38% 72%, rgba(140, 65, 45, 0.10) 0%, transparent 66%),
      radial-gradient(22px 22px at 80% 70%, rgba(110, 45, 33, 0.08) 0%, transparent 65%),
      linear-gradient(180deg, #f1cbbf 0%, #d79c86 40%, #b67661 100%);
    border: 2px solid rgba(255,244,239,0.72);
    box-shadow:
      0 24px 46px rgba(15, 23, 42, 0.24),
      0 2px 0 rgba(255,250,248,0.88) inset,
      0 -10px 20px rgba(110, 52, 36, 0.20) inset,
      inset 0 0 0 1px rgba(255,249,246,0.42);
  }
  .aeris-pall-board::before {
    content: ''; position: absolute; inset: 8px; border-radius: 14px; pointer-events: none;
    border: 1px solid rgba(255, 241, 236, 0.58);
    box-shadow:
      inset 0 2px 20px rgba(255,249,246,0.34),
      inset 0 -9px 22px rgba(95, 41, 27, 0.16);
    background:
      radial-gradient(145% 120% at 50% 0%, rgba(255,248,244,0.22) 0%, transparent 52%),
      linear-gradient(180deg, rgba(255,246,242,0.11) 0%, transparent 44%);
  }
  .aeris-pall-rows { display: flex; flex-direction: column; gap: 6px; position: relative; z-index: 1; }
  /* Player 2 view: stack rows so pink/red (P2) is nearest (down), blue (P1) opposite — same pit indices & sowing as default; only layout faces P2. */
  .aeris-pall-visual-wrap--p2 .aeris-pall-rows {
    flex-direction: column-reverse;
  }
  .aeris-pall-visual-wrap--p2 #pall-scores { order: 0; }
  .aeris-pall-visual-wrap--p2 #pall-label-p1 { order: 1; margin-top: 0; margin-bottom: 4px; }
  .aeris-pall-visual-wrap--p2 .aeris-pall-rows { order: 2; }
  .aeris-pall-visual-wrap--p2 #pall-label-p2 { order: 3; margin-top: 5px; margin-bottom: 0; }
  .aeris-pall-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    justify-items: center;
  }
  .aeris-pall-pit {
    position: relative;
    overflow: visible;
    aspect-ratio: 1;
    width: min(100%, 56px);
    max-height: none;
    margin: 0;
    border-radius: 50%;
    cursor: pointer; user-select: none;
    border: 0;
    background: transparent;
    box-shadow:
      0 4px 10px rgba(15, 23, 42, 0.06),
      0 1px 0 rgba(255,255,255,0.98) inset,
      0 -2px 5px rgba(186, 230, 253, 0.08) inset;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end;
    padding: 2px 1px 2px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
  }
  /* Concave cup — whisper pink/blue highlight, softer blue depth */
  .aeris-pall-pit::before {
    content: '';
    position: absolute;
    left: 7%; right: 7%; top: 9%; bottom: 11%;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    background:
      radial-gradient(ellipse 90% 60% at 50% 18%, rgba(255,255,255,0.82) 0%, rgba(254, 242, 248, 0.28) 30%, rgba(239, 246, 255, 0.2) 46%, transparent 54%),
      radial-gradient(ellipse 80% 74% at 50% 100%, #f1f5f9 0%, #cbd5e1 18%, #94a3b8 42%, #64748b 68%, #475569 92%);
    box-shadow:
      inset 0 12px 24px rgba(51, 65, 85, 0.45),
      inset 0 -6px 12px rgba(186, 230, 253, 0.14),
      inset 0 3px 8px rgba(255,255,255,0.35),
      0 1px 0 rgba(255,255,255,0.55);
  }
  /* Pit surface only (no metallic overlay ring) */
  .aeris-pall-pit::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    z-index: 3;
    pointer-events: none;
    background: none;
    box-shadow: none;
    opacity: 0;
  }
  /* Top row cups: light pink */
  .aeris-pall-pit--top {
    background: transparent;
  }
  .aeris-pall-pit--top::after {
    background: none;
    box-shadow: none;
  }
  .aeris-pall-pit--top::before {
    background:
      radial-gradient(ellipse 90% 60% at 50% 18%, rgba(255,255,255,0.92) 0%, rgba(254, 226, 226, 0.12) 40%, transparent 62%),
      radial-gradient(ellipse 80% 74% at 50% 100%, #fffafa 0%, #fef2f2 28%, #fde8e8 50%, #fbd5d5 76%, #efb4b4 95%);
  }
  /* Bottom row cups: light blue */
  .aeris-pall-pit--bottom {
    background: transparent;
  }
  .aeris-pall-pit--bottom::after {
    background: none;
    box-shadow: none;
  }
  .aeris-pall-pit--bottom::before {
    background:
      radial-gradient(ellipse 90% 60% at 50% 18%, rgba(255,255,255,0.92) 0%, rgba(186, 230, 253, 0.1) 40%, transparent 62%),
      radial-gradient(ellipse 80% 74% at 50% 100%, #fbfdff 0%, #f2f9fe 28%, #e7f3fb 50%, #d7eaf7 76%, #b8d5ea 95%);
  }
  .aeris-pall-pit:hover:not(:disabled) { transform: scale(1.03); filter: brightness(1.03); }
  .aeris-pall-pit:disabled { cursor: default; opacity: 0.94; }
  .aeris-pall-pit--lucky-marked {
    box-shadow: 0 0 0 3px rgba(234, 179, 8, 0.85), 0 6px 14px rgba(15, 23, 42, 0.12);
  }
  .aeris-pall-pit--mark-pick {
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.55);
    cursor: pointer;
  }
  .aeris-pall-pit--mark-pick:not(:disabled):hover {
    filter: brightness(1.03);
  }
  .aeris-pall-pit--playable {
    box-shadow:
      0 8px 20px rgba(14, 116, 144, 0.12),
      0 0 0 3px rgba(56, 189, 248, 0.42),
      0 0 22px rgba(125, 211, 252, 0.28),
      0 1px 0 rgba(255,255,255,0.94) inset;
  }
  /* Pit receiving a shell during sow — blue light ring (rule feedback) */
  .aeris-pall-pit--drop {
    position: relative;
    z-index: 2;
  }
  .aeris-pall-pit--drop::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    border: 2px solid rgba(186, 230, 253, 0.98);
    box-shadow:
      0 0 10px 2px rgba(56, 189, 248, 0.75),
      0 0 24px rgba(125, 211, 252, 0.45),
      0 0 38px rgba(244, 114, 182, 0.12),
      inset 0 0 14px rgba(224, 242, 254, 0.5);
    animation: pallReceiveBlue 0.4s ease-out forwards;
  }
  @keyframes pallReceiveBlue {
    0% { opacity: 0.35; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1); }
  }
  @media (prefers-reduced-motion: reduce) {
    .aeris-pall-pit--drop::after { animation-duration: 0.05s; }
  }
  .aeris-pall-pit--capture {
    animation: pallCapture 1.1s ease;
  }
  @keyframes pallCapture {
    0%, 100% { filter: brightness(1); }
    40% { filter: brightness(1.36) drop-shadow(0 0 12px rgba(56, 189, 248, 0.55)) drop-shadow(0 0 8px rgba(244, 114, 182, 0.25)); }
  }
  .aeris-pall-pit-lift {
    animation: pallLift 0.7s ease;
  }
  @keyframes pallLift {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); box-shadow: 0 0 0 4px rgba(125, 211, 252, 0.55); }
    100% { transform: scale(1); }
  }
  .aeris-pall-shells {
    position: relative; z-index: 1;
    flex: 1; min-height: 30px; width: 100%;
  }
  /* Cowrie shells — vivid painted CSS (no missing photo asset) */
  .aeris-shell {
    position: absolute; left: 50%; top: 50%;
    width: 12px;
    height: 9px;
    border-radius: 50% 50% 40% 40% / 58% 58% 40% 40%;
    transform-origin: center center;
    background-color: #f59e0b;
    background-image:
      radial-gradient(ellipse 44% 30% at 50% 72%, #120804 0%, #3d2214 52%, transparent 54%),
      radial-gradient(ellipse 100% 88% at 40% 28%, #fffef7 0%, #fde68a 18%, #fbbf24 42%, #ea580c 68%, #9a3412 100%);
    border: 0.75px solid rgba(154, 52, 18, 0.75);
    box-shadow:
      0 2px 4px rgba(15, 23, 42, 0.55),
      0 0 0 0.5px rgba(255, 255, 255, 0.5),
      inset 0 2px 3px rgba(255, 255, 255, 0.85),
      inset 0 -3px 5px rgba(120, 53, 15, 0.45);
    filter: drop-shadow(0 1.5px 2px rgba(0, 0, 0, 0.4));
  }
  .aeris-shell::before {
    display: block;
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 4%;
    height: 50%;
    border-radius: 50%;
    background: radial-gradient(ellipse 85% 70% at 46% 24%, rgba(255, 255, 255, 0.98) 0%, rgba(255, 237, 179, 0.55) 40%, transparent 72%);
    pointer-events: none;
    z-index: 2;
  }
  .aeris-shell::after {
    display: block;
    content: '';
    position: absolute;
    left: 34%;
    right: 34%;
    top: 54%;
    bottom: 12%;
    border-radius: 50%;
    background: linear-gradient(165deg, #5c3018 0%, #1a0c06 50%, #000000 100%);
    pointer-events: none;
    z-index: 1;
    box-shadow: inset 0 0 2px rgba(255, 220, 180, 0.35);
  }
  .aeris-shell:nth-child(3n+2) {
    background-color: #fb7185;
    background-image:
      radial-gradient(ellipse 44% 30% at 50% 72%, #2a0814 0%, #6b1d3a 52%, transparent 54%),
      radial-gradient(ellipse 100% 88% at 40% 28%, #fff5f8 0%, #fecdd3 20%, #fb7185 45%, #e11d48 70%, #9f1239 100%);
    border-color: rgba(190, 24, 93, 0.7);
  }
  .aeris-shell:nth-child(3n) {
    background-color: #fef08a;
    background-image:
      radial-gradient(ellipse 44% 30% at 50% 72%, #1f1408 0%, #4a3520 52%, transparent 54%),
      radial-gradient(ellipse 100% 88% at 40% 28%, #ffffff 0%, #fef9c3 22%, #fde047 48%, #ca8a04 74%, #854d0e 100%);
    border-color: rgba(161, 98, 7, 0.65);
  }
  .aeris-pall-num {
    position: relative; z-index: 1;
    font-size: 0.65rem; font-weight: 900; color: #0f172a; text-align: center;
    text-shadow: 0 1px 0 rgba(255,255,255,0.95), 0 0 6px rgba(255,255,255,0.6);
    margin-top: 0; letter-spacing: 0.02em;
  }
  .aeris-pall-status {
    margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #fff;
    border: 1px solid #e2e8f0; color: #0f172a; font-weight: 600;
    white-space: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .aeris-pall-panel {
    margin-top: 14px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px;
    color: #334155; font-size: 0.92rem; line-height: 1.55;
  }
  .aeris-pall-panel h2 { margin: 0 0 8px; font-size: 1.05rem; color: #0f172a; }
  .aeris-pall-panel h3 {
    margin: 14px 0 6px; font-size: 0.92rem; color: #0f172a;
    font-weight: 800;
  }
  .aeris-pall-panel h3:first-child { margin-top: 0; }
  .aeris-pall-note {
    margin-top: 10px; padding: 10px 12px; border-radius: 10px;
    background: #fffbeb; border: 1px solid #fde68a; color: #78350f; font-size: 0.88rem;
  }
  .aeris-pall-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    align-items: stretch;
  }
  .aeris-pall-actions button {
    padding: 4px 8px;
    min-height: 28px;
    border-radius: 8px;
    border: none;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    background: #0f172a;
    color: #fff;
    flex: 1 1 calc(50% - 3px);
    min-width: 4.5rem;
    max-width: 100%;
    white-space: nowrap;
  }
  .aeris-pall-actions button.secondary { background: #e2e8f0; color: #0f172a; }
  .aeris-pall-label { text-align: center; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; color: #a8a29e; margin-bottom: 4px; transition: color 0.2s ease; }
  .aeris-pall-label--south { margin-top: 5px; }
  .aeris-pall-label--active { color: #0f172a; font-weight: 800; letter-spacing: 0.1em; }
  .aeris-pall-label--flash {
    animation: pallTurnFlash 0.5s ease-in-out 2;
  }
  @keyframes pallTurnFlash {
    0%, 100% {
      color: inherit;
      filter: none;
      text-shadow: none;
    }
    50% {
      color: #0369a1;
      filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.95));
      text-shadow: 0 0 16px rgba(125, 211, 252, 0.95), 0 0 28px rgba(34, 211, 238, 0.55);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    .aeris-pall-label--flash { animation-iteration-count: 1; animation-duration: 0.35s; }
  }
  /* Round + turn only — bank/savings live on player cards */
  .aeris-pall-scores {
    position: relative; z-index: 1;
    margin-bottom: 5px; padding: 4px 8px; border-radius: 8px;
    font-size: 0.72rem; font-weight: 700; color: #475569; text-align: center;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 4px 12px rgba(15, 23, 42, 0.12);
    text-shadow: 0 1px 0 rgba(255,255,255,0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aeris-pall-video {
    margin: 0 0 18px; border-radius: 14px; overflow: hidden;
    border: 1px solid #e2e8f0; background: #0f172a;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
  }
  .aeris-pall-video h2 {
    margin: 0; padding: 12px 14px; font-size: 0.95rem; color: #f8fafc;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    font-weight: 800;
  }
  .aeris-pall-video-inner {
    position: relative; padding-bottom: 56.25%; height: 0;
  }
  .aeris-pall-video-inner iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    border: 0;
  }
  .aeris-pall-video-cap {
    padding: 8px 14px 12px; font-size: 0.8rem; color: #94a3b8; background: #0f172a;
  }
  .aeris-pall-video-cap a { color: #38bdf8; }
  .aeris-pall-disclosure {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
  }
  .aeris-pall-disclosure > summary {
    cursor: pointer;
    padding: 12px 14px;
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    user-select: none;
  }
  .aeris-pall-disclosure > summary::-webkit-details-marker { display: none; }
  .aeris-pall-disclosure > summary::after {
    content: '';
    width: 0.45em;
    height: 0.45em;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    flex-shrink: 0;
  }
  .aeris-pall-disclosure[open] > summary::after {
    transform: rotate(-135deg);
    margin-top: 0.2em;
  }
  .aeris-pall-disclosure-body {
    padding: 0 14px 16px;
    border-top: 1px solid #f1f5f9;
  }
  .aeris-pall-disclosure-body > p:first-child { margin-top: 12px; }
  .aeris-pall-audience-banner {
    margin: 0 0 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    color: #e2e8f0;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid rgba(56, 189, 248, 0.35);
  }
  .aeris-pall-match-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 8px;
  }
  @media (max-width: 560px) {
    .aeris-pall-match-bar { grid-template-columns: 1fr; }
  }
  .aeris-pall-player-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, #fff 0%, #f8fafc 100%);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  }
  .aeris-pall-player-card--p2 { border-top: 3px solid #7c3aed; }
  .aeris-pall-player-card--p1 { border-top: 3px solid #059669; }
  .aeris-pall-player-flag {
    font-size: 1.5rem;
    line-height: 1;
    flex-shrink: 0;
  }
  .aeris-pall-player-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .aeris-pall-player-name {
    font-weight: 800;
    font-size: 0.92rem;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aeris-pall-player-country {
    font-size: 0.78rem;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .aeris-pall-player-stats {
    flex-shrink: 0;
    text-align: right;
    max-width: 52%;
  }
  .aeris-pall-player-stat-line {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #334155;
    line-height: 1.3;
    white-space: normal;
  }
  @media (min-width: 480px) {
    .aeris-pall-player-stat-line { white-space: nowrap; }
  }
  .aeris-pall-setup {
    margin-bottom: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
  }
  .aeris-pall-play-heading {
    margin: 0 0 6px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #334155;
  }
  .aeris-pall-setup > summary {
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
    color: #334155;
  }
  .aeris-pall-setup-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 0 14px 14px;
  }
  @media (min-width: 641px) {
    .aeris-pall-row {
      gap: 1px;
    }
    .aeris-pall-rows {
      gap: 4px;
    }
    .aeris-pall-pit {
      width: 100%;
      max-width: none;
      padding: 5px 3px 4px;
    }
    .aeris-pall-board {
      max-width: min(1040px, 100%);
      padding: 10px 6px 14px;
    }
    .aeris-pall-shells {
      min-height: 58px;
      flex: 1 1 auto;
    }
    .aeris-shell {
      width: clamp(20px, 2.35vw, 30px);
      height: clamp(14px, 1.7vw, 22px);
      border-width: 1px;
      box-shadow:
        0 3px 6px rgba(15, 23, 42, 0.5),
        0 0 0 0.75px rgba(255, 255, 255, 0.55),
        inset 0 3px 4px rgba(255, 255, 255, 0.88),
        inset 0 -4px 6px rgba(120, 53, 15, 0.42);
      filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.45));
    }
    .aeris-pall-bank-inner .aeris-shell--bank {
      width: 14px;
      height: 10px;
    }
    .aeris-pall-bank-inner {
      min-height: 36px;
      max-height: 64px;
      gap: 3px 4px;
    }
    .aeris-pall-num {
      font-size: 0.72rem;
    }
  }
  @media (max-width: 640px) {
    .aeris-pall-setup-grid { grid-template-columns: 1fr; }
    .aeris-pall-pit {
      width: min(100%, 46px);
      padding: 1px 1px 1px;
    }
    .aeris-pall-row { gap: 2px; }
    .aeris-pall-rows { gap: 5px; }
    .aeris-pall-shells { min-height: 13px; }
    .aeris-shell {
      width: clamp(4.5px, 1.2vw, 6px);
      height: clamp(3px, 0.8vw, 4.5px);
    }
  }
  .aeris-pall-setup fieldset {
    margin: 0;
    padding: 12px;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
  }
  .aeris-pall-setup legend { font-size: 0.85rem; font-weight: 700; padding: 0 6px; }
  .aeris-pall-setup label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    margin-top: 8px;
  }
  .aeris-pall-setup label:first-of-type { margin-top: 0; }
  .aeris-pall-setup input[type="text"] {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
  }
  .aeris-pall-setup select {
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    color: #0f172a;
  }
  .aeris-pall-flag-preview {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    color: #475569;
  }
  .aeris-pall-flag-preview span {
    font-size: 1.2rem;
    line-height: 1;
  }
  .aeris-pall-profile-submit {
    margin-top: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    background: #0f172a;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
  }
  .aeris-pall-profile-submit:hover {
    filter: brightness(1.06);
  }
  .aeris-pall-audience-help {
    margin: 0 14px 10px;
    padding: 10px 12px;
    font-size: 0.88rem;
    color: #475569;
    background: #f8fafc;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .aeris-pall-audience-remote-note {
    margin: 0 14px 14px;
    padding: 0 2px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #64748b;
    max-width: 52rem;
  }
  .aeris-pall--audience .aeris-pall-setup,
  .aeris-pall--audience .aeris-pall-controls-near-board .aeris-pall-actions,
  .aeris-pall--audience .aeris-pall-board-view-field,
  html.iad-board-view--audience .aeris-pall-setup,
  html.iad-board-view--audience .aeris-pall-controls-near-board .aeris-pall-actions,
  html.iad-board-view--audience .aeris-pall-controls-near-board .iad-board-view-bar {
    display: none !important;
  }
  .aeris-pall--audience .aeris-pall-intro,
  html.iad-board-view--audience .aeris-pall-intro {
    display: none;
  }

