/* Dopamine lesson. All rules scoped under .dp-* */
.dp-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dp-note { font-size: 13px; color: var(--dim); text-align: center; max-width: 300px; }
.dp-hero img { display: block; width: 230px; max-width: 100%; max-height: 34vh; object-fit: contain; margin: 0 auto; filter: drop-shadow(0 18px 30px rgba(123, 92, 253, .35)); }
.dp-hero.wide img { width: 300px; }
.dp-hero.coat img { width: 150px; }
@keyframes dpIn { from { opacity: 0; transform: translateY(6px); } }

/* ---------- the coin machine ---------- */
.dp-mach { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dp-panel { position: relative; width: 210px; height: 236px; border-radius: 28px; background: linear-gradient(180deg, var(--raised), var(--surface)); border: 2px solid var(--line-strong); box-shadow: inset 0 2px 0 rgba(255,255,255,.04), 0 18px 40px rgba(0,0,0,.35); }
.dp-lampw { position: absolute; left: 50%; top: 18px; width: 70px; height: 70px; margin-left: -35px; border-radius: 50%; background: #0B1020; border: 3px solid var(--line-strong); display: grid; place-items: center; }
.dp-lamp { width: 52px; height: 52px; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #2A3550, #141A2C 70%); transition: background .08s, box-shadow .08s; }
.dp-lamp.on { background: radial-gradient(circle at 38% 34%, #FFFFFF, #9EEBFF 45%, #36BFEA 80%); box-shadow: 0 0 22px 8px rgba(110, 220, 255, .55), 0 0 60px 18px rgba(110, 220, 255, .25); }
.dp-chute { position: absolute; left: 50%; top: 100px; width: 36px; height: 44px; margin-left: -18px; border-radius: 6px 6px 0 0; background: #0B1020; border: 2px solid var(--line); border-bottom: 0; }
.dp-tray { position: absolute; left: 22px; right: 22px; bottom: 18px; height: 72px; border-radius: 14px 14px 24px 24px; background: #0B1020; border: 2px solid var(--line-strong); overflow: hidden; }
.dp-tray.shake { animation: dpShake .32s; }
@keyframes dpShake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.dp-coin { position: absolute; left: 50%; bottom: 30px; width: 50px; height: 50px; margin-left: -25px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 36% 32%, #FFF1C4, #FCC050 55%, #C98C1B); border: 3px solid #FFE08A; box-shadow: 0 0 16px 3px rgba(252,192,80,.45);
  opacity: 0; transform: translateY(-46px) scale(.8); pointer-events: none; }
.dp-coin b { font-family: var(--mono); font-size: 13px; color: #3A2604; }
.dp-coin.drop { opacity: 1; transform: none; transition: transform .34s cubic-bezier(.5,0,.9,.6), opacity .1s; }
.dp-coin.got { opacity: 0; transform: translateY(-40px) scale(1.25); transition: transform .3s ease-out, opacity .3s; }
.dp-coin.gone { opacity: 0; transform: scale(.6); transition: transform .25s, opacity .25s; }
.dp-rds { display: flex; gap: 10px; }
.dp-rds i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-strong); }
.dp-rds i.now { border-color: var(--violet-bright); }
.dp-rds i.got { background: var(--gold); border-color: var(--gold); }
.dp-rds i.miss { background: var(--raised); border-color: var(--faint); }
.dp-rds i.none { border-style: dashed; border-color: var(--dim); }
.btn.dp-grab { font-size: 18px; }

/* ---------- the cell ---------- */
.dp-cell { position: relative; width: 160px; height: 160px; flex: none; }
.dp-cell svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dp-arms path { fill: none; stroke: #6B58C9; stroke-width: 6; stroke-linecap: round; }
.dp-arms circle { fill: #6B58C9; }
.dp-body { fill: #7B5CFD; stroke: rgba(255,255,255,.25); stroke-width: 2; }
.dp-nuc { fill: rgba(10, 14, 26, .55); }
.dp-halo { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle, rgba(255, 227, 163, .95) 0%, rgba(252, 192, 80, .5) 30%, rgba(252, 192, 80, 0) 68%); opacity: 0; }
.dp-ring { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; border: 3px solid var(--gold); opacity: 0; }
.dp-ring.on { animation: dpRing .7s ease-out; }
@keyframes dpRing { 0% { opacity: .9; transform: scale(1); } 100% { opacity: 0; transform: scale(2.6); } }
.dp-cell.dim .dp-arms path { stroke: #3A4260; } .dp-cell.dim .dp-arms circle { fill: #3A4260; }

/* ---------- a replay: moments in a row over the cell ---------- */
.dp-rp { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.dp-rp-row { display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.dp-slot { width: 104px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dp-chipw { height: 28px; display: flex; align-items: flex-end; }
.dp-ico { width: 56px; height: 56px; display: grid; place-items: center; }
.dp-ico svg { width: 56px; height: 56px; overflow: visible; }
.dp-cap { font-size: 13px; font-weight: 700; color: var(--dim); }
.dp-arrow { width: 26px; margin-bottom: 42px; }
.dp-arrow svg { width: 26px; height: 13px; fill: none; stroke: var(--faint); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.dp-slot.off .dp-ico { opacity: .3; }
.dp-slot.off .dp-cap { color: var(--faint); }

.dp-bulb { fill: #1D2640; stroke: var(--line-strong); stroke-width: 2; transition: fill .1s; }
.dp-base { fill: var(--faint); }
.dp-light.on .dp-bulb { fill: #9EEBFF; filter: drop-shadow(0 0 7px rgba(110, 220, 255, .9)); }
.dp-pipe { fill: none; stroke: var(--dim); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
.dp-drop { fill: #7FC8FF; opacity: .3; }
.dp-nox { fill: none; stroke: var(--faint); stroke-width: 3; stroke-linecap: round; opacity: 0; }
.dp-juice.on .dp-drop { opacity: 1; animation: dpDrip .45s ease-in; }
@keyframes dpDrip { from { transform: translateY(-8px); opacity: 0; } }
.dp-juice.none .dp-drop, .dp-card.none .dp-drop { opacity: .12; }
.dp-juice.none .dp-nox, .dp-card.none .dp-nox { opacity: 1; }
.dp-ph { fill: #1D2640; stroke: var(--dim); stroke-width: 2.5; }
.dp-vib { fill: none; stroke: var(--gold); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.dp-buzz.on .dp-vib { opacity: 1; }
.dp-buzz.on svg { animation: dpBuzz .12s linear 5; }
@keyframes dpBuzz { 50% { transform: translateX(2px); } }
.dp-bub { fill: #1D2640; stroke: var(--dim); stroke-width: 2.5; }
.dp-txt { stroke: var(--faint); stroke-width: 3; stroke-linecap: round; }
.dp-msg.on .dp-bub { fill: #2B3560; stroke: var(--violet-bright); }
.dp-msg.on .dp-txt { stroke: var(--text); }
.dp-bill { padding: 9px 8px; border-radius: 10px; background: #183A2B; border: 2px solid #3FA074; color: #CFF5DF; font-family: var(--mono); font-weight: 600; font-size: 15px; transition: transform .2s; }
.dp-pay.on .dp-bill { transform: scale(1.12); }
.dp-coatimg { width: 84px; height: 64px; object-fit: contain; transition: transform .2s; }
.dp-found.on .dp-coatimg { transform: scale(1.15); }

.dp-chip { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; animation: dpIn .25s both; white-space: nowrap; }
.dp-chip.burst { background: var(--gold); color: #2B1B00; box-shadow: 0 0 12px rgba(252,192,80,.5); }
.dp-chip.same { background: var(--raised); color: var(--dim); border: 1px solid var(--line-strong); }
.dp-chip.dip { background: #22304F; color: #A9C4FF; border: 1px solid #4B6AA8; }

/* ---------- the rule: three cards ---------- */
.dp-cards, .dp-steps { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.dp-card, .dp-step { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 6px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-align: center; }
.dp-ct { font-size: 13px; font-weight: 700; line-height: 1.25; color: var(--text); min-height: 33px; }
.dp-ci svg { width: 48px; height: 48px; overflow: visible; }
.dp-card .dp-drop { opacity: 1; }
.dp-cv { font-size: 13px; color: var(--dim); line-height: 1.25; }
.dp-step { opacity: .15; transition: opacity .3s; }
.dp-step.in { opacity: 1; }
.dp-mrow { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.dp-mi svg { width: 38px; height: 38px; overflow: visible; }
.dp-step .dp-drop { opacity: 1; }
.dp-step .dp-bulb { fill: #9EEBFF; }

/* ---------- rats ---------- */
.dp-facts { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dp-fact { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 2px solid var(--line); font-size: 14px; font-weight: 700; line-height: 1.2; }
.dp-fact b { font-size: 13px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.dp-fact b:empty::after { content: '?'; }
.dp-fact.yes { border-color: var(--mint); animation: dpIn .3s both; } .dp-fact.yes b { color: var(--mint); }
.dp-fact.no { border-color: #4B6AA8; animation: dpIn .3s both; } .dp-fact.no b { color: #A9C4FF; }
.dp-duo { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dp-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px 14px; border-radius: 16px; background: var(--surface); border: 2px solid var(--line); text-align: center; }
.dp-tile b { font-family: var(--serif); font-size: 22px; }
.dp-tile span { font-size: 14px; color: var(--dim); }
.dp-tile em { font-style: normal; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; margin-top: 6px; color: var(--mint); }
.dp-tile.want { border-color: var(--gold); } .dp-tile.want em { color: var(--gold); }

@media (max-height: 700px) {
  .dp-hero img { width: 180px; max-height: 30vh; }
  .dp-hero.wide img { width: 240px; }
  .dp-hero.coat img { width: 110px; }
  .dp-panel { width: 190px; height: 206px; }
  .dp-lampw { top: 14px; width: 62px; height: 62px; margin-left: -31px; }
  .dp-lamp { width: 46px; height: 46px; }
  .dp-chute { top: 86px; height: 34px; }
  .dp-tray { bottom: 14px; height: 66px; }
  .dp-coin { bottom: 22px; }
  .dp-cell { width: 128px; height: 128px; }
  .dp-coatimg { width: 72px; height: 56px; }
  .dp-ico, .dp-ico svg { width: 48px; height: 48px; }
  .dp-arrow { margin-bottom: 36px; }
  .dp-ct { min-height: 0; }
}
.dp-found .dp-ico, .dp-pay .dp-ico { width: auto; }
