/* Bandwagon effect lesson. All rules scoped under .bwg-* */

/* ---------- the chart ---------- */
.bwg-chart { --rh: 28px; width: 100%; max-width: 360px; margin: 0 auto; display: flex; flex-direction: column; gap: 6px; }
.bwg-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; color: var(--dim); }
.bwg-head img { width: 40px; height: 40px; object-fit: contain; }
.bwg-head b { color: var(--gold); font-variant-numeric: tabular-nums; }
.bwg-list { position: relative; height: calc(var(--rh) * 8); }
.bwg-row { position: absolute; left: 0; right: 0; top: calc(var(--k, 0) * var(--rh)); height: calc(var(--rh) - 4px); display: grid; grid-template-columns: 18px 96px 1fr 34px; align-items: center; gap: 8px; padding: 0 10px; border-radius: 10px; border: 1px solid transparent; background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 700; text-align: left; transition: top .32s ease, border-color .3s, background .3s; }
button.bwg-row { cursor: pointer; }
.bwg-disc { display: block; width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), inset 0 0 0 4px rgba(255, 255, 255, .12); }
.bwg-name { white-space: nowrap; }
.bwg-bar { display: block; height: 8px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.bwg-bar b { display: block; height: 100%; width: 0; border-radius: 4px; background: var(--violet-bright); }
.bwg-n { text-align: right; font-variant-numeric: tabular-nums; color: var(--dim); }
.bwg-lead { border-color: rgba(252, 192, 80, .55); }
.bwg-lead .bwg-bar b { background: var(--gold); }
.bwg-lead .bwg-n { color: var(--gold); }
.bwg-mine { background: rgba(123, 92, 253, .22); border-color: var(--violet-bright); }
.bwg-row[disabled] { cursor: default; }
.bwg-compact { --rh: 25px; }
.bwg-compact .bwg-head { display: none; }

/* ---------- the worlds ---------- */
.bwg-strip { width: 100%; max-width: 360px; margin: 0 auto 10px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bwg-world { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 4px; border-radius: 12px; background: var(--surface); border: 1px dashed var(--line-strong); color: var(--dim); font-size: 12px; font-weight: 700; text-align: center; }
.bwg-world b { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text); white-space: nowrap; }
.bwg-world b .bwg-disc { width: 12px; height: 12px; }
.bwg-world small { font-size: 12px; color: var(--violet-bright); min-height: 1.2em; }
.bwg-world.bwg-on { border-style: solid; border-color: rgba(252, 192, 80, .5); }
.bwg-done .bwg-world { padding: 12px 4px; gap: 6px; }
.bwg-done .bwg-world small { color: var(--dim); }

/* ---------- the real version ---------- */
.bwg-real { width: 100%; max-width: 340px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.bwg-stat { display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border-radius: 12px; background: var(--surface); }
.bwg-stat b { font-size: 22px; color: var(--gold); font-variant-numeric: tabular-nums; }
.bwg-stat span { font-size: 12.5px; color: var(--dim); font-weight: 700; }
.bwg-lock { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.bwg-lw { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; background: var(--raised); }
.bwg-lw span { font-size: 12.5px; color: var(--dim); font-weight: 700; }
.bwg-lw b { font-size: 16px; color: var(--text); }
.bwg-lw em { font-style: normal; font-size: 34px; line-height: 1.1; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.bwg-lq em { color: var(--faint); }
.bwg-lq.bwg-shown em { color: var(--violet-bright); }

/* ---------- the no-counts world ---------- */
.bwg-minis { width: 100%; max-width: 360px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.bwg-mini { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 8px 6px 6px; border-radius: 12px; border: 2px solid var(--line); background: var(--surface); font: inherit; font-size: 12px; font-weight: 700; color: var(--dim); text-align: center; cursor: pointer; }
.bwg-mini[disabled] { cursor: default; }
.bwg-mini.bwg-right { border-color: var(--mint); background: rgba(63, 214, 154, .12); color: var(--text); }
.bwg-mini.bwg-wrong { border-color: var(--red); background: rgba(216, 85, 85, .12); }
.bwg-bars { height: 120px; display: flex; align-items: flex-end; gap: 2px; }
.bwg-bars i { flex: 1; display: block; border-radius: 3px 3px 0 0; min-height: 2px; }

/* ---------- the photos ---------- */
.bwg-photo { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 16px 24px; min-height: 0; }
.bwg-photo img { display: block; max-width: 100%; max-height: 100%; border-radius: 16px; object-fit: contain; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); }
.bwg-rice img { max-height: 46vh; }

/* ---------- the phone ---------- */
.bwg-phone { width: 190px; margin: 0 auto; padding: 10px; border-radius: 28px; background: #05070E; border: 2px solid var(--line-strong); }
.bwg-scr { display: flex; flex-direction: column; gap: 6px; padding: 12px 10px; border-radius: 20px; background: var(--surface); }
.bwg-top { font-size: 12px; font-weight: 700; color: var(--dim); }
.bwg-sh { display: grid; grid-template-columns: 22px 34px 1fr; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); }
.bwg-sh b { font-size: 20px; color: var(--faint); text-align: center; }
.bwg-sh i { display: block; height: 44px; border-radius: 6px; background: linear-gradient(160deg, #3A2E6E, #1B1730); }
.bwg-one b { color: var(--gold); }
.bwg-one i { background: linear-gradient(160deg, #C98C1B, #5B45C8); }

@media (max-height: 700px) {
  .bwg-chart { --rh: 25px; }
  .bwg-head img { width: 32px; height: 32px; }
  .bwg-compact { --rh: 22px; }
  .bwg-bars { height: 96px; }
  .bwg-sh i { height: 34px; }
  .bwg-rice img { max-height: 40vh; }
}
