/* Klassenzimmer-Bereich (/classroom/, seit 20.11.2026). Nur auf diesen Seiten geladen (src/site/classroom.mjs).
   Bildschirm: Beamer-Modus, Arbeitsblatt-Vorschau, Challenges. Druck: nur die Arbeitsblätter bzw. das Lösungsblatt. */

/* ---------------------------------------------------------------- Kopf mit Sprachumschalter */
.cr-hero .page-hero__text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.cr-title { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; margin-top: 12px; }
.cr-title h1 { margin: 0 !important; }
.cr-hero .cr-tagline { font-size: 14px !important; font-weight: 600; color: var(--green) !important; display: inline-flex; align-self: flex-start; background: var(--green-soft); border-radius: 999px; padding: 4px 12px; }
.cr-hero--compact .wrap { padding-bottom: 28px; }
.cr-hero--compact h1 { font-size: clamp(28px, 3.4vw, 40px) !important; }
.cr-hero--compact p { font-size: 17px !important; }

/* ---------------------------------------------------------------- Startseite des Bereichs */
.cr-section { padding: 64px 0 24px; }
.cr-section + .cr-section { padding-top: 40px; }
.cr-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.cr-card { position: relative; display: flex; flex-direction: column; gap: 12px; border-radius: 20px; padding: 26px 26px 28px; border: 1px solid var(--line-2); background: #FFFFFF; box-shadow: 0 24px 50px -40px rgba(28, 27, 58, .5); }
.cr-card--blue { background: linear-gradient(180deg, #F3F2FF 0, #FFFFFF 55%); }
.cr-card--yellow { background: linear-gradient(180deg, #FFF8E0 0, #FFFFFF 55%); }
.cr-card--green { background: linear-gradient(180deg, #E8F8F0 0, #FFFFFF 55%); }
.cr-card__art { display: block; height: 150px; margin: -6px 0 2px; }
.cr-card__art svg { height: 150px; width: auto; }
.cr-card h2 { margin: 0; font-family: var(--head); font-size: 24px; letter-spacing: -.02em; color: var(--ink); }
.cr-card p { margin: 0; }
.cr-card__links { list-style: none; margin: 0 0 6px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cr-card__links a { display: inline-block; border: 1px solid var(--line-2); background: #FFFFFF; border-radius: 999px; padding: 4px 11px; font-size: 13.5px; font-weight: 500; }
.cr-card__links a:hover { border-color: var(--accent); }
.cr-card .btn { margin-top: auto; align-self: flex-start; }
.cr-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 20px; counter-reset: s; }
.cr-steps li { counter-increment: s; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 16px; background: var(--panel); border: 1px solid var(--panel-line); }
.cr-steps li::before { content: counter(s); display: inline-flex; width: 34px; height: 34px; border-radius: 50%; align-items: center; justify-content: center; background: var(--accent); color: #FFFFFF; font-family: var(--head); font-weight: 700; margin-bottom: 4px; }
.cr-steps b { font-family: var(--head); font-size: 19px; color: var(--ink); }
.cr-plans { display: flex; flex-direction: column; gap: 12px; }
.cr-plan { border: 1px solid var(--line-2); border-radius: 14px; background: #FFFFFF; }
.cr-plan summary { list-style: none; cursor: pointer; padding: 16px 20px; display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; }
.cr-plan summary::-webkit-details-marker { display: none; }
.cr-plan summary::after { content: '+'; margin-left: auto; font-weight: 700; color: var(--accent); font-size: 20px; line-height: 1; }
.cr-plan[open] summary::after { content: '−'; }
.cr-plan summary b { font-family: var(--head); font-size: 18px; color: var(--ink); }
.cr-plan summary span { font-size: 14px; color: var(--muted); }
.cr-plan ol { list-style: none; margin: 0; padding: 0 20px 18px; display: flex; flex-direction: column; gap: 12px; }
.cr-plan li { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: start; }
.cr-plan__time { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--accent-ink); background: var(--accent-soft); border-radius: 6px; padding: 2px 6px; text-align: center; }
.cr-plan li b { color: var(--ink); }
.cr-plan li p { margin: 2px 0 0; font-size: 15px; }
.cr-plan a, .cr-howto a, .block p a, .cr-list a { color: var(--accent); text-decoration: underline; text-decoration-color: #C9C8FF; text-underline-offset: 3px; }
.cr-fit { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 16px; }
.cr-fit > div { border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 20px; }
.cr-fit h3 { margin: 0 0 8px; font-family: var(--head); font-size: 17px; color: var(--ink); }
.cr-fit ul, .cr-list { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 6px; }
.cr-list b { color: var(--ink); }
.cr-list--num { padding-left: 1.4em; }
.cr-privacy { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cr-privacy li { display: flex; flex-direction: column; font-size: 14.5px; padding-left: 26px; position: relative; }
.cr-privacy li::before { content: ''; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--green-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%230C7A52' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") no-repeat center; }
.cr-privacy b { color: var(--ink); }
.cr-share { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-share .btn { gap: 8px; }
.cr-howto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 16px; }
.cr-howto h3 { margin: 0 0 6px; font-family: var(--head); font-size: 17px; color: var(--ink); }
.cr-howto p { margin: 0; font-size: 15px; }
.muted { color: var(--muted); }

/* ---------------------------------------------------------------- Beamer-Modus */
.cr-proj-wrap { background: var(--panel); border-bottom: 1px solid var(--panel-line); padding: 0 0 40px; }
.cr-proj { --cr-scale: 1; overflow: hidden; }
.cr-proj__bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-right: 12px; }
.cr-proj__bar .tabs { border-bottom: 0; }
.cr-proj__tools { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 0; }
.cr-tool { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: #FFFFFF; border-radius: 9px; padding: 6px 10px; font-size: 13.5px; font-weight: 600; color: var(--ink); cursor: pointer; }
.cr-tool:hover { border-color: var(--accent); color: var(--accent); }
.cr-tool[aria-pressed="true"] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.cr-panel { padding: 22px 24px 18px; }
.cr-keys { margin: 0; padding: 10px 24px 14px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.cr-row { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.cr-row--step { margin-top: 4px; }
.cr-label { display: block; margin: 0; font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cr-input { width: 100%; resize: vertical; border: 1px solid #DCDCE8; border-radius: 12px; padding: 10px 14px; font-family: var(--mono); font-size: calc(18px * var(--cr-scale)); color: var(--ink); background: #FFFFFF; }
.cr-input--small { font-size: calc(14px * var(--cr-scale)); }
.cr-input:focus { outline: 3px solid #D9D8FF; border-color: var(--accent); }
.cr-shift { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); }
.cr-shift > span { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-right: 4px; }
.cr-shift button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid #DCDCE8; background: #FFFFFF; font-size: 22px; font-weight: 700; color: var(--ink); cursor: pointer; line-height: 1; }
.cr-shift button:hover { border-color: var(--accent); color: var(--accent); }
.cr-shift output { min-width: 56px; text-align: center; font-family: var(--head); font-weight: 700; font-size: calc(32px * var(--cr-scale)); color: var(--accent); font-variant-numeric: tabular-nums; }
.cr-kw { display: inline-flex; align-items: center; gap: 8px; }
.cr-kw span { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.cr-kw input { width: 180px; padding: 8px 12px; border: 1px solid #DCDCE8; border-radius: 10px; font-family: var(--mono); font-size: 18px; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; color: var(--ink); }
.cr-kw select { min-width: 0 !important; }

.cr-caesar { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr); gap: 28px; align-items: start; }
.cr-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cr-wheel { width: 100%; max-width: calc(420px * var(--cr-scale)); }
.crw { width: 100%; height: auto; font-family: var(--mono); user-select: none; }
.crw-outer-disc { fill: #FFF6DA; stroke: var(--ink); stroke-width: 3; }
.crw-ticks line { stroke: #E3CF8E; stroke-width: 1.5; }
.crw-o circle { fill: transparent; }
.crw-o text { font-size: 22px; font-weight: 700; fill: var(--ink); }
.crw-inner { transform-origin: 200px 200px; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); }
.crw-inner-disc { fill: #FFFFFF; stroke: var(--ink); stroke-width: 3; }
.crw-i circle { fill: transparent; }
.crw-i text { font-size: 21px; font-weight: 700; fill: var(--red); }
.crw-num { font-size: 11px; fill: var(--muted); font-family: var(--mono); }
.crw-pin { fill: var(--ink); }
.crw-mark { fill: var(--accent); }
.crw .is-on circle { fill: var(--yellow); stroke: var(--ink); stroke-width: 2; }
.crw .crw-i.is-on circle { fill: var(--ink); }
.crw .crw-i.is-on text { fill: #FFFFFF; }
.cr-out { display: flex; flex-direction: column; gap: 10px; }
.cr-line small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cr-line p { margin: 2px 0 0; font-family: var(--mono); font-weight: 500; font-size: calc(30px * var(--cr-scale)); line-height: 1.35; letter-spacing: .06em; color: var(--ink); word-break: break-word; }
.cr-line--out p { color: var(--red); font-weight: 700; }
.cr-line span.is-cur { background: var(--yellow); border-radius: 4px; color: var(--ink); box-shadow: 0 0 0 2px var(--yellow); }
.cr-line span.is-hidden { color: #C9C8E0; }
.cr-empty-line { margin: 0; color: var(--muted); font-size: 15px; }
.cr-math { margin: 0; font-family: var(--mono); font-size: calc(17px * var(--cr-scale)); color: var(--ink); background: var(--accent-soft); border-radius: 10px; padding: 8px 12px; min-height: 2.2em; }
.cr-math b { color: var(--red); }
.cr-all { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow: auto; border: 1px solid var(--line-2); border-radius: 12px; }
.cr-all button { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; border: 0; border-bottom: 1px solid var(--line); background: #FFFFFF; padding: 6px 12px; text-align: left; cursor: pointer; font-family: var(--mono); font-size: calc(14px * var(--cr-scale)); color: var(--ink); }
.cr-all button:hover { background: var(--panel); }
.cr-all span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-all li[aria-current] button { background: var(--accent-soft); }
.cr-all .is-best button { background: var(--green-soft); }
.cr-all em { font-style: normal; font-family: var(--text); font-size: 12px; font-weight: 700; color: var(--green); }

.cr-vig { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 520px); gap: 28px; align-items: start; }
.cr-cols { display: flex; flex-direction: column; gap: 6px; }
.cr-vlegend { display: flex; gap: 14px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cr-vlegend span:nth-child(2) { color: var(--accent); }
.cr-vlegend span:nth-child(3) { color: var(--red); }
.cr-vcols { display: flex; flex-wrap: wrap; gap: 10px 3px; }
.cr-vcol { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; border-radius: 8px; padding: 3px 2px; font-family: var(--mono); font-weight: 600; font-size: calc(26px * var(--cr-scale)); line-height: 1.15; color: var(--ink); min-width: 1.05em; }
.cr-vcol i { font-style: normal; }
.cr-vcol__k { color: var(--accent); font-size: .72em; }
.cr-vcol__o { color: var(--red); font-weight: 700; }
.cr-vcol__o.is-hidden { color: #C9C8E0; }
.cr-vcol--gap { min-width: .6em; }
.cr-vcol--punct { color: var(--muted); }
.cr-vcol.is-cur { background: var(--yellow); }
.cr-tabula { overflow: auto; }
.cr-tabula table { border-collapse: collapse; font-family: var(--mono); font-size: calc(11.5px * var(--cr-scale)); width: 100%; table-layout: fixed; }
.cr-tabula th, .cr-tabula td { text-align: center; padding: 1px 0; border: 1px solid #EFEFF6; color: #9A9AB5; }
.cr-tabula th { background: var(--panel); color: var(--ink); font-weight: 700; }
.cr-tabula tr.is-row td { background: #EEEDFF; color: var(--accent-ink); }
.cr-tabula td.is-col, .cr-tabula th.is-col { background: #FFF4D1; color: var(--amber); }
.cr-tabula td.is-hit { background: var(--red) !important; color: #FFFFFF !important; font-weight: 700; }

.cr-freq { display: flex; flex-direction: column; gap: 12px; }
.cr-chart { overflow-x: auto; }
.cr-bars { display: grid; grid-template-columns: repeat(26, minmax(24px, 1fr)); gap: 4px; min-width: 640px; }
.cr-barcol { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.cr-bar { position: relative; width: 100%; height: calc(170px * var(--cr-scale)); border-bottom: 2px solid var(--ink); }
.cr-bar__v { position: absolute; left: 12%; right: 12%; bottom: 0; background: var(--accent); border-radius: 4px 4px 0 0; transition: height .3s ease; }
.cr-bar__e { position: absolute; left: 0; right: 0; height: 0; border-top: 3px solid var(--red); transition: bottom .3s ease; }
.cr-barcol b { font-family: var(--mono); font-size: calc(17px * var(--cr-scale)); color: var(--ink); }
.cr-barcol small { font-family: var(--mono); font-size: calc(14px * var(--cr-scale)); font-weight: 700; color: var(--red); }
.cr-barcol.is-zero b { color: #C9C8E0; }
.cr-barcol input { width: 100%; max-width: 34px; text-align: center; padding: 3px 0; border: 1px solid #DCDCE8; border-radius: 6px; font-family: var(--mono); font-size: calc(16px * var(--cr-scale)); font-weight: 700; text-transform: uppercase; color: var(--green); }
.cr-barcol input.is-clash { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.cr-bar__rank { color: var(--muted) !important; font-weight: 500 !important; }
.cr-bars__legend { margin: 8px 0 0; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cr-key-v { display: inline-block; width: 14px; height: 10px; background: var(--accent); border-radius: 2px; }
.cr-key-e { display: inline-block; width: 14px; height: 0; border-top: 3px solid var(--red); }
.cr-freq input[type=range] { flex: 1 1 200px; accent-color: var(--accent); }
.cr-help { margin: 0; font-size: 14px; color: var(--muted); flex: 1 1 300px; }
.cr-out--text p { margin: 0; font-family: var(--mono); font-size: calc(17px * var(--cr-scale)); line-height: 1.6; color: var(--ink); background: var(--panel); border-radius: 12px; padding: 12px 14px; max-height: 260px; overflow: auto; }
.cr-subtext .is-known { color: var(--green); font-weight: 700; }
.cr-subtext .is-unknown { color: #A3A3BD; }

/* Kontrast für schwache Beamer, Vollbild */
.cr-proj--dark { background: #121126; border-color: #121126; color: #E8E8F5; }
.cr-proj--dark .cr-proj__bar, .cr-proj--dark .cr-keys { border-color: #2A2950; }
.cr-proj--dark .tabs button { color: #A6A6CC; }
.cr-proj--dark .tabs button[aria-selected="true"] { color: #FFFFFF; border-bottom-color: var(--yellow); }
.cr-proj--dark .cr-tool, .cr-proj--dark .cr-shift button, .cr-proj--dark .seg { background: #1E1D3D; border-color: #34336A; color: #FFFFFF; }
.cr-proj--dark .seg button { color: #A6A6CC; }
.cr-proj--dark .seg button[aria-pressed="true"] { background: var(--yellow); color: #121126; }
.cr-proj--dark .cr-input, .cr-proj--dark .cr-kw input, .cr-proj--dark select { background: #1E1D3D !important; border-color: #34336A !important; color: #FFFFFF !important; }
.cr-proj--dark .cr-line p, .cr-proj--dark .cr-vcol, .cr-proj--dark .cr-barcol b, .cr-proj--dark .cr-shift { color: #FFFFFF; }
.cr-proj--dark .cr-line--out p, .cr-proj--dark .cr-vcol__o { color: var(--yellow); }
.cr-proj--dark .cr-line span.is-cur, .cr-proj--dark .cr-vcol.is-cur { background: var(--yellow); color: #121126; }
.cr-proj--dark .cr-vcol.is-cur i { color: #121126; }
.cr-proj--dark .cr-math, .cr-proj--dark .cr-out--text p { background: #1E1D3D; color: #FFFFFF; }
.cr-proj--dark .cr-math b { color: var(--yellow); }
.cr-proj--dark .cr-shift output { color: var(--yellow); }
.cr-proj--dark .cr-bar { border-color: #FFFFFF; }
.cr-proj--dark .cr-bar__v { background: #8C89FF; }
.cr-proj--dark .cr-bar__e { border-color: var(--yellow); }
.cr-proj--dark .cr-barcol small { color: var(--yellow); }
.cr-proj--dark .cr-tabula th { background: #1E1D3D; color: #FFFFFF; }
.cr-proj--dark .cr-tabula td, .cr-proj--dark .cr-tabula th { border-color: #2A2950; color: #6E6E9A; }
.cr-proj--dark .cr-tabula tr.is-row td { background: #2A2960; color: #FFFFFF; }
.cr-proj--dark .cr-tabula td.is-col { background: #4A3D10; color: #FFE7A0; }
.cr-proj--dark .crw-outer-disc { fill: #2A2950; stroke: #FFFFFF; }
.cr-proj--dark .crw-o text { fill: #FFFFFF; }
.cr-proj--dark .crw-inner-disc { fill: #1E1D3D; stroke: #FFFFFF; }
.cr-proj--dark .crw-i text { fill: var(--yellow); }
.cr-proj--dark .crw .is-on circle { fill: var(--yellow); }
.cr-proj--dark .crw .is-on text { fill: #121126 !important; }
.cr-proj--dark .cr-all button { background: #1E1D3D; color: #FFFFFF; border-color: #2A2950; }
.cr-proj--dark .cr-label, .cr-proj--dark .cr-keys, .cr-proj--dark .cr-line small { color: #A6A6CC; }
.cr-proj--dark .linkbtn { color: var(--yellow); }
.cr-proj--fs, .cr-proj:fullscreen { position: fixed; inset: 0; z-index: 100; border-radius: 0; overflow: auto; --cr-scale: 1.25; }
.cr-proj:fullscreen { background: #FFFFFF; }
.cr-proj--dark:fullscreen { background: #121126; }

/* ---------------------------------------------------------------- Arbeitsblätter: Übersicht */
.cr-ws-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 24px; }
.cr-ws-card { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 18px; overflow: hidden; background: #FFFFFF; color: var(--body); transition: box-shadow .15s ease, border-color .15s ease; }
.cr-ws-card:hover { color: var(--body); border-color: #C9C8FF; box-shadow: 0 24px 50px -36px rgba(28, 27, 58, .5); }
.cr-ws-card__thumb { display: block; height: 250px; overflow: hidden; background: var(--panel); border-bottom: 1px solid var(--line-2); position: relative; }
.ws-sheets--thumb { position: absolute; left: 50%; top: 18px; width: 794px; transform: translateX(-50%) scale(.36); transform-origin: top center; pointer-events: none; padding: 0 !important; background: none !important; }
.cr-ws-card__text { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; }
.cr-ws-card__text b { font-family: var(--head); font-size: 20px; color: var(--ink); }
.cr-ws-card__levels { display: flex; flex-wrap: wrap; gap: 6px; }
.cr-ws-card__go { font-weight: 600; color: var(--accent); }

/* Arbeitsblatt-Seite: Auswahl und Vorschau */
.cr-ws-wrap { background: var(--panel); border-bottom: 1px solid var(--panel-line); padding-bottom: 48px; }
.cr-ws-controls { display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: flex-end; background: #FFFFFF; border: 1px solid var(--line-2); border-radius: 16px; padding: 16px 20px; margin-bottom: 20px; box-shadow: 0 20px 40px -36px rgba(28, 27, 58, .5); position: sticky; top: 8px; z-index: 5; }
.cr-ws-group { display: flex; flex-direction: column; gap: 6px; }
.cr-ws-group--checks { flex-direction: row; flex-wrap: wrap; gap: 8px; }
.cr-ws-group--checks .toggle { padding: 6px 12px; }
.cr-ws-group--print { margin-left: auto; flex-direction: row-reverse; align-items: center; gap: 14px; }
.cr-ws-group--print .linkbtn { font-size: 13.5px; color: var(--accent); }
.ws-cut { border: 0; border-top: 1.5px dashed #8A8AA0; margin: 4px 0; position: relative; }
.seg--levels button { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.2; padding: 6px 12px; }
.seg--levels small { font-weight: 500; font-size: 11.5px; color: var(--muted); }
.cr-variant { display: flex; gap: 8px; }
.cr-variant input { width: 86px; padding: 8px 10px; border: 1px solid #DCDCE8; border-radius: 10px; font-family: var(--mono); font-size: 15px; color: var(--ink); }
.cr-variant .btn { gap: 6px; }
.ws-sheets { display: flex; flex-direction: column; align-items: center; gap: 28px; }

/* ---------------------------------------------------------------- Arbeitsblatt selbst (Bildschirm: Papier; Druck: A4) */
.ws-page { width: 794px; max-width: 100%; min-height: 1123px; background: #FFFFFF; color: #111122; box-shadow: 0 2px 4px rgba(28, 27, 58, .08), 0 24px 48px -30px rgba(28, 27, 58, .5); padding: 46px 52px 40px; display: flex; flex-direction: column; gap: 14px; font-family: var(--text); font-size: 14px; line-height: 1.45; }
.ws-head { display: flex; flex-direction: column; gap: 6px; border-bottom: 2px solid #111122; padding-bottom: 10px; }
.ws-head__top { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: #55556E; }
.ws-brand { font-weight: 700; letter-spacing: .02em; }
.ws-head h2 { margin: 0; font-family: var(--head); font-size: 26px; letter-spacing: -.02em; color: #111122; }
.ws-fields { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; margin-top: 4px; }
.ws-fields span { font-size: 11px; color: #55556E; border-bottom: 1px solid #8A8AA0; padding-bottom: 14px; }
.ws-keynote { margin: 0; font-size: 12px; color: #55556E; }
.ws-body { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.ws-intro { margin: 0; }
.ws-small { margin: 0; font-size: 12.5px; color: #33334A; }
.ws-task { border: 1.5px solid #111122; border-radius: 10px; padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; break-inside: avoid; }
.ws-task h3 { margin: 0; font-family: var(--text); font-size: 14px; font-weight: 600; color: #111122; }
.ws-task h3 span { display: inline-block; background: #111122; color: #FFFFFF; border-radius: 5px; padding: 1px 7px; margin-right: 6px; font-size: 12px; font-weight: 700; }
.ws-task--math { background: #F6F6FB; }
.ws-task p { margin: 0; }
.ws-strip { display: flex; flex-direction: column; border: 1.5px solid #111122; border-radius: 6px; overflow: hidden; font-family: var(--mono); font-size: 13px; font-weight: 600; }
.ws-strip > div { display: grid; grid-template-columns: repeat(26, 1fr); }
.ws-strip > div + div { border-top: 1.5px solid #111122; background: #F0F0F8; }
.ws-strip span { text-align: center; padding: 3px 0; border-left: 1px solid #C9C9D8; }
.ws-strip span:first-child { border-left: 0; }
.ws-strip--num > div + div span { font-size: 11px; font-weight: 500; }
.ws-boxes { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.ws-word { display: inline-flex; gap: 2px; }
.ws-box { display: inline-flex; width: 21px; height: 25px; border: 1px solid #55556E; border-radius: 3px; align-items: center; justify-content: center; font-family: var(--mono); font-weight: 700; font-size: 14px; }
.ws-box--given { background: #F0F0F8; border-color: #111122; }
.ws-box--key { border-style: dashed; }
.ws-punct { font-family: var(--mono); font-weight: 700; align-self: flex-end; }
.ws-pair { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; }
.ws-pair b { font-family: var(--mono); letter-spacing: .06em; }
.ws-cipher { font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: .08em; color: #111122; word-break: break-word; }
.ws-cipher--plain { font-weight: 500; }
.ws-cipher--long { font-size: 12.5px; line-height: 1.75; letter-spacing: .05em; margin: 0; }
.ws-fill { display: flex; flex-wrap: wrap; gap: 8px 28px; font-size: 13px; font-weight: 600; }
.ws-lines { display: flex; flex-direction: column; gap: 0; }
.ws-lines span { height: 26px; border-bottom: 1px solid #8A8AA0; }
.ws-line { display: block; height: 22px; border-bottom: 1px solid #8A8AA0; margin-top: 2px; }
.ws-qs { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.ws-qs--key { gap: 6px; }
.ws-table { border-collapse: collapse; font-size: 13px; }
.ws-table th, .ws-table td { border: 1px solid #55556E; padding: 4px 10px; min-width: 52px; height: 26px; text-align: center; font-family: var(--mono); }
.ws-table th { background: #F0F0F8; font-family: var(--text); font-size: 11.5px; }
.ws-rank th, .ws-rank td { min-width: 0; width: 26px; padding: 3px 0; }
.ws-rank .ws-n { font-size: 10.5px; color: #55556E; height: 18px; }
.ws-rank .ws-guess { height: 26px; font-weight: 700; }
.ws-legend { margin: 0; font-size: 11.5px; color: #55556E; }
.ws-vgrid { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.ws-col { display: inline-flex; flex-direction: column; gap: 2px; }
.ws-col--punct { justify-content: flex-start; font-family: var(--mono); font-weight: 700; }
.ws-keyshift { display: flex; flex-wrap: wrap; gap: 6px; }
.ws-keyshift span { display: inline-flex; flex-direction: column; align-items: center; border: 1px solid #55556E; border-radius: 4px; overflow: hidden; font-family: var(--mono); }
.ws-keyshift b { padding: 2px 10px; background: #F0F0F8; }
.ws-keyshift i { height: 22px; width: 100%; border-top: 1px solid #55556E; }
.ws-secret { border: 1.5px dashed #111122; border-radius: 10px; padding: 10px 14px; }
.ws-secret b { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.ws-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ws-chart { margin: 0; }
.ws-chart figcaption { font-size: 11.5px; font-weight: 600; margin-bottom: 2px; }
.ws-chart svg { width: 100%; height: auto; font-family: var(--mono); font-size: 11px; }
.ws-bar { fill: #55556E; }
.ws-bar--mark { fill: #111122; }
.ws-grid { stroke: #DDDDE8; stroke-width: 1; }
.ws-tick { font-size: 9px; fill: #55556E; }
.ws-wheel { width: 100%; height: auto; }
.ws-wheel__disc { fill: #FFFFFF; stroke: #111122; stroke-width: .5; }
.ws-wheel__ring { fill: none; stroke: #111122; stroke-width: .3; stroke-dasharray: 1 1; }
.ws-wheel__tick { stroke: #111122; stroke-width: .25; }
.ws-wheel__l { font-family: var(--mono); font-weight: 700; font-size: 5px; text-anchor: middle; dominant-baseline: central; fill: #111122; }
.ws-wheel__n { font-family: var(--mono); font-size: 2.6px; text-anchor: middle; dominant-baseline: central; fill: #55556E; }
.ws-wheel__dot { fill: #111122; }
.ws-tabula { border-collapse: collapse; font-family: var(--mono); font-size: 11.5px; margin: 0 auto; }
.ws-tabula th, .ws-tabula td { width: 24px; height: 24px; text-align: center; border: 1px solid #B9B9CC; padding: 0; }
.ws-tabula th { background: #E6E6F0; font-weight: 700; }
.ws-tabula tbody tr:nth-child(odd) td { background: #F7F7FB; }
.ws-key { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ws-key > div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; border-bottom: 1px solid #DDDDE8; padding-bottom: 8px; }
.ws-key dt { font-weight: 700; }
.ws-key > .ws-key__full { grid-template-columns: 1fr; }
.ws-key dd { margin: 0; font-size: 13px; word-break: break-word; }
.ws-key b { font-family: var(--mono); }
.ws-key .ws-full { font-size: 12px; }
.ws-key .ws-full b { font-family: var(--text); }
.ws-mono { font-family: var(--mono); font-size: 12.5px; }
.ws-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid #C9C9D8; font-size: 10.5px; color: #55556E; }
.ws--no-key .ws-page--key, .ws--no-extra .ws-page--extra { display: none; }
@media screen and (max-width: 860px) {
  .ws-sheets:not(.ws-sheets--thumb) .ws-page { min-height: 0; padding: 22px 18px; }
  .ws-charts { grid-template-columns: 1fr; }
  .ws-fields { grid-template-columns: 1fr; }
  .ws-table th, .ws-table td { min-width: 0; padding: 4px 5px; }
  .ws-pair { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------------------------------------------------------------- Challenges */
.cr-missions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 24px; }
.cr-mission { display: flex; flex-direction: column; gap: 12px; border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; background: #FFFFFF; }
.cr-mission__meta { font-size: 13px; font-weight: 600; color: var(--muted); }
.cr-mission h3 { margin: 0; font-family: var(--head); font-size: 24px; letter-spacing: -.02em; }
.cr-mission p { margin: 0; }
.cr-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cr-chips li { background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; font-weight: 600; }
.cr-mission__act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.cr-builder { display: flex; flex-direction: column; gap: 16px; background: #FFFFFF; border: 1px solid var(--line-2); border-radius: 18px; padding: 24px; box-shadow: 0 30px 60px -44px rgba(28, 27, 58, .45); }
.cr-field { display: flex; flex-direction: column; gap: 5px; flex: 1 1 220px; min-width: 0; }
.cr-field span { font-size: 13px; font-weight: 600; color: var(--ink); }
.cr-field input, .cr-field textarea, .cr-field select { width: 100%; padding: 9px 12px; border: 1px solid #DCDCE8; border-radius: 10px; background: #FFFFFF; color: var(--ink); font-size: 15px; }
.cr-field textarea { font-family: var(--mono); resize: vertical; }
.cr-field input:focus, .cr-field textarea:focus, .cr-field select:focus { outline: 3px solid #D9D8FF; border-color: var(--accent); }
.cr-field--key { flex: 0 1 200px; }
.cr-field--key input { font-family: var(--mono); }
.cr-stages { display: flex; flex-direction: column; gap: 14px; }
.cr-bstage { position: relative; border: 1px solid var(--panel-line); background: var(--panel); border-radius: 14px; padding: 14px 18px 16px; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cr-bstage legend { font-family: var(--head); font-weight: 700; color: var(--ink); background: var(--accent); color: #FFFFFF; border-radius: 999px; padding: 2px 12px; font-size: 14px; }
.cr-bstage__rm { position: absolute; right: 16px; top: 8px; font-size: 13px; }
.cr-bstage__row { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-end; }
.cr-bstage__q summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--accent); }
.cr-bstage__q[open] summary { margin-bottom: 8px; }
.cr-builder__foot { display: flex; gap: 10px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
.cr-result { display: flex; flex-direction: column; gap: 14px; }
.cr-linkbox { border: 2px solid var(--green); border-radius: 14px; padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; background: #F4FCF8; }
.cr-linkbox--key { border-color: var(--ink); background: #FFFFFF; }
.cr-linkbox h3 { margin: 0; font-family: var(--head); font-size: 18px; color: var(--ink); }
.cr-linkbox p { margin: 0; font-size: 14px; }
.cr-linkbox__row { display: flex; gap: 8px; }
.cr-linkbox__row input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid #DCDCE8; border-radius: 10px; font-family: var(--mono); font-size: 13px; color: var(--ink); background: #FFFFFF; }
.cr-qr { background: #FFFFFF; padding: 12px; border-radius: 12px; align-self: flex-start; }
.cr-qr svg { width: min(360px, 80vw); height: auto; }

/* Spielen */
.cr-play-wrap { background: var(--panel); border-bottom: 1px solid var(--panel-line); padding: 28px 0 56px; }
.cr-play { display: flex; flex-direction: column; gap: 20px; max-width: 900px !important; }
.cr-lead { margin: 0; font-size: 17px; }
.cr-empty { background: #FFFFFF; border: 1px dashed var(--line-2); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.cr-empty p { margin: 0; }
.cr-progress { display: flex; align-items: center; gap: 12px; position: sticky; top: 8px; z-index: 5; background: #FFFFFF; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 16px; }
.cr-progress__bar { flex: 1; height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.cr-progress__bar i { display: block; height: 100%; width: 0; background: var(--green); border-radius: 999px; transition: width .5s cubic-bezier(.2, .7, .2, 1); }
.cr-progress span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); font-size: 14px; }
.cr-stage { background: #FFFFFF; border: 1px solid var(--line-2); border-radius: 18px; padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; scroll-margin-top: 70px; transition: opacity .3s ease, border-color .3s ease; }
.cr-stage > p { margin: 0; }
.cr-stage__head { display: flex; align-items: center; gap: 14px; }
.cr-stage__head h2 { margin: 0; font-family: var(--head); font-size: 21px; letter-spacing: -.02em; color: var(--ink); }
.cr-stage__n { display: inline-flex; flex: none; width: 38px; height: 38px; border-radius: 12px; align-items: center; justify-content: center; background: var(--accent); color: #FFFFFF; font-family: var(--head); font-weight: 700; font-size: 18px; }
.cr-stage__method { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.cr-stage__state { margin-left: auto; font-weight: 700; color: var(--green); white-space: nowrap; }
.cr-stage__keys { display: flex; flex-wrap: wrap; gap: 8px; }
.cr-keychip { background: var(--amber-soft); color: var(--amber); border-radius: 8px; padding: 4px 10px; font-size: 14px; }
.cr-keychip b { font-family: var(--mono); letter-spacing: .05em; }
.cr-cipher { font-family: var(--mono); font-weight: 600; font-size: 22px; letter-spacing: .08em; line-height: 1.5; color: var(--red); background: #FFF8F5; border: 1px solid #FBE0D6; border-radius: 12px; padding: 12px 16px; word-break: break-word; }
.cr-cipher--long { font-size: 15.5px; line-height: 1.75; letter-spacing: .05em; }
.cr-stage__tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: -4px; }
.cr-stage__crack { font-size: 14px; font-weight: 600; color: var(--accent); }
.cr-hint summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--amber); }
.cr-hint p { margin: 6px 0 0; background: var(--amber-soft); border-radius: 10px; padding: 8px 12px; font-size: 15px; }
.cr-answer { display: flex; flex-direction: column; gap: 6px; }
.cr-answer label, .cr-proof label { font-size: 14px; font-weight: 600; color: var(--ink); }
.cr-answer__row { display: flex; gap: 8px; align-items: stretch; }
.cr-answer__row input, .cr-answer__row textarea { flex: 1; min-width: 0; padding: 9px 12px; border: 1px solid #DCDCE8; border-radius: 10px; font-family: var(--mono); font-size: 16px; color: var(--ink); resize: vertical; }
.cr-answer__row input:focus, .cr-answer__row textarea:focus { outline: 3px solid #D9D8FF; border-color: var(--accent); }
.cr-feedback { margin: 0; min-height: 1.4em; font-size: 15px; font-weight: 600; }
.cr-feedback.is-ok { color: var(--green); }
.cr-feedback.is-no { color: var(--red); }
.cr-stage.is-solved { border-color: #9FE3C4; }
.cr-stage.is-solved .cr-stage__n { background: var(--green); }
.cr-stage.is-locked { opacity: .55; }
.cr-stage.is-locked .cr-cipher { filter: blur(5px); user-select: none; }
.cr-stage.is-locked .cr-stage__tools, .cr-stage.is-locked .cr-hint { visibility: hidden; }
.cr-stage.is-shake { animation: cr-shake .4s ease; }
@keyframes cr-shake { 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
.cr-finish { background: #FFFFFF; border: 2px solid var(--green); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.cr-finish:not([hidden]) { animation: cr-pop .6s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes cr-pop { from { opacity: 0; transform: scale(.94); } }
.cr-finish .art { width: 150px; height: auto; }
.cr-finish h2 { margin: 0; font-family: var(--head); font-size: 30px; color: var(--ink); }
.cr-finish p { margin: 0; }
.cr-proof { display: flex; flex-direction: column; gap: 6px; width: min(440px, 100%); text-align: left; }
.cr-code { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--ink); color: #FFFFFF; border-radius: 16px; padding: 14px 28px; }
.cr-code small { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #B9B7FF; }
.cr-code b { font-family: var(--mono); font-size: 40px; letter-spacing: .12em; color: var(--yellow); }
.cr-code span { font-size: 13px; color: #D5D4E6; }

/* Lösungsblatt */
.cr-key-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.cr-verify { background: #FFFFFF; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.cr-verify h2 { margin: 0; font-family: var(--head); font-size: 19px; color: var(--ink); }
.cr-verify p { margin: 0; font-size: 14px; }
.cr-verify__row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.cr-keysheet { display: flex; flex-direction: column; gap: 16px; }
.cr-keystage { background: #FFFFFF; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 22px; break-inside: avoid; }
.cr-keystage h2 { margin: 0 0 10px; display: flex; align-items: center; gap: 10px; font-family: var(--head); font-size: 19px; color: var(--ink); }
.cr-keystage h2 small { font-family: var(--text); font-size: 13px; font-weight: 600; color: var(--muted); }
.cr-keystage dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.cr-keystage dl > div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; }
.cr-keystage dt { font-size: 13px; font-weight: 700; color: var(--muted); }
.cr-keystage dd { margin: 0; word-break: break-word; }
.cr-keysheet__x { font-size: 13px; color: var(--red); }
.cr-play-wrap > .wrap > .cr-linkbox { margin-bottom: 20px; }

@media (max-width: 960px) {
  .cr-caesar, .cr-vig { grid-template-columns: minmax(0, 1fr); }
  .cr-wheel { max-width: 340px; margin: 0 auto; }
  .cr-ws-controls { position: static; }
  .cr-ws-group--print { margin-left: 0; align-items: flex-start; }
}
@media (max-width: 600px) {
  .cr-wheel { max-width: 260px; }
  .cr-panel { padding: 16px 14px; }
  .cr-line p { font-size: 22px; }
  .cr-answer__row { flex-direction: column; }
  .cr-keystage dl > div { grid-template-columns: 1fr; gap: 2px; }
  .cr-cipher { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .crw-inner, .cr-bar__v, .cr-bar__e, .cr-progress__bar i { transition: none; }
  .cr-stage.is-shake, .cr-finish:not([hidden]) { animation: none; }
}

/* ---------------------------------------------------------------- Druck */
@media print {
  @page { margin: 11mm 12mm; }
  body.cr-print-ws > *:not(main), body.cr-print-ws main > *:not(.cr-ws-wrap), body.cr-print-ws .cr-ws-controls { display: none !important; }
  body.cr-print-ws .cr-ws-wrap { background: none; border: 0; padding: 0; }
  body.cr-print-ws .cr-ws-wrap > .wrap { padding: 0; max-width: none; }
  body.cr-print-ws .ws-sheets { display: block; }
  .ws-page { width: auto; min-height: 0; box-shadow: none; padding: 0; break-after: page; page-break-after: always; font-size: 10.5pt; }
  .ws-page:last-child { break-after: auto; page-break-after: auto; }
  .ws-page { gap: 10px; }
  .ws-body { gap: 9px; }
  .ws-task { padding: 8px 12px 10px; gap: 6px; }
  .ws-head { padding-bottom: 6px; }
  .ws-fields span { padding-bottom: 10px; }
  .ws-lines span { height: 22px; }
  .ws-line { height: 19px; }
  .ws-page { font-size: 10pt; }
  .ws-qs { gap: 5px; }
  .ws-head h2 { font-size: 22px; }
  .ws-wheel { max-height: 98mm; width: auto; margin: 0 auto; }
  .ws-tabula th, .ws-tabula td { width: 22px; height: 22px; }
  .ws-task--math, .ws-strip > div + div, .ws-box--given, .ws-table th, .ws-tabula th, .ws-tabula tbody tr:nth-child(odd) td, .ws-keyshift b { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body.cr-print-key > *:not(main), body.cr-print-key main > .cr-hero .lang-switch, body.cr-print-key .cr-key-actions, body.cr-print-key .cr-verify, body.cr-print-key [data-student-link], body.cr-print-key .share, body.cr-print-key .page-hero__art { display: none !important; }
  body.cr-print-key .cr-play-wrap, body.cr-print-key .page-hero { background: none; border: 0; padding: 0; }
  body.cr-print-key .cr-keystage { border-color: #999; }
}
.cr-proj--dark .cr-subtext .is-known { color: var(--yellow); }
.cr-proj--dark .cr-subtext .is-unknown { color: #6E6E9A; }
.cr-proj--dark .cr-key-e { border-color: var(--yellow); }
.cr-proj--dark .cr-key-v { background: #8C89FF; }
