/* ReliMaster – Jaeger2go */

/* ---------- Grundgerüst & Schutz vor Theme-Stilen ---------- */
.j2g-rel {
	--ink: #16323d;
	--ink-soft: #4d6670;
	--bg1: #e6f2f1;
	--bg2: #f7f1e6;
	--card: #ffffff;
	--line: #dbe6e6;
	--brand: #4a2574;
	--accent: #2a9d8f;
	--ok: #23a455;
	--ok-bg: #e5f6eb;
	--bad: #d64545;
	--bad-bg: #fbe9e9;
	--warn: #e9a23b;
	--part: #2a9d8f;
	--radius: 22px;
	--shadow: 0 10px 30px rgba(15, 76, 92, .12), 0 2px 6px rgba(15, 76, 92, .08);
	--tap: 60px;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	height: min(88vh, 860px);
	min-height: 540px;
	overflow: hidden;
	border-radius: 26px;
	background: linear-gradient(160deg, var(--bg1), var(--bg2));
	color: var(--ink);
	font-family: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 17px;
	line-height: 1.4;
	text-align: left;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
	-webkit-text-size-adjust: 100%;
	user-select: none;
	-webkit-user-select: none;
	container-type: size;
}
.j2g-rel *, .j2g-rel *::before, .j2g-rel *::after { box-sizing: border-box; }
.j2g-rel button, .j2g-rel input, .j2g-rel h1, .j2g-rel h2, .j2g-rel h3, .j2g-rel p, .j2g-rel img {
	all: unset;
	box-sizing: border-box;
}
.j2g-rel h1, .j2g-rel h2, .j2g-rel h3, .j2g-rel p { display: block; }
.j2g-rel img { display: block; max-width: 100%; }
.j2g-rel button { cursor: pointer; touch-action: manipulation; text-align: center; font: inherit; color: inherit; }
.j2g-rel button:focus-visible, .j2g-rel input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.j2g-rel svg { display: block; flex: none; }

