/* DNA vs RNA Sort Shop: the sorting counter (left) and the evidence case (right) inside the practice shell's stage. */
.dr { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 12px; padding: 10px 12px; }

/* ── the counter ── */
.dr-shop { position: relative; min-width: 0; min-height: 0; border-radius: var(--tlg-radius-lg, 14px); overflow: hidden; border: 2px solid #b79b6c;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr) auto; padding: 14px 16px 10px; color: #1d2a33; }
.dr-shop-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.dr-shop > :not(.dr-shop-bg) { position: relative; z-index: 1; }
.dr-tray { display: flex; justify-content: center; align-items: center; min-height: 148px; padding-top: 4px; }
.dr-tray-note { margin: 4px 0 0; text-align: center; font-size: 16px; font-weight: 700; color: #3d4a52; }
.dr-tray-note { justify-self: center; background: rgba(255, 255, 255, .82); padding: 2px 12px; border-radius: 999px; }
.dr.has-card .dr-tray-note { visibility: hidden; }

/* the feature card: a manila tag */
.dr-card { position: relative; display: flex; flex-direction: column; gap: 4px; width: min(440px, 92%); min-height: 112px; box-sizing: border-box;
  padding: 12px 18px 14px 44px; background: linear-gradient(180deg, #fff8e2, #f5e6bd); border: 2px solid #b08a3c; border-radius: 12px;
  box-shadow: 0 6px 14px rgba(60, 40, 0, .28); color: #2b2418; text-align: left; cursor: grab; }
.dr-card:focus-visible { outline: 4px solid #b16a08; outline-offset: 3px; }
.dr-card-hole { position: absolute; left: 14px; top: 16px; width: 14px; height: 14px; border-radius: 50%; background: #e7d3a0; border: 2px solid #b08a3c; }
.dr-card-k { font-size: 16px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #8a6a1c; }
.dr-card-t { font-size: 24px; font-weight: 800; line-height: 1.2; }
.dr-stamp { position: absolute; right: 10px; bottom: -10px; transform: rotate(-8deg) scale(1.6); opacity: 0; padding: 2px 10px; border: 3px solid #245c70;
  border-radius: 8px; color: #245c70; background: rgba(255, 255, 255, .9); font-size: 17px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em;
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), opacity .2s; pointer-events: none; }
.dr-card.is-stamped .dr-stamp { opacity: 1; transform: rotate(-8deg) scale(1); }
.pdz-ghost.dr-card { cursor: grabbing; font-family: var(--tlg-font, system-ui, sans-serif); }

/* the crates */
.dr-bins { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; min-height: 0; padding-top: 6px; }
.dr-bin { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; height: 100%; border-radius: 14px; padding: 4px 4px 0; }
.dr-slot { flex: 1; min-height: 100px; display: flex; align-items: flex-end; justify-content: center; padding: 0 2px 4px; }
.dr-slot .dr-card { width: 100%; min-height: 0; padding: 8px 10px 12px 30px; gap: 2px; transform-origin: 50% 100%; }
.dr-slot .dr-card-hole { left: 9px; top: 11px; width: 11px; height: 11px; }
.dr-slot .dr-card-k { display: none; }
.dr-slot .dr-card-t { font-size: 16px; line-height: 1.25; }
.dr-slot .dr-stamp { font-size: 16px; right: 4px; top: auto; bottom: calc(100% - 6px); }
.dr-bin-btn { all: unset; box-sizing: border-box; position: relative; display: block; width: 100%; height: 188px; cursor: pointer; border-radius: 12px; }
.dr-bin-btn:focus-visible { outline: 4px solid #b16a08; outline-offset: 2px; }
.dr-bin-btn:disabled { cursor: default; }
.dr-crate { position: absolute; inset: 0; display: block; }
.dr-crate-svg { width: 100%; height: 100%; display: block; }
.dr-plate { position: absolute; left: 50%; bottom: 18px; white-space: nowrap; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; min-width: 116px;
  padding: 3px 10px 4px; background: #ffffff; border: 2px solid rgba(0, 0, 0, .3); border-radius: 8px; color: #14202a; line-height: 1.1; }
.dr-plate b { font-size: 26px; font-weight: 900; }
.dr-plate small { font-size: 16px; font-weight: 700; color: #45535c; }
.dr-bin.is-chosen .dr-bin-btn { box-shadow: 0 0 0 4px #245c70; }
.dr-bin.is-right .dr-bin-btn { box-shadow: 0 0 0 5px #1f7a3f; }
.dr-bin.is-wrong .dr-bin-btn { box-shadow: 0 0 0 5px #b42318; }
.dr-bin.is-wrong .dr-bin-btn::after { content: ''; position: absolute; inset: 0; border-radius: 12px; background: repeating-linear-gradient(45deg, rgba(180, 35, 24, .16) 0 8px, transparent 8px 16px); }
.dr-verdict { position: absolute; left: 50%; bottom: 82px; transform: translateX(-50%); white-space: nowrap; padding: 3px 10px; border-radius: 999px;
  font-size: 16px; font-weight: 800; color: #ffffff; background: #1f7a3f; z-index: 2; }
.dr-bin.is-wrong .dr-verdict { background: #b42318; }
.dr-verdict[hidden] { display: none; }
html.pdz-armed .dr-bin.pdz-zone { outline: 3px dashed rgba(36, 92, 112, .7); outline-offset: -2px; }
.dr-bin.pdz-zone.is-over { outline: 4px solid #245c70 !important; outline-offset: -2px; background: rgba(255, 255, 255, .35); }
.dr-msg { margin: 6px 0 0; min-height: 1.3em; font-size: 16px; font-weight: 800; color: #b42318; text-align: center; }
.dr-msg:not(:empty) { justify-self: center; background: rgba(255, 255, 255, .9); padding: 2px 12px; border-radius: 999px; }

/* ── the evidence case ── */
.dr-case { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-radius: var(--tlg-radius-lg, 14px); overflow: hidden;
  border: 3px solid #5b4a2c; background: linear-gradient(180deg, #7a5f38, #5b4527); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .12); }
.dr-case-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 12px; color: #fff6e0; font-size: 17px; }
.dr-case-tag { font-size: 16px; font-weight: 700; color: #f1dcb0; }
.dr-case-glass { position: relative; flex: 1; min-height: 0; margin: 0 8px; border-radius: 8px; overflow: hidden; background: #f7fbfd; display: flex; align-items: center; justify-content: center; }
.dr-case-svg { width: 100%; height: 100%; display: block; }
.dr-frost { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center;
  background: linear-gradient(135deg, rgba(232, 241, 245, .9), rgba(212, 227, 234, .86)); transition: opacity .6s ease; }
.dr-frost::before { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(115deg, rgba(255, 255, 255, .5) 0 2px, transparent 2px 26px); }
.dr-frost p { position: relative; margin: 0; max-width: 280px; font-size: 18px; font-weight: 700; color: #33424b; line-height: 1.35; }
.dr-case-glass.is-lit .dr-frost { opacity: 0; pointer-events: none; }
.dr-cap { margin: 8px 8px 0; min-height: 4.2em; padding: 8px 10px; border-radius: 8px; background: #fff8e2; color: #2b2418; font-size: 16px; line-height: 1.35; }
.dr-cap:empty { display: none; }
.dr-model-note { margin: 0; padding: 4px 10px 6px; font-size: 16px; color: #f1dcb0; text-align: right; }

/* dark mode: the art keeps its own lit colours; frames and notes follow the theme */
html[data-theme="dark"] .dr-shop { border-color: #6b5a3c; }
html[data-theme="dark"] .dr-shop-bg { filter: brightness(.62) saturate(.85); }
html[data-theme="dark"] .dr-tray-note { background: rgba(20, 28, 34, .85); color: #e6edf1; }
html[data-theme="dark"] .dr-msg { color: #ffb4a8; }
html[data-theme="dark"] .dr-msg:not(:empty) { background: rgba(20, 28, 34, .9); }
html[data-theme="dark"] .dr-case { border-color: #3d3120; background: linear-gradient(180deg, #4d3c24, #36291a); }
html[data-theme="dark"] .dr-cap { background: #2a2618; color: #f3ead2; }
html[data-theme="dark"] .dr-bin.is-chosen .dr-bin-btn { box-shadow: 0 0 0 4px #7fd0e4; }

@media (prefers-reduced-motion: reduce) {
  .dr-stamp, .dr-frost { transition: none; }
}

/* narrow / tablet: stack, the page may scroll */
@media (max-width: 900px) {
  .dr { position: static; grid-template-columns: 1fr; height: auto; }
  .dr-shop { min-height: 470px; grid-template-rows: auto auto auto auto; }
  .dr-bin { height: auto; }
  .dr-slot { min-height: 120px; }
  .dr-case-glass { flex: none; aspect-ratio: 400 / 440; max-height: 520px; }
}
@media (max-width: 520px) {
  .dr { padding: 6px; }
  .dr-shop { padding: 10px 8px 8px; }
  .dr-card-t { font-size: 20px; }
  .dr-bins { gap: 6px; }
  .dr-plate { min-width: 0; width: 90%; padding: 2px 4px; }
  .dr-plate b { font-size: 22px; }
  .dr-bin-btn { height: 150px; }
  .dr-verdict { font-size: 16px; padding: 2px 6px; }
}

/* lit evidence: the halo behind each highlighted part pulses gently */
.dr-case-glass.is-lit .dr-halo { animation: dr-pulse 1.6s ease-in-out infinite; }
@keyframes dr-pulse { 0%, 100% { opacity: .95; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .dr-case-glass.is-lit .dr-halo { animation: none; } }
