.ems-document-dialog { width:100vw;max-width:none;height:100dvh;max-height:none;margin:0;padding:0;border:0;color:#20313c;background:#fff; }
.site-play-link { display:inline-flex;align-items:center;justify-content:center;min-height:42px;margin-left:auto;padding:9px 17px;border-radius:8px;background:#0b735c;color:#fff;font-weight:750;text-decoration:none;white-space:nowrap; }
.site-play-link:hover { background:#075941;color:#fff; }
.site-play-link:focus-visible { outline:3px solid #d89523;outline-offset:3px; }
.ems-play-dialog { box-sizing:border-box;width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:28px;border:1px solid #dce8e2;border-radius:16px;background:#fff;color:#20313c;box-shadow:0 24px 72px #13281f38;font:inherit; }
.ems-play-dialog::backdrop { background:rgb(17 33 29 / 48%); }
.ems-play-dialog-head { display:flex;align-items:start;justify-content:space-between;gap:18px;margin-bottom:22px; }
.ems-play-eyebrow { margin:0 0 5px;color:#0b735c;font-size:.72rem;font-weight:800;letter-spacing:.09em;text-transform:uppercase; }
.ems-play-dialog h2 { margin:0;color:#20313c;font-size:clamp(1.5rem,3vw,2rem);line-height:1.1;letter-spacing:-.025em; }
.ems-play-close { display:grid;place-items:center;flex:none;width:36px;height:36px;border:1px solid #dce5e0;border-radius:9px;background:#fff;color:#52635d;font:inherit;font-size:1.5rem;line-height:1;cursor:pointer; }
.ems-play-close:hover { background:#f0f7f3;color:#0b735c; }
.ems-play-options { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.ems-play-option { display:grid;grid-template-columns:44px minmax(0,1fr) 18px;align-items:center;gap:13px;min-height:112px;padding:17px;border:1px solid #cfe2d8;border-radius:12px;background:#f8fbf9;color:#20313c;text-decoration:none;text-align:left;transition:border-color .15s,background .15s,transform .15s; }
.ems-play-option:focus-visible { outline:3px solid #d89523;outline-offset:2px; }
.ems-play-option:hover { transform:translateY(-2px);border-color:#0b735c;background:#eef7f1;color:#20313c; }
.ems-play-icon { display:grid;place-items:center;width:44px;height:44px;border-radius:10px;background:#0b735c;color:#fff;font-size:1.15rem;font-weight:800;letter-spacing:-.05em; }
.ems-play-icon span { font-size:.8rem; }
.ems-play-icon svg { width:25px;height:25px; }
.ems-play-option-copy { display:grid;gap:4px;min-width:0; }
.ems-play-option-copy strong { font-size:1rem;line-height:1.2; }
.ems-play-option-copy small { color:#60716b;font-size:.76rem;line-height:1.25; }
.ems-play-arrow { color:#0b735c;font-size:1.25rem;font-weight:700; }
.ems-play-join { display:grid;grid-template-columns:minmax(0,1fr) minmax(120px,170px) auto;align-items:center;gap:10px;margin:16px 0 0;padding:14px 16px;border:2px solid #0b735c;border-radius:12px;background:#e9f6ed;color:#20313c; }
.ems-play-join-copy { display:grid;gap:2px;margin:0; }
.ems-play-join-copy strong { color:#10233f;font-size:1.05rem;font-weight:800; }
.ems-play-join-copy span { color:#3f5a4f;font-size:.8rem;font-weight:600; }
.ems-play-join input { box-sizing:border-box;width:100%;min-height:44px;padding:8px 10px;border:1px solid #9cc5b2;border-radius:8px;background:#fff;color:#10233f;font:inherit;font-size:1.1rem;font-weight:800;letter-spacing:.18em;text-align:center;text-transform:uppercase; }
.ems-play-join input::placeholder { color:#9aa9a2;letter-spacing:.18em; }
.ems-play-join button { min-height:44px;padding:8px 16px;border:0;border-radius:8px;background:#00b22d;color:#10233f;font:inherit;font-size:.95rem;font-weight:800;white-space:nowrap;cursor:pointer; }
.ems-play-join button:hover { background:#00a028; }
@media(max-width:560px) { .ems-play-join { grid-template-columns:minmax(0,1fr) auto; } .ems-play-join-copy { grid-column:1 / -1; } }
.ems-play-dialog :focus-visible { outline:3px solid #d89523;outline-offset:2px; }
.ems-play-error,.ems-game-error { margin:12px 0 0;padding:9px 12px;border-radius:7px;background:#fff0ef;color:#9a3140;font-size:.82rem;font-weight:650; }
.ems-game-dialog { box-sizing:border-box;width:min(760px,calc(100vw - 32px));max-height:88dvh;padding:0;border:1px solid #dce8e2;border-radius:14px;background:#fff;color:#20313c;box-shadow:0 24px 72px #13281f38;font:inherit;overflow:auto; }
.ems-game-dialog::backdrop { background:rgb(17 33 29 / 48%); }
.ems-game-dialog [hidden] { display:none !important; }
.ems-game-form { display:grid;gap:14px;padding:24px 28px; }
.ems-game-head { display:flex;align-items:start;justify-content:space-between;gap:16px; }
.ems-game-head h2 { margin:0;color:#20313c;font-size:1.45rem;line-height:1.12;letter-spacing:-.025em; }
.ems-game-steps { display:grid;gap:7px; }
/* The shared steps continue the game's own list at its 7px spacing, not the form's 14px plus 7. */
.ems-game-common { margin-top:-7px; }
.ems-game-step { display:grid;grid-template-columns:minmax(0,1fr) minmax(210px,1fr);align-items:center;gap:12px;min-height:56px;padding:8px 13px;border:1px solid #dbe7e1;border-radius:9px;background:#f8fbf9;color:#20313c;font-size:.83rem;font-weight:750; }
.ems-game-step > span:first-child { display:flex;align-items:center;gap:10px;min-width:0; }
.ems-game-step b { display:grid;place-items:center;flex:none;width:28px;height:28px;border-radius:50%;background:#dceee5;color:#0b735c;font-size:.8rem; }
.ems-game-step small { margin-left:auto;color:#67756f;font-size:.68rem;font-weight:600;white-space:nowrap; }
.ems-game-step select,.ems-game-step input[type=number],.ems-game-step input[type=text] { box-sizing:border-box;width:100%;min-height:39px;padding:7px 10px;border:1px solid #d5e0da;border-radius:7px;background-color:#fff;color:#20313c;font:inherit;font-size:.84rem;font-weight:500; }
/* MCQ tick lists, adapted from the Questions Bank pickers (.qbank-picker-*). An open list takes the dialog:
   the other steps stand aside, the dialog keeps the height it had (held by play-setup.mjs), and only the
   list scrolls. Closing it brings the steps back. */
.ems-game-picker-button { display:flex;align-items:center;gap:8px;box-sizing:border-box;width:100%;min-height:39px;padding:7px 10px;border:1px solid #d5e0da;border-radius:7px;background:#fff;color:#20313c;font:inherit;font-size:.84rem;font-weight:500;text-align:left;cursor:pointer; }
.ems-game-picker-button:hover { border-color:#bfd2cb; }
.ems-game-picker-summary { flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
.ems-game-picker-caret { flex:none;width:9px;height:9px;border-right:1.6px solid #67756f;border-bottom:1.6px solid #67756f;transform:translateY(-2px) rotate(45deg); }
.ems-game-picker.is-open .ems-game-picker-caret { transform:translateY(2px) rotate(225deg); }
.ems-game-picker.is-chosen .ems-game-picker-button { border-color:#0b735c;background:#e9f6ed;color:#0b735c;font-weight:650; }
.ems-game-picker-menu { grid-column:1/-1;box-sizing:border-box;padding:5px;border:1px solid #d5e0da;border-radius:7px;background:#fff;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#8ab8a7 #edf5f1; }
.ems-game-check { display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:5px;color:#20313c;font-size:.8rem;font-weight:650;line-height:1.35;cursor:pointer; }
.ems-game-check:hover,.ems-game-check:has(input:checked) { background:#e9f6ed;color:#0b735c; }
.ems-game-check:has(input:focus-visible) { outline:2px solid #0b735c;outline-offset:-1px; }
.ems-game-check input { flex:none;width:15px;height:15px;margin:0;accent-color:#0b735c;cursor:pointer; }
.ems-game-check-text { flex:1 1 auto;min-width:0;overflow-wrap:anywhere; }
.ems-game-check-count { flex:none;margin-left:auto;padding-left:6px;color:#90a09a;font-size:.72rem;font-weight:650; }
/* Colour-coded equivalent entries, their note and each group's Select all, adapted from the Questions Bank
   (.qbank-pair-*). Ticked entries keep their group's colour. */
.ems-game-pair-note { display:flex;align-items:center;gap:10px;margin:2px 2px 4px;padding:10px 12px;border-radius:7px;background:#10233f;color:#fff;font-size:.73rem;font-weight:600;line-height:1.5; }
.ems-game-pair-note-text { flex:1 1 auto;min-width:0;margin:0; }
.ems-game-check[data-pair-group] { border-left:5px solid transparent;padding-left:9px; }
.ems-game-check[data-pair-group="1"] { border-left-color:#1f7a5a;background:#e7f3ee; }
.ems-game-check[data-pair-group="2"] { border-left-color:#a8620d;background:#fbeed8; }
.ems-game-check[data-pair-group="3"] { border-left-color:#4b3b8f;background:#efecfa; }
.ems-game-check[data-pair-group="1"]:has(input:checked) { background:#d3eadf; }
.ems-game-check[data-pair-group="2"]:has(input:checked) { background:#f6e0bd; }
.ems-game-check[data-pair-group="3"]:has(input:checked) { background:#e0dbf5; }
.ems-game-pair-head { display:flex;justify-content:center;margin:10px 0 0;padding:6px 8px 6px 9px;border-left:5px solid transparent;border-radius:5px; }
.ems-game-pair-head[data-pair-group="1"] { border-left-color:#1f7a5a;background:#e7f3ee; }
.ems-game-pair-head[data-pair-group="2"] { border-left-color:#a8620d;background:#fbeed8; }
.ems-game-pair-head[data-pair-group="3"] { border-left-color:#4b3b8f;background:#efecfa; }
.ems-game-pair-select { padding:3px 12px;border:1px solid currentColor;border-radius:999px;background:#fff;font:inherit;font-size:.72rem;font-weight:750;cursor:pointer; }
.ems-game-pair-select:hover { color:#fff; }
.ems-game-pair-head[data-pair-group="1"] .ems-game-pair-select { color:#1f7a5a; }
.ems-game-pair-head[data-pair-group="2"] .ems-game-pair-select { color:#a8620d; }
.ems-game-pair-head[data-pair-group="3"] .ems-game-pair-select { color:#4b3b8f; }
.ems-game-pair-head[data-pair-group="1"] .ems-game-pair-select:hover { background:#1f7a5a;border-color:#1f7a5a; }
.ems-game-pair-head[data-pair-group="2"] .ems-game-pair-select:hover { background:#a8620d;border-color:#a8620d; }
.ems-game-pair-head[data-pair-group="3"] .ems-game-pair-select:hover { background:#4b3b8f;border-color:#4b3b8f; }
@media (forced-colors: active) { .ems-game-check[data-pair-group],.ems-game-pair-head { border-left-color:currentColor; } }
.ems-game-visually-hidden { position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0; }
/* "Scroll for more" over the foot of the open list while more is below (Questions Bank .qbank-scroll-cue). */
.ems-game-picker { position:relative; }
.ems-game-scroll-cue { position:absolute;left:14px;right:14px;bottom:9px;display:flex;justify-content:center;padding:30px 0 6px;border-radius:0 0 7px 7px;pointer-events:none;background:linear-gradient(to bottom,transparent,#fff 58%); }
.ems-game-scroll-cue span { padding:4px 11px;color:#0b735c;font-size:.76rem;font-weight:750; }
.ems-game-dialog[data-picking] { overflow:hidden; }
.ems-game-dialog[data-picking] .ems-game-form { box-sizing:border-box;height:100%;display:flex;flex-direction:column; }
.ems-game-dialog[data-picking] [data-ems-game-mcq] { display:flex;flex-direction:column;flex:1 1 auto;min-height:0; }
.ems-game-dialog[data-picking] [data-ems-game-mcq] > :not(.is-open),.ems-game-dialog[data-picking] [data-ems-game-create] { display:none; }
.ems-game-dialog[data-picking] .ems-game-picker.is-open { display:flex;flex-direction:column;align-items:stretch;flex:1 1 auto;min-height:0; }
.ems-game-dialog[data-picking] .ems-game-picker-menu { flex:1 1 auto;min-height:0; }
.ems-game-choice-pills { display:flex;flex-wrap:wrap;align-items:center;gap:7px; }
.ems-game-choice-pills label { position:relative;display:inline-flex;align-items:center;min-height:31px;padding:5px 12px;border:1px solid #d5e0da;border-radius:999px;background:#fff;color:#20313c;font-size:.76rem;font-weight:650;cursor:pointer; }
.ems-game-choice-pills label:has(input:checked) { border-color:#0b735c;background:#e9f6ed;color:#0b735c; }
.ems-game-choice-pills input { margin:0 6px 0 0;accent-color:#0b735c; }
/* A diagram's games and their Numbers/Annotations setting are two rows of the same right-hand column, so
   each setting sits under a game (owner, 30 September 2026). The count of prepared
   questions is not shown: players have no use for it. */
/* Every choice row in setup is two equal cells, so the rows line up down the form. */
.ems-game-dialog .ems-game-choice-pills { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch; }
/* Beside its label, a choice row gets the wider share, so a game's name fits on one line ("Two maximum prices")
   while its four pills stay one width (owner, 30 September 2026). On a phone the row stacks under its label. */
@media(min-width:651px) {
  .ems-game-dialog .ems-game-step { grid-template-columns:minmax(0,1fr) minmax(210px,1.55fr); }
  .ems-game-dialog .ems-game-choice-pills label { white-space:nowrap; }
}
/* On a phone two names do not fit side by side, so each choice takes its own full-width line. */
@media(max-width:650px) {
  .ems-game-dialog .ems-game-choice-pills { grid-template-columns:minmax(0,1fr); }
  .ems-game-dialog .ems-game-choice-pills label { white-space:nowrap; }
}
/* A row whose names do not fit two across takes one per line; on a very narrow phone a name may wrap
   (owner, 1 October 2026: "Revenue, surplus and welfare" was cut off). play-setup.mjs fitChoiceRows decides. */
.ems-game-dialog .ems-game-choice-pills.is-stacked { grid-template-columns:minmax(0,1fr); }
.ems-game-dialog .ems-game-choice-pills.is-stacked label { white-space:normal; }
.ems-game-diagram-variants { grid-column:2;display:grid;gap:5px;margin-top:2px; }
.ems-game-diagram-variants[hidden] { display:none; }
.ems-game-diagram-variants > span { color:#617068;font-size:.72rem;font-weight:700; }
.ems-game-categories { min-width:0;margin:0 0 11px;padding:0;border:0; }
.ems-game-categories legend { margin:0 0 10px;padding:0;color:#20313c;font-size:.88rem;font-weight:750; }
.ems-game-category-heading { display:inline-flex;align-items:center;gap:10px; }
.ems-game-category-heading b { display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#dceee5;color:#0b735c;font-size:.8rem; }
.ems-game-category-heading small { color:#67756f;font-size:.68rem;font-weight:600; }
.ems-game-category-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px; }
.ems-game-category { position:relative;display:flex;align-items:center;justify-content:space-between;gap:10px;min-height:52px;padding:10px 13px;border:1px solid #cfe2d8;border-radius:9px;background:#f8fbf9;color:#20313c;font-size:.82rem;font-weight:700;cursor:pointer; }
.ems-game-category::before { content:"";flex:none;width:15px;height:15px;border:1px solid #bacfc5;border-radius:4px;background:#fff; }
.ems-game-category input { position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer; }
.ems-game-category strong { flex:none;color:#0b735c;font-size:.82rem; }
.ems-game-category:has(input:checked) { border-color:#0b735c;background:#e9f6ed;box-shadow:inset 0 0 0 1px #0b735c; }
.ems-game-category:has(input:checked)::before { content:"✓";display:grid;place-items:center;border-color:#0b735c;background:#0b735c;color:#fff;font-size:12px; }
.ems-game-category:has(input:focus-visible) { outline:3px solid #d89523;outline-offset:2px; }
.ems-game-category[data-empty=true] { border-color:#e2e6e4;background:#f1f3f2;color:#89948f;cursor:not-allowed; }
.ems-game-category[data-empty=true] strong { color:#89948f; }
.ems-game-category[data-empty=true] input { cursor:not-allowed; }
.ems-game-actions { position:sticky;z-index:1;bottom:0;display:flex;justify-content:flex-end;gap:8px;margin:2px -28px -24px;padding:12px 28px 24px;border-top:1px solid #dce5e0;background:#fff; }
.ems-game-actions button { min-height:40px;padding:8px 14px;border:1px solid #d5e0da;border-radius:7px;background:#fff;color:#0b735c;font:inherit;font-size:.83rem;font-weight:750;cursor:pointer; }
.ems-game-actions .ems-game-go { min-width:145px;border-color:#0b735c;background:#0b735c;color:#fff; }
.ems-game-actions button:disabled { opacity:.55;cursor:wait; }
.ems-game-dialog :focus-visible { outline:3px solid #d89523;outline-offset:2px; }
@media(max-width:650px) { .ems-game-form { padding:18px; } .ems-game-step { grid-template-columns:1fr;gap:7px; } .ems-game-diagram-variants { grid-column:1; } .ems-game-category-grid { grid-template-columns:1fr; } .ems-game-actions { margin:2px -18px -18px;padding:12px 18px 18px; } }
@media(max-width:590px) { .ems-play-dialog { padding:20px; } .ems-play-options { grid-template-columns:1fr; } .ems-play-option { min-height:82px; } }
.site-header .header-inner { display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);column-gap:20px; }
.site-header .brand-lockup { grid-column:1;grid-row:1;justify-self:start; }
.site-header .site-play-link { grid-column:2;grid-row:1;justify-self:center;margin:0; }
.site-header .site-nav { grid-column:3;grid-row:1;justify-self:end;margin-left:0; }
body > .site-play-link { position:fixed;top:12px;left:50%;z-index:1000;margin:0;transform:translateX(-50%);box-shadow:0 2px 12px #0002; }
.apphead { position:relative; }
.apphead .site-play-link { position:absolute;left:50%;transform:translateX(-50%);min-height:34px;margin:0;padding:6px 14px;font-size:.8rem; }
@media(max-width:920px) {
  .site-header .header-inner { grid-template-columns:minmax(0,1fr) auto;row-gap:12px;padding-top:14px;padding-bottom:14px; }
  .site-header .site-nav { grid-column:2;grid-row:1; }
  .site-header .site-play-link { grid-column:1 / -1;grid-row:2; }
}
@media(max-width:640px) {
  .site-header .header-inner { grid-template-columns:1fr; }
  .site-header .site-nav { grid-column:1;grid-row:3;justify-self:stretch; }
}
.ems-document-dialog::backdrop { background:rgb(15 35 28 / 60%); }
.ems-document-dialog.is-compact { width:96vw;height:92dvh;margin:auto;border-radius:12px;box-shadow:0 12px 50px #0005; }
.ems-document-shell { position:relative;display:grid;grid-template-rows:auto minmax(0,1fr);height:100%;min-width:0; }
.ems-document-header { display:flex;flex-wrap:wrap;gap:10px 16px;align-items:center;padding:12px 20px;background:#0c6f59;color:#fff; }
.ems-document-header strong { flex:1;min-width:120px; }
.ems-document-actions { display:flex;flex-wrap:wrap;gap:8px;margin-left:auto; }
.ems-document-dialog button,.ems-document-dialog a,.ems-document-dialog select,.ems-document-dialog input { box-sizing:border-box;min-height:40px;padding:7px 12px;border:1px solid #b9cec6;border-radius:7px;color:#0c6f59;background:#fff;font:inherit;font-size:14px;font-weight:650; }
.ems-document-dialog button,.ems-document-dialog select { cursor:pointer; }
.ems-document-dialog button:disabled { opacity:.5;cursor:default; }
.ems-document-dialog a { display:inline-flex;align-items:center;text-decoration:none; }
.ems-document-dialog [data-doc-related] { max-width:100%;font-size:17px;font-weight:700;background:#0c6f59;color:white;border-color:#ffffff80; }
.ems-document-dialog [data-doc-related] option { background:white;color:#20313c; }
.ems-document-dialog [data-doc-download] { background:#0c6f59;color:#fff;border-color:#ffffff80; }
.ems-document-dialog iframe { grid-row:2;grid-column:1;width:100%;height:100%;min-height:0;border:0; }
.ems-document-dialog[data-document-ready="false"] iframe,.ems-document-dialog[data-document-ready="error"] iframe { visibility:hidden; }
.ems-document-loading { grid-row:2;grid-column:1;z-index:1;display:grid;place-items:center;padding:32px;background:#f7faf8;color:#305a4e;font-weight:700;text-align:center; }
.ems-document-dialog[data-document-ready="true"] .ems-document-loading { display:none; }
.ems-document-controls { position:absolute;right:16px;bottom:12px;display:flex;flex-direction:column;align-items:flex-end;gap:6px;max-width:calc(100% - 24px); }
/* Said when a document has nothing on the question being read and so opens at its start. */
.ems-document-note { margin:0;max-width:340px;padding:8px 12px;border-radius:8px;background:#10233f;color:#fff;font-size:13px;font-weight:600;line-height:1.4;box-shadow:0 2px 12px #0003; }
.ems-document-note[hidden] { display:none; }
.ems-document-toolbar { display:flex;align-items:center;gap:5px;padding:6px;border:1px solid #c7d4cf;border-radius:10px;background:rgb(255 255 255 / 96%);box-shadow:0 2px 12px #0002; }
.ems-document-toolbar button { font-size:24px;padding:0 10px; }
.ems-document-toolbar input { width:48px;padding:6px;text-align:center;appearance:textfield; }
.ems-document-toolbar input::-webkit-inner-spin-button { appearance:none; }
.ems-document-toolbar span { white-space:nowrap;font-size:14px; }
.ems-document-toolbar select { max-width:110px; }
.ems-document-dialog .ems-controls-toggle { min-height:30px;padding:4px 10px;font-size:12px;box-shadow:0 2px 6px #0002; }
.controls-hidden .ems-document-toolbar { visibility:hidden;pointer-events:none; }
.ems-document-dialog :focus-visible { outline:3px solid #d89523;outline-offset:2px; }
.ems-document-dialog [hidden] { display:none; }
.ems-visually-hidden { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
.ems-document-shell:fullscreen { width:100vw;height:100dvh;background:#fff; }
@media(max-width:600px) { .ems-document-header { padding:10px;gap:8px; } .ems-document-actions { gap:5px;margin-left:0; } .ems-document-dialog .ems-document-actions button,.ems-document-dialog .ems-document-actions a { padding:6px 8px;font-size:12px; } .ems-document-controls { right:10px;bottom:10px; } }

/* The catalogue uses contained scrolling like the existing study workspaces. */
@media (min-width:1000px) and (min-height:650px) {
  .diagrams-main { height:calc(100dvh - 85px); min-height:0; }
  .diagrams-main .diagrams-page { height:100%;display:flex;flex-direction:column;padding:24px 0; }
  .diagrams-main .diagrams-heading { flex:none; }
  .diagrams-main .diagram-directory { flex:1;min-height:0;overflow:auto;scrollbar-gutter:stable; }
}

/* One dropdown affordance across EMS, independent of browser-native arrow styling. */
html body select:not([multiple]):not([size]), html body select:not([multiple])[size="1"] {
  appearance:none;
  -webkit-appearance:none;
  padding-inline-end:42px;
  background-image:var(--ems-select-chevron, url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%235c6a70' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"));
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:16px 16px;
}
.ems-document-dialog [data-doc-related] { --ems-select-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
html body .hierarchy-toggle::after { content:"";width:8px;height:8px;border-right:1.8px solid currentColor;border-bottom:1.8px solid currentColor;transform:translateY(-2px) rotate(45deg);margin-right:4px; }
html body .hierarchy-toggle[aria-expanded="true"]::after { transform:translateY(2px) rotate(225deg); }
html body .qbank-picker-caret { width:8px;height:8px;border-width:1.8px;margin-right:4px; }
@media(forced-colors:active) {
  html body select:not([multiple]) { appearance:auto;-webkit-appearance:auto;background-image:none; }
}

/* Diagram games: one entry per diagram, below Multiple choice and Keywords (DIAGRAM-GAMES.md, 29 September 2026). */
.ems-play-diagrams { margin-top:14px; }
.ems-play-diagrams-head { margin:0 0 8px;color:#60716b;font-size:.72rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase; }
.ems-play-diagram-list { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
.ems-play-diagram { display:flex;align-items:center;justify-content:center;min-height:46px;padding:8px 10px;border:1px solid #cfe2d8;border-radius:10px;background:#f8fbf9;color:#20313c;text-decoration:none;text-align:center;font-size:.86rem;font-weight:700; }
.ems-play-diagram:hover { border-color:#0b735c;background:#eef7f1; }
.ems-play-diagram:focus-visible { outline:3px solid #d89523;outline-offset:2px; }
@media (max-width:560px) { .ems-play-diagram-list { grid-template-columns:repeat(2,minmax(0,1fr)); } }
