        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0
        }

        body {
            font-family: 'Segoe UI', Arial, sans-serif;
            background: #f0f4f8;
            color: #1a202c;
            line-height: 1.6
        }

        header {
            background: linear-gradient(135deg, #1a365d, #2b6cb0 60%, #4299e1);
            color: #fff;
            padding: 1.5rem;
            text-align: center;
            box-shadow: 0 4px 12px rgba(0, 0, 0, .2)
        }

        header h1 {
            font-size: 1.9rem;
            margin-bottom: .3rem
        }

        header p {
            font-size: 1rem;
            opacity: .9
        }

        .badge {
            display: inline-block;
            background: rgba(255, 255, 255, .2);
            border: 1px solid rgba(255, 255, 255, .4);
            border-radius: 20px;
            padding: .2rem .9rem;
            font-size: .83rem;
            margin-top: .5rem
        }

        nav {
            background: #2d3748;
            display: flex;
            flex-wrap: wrap;
            justify-content: center;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .3)
        }

        nav button {
            background: none;
            border: none;
            color: #a0aec0;
            padding: .85rem 1.1rem;
            cursor: pointer;
            font-size: .86rem;
            font-weight: 600;
            transition: all .2s;
            border-bottom: 3px solid transparent;
            white-space: nowrap
        }

        nav button:hover {
            color: #fff;
            background: rgba(255, 255, 255, .05)
        }

        nav button.active {
            color: #63b3ed;
            border-bottom-color: #63b3ed;
            background: rgba(99, 179, 237, .08)
        }

        .section {
            display: none;
            padding: 1.5rem;
            max-width: 1300px;
            margin: 0 auto
        }

        .section.active {
            display: block
        }

        .card {
            background: #fff;
            border-radius: 12px;
            padding: 1.4rem;
            margin-bottom: 1.4rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
            border-left: 5px solid #4299e1
        }

        .card h2 {
            color: #2b6cb0;
            margin-bottom: .6rem;
            font-size: 1.25rem
        }

        .card p {
            margin-bottom: .5rem
        }

        .card ul {
            padding-left: 1.3rem
        }

        .card ul li {
            margin-bottom: .3rem
        }

        .card.green {
            border-left-color: #48bb78
        }

        .card.orange {
            border-left-color: #ed8936
        }

        .card.purple {
            border-left-color: #9f7aea
        }

        .card.teal {
            border-left-color: #38b2ac
        }

        .actor-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 1.1rem
        }

        .actor-card {
            background: #fff;
            border-radius: 12px;
            padding: 1.2rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .09);
            cursor: pointer;
            transition: transform .2s, box-shadow .2s;
            border-top: 4px solid #4299e1
        }

        .actor-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 20px rgba(0, 0, 0, .14)
        }

        .actor-card .emoji {
            font-size: 2.3rem;
            margin-bottom: .4rem;
            display: block
        }

        .actor-card h3 {
            font-size: 1.05rem;
            margin-bottom: .3rem
        }

        .actor-card p {
            font-size: .88rem;
            color: #4a5568
        }

        .actor-card.client {
            border-top-color: #4299e1
        }

        .actor-card.heimrouter {
            border-top-color: #ed8936
        }

        .actor-card.provider {
            border-top-color: #9f7aea
        }

        .actor-card.dns {
            border-top-color: #48bb78
        }

        .actor-card.router {
            border-top-color: #fc8181
        }

        .actor-card.webserver {
            border-top-color: #38b2ac
        }

        .modal-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .55);
            z-index: 200;
            justify-content: center;
            align-items: center;
            padding: 1rem
        }

        .modal-overlay.open {
            display: flex
        }

        .modal {
            background: #fff;
            border-radius: 16px;
            padding: 1.8rem;
            max-width: 540px;
            width: 100%;
            position: relative;
            box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
            animation: popIn .25s ease
        }

        @keyframes popIn {
            from {
                transform: scale(.85);
                opacity: 0
            }

            to {
                transform: scale(1);
                opacity: 1
            }
        }

        .modal-close {
            position: absolute;
            top: .9rem;
            right: 1rem;
            background: none;
            border: none;
            font-size: 1.4rem;
            cursor: pointer;
            color: #718096
        }

        .modal h2 {
            margin-bottom: .5rem
        }

        .modal .emoji-big {
            font-size: 2.8rem;
            display: block;
            margin-bottom: .4rem
        }

        .modal p {
            margin-bottom: .5rem;
            font-size: .95rem
        }

        .modal .analogy {
            background: #ebf8ff;
            border-left: 4px solid #4299e1;
            border-radius: 8px;
            padding: .7rem 1rem;
            margin-top: .7rem;
            font-style: italic;
            color: #2b6cb0
        }

        .modal .fact-box {
            background: #f0fff4;
            border-left: 4px solid #48bb78;
            border-radius: 8px;
            padding: .7rem 1rem;
            margin-top: .7rem;
            font-size: .88rem
        }

        .ctrl-row {
            display: flex;
            flex-wrap: wrap;
            gap: .55rem;
            margin-bottom: .8rem;
            align-items: center
        }

        .ctrl-row button {
            background: #2b6cb0;
            color: #fff;
            border: none;
            border-radius: 8px;
            padding: .5rem .95rem;
            cursor: pointer;
            font-size: .86rem;
            font-weight: 600;
            transition: background .2s
        }

        .ctrl-row button:hover {
            background: #2c5282
        }

        .ctrl-row button:disabled {
            background: #a0aec0;
            cursor: not-allowed
        }

        .ctrl-row button.sec {
            background: #2d3748;
            color: #e2e8f0
        }

        .ctrl-row button.sec:hover {
            background: #374151
        }

        .ctrl-row button.reset {
            background: #718096;
            color: #fff
        }

        .ctrl-row button.reset:hover {
            background: #4a5568
        }

        .ctrl-row button.danger {
            background: #c53030;
            color: #fff
        }

        .ctrl-row button.danger.on {
            background: #fc8181;
            color: #1a202c
        }

        .ctrl-row select {
            background: #2d3748;
            color: #e2e8f0;
            border: none;
            border-radius: 8px;
            padding: .5rem .85rem;
            font-size: .86rem;
            cursor: pointer
        }

        .speed-wrap {
            display: flex;
            align-items: center;
            gap: .35rem;
            background: #2d3748;
            border-radius: 8px;
            padding: .32rem .65rem
        }

        .speed-wrap .icon {
            font-size: 1.1rem;
            line-height: 1
        }

        .speed-wrap input[type=range] {
            width: 90px;
            accent-color: #63b3ed;
            cursor: pointer
        }

        .canvas-wrapper {
            background: #0d1117;
            border-radius: 14px;
            padding: .4rem;
            overflow: hidden;
            margin-bottom: .8rem;
            border: 1px solid #2d3748
        }

        canvas {
            width: 100%;
            border-radius: 8px;
            display: block
        }

        .log-box {
            background: #0d1117;
            color: #a0aec0;
            border-radius: 10px;
            padding: .8rem;
            font-family: monospace;
            font-size: .8rem;
            min-height: 80px;
            max-height: 160px;
            overflow-y: auto;
            border: 1px solid #2d3748
        }

        .log-entry {
            padding: .13rem 0;
            border-bottom: 1px solid #1a2332
        }

        .log-entry:last-child {
            border-bottom: none
        }

        .legend {
            display: flex;
            flex-wrap: wrap;
            gap: .55rem;
            margin-bottom: .7rem
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: .32rem;
            font-size: .8rem
        }

        .legend-dot {
            width: 13px;
            height: 13px;
            border-radius: 50%;
            flex-shrink: 0
        }

        .legend-line {
            width: 24px;
            height: 4px;
            border-radius: 2px;
            flex-shrink: 0
        }

        .step-box {
            background: #ebf8ff;
            border-radius: 10px;
            padding: .75rem 1rem;
            margin-bottom: .7rem;
            border-left: 4px solid #4299e1
        }

        .step-box h3 {
            color: #2b6cb0;
            font-size: .94rem;
            margin-bottom: .2rem
        }

        .step-box p {
            font-size: .87rem;
            color: #2d3748
        }

        .journey-step {
            display: flex;
            gap: .9rem;
            margin-bottom: 1.1rem;
            position: relative
        }

        .journey-step:not(:last-child)::after {
            content: '';
            position: absolute;
            left: 19px;
            top: 40px;
            width: 2px;
            bottom: -1.1rem;
            background: #bee3f8
        }

        .step-num {
            width: 40px;
            height: 40px;
            min-width: 40px;
            border-radius: 50%;
            background: #2b6cb0;
            color: #fff;
            font-weight: 800;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            z-index: 1
        }

        .step-content {
            background: #fff;
            border-radius: 10px;
            padding: .9rem 1.1rem;
            flex: 1;
            box-shadow: 0 2px 6px rgba(0, 0, 0, .07)
        }

        .step-content h4 {
            color: #2b6cb0;
            margin-bottom: .25rem;
            font-size: .96rem
        }

        .step-content p {
            font-size: .89rem;
            color: #4a5568
        }

        .info-box {
            background: #ebf8ff;
            border: 1px solid #bee3f8;
            border-radius: 10px;
            padding: .9rem 1.1rem;
            margin-bottom: .9rem;
            font-size: .88rem
        }

        .info-box.yellow {
            background: #fffff0;
            border-color: #faf089
        }

        .quiz-question {
            background: #fff;
            border-radius: 12px;
            padding: 1.3rem;
            margin-bottom: 1.2rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .08)
        }

        .quiz-question h3 {
            margin-bottom: .8rem;
            color: #2d3748
        }

        .quiz-options {
            display: flex;
            flex-direction: column;
            gap: .45rem
        }

        .quiz-option {
            background: #f7fafc;
            border: 2px solid #e2e8f0;
            border-radius: 8px;
            padding: .65rem .95rem;
            cursor: pointer;
            transition: all .2s;
            font-size: .92rem
        }

        .quiz-option:hover {
            border-color: #4299e1;
            background: #ebf8ff
        }

        .quiz-option.correct {
            background: #f0fff4;
            border-color: #48bb78;
            color: #276749
        }

        .quiz-option.wrong {
            background: #fff5f5;
            border-color: #fc8181;
            color: #9b2335
        }

        .quiz-option.disabled {
            pointer-events: none
        }

        .quiz-feedback {
            margin-top: .6rem;
            padding: .55rem .85rem;
            border-radius: 8px;
            font-size: .89rem;
            display: none
        }

        .quiz-feedback.show {
            display: block
        }

        .quiz-feedback.ok {
            background: #f0fff4;
            color: #276749
        }

        .quiz-feedback.bad {
            background: #fff5f5;
            color: #9b2335
        }

        #quiz-result {
            text-align: center;
            background: #fff;
            border-radius: 12px;
            padding: 1.8rem;
            margin-top: 1rem;
            box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
            display: none
        }

        #quiz-result .score-big {
            font-size: 3.2rem;
            font-weight: 800;
            color: #2b6cb0
        }

        #quiz-submit,
        #quiz-restart {
            display: block;
            margin: 1rem auto 0;
            background: #2b6cb0;
            color: #fff;
            border: none;
            padding: .75rem 2.2rem;
            border-radius: 10px;
            cursor: pointer;
            font-size: .96rem;
            font-weight: 700
        }

        .lz-tag {
            display: inline-block;
            background: #ebf8ff;
            color: #2b6cb0;
            border: 1px solid #bee3f8;
            border-radius: 20px;
            padding: .2rem .85rem;
            font-size: .82rem;
            font-weight: 600;
            margin: .2rem
        }

        footer {
            text-align: center;
            padding: 1.3rem;
            color: #718096;
            font-size: .82rem;
            border-top: 1px solid #e2e8f0;
            margin-top: 1.5rem
        }

        footer a {
            color: #4299e1;
            text-decoration: none
        }

        #editor-layout {
            display: grid;
            grid-template-columns: 210px 1fr;
            grid-template-rows: auto 1fr auto;
            gap: .7rem;
            height: calc(100vh - 260px);
            min-height: 480px
        }

        #editor-sidebar {
            grid-row: 1/4;
            background: #1e2a3a;
            border-radius: 12px;
            padding: .9rem;
            overflow-y: auto;
            border: 1px solid #2d3748;
            display: flex;
            flex-direction: column;
            gap: .65rem
        }

        #editor-sidebar h3 {
            color: #63b3ed;
            font-size: .86rem;
            border-bottom: 1px solid #2d3748;
            padding-bottom: .3rem;
            margin-bottom: .1rem
        }

        .tool-section {
            display: flex;
            flex-direction: column;
            gap: .32rem
        }

        .tool-btn {
            background: #2d3748;
            border: 2px solid #4a5568;
            color: #e2e8f0;
            border-radius: 8px;
            padding: .46rem .62rem;
            cursor: pointer;
            font-size: .8rem;
            text-align: left;
            transition: all .2s;
            display: flex;
            align-items: center;
            gap: .4rem
        }

        .tool-btn:hover {
            background: #374151;
            border-color: #63b3ed
        }

        .tool-btn.selected {
            background: #1a365d;
            border-color: #63b3ed;
            color: #63b3ed
        }

        .tool-btn.node-tool {
            border-left: 4px solid var(--nc)
        }

        .delete-btn {
            border-color: #fc8181;
            color: #fc8181
        }

        .delete-btn:hover,
        .delete-btn.selected {
            background: #2a1515;
            border-color: #fc8181;
            color: #fc8181
        }

        #editor-topbar {
            background: #1e2a3a;
            border-radius: 10px;
            padding: .5rem .8rem;
            display: flex;
            flex-wrap: wrap;
            gap: .4rem;
            align-items: center;
            border: 1px solid #2d3748
        }

        #editor-topbar button {
            background: #2d3748;
            color: #e2e8f0;
            border: 1px solid #4a5568;
            padding: .36rem .65rem;
            border-radius: 7px;
            cursor: pointer;
            font-size: .76rem;
            font-weight: 600;
            transition: background .2s;
            white-space: nowrap
        }

        #editor-topbar button:hover {
            background: #374151
        }

        #editor-topbar input[type=text],
        #editor-topbar select {
            background: #0d1117;
            color: #e2e8f0;
            border: 1px solid #4a5568;
            border-radius: 6px;
            padding: .32rem .5rem;
            font-size: .75rem
        }

        #editor-canvas-wrap {
            background: #0d1117;
            border-radius: 12px;
            border: 2px solid #2d3748;
            overflow: hidden;
            position: relative
        }

        #editor-canvas {
            display: block;
            width: 100%;
            height: 100%
        }

        #editor-status {
            grid-column: 2;
            background: #1e2a3a;
            border-radius: 8px;
            padding: .4rem .8rem;
            font-size: .78rem;
            color: #a0aec0;
            border: 1px solid #2d3748;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: .3rem
        }

        #editor-status .val {
            color: #63b3ed;
            font-weight: 600
        }

        #editor-sim-panel {
            background: #1e2a3a;
            border-radius: 10px;
            padding: .8rem 1rem;
            border: 1px solid #2d3748;
            margin-top: .6rem
        }

        #editor-sim-panel h3 {
            color: #63b3ed;
            font-size: .86rem;
            margin-bottom: .5rem
        }

        .esim-ctrl {
            display: flex;
            flex-wrap: wrap;
            gap: .4rem;
            margin-bottom: .5rem;
            align-items: center
        }

        .esim-ctrl button,
        .esim-ctrl select,
        .esim-ctrl input[type=text] {
            background: #2d3748;
            color: #e2e8f0;
            border: 1px solid #4a5568;
            padding: .38rem .68rem;
            border-radius: 7px;
            cursor: pointer;
            font-size: .79rem;
            font-weight: 600;
            transition: background .2s
        }

        .esim-ctrl select {
            min-width: 140px
        }

        .esim-ctrl input[type=text] {
            cursor: text;
            font-weight: 400;
            width: 140px
        }

        .esim-ctrl button:hover {
            background: #374151
        }

        .esim-ctrl button.go {
            background: #2b6cb0;
            border-color: #4299e1
        }

        .esim-ctrl button.go:hover {
            background: #2c5282
        }

        .esim-ctrl button:disabled {
            opacity: .45;
            cursor: not-allowed
        }

        #esim-step-box {
            background: #0d1117;
            border-radius: 8px;
            padding: .55rem .82rem;
            margin-bottom: .4rem;
            border: 1px solid #2d3748;
            font-size: .82rem;
            color: #a0aec0;
            min-height: 48px
        }

        #esim-step-box strong {
            color: #63b3ed
        }

        #esim-log {
            background: #0d1117;
            border-radius: 8px;
            padding: .48rem .78rem;
            font-family: monospace;
            font-size: .76rem;
            max-height: 95px;
            overflow-y: auto;
            border: 1px solid #2d3748;
            color: #a0aec0
        }

        #esim-progress {
            display: flex;
            align-items: center;
            gap: .42rem;
            font-size: .78rem;
            color: #718096;
            margin-bottom: .36rem
        }

        #esim-progress .prog-bar {
            flex: 1;
            height: 6px;
            background: #2d3748;
            border-radius: 3px;
            overflow: hidden
        }

        #esim-progress .prog-fill {
            height: 6px;
            border-radius: 3px;
            background: linear-gradient(90deg, #4299e1, #48bb78);
            transition: width .3s
        }

        #node-label-input {
            position: absolute;
            display: none;
            background: #1e2a3a;
            border: 1px solid #63b3ed;
            border-radius: 8px;
            padding: .36rem .5rem;
            z-index: 50
        }

        #node-label-input input {
            background: #0d1117;
            color: #e2e8f0;
            border: 1px solid #4a5568;
            border-radius: 5px;
            padding: .24rem .46rem;
            font-size: .82rem;
            width: 126px
        }

        #node-label-input button {
            background: #2b6cb0;
            color: #fff;
            border: none;
            border-radius: 5px;
            padding: .24rem .5rem;
            cursor: pointer;
            font-size: .78rem;
            margin-left: .26rem
        }

        #editor-save-status {
            color: #68d391;
            font-size: .76rem;
            opacity: 0;
            transition: opacity .3s;
            margin-left: auto
        }

        #net-panel {
            background: #1e2a3a;
            border-radius: 10px;
            padding: .9rem 1rem;
            border: 1px solid #2d3748;
            margin-bottom: .9rem
        }

        #net-panel h3 {
            color: #63b3ed;
            font-size: .94rem;
            margin-bottom: .55rem
        }

        #net-status {
            color: #e2e8f0;
            font-size: .86rem;
            margin-bottom: .6rem
        }

        #net-status code {
            background: #0d1117;
            padding: .1rem .35rem;
            border-radius: 4px;
            color: #f6ad55
        }

        #net-discover-panel {
            display: none;
            background: #0d1117;
            border-radius: 8px;
            padding: .7rem;
            margin-top: .5rem;
            border: 1px solid #2d3748
        }

        #net-connections-list {
            margin-top: .6rem
        }

        @media(max-width:800px) {
            #editor-layout {
                grid-template-columns: 1fr;
                grid-template-rows: auto auto 340px auto;
                height: auto
            }

            #editor-sidebar {
                grid-row: auto;
                flex-direction: row;
                flex-wrap: wrap
            }

            #editor-canvas-wrap {
                min-height: 340px
            }
        }

        @media(max-width:700px) {
            nav button {
                font-size: .68rem;
                padding: .55rem .4rem
            }
        }
    
        /* Kontrast-Korrekturen (WCAG AA, 2026-10-07): gleiche Farbtöne, nur dunkler bzw. heller */
        html:not([data-theme="light"]) footer { color: #616e83; }  /* statt #718096 */
        html:not([data-theme="light"]) footer a { color: #1d70b5; }  /* statt #4299e1 */
        html[data-theme="light"] footer { color: #616e83; }  /* statt #718096 */
        html[data-theme="light"] footer a { color: #1d70b5; }  /* statt #4299e1 */
    
