/* Answer Ball */
[hidden] { display: none !important; } /* the hidden attribute wins over display rules below */
.ab-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ab-main { display: grid; gap: 14px; }
.ab-top { display: flex; gap: 10px; align-items: center; }
.ab-q { font-family: inherit; font-size: 16px; text-align: center; }
.ab-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: center; }
.ab-stage { display: flex; justify-content: center; padding: 10px 0 4px; }

.ab-ball { --s: min(78vw, 340px); position: relative; width: var(--s); height: var(--s); border-radius: 50%; border: 0; padding: 0; cursor: grab;
  background: radial-gradient(circle at 34% 28%, #4b4b5a 0%, #1b1b24 30%, #08080b 62%, #000 100%);
  box-shadow: 0 28px 50px rgba(0, 0, 0, .65), 0 0 0 1px rgba(145, 71, 255, .28), 0 0 60px rgba(145, 71, 255, .16), inset -18px -26px 50px rgba(0, 0, 0, .85);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.ab-ball:active { cursor: grabbing; }
.ab-ball:focus-visible { outline: 3px solid var(--accent); outline-offset: 6px; }
.ab-glass { position: absolute; left: 16%; top: 9%; width: 44%; height: 26%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 70%); transform: rotate(-24deg); }
.ab-window { position: absolute; left: 23%; top: 23%; width: 54%; height: 54%; border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #10164a 0%, #070a26 55%, #020309 100%);
  box-shadow: inset 0 0 0 3px #050508, inset 0 6px 18px rgba(0, 0, 0, .9), 0 0 0 5px #121218; }
.ab-liquid { position: absolute; inset: 0; background: radial-gradient(circle at 30% 70%, rgba(80, 60, 200, .25), transparent 55%), radial-gradient(circle at 70% 30%, rgba(40, 90, 220, .2), transparent 50%); }
.ab-die { position: absolute; left: 10%; top: 12%; width: 80%; height: auto; overflow: visible; opacity: 0; }
.ab-tri { fill: #2c36c9; stroke: #5260ff; stroke-width: 2; stroke-linejoin: round; }
.ab-txt text { fill: #eef0ff; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-weight: 700; letter-spacing: .02em; text-anchor: middle; }
.ab-murk { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(4, 5, 18, .5), rgba(2, 2, 8, .96) 70%); }

.ab-actions { gap: 10px; }
.ab-odds { margin: 0; text-align: center; font-size: 12px; color: var(--muted); }
.ab-side { min-width: 0; }
.ab-hist { margin: 6px 0 0; padding-left: 22px; max-height: 300px; overflow: auto; font-size: 13px; }
.ab-hist li { padding: 3px 0; overflow-wrap: anywhere; }
.ab-hist .q { color: var(--muted); display: block; font-size: 12px; }
.ab-hist .a { color: var(--text); font-weight: 600; }

.ab-sets { display: grid; gap: 10px; }
.ab-sets h2 { margin-bottom: 0; }
.ab-sets .chip { font-family: inherit; }
.ab-list { margin: 0; padding-left: 22px; font-size: 13px; color: var(--muted); max-height: 320px; overflow: auto; }
.ab-list li { padding: 1px 0; }
.ab-list .tone { font-size: 11px; margin-left: 6px; color: #6d7386; }
.ab-answers { font-family: inherit; font-size: 14px; resize: vertical; min-height: 160px; }
.ab-shared { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; padding: 10px; border: 1px solid var(--accent-2); border-radius: 8px; }

/* Party view: the main panel covers the screen. */
.ab-main.party { position: fixed; inset: 0; z-index: 50; margin: 0; border-radius: 0; border: 0; overflow: auto;
  background: radial-gradient(ellipse 90% 80% at 50% 40%, #17132a 0%, #0c0c10 70%); padding: 18px; align-content: center; }
.ab-main.party .ab-q { font-size: clamp(20px, 3.4vw, 40px); font-weight: 700; background: transparent; border-color: transparent; }
.ab-main.party .ab-q:focus { border-color: var(--border); }
.ab-main.party .ab-ball { --s: min(62vh, 86vw); }
.ab-main.party .ab-body { grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); }
.ab-main.party .ab-hist { max-height: 60vh; font-size: 15px; }
@media (max-width: 860px) {
  .ab-grid { grid-template-columns: minmax(0, 1fr); }
  .ab-main.party .ab-body { grid-template-columns: minmax(0, 1fr); }
  .ab-main.party .ab-ball { --s: min(52vh, 86vw); }
}
.ab-sets .small { overflow-wrap: anywhere; }
