/* Obedience lesson. All rules scoped under .obd-* */
.obd-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* the ward */
.obd-ward { min-height: 250px; justify-content: flex-end; padding-bottom: 6px; }
.obd-win { position: absolute; left: 50%; top: 0; translate: -50% 0; width: 150px; height: 92px; border-radius: 10px; background: linear-gradient(#141a3a, #232a5a); border: 4px solid var(--line-strong); overflow: hidden; }
.obd-moon { position: absolute; right: 22px; top: 16px; width: 26px; height: 26px; border-radius: 50%; background: #f5e9c8; box-shadow: 0 0 18px rgba(245,233,200,.6); }
.obd-clock { position: absolute; left: 50%; top: 100px; translate: -50% 0; font: 800 14px var(--sans); color: var(--dim); letter-spacing: .06em; }
.obd-ring { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 26px 12px; border-radius: 20px; background: var(--surface); border: 2px solid var(--gold); color: var(--text); font: 800 14px var(--sans); cursor: pointer; animation: obdRing .42s ease-in-out infinite; }
.obd-ring svg { width: 54px; height: 54px; fill: var(--gold); }
.obd-ring.picked { animation: none; border-color: var(--mint); }
.obd-ring.picked svg { fill: var(--mint); }
@keyframes obdRing { 0%, 100% { rotate: 0deg; } 25% { rotate: -7deg; } 75% { rotate: 7deg; } }

/* the call */
.obd-call { width: 100%; max-width: 350px; padding: 12px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-strong); }
.obd-ch { display: flex; align-items: center; gap: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.obd-ph { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(63,214,154,.15); }
.obd-ph svg { width: 20px; height: 20px; fill: var(--mint); }
.obd-ch b { display: block; font: 800 14px var(--sans); color: var(--text); }
.obd-ch small { font: 600 12.5px var(--sans); color: var(--dim); }
.obd-lines { display: flex; flex-direction: column; gap: 8px; padding-top: 10px; min-height: 150px; }
.obd-line { margin: 0; font: 600 16px/1.3 var(--serif); color: var(--text); animation: obdIn .4s ease-out both; }
.obd-line.still { animation: none; }
@keyframes obdIn { from { opacity: 0; translate: 0 6px; } }

/* the box */
.obd-order { padding: 6px 14px; border-radius: 10px; background: var(--raised); border: 1px solid var(--gold); font: 700 15px var(--sans); color: var(--text); }
.obd-order b { color: var(--gold); }
.obd-box { width: 100%; max-width: 300px; padding: 12px; border-radius: 12px; background: #f4f1ea; color: #1d2230; box-shadow: 0 10px 22px rgba(0,0,0,.35); border-top: 10px solid #3b6fd8; }
.obd-bt { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 6px; border-bottom: 2px solid #1d2230; margin-bottom: 4px; }
.obd-bt b { font: 900 22px var(--sans); letter-spacing: .06em; }
.obd-bt span { font: 700 12.5px var(--sans); color: #4a5060; }
.obd-rows .choices.obd-lbl { display: flex; flex-direction: column; gap: 4px; }
.obd-lbl .choice { min-height: 44px; padding: 6px 10px; justify-content: flex-start; background: transparent; border: 2px dashed rgba(29,34,48,.25); color: #1d2230; box-shadow: none; font: 700 15px var(--sans); text-transform: none; letter-spacing: 0; }
.obd-lbl .choice span { color: #1d2230; }
.obd-lbl .choice.right { border: 2px solid var(--mint); background: rgba(63,214,154,.18); }
.obd-lbl .choice.wrong { border: 2px solid var(--red); background: rgba(216,85,85,.15); }

/* the cup */
.obd-cupw { display: grid; grid-template-columns: auto 110px; grid-template-rows: auto auto; column-gap: 10px; align-items: end; }
.obd-marks { position: relative; height: 170px; width: 160px; }
.obd-marks span { position: absolute; right: 0; font: 700 13px var(--sans); white-space: nowrap; padding-right: 6px; border-right: 3px solid; translate: 0 50%; }
.obd-m20 { bottom: 100%; color: var(--dim); border-color: var(--dim); }
.obd-m10 { bottom: 50%; color: var(--gold); border-color: var(--gold); }
.obd-cup { position: relative; height: 170px; width: 110px; border: 3px solid var(--line-strong); border-top: none; border-radius: 0 0 22px 22px; overflow: hidden; background: rgba(255,255,255,.03); }
.obd-cup::before { content: ''; position: absolute; left: 0; right: 0; bottom: 50%; border-top: 2px dashed var(--gold); z-index: 2; }
.obd-fill { display: none; }
.obd-cupw.over .obd-cup { border-color: var(--gold); box-shadow: 0 0 16px rgba(252,192,80,.35); }
/* One capsule per quarter of the cup, so the marks read in capsules: two reach the daily limit, four the order. */
.obd-caps { position: absolute; inset: 0; display: flex; flex-direction: column-reverse; z-index: 3; }
.obd-cap { flex: 0 0 25%; display: block; position: relative; }
.obd-cap::before { content: ''; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 54px; height: 22px; border-radius: 11px; background: linear-gradient(90deg, #f2f2f2 50%, #e25a4a 50%); box-shadow: 0 2px 4px rgba(0,0,0,.3); animation: obdDrop .38s cubic-bezier(.4,0,.8,1) both; }
@keyframes obdDrop { from { translate: 0 -150px; rotate: -40deg; } }
.obd-mg { grid-column: 2; text-align: center; font: 700 14px var(--sans); color: var(--dim); margin-top: 6px; }
.obd-mg b { font: 800 20px var(--sans); color: var(--text); }

/* the 22 nurses */
.obd-nurses { display: grid; grid-template-columns: repeat(11, 24px); gap: 8px 6px; justify-content: center; padding: 10px 0; }
.obd-n { display: block; width: 24px; height: 34px; background: var(--violet-bright); -webkit-mask: radial-gradient(circle at 50% 8px, #000 7px, transparent 7.5px), radial-gradient(ellipse 12px 15px at 50% 34px, #000 98%, transparent 100%); mask: radial-gradient(circle at 50% 8px, #000 7px, transparent 7.5px), radial-gradient(ellipse 12px 15px at 50% 34px, #000 98%, transparent 100%); transition: background .25s, scale .25s; }
.obd-n.gave { background: var(--gold); scale: 1.08; }
.obd-said { padding: 6px 12px; border-radius: 10px; background: var(--raised); font: 700 14px var(--sans); color: var(--text); text-align: center; }
.obd-key { display: flex; gap: 16px; justify-content: center; font: 700 13px var(--sans); color: var(--dim); }
.obd-key span { display: flex; align-items: center; gap: 6px; }
.obd-key .obd-n { width: 14px; height: 20px; scale: 1; -webkit-mask: radial-gradient(circle at 50% 5px, #000 4px, transparent 4.5px), radial-gradient(ellipse 7px 9px at 50% 20px, #000 98%, transparent 100%); mask: radial-gradient(circle at 50% 5px, #000 4px, transparent 4.5px), radial-gradient(ellipse 7px 9px at 50% 20px, #000 98%, transparent 100%); }

/* named, Nuremberg */
.obd-art { display: block; width: 100%; max-width: 320px; filter: drop-shadow(0 10px 18px rgba(123,92,253,.28)); }
.obd-photo { margin: 0; width: 100%; max-width: 360px; }
.obd-photo img { display: block; width: 100%; border-radius: 12px; }
.obd-photo figcaption { margin-top: 4px; font: 600 12.5px var(--sans); color: var(--faint); text-align: center; }

@media (max-height: 700px) {
  .obd-ward { min-height: 220px; }
  .obd-win { height: 72px; width: 130px; }
  .obd-clock { top: 80px; }
  .obd-lines { min-height: 120px; }
  .obd-line { font-size: 15px; }
  .obd-marks, .obd-cup { height: 140px; }
  .obd-art { max-width: 250px; }
  .obd-photo { max-width: 300px; }
  .obd-nurses { gap: 6px 5px; }
}
