/* jackpot.css -- Jackpot panel, trait card grid, reveal animation, and winner glow */

/* -------------------------------------------------------------------------
   Jackpot panel palette.

   The hero had drifted into six near-identical golds (#c99b3e, #f5b446,
   #cf8e2d, #d4af37, #e4c57a, #f5a623), three unrelated near-blacks (#151515,
   #131418, #090203) and teal/magenta section accents that belong to no other
   surface on the page. These tokens are the deduplicated set: one gold read as
   metal (specular / body / shadow side), one warm ink, and the maroon
   faceplate the day-history control already used.

   The gold is the app's --accent-primary family; --jp-gold-hi and
   --jp-gold-dim are its lit and shaded faces, which is what makes an edge read
   as metal instead of as a yellow line. The two roll accents stay two colours
   apart — that distinction carries information — but both come home to the
   red/gold language.
   ------------------------------------------------------------------------- */
:root {
  --jp-gold-hi: #ffe7b0;
  --jp-gold: #e3b662;
  --jp-gold-dim: #8b6526;
  --jp-gold-edge: rgba(227, 182, 98, 0.34);
  --jp-ink: #0d0507;
  --jp-ink-deep: #050203;
  --jp-plate: #4a141b;
  --jp-roll-1: #e3b662;
  --jp-roll-2: #cc4a4f;
}

/* -------------------------------------------------------------------------
   Plan 39-10: <day-jackpot-summary> widget — compact day summary rendered
   inside <replay-panel> between the card grid and the winners list.
   ------------------------------------------------------------------------- */
