/* Fælles svarformer (match_pairs, statement_judgement, multi_gap), 04.10.2026: prototype
   koordination/2026-10-04/funktionsforslag-engelsk/prototype.html. Follows the student
   themes through the reading-surface tokens (--panel, --ink, --line, --purple, --lavender,
   --mint, --green, --red, --red-soft); tap targets ≥ 48 px; fits a 390 px phone. */
.shared-response { --shared-p1: #2f6fd0; --shared-p2: #b0532a; --shared-p3: #7a4bb5; --shared-p4: #1f8a6a; --shared-p5: #b8436e; --shared-p6: #8a6d00; --shared-p7: #0f7c94; --shared-p8: #6b5a4e;
  display: grid; gap: 10px; max-width: 30rem; color: var(--ink); }
.shared-help { margin: 0; font-size: .95rem; color: var(--muted); }
.shared-pairs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.shared-col, .shared-seg { border: 0; margin: 0; padding: 0; min-width: 0; }
.shared-col { display: grid; gap: 10px; align-content: start; }
.shared-tile { position: relative; min-height: 56px; width: 100%; border-radius: 16px; border: 2px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 650; font-size: 1.02rem; line-height: 1.25;
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 10px; text-align: center; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; cursor: pointer; touch-action: manipulation; }
.shared-tile[aria-pressed="true"] { border-color: var(--purple); box-shadow: 0 0 0 3px var(--lavender); }
.shared-tile.paired { border-color: var(--pc); }
.shared-tile:disabled { cursor: default; opacity: 1; color: var(--ink); }
.shared-tile.ok { border-color: var(--green); background: var(--mint); }
.shared-tile.bad { border-color: var(--red); background: var(--red-soft); }
.shared-badges { display: inline-flex; flex-wrap: wrap; gap: 3px; }
.shared-badges:empty { display: none; }
.shared-badge { flex: none; min-width: 24px; height: 24px; border-radius: 99px; background: var(--pc); color: #fff; font-size: .8rem; font-weight: 800; display: inline-grid; place-items: center; padding: 0 6px; }
.shared-badge[hidden] { display: none; }
.shared-mark { flex: none; font-weight: 800; font-size: 1.1rem; margin-left: 4px; }
.shared-mark.ok { color: var(--green); } .shared-mark.bad { color: var(--red); }
.shared-stmts { display: grid; gap: 10px; }
.shared-stmt { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; display: grid; gap: 8px; }
.shared-stmt p { margin: 0; font-weight: 600; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; }
.shared-stmt.ok { border-color: var(--green); background: var(--mint); }
.shared-stmt.bad { border-color: var(--red); background: var(--red-soft); }
.shared-seg { display: grid; gap: 6px; }
.shared-seg button { min-height: 48px; border-radius: 12px; border: 2px solid var(--line); background: var(--page); color: var(--ink); font: inherit; font-weight: 650; font-size: .9rem; line-height: 1.2; padding: 4px; overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; cursor: pointer; touch-action: manipulation; }
.shared-seg button[aria-pressed="true"] { border-color: var(--purple); background: var(--purple); color: #fff; }
.shared-seg button:disabled { cursor: default; opacity: 1; }
.shared-seg button:disabled:not([aria-pressed="true"]) { color: var(--muted); }
.shared-notes { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; gap: 10px; }
.shared-notes h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.shared-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 1.02rem; line-height: 1.5; }
.shared-gapwrap { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.shared-response .shared-line input[type=text].shared-gap { min-height: 48px; max-width: 100%; padding: 6px 10px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font-size: 1.05rem; font-weight: 600; }
.shared-response .shared-line input[type=text].shared-gap:focus { border-color: var(--purple); outline: none; box-shadow: 0 0 0 3px var(--lavender); }
.shared-response .shared-line input[type=text].shared-gap.ok { border-color: var(--green); }
.shared-response .shared-line input[type=text].shared-gap.bad { border-color: var(--red); background: var(--red-soft); }
.shared-tile:focus-visible, .shared-seg button:focus-visible { outline: 3px solid #357eac; outline-offset: 2px; }
.shared-fb { display: grid; gap: 6px; border: 1px solid; border-radius: 18px; padding: 12px; max-width: 30rem; margin-top: 10px; color: var(--ink); }
.shared-fb h3 { margin: 0; font-size: 17px; font-weight: 700; }
.shared-fb.ok { background: var(--mint); border-color: var(--green); } .shared-fb.ok h3 { color: var(--green); }
.shared-fb.bad { background: var(--red-soft); border-color: var(--red); } .shared-fb.bad h3 { color: var(--red); }
.shared-fb ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 15px; }
.shared-fb li small { display: block; color: var(--muted); }
.shared-fb b.ok { color: var(--green); } .shared-fb b.bad { color: var(--red); }
@media (prefers-reduced-motion: no-preference) { .shared-tile, .shared-seg button { transition: border-color .12s, box-shadow .12s, background-color .12s; } }

/* Chat-visning (04.10.2026, prototype F-EN-C): a »Navn: tekst«-stimulus as chat bubbles,
   on the light reading surface; the pupil's own messages take the theme colour. */
.chat-stimulus { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; padding: 10px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); color: var(--ink); max-width: 30rem; }
.chat-bubble { max-width: 82%; padding: 8px 12px; border-radius: 18px; font-size: 1.02rem; line-height: 1.35; overflow-wrap: anywhere; display: grid; gap: 1px; }
.chat-bubble.first { margin-top: 4px; }
.chat-bubble.them { background: var(--lavender); color: var(--ink); align-self: flex-start; border-bottom-left-radius: 6px; }
.chat-bubble.me { background: var(--purple); color: #fff; align-self: flex-end; border-bottom-right-radius: 6px; }
.chat-who { font-size: .74rem; font-weight: 700; opacity: .8; }
.chat-bubble.me .chat-who { text-align: right; opacity: .9; }

/* Billedkort (04.10.2026, prototype Billedsekvens): a picture on a rækkefølge or match card, text as caption. */
.card-picture { display: block; width: 100%; max-width: 9rem; aspect-ratio: 4 / 3; object-fit: contain; margin: 0 auto 4px; border-radius: 10px; }
.card-picture.missing { display: grid; place-items: center; background: var(--page); font-size: 2rem; }
.shared-tile:has(.card-picture), .order-add:has(.card-picture), .order-text:has(.card-picture) { flex-direction: column; display: flex; align-items: center; }

/* Lyd i svarmulighederne (04.10.2026, prototype F-D): the answer is heard first, its text shows after the answer. */
.choice-listen-first { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.choice-listen-first .listen-play { display: inline-grid; place-items: center; min-width: 52px; min-height: 52px; border-radius: 50%; border: 0; background: var(--purple); color: #fff; }
.choice-listen-first .listen-play .luxi-icon { width: 24px; height: 24px; }
.choice-heard-text { display: block; font-weight: 500; font-size: .92rem; color: var(--muted); margin-top: 4px; }

/* Cloze med valg i teksten (inline_choice, 17.10.2026; prototype dansk-4-9/svarformer, fane Cloze): a gap is a
   numbered button in the running text showing »a / b / c« or the chosen word; the options open in a sheet
   (bottom of a phone, middle of an iPad). Tap targets ≥ 44 px; the text keeps flowing around the gaps. */
.shared-cloze { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: grid; gap: 8px; max-width: 40rem; }
.shared-cloze h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.shared-cloze-line { margin: 0; font-size: 1.05rem; line-height: 2.3; overflow-wrap: anywhere; }
.shared-choice-wrap { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; vertical-align: baseline; }
.shared-choice { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; max-width: 100%; padding: 2px 10px 2px 6px; border-radius: 12px; border: 2px solid var(--purple); background: var(--lavender);
  color: var(--ink); font: inherit; font-weight: 700; line-height: 1.2; text-align: left; cursor: pointer; touch-action: manipulation; vertical-align: baseline; }
.shared-choice.empty { font-weight: 600; border-style: dashed; background: var(--panel); }
.shared-choice.empty .shared-choice-text { color: var(--muted); }
.shared-choice-n { flex: none; min-width: 22px; height: 22px; border-radius: 99px; background: var(--purple); color: #fff; font-size: .75rem; font-weight: 800; display: inline-grid; place-items: center; }
.shared-choice:disabled { cursor: default; opacity: 1; color: var(--ink); }
.shared-choice.ok { border-color: var(--green); background: var(--mint); }
.shared-choice.ok .shared-choice-n { background: var(--green); }
.shared-choice.bad { border-color: var(--red); background: var(--red-soft); }
.shared-choice.bad .shared-choice-n { background: var(--red); }
.shared-choice:focus-visible, .shared-sheet-option:focus-visible { outline: 3px solid #357eac; outline-offset: 2px; }
dialog.shared-sheet { width: min(100% - 16px, 460px); max-width: none; margin: auto auto 8px; padding: 16px; border: 0; border-radius: 22px; background: var(--panel); color: var(--ink); box-shadow: 0 -8px 30px #0003; }
dialog.shared-sheet[open] { display: grid; gap: 10px; }
dialog.shared-sheet::backdrop { background: #0006; }
@media (min-width: 700px) { dialog.shared-sheet { margin: auto; } }
.shared-sheet h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.shared-sheet-options { display: grid; gap: 8px; }
.shared-sheet-option { min-height: 52px; border-radius: 14px; border: 2px solid var(--line); background: var(--page); color: var(--ink); font: inherit; font-weight: 700; font-size: 1.1rem; cursor: pointer; touch-action: manipulation; }
.shared-sheet-option[aria-pressed="true"] { border-color: var(--purple); background: var(--lavender); }
.shared-sheet-close { min-height: 48px; }

/* Kurve-visning (match_pairs many_to_one, 17.10.2026; prototype dansk-4-9/svarformer, fane Grupper): the cards
   wait in a pile; each right card is a basket with its name on top. Tap a card, then a basket. */
.shared-pile { display: flex; flex-wrap: wrap; gap: 8px; min-height: 64px; padding: 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); align-content: flex-start; }
.shared-pile.empty::after { content: "Alle kort er lagt i en kurv."; color: var(--muted); font-size: .95rem; align-self: center; }
.shared-card { width: auto; min-height: 48px; max-width: 100%; justify-content: flex-start; text-align: left; font-size: 1rem; }
.shared-baskets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 700px) { .shared-baskets { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); } }
.shared-basket { display: grid; gap: 8px; align-content: start; min-height: 120px; padding: 8px; border-radius: 18px; border: 2px dashed var(--line); background: var(--panel); }
.shared-basket.armed { border-color: var(--purple); background: var(--lavender); }
.shared-basket-head { min-height: 48px; width: 100%; border: 0; border-radius: 12px; background: var(--page); color: var(--ink); font: inherit; font-weight: 750; font-size: 1rem; padding: 6px 8px; cursor: pointer; touch-action: manipulation; overflow-wrap: anywhere; }
.shared-basket.armed .shared-basket-head { background: var(--purple); color: #fff; }
.shared-basket-head:disabled { cursor: default; color: var(--ink); opacity: 1; }
.shared-basket-head:focus-visible { outline: 3px solid #357eac; outline-offset: 2px; }
.shared-basket-cards { display: grid; gap: 6px; }
.shared-basket-cards .shared-card { width: 100%; font-size: .95rem; }
.shared-response:has(.shared-baskets) { max-width: 52rem; }
.shared-card:has(.card-picture) { width: 10rem; flex-direction: column; }

/* Ret enkelte ord (word_edit, 17.10.2026; K10): every word is a quiet button in the running text; a corrected
   word shows the old word struck through and the new one after it. Marks only on the pupil's own corrections. */
.word-edit-response { display: grid; gap: 10px; max-width: 42rem; color: var(--ink); }
.word-edit-text { margin: 0; padding: 12px 14px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); font-size: 1.1rem; line-height: 2.2; white-space: pre-wrap; overflow-wrap: anywhere; }
.word-edit-word { display: inline; min-width: 0; min-height: 0; padding: 3px .2em; margin: 0 -.2em; text-align: start; border: 0; border-radius: 6px; background: none; color: inherit; font: inherit; line-height: inherit; cursor: pointer; touch-action: manipulation;
  text-decoration: underline dotted 1px color-mix(in srgb, var(--ink) 35%, transparent); text-underline-offset: 6px; }
.word-edit-word[aria-disabled="true"] { cursor: default; text-decoration: none; }
.word-edit-word:focus-visible { outline: 3px solid #357eac; outline-offset: 1px; }
.word-edit-word .word-new:empty { display: none; }
.word-edit-word.edited { background: var(--lavender); box-shadow: inset 0 -2px 0 var(--purple); text-decoration: none; }
.word-edit-word.edited .word-old { text-decoration: line-through 2px; color: var(--muted); }
.word-edit-word.edited .word-new { margin-left: 4px; font-weight: 750; }
.word-edit-word.ok { background: var(--mint); box-shadow: inset 0 -2px 0 var(--green); }
.word-edit-word.bad { background: var(--red-soft); box-shadow: inset 0 -2px 0 var(--red); }
.word-edit-word .word-mark { margin-left: 3px; font-weight: 800; }
.word-edit-word.ok .word-mark { color: var(--green); } .word-edit-word.bad .word-mark { color: var(--red); }
.word-edit-input { min-height: 52px; width: 100%; padding: 8px 12px; border: 2px solid var(--purple); border-radius: 12px; background: var(--page); color: var(--ink); font: inherit; font-size: 1.2rem; font-weight: 650; }
.word-edit-sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.word-edit-sheet-actions .button { min-height: 48px; }
.word-edit-sheet-actions .button.primary { grid-column: 1 / -1; }
.shared-fb li s { color: var(--muted); }
/* Words flow as text: the general 48 px tap size of discrete buttons does not apply to a word. */
.discrete-response .word-edit-text button.word-edit-word { min-width: 0; min-height: 0; }
/* The answer shown once (UI-gennemgang 17.11, E2): after »Se svar« the right answer stands in the field where the
   pupil was wrong, and a statement's reason under it; there is no facit list under the fields. */
.shared-facit { display: block; margin-top: 4px; font-size: .9rem; font-weight: 650; color: #105637; }
.shared-facit strong { font-weight: 850; }
.shared-tile .shared-facit { font-size: .85rem; }
.shared-cloze-line .shared-facit, .shared-line .shared-facit { display: inline-block; margin: 0 6px; padding: 2px 8px; border-radius: 10px; background: var(--mint); border: 1.5px solid var(--green); line-height: 1.3; }
.shared-reason { display: block; font-size: .9rem; font-weight: 550; color: var(--muted); line-height: 1.35; }
/* Rigtigt/forkert after »Se svar«: the right button is outlined green with a ✓ (E2, G1). */
.shared-seg button.shared-right { border-color: var(--green); box-shadow: 0 0 0 2px var(--green) inset; color: #105637; }
.shared-seg button.shared-right:disabled:not([aria-pressed="true"]) { color: #105637; }
.shared-right-mark { font-weight: 900; }
