/* Presentation shared by the three adaptations; the original math UI stays separate. */
#study-actor.dopa-adapt-actors, .nm-game #actors.dopa-adapt-actors { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 5; overflow: visible; pointer-events: none; }
.dopa-performance-stage { position: relative; }
.study-play-mascot { width: 100%; height: 122px; margin: 0 0 12px; border-bottom: 3px solid var(--ink); border-radius: 50%; background: radial-gradient(ellipse at 50% 90%, #ffd23f66, transparent 65%); }
.nm-play-status { grid-template-columns: 1fr; }
#screen-nm-play .stage { grid-column: 1; grid-row: 3; height: 122px; min-height: 122px; width: 100%; overflow: visible; }
.nm-run-stage { grid-column: 1; grid-row: 2; }
.nm-game .spot { opacity: .22; }
.dopa-answer-slot { position: absolute; right: calc(50% - 108px); bottom: 65px; display: grid; place-items: center; width: 44px; height: 48px; border: 3px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 3px var(--ink); font-family: var(--chunky); font-size: 26px; }
.dopa-answer-slot.is-correct { background: #bdf3d9; }
.dopa-answer-slot.is-wrong { background: #ecdfff; border-style: dashed; }
.dopa-result-mascot { position: relative; width: min(100%, 400px); height: 128px; flex: none; margin: 0 auto; }
.dopa-award-links { display: flex; justify-content: center; flex-wrap: wrap; width: 100%; gap: 12px; margin: 12px 0; }
.dopa-award-links button { min-height: 48px; padding: 10px 18px; border: 2px solid var(--ink); border-radius: 14px; background: #fff5cd; color: var(--ink); box-shadow: 0 3px var(--ink); font: inherit; font-weight: 800; }
.dopa-award-links button:last-child { background: #e2f8ee; }
#learning-stars { display: grid; gap: 10px; }
.dopa-practice-tile { width: 100%; min-height: 48px; padding: 10px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; text-align: left; font: inherit; color: var(--ink); }
.dopa-adapt-cutin { position: absolute; left: 50%; top: 5px; z-index: 6; width: max-content; max-width: 95%; padding: 6px 14px; border: 3px solid var(--ink); border-radius: 14px; background: #ffd23f; color: var(--ink); box-shadow: 0 4px var(--ink); font-family: var(--chunky); font-size: clamp(17px, 3.6vw, 26px); line-height: 1.25; text-align: center; pointer-events: none; opacity: 0; transform: translate(-50%, -12px) scale(.8) rotate(-3deg); transition: opacity .16s ease-out, transform .26s cubic-bezier(.2,.9,.2,1.25); }
.dopa-adapt-cutin.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
.dopa-adapt-cutin.unlock { background: #3fdcb0; }
.dopa-adapt-cutin.stage { background: #fff8ec; min-height: 0; margin: 0; }
.dopa-adapt-guide { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: var(--ink); overflow: hidden; }
.dopa-adapt-guide::backdrop { background: transparent; }
.dopa-guide-host::after { content: ''; display: block; flex: none; width: 100%; height: var(--dopa-guide-space, 360px); }
.dopa-adapt-guide-ring { position: fixed; z-index: 1; border: 4px solid #ffd23f; border-radius: 18px; box-shadow: 0 0 0 9999px rgba(16,22,55,.76), 0 0 0 7px rgba(255,210,63,.2); pointer-events: none; transition: left .24s ease-out, top .24s ease-out, width .24s ease-out, height .24s ease-out; }
.dopa-adapt-guide-actor { position: fixed; inset: 0; z-index: 2; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.dopa-adapt-guide-card { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 3; width: min(92vw,520px); max-height: calc(100dvh - 28px); overflow-y: auto; padding: 18px 20px; border: 3px solid var(--ink); border-radius: 20px; background: #fff8ec; box-shadow: 0 7px var(--ink); transform: translateX(-50%); text-align: left; }
.dopa-adapt-guide-card h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.3; }
.dopa-adapt-guide-card p { margin: 0; }
.dopa-adapt-guide-count { font-size: 12px; font-weight: 900; color: #58546a; }
.dopa-adapt-guide-text { font-size: 16px; line-height: 1.6; white-space: pre-line; }
.dopa-adapt-guide-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.dopa-adapt-guide-actions button { min-height: 46px; padding: 8px 12px; border: 2px solid var(--ink); border-radius: 13px; background: #fff; font: inherit; font-weight: 900; }
.dopa-guide-next { background: #ffd23f !important; box-shadow: 0 3px var(--ink); }
.dopa-awards { width: min(94vw,780px); max-height: 90dvh; padding: 18px 22px; border: 3px solid var(--ink); border-radius: 20px; background: var(--paper); color: var(--ink); font-family: var(--round); overflow-y: auto; overscroll-behavior: contain; }
.dopa-awards::backdrop { background: rgba(16,22,55,.76); }
.dopa-awards header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dopa-awards h2 { font-size: 26px; line-height: 1.3; margin: 0; }
.dopa-awards button { min-height: 44px; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 12px; background: #fff; font: inherit; font-weight: 800; }
.dopa-awards-close { width: 44px; flex: none; font-size: 25px !important; padding: 0 !important; }
.dopa-awards-tabs { display: flex; gap: 12px; margin: 14px 0; }
.dopa-awards-tabs button[aria-pressed="true"] { background: #ffd23f; }
.dopa-awards select { min-height: 44px; max-width: 100%; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 10px; background: #fff; color: var(--ink); font: inherit; }
.dopa-awards-note { font-size: 14px; line-height: 1.6; }
.dopa-awards-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; padding: 0; margin: 14px 0; list-style: none; }
.dopa-awards-grid li { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 10px; border: 2px solid #c6bdc9; border-radius: 14px; background: #f1edf2; color: var(--ink); text-align: center; overflow-wrap: anywhere; }
.dopa-awards-grid li.is-earned { background: #fff; border-color: var(--ink); }
.dopa-trophy > svg { width: 56px; height: 56px; }
.dopa-awards-grid b { font-size: 15px; line-height: 1.4; }
.dopa-awards-grid small { font-size: 12px; line-height: 1.5; }
.dopa-trophy progress { width: 100%; height: 8px; accent-color: #126447; }
.dopa-collection-preview { height: 128px; text-align: center; }
.dopa-collection-preview svg, .dopa-collect-art svg { width: 100%; height: 100%; }
.dopa-collect-art { width: 80px; height: 88px; display: grid; place-items: center; font-size: 52px; color: #b32759; }
.dopa-collect-art.art-background { color: #bd5623; }
.dopa-collect-art.art-particle { color: #997200; }
.dopa-collect-item button { width: 100%; margin-top: auto; }
.dopa-collect-item button[aria-pressed="true"], .dopa-awards-done { background: #bdf3d9; }
.dopa-awards button:disabled { color: #686077; border-color: #90879b; cursor: default; }
.dopa-awards-status { min-height: 1.5em; font-size: 14px; }
:is(.dopa-awards, .dopa-adapt-guide) [hidden] { display: none !important; }
:is(.dopa-awards, .dopa-adapt-guide, .dopa-award-links, #learning-stars) :is(button, select):focus-visible { outline: 3px solid #304fdb; outline-offset: 3px; }
@media (max-width:520px) {
  .dopa-adapt-guide-card { padding: 14px 16px; }
  .dopa-adapt-guide-card h2 { font-size: 21px; }
  .dopa-adapt-guide-text { font-size: 15px; }
  .dopa-awards { padding: 14px; }
  .dopa-awards-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
}
@media (max-height:500px) {
  .study-play-mascot { height: 100px; }
  #screen-nm-play .stage { height: 100px; min-height: 100px; grid-column: 1; grid-row: 3; }
  .nm-play-status { grid-template-columns: 1fr; gap: 4px; }
  .nm-run-stage { grid-column: 1; grid-row: 2; }
  .dopa-adapt-guide-card { padding: 10px 14px; }
  .dopa-adapt-guide-text { font-size: 14px; }
  .dopa-adapt-guide-card h2 { font-size: 20px; }
  .dopa-adapt-guide-actions { margin-top: 8px; }
}
@media (prefers-reduced-motion:reduce) { .dopa-adapt-cutin, .dopa-adapt-guide-ring { transition: none; } }
