/* Product layout; typography, control roles and colors come from the central edfy guide. */
.lehrwerk-module { margin: 0; background: var(--color-bg, #f8f3f1); color: var(--color-text-strong, #2f1d1f); font: 16px/1.45 var(--font-body, 'IBM Plex Sans', sans-serif); text-transform: none; }
.lehrwerk-module * { box-sizing: border-box; min-width: 0; }
.lehrwerk-module [hidden] { display: none !important; }
.lehrwerk-module h1, .lehrwerk-module h2, .lehrwerk-module h3 { font-family: var(--font-heading, 'Arial Rounded MT Bold', sans-serif); margin: 0; }
.lehrwerk-module h1 { font-size: 32px; } .lehrwerk-module h2 { font-size: 24px; } .lehrwerk-module h3 { font-size: 20px; }
.lehrwerk-module p { margin: 0; overflow-wrap: anywhere; }
.module-header, #module-main { max-width: 1180px; margin: auto; padding: 20px; }
.module-header, .module-header nav, .module-heading, .module-actions, .module-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.module-header, .module-heading { justify-content: space-between; }
.module-header a { color: inherit; display: inline-flex; min-height: 44px; align-items: center; }
#module-main { display: grid; gap: 20px; }
.module-status, .module-panel, .module-list-row { display: grid; gap: 12px; padding: 20px; border-radius: 20px; border: 1px solid var(--color-base-200, #ddccca); background: var(--color-surface, white); }
.module-status { background: transparent; }
#module-content, .module-list, .module-editor { display: grid; gap: 16px; }
.module-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.module-editor fieldset { border: 1px solid var(--color-base-200, #ddccca); border-radius: 12px; margin: 0; padding: 16px; display: grid; gap: 12px; }
.module-editor legend { padding: 0 8px; font-weight: 600; }
.lehrwerk-module .form-field { display: flex; flex-direction: column; gap: 8px; }
.lehrwerk-module .input, .lehrwerk-module .select { max-width: 100%; min-height: 44px; font: inherit; color: inherit; text-transform: none; }
.lehrwerk-module .input { width: 100%; }
/* Short values size their field, not the whole grid; comments keep their room. */
.lehrwerk-module .form-field:has(> input[type="date"]) { width: min(100%, 24ch); }
.lehrwerk-module .form-field:has(> input[type="time"]) { width: min(100%, 18ch); }
.lehrwerk-module .module-pupil .form-field label,
.lehrwerk-module .module-prose { text-transform: none; }
.lehrwerk-module textarea { min-height: 80px; resize: vertical; }
.lehrwerk-module .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; max-width: 100%; min-height: 44px; padding: 12px 20px; white-space: normal; font-size: 16px; border: 1px solid var(--color-base-400, #ac9494); box-shadow: 0 3px 0 var(--color-base-400, #ac9494); color: var(--color-text-strong, #2f1d1f); }
.lehrwerk-module .btn-primary { background: var(--color-primary, #bfa7a7); }
.lehrwerk-module .btn-danger { background: #fff0f0; border-color: #c94848; box-shadow: 0 3px 0 #c94848; }
.lehrwerk-module .btn img { width: 20px; height: 20px; }
.lehrwerk-module :focus-visible { outline: 3px solid var(--color-text-strong, #2f1d1f); outline-offset: 3px; }
.module-pupil { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(180px, 1fr) minmax(160px, 2fr); gap: 12px; align-items: start; padding: 12px 0; border-top: 1px solid var(--color-base-150, #eadcda); }
.module-pupil-name { display: grid; gap: 8px; padding-top: 8px; overflow-wrap: anywhere; }
.module-muted { color: var(--color-text, #7c6465); }
.module-editor-footer { display: flex; flex-wrap: wrap; gap: 12px; padding: 16px; border-radius: 12px; background: var(--color-bg, #f8f3f1); }
.module-warning { padding: 16px; border-radius: 12px; background: #fff1d7; color: #2f1d1f; }
.module-conflict { display: grid; gap: 12px; }
.module-checkbox { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.module-checkbox input { width: 20px; height: 20px; accent-color: black; }
.module-history-row { padding: 12px; display: grid; gap: 8px; border-top: 1px solid var(--color-base-200, #ddccca); overflow-wrap: anywhere; }
.module-panel summary { min-height: 44px; cursor: pointer; padding: 8px 0; }
.seating-setup > :not(summary) { margin-top: 16px; }
.seating-setup > h3 { margin-top: 24px; }
.seating-setup .module-actions + .module-actions { margin-top: 12px; }
.seating-room { width: min(100%, 32ch); }
.namigo-photo { width: 88px; height: 88px; border-radius: 20px; overflow: hidden; background: var(--color-bg); display: grid; place-items: center; text-align: center; }
.lehrwerk-module .namigo-photo img { width: 100%; height: 100%; object-fit: cover; }
.namigo-photo-add { grid-template-rows: auto auto; align-content: center; gap: 6px; padding: 10px; border: 1px solid #b58fa2; background: #ead9e4; color: var(--color-text-strong); font: inherit; cursor: pointer; }
.lehrwerk-module .namigo-photo-add img { width: 24px; height: 24px; object-fit: contain; }
.namigo-photo-add span { font-size: 12px; line-height: 1.2; }
.namigo-photo-add:hover:not(:disabled) { background: #e2cbd9; }
.namigo-photo-add:disabled { opacity: .5; cursor: not-allowed; }
.lehrwerk-module .namigo-photo-choice { flex-direction: column; border-radius: 24px; }
.namigo-photo--large { width: min(100%, 240px); height: 240px; }
.namigo-assignment-photo { width: min(100%, 360px); max-height: 360px; object-fit: contain; border-radius: 20px; }
.namigo-module .module-status { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 12px; padding: 0; border: 0; background: transparent; }
.namigo-module .module-status > p { color: var(--color-text); font-size: 14px; }
.namigo-module .module-status .btn { min-height: 44px; padding: 8px 12px; }
.namigo-start { display: grid; gap: 16px; }
.namigo-intro { max-width: 65ch; color: var(--color-text); }
.namigo-group-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.namigo-group-choice { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 104px; padding: 20px; border: 1px solid var(--color-base-200); border-radius: 20px; background: var(--color-surface); color: var(--color-text-strong); font: inherit; text-align: left; cursor: pointer; }
.namigo-group-choice:hover { border-color: var(--color-base-500); }
.namigo-group-choice:focus-visible { outline: 3px solid var(--color-text-strong); outline-offset: 3px; }
.namigo-group-choice__identity { display: grid; gap: 4px; }
.namigo-group-choice__identity strong { font: 600 20px/1.25 var(--font-heading, 'Arial Rounded MT Bold', sans-serif); }
.namigo-group-choice__identity span, .namigo-group-choice__count { color: var(--color-text); }
.namigo-group-choice__identity .learning-group-subject-mark,
.namigo-group-choice__identity .learning-group-subject-mark span { color: var(--color-text-strong); }
.namigo-group-choice__count { font-size: 14px; white-space: nowrap; }
.namigo-group-context { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.namigo-group-context > div { display: grid; gap: 4px; }
.namigo-group-context > div > p { color: var(--color-text); }
.namigo-task-picker { align-items: flex-start; }
.namigo-task-picker > h2 { margin-bottom: 12px; }
.namigo-task-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.namigo-task-actions .namigo-task-button { font-weight: 600; }
.namigo-task-actions .namigo-task-button--learn:not([disabled]) { background: #dcecf2; border-color: #90aeb9; box-shadow: 0 3px 0 #90aeb9; }
.namigo-task-actions .namigo-task-button--photos { background: #ead9e4; border-color: #b58fa2; box-shadow: 0 3px 0 #b58fa2; }
.namigo-learning-options { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 16px; max-width: 820px; }
.namigo-learning-card { display: grid; grid-template-columns: 52px minmax(0, 1fr); align-items: center; gap: 16px; min-height: 100px; padding: 16px 20px; border: 1px solid var(--color-base-200, #ddccca); border-radius: 20px; background: var(--color-surface, #fff); color: var(--color-text-strong, #3d3033); text-align: left; cursor: pointer; transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease; }
.namigo-learning-card:hover:not(:disabled) { border-color: var(--color-base-500, #9b8180); background: var(--color-base-50, #fbf7f6); box-shadow: 0 8px 18px rgba(47, 29, 31, 0.08); }
.namigo-learning-card:focus-visible { outline: 3px solid var(--color-focus, #63545a); outline-offset: 3px; }
.namigo-learning-card:disabled { cursor: not-allowed; opacity: 0.55; }
.namigo-learning-card img { width: 52px; height: 56px; object-fit: contain; filter: grayscale(1) invert(.16) sepia(.45) saturate(.65); }
.namigo-learning-card strong { font: 18px/1.3 var(--font-heading); }
.namigo-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.namigo-learning-game { width: min(100%, 880px); justify-self: center; display: grid; gap: 20px; padding-block: 4px 28px; }
.namigo-learning-meta { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.namigo-learning-meta .btn { min-height: 44px; padding: 12px 20px; box-shadow: none; }
.namigo-learning-streak { justify-self: end; display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid #d7a72e; border-radius: 999px; background: #fff4c9; color: #5b4513; font-weight: 700; animation: namigo-streak-pop 300ms ease-out both; }
.namigo-learning-step { display: grid; grid-template-columns: auto minmax(180px, 1fr); align-items: center; gap: 16px; }
.namigo-learning-count { font-size: 18px !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.namigo-learning-progress { height: 10px; overflow: hidden; border-radius: 999px; background: var(--color-base-150, #eadcda); }
.namigo-learning-progress__fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #b58fa2, #8fb3c0); transform-origin: left center; }
.namigo-learning-stage { display: grid; justify-items: center; gap: 20px; }
.namigo-learning-question { max-width: 720px; text-align: center; font-size: clamp(24px, 4vw, 36px) !important; line-height: 1.2; }
.namigo-learning-hero { width: min(100%, 360px); display: grid; place-items: center; padding: 10px; border: 1px solid var(--color-base-200); border-radius: 24px; background: var(--color-surface, #fff); box-shadow: 0 8px 22px rgba(47, 29, 31, .08); }
.namigo-learning-hero .namigo-photo--large { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 18px; }
.namigo-learning-choices { width: min(100%, 760px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lehrwerk-module .namigo-learning-choice { position: relative; width: 100%; min-height: 76px; border: 1px solid var(--color-base-300, #cbb8b6); border-radius: 20px; background: var(--color-surface, #fff); box-shadow: 0 4px 0 var(--color-base-300, #cbb8b6); color: var(--color-text-strong); font-weight: 700; transition: transform 140ms ease, border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease; }
.lehrwerk-module .namigo-learning-choice:hover:not(:disabled) { transform: translateY(-2px); border-color: var(--color-base-500, #9b8180); box-shadow: 0 6px 0 var(--color-base-400, #ac9494), 0 10px 20px rgba(47, 29, 31, .08); }
.lehrwerk-module .namigo-learning-choice:active:not(:disabled) { transform: translateY(2px) scale(.99); box-shadow: 0 1px 0 var(--color-base-400, #ac9494); }
.lehrwerk-module .namigo-learning-choice:disabled { cursor: default; opacity: 1; }
.lehrwerk-module .namigo-learning-choice--name { padding: 16px 20px; font-size: clamp(17px, 2.4vw, 21px); line-height: 1.25; overflow-wrap: anywhere; }
/* A photo answer needs an intrinsic image area; it is not an icon action. */
.lehrwerk-module .namigo-learning-choice.namigo-learning-choice--photo { display: block; width: min(100%, 360px) !important; min-height: 44px; padding: 10px; overflow: hidden; }
.namigo-learning-choice--photo .namigo-photo--large { width: 100%; height: auto; aspect-ratio: 4 / 3; border-radius: 14px; }
.lehrwerk-module .namigo-learning-choice[data-answer-state="idle"] { opacity: .52; box-shadow: none; }
.lehrwerk-module .namigo-learning-choice[data-answer-state="correct"] { border-color: #31865b; background: #e8f7ee; box-shadow: 0 4px 0 #31865b; animation: namigo-correct-pop 360ms cubic-bezier(.2,.8,.2,1) both; }
.lehrwerk-module .namigo-learning-choice[data-answer-state="wrong"] { border-color: #bd6870; background: #fff0f1; box-shadow: 0 4px 0 #bd6870; animation: namigo-wrong-nudge 280ms ease both; }
.namigo-learning-choice[data-answer-state="correct"]::after, .namigo-learning-choice[data-answer-state="wrong"]::after { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; font-size: 18px; font-weight: 800; box-shadow: 0 2px 8px rgba(47,29,31,.18); }
.namigo-learning-choice[data-answer-state="correct"]::after { content: '\2713'; background: #31865b; }
.namigo-learning-choice[data-answer-state="wrong"]::after { content: '\00d7'; background: #bd6870; }
.namigo-learning-feedback { width: min(100%, 760px); justify-self: center; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border: 1px solid var(--color-base-200); border-radius: 18px; background: var(--color-surface, #fff); }
.namigo-learning-feedback--correct { border-color: #8cc9a7; background: #f0faf4; }
.namigo-learning-feedback--wrong { border-color: #deb0b5; background: #fff7f7; }
.namigo-learning-feedback__copy { display: grid; gap: 2px; }
.namigo-learning-feedback__copy strong { font: 20px/1.25 var(--font-heading); }
.namigo-learning-feedback__copy span { color: var(--color-text, #7c6465); }
.namigo-learning-complete { display: grid; justify-items: center; gap: 14px; padding: 28px 20px; text-align: center; }
.namigo-learning-complete h2 { font-size: clamp(28px, 5vw, 42px); }
.namigo-learning-complete h3 { font-size: 22px; color: var(--color-text, #7c6465); }
.namigo-learning-score { display: flex; align-items: baseline; gap: 6px; }
.namigo-learning-score strong { font: 700 clamp(42px, 8vw, 72px)/1 var(--font-heading); color: #8f667b; }
.namigo-learning-score span { font-size: 18px; }
.namigo-learning-summary { color: var(--color-text, #7c6465); }
.namigo-learning-complete-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4px; }
.namigo-learning-celebration { position: relative; width: 190px; height: 126px; margin-bottom: 2px; }
.namigo-learning-polaroid { position: absolute; left: 65px; top: 22px; width: 62px; height: 82px; display: grid; grid-template-rows: 1fr 10px; gap: 5px; padding: 7px; border: 1px solid var(--color-base-200); border-radius: 8px; background: #fff; box-shadow: 0 8px 18px rgba(47,29,31,.13); transform-origin: 50% 100%; animation: namigo-polaroid-fan 520ms cubic-bezier(.2,.85,.2,1) both; }
.namigo-learning-polaroid:nth-child(1) { --fan-x: -44px; --fan-r: -17deg; animation-delay: 60ms; }
.namigo-learning-polaroid:nth-child(2) { --fan-x: 0px; --fan-r: 0deg; animation-delay: 140ms; z-index: 2; }
.namigo-learning-polaroid:nth-child(3) { --fan-x: 44px; --fan-r: 17deg; animation-delay: 220ms; }
.namigo-learning-polaroid__portrait { display: grid; place-items: center; border-radius: 5px; background: linear-gradient(145deg, #ead9e4, #dcecf2); color: #8f667b; font-size: 30px; }
@keyframes namigo-correct-pop { 0% { transform: scale(.97); } 58% { transform: scale(1.025); } 100% { transform: scale(1); } }
@keyframes namigo-wrong-nudge { 0%,100% { transform: translateX(0); } 30% { transform: translateX(-5px); } 65% { transform: translateX(4px); } }
@keyframes namigo-streak-pop { 0% { transform: scale(.8); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes namigo-polaroid-fan { from { opacity: 0; transform: translateY(20px) scale(.75) rotate(0); } to { opacity: 1; transform: translateX(var(--fan-x)) rotate(var(--fan-r)); } }
.namigo-task-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; }
.namigo-task-heading > div { display: grid; gap: 4px; }
.namigo-task-heading p { color: var(--color-text); }
.namigo-photo-overview > h3 { font-size: 20px; }
.namigo-work-section { display: grid; gap: 10px; }
.namigo-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.namigo-capture-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.namigo-capture > .btn, .namigo-file-choice { justify-self: start; }
.namigo-consent, .namigo-roster { gap: 16px; }
.namigo-consent-templates { border-top: 1px solid var(--color-base-200); padding-top: 4px; }
.namigo-consent-templates > p { max-width: 70ch; margin-bottom: 8px; color: var(--color-text); }
.namigo-roster-status { color: var(--color-text); }
.namigo-roster > .form-field { width: min(100%, 360px); }
.namigo-roster-empty { padding-block: 8px; color: var(--color-text); }
.namigo-person-picker .form-field { width: min(100%, 360px); }
.namigo-person-search-results .module-list-row { padding: 12px; border-radius: 12px; }
.namigo-person-search-results .btn { justify-self: start; }
.namigo-file-choice__input { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.namigo-file-choice__trigger { cursor: pointer; }
.namigo-file-choice__input:focus-visible + .namigo-file-choice__trigger { outline: 3px solid var(--color-text-strong); outline-offset: 3px; }
@media (max-width: 900px) { .namigo-group-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .namigo-group-choices { grid-template-columns: 1fr; }
  .namigo-learning-options { grid-template-columns: 1fr; }
  .namigo-group-context, .namigo-task-heading { align-items: flex-start; }
  .namigo-learning-game { gap: 16px; }
  .namigo-learning-step { grid-template-columns: 1fr; gap: 8px; }
  .namigo-learning-choices { gap: 10px; }
  .lehrwerk-module .namigo-learning-choice--name { min-height: 68px; padding: 14px 10px; }
  .namigo-learning-feedback { align-items: stretch; flex-direction: column; }
  .namigo-learning-feedback .btn { align-self: flex-start; }
}
@media (max-width: 430px) {
  .namigo-learning-question { font-size: 24px !important; }
  .namigo-learning-choices--photo-name { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .namigo-learning-progress__fill, .lehrwerk-module .namigo-learning-choice, .namigo-learning-streak, .namigo-learning-polaroid { animation: none !important; transition: none !important; }
  .namigo-learning-polaroid { opacity: 1; transform: translateX(var(--fan-x)) rotate(var(--fan-r)); }
}
.seating-viewport { position: relative; width: 100%; height: 480px; min-height: 280px; overflow: hidden; touch-action: none; border: 1px solid var(--color-base-300, #bfa7a7); border-radius: 20px; background: var(--color-bg); }
.seating-board { position: absolute; left: 0; top: 0; transform-origin: top left; background: var(--color-surface, white); }
.seating-card, .seating-object { position: absolute; display: flex; flex-direction: column; gap: 4px; align-items: center; justify-content: center; padding: 12px 8px 8px; border: 1px solid var(--color-text, #7c6465); border-radius: 12px; background: var(--color-bg); color: var(--color-text-strong); font: inherit; text-transform: none; user-select: none; touch-action: none; }
.seating-card[aria-pressed="true"] { outline: 4px solid var(--color-primary); }
.seating-card img { width: 42px; height: 42px; object-fit: cover; border-radius: 8px; pointer-events: none; }
.seating-person { font-size: 14px; line-height: 1.2; overflow-wrap: anywhere; max-height: 55px; overflow: hidden; }
.seating-number, .seating-direction { position: absolute; top: 3px; font-size: 12px; }
.seating-number { left: 5px; } .seating-direction { right: 5px; }
.seating-front { margin: 8px 12px; height: 32px; text-align: center; background: var(--color-bg); border-radius: 8px; }
.lehrwerk-module details > summary { min-height: 44px; padding: 12px 0; cursor: pointer; }
.lehrwerk-module details > .module-toolbar { margin: 12px 0; }
.lehrwerk-module details > .btn { margin: 8px 8px 8px 0; }
.somi-module #module-main { gap: 12px; }
.somi-module #module-account { display: none; } /* Account remains available in the shared header. */
.somi-module .module-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.somi-module #module-sync-actions .btn { padding: 8px 12px; }
.somi-module .btn:disabled, .somi-module input:disabled, .somi-module select:disabled, .somi-module textarea:disabled { opacity: .48; cursor: not-allowed; }
.somi-module .btn:disabled { box-shadow: none; }
.somi-module .btn-primary { font-weight: 600; }
.somi-module .btn:hover:not(:disabled) { filter: brightness(.97); }
.somi-list-heading { justify-content: space-between; }
.somi-filters { align-items: end; padding-block: 8px; }
.somi-filters .form-field { flex: 0 1 280px; }
.somi-creation { width: min(100%, 560px); justify-self: start; gap: 16px; }
.somi-creation > .btn { justify-self: start; }
.somi-date { max-width: 240px; }
.somi-round-list { display: grid; }
.somi-round-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 0; border-top: 1px solid var(--color-base-200); }
.somi-round-row > div { display: grid; gap: 4px; }
.somi-round-row > .btn { flex-shrink: 0; }
.somi-round-heading { gap: 12px 20px; }
.somi-round-heading h2 { overflow-wrap: anywhere; }
.somi-round-context { color: var(--color-text); }
.somi-empty { padding-block: 24px; max-width: 60ch; }
.somi-rating { width: min(100%, 640px); justify-self: center; display: grid; gap: 12px; }
.somi-swipe-card { touch-action: pan-y; align-content: start; }
.somi-portrait { height: 320px; width: 100%; position: relative; display: grid; place-items: center; border-radius: 12px; background: var(--color-bg); overflow: hidden; }
.somi-photo-placeholder { font-size: 48px; color: var(--color-text); }
.somi-person-photo { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; object-position: 50% 30%; }
.somi-caption, .somi-recent { flex-wrap: nowrap; justify-content: space-between; }
.somi-caption h2, .somi-recent p { overflow-wrap: anywhere; }
.lehrwerk-module .somi-comment-button { width: 48px; height: 48px; flex: 0 0 48px; padding: 12px; position: relative; }
.somi-comment-dot { position: absolute; top: 5px; right: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--color-text-strong); }
.somi-recent { border-top: 1px solid var(--color-base-200); padding-top: 16px; }
.somi-main-grades { display: grid; grid-template-columns: repeat(6, minmax(44px, 1fr)); gap: 8px; overflow-x: auto; padding: 4px 4px 8px; }
.lehrwerk-module .somi-main-grades .btn { min-height: 72px; padding: 8px 4px; border-radius: 12px; flex-direction: column; justify-content: flex-end; gap: 4px; font-size: 24px; font-weight: 600; }
/* Existing Web grade scale: source/web/styles/pages/dashboard.css, grade-chip--text. */
.somi-main-grades [data-grade="1"], .somi-main-grades [data-grade="2"] { background: #b3ffc7; }
.somi-main-grades [data-grade="3"] { background: #ffe780; }
.somi-main-grades [data-grade="4"], .somi-main-grades [data-grade="5"], .somi-main-grades [data-grade="6"] { background: #ffc897; }
.somi-main-grades .btn:hover:not(:disabled) { filter: brightness(.96); }
.somi-main-grades .btn:disabled, .somi-comment-button:disabled { opacity: .5; cursor: not-allowed; }
.somi-results { width: 100%; table-layout: fixed; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.somi-results th, .somi-results td { padding: 12px; border-bottom: 1px solid var(--color-base-200); vertical-align: top; text-align: left; overflow-wrap: anywhere; }
.somi-results thead { background: var(--color-base-100, #f2e8e7); }
.somi-results th:first-child { width: 26%; }
.somi-results th:nth-child(2) { width: 224px; }
.somi-results tbody th { font-weight: 600; padding-block: 24px; }
.somi-results td .select { width: 100%; }
.somi-result-comment { flex-wrap: nowrap; align-items: flex-start; }
.somi-result-comment p { flex: 1; white-space: pre-wrap; padding-block: 12px; }
.somi-manage { margin-top: 12px; border-top: 1px solid var(--color-base-200); }
.somi-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.somi-module .somi-dialog { max-height: calc(100dvh - 32px); overflow: hidden; }
.somi-module .somi-dialog[open] { grid-template-rows: auto minmax(0, 1fr) auto; gap: 16px; }
.somi-dialog h2 { font-size: 20px; overflow-wrap: anywhere; }
.somi-dialog-body { min-height: 0; overflow: auto; display: grid; gap: 16px; padding: 4px; }
.somi-dialog-footer { display: grid; gap: 12px; border-top: 1px solid var(--color-base-200); padding-top: 16px; }
.somi-dialog-footer > p { font-size: 14px; }
.somi-dialog-body textarea.input { min-height: 128px; border-radius: 12px; padding: 12px; }
@media (max-width: 700px) {
  .somi-round-row { flex-wrap: wrap; }
  .somi-filters .form-field { flex: 1 1 220px; }
  .somi-results, .somi-results tbody { display: block; }
  .somi-results thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .somi-results tr { display: grid; grid-template-columns: 1fr; padding-block: 16px; gap: 8px; border-bottom: 1px solid var(--color-base-200); }
  .somi-results th, .somi-results td, .somi-results th:first-child { width: auto; padding: 0; border: 0; }
  .somi-results td:nth-child(2) { max-width: 240px; }
  .somi-result-comment p { padding-block: 8px; }
  .somi-portrait { height: auto; aspect-ratio: 4 / 3; }
  .somi-module .somi-dialog { padding: 16px; }
  .somi-module .somi-dialog[open] { gap: 12px; }
  .somi-dialog-footer .module-toolbar { gap: 12px; }
}
@media (max-width: 380px) { .somi-main-grades { gap: 4px; padding-inline: 2px; } }
.somi-intro { max-width: 70ch; color: var(--color-text); }
.somi-options > summary { font-weight: 600; }
.somi-options[open] { width: 100%; }
.somi-help { max-width: 70ch; }
.somi-help p + p { margin-top: 12px; }
.somi-rating-note, .somi-input-help { font-size: 14px; }
.somi-discard-row { border-top: 1px solid var(--color-base-200); padding-top: 8px; }
.somi-touch-help, .somi-year-toggle { display: none !important; }
@media (any-pointer: coarse) { .somi-touch-help { display: inline !important; } .somi-keyboard-help { display: none; } }
@media (max-width: 820px) {
  .somi-rating-active.work-shell .work-year { display: none; }
  .somi-rating-active.somi-show-year.work-shell .work-year { display: block; }
  .somi-rating-active .somi-year-toggle { display: inline-flex !important; }
  .somi-rating-active.work-shell #module-main { padding-top: 12px; gap: 8px; }
  .somi-rating-active #module-content { gap: 8px; }
  .somi-rating-active .module-heading h1 { font-size: 20px; }
  .somi-rating-active .module-status { gap: 4px 12px; }
  .somi-rating-active .somi-round-heading { gap: 8px; }
  .somi-rating-active .somi-round-heading h2 { font-size: 20px; }
  .somi-rating-active .somi-round-context { font-size: 14px; }
  .somi-rating-active .somi-swipe-card { padding: 12px; gap: 8px; }
  .somi-rating-active .somi-portrait { height: clamp(120px, 21dvh, 200px); aspect-ratio: auto; }
  .somi-rating-active .somi-caption h2 { font-size: 20px; }
  .somi-rating-active .somi-rating { gap: 8px; }
  .somi-rating-active .somi-options > summary { padding-block: 8px; }
  .somi-rating-active .somi-recent { padding-top: 8px; }
}
/* When a software keyboard leaves little height, scroll the whole dialog instead
   of letting its fixed footer squeeze the actual editor out of view. */
@media (max-height: 600px) {
  .somi-module .somi-dialog[open] { display: block; overflow-y: auto; }
  .somi-dialog-body { overflow: visible; margin-block: 12px; }
  .somi-dialog-footer { margin-top: 12px; }
}
.checklist-groups .learning-groups-list, .checklist-groups .learning-group-editor { display: grid; gap: var(--space-16); }
.checklist-groups .learning-group-editor__roster { display: grid; gap: 0; }
.checklist-groups.is-creating { padding: 0; border: 0; background: transparent; box-shadow: none; }
.checklist-groups.is-creating .learning-group-editor { border: 0; }
.checklist-groups .learning-group-item { display: grid; gap: var(--space-12); padding: var(--space-16); border-block-start: 1px solid var(--color-base-200); }
.checklist-groups .learning-group-editor__person { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-12); }
.checklist-groups .learning-group-editor__actions, .checklist-groups .learning-group-item__actions { display: flex; flex-wrap: wrap; gap: var(--space-12); padding-block: var(--space-8); }
.checklist-groups > .btn { justify-self: start; }
.module-actions > a, #module-content > a { display: inline-flex; align-items: center; min-height: 44px; }
.module-confirm { width: min(560px, calc(100% - 32px)); padding: 24px; border: 1px solid var(--color-base-200); border-radius: 20px; background: var(--color-surface, white); color: inherit; }
.module-confirm[open] { display: grid; gap: 20px; }
.module-confirm::backdrop { background: rgba(47, 29, 31, .35); }
.checklist-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.checklist-card-titles { display: grid; gap: 8px; overflow-wrap: anywhere; }
.checklist-course { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.checklist-course-color { width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; background: var(--color-base-300); border: 1px solid var(--color-base-400); }
.checklist-lock { width: 24px; height: 24px; flex: 0 0 24px; margin-top: 4px; }
.lehrwerk-module .checklist-omissions { padding: 8px 12px; box-shadow: none; }
.checklist-dialog { max-height: calc(100dvh - 32px); overflow: hidden; }
.checklist-dialog[open] { grid-template-rows: auto minmax(0, 1fr) auto; }
.checklist-dialog-body { min-height: 0; overflow: auto; display: grid; gap: 16px; padding: 4px; }
@media (max-width: 700px) { .module-pupil { grid-template-columns: 1fr; } .module-header, #module-main { padding: 16px; } .module-panel { padding: 16px; } }

/* Checklists: a compact working list, with secondary detail at the point of use. */
.checklisten-module .module-status { border: 0; padding: 0; background: transparent; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.checklisten-module .module-status > p { font-size: 14px; color: var(--color-text); }
.checklisten-module .module-list { gap: 12px; }
.checklisten-module .module-list-row { padding: 20px; border-radius: 16px; }
.checklisten-module .checklist-card-titles h2 { font-size: 20px; }
.checklist-list-filters, .checklist-person-filters { align-items: start; }
.checklist-list-filters > .form-field, .checklist-person-filters > .form-field { flex: 1 1 200px; max-width: 360px; }
.checklist-filter-options { flex: 1 1 180px; max-width: 360px; }
.checklist-filter-options > summary, .checklist-metadata > summary, .checklist-checkpoint-settings > summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 600; }
.checklist-filter-options > :not(summary) { margin-top: 12px; }
.checklist-workspace { border: 0; padding: 0; background: transparent; gap: 12px; }
.checklist-workspace-heading { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: start; }
.checklist-workspace-heading > h2 { overflow-wrap: anywhere; }
.checklist-workspace-heading > p { grid-column: 1; }
.checklist-workspace-heading .module-editor-footer { grid-column: 2; grid-row: 1 / span 2; padding: 0; background: transparent; }
.checklist-workspace > fieldset:last-of-type { border: 0; padding: 0; }
.checklist-workspace .checklist-checkpoint { background: var(--color-surface); padding: 12px 16px; gap: 8px; }
.checklist-workspace .module-pupil { grid-template-columns: minmax(160px, 1.3fr) minmax(130px, .8fr) minmax(100px, 1fr); gap: 8px 16px; align-items: start; padding: 12px 0; }
.checklist-workspace .module-pupil-name { gap: 0; padding-top: 0; }
.learning-group-field-error { color: #922e30; font-size: 14px; margin-top: 4px; }
.learning-group-creation__section input[aria-invalid="true"] { border-color: #922e30; }
.seating-module .module-status { border: 0; padding: 0; background: transparent; }
.seating-context > .form-field { flex: 1 1 240px; }
.seating-context .select { width: 100%; }
.seating-modes [aria-pressed="true"] { background: var(--color-primary); font-weight: 600; }
.seating-module .seating-setup > summary { min-height: 44px; padding-block: 10px; cursor: pointer; font-weight: 600; }
.seating-module #module-content { gap: 12px; }
.seating-module .seating-viewport { height: clamp(280px, 48dvh, 600px); }
.checklist-workspace .module-pupil > .form-field > label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.checklist-person-history > summary, .checklist-person-note > summary { min-height: 44px; display: list-item; padding-block: 10px; cursor: pointer; color: var(--color-text); }
.checklist-person-history { font-size: 14px; }
.checklist-person-history[open] > span { display: block; margin-bottom: 8px; }
.checklist-person-note[open] { grid-column: 1 / -1; }
.checklist-person-note textarea { min-height: 72px; }
.credit-service-table { width: 100%; border-collapse: collapse; text-align: left; }
.credit-service-table th, .credit-service-table td { padding: 12px 8px; vertical-align: top; overflow-wrap: normal; }
.credit-service-table th:last-child, .credit-service-table td:last-child { width: 5.5rem; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.credit-service-table tbody tr + tr { border-top: 1px solid var(--color-base-200); }
@media (max-width: 520px) {
  .credit-service-table, .credit-service-table tbody { display: block; }
  .credit-service-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .credit-service-table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; }
  .credit-service-table td { padding: 0; overflow-wrap: anywhere; }
  .credit-service-table td:first-child { grid-column: 1; font-weight: 600; }
  .credit-service-table td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 14px; color: var(--color-text); }
  .credit-service-table td:last-child { grid-column: 2; grid-row: 1 / 3; width: auto; align-self: center; }
  .credit-service-table td:last-child::after { content: ' Credits'; }
}
@media (max-width: 700px) {
  .checklist-workspace-heading { grid-template-columns: 1fr; }
  .checklist-workspace-heading .module-editor-footer { grid-column: 1; grid-row: auto; margin-top: 8px; }
  .checklist-workspace .module-pupil { grid-template-columns: minmax(0, 1fr) minmax(166px, 1.35fr); gap: 0 8px; align-items: center; }
  .checklist-workspace .module-pupil-name { display: contents; }
  .checklist-workspace .module-pupil-name > strong { grid-column: 1; grid-row: 1; overflow-wrap: anywhere; }
  .checklist-workspace .module-pupil > .form-field { grid-column: 2; grid-row: 1; }
  .checklist-workspace .module-pupil-name > .checklist-person-history { grid-column: 1; }
  .checklist-workspace .module-pupil-name > .module-muted { grid-column: 1 / -1; }
  .checklist-workspace .module-pupil .select { width: 100%; }
  .checklist-workspace .module-pupil > .checklist-person-note { grid-column: 2; }
  .checklist-workspace .module-pupil :is(.checklist-person-note,.checklist-person-history)[open] { grid-column: 1 / -1; }
  .checklist-person-filters > .form-field { flex-basis: 100%; max-width: none; }
  .checklist-person-filters .checklist-filter-options { flex-basis: 100%; max-width: none; }
  .checklist-workspace .checklist-checkpoint { padding: 8px 12px; }
  .checklist-editing #module-main { gap: 12px; }
  .checklist-editing .module-heading h1 { font-size: 24px; }
  .checklist-editing #module-account { display: none; }
  .checklist-workspace-heading > h2 { font-size: 20px; }
}
@media (max-width: 359px) {
  .checklist-workspace .module-pupil { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .checklist-workspace .module-pupil-name > strong { grid-column: 1 / -1; }
  .checklist-workspace .module-pupil > .form-field { grid-column: 1 / -1; grid-row: 2; }
}

/* Current task stays visible when the pupil list scrolls. */
.checklist-control-context { position: sticky; top: 0; z-index: 5; background: var(--color-surface); padding: 8px 12px; border-bottom: 1px solid var(--color-base-300); }
.checklist-control-context { margin: 0; overflow-wrap: anywhere; }
.checklist-workspace .module-pupil-name > strong, .checklist-workspace .module-pupil-name > .module-muted { overflow-wrap: anywhere; }
.checklist-workspace .checklist-checkpoint > legend { overflow-wrap: anywhere; }
@media (max-width: 620px) { .checklist-workspace .module-pupil-name > .checklist-follow-up { grid-column: 1 / -1; } }

/* Checklisten P6: Ergebnis, Ereignisse und zurückhaltende Nebenaktionen. */
.checklisten-module .checklist-more-actions > summary { min-height:44px; padding:10px 12px; cursor:pointer; }
.checklisten-module .checklist-more-actions[open] { display:flex; flex-wrap:wrap; gap:12px; }
.checklisten-module .checklist-result-point { margin-top:20px; }
.checklisten-module .checklist-event-list { padding-left:24px; display:grid; gap:12px; }
.checklisten-module .checklist-event-list p { margin:4px 0; }
.checklisten-module .checklist-metrics { padding:8px 0; }
.checklisten-module .checklist-row-context { display:none; }
.checklisten-module .checklist-identity-hint > summary { min-height:44px; cursor:pointer; }
.checklisten-module .module-export-scope { font-weight:600; }
.checklisten-module .checklist-person-history pre { white-space:pre-wrap; overflow-wrap:anywhere; }
