/* Theory library: scoped styles, no changes to existing games or teacher tools */
.theory-lib{max-width:1050px}.theory-head{margin-bottom:17px}.theory-tools{background:#fff;border:1px solid var(--line);border-radius:14px;padding:18px;display:grid;gap:10px}.theory-label{font-weight:700;font-size:13px}.theory-searchbox{display:flex;align-items:center;gap:10px;border:1px solid #aebfcf;border-radius:10px;padding:0 12px;background:#fff}.theory-searchbox:focus-within{outline:2px solid #227fba;outline-offset:1px}.theory-searchbox>span{font-size:28px;line-height:1;color:#567d96}.theory-searchbox input{width:100%;border:0;outline:0;padding:12px 0;font:inherit;min-width:0}.theory-searchbox button{background:none;border:0;color:#4c6275;font-size:21px;cursor:pointer}.theory-toolrow{display:flex;align-items:center;gap:9px;flex-wrap:wrap}.theory-toolrow label{font-size:12px;color:var(--muted)}.theory-toolrow select{border:1px solid var(--line);border-radius:8px;background:#f8fafc;padding:8px 11px;color:var(--ink);font:inherit;font-size:12px;max-width:100%}.theory-count{margin-left:auto;font-size:11px;color:var(--muted)}.theory-teacher-actions{background:#edf6fb;border:1px solid #cbdfe9;border-radius:12px;margin-top:13px;padding:13px 16px;display:flex;align-items:center;justify-content:space-between;gap:16px}.theory-teacher-actions strong{font-size:13px;display:block}.theory-teacher-actions small{display:block;font-size:11px;color:#576d7e;margin-top:3px}.theory-teacher-actions a{flex:none;background:#fff;border:1px solid #7babc3;padding:8px 11px;border-radius:8px;text-decoration:none;font-size:12px;font-weight:650}.theory-chapter{margin-top:22px}.theory-chapter h2{display:flex;align-items:center;gap:9px;font-size:16px;margin:0 0 10px}.theory-chapterno{display:grid;place-items:center;min-width:30px;height:30px;border-radius:8px;background:#e3eff8;color:#236f9b;font-size:12px}.theory-entries{display:grid;gap:7px}.theory-entry{border:1px solid var(--line);background:#fff;border-radius:10px;overflow:hidden}.theory-entry summary{cursor:pointer;padding:12px 15px;display:flex;align-items:center;justify-content:space-between;gap:12px;list-style:none}.theory-entry summary::-webkit-details-marker{display:none}.theory-title{font-size:13px;font-weight:650}.theory-open{font-size:18px;color:#7892a5;transition:transform .15s}.theory-entry[open] .theory-open{transform:rotate(180deg)}.theory-entry[open]{border-color:#97bbd0}.theory-explain{border-top:1px solid #edf1f5;padding:13px 15px}.theory-explain p{font-size:13px;line-height:1.7;margin:0 0 12px;max-width:790px}.theory-entryfoot{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.theory-entryfoot span{font-size:11px;color:var(--muted)}.theory-copy{border:1px solid var(--line);border-radius:8px;background:#f7fafc;padding:7px 10px;font:inherit;font-size:11px;cursor:pointer}.theory-copy:hover{background:#edf6fc}.theory-note{font-size:11px;color:var(--muted);margin-top:21px}.theory-empty{padding:25px;text-align:center;background:#fff;border:1px solid var(--line);border-radius:12px;color:var(--muted)}.theory-lib [hidden]{display:none!important}@media(max-width:660px){.theory-tools{padding:13px}.theory-teacher-actions{align-items:flex-start;flex-direction:column}.theory-toolrow{align-items:stretch}.theory-toolrow label{width:100%}.theory-toolrow select{flex:1}.theory-count{align-self:center}.theory-entry summary{padding:12px}}

/* V2: extended explanations and source graphics; scoped to theory only */
.theory-details{display:grid;gap:5px;margin:0 0 12px}.theory-details p{margin:0}.theory-figure{margin:14px 0 15px;max-width:680px;border:1px solid #dbe4eb;background:#fff;padding:9px;border-radius:10px}.theory-figure img{display:block;width:100%;height:auto;object-fit:contain}.theory-figure figcaption{font-size:10px;color:#617589;margin-top:6px}.theory-symbols{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0 16px}.theory-symbol{display:flex;flex-direction:column;align-items:center;justify-content:center;min-width:82px;min-height:90px;background:#f7fafc;border:1px solid #dde6ed;padding:10px;border-radius:9px;gap:8px}.theory-symbol img{width:auto;height:auto;max-width:48px;max-height:46px;object-fit:contain;image-rendering:auto}.theory-symbol small{font-size:10px;color:#385369;text-align:center}.theory-example{background:#edf6fb;padding:10px 12px;border-left:3px solid #3f88b0;border-radius:5px;max-width:760px}.theory-lib .theory-explain .theory-example{margin-bottom:13px}

/* V3: source-image zoom */
.theory-image-open{display:block;max-width:100%;overflow:auto;border-radius:5px}.theory-image-open:focus-visible{outline:2px solid #227fba;outline-offset:2px}.theory-figure img{max-height:620px;object-position:top}.theory-figure figcaption:after{content:" · Zum Vergrößern Bild anklicken"}

/* V4 – verwandte vorhandene Lernwerkzeuge */
.theory-related{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:12px 0;padding:10px 0;border-top:1px solid #dbe7ee}
.theory-related>span{font-size:11px;font-weight:600;color:#536a7c;margin-right:3px}
.theory-related a{display:inline-flex;align-items:center;border:1px solid #c8dce8;background:#eef6fb;border-radius:7px;padding:6px 9px;color:#145578;text-decoration:none;font-size:12px;font-weight:600}
.theory-related a:hover,.theory-related a:focus-visible{background:#dbedf7;text-decoration:underline}
