/* Caffeine lesson. All rules scoped under .caf-* */
.caf-sc { position: relative; width: 100%; max-width: 360px; height: 262px; margin: 0 auto; overflow: hidden; }
.caf-top { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.caf-clock { display: flex; align-items: center; gap: 6px; padding: 5px 10px 5px 6px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); }
.caf-clock svg { width: 22px; height: 22px; fill: none; stroke: var(--text); stroke-width: 2; stroke-linecap: round; }
.caf-hand { transform-box: view-box; transform-origin: 12px 12px; transition: transform .5s ease; stroke: var(--gold); }
.caf-clock b { font: 800 15px var(--sans); color: var(--text); min-width: 46px; font-variant-numeric: tabular-nums; }
.caf-meter { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.caf-meter span { font: 700 12px var(--sans); color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.caf-pips { display: flex; gap: 4px; }
.caf-pips i { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--line-strong); transition: background .3s, border-color .3s, box-shadow .3s; }
.caf-pips i.on { background: var(--violet-bright); border-color: var(--violet-bright); box-shadow: 0 0 8px rgba(169,155,255,.7); }
.caf-pilecap { position: absolute; left: 0; right: 0; top: 46px; text-align: center; font: 700 12px var(--sans); color: var(--dim); opacity: 0; transition: opacity .4s; }
.caf-pilecap.on { opacity: 1; }
.caf-cell { position: absolute; left: 0; right: 0; bottom: 22px; height: 34px; border-radius: 16px 16px 10px 10px; background: linear-gradient(180deg, rgba(123,92,253,.32), rgba(123,92,253,.12)); border-top: 2px solid var(--violet-bright); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; }
.caf-cell span { font: 700 12px var(--sans); color: var(--violet-bright); }
.caf-key { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 5px; font: 600 12px var(--sans); color: var(--dim); }
.caf-key i { width: 11px; height: 14px; margin-left: 8px; }
.caf-key svg { display: block; width: 100%; height: 100%; overflow: visible; fill: currentColor; }
.caf-key i.a { color: var(--violet-bright); }
.caf-key i.c { color: var(--gold); }
.caf-key em { font-style: normal; color: var(--faint); margin-left: 10px; }

/* locks and molecules: one shape for both, so the fit reads at a glance */
.caf-lock { position: absolute; z-index: 3; width: 34px; height: 17px; color: var(--text); opacity: .9; transition: left .4s, color .3s, filter .3s; animation: cafIn .35s ease-out both; }
.caf-lock svg { display: block; width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
@keyframes cafIn { from { opacity: 0; scale: .5; } }
.caf-lock.a { color: var(--violet-bright); filter: drop-shadow(0 3px 5px rgba(169,155,255,.9)); }
.caf-lock.c { color: var(--gold); }
.caf-m { position: absolute; left: 0; top: 0; width: 22px; height: 28px; transition: transform .7s cubic-bezier(.3,.7,.2,1), opacity .4s; z-index: 2; }
.caf-m svg { display: block; width: 100%; height: 100%; overflow: visible; fill: currentColor; }
.caf-m.a { color: var(--violet-bright); filter: drop-shadow(0 0 5px rgba(169,155,255,.6)); }
.caf-m.c { color: var(--gold); filter: drop-shadow(0 0 5px rgba(252,192,80,.6)); }
.caf-m.gone { opacity: 0; }
.caf-left { position: absolute; left: 0; right: 0; top: 46px; text-align: center; font: 600 13px var(--sans); color: var(--dim); z-index: 3; }
.caf-left b { color: var(--gold); font-weight: 800; }
.caf-left + .caf-pilecap, .caf-sc:has(.caf-left) .caf-pilecap { display: none; }

/* two friends */
.caf-fr { display: flex; justify-content: center; gap: 22px; width: 100%; }
.caf-cup { position: relative; width: 120px; height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 12px; border-radius: 10px 10px 34px 34px; background: linear-gradient(180deg, #6b4428, #3b2414); border: 3px solid var(--text); }
.caf-cup::after { content: ''; position: absolute; right: -24px; top: 26px; width: 22px; height: 46px; border: 3px solid var(--text); border-left: none; border-radius: 0 22px 22px 0; }
.caf-cup b { font: 800 24px var(--sans); color: var(--gold); }
.caf-cup span { font: 600 12.5px var(--sans); color: var(--text); }

@media (max-height: 700px) {
  .caf-sc { height: 232px; }
  .caf-cup { height: 108px; width: 104px; }
}