/* App-Seite, Vollbild, Ersatz-Vollbild */
.j2g-rel-body { margin: 0; background: #4a2574; overscroll-behavior: none; }
.j2g-rel[data-mode="app"] {
	position: fixed; inset: 0; height: 100dvh; min-height: 0; border-radius: 0;
	padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.j2g-rel:fullscreen { height: 100%; min-height: 0; border-radius: 0; }
.j2g-rel:-webkit-full-screen { height: 100%; min-height: 0; border-radius: 0; }
.j2g-rel.is-pseudo-fs { position: fixed; inset: 0; z-index: 2147483000; height: 100dvh; min-height: 0; border-radius: 0; }

.j2g-rel__boot { display: grid; place-items: center; height: 100%; color: var(--ink-soft); }

/* Größere Schrift auf großen Flächen */
@container (min-width: 900px) and (min-height: 640px) { .j2g-rel__app { font-size: 19px; } }
@container (max-width: 520px) { .j2g-rel__app { font-size: 16px; --tap: 54px; } }

/* ---------- Gemeinsame Bausteine ---------- */
.j2g-rel__app { position: absolute; inset: 0; display: flex; flex-direction: column; }
.j2g-rel .view { position: absolute; inset: 0; display: flex; flex-direction: column; animation: relIn .35s cubic-bezier(.2, .8, .2, 1); }
.j2g-rel .view.from-left { animation-name: relInLeft; }
@keyframes relIn { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
@keyframes relInLeft { from { opacity: 0; transform: translateX(-28px); } to { opacity: 1; transform: none; } }

.j2g-rel .btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	min-height: var(--tap); padding: 0 1.4em; border-radius: 999px;
	font-weight: 700; font-size: 1.05em; letter-spacing: .01em;
	background: var(--card); color: var(--ink); box-shadow: 0 2px 0 rgba(15, 76, 92, .12), inset 0 0 0 2px var(--line);
	transition: transform .12s, box-shadow .12s, background .2s, opacity .2s;
}
.j2g-rel .btn:active { transform: translateY(2px) scale(.98); }
.j2g-rel .btn.primary { background: var(--part); color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--part) 70%, #000); }
.j2g-rel .btn.primary:active { box-shadow: 0 1px 0 color-mix(in srgb, var(--part) 70%, #000); }
.j2g-rel .btn.ghost { background: transparent; box-shadow: inset 0 0 0 2px var(--line); }
.j2g-rel .btn[disabled] { opacity: .45; pointer-events: none; }
.j2g-rel .icon-btn {
	width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center;
	background: rgba(255, 255, 255, .7); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line);
}
.j2g-rel .icon-btn:active { transform: scale(.94); }

.j2g-rel .stars { display: inline-flex; gap: 2px; }
.j2g-rel .stars svg { width: 1.15em; height: 1.15em; }

/* ---------- Startseite ---------- */
.j2g-rel .home { padding: clamp(16px, 3.2cqh, 34px) clamp(16px, 3.5cqw, 44px); gap: clamp(12px, 2.4cqh, 24px); overflow-y: auto; }
.j2g-rel .home-head { display: flex; align-items: center; gap: 16px; }
.j2g-rel .logo { width: 64px; height: 64px; border-radius: 18px; box-shadow: var(--shadow); flex: none; }
.j2g-rel .home-title h1 { font-size: 1.9em; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.j2g-rel .home-title p { color: var(--ink-soft); margin-top: 2px; }
.j2g-rel .home-head .spacer { flex: 1; }
.j2g-rel .home-title { min-width: 0; }
@container (max-width: 600px) {
	.j2g-rel .home-head { flex-wrap: wrap; gap: 12px; }
	.j2g-rel .home-title { flex: 1 1 calc(100% - 80px); }
	.j2g-rel .home-title h1 { font-size: 1.55em; }
	.j2g-rel .home-head .spacer { flex: 1 1 0; min-width: 0; }
	.j2g-rel .user-chip { height: 44px; max-width: calc(100% - 120px); }
	.j2g-rel .user-chip { overflow: hidden; white-space: nowrap; }
	.j2g-rel .logo { width: 56px; height: 56px; }
}
.j2g-rel .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: clamp(12px, 2cqw, 20px); }
.j2g-rel .tile {
	position: relative; display: flex; flex-direction: column; align-items: stretch; gap: 10px; text-align: left;
	padding: 18px 18px 16px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow);
	overflow: hidden; transition: transform .15s;
}
.j2g-rel .tile::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--part); }
.j2g-rel .tile:active { transform: scale(.98); }
.j2g-rel .tile-top { display: flex; align-items: center; gap: 12px; }
.j2g-rel .tile-icon {
	width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; font-size: 30px;
	background: color-mix(in srgb, var(--part) 16%, #fff);
}
.j2g-rel .tile-name { font-weight: 800; font-size: 1.15em; line-height: 1.15; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
.j2g-rel .tile-top > div:last-child { min-width: 0; }
.j2g-rel .tile-sub { color: var(--ink-soft); font-size: .9em; }
.j2g-rel .badge { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: .72em; font-weight: 800; vertical-align: middle; background: var(--part); color: #fff; }
.j2g-rel .bar { height: 10px; border-radius: 999px; background: #edf2f2; overflow: hidden; }
.j2g-rel .bar > i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--part); transition: width .5s; }
.j2g-rel .tile-foot { display: flex; align-items: center; justify-content: space-between; font-size: .9em; color: var(--ink-soft); font-weight: 600; }
.j2g-rel .continue {
	display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--radius);
	background: var(--brand); color: #fff; box-shadow: var(--shadow); text-align: left;
}
.j2g-rel .continue b { display: block; font-size: 1.05em; }
.j2g-rel .continue span { opacity: .8; font-size: .9em; }
.j2g-rel .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: clamp(12px, 2cqw, 20px); }
.j2g-rel .continue.drill { background: linear-gradient(135deg, #7A5BC9, #5B3FA8); }
.j2g-rel .continue.drill[disabled] { background: #fff; color: var(--ink-soft); box-shadow: inset 0 0 0 2px var(--line); cursor: default; }
.j2g-rel .drill-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: rgba(255, 255, 255, .18); flex: none; }
.j2g-rel .continue.drill[disabled] .drill-icon { background: #f1edf9; }
.j2g-rel .continue .go { margin-left: auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .15); }
.j2g-rel .home-foot { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: space-between; color: var(--ink-soft); font-size: .88em; margin-top: auto; }
.j2g-rel .linkish { background: none; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; color: var(--ink-soft); padding: 8px 0; }

/* ---------- Kopfleiste in Teilen ---------- */
.j2g-rel .topbar { display: flex; align-items: center; gap: 12px; padding: 12px clamp(12px, 2cqw, 22px) 8px; }
.j2g-rel .topbar .title { flex: 1; min-width: 0; }
.j2g-rel .topbar .title b { display: block; font-size: 1.05em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.j2g-rel .topbar .title span { color: var(--ink-soft); font-size: .85em; font-weight: 600; }
.j2g-rel .segments { display: flex; gap: 3px; padding: 0 clamp(12px, 2cqw, 22px); }
.j2g-rel .segments i { flex: 1; height: 7px; border-radius: 4px; background: rgba(15, 76, 92, .12); transition: background .3s; }
.j2g-rel .segments i.ok { background: var(--ok); }
.j2g-rel .segments i.bad { background: var(--bad); }
.j2g-rel .segments i.cur { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- Einleitung ---------- */
.j2g-rel .intro { align-items: center; justify-content: center; text-align: center; padding: 24px; gap: 18px; }
.j2g-rel .intro .big-icon { font-size: 76px; width: 128px; height: 128px; border-radius: 36px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); }
.j2g-rel .intro h2 { font-size: 2em; font-weight: 800; letter-spacing: -.02em; text-align: center; }
.j2g-rel .intro p { max-width: 34em; color: var(--ink-soft); text-align: center; }
.j2g-rel .intro .row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- Aufgabe ---------- */
.j2g-rel .stage {
	flex: 1; min-height: 0; display: grid; gap: clamp(10px, 1.6cqw, 18px);
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	padding: 10px clamp(12px, 2cqw, 22px);
}
.j2g-rel .stage.no-media { grid-template-columns: minmax(0, 1fr); max-width: 760px; width: 100%; margin: 0 auto; }
.j2g-rel .media {
	position: relative; display: block; min-height: 0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
	overflow: hidden; cursor: zoom-in;
}
.j2g-rel .media img { position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px); max-width: none; object-fit: contain; }
.j2g-rel .media .zoom-hint { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(15, 76, 92, .75); color: #fff; }
.j2g-rel .panel {
	min-height: 0; display: flex; flex-direction: column; border-radius: var(--radius);
	background: var(--card); box-shadow: var(--shadow); overflow: hidden;
}
.j2g-rel .panel-body { flex: 1; min-height: 0; overflow-y: auto; padding: clamp(14px, 2.2cqh, 22px) clamp(14px, 2cqw, 22px); -webkit-overflow-scrolling: touch; }
.j2g-rel .q { font-size: 1.18em; font-weight: 750; line-height: 1.3; margin-bottom: .8em; }
.j2g-rel .q small { display: block; margin-top: .3em; font-size: .72em; font-weight: 600; color: var(--ink-soft); }
.j2g-rel .panel-foot { padding: 12px clamp(14px, 2cqw, 22px) 14px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; }
.j2g-rel .panel-foot .btn { flex: 1 1 0; min-width: 0; padding: 0 .8em; white-space: nowrap; }

.j2g-rel .ref {
	display: flex; align-items: center; gap: 14px; width: 100%; margin-bottom: 14px; padding: 8px; border-radius: 16px;
	background: #f4f8f8; box-shadow: inset 0 0 0 2px var(--line); text-align: left; cursor: zoom-in;
}
.j2g-rel .ref img { width: auto; height: clamp(60px, 11cqh, 100px); max-width: 40%; border-radius: 10px; flex: none; object-fit: contain; background: #fff; }
.j2g-rel .ref-label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9em; color: var(--ink-soft); }
.j2g-rel .ref-label svg { flex: none; }
.j2g-rel .ref-label small { display: block; margin-top: 3px; font-weight: 600; font-size: .9em; color: #8a5a0f; }

/* Auswahl */
.j2g-rel .opts { display: grid; gap: 10px; }
.j2g-rel .opts.many { grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.j2g-rel .opt {
	display: flex; align-items: center; gap: 12px; min-height: var(--tap); padding: 10px 14px; border-radius: 16px;
	text-align: left; font-weight: 650; background: #f4f8f8; box-shadow: inset 0 0 0 2px transparent;
	transition: background .15s, box-shadow .15s, transform .1s;
}
.j2g-rel .opt:active { transform: scale(.99); }
.j2g-rel .opt .key {
	width: 32px; height: 32px; border-radius: 10px; flex: none; display: grid; place-items: center;
	font-weight: 800; font-size: .9em; background: #fff; color: var(--ink-soft); box-shadow: inset 0 0 0 2px var(--line);
}
.j2g-rel .opt.multi .key { border-radius: 8px; }
.j2g-rel .opt.sel { background: color-mix(in srgb, var(--part) 14%, #fff); box-shadow: inset 0 0 0 2.5px var(--part); }
.j2g-rel .opt.sel .key { background: var(--part); color: #fff; box-shadow: none; }
.j2g-rel .opt.ok { background: var(--ok-bg); box-shadow: inset 0 0 0 2.5px var(--ok); }
.j2g-rel .opt.ok .key { background: var(--ok); color: #fff; box-shadow: none; }
.j2g-rel .opt.bad { background: var(--bad-bg); box-shadow: inset 0 0 0 2.5px var(--bad); }
.j2g-rel .opt.bad .key { background: var(--bad); color: #fff; box-shadow: none; }
.j2g-rel .opt.miss { box-shadow: inset 0 0 0 2.5px var(--ok); border-style: dashed; }
.j2g-rel .locked .opt { pointer-events: none; }

/* Lückentext */
.j2g-rel .lines { display: grid; gap: 8px; }
.j2g-rel .lines.compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 215px), 1fr)); gap: 10px 14px; }
.j2g-rel .lines.compact .line { flex-wrap: nowrap; }
.j2g-rel .lines.compact .lbl { flex: none; min-width: 2.2em; }
.j2g-rel .lines.compact .gap { flex: 1; min-width: 0; }
.j2g-rel .lines.compact .gap input { width: 100% !important; }
.j2g-rel .line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-weight: 600; line-height: 1.6; }
.j2g-rel .gap {
	display: inline-flex; flex-direction: column; vertical-align: middle; max-width: 100%; min-width: 0;
}
.j2g-rel .gap input {
	display: block; height: 44px; max-width: 100%; min-width: 4ch; padding: 0 12px; border-radius: 12px; background: #f4f8f8;
	box-shadow: inset 0 0 0 2px var(--line); font: inherit; font-size: 18px; font-weight: 700; color: var(--ink);
	user-select: text; -webkit-user-select: text; cursor: text; transition: box-shadow .15s, background .15s;
}
.j2g-rel .gap input:focus { background: #fff; box-shadow: inset 0 0 0 2.5px var(--part); outline: none; }
.j2g-rel .gap.ok input { background: var(--ok-bg); box-shadow: inset 0 0 0 2.5px var(--ok); }
.j2g-rel .gap.bad input { background: var(--bad-bg); box-shadow: inset 0 0 0 2.5px var(--bad); }
.j2g-rel .gap .sol { margin-top: 3px; font-size: .78em; font-weight: 800; color: var(--ok); line-height: 1.2; }
.j2g-rel .gap .typo { margin-top: 3px; font-size: .75em; font-weight: 700; color: var(--warn); line-height: 1.2; }

/* Rückmeldung */
.j2g-rel .feedback { display: none; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; font-weight: 700; }
.j2g-rel .feedback.show { display: flex; animation: pop .35s cubic-bezier(.2, 1.4, .4, 1); }
.j2g-rel .feedback.ok { background: var(--ok-bg); color: #13703a; }
.j2g-rel .feedback.bad { background: var(--bad-bg); color: #a42d2d; }
.j2g-rel .feedback.part { background: #fdf3e2; color: #8a5a0f; }
.j2g-rel .feedback .fi { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; }
.j2g-rel .feedback.ok .fi { background: var(--ok); }
.j2g-rel .feedback.bad .fi { background: var(--bad); }
.j2g-rel .feedback.part .fi { background: var(--warn); }
.j2g-rel .feedback small { display: block; font-weight: 600; opacity: .85; }
@keyframes pop { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.j2g-rel .shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Untere Navigation */
.j2g-rel .navbar { display: flex; align-items: center; gap: 12px; padding: 8px clamp(12px, 2cqw, 22px) 14px; }
.j2g-rel .nav {
	width: 76px; height: 64px; border-radius: 20px; display: grid; place-items: center;
	background: var(--card); box-shadow: var(--shadow); color: var(--ink);
}
.j2g-rel .nav:active { transform: scale(.95); }
.j2g-rel .nav[disabled] { opacity: .35; pointer-events: none; }
.j2g-rel .nav svg { width: 30px; height: 30px; }
.j2g-rel .navbar .counter { flex: 1; text-align: center; font-weight: 800; color: var(--ink-soft); }

/* Hochformat (wird per JS gesetzt) */
.j2g-rel.is-portrait .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, .9fr) minmax(0, 1.1fr); }
.j2g-rel.is-portrait .stage.no-media { grid-template-rows: minmax(0, 1fr); }

/* ---------- Ergebnis ---------- */
.j2g-rel .result { align-items: center; padding: 18px; gap: 14px; overflow-y: auto; }
.j2g-rel .result-card { width: min(640px, 100%); background: var(--card); border-radius: 28px; box-shadow: var(--shadow); padding: 26px 22px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.j2g-rel .ring { position: relative; width: 150px; height: 150px; }
.j2g-rel .ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.j2g-rel .ring .val { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.1em; font-weight: 800; }
.j2g-rel .result-card h2 { font-size: 1.6em; font-weight: 800; text-align: center; }
.j2g-rel .result-card p { color: var(--ink-soft); text-align: center; }
.j2g-rel .result-card .stars svg { width: 2.2em; height: 2.2em; }
.j2g-rel .result .row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; width: min(640px, 100%); }
.j2g-rel .result .row .btn { flex: 1 1 auto; white-space: nowrap; }
.j2g-rel .mistakes { width: min(640px, 100%); display: grid; gap: 8px; }
.j2g-rel .mistakes h3 { font-weight: 800; margin: 6px 4px 2px; }
.j2g-rel .mistake { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; background: var(--card); box-shadow: 0 2px 8px rgba(15, 76, 92, .08); text-align: left; font-weight: 600; }
.j2g-rel .mistake .n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bad-bg); color: var(--bad); font-weight: 800; flex: none; }

/* ---------- Lupe / Dialog ---------- */
.j2g-rel .overlay { position: absolute; inset: 0; z-index: 20; background: rgba(10, 30, 38, .86); display: grid; place-items: center; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.j2g-rel .overlay .zoom-wrap { width: 100%; height: 100%; overflow: hidden; touch-action: none; display: grid; place-items: center; }
.j2g-rel .overlay img { max-width: 96%; max-height: 92%; object-fit: contain; border-radius: 12px; background: #fff; transform-origin: 0 0; }
.j2g-rel .overlay .close { position: absolute; top: 14px; right: 14px; width: 56px; height: 56px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--ink); }
.j2g-rel .overlay .hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: rgba(255, 255, 255, .8); font-weight: 600; font-size: .9em; }
.j2g-rel .dialog { width: min(440px, 92%); background: #fff; border-radius: 24px; padding: 24px; display: grid; gap: 14px; box-shadow: var(--shadow); animation: pop .25s; }
.j2g-rel .dialog h3 { font-size: 1.25em; font-weight: 800; }
.j2g-rel .dialog p { color: var(--ink-soft); }
.j2g-rel .dialog .row { display: flex; gap: 10px; }
.j2g-rel .dialog .row .btn { flex: 1; }
.j2g-rel .btn.danger { background: var(--bad); color: #fff; box-shadow: 0 4px 0 #9b2c2c; }

/* Anmeldung */
.j2g-rel .login { overflow-y: auto; }
.j2g-rel .login .logo { width: 84px; height: 84px; border-radius: 24px; }
.j2g-rel .login-form { width: min(380px, 100%); display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; text-align: left; }
.j2g-rel .login-form > *, .j2g-rel .login-form label > * { min-width: 0; }
.j2g-rel .login-form input { width: 100%; }
.j2g-rel .login { padding: 20px 16px; }
.j2g-rel .login-form label { display: grid; gap: 6px; font-weight: 700; color: var(--ink-soft); font-size: .92em; }
.j2g-rel .login-form input {
	height: 54px; padding: 0 16px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px var(--line);
	font: inherit; font-size: 20px; font-weight: 700; color: var(--ink); user-select: text; -webkit-user-select: text;
}
.j2g-rel .login-form input:focus { outline: none; box-shadow: inset 0 0 0 2.5px var(--part); }
.j2g-rel .pin-boxes { display: grid; grid-template-columns: repeat(4, minmax(0, 64px)); gap: 12px; margin-top: -6px; }
.j2g-rel .login-form .pin-box { height: 64px; padding: 0; text-align: center; font-size: 28px; -webkit-text-security: disc; caret-color: var(--part); }
.j2g-rel .login-form .pin-box:not(:placeholder-shown) { background: color-mix(in srgb, var(--part) 8%, #fff); }
.j2g-rel .login-form .feedback { margin: 0; }
.j2g-rel .login-hint { font-size: .85em; color: var(--ink-soft); margin: -4px 0 0; text-align: left !important; }
.j2g-rel .user-chip {
	display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: 16px;
	background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1.5px var(--line); font-weight: 700; margin-right: 8px;
}
.j2g-rel .user-chip small { font-weight: 600; color: var(--ink-soft); font-size: .78em; }
.j2g-rel .user-chip .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); }
.j2g-rel .user-chip .dot.off { background: var(--warn); }

/* Konfetti */
.j2g-rel canvas.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }

@media (prefers-reduced-motion: reduce) {
	.j2g-rel *, .j2g-rel *::before, .j2g-rel *::after { animation: none !important; transition: none !important; }
}

/* ---------- Infotafel ---------- */
.j2g-rel .learn-wrap { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 2px 8px; }
.j2g-rel .learn-card { max-width: 820px; margin: 0 auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(16px, 2.6cqw, 28px); border-top: 6px solid var(--part); }
.j2g-rel .learn-card h3 { font-size: 1.45em; font-weight: 800; letter-spacing: -.01em; margin: 0 0 .6em; }
.j2g-rel .learn-body { line-height: 1.5; }
.j2g-rel .learn-body p { margin: .55em 0; }
.j2g-rel .learn-body ul, .j2g-rel .learn-body ol { margin: .4em 0 .6em; padding-left: 1.4em; }
.j2g-rel .learn-body li { margin: .25em 0; }
.j2g-rel .learn-body b { color: var(--ink); }
.j2g-rel .learn-body table.it { width: 100%; border-collapse: collapse; margin: .6em 0; font-size: .95em; }
.j2g-rel .learn-body table.it th, .j2g-rel .learn-body table.it td { border: 1px solid var(--line); padding: .45em .6em; text-align: left; vertical-align: top; }
.j2g-rel .learn-body table.it th { background: color-mix(in srgb, var(--part) 14%, #fff); font-weight: 700; }
.j2g-rel .learn-body table.it tr:nth-child(even) td { background: #fafbfb; }
.j2g-rel .learn-body .merk { margin: .8em 0 .2em; padding: .75em 1em; border-radius: 14px; background: color-mix(in srgb, var(--part) 12%, #fff); border-left: 5px solid var(--part); }
.j2g-rel .learn-body .steps { display: grid; gap: .5em; margin: .6em 0; }
.j2g-rel .learn-body .steps > div { padding: .55em .8em; border-radius: 12px; background: #f6f7f8; }
.j2g-rel .learn-body .steps.num > div > b:first-child { display: inline-grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--part); color: #fff; margin-right: .5em; }
.j2g-rel .learn-body .kreis { padding: .6em .9em; border-radius: 14px; margin: .5em 0; }
.j2g-rel .learn-body .kreis ol { margin: .3em 0 0; columns: 2; column-gap: 2em; }
.j2g-rel .learn-body .k-w { background: #F8EBCF; } .j2g-rel .learn-body .k-o { background: #E6EFD9; } .j2g-rel .learn-body .k-j { background: #DDE9F3; }
.j2g-rel .learn-body .chip { display: inline-block; padding: .1em .65em; border-radius: 99px; font-weight: 700; font-size: .92em; border: 1.5px solid rgba(0,0,0,.25); white-space: nowrap; }
.j2g-rel .chip.c-violett { background: #7B4FA6; color: #fff; } .j2g-rel .chip.c-weiß { background: #fff; color: #222; }
.j2g-rel .chip.c-rot { background: #D8443A; color: #fff; } .j2g-rel .chip.c-grün { background: #3E9A4A; color: #fff; } .j2g-rel .chip.c-schwarz { background: #222; color: #fff; }
.j2g-rel .learn-img { display: block; width: 100%; padding: 0; margin: 0 0 .6em; background: none; position: relative; border-radius: 14px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.j2g-rel .learn-img img { display: block; width: 100%; max-height: 62vh; object-fit: contain; background: #fff; }
.j2g-rel .learn-img .zoom-hint { position: absolute; right: 10px; bottom: 10px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(15, 76, 92, .75); color: #fff; }
.j2g-rel .learn-foot { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.1em; }
.j2g-rel .learn-foot .btn { flex: 1 1 200px; }
.j2g-rel .intro .btn.learnbtn { background: #fff; }
@media (max-width: 560px) { .j2g-rel .learn-body .kreis ol { columns: 1; } .j2g-rel .learn-body table.it { font-size: .88em; } }

.j2g-rel .learn-body .xi { background: #FFF1B8; border-radius: 4px; padding: 0 .15em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.j2g-rel .learn-body .extra { position: relative; background: #FFF8D6 !important; border: 2px dashed #E0B400 !important; border-radius: 14px; padding: 1.9em .8em .6em; margin: .7em 0; }
.j2g-rel .learn-body .merk.extra { border-left: 2px dashed #E0B400 !important; padding-top: 2em; }
.j2g-rel .learn-body .extra::before { content: "💡 Merkhilfe – nicht aus dem Unterricht"; position: absolute; top: .45em; left: .8em; font-size: .78em; font-weight: 800; color: #8a6d00; letter-spacing: .01em; }
.j2g-rel .learn-body .extra .steps > div { background: rgba(255,255,255,.7); }
.j2g-rel .xlegend { font-size: .82em; color: var(--ink-soft); margin: .8em 0 0; }
.j2g-rel .xlegend .xi { background: #FFF1B8; border-radius: 4px; padding: 0 .3em; }

/* ---------- Bonus-Spiele ---------- */
.j2g-rel .btn.gamebtn { background: linear-gradient(135deg, #F2C14E, #E9A23B); color: #3b2a00; box-shadow: 0 3px 0 #b97c12; }
.j2g-rel .btn.locked { opacity: .7; }
.j2g-rel .intro .how { font-size: .95em; }
.j2g-rel .best { font-weight: 700; color: var(--ink); display: flex; align-items: center; gap: .4em; justify-content: center; flex-wrap: wrap; }
.j2g-rel .game { display: flex; flex-direction: column; }
.j2g-rel .game-hud { display: flex; justify-content: space-between; font-weight: 800; padding: 2px 6px 8px; font-variant-numeric: tabular-nums; }
.j2g-rel .game-area { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; max-width: 900px; width: 100%; margin: 0 auto; padding: 2px 2px 12px; position: relative; }
.j2g-rel .gfloat { position: absolute; left: 50%; top: -6px; transform: translateX(-50%); font-weight: 900; pointer-events: none; animation: gfloat .9s ease-out forwards; white-space: nowrap; z-index: 5; }
.j2g-rel .gfloat.ok { color: #2a9d5c; } .j2g-rel .gfloat.bad { color: #d1495b; }
@keyframes gfloat { from { opacity: 1; transform: translate(-50%, 0); } to { opacity: 0; transform: translate(-50%, -34px); } }
/* Reihenfolge */
.j2g-rel .track { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.j2g-rel .track .slot { min-width: 2.2em; height: 2.2em; padding: 0 .5em; display: inline-grid; place-items: center; border-radius: 99px; border: 2px dashed var(--line); color: var(--ink-soft); font-weight: 800; font-size: .9em; }
.j2g-rel .track .slot.on { border: 2px solid var(--part); background: color-mix(in srgb, var(--part) 16%, #fff); color: var(--ink); animation: pop .25s; }
.j2g-rel .track:not(.long) { flex-direction: column; } .j2g-rel .track:not(.long) .slot { justify-content: start; border-radius: 12px; min-height: 2.4em; height: auto; padding: .3em .8em; text-align: left; }
.j2g-rel .pool { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 10px; }
.j2g-rel .pool.long { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.j2g-rel .gcard { position: relative; padding: .8em .7em; border-radius: 16px; background: #fff; box-shadow: 0 3px 0 rgba(0,0,0,.08), inset 0 0 0 2px var(--line); font-weight: 700; color: var(--ink); min-height: 3.2em; line-height: 1.25; transition: transform .1s, opacity .2s; }
.j2g-rel .gcard:active { transform: scale(.96); }
.j2g-rel .gcard.done { opacity: .18; box-shadow: none; }
/* Körbe */
.j2g-rel .sort-top { display: flex; align-items: center; gap: 12px; }
.j2g-rel .sort-prog { flex: 1; height: 10px; border-radius: 99px; background: #e6ecec; overflow: hidden; }
.j2g-rel .sort-prog i { display: block; height: 100%; background: var(--part); transition: width .3s; }
.j2g-rel .combo { font-weight: 800; min-width: 6em; text-align: right; }
.j2g-rel .sort-card-wrap { flex: 1; display: grid; place-items: center; min-height: 150px; }
.j2g-rel .sort-card { position: relative; max-width: 560px; width: 100%; padding: 1.3em 1.2em; border-radius: 22px; background: #fff; box-shadow: var(--shadow), inset 0 0 0 3px var(--part); font-size: 1.35em; font-weight: 800; text-align: center; line-height: 1.3; }
.j2g-rel .sort-card small { display: block; font-size: .62em; font-weight: 700; margin-top: .6em; color: #8a2d3a; }
.j2g-rel .sort-card.in { animation: pop .25s; }
.j2g-rel .sort-card.fly { transition: transform .25s, opacity .25s; transform: translateY(60px) scale(.6); opacity: 0; }
.j2g-rel .bins { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.j2g-rel .bin { position: relative; min-height: 4.2em; border-radius: 18px; background: #fff; font-weight: 800; font-size: 1.05em; color: var(--ink); box-shadow: 0 4px 0 color-mix(in srgb, var(--part) 55%, #000), inset 0 0 0 3px var(--part); padding: .4em; }
.j2g-rel .bin::before { content: '🧺'; display: block; font-size: 1.1em; }
.j2g-rel .bin.colored { background: var(--bin); color: var(--bin-ink); box-shadow: 0 4px 0 rgba(0,0,0,.35), inset 0 0 0 2px rgba(0,0,0,.25); }
.j2g-rel .bin.colored::before { content: ''; }
.j2g-rel .bin:active { transform: translateY(3px); }
.j2g-rel .bin.hint { animation: hint .9s; }
@keyframes hint { 0%, 100% { outline: 0 solid #2a9d5c; } 30%, 70% { outline: 5px solid #2a9d5c; outline-offset: 3px; } }
/* Memory */
.j2g-rel .mem { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.j2g-rel .mcard { position: relative; aspect-ratio: 4 / 3; border-radius: 16px; perspective: 600px; background: none; padding: 0; }
.j2g-rel .mcard > span { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 16px; backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .35s; padding: .4em; text-align: center; font-weight: 800; line-height: 1.2; font-size: clamp(.72em, 1.9cqw, 1em); }
.j2g-rel .mcard .back { background: var(--part); color: rgba(255,255,255,.85); font-size: 2em; box-shadow: 0 4px 0 rgba(0,0,0,.18); }
.j2g-rel .mcard .front { background: #fff; color: var(--ink); transform: rotateY(180deg); box-shadow: inset 0 0 0 3px var(--part); }
.j2g-rel .mcard .front.b { background: color-mix(in srgb, var(--part) 12%, #fff); font-weight: 700; }
.j2g-rel .mcard.up .back { transform: rotateY(180deg); } .j2g-rel .mcard.up .front { transform: rotateY(360deg); }
.j2g-rel .mcard.match .front { box-shadow: inset 0 0 0 3px #2a9d5c; background: #e7f6ec; }
@media (max-width: 560px) { .j2g-rel .mem { grid-template-columns: repeat(3, 1fr); } .j2g-rel .mcard { aspect-ratio: 1; } }
/* Blitz */
.j2g-rel .blitz-time { height: 12px; border-radius: 99px; background: #e6ecec; overflow: hidden; }
.j2g-rel .blitz-time i { display: block; height: 100%; background: linear-gradient(90deg, #d1495b, #E9A23B, #2a9d5c); transition: width 1s linear; }
.j2g-rel .blitz-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.j2g-rel .blitz-btns .btn { min-height: 3.6em; font-size: 1.1em; }
.j2g-rel .blitz-btns .bno { background: #d1495b; color: #fff; } .j2g-rel .blitz-btns .byes { background: #2a9d5c; color: #fff; }
.j2g-rel .round-done { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(255,255,255,.75); z-index: 20; animation: fade .2s; }
.j2g-rel .round-done > div { background: #fff; padding: 24px 28px; border-radius: var(--radius); box-shadow: var(--shadow); display: grid; gap: 10px; text-align: center; }
.j2g-rel .round-done b { font-size: 1.4em; }
.j2g-rel .result .big-icon { font-size: 60px; }