.day-jackpot-summary {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--jp-gold-dim, #8b6526);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(227, 182, 98, 0.05), transparent 40%),
    var(--jp-ink, #0d0507);
  box-shadow:
    inset 0 1px 0 rgba(255, 231, 176, 0.08),
    0 6px 18px -10px rgba(0, 0, 0, 0.9);
}
.day-jackpot-summary > header {
  font-size: 0.85rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--jp-gold, #e3b662);
  margin-bottom: 0.5rem;
}
.day-jackpot-summary-body {
  min-height: 2rem;
}

/* -------------------------------------------------------------------------
   Plan 39-11: day-based three-section role-aware render
   ------------------------------------------------------------------------- */
.day-jackpot-summary .jp-section {
  margin-top: 0.6rem;
  padding: 0.4rem 0.6rem;
  border-radius: 4px;
  background: rgba(227, 182, 98, 0.035);
}
/* The two rolls stay a full hue apart so the sections remain tellable at a
   glance; both now read as jackpot surfaces rather than as a teal/magenta pair
   borrowed from somewhere else. */
.day-jackpot-summary .jp-section-rollone {
  border-left: 3px solid var(--jp-roll-1, #e3b662);
}
.day-jackpot-summary .jp-section-rolltwo {
  border-left: 3px solid var(--jp-roll-2, #cc4a4f);
}
.day-jackpot-summary .jp-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--jp-gold, #e3b662);
  margin: 0 0 0.35rem;
}
.day-jackpot-summary .jp-subsection {
  margin: 0.25rem 0 0.5rem;
}
.day-jackpot-summary .jp-subsection-title {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim, #8a8aa5);
  margin: 0.3rem 0 0.2rem;
}
.day-jackpot-summary .jp-summary-badge img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  vertical-align: middle;
}
.day-jackpot-summary .jp-solo-bucket {
  background: rgba(227, 182, 98, 0.09);
  border: 1px solid var(--jp-gold-edge, rgba(227, 182, 98, 0.34));
  box-shadow: 0 0 0 1px rgba(227, 182, 98, 0.16) inset;
  border-radius: 4px;
  padding: 3px 6px !important;
}
.day-jackpot-summary .jp-whale-pass-badge {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 4px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #1a1206;
  background: linear-gradient(180deg, var(--jp-gold-hi, #ffe7b0), var(--jp-gold, #e3b662));
  border-radius: 3px;
}
.day-jackpot-summary .jp-far-future {
  border-top: 1px dashed rgba(204, 74, 79, 0.42);
  padding-top: 4px;
}
.day-jackpot-summary .jp-summary-empty,
.day-jackpot-summary .jp-summary-error,
.day-jackpot-summary .jp-summary-status {
  font-size: 0.75rem;
  color: var(--text-dim, #8a8aa5);
  padding: 8px 0;
  text-align: center;
}
.day-jackpot-summary .jp-summary-error {
  color: #d97a5a;
}


.jackpot-panel {
  /* inherits .panel */
}

.jackpot-day {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary);
  padding: 0.2rem 0.6rem;
  background: rgba(139, 92, 246, 0.12);
  border-radius: 6px;
}

/* -------------------------------------------------------------------------
   Plan 03: jp-day-port — scrubber + winners dropdown section
   Renders above the existing 4-card reveal (user addendum A6: coexist).
   ------------------------------------------------------------------------- */

.jp-day-port {
  margin-bottom: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color, #3a3a5c);
}

/* The scrubber container — createScrubber injects .viewer-scrubber markup here,
   reusing the viewer CSS classes so the scrubber looks consistent everywhere. */
.jp-day-scrubber {
  margin-bottom: 0.75rem;
}

/* Winners section: label above, list below */
.jp-winners {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.jp-winners-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim, #6b6b8d);
  white-space: nowrap;
}



/* Winner summary block — above the winner dropdown, rendered per day change */
.jp-winner-summary {
  background: rgba(245, 166, 35, 0.06);
  border: 1px solid rgba(245, 166, 35, 0.2);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.6rem;
  font-size: 0.75rem;
}

.jp-summary-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-primary, #f5a623);
  margin-bottom: 0.35rem;
}

.jp-summary-row {
  display: grid;
  grid-template-columns: 56px 1fr 1fr;
  gap: 0 0.5rem;
  align-items: center;
  padding: 2px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.jp-summary-row:last-child {
  border-bottom: none;
}

/* Decimator + BAF rows only have 2 children (type + amount) so the default
 * 3-column grid squeezes them into a narrow middle column.  Override to flex. */
.jp-decimator-row,
.jp-baf-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.jp-decimator-row .jp-summary-type,
.jp-baf-row .jp-summary-type {
  flex: 1 1 auto;
}

.jp-decimator-row .jp-summary-amount,
.jp-baf-row .jp-summary-amount {
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.jp-decimator-total {
  font-weight: 700;
}

.jp-decimator-perround {
  margin-top: 0.2rem;
  padding-left: 0.9rem;
  border-left: 2px solid rgba(239, 68, 68, 0.35);
}

.jp-decimator-perround .jp-summary-row {
  padding: 1px 0 1px 0.4rem;
  font-size: 0.92em;
  opacity: 0.88;
}

.jp-decimator-perround .jp-summary-type {
  font-weight: 500;
}

.jp-summary-type {
  font-weight: 700;
  color: var(--text-primary, #e0e0e0);
}

.jp-summary-count {
  color: var(--success, #22c55e);
  font-variant-numeric: tabular-nums;
}

.jp-summary-uniq {
  color: var(--text-dim, #888);
  font-weight: 400;
}

.jp-summary-amount {
  color: var(--text-secondary, #a0a0c0);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.jp-summary-note {
  color: var(--text-dim, #888);
  font-style: italic;
  font-size: 0.72rem;
}

/* -------------------------------------------------------------------------
   Winners address list with hover breakdown tooltip (plan 39-04)
   ------------------------------------------------------------------------- */

.jp-winners-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--border-color, #3a3a5c);
  border-radius: 6px;
  background: var(--bg-tertiary, #252542);
  flex: 1;
  min-width: 0;
}

.jp-winner-item {
  position: relative;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  font-family: monospace;
  color: var(--text-secondary, #a0a0c0);
  cursor: pointer;
  border-bottom: 1px solid var(--border-color, #2a2a45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  justify-content: space-between;
}

.jp-winner-addr {
  flex: 0 0 auto;
}

.jp-winner-amount {
  flex: 1 1 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #d0d0e0);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.jp-winner-item--selected .jp-winner-amount {
  color: var(--accent-primary, #f5a623);
}

.jp-winners-group + .jp-winners-group {
  margin-top: 0.75rem;
}

.jp-winners-group .jp-winners-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary, #a0a0c0);
  padding: 0.25rem 0.5rem;
  border-bottom: 1px solid var(--border-color, #2a2a45);
}

.jp-winners-group[data-bind="jp-winners-group-baf"] .jp-winners-label {
  color: #f5a623; /* warm accent — matches existing BAF / amber palette */
}

.jp-winners-group[data-bind="jp-winners-group-decimator"] .jp-winners-label {
  color: #e25c5c; /* dim red — decimator palette */
}

.jp-winner-item:last-child {
  border-bottom: none;
}

.jp-winner-item:hover {
  background: rgba(139, 92, 246, 0.12);
  color: var(--text-primary, #e0e0e0);
}

.jp-winner-item--selected {
  background: rgba(139, 92, 246, 0.18);
  color: var(--accent-primary, #f5a623);
  font-weight: 700;
}

.jp-winner-item--selected:hover {
  background: rgba(139, 92, 246, 0.25);
}

.jp-winner-item--empty {
  color: var(--text-dim, #888);
  font-style: italic;
  cursor: default;
  font-family: inherit;
}

.jp-winner-item--empty:hover {
  background: none;
  color: var(--text-dim, #888);
}

/* Hover tooltip — appears above the hovered item */
.jp-winner-tip {
  display: none;
  position: absolute;
  left: 0;
  bottom: calc(100% + 4px);
  z-index: 100;
  background: var(--bg-secondary, #1a1a2e);
  border: 1px solid var(--border-color, #3a3a5c);
  border-radius: 6px;
  padding: 0.4rem 0.6rem;
  font-size: 0.72rem;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-secondary, #a0a0c0);
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  flex-direction: column;
  gap: 2px;
  min-width: 160px;
}

.jp-winner-tip span {
  display: block;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #e0e0e0);
}

.jp-winner-item:hover .jp-winner-tip {
  display: flex;
}

/* -------------------------------------------------------------------------
   Plan 39-06: Day Overview — made visually distinct from winners list.
   Collapsed by default (D-12). Sits between replay-section and jp-winners.
   ------------------------------------------------------------------------- */

.jp-overview {
  margin-top: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--accent-primary, #f5a623);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(245, 166, 35, 0.04);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.jp-overview > summary {
  list-style: none; /* hide default marker, we draw our own triangle */
  padding: 0.6rem 0.9rem 0.6rem 1.9rem;
  position: relative;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-primary, #f5a623);
  background: rgba(245, 166, 35, 0.10);
  user-select: none;
  transition: background 0.15s;
}

.jp-overview > summary::-webkit-details-marker { display: none; }

/* Disclosure triangle — rotates when [open] */
.jp-overview > summary::before {
  content: '';
  position: absolute;
  left: 0.7rem;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 6px solid var(--accent-primary, #f5a623);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transform: translateY(-50%);
  transition: transform 0.18s ease;
}

.jp-overview[open] > summary::before {
  transform: translateY(-50%) rotate(90deg);
}

.jp-overview > summary:hover {
  background: rgba(245, 166, 35, 0.18);
}

.jp-overview-body {
  padding: 0.75rem 0.9rem;
  font-size: 0.8rem;
  color: var(--text-secondary, #a0a0c0);
  background: var(--bg-tertiary, #252542);
  border-top: 1px solid rgba(245, 166, 35, 0.25);
}
/* Section headings that label the two stacked sections (A6 coexistence layout) */
.jp-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim, #6b6b8d);
  margin: 0 0 0.6rem;
  padding-top: 0.5rem;
}

/* -------------------------------------------------------------------------
   Plan 03: jo-* classes — Day Overview grid (ported from wtf/jackpot-demo.html
   inline styles). These classes are generated by jackpot-rolls.js (_appendOverviewRow)
   and were missing from the shared stylesheet, causing badges to render tiny/unsized.
   ------------------------------------------------------------------------- */

.jackpot-overview {
  margin-top: 16px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.jackpot-overview-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-primary, #f5a623);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.jo-subheading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary, #cfd8e3);
  letter-spacing: 0.04em;
  margin: 6px 0 4px;
  text-transform: uppercase;
}

/* 7-column grid: [badge] [winners] [unique] [coin] [tickets] [eth] [spread] */
.jo-grid {
  display: grid;
  grid-template-columns: 28px 36px 44px 52px 44px 60px 1fr;
  gap: 0 4px;
  font-size: 0.75rem;
  width: 100%;
}

.jo-header {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary, #f5a623);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.jo-row { display: contents; }

.jo-row > * {
  padding: 4px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary, #e0e0e0);
}

.jo-row:last-child > * { border-bottom: none; }

/* Badge image in overview row — explicit size prevents collapsing to tiny/intrinsic */
.jo-type-badge img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.jo-type-badge.jo-bonus {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text-dim, #888);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.jo-winners { color: var(--success, #22c55e); font-weight: 700; }
.jo-unique  { color: var(--text-dim, #888); }
.jo-coin, .jo-tickets { color: var(--text-primary, #e0e0e0); }
.jo-eth { color: var(--success, #22c55e); font-weight: 700; }

.jo-spread { display: flex; gap: 4px; align-items: center; }

.jo-spread-bar {
  height: 8px;
  border-radius: 2px;
  background: rgba(245, 166, 35, 0.3);
  flex: 1;
}

.jo-spread-bar.active { background: var(--accent-primary, #f5a623); }

.jo-far-future-note {
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(245, 166, 35, 0.10);
  border: 1px solid rgba(245, 166, 35, 0.25);
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

.jo-empty,
.jo-loading {
  font-size: 0.75rem;
  color: var(--text-dim, #888);
  text-align: center;
  padding: 16px 0;
}

.jo-loading {
  animation: jo-pulse 1.2s ease-in-out infinite;
}

@keyframes jo-pulse {
  0%, 100% { opacity: 0.5; }
  50%       { opacity: 1; }
}

/* -------------------------------------------------------------------------
   Plan 04 (rebuild): Replay / Bonus Roll section
   ------------------------------------------------------------------------- */

.jp-replay-section {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color, #3a3a5c);
}

.jp-replay-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

/* Spin flame indicator — small animated flame icon using CSS */
.jp-spin-flame {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  background: url('/specials/special_none.svg') center / contain no-repeat;
  opacity: 0.5;
  transition: opacity 0.2s;
}

.jp-spin-flame.jp-spinning {
  opacity: 1;
  animation: jp-flame-pulse 0.6s ease-in-out infinite;
}

@keyframes jp-flame-pulse {
  0%, 100% { filter: brightness(1) sepia(0) saturate(1); opacity: 0.8; }
  50%       { filter: brightness(1.4) sepia(1) saturate(5) hue-rotate(-30deg); opacity: 1; }
}

/* Replay button */
.jp-replay-btn {
  padding: 0.4rem 1.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid var(--accent-primary, #f5a623);
  border-radius: 6px;
  background: rgba(245, 166, 35, 0.12);
  color: var(--accent-primary, #f5a623);
  cursor: pointer;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
}

.jp-replay-btn:hover:not(:disabled) {
  background: rgba(245, 166, 35, 0.28);
  transform: translateY(-1px);
}

.jp-replay-btn:active:not(:disabled) { transform: translateY(0); }

.jp-replay-btn:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  transform: none;
}

/* Spinning button pulse — plays when data-state is roll1_playing or roll2_playing */
.jp-replay-btn[data-state="roll1_playing"],
.jp-replay-btn[data-state="roll2_playing"] {
  animation: jp-btn-spin 0.7s ease-in-out infinite;
}

@keyframes jp-btn-spin {
  0%, 100% { opacity: 0.55; }
  50%       { opacity: 1; }
}

/* Roll headings */
.jp-roll-heading {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary, #f5a623);
  margin: 0.5rem 0 0.4rem;
}

.jp-roll2-heading {
  color: var(--text-secondary, #a0a0c0);
  border-top: 1px solid var(--border-color, #3a3a5c);
  padding-top: 0.6rem;
  margin-top: 0.75rem;
}

.jp-roll-subheading {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim, #888);
  margin: 0.4rem 0 0.25rem;
}

/* Roll 1 empty placeholder */
.jp-roll1-empty {
  font-size: 0.75rem;
  color: var(--text-dim, #888);
  font-style: italic;
  padding: 8px 0;
  grid-column: 1 / -1;
}

/* Staggered row reveal animation — fade in + unblur from the left */
@keyframes jp-row-reveal {
  from {
    opacity: 0;
    filter: blur(4px);
    transform: translateX(-6px);
  }
  to {
    opacity: 1;
    filter: none;
    transform: translateX(0);
  }
}

.jp-row-reveal {
  animation: jp-row-reveal 0.35s ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .jp-row-reveal {
    animation: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
  .jp-replay-btn[data-state="roll1_playing"],
  .jp-replay-btn[data-state="roll2_playing"] {
    animation: none !important;
  }
  .jp-spin-flame.jp-spinning {
    animation: none !important;
  }
}

/* Plan 39-05: Roll 2 slot grid — 3 columns, 9 rows (8 slots + 1 far-future) */
.jp-roll2-slot-grid {
  display: grid;
  grid-template-columns: 1fr 60px 1fr;
  gap: 4px 8px;
  font-size: 0.8rem;
  margin-top: 0.4rem;
}
.jp-slot-header {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-primary, #f5a623);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.jp-slot-symbol {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary, #e0e0e0);
}
.jp-slot-symbol img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}
.jp-slot-symbol.jp-slot-farfuture {
  font-weight: 700;
  color: var(--accent-primary, #f5a623);
}
.jp-slot-wins {
  color: var(--success, #22c55e);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.jp-slot-amount {
  color: var(--text-primary, #e0e0e0);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.jp-slot-empty {
  opacity: 0.35;
  color: var(--text-dim, #888) !important;
  font-weight: 400;
}

/* -------------------------------------------------------------------------
   Plan 39-08: Defensive guarantees for Day Overview visibility.
   Prevents accidental hiding from future refactors or cascade collisions.
   ------------------------------------------------------------------------- */
.jp-day-port { overflow: visible; min-height: 0; }
.jp-day-port > .jp-overview {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 44px;
}
.jp-day-port > .jp-overview > summary {
  display: list-item;
  min-height: 32px;
}

/* -------------------------------------------------------------------------
   Plan 39-09: Ticket sub-row treatment for Roll 1 + Roll 2.
   Renders nested under the parent trait row with indent + badge + count.
   grid-column: 1 / -1 spans all columns of the parent CSS grid (7 in Roll 1,
   3 in Roll 2). Warm gold = "ticket". Works because jo-row uses
   display:contents so sibling cells are direct grid children.
   ------------------------------------------------------------------------- */
.jp-ticket-subrow {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 4px 32px; /* indent for visual nesting */
  font-size: 0.85em;
  color: #d4af37;
  background: rgba(212, 175, 55, 0.06);
  border-left: 2px solid rgba(212, 175, 55, 0.4);
}
.jp-ticket-subrow-badge img {
  width: 18px;
  height: 18px;
  vertical-align: middle;
  opacity: 0.85;
}
.jp-ticket-subrow-label {
  font-weight: 500;
  letter-spacing: 0.02em;
}


/* -------------------------------------------------------------------------
   Ticket Distribution widget (point-in-time top/bottom traits per level)
   ------------------------------------------------------------------------- */
.jp-trait-dist {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--jp-gold-dim, #8b6526);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(227, 182, 98, 0.05), transparent 40%),
    var(--jp-ink, #0d0507);
}
.jp-trait-dist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}
.jp-trait-dist-label {
  font-size: 0.85rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--jp-gold, #e3b662);
}
.jp-trait-dist-level {
  font-size: 0.8rem;
  color: #9aa;
}
.jp-trait-dist-level select {
  margin-left: 0.4rem;
  background: var(--jp-ink-deep, #050203);
  color: var(--jp-gold-hi, #ffe7b0);
  border: 1px solid var(--jp-gold-dim, #8b6526);
  border-radius: 4px;
  padding: 2px 6px;
}
.jp-trait-dist-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.jp-trait-dist-group-label {
  font-size: 0.75rem;
  color: #9aa;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}
.jp-trait-dist-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  font-size: 0.85rem;
  padding: 2px 0;
  color: #c9b98c;
}
.jp-trait-dist-tkts {
  color: #e4c57a;
  font-weight: 600;
}
.jp-trait-dist-holders {
  color: #8a7f5f;
  text-align: right;
}
.jp-trait-dist-empty {
  font-size: 0.85rem;
  color: #6a6a6a;
  padding: 0.5rem 0;
}

/* -------------------------------------------------------------------------
   Lootbox Opens widget (per-player opens on the selected day)
   ------------------------------------------------------------------------- */
.jp-lootbox-opens {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid #2a1a3a;
  border-radius: 6px;
  background: #131418;
}
.jp-lootbox-opens-label {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #9ab5e4;
  margin-bottom: 0.5rem;
}
.jp-lo-row {
  display: grid;
  grid-template-columns: 40px 1fr auto auto;
  gap: 0.5rem;
  padding: 2px 0;
  font-size: 0.85rem;
  color: #c9d1e4;
  align-items: center;
}
.jp-lo-target {
  color: #9ab5e4;
  font-weight: 600;
}
.jp-lo-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.jp-lo-trait {
  background: #1c2234;
  border: 1px solid #2a3a5a;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 0.75rem;
  color: #c9d1e4;
}
.jp-lo-count {
  color: #9aa;
}
.jp-lo-rewards {
  color: #e4c57a;
  font-size: 0.8rem;
}
.jp-lootbox-opens-empty {
  font-size: 0.85rem;
  color: #6a6a6a;
  padding: 0.25rem 0;
}
