.ng-page { padding-top: 1.2rem; padding-bottom: 3rem; }
.ng-preview { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: #fde047; border: 1px solid rgba(253,224,71,.5); border-radius: 999px; padding: .2rem .7rem; margin-bottom: .8rem; }
.ng-title { color: #fff; font-size: 1.35rem; margin: 0 0 .4rem; }
.ng-lage { color: var(--text2); font-size: .9rem; line-height: 1.6; margin: 0 0 1rem; }
.ng-wrap { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: #fff; line-height: 0; }
.ng-wrap svg { display: block; width: 100%; height: auto; }
.ng-step.ng-old { opacity: .55; }
.ng-fade { opacity: 0; transition: opacity .6s ease .5s; }
.ng-fade.in { opacity: 1; }
.ng-step.ng-old .ng-fade { opacity: 1; transition: none; }

/* Knöpfe unten links in der Karte, Neonstil wie bei den Ausweichregeln */
.ng-ov { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 5px; z-index: 3; line-height: 1; }
.ng-b { font: inherit; font-size: .74rem; font-weight: 800; padding: .32rem .7rem; border-radius: 999px; cursor: pointer; white-space: nowrap;
  border: 1.5px solid #39ff14; color: #39ff14; background: rgba(4,14,8,.9); text-shadow: 0 0 6px rgba(57,255,20,.75); box-shadow: 0 0 9px rgba(57,255,20,.55), inset 0 0 6px rgba(57,255,20,.22); }
.ng-b:hover { background: #39ff14; color: #04140a; text-shadow: none; }
.ng-b.sec { border-color: #00e5ff; color: #00e5ff; text-shadow: 0 0 5px rgba(0,229,255,.6); box-shadow: 0 0 6px rgba(0,229,255,.4), inset 0 0 5px rgba(0,229,255,.18); }
.ng-b.sec:hover { background: #00e5ff; color: #04121a; text-shadow: none; }
.ng-b:disabled { opacity: .3; cursor: default; }

/* Zoom: Knöpfe unten rechts, Hinweis oben links */
.ng-wrap svg { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ng-wrap.ng-zoomed svg { touch-action: none; cursor: grab; }
.ng-wrap.ng-zoomed svg:active { cursor: grabbing; }
.ng-zoom { position: absolute; right: 8px; bottom: 8px; display: flex; flex-direction: column; gap: 4px; z-index: 3; line-height: 1; }
.ng-zb { font: inherit; font-size: 1.05rem; font-weight: 800; width: 2rem; height: 2rem; padding: 0; border-radius: 8px; cursor: pointer;
  border: 1.5px solid #00e5ff; color: #00e5ff; background: rgba(4,14,8,.9); box-shadow: 0 0 6px rgba(0,229,255,.4); }
.ng-zb:hover { background: #00e5ff; color: #04121a; }
.ng-zb:disabled { opacity: .3; cursor: default; background: rgba(4,14,8,.9); color: #00e5ff; }
.ng-ztip { position: absolute; right: 8px; top: 8px; z-index: 3; line-height: 1.2; font-size: .72rem; font-weight: 700; color: #e2e8f0;
  background: rgba(4,14,8,.78); padding: .3rem .6rem; border-radius: 999px; pointer-events: none; transition: transform .2s, background .2s; }
.ng-zoomed .ng-ztip { opacity: 0; }
.ng-zhint .ng-ztip { background: #0e7490; transform: scale(1.12); transform-origin: right top; }

.ng-dots { display: flex; flex-wrap: wrap; gap: .3rem; margin: .8rem 0 .6rem; }
.ng-dot { font: inherit; font-size: .75rem; font-weight: 800; width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 1px solid #2b4a6f; background: #0f1c30; color: #94a3b8; cursor: pointer; }
.ng-dot.done { background: #12324a; color: #cfe1ee; }
.ng-dot.on { background: #39ff14; border-color: #39ff14; color: #04140a; }

.ng-panel { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: .9rem 1.1rem; color: var(--text2); font-size: .9rem; line-height: 1.65; }
.ng-step-h { display: flex; flex-wrap: wrap; gap: .6rem; align-items: baseline; color: #fff; font-size: 1.02rem; margin-bottom: .3rem; }
.ng-n { font-size: .7rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #f0b840; }
.ng-q { margin-bottom: .4rem; }
.ng-a { background: rgba(57,255,20,.07); border: 1px solid rgba(57,255,20,.35); border-radius: 8px; padding: .35rem .7rem; margin-bottom: .55rem; color: #d9f99d; }
.ng-a strong { color: #fff; }
.ng-calc { border-collapse: collapse; margin: .2rem 0 .6rem; font-size: .86rem; }
.ng-calc td { padding: .15rem .8rem .15rem 0; color: #e2e8f0; }
.ng-calc tr.res td { font-weight: 800; color: #d9f99d; }
.ng-calc tr:last-child td { border-top: 1px solid var(--border); }
.ng-how span { color: #fde047; font-weight: 800; }
.ng-how strong { color: #fff; }
.ng-info { margin: .5rem 0; background: rgba(240,184,64,.10); border: 1px solid rgba(240,184,64,.45); border-left: 4px solid #f0b840; border-radius: 8px; padding: .5rem .8rem; font-size: .86rem; color: #e2e8f0; line-height: 1.5; }
.ng-info span { color: #f0b840; font-weight: 800; }
.ng-info strong { color: #fff; }
/* Herleitung der Missweisung aus der Kartenangabe */
.ng-mw { margin: .6rem 0; padding: .6rem .85rem; border-radius: 8px; background: rgba(176,20,94,.10); border: 1px solid rgba(236,72,153,.45); border-left: 4px solid #ec4899; font-size: .88rem; color: #e2e8f0; }
.ng-mw-h { color: #f9a8d4; font-weight: 800; margin-bottom: .35rem; }
.ng-mw-g { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .3rem 0 .5rem; }
.ng-mw-g table { border-collapse: collapse; font-size: 1rem; font-weight: 700; }
.ng-mw-g td { padding: .12rem .5rem .12rem 0; }
.ng-mw-g .neu td { color: #4ade80; }
.ng-mw-pf { display: flex; align-items: center; gap: .45rem; color: #4ade80; font-weight: 700; font-size: .85rem; line-height: 1.25; }
.ng-mw-pf i { font-style: normal; font-size: 1.6rem; line-height: 1; }
.ng-mw-info { margin-top: .4rem; padding: .45rem .7rem; border-radius: 6px; background: #2563eb; color: #fff; font-size: .86rem; }
.ng-mw-info strong { color: #fff; }
.ng-merk { margin-top: .75rem; background: rgba(124,58,237,.10); border: 1px solid rgba(167,139,250,.45); border-left: 4px solid #a78bfa; border-radius: 8px; padding: .55rem .8rem; font-size: .86rem; color: #e2e8f0; }
.ng-merk-h { color: #c4b5fd; font-weight: 800; margin-bottom: .25rem; }
.ng-merk p { margin: .25rem 0; }
.ng-merk strong { color: #fff; }
.ng-merk sub { font-size: 72%; }
.ng-merk .ng-merk-x { margin-top: .45rem; padding-top: .4rem; border-top: 1px dashed rgba(167,139,250,.4); }
.ng-panel sub { font-size: 72%; line-height: 0; }
.ng-check { margin-top: 1rem; background: rgba(253,224,71,.05); border: 1px dashed rgba(253,224,71,.45); border-radius: 10px; padding: .8rem 1rem; font-size: .84rem; color: var(--text2); }
.ng-check-h { color: #fde047; font-weight: 800; margin-bottom: .4rem; }
.ng-check table { border-collapse: collapse; width: 100%; }
.ng-check th, .ng-check td { text-align: left; padding: .25rem .5rem; border-bottom: 1px solid var(--border); }
.ng-check th { color: #94a3b8; font-size: .75rem; text-transform: uppercase; }
.ng-check p { margin: .5rem 0 0; font-size: .78rem; }
@media (max-width: 560px) { .ng-b { padding: .3rem .55rem; font-size: .72rem; } }
.ng-step.ng-old text { display: none; }
.ng-step.ng-old .ng-temp { display: none; }

/* Bruchdarstellung wie in den Online-Lösungen */
.ng-html { margin: .2rem 0 .7rem; color: #e2e8f0; }
.ng-html strong { color: #fff; }
.ng-panel .frac { display: inline-flex; flex-direction: column; text-align: center; vertical-align: middle; margin: 0 .2em; line-height: 1.18; }
.ng-panel .frac .frac-n { border-bottom: 1.6px solid currentColor; padding: 0 .45em; }
.ng-panel .frac .frac-d { padding: 0 .45em; }

/* Rechenrichtung: weißer Pfeil neben der Beschickungstabelle */
.ng-calcwrap { display: flex; align-items: stretch; gap: .7rem; margin: .2rem 0 .4rem; }
.ng-calcwrap .ng-calc { margin: 0; }
.ng-arrow { display: flex; flex-direction: column; align-items: center; width: 16px; padding: .35rem 0; }
.ng-arrow.down { flex-direction: column-reverse; }
.ng-arrow .sh { flex: 1; width: 3px; background: #fff; border-radius: 2px; }
.ng-arrow .hd { width: 0; height: 0; border-left: 8px solid transparent; border-right: 8px solid transparent; border-bottom: 12px solid #fff; }
.ng-arrow.down .hd { border-bottom: none; border-top: 12px solid #fff; }
.ng-arrow-t { align-self: center; font-size: .78rem; font-weight: 800; color: #fff; line-height: 1.35; }
.ng-calc-note { font-size: .8rem; color: #cbd5e1; margin: 0 0 .6rem; }
.ng-back { display: inline-block; font-size: .85rem; font-weight: 700; color: var(--accent); text-decoration: none; margin-bottom: .7rem; }
.ng-back:hover { text-decoration: underline; }
.ng-preview { display: block; width: max-content; }
.ng-crumb { font-size: .82rem; color: var(--text2); margin-bottom: .6rem; }
.ng-crumb a { color: var(--accent); text-decoration: none; }

/* Hinweise der Aufgabenseite in der grafischen Lösung (tipps.php) */
.ng-tipp { margin-top: .75rem; padding: .65rem .9rem; border-radius: 8px; background: rgba(240,184,64,.06); border: 1px solid rgba(240,184,64,.3); font-size: .86rem; line-height: 1.6; color: #e2e8f0; }
.ng-tipp.ng-lern { background: rgba(0,200,240,.05); border-color: rgba(0,200,240,.25); border-left: 4px solid #00c8f0; }
.ng-tipp-h { color: #f0b840; font-weight: 800; margin-bottom: .2rem; }
.ng-lern .ng-tipp-h { color: var(--accent); }
.ng-tipp ul { margin: .2rem 0 0; padding-left: 1.15rem; }
.ng-tipp li { margin: .25rem 0; }
.ng-tipp p { margin: .35rem 0; }
.ng-tipp strong { color: #fff; }
.ng-tipp.has-calc .nav-schema { display: none; }
.ng-tipp .nav-fehler { margin-top: .5rem; padding: .45rem .7rem; border-radius: 6px; background: rgba(255,90,90,.07); border: 1px solid rgba(255,120,120,.28); }
.ng-tipp .nav-fehler b { color: #ff8a8a; }
.ng-panel .nav-schema { margin: .5rem 0; }
.ng-panel .nav-schema table, .ng-panel .nav-mw table { border-collapse: collapse; font-size: .85rem; margin: .3rem 0; }
.ng-panel .nav-schema td, .ng-panel .nav-mw td { padding: .15rem .6rem; border-bottom: 1px solid rgba(255,255,255,.06); }
.ng-panel .nav-schema-hi td, .ng-panel .nav-mw-hi td { background: rgba(0,200,240,.12); }
.ng-panel .nav-schema-hinweis { font-size: .8rem; }
.ng-panel .nav-mw { margin: .6rem 0; padding: .6rem .8rem; border-radius: 8px; background: rgba(21,101,192,.08); border: 1px solid rgba(100,160,255,.3); }
.ng-panel .nav-mw-h { font-weight: 800; color: #8fbaff; }
.ng-panel .nav-mw-karte, .ng-panel .nav-mw-regel { font-size: .8rem; }
.ng-panel .nav-winkel { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1rem; margin: .6rem 0; }
.ng-panel .nav-svg { width: 260px; max-width: 100%; height: auto; color: #cbd5e1; flex-shrink: 0; }
.ng-panel .nav-winkel-erkl { flex: 1; min-width: 180px; font-size: .8rem; }
.ng-panel .nav-legende { font-size: .78rem; }
.ng-panel .nav-legende i { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin: 0 .25rem 0 .5rem; border-top: 2px solid; }
.ng-panel .frac { display: inline-flex; flex-direction: column; text-align: center; vertical-align: middle; margin: 0 .2em; line-height: 1.18; }
.ng-panel .nav-allg { margin-top: .75rem; background: rgba(255,255,255,.02); border: 1px solid var(--border); border-radius: 8px; padding: .6rem .9rem; font-size: .85rem; line-height: 1.6; }
.ng-panel .nav-allg summary { cursor: pointer; font-weight: 800; color: var(--accent); }
.ng-panel .nav-allg-grid { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; align-items: flex-start; margin-top: .6rem; }
.ng-panel .nav-allg-grid ul { flex: 1; min-width: 240px; margin: 0; padding-left: 1.1rem; }
.ng-panel .nav-allg strong { color: #fff; }
.ng-tipp.has-mw .nav-mw { display: none; }
