/* Interactions Matchup: the Field Partners Desk inside the practice shell's stage (about 1066 x 628 at 1366 x 768).
 * Foundations: every word in the play area is 18 px or more; every tap target is 48 px or more.
 * Pictures sit on a lit cream slide that stays the same in light and dark (the art is drawn for it). */
.im { position: absolute; inset: 0; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 14px; padding: 10px 14px; color: #1f2a26; font-size: 18px; line-height: 1.3;
  background: linear-gradient(#eef4ec, #dbe7d6);
  --im-panel: rgba(255, 253, 247, .96); --im-line: #9fbca8; --im-soft: #3f5a4c; --im-accent: #1f6b5c; --im-accent-bg: #dcefe7;
  --im-slide: #fffdf7; --im-ink: #1f2a26; }
html[data-theme="dark"] .im { color: #ecf2ee; background: linear-gradient(#17201c, #101714);
  --im-panel: rgba(30, 40, 35, .97); --im-line: #4f6b5c; --im-soft: #c9dbd0; --im-accent: #7fd1b8; --im-accent-bg: #1f3a32; }
.im *, .im *::before, .im *::after { box-sizing: border-box; }
.im p, .im figure, .im figcaption, .im ul { margin: 0; padding: 0; }
.im button { font: inherit; color: inherit; }
.im svg { display: block; }
.im :focus-visible { outline: 4px solid #ffb000; outline-offset: 2px; }

/* ── picture (left) ── */
.im .im-scenebox { container: imscene / inline-size; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 14px; background: var(--im-panel); border: 1.5px solid var(--im-line); }
.im-scene-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 8px; border-radius: 10px; background: var(--im-slide); color: var(--im-ink); box-shadow: inset 0 0 0 1px rgba(40, 70, 50, .22); overflow: hidden; }
.im p.im-cap { flex: none; font-weight: 700; }
.im p.im-model { flex: none; color: var(--im-soft); font-style: italic; }
.im.is-revealed .im-scenebox { border-color: var(--im-accent); box-shadow: 0 0 0 3px var(--im-accent-bg); }
.im-pairpic { display: block; width: 100%; max-width: 470px; aspect-ratio: 8 / 5; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px #8fae98; flex: none; }
.im-pairpic svg { width: 100%; height: 100%; }
.im p.im-who { text-align: center; line-height: 1.3; }
.im-meaning { display: block; width: 100%; max-width: 380px; aspect-ratio: 5 / 3; border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 2px #c9bf9e; }
.im-meaning svg { width: 100%; height: 100%; }
.im p.im-keyrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; }
.im-badge-row { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.im-badge { width: 30px; height: 30px; flex: none; }
.im-cycpic { display: block; width: 100%; max-width: 520px; aspect-ratio: 2 / 1; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(40, 70, 50, .3); }
.im-cycpic svg { width: 100%; height: 100%; }
.im-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.im-key { display: inline-flex; align-items: center; gap: 6px; }
.im-keyline { width: 44px; height: 16px; flex: none; }
.im p.im-axes { text-align: center; color: #3f5a4c; line-height: 1.25; }
.im-effects { list-style: none; display: grid; gap: 4px; width: 100%; max-width: 470px; }
.im-effects li { display: flex; align-items: center; gap: 8px; line-height: 1.25; }

/* ── task (right) ── */
.im-task { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; container-type: inline-size; }
.im-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; min-height: 48px; flex-wrap: wrap; }
.im p.im-title { min-width: 0; padding: 6px 14px; border-radius: 12px; background: var(--im-panel); border: 1.5px solid var(--im-line); }
.im-title b { font-size: 20px; }
html .im-say { flex: none; min-height: 48px; padding: 8px 14px; border-radius: 999px; border: 2px solid var(--im-line); background: var(--im-panel); font-weight: 700; cursor: pointer; white-space: nowrap; }
.im-say[aria-pressed="true"] { border-color: var(--im-accent); }
.im-say:hover { background: var(--im-accent-bg); }
.im-k { flex: none; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; }
.im-k span { color: var(--im-soft); }
.im-msg { font-weight: 700; flex: none; }
.im-msg:empty { display: none; }
.im button:disabled { opacity: 1; cursor: default; }

.im-choices { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
html .im-choice { position: relative; display: flex; align-items: center; gap: 14px; min-height: 48px; padding: 8px 12px 8px 8px; border-radius: 14px; border: 2.5px solid var(--im-line); background: var(--im-panel); text-align: left; cursor: pointer; }
.im-cpic { flex: none; display: grid; place-items: center; width: 160px; height: 100px; background: var(--im-slide); border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(40, 70, 50, .22); overflow: hidden; }
.im-cpic > svg { width: 100%; height: 100%; }
.im-choice-t { flex: 1 1 auto; min-width: 0; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
html .im-choice:hover:not(:disabled) { border-color: var(--im-accent); background: var(--im-accent-bg); }
html .im-choice.is-chosen { border-color: var(--im-accent); box-shadow: 0 0 0 3px var(--im-accent); }

/* ✓ / ✗ after Check: at the end of the choice, never on a picture */
.im-mark { display: none; }
.im.is-revealed .im-mark:not(:empty) { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; font-size: 20px; font-weight: 800; color: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
html .im.is-revealed .im-choice.is-right { border-color: #2f9a5c; box-shadow: 0 0 0 3px #2f9a5c; }
html .im.is-revealed .im-choice.is-wrong { border-color: #c4473d; box-shadow: 0 0 0 3px #c4473d; }
.im.is-revealed .is-right .im-mark { background: #17663a; }
.im.is-revealed .is-wrong .im-mark { background: #a3241f; }

/* ── Briefing example and Start art ── */
.im-example { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; padding: 0; background: none; overflow: visible; color: inherit; }
.im-example figure { display: flex; flex-direction: column; gap: 6px; }
.im-example figcaption { line-height: 1.3; }
.im-ex-pic { display: block; aspect-ratio: 8 / 5; border-radius: 10px; overflow: hidden; box-shadow: 0 0 0 1px rgba(40, 70, 50, .3); }
.im-ex-pic svg { width: 100%; height: 100%; }
.ps-brief--drawer .im-example { grid-template-columns: 1fr; }
.im-start { width: 100%; height: 100%; display: grid; place-items: center; background: #eaf2e4; border-radius: 12px; overflow: hidden; }
.im-start svg { width: 100%; height: 100%; }

/* ── Foundations: 18 px for the shell's words beside the play area too ── */
body[data-activity="interactions-matchup"] .ps-bubble, body[data-activity="interactions-matchup"] .ps-cust-detail, body[data-activity="interactions-matchup"] .ps-feedback,
body[data-activity="interactions-matchup"] .ps-hint, body[data-activity="interactions-matchup"] .ps-gloss, body[data-activity="interactions-matchup"] .ps-cust-who,
body[data-activity="interactions-matchup"] .ps-nudge { font-size: 18px; line-height: 1.3; }
body[data-activity="interactions-matchup"] .ps-cust-detail { color: var(--tlg-text); }
body[data-activity="interactions-matchup"] .ps-say { width: 48px; height: 48px; font-size: 22px; margin: -2px -4px 4px 8px; }
body[data-activity="interactions-matchup"] .ps-hint-btn { min-height: 48px; }
body[data-activity="interactions-matchup"] .ps-hint .ps-hint-note { font-size: 16px; }
body[data-activity="interactions-matchup"] .ps-side:has(.ps-feedback:not([hidden])) .ps-cust-detail,
body[data-activity="interactions-matchup"] .ps-side:has(.ps-feedback:not([hidden])) .ps-hint { display: none; }

/* a narrower right column: smaller pictures */
@container (max-width: 440px) {
  .im-cpic { width: 126px; height: 82px; }
  html .im-choice { gap: 10px; }
}
@container imscene (max-width: 420px) {
  .im-legend { gap: 2px 12px; }
}
@media (max-width: 1180px) and (min-width: 901px) {
  .im { overflow-y: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .im-scene-body { flex: none; overflow: visible; }
}
@media (max-width: 900px) {
  .im { position: relative; inset: auto; overflow: visible; grid-template-columns: minmax(0, 1fr); padding: 10px 10px 16px; }
  .im-scene-body { overflow: visible; }
  .im-example { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .im-cpic { width: 112px; height: 74px; }
}
@media (prefers-reduced-motion: no-preference) {
  .im-choice { transition: border-color .12s, background-color .12s, box-shadow .12s; }
  .im.is-revealed .im-scenebox { animation: im-pop .35s ease-out; }
  @keyframes im-pop { 0% { transform: scale(.98); opacity: .6; } 100% { transform: scale(1); opacity: 1; } }
}
