/* 🎮 Owner-started event games — banners above chat, the track-quiz card, the
   Wordle / bounty modals and the Events-tab cards. Sibling of the prediction
   banner styles in styles.css; dark.css-style overrides at the bottom.
   Marker: ownergames */
.wpz-g-host{ display: flex; flex-direction: column; gap: 6px; }
.wpz-g-host:empty{ display: none; }
body.wpz-hide-events .wpz-g-host{ display: none; }
.wpz-g-banner{
  margin: 8px 12px 2px; padding: 9px 12px; border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.3); background: rgba(148,163,184,0.08);
  font-size: 12px; color: #1e293b;
}
.wpz-g-top{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wpz-g-title{ flex: 1 1 auto; font-weight: 900; font-size: 12.5px; letter-spacing: 0.02em; }
.wpz-g-meta{ font-size: 10.5px; font-weight: 700; opacity: 0.75; font-variant-numeric: tabular-nums; }
.wpz-g-x{ border: 0; background: transparent; cursor: pointer; font-size: 12px; opacity: 0.7; padding: 2px 5px; border-radius: 6px; color: inherit; }
.wpz-g-x:hover{ background: rgba(0,0,0,0.08); opacity: 1; }
.wpz-g-foot{ margin-top: 5px; font-size: 10.5px; opacity: 0.78; line-height: 1.4; }
.wpz-g-desc{ margin-top: 5px; font-size: 11.5px; line-height: 1.45; }
.wpz-g-row{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.wpz-g-input{ width: 110px; padding: 5px 8px; border-radius: 9px; border: 1px solid rgba(100,116,139,0.45); background: #fff; color: #0f172a; font-size: 12px; font-weight: 700; }
.wpz-g-input.wide{ width: 100%; margin-top: 6px; }
.wpz-g-ta{ width: 100%; margin-top: 6px; padding: 6px 8px; border-radius: 9px; border: 1px solid rgba(100,116,139,0.45); background: #fff; color: #0f172a; font-size: 12px; resize: vertical; }
.wpz-g-btn{ padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(15,23,42,0.15); background: #0f172a; color: #fff; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.wpz-g-btn:disabled{ opacity: 0.55; cursor: default; }
.wpz-g-btn.ghost{ background: transparent; color: inherit; }
.wpz-g-img{ max-width: 100%; max-height: 160px; border-radius: 10px; margin-top: 6px; display: block; }

/* boss */
.wpz-g-boss{ border-color: rgba(220,38,38,0.35); background: linear-gradient(135deg, rgba(220,38,38,0.09), rgba(124,45,18,0.08)); }
.wpz-g-hpbar{ position: relative; height: 18px; border-radius: 999px; background: rgba(15,23,42,0.12); overflow: hidden; margin-top: 6px; }
.wpz-g-hpbar i{ position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #dc2626, #f97316); transition: width 600ms ease; }
.wpz-g-hpbar span{ position: relative; display: block; text-align: center; font-size: 10.5px; font-weight: 900; line-height: 18px; color: #1e293b; text-shadow: 0 0 4px rgba(255,255,255,0.6); }

/* race */
.wpz-g-race{ border-color: rgba(14,165,233,0.35); background: linear-gradient(135deg, rgba(14,165,233,0.09), rgba(99,102,241,0.08)); }
.wpz-g-lanes{ display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; margin-top: 7px; }
.wpz-g-lane-btn{ display: flex; flex-direction: column; gap: 2px; align-items: flex-start; padding: 6px 10px; border-radius: 11px; border: 1px solid rgba(14,165,233,0.35); background: #fff; cursor: pointer; font-weight: 800; font-size: 12px; color: #0c4a6e; }
.wpz-g-lane-btn small{ font-weight: 600; font-size: 10px; opacity: 0.75; }
.wpz-g-lane-btn.is-mine{ outline: 2px solid #0ea5e9; }
.wpz-g-lane-btn:disabled{ opacity: 0.7; cursor: default; }
.wpz-g-track{ display: flex; flex-direction: column; gap: 4px; margin-top: 7px; }
.wpz-g-lane{ position: relative; height: 28px; border-radius: 8px; background: repeating-linear-gradient(90deg, rgba(14,165,233,0.10) 0 20px, rgba(14,165,233,0.04) 20px 40px); overflow: hidden; }
.wpz-g-lane-name{ position: absolute; left: 8px; top: 50%; transform: translateY(-50%); font-size: 10px; font-weight: 800; opacity: 0.55; letter-spacing: 0.06em; text-transform: uppercase; }
.wpz-g-runner{ position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-size: 20px; line-height: 1; transition: none; will-change: left; }
.wpz-g-finish{ position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: 0.8; }
.wpz-g-lane.is-winner{ background: rgba(250,204,21,0.35); box-shadow: inset 0 0 0 2px #facc15; }

/* crew */
.wpz-g-crew{ border-color: rgba(249,115,22,0.35); background: linear-gradient(90deg, rgba(56,189,248,0.10), rgba(249,115,22,0.10)); }
.wpz-g-crewbar{ display: flex; height: 12px; border-radius: 999px; overflow: hidden; margin-top: 6px; background: rgba(15,23,42,0.1); }
.wpz-g-crewbar i.ice{ background: #38bdf8; transition: width 600ms ease; }
.wpz-g-crewbar i.fire{ background: #f97316; transition: width 600ms ease; }
.wpz-g-crewrow{ justify-content: space-between; font-size: 11px; font-weight: 800; }

/* auction / bounty / wordle */
.wpz-g-auction{ border-color: rgba(202,138,4,0.4); background: linear-gradient(135deg, rgba(250,204,21,0.14), rgba(202,138,4,0.08)); }
.wpz-g-bid{ flex: 1 1 auto; font-weight: 800; font-size: 11.5px; }
.wpz-g-bounty{ border-color: rgba(22,163,74,0.35); background: linear-gradient(135deg, rgba(34,197,94,0.10), rgba(22,163,74,0.06)); }
.wpz-g-wordle{ border-color: rgba(147,51,234,0.3); background: linear-gradient(135deg, rgba(147,51,234,0.08), rgba(79,70,229,0.08)); }
.wpz-g-wordle .wpz-g-top{ flex-wrap: nowrap; }

/* modal */
.wpz-g-overlay{ position: fixed; inset: 0; z-index: 12600; display: flex; align-items: center; justify-content: center; background: rgba(10,16,24,0.55); padding: 16px; }
.wpz-g-modal{ width: min(440px, 100%); max-height: 90vh; overflow: auto; border-radius: 18px; background: #fff; color: #0f172a; padding: 16px; box-shadow: 0 24px 60px rgba(8,16,32,0.4); }
.wpz-g-mhead{ display: flex; align-items: center; justify-content: space-between; font-weight: 900; font-size: 14px; margin-bottom: 10px; }
.wpz-g-close{ border: 0; background: transparent; font-size: 16px; cursor: pointer; color: inherit; }
.wpz-wd-grid{ display: flex; flex-direction: column; gap: 5px; align-items: center; margin: 6px 0 10px; }
.wpz-wd-row{ display: flex; gap: 5px; }
.wpz-wd-cell{ width: 44px; height: 44px; border-radius: 8px; border: 2px solid rgba(100,116,139,0.4); display: grid; place-items: center; font-weight: 900; font-size: 20px; text-transform: uppercase; }
.wpz-wd-cell.is-g{ background: #16a34a; border-color: #16a34a; color: #fff; }
.wpz-wd-cell.is-y{ background: #eab308; border-color: #eab308; color: #fff; }
.wpz-wd-cell.is-b{ background: #64748b; border-color: #64748b; color: #fff; }
.wpz-wd-msg{ font-size: 12.5px; text-align: center; min-height: 18px; }
#wpzWdIn{ width: 120px; text-transform: uppercase; letter-spacing: 0.2em; font-weight: 900; text-align: center; }
.wpz-g-bounty-item{ border-top: 1px solid rgba(100,116,139,0.2); padding: 10px 0; }
.wpz-g-bounty-title{ font-weight: 900; font-size: 13px; }
.wpz-g-bounty-title small{ display: block; font-weight: 600; font-size: 10.5px; opacity: 0.7; margin-top: 2px; }
.wpz-g-bounty-item .wpz-g-btn{ margin-top: 6px; }

/* track quiz card (same corner as Trivia Night) */
.wpz-tq-card{ position: fixed; right: 20px; top: 84px; z-index: 11500; width: min(330px, calc(100vw - 40px)); border-radius: 18px; background: linear-gradient(160deg, #2a1b45, #1a1238); border: 1px solid rgba(196,181,253,0.35); box-shadow: 0 24px 60px rgba(8,16,32,0.5); padding: 14px; color: #f3efff; animation: wpzTqIn 300ms ease; }
@keyframes wpzTqIn{ from{ transform: translateY(14px); opacity: 0; } to{ transform: none; opacity: 1; } }
.wpz-tq-head{ display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 900; letter-spacing: 0.09em; color: #c4b5fd; margin-bottom: 8px; }
.wpz-tq-round{ font-size: 10.5px; color: #b9a9e8; letter-spacing: 0.04em; }
.wpz-tq-player{ display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.wpz-tq-play{ padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(196,181,253,0.5); background: rgba(196,181,253,0.15); color: #fff; font-weight: 800; font-size: 12px; cursor: pointer; }
.wpz-tq-hint{ font-size: 11.5px; opacity: 0.8; }
.wpz-tq-opts{ display: flex; flex-direction: column; gap: 6px; }
.wpz-tq-opt{ text-align: left; padding: 8px 11px; border-radius: 11px; border: 1px solid rgba(196,181,253,0.3); background: rgba(196,181,253,0.08); color: #f3efff; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.wpz-tq-opt:hover:not(:disabled){ background: rgba(196,181,253,0.18); }
.wpz-tq-opt.is-picked{ outline: 2px solid #c4b5fd; }
.wpz-tq-opt.is-correct{ background: rgba(34,197,94,0.35); border-color: #22c55e; }
.wpz-tq-opt.is-wrong{ background: rgba(239,68,68,0.3); border-color: #ef4444; }
.wpz-tq-foot{ margin-top: 10px; font-size: 12px; line-height: 1.45; }
.wpz-tq-board{ display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; font-size: 11px; opacity: 0.85; }

/* Events tab cards */
.wpz-g-card .wpz-g-fields{ display: flex; flex-wrap: wrap; gap: 6px; }
.wpz-g-card .wpz-g-fields input, .wpz-g-card .wpz-g-fields select, .wpz-g-card textarea{ flex: 1 1 90px; min-width: 0; padding: 5px 7px; border-radius: 8px; border: 1px solid rgba(148,163,184,0.4); background: rgba(255,255,255,0.7); font-size: 11.5px; }
.wpz-g-card textarea{ width: 100%; box-sizing: border-box; resize: vertical; }
.wpz-g-status{ font-size: 11.5px; padding: 6px 8px; border-radius: 8px; background: rgba(148,163,184,0.12); }
.wpz-g-status code{ font-weight: 900; letter-spacing: 0.1em; }
.wpz-g-details summary{ cursor: pointer; font-size: 11.5px; font-weight: 800; margin-top: 4px; }
.wpz-g-upload{ display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.wpz-g-upload input{ flex: 1 1 120px; min-width: 0; font-size: 11px; }
.wpz-g-list{ display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
.wpz-g-li{ display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; padding: 5px 7px; border-radius: 8px; background: rgba(148,163,184,0.1); }
.wpz-g-li.col{ flex-direction: column; align-items: stretch; }
.wpz-g-entry{ display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; padding: 4px 0 0 10px; border-left: 2px solid rgba(148,163,184,0.4); margin-top: 4px; }
.wpz-g-mini{ flex: 0 0 auto; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(148,163,184,0.45); background: transparent; font-size: 10.5px; font-weight: 800; cursor: pointer; color: inherit; }
.wpz-g-mini:hover{ background: rgba(148,163,184,0.2); }

/* dark */
html[data-theme="dark"] .wpz-g-banner{ color: #e5e7eb; border-color: rgba(148,163,184,0.25); background: rgba(148,163,184,0.08); }
html[data-theme="dark"] .wpz-g-x:hover{ background: rgba(255,255,255,0.1); }
html[data-theme="dark"] .wpz-g-input, html[data-theme="dark"] .wpz-g-ta{ background: #262627; color: #f3f4f6; border-color: rgba(148,163,184,0.35); }
html[data-theme="dark"] .wpz-g-btn{ background: #e5e7eb; color: #111827; border-color: transparent; }
html[data-theme="dark"] .wpz-g-btn.ghost{ background: transparent; color: #e5e7eb; border-color: rgba(148,163,184,0.4); }
html[data-theme="dark"] .wpz-g-hpbar{ background: rgba(255,255,255,0.1); }
html[data-theme="dark"] .wpz-g-hpbar span{ color: #fff; text-shadow: 0 0 4px rgba(0,0,0,0.7); }
html[data-theme="dark"] .wpz-g-lane-btn{ background: #262627; color: #bae6fd; }
html[data-theme="dark"] .wpz-g-lane{ background: repeating-linear-gradient(90deg, rgba(14,165,233,0.16) 0 20px, rgba(14,165,233,0.06) 20px 40px); }
html[data-theme="dark"] .wpz-g-crewbar{ background: rgba(255,255,255,0.1); }
html[data-theme="dark"] .wpz-g-modal{ background: #1f1f20; color: #f3f4f6; }
html[data-theme="dark"] .wpz-g-card .wpz-g-fields input, html[data-theme="dark"] .wpz-g-card .wpz-g-fields select, html[data-theme="dark"] .wpz-g-card textarea{ background: #262627; color: #f3f4f6; border-color: rgba(148,163,184,0.3); }
html[data-theme="dark"] .wpz-g-status, html[data-theme="dark"] .wpz-g-li{ background: rgba(255,255,255,0.06); }

@media (max-width: 560px){
  .wpz-g-banner{ margin: 6px 8px 2px; }
  .wpz-wd-cell{ width: 38px; height: 38px; font-size: 17px; }
  .wpz-tq-card{ right: 8px; top: 72px; }
}
