/* Terminal „pip install jens“ (static/terminal/terminal.js), auf links.jensneuhaus.de und jensneuhaus.de. */
/* Über allem, auch über dem Sprachumschalter der Links-Seite (.lang, z-index 2100). Höhe und Lage folgen dem sichtbaren
   Bereich (terminal.js setzt --term-top/--term-h aus visualViewport), damit die Bildschirmtastatur nichts verdeckt. */
.term-overlay { position: fixed; left: 0; right: 0; top: var(--term-top, 0px); height: var(--term-h, 100vh); z-index: 2200; background: rgba(0, 0, 0, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
@supports (height: 100dvh) { .term-overlay { height: var(--term-h, 100dvh); } }
.term-overlay[hidden] { display: none; }
.term {
    width: min(720px, 100%); height: min(480px, 100%); min-width: 0; display: flex; flex-direction: column; overflow: hidden;
    background: #0c0c0c; color: #d9d9d9; border: 1px solid #2a2a2a; border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8);
    font: 13px/1.55 var(--mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); animation: term-in .25s ease-out;
}
@keyframes term-in { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.term-bar { flex: none; display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: #161616; border-bottom: 1px solid #262626; color: #8a8a8a; font-size: 12px; }
.term-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3a3a; }
.term-bar i:first-child { background: #ff5f57; cursor: pointer; }
.term-bar i:nth-child(2) { background: #febc2e; } .term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { flex: 1; text-align: center; margin-right: 50px; }
.term-body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 12px 14px; white-space: pre-wrap; word-break: break-word; cursor: text; }
.term-body .p { color: #3ecf8e; } .term-body .d { color: #7a7a7a; } .term-body .a { color: #33c6ff; } .term-body .w { color: #f5b84a; } .term-body .b { color: #fff; font-weight: 600; }
.term-body a { color: #33c6ff; }
.term-line { display: flex; gap: 8px; }
.term-body .heart { display: block; color: #ff3b5c; font-size: 17px; line-height: 1.1; margin: 4px 0 8px; min-height: 8em; text-shadow: 0 0 12px rgba(255, 59, 92, .45); }
.term-body .eye { display: block; color: #f5b84a; line-height: 1.2; margin: 4px 0 8px; }
.term-body .ascii { display: block; font-size: 10px; line-height: 1.05; letter-spacing: .02em; color: #a8a8a8; margin: 6px 0 10px; }
@media (max-width: 640px) { .term-body .ascii { font-size: 5px; } }
.t-box { white-space: normal; display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin: 8px 0; padding: 12px 16px; border: 1px solid #2c3a44; border-radius: 8px; background: rgba(51, 198, 255, .05); }
.t-box pre { margin: 0; font: inherit; line-height: 1.15; color: #33c6ff; }
.t-box b { color: #fff; }
.t-box p { margin: 4px 0 0; }
@media (max-width: 520px) { .t-box { grid-template-columns: 1fr; } .t-box pre { display: none; } }
.term-line input { flex: 1; min-width: 0; font: inherit; color: #fff; background: none; border: 0; outline: none; caret-color: #3ecf8e; padding: 0; }
/* Schmale Bildschirme: volle Breite und Höhe des sichtbaren Bereichs */
@media (max-width: 640px) {
    .term-overlay { padding: 8px; }
    .term { width: 100%; height: 100%; }
    .term-body { padding: 10px 12px; }
}
/* Touch-Geräte: unter 16px zoomt iOS beim Fokus ins Feld und schneidet rechts ab */
@media (pointer: coarse) { .term-line input { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) { .term { animation: none; } }
