﻿@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;600;700&display=swap');
:root { --primary: #0078d4; --primary-hover: #106ebe; --sidebar-bg: #201f1e; --bg-app: #f3f2f1; --text: #323130; --border: #e1dfdd; --danger: #d13438; }
body { margin:0; font-family:'Segoe UI', sans-serif; background:var(--bg-app); color:var(--text); height:100vh; width:100vw; display:flex; overflow:hidden; -webkit-app-region: no-drag !important; }
* { box-sizing: border-box; }
input, textarea, select { -webkit-app-region: no-drag !important; user-select: text !important; cursor: text !important; }
.sidebar { width:80px; background:var(--sidebar-bg); display:flex; flex-direction:column; align-items:center; padding-top:20px; flex-shrink:0; z-index: 50; }
.nav-icon { width:60px; height:60px; color:#c8c6c4; display:flex; flex-direction:column; align-items:center; justify-content:center; cursor:pointer; margin-bottom:5px; border-radius:4px; font-size:0.8rem; transition: 0.2s; }
.nav-icon:hover { background:rgba(255,255,255,0.1); color:white; }
.nav-icon.active { background:var(--primary); color:white; }
.nav-icon i { font-size:1.5rem; margin-bottom:5px; }
.main-area { flex:1; display:flex; flex-direction:column; overflow:hidden; position:relative; }
.view { display:none; flex-direction:column; height:100%; width:100%; }
.view.show { display:flex; }
.tabs-header { background:white; padding:0 20px; height:60px; display:flex; align-items:center; gap:10px; border-bottom:1px solid var(--border); overflow-x:auto; flex-shrink:0; }
.interview-meta-bar { background:#f3f2f1; padding:12px 20px; color:#0078d4; display:flex; justify-content:space-between; gap:20px; border-bottom:1px solid var(--border); }
.interview-meta-copy { display:flex; flex-direction:column; gap:4px; max-width:calc(100% - 180px); }
.interview-meta-copy small { color:#605e5c; font-weight:600; }
.mono-line { font-family: Consolas, monospace; font-size:0.78rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tab-btn { padding:8px 18px; border-radius:20px; background:#f3f2f1; border:none; font-weight:600; font-size:0.9rem; color:#605e5c; cursor:pointer; white-space:nowrap; transition:0.2s; }
.tab-btn:hover { background:#e1dfdd; color:black; }
.tab-btn.active { background:var(--primary); color:white; }
.scroll-canvas { flex:1; overflow-y:auto; padding:40px; }
.card { background:white; border-radius:8px; padding:25px; margin-bottom:20px; box-shadow:0 2px 4px rgba(0,0,0,0.1); border:1px solid var(--border); max-width:850px; margin-left:auto; margin-right:auto; }
.archive-card { max-width:980px; }
.archive-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; }
.archive-topline { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
.archive-source { display:inline-flex; align-items:center; padding:3px 10px; border-radius:999px; font-size:0.72rem; font-weight:700; letter-spacing:0.03em; text-transform:uppercase; }
.archive-source.workspace { background:#e6f4ea; color:#137333; }
.archive-source.legacy { background:#fff4ce; color:#8a6700; }
.archive-source.server { background:#e3f2fd; color:#1565c0; }
.archive-meta { margin-top:8px; color:#605e5c; font-size:0.86rem; }
.q-title { font-size:1.1rem; font-weight:700; margin-bottom:15px; color:#201f1e; }
.inp { width:100%; padding:10px; border:1px solid #8a8886; border-radius:4px; margin-top:5px; background:white; font-size:0.95rem; }
.inp:focus { outline:2px solid var(--primary); border-color:var(--primary); }
.btn-choice { padding:10px 15px; background:white; border:1px solid #8a8886; border-radius:4px; cursor:pointer; font-weight:600; margin-right:5px; flex:1; transition:0.2s; }
.btn-choice:hover { background:#f3f2f1; }
.btn-choice.selected { background:var(--primary); color:white; border-color:var(--primary); }
.btn-primary { background:var(--primary); color:white; border:none; padding:8px 16px; border-radius:4px; cursor:pointer; }
.btn-danger { background:white; color:var(--danger); border:1px solid var(--danger); padding:5px 10px; border-radius:4px; cursor:pointer; }
.btn-del-card { background:none; border:none; color:#a19f9d; cursor:pointer; font-size:1.1rem; padding:5px; transition:0.2s; }
.btn-del-card:hover { color:var(--danger); transform:scale(1.1); }
.btn-edit-sub { background:none; border:none; color:#0078d4; cursor:pointer; font-size:1rem; padding:5px; margin-right:5px; }
.btn-edit-sub:hover { color:#004578; transform:scale(1.1); }
.ed-layout { display: flex; height: 100%; width: 100%; overflow: hidden; }
.ed-tree { width: 320px; background: white; border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
.ed-tree-header { padding:15px; font-weight:bold; border-bottom:1px solid #e1dfdd; display:flex; justify-content:space-between; flex-shrink:0; }
.ed-tree-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
.ed-content { flex: 1; background: #f3f2f1; padding: 40px; overflow-y: auto; min-width: 0; height: 100%; display: block; }
.ed-form-box { background: white; padding: 30px; border-radius: 8px; border: 1px solid #e1dfdd; max-width: 800px; }
.cat-wrapper { margin-bottom:10px; background:#fff; border-bottom:1px solid #eee; }
.cat-handle { padding:10px 15px; background:#e1dfdd; font-weight:700; cursor:grab; display:flex; justify-content:space-between; align-items:center; }
.q-list { padding:5px 0; min-height:10px; }
.q-item { padding:8px 15px 8px 25px; cursor:pointer; font-size:0.9rem; border-bottom:1px solid #f3f2f1; display:flex; align-items:center; transition:0.1s; }
.q-item:hover { background:#f8f9fa; padding-left:30px; }
.q-item.active { background:#eff6fc; border-left:4px solid var(--primary); font-weight:600; }
.q-item.is-heading { background: #e6e6e6; font-weight:bold; color:#555; }
.ghost { opacity: 0.5; background: #c8ebfb; }
.lb-container { margin-top:20px; background:white; padding:20px; border-radius:8px; border:1px solid #e1dfdd; }
.lb-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid #f3f2f1; }
.lb-label { font-weight: 600; color: #323130; width: 40%; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; width: auto; flex: 0 0 auto; border: 1px solid #8a8886; background: white; border-radius: 4px; cursor: pointer; }
.btn-small:hover { background: #f3f2f1; }
.lb-mini-form { background:#faf9f8; padding:15px; border:1px solid #e1dfdd; margin-top:10px; display:none; border-radius:6px; }
.lb-mini-form.edit-mode { border-color: #0078d4; background: #eff6fc; }
.lb-sub-q { background:#eff6fc; padding:10px; margin-top:5px; border-radius:4px; display:flex; justify-content:space-between; align-items:center; font-size:0.9rem; }
.opt-wrapper { display: flex; flex-direction: column; width:100%; margin-bottom: 5px; }
.opt-row { display: flex; align-items: center; padding: 10px; border: 1px solid #e1dfdd; border-radius: 4px; background: white; cursor: pointer; transition: 0.1s; }
.opt-row:hover { background: #f8f9fa; }
.opt-row.active { border-color: var(--primary); background: #eff6fc; }
.opt-row input { margin-right: 15px; width: 18px; height: 18px; pointer-events: none; }
.inline-sub { margin-left: 20px; border-left: 3px solid var(--primary); padding: 10px 15px; background: #f0f9ff; border-radius: 0 0 6px 6px; display: none; animation: slideDown 0.2s ease-out; }
.int-heading { max-width:850px; margin:0 auto 15px; padding:8px 12px; font-weight:700; color:#0078d4; text-transform:uppercase; letter-spacing:0.04em; }
.inline-sub.show { display: block; }
@keyframes slideDown { from{opacity:0;transform:translateY(-5px)} to{opacity:1;transform:translateY(0)} }
.save-state { align-items:center; justify-content:center; min-width:120px; padding:6px 12px; border-radius:999px; font-weight:700; }
.save-state.success { color:#107c10; background:#dff6dd; }
.save-state.error { color:#a4262c; background:#fde7e9; }
.workspace-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(280px, 1fr)); gap:18px; }
.workspace-card { background:white; border:1px solid var(--border); border-radius:10px; padding:20px; box-shadow:0 2px 6px rgba(0,0,0,0.06); }
.workspace-card-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.workspace-card h3 { margin:0; font-size:1rem; }
.workspace-card code { display:block; padding:12px; background:#f8f9fa; border-radius:6px; font-size:0.82rem; word-break:break-word; white-space:pre-wrap; }
.workspace-card p { margin:12px 0 0; color:#605e5c; line-height:1.45; }
.workspace-note { max-width:980px; margin:22px auto 0; padding:20px; background:#eff6fc; border:1px solid #c7e0f4; border-radius:10px; }
.workspace-empty { max-width:980px; margin:0 auto; padding:30px; background:white; border:1px solid var(--border); border-radius:10px; text-align:center; color:#605e5c; }
.report-wrapper { padding: 40px; overflow-y: auto; height: 100%; }
.report-inner { max-width: 850px; margin: 0 auto; }
#rep-content { padding-bottom:50px; font-family:'Segoe UI', sans-serif; }
.rep-cat { background: var(--primary); color: white; padding: 10px 20px; border-radius: 6px; font-size: 1.1rem; font-weight: 700; margin-top: 40px; margin-bottom: 20px; -webkit-print-color-adjust: exact; }
.rep-pair { margin-bottom: 30px; page-break-inside: avoid; }
.rep-q { font-weight: 700; color: #1f2937; margin-bottom: 8px; font-size: 1rem; padding-left: 5px; }
.rep-a-box { background: #f0f9ff; border: 1px solid #bae6fd; color: #0c4a6e; padding: 10px 15px; border-radius: 6px; font-size: 0.95rem; margin-bottom: 5px; -webkit-print-color-adjust: exact; }
.rep-sub { margin-left: 20px; margin-top: 2px; margin-bottom: 10px; border-left: 3px solid #cbd5e1; padding-left: 10px; }
.rep-sub-q { font-weight: 600; font-size: 0.85rem; color: #64748b; }
.rep-sub-a { font-style: italic; color: #334155; }
.modal { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.5); display:none; justify-content:center; align-items:center; z-index:999; }
.modal-box { background:white; padding:30px; border-radius:8px; width:400px; }
.btn-indent { background: none; border: none; color: #aaa; cursor: pointer; font-size: 1.2rem; margin-left: 10px; padding: 0 5px; border-radius: 4px; }
.btn-indent:hover { background: #eee; color: var(--primary); }

/* ========================================= */
/* LOGIN & LIBRARY SCREENS                   */
/* ========================================= */

.auth-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    font-family: 'Segoe UI', sans-serif;
}

.auth-box {
    width: 360px;
}

.auth-logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 4px;
    color: white;
}

.auth-sub {
    margin: 0 0 32px;
    font-size: 0.82rem;
    color: #a19f9d;
}

.auth-label {
    display: block;
    font-size: 0.78rem;
    color: #a19f9d;
    margin-bottom: 6px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-input {
    width: 100%;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 4px;
    padding: 10px 12px;
    color: white;
    font-size: 0.95rem;
    font-family: 'Segoe UI', sans-serif;
    outline: none;
    margin-bottom: 16px;
    transition: border-color 0.15s;
}

.auth-input:focus {
    border-color: var(--primary);
    background: rgba(0,120,212,0.08);
}

.auth-input::placeholder { color: #605e5c; }

.auth-btn {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 11px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 8px;
}

.auth-btn:hover { background: var(--primary-hover); }
.auth-btn:disabled { background: #4a4a4a; cursor: default; }

.auth-error {
    background: rgba(209,52,56,0.15);
    border: 1px solid rgba(209,52,56,0.4);
    border-radius: 4px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: #f1707b;
    display: none;
}

.auth-loading {
    text-align: center;
    margin-top: 14px;
    font-size: 0.82rem;
    color: #a19f9d;
    display: none;
}

/* Library Screen */
.library-screen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: var(--sidebar-bg);
    color: white;
    display: none;
    flex-direction: column;
    z-index: 2000;
    overflow: hidden;
    font-family: 'Segoe UI', sans-serif;
}

.library-header {
    padding: 36px 48px 16px;
    flex-shrink: 0;
    display: flex;
    align-items: baseline;
    gap: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
}

.library-header h1 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.library-header span {
    font-size: 0.82rem;
    color: #a19f9d;
}

.library-grid {
    flex: 1;
    overflow-y: auto;
    padding: 24px 48px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
    align-content: start;
}

.lib-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 20px 18px 16px;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lib-card:hover {
    background: rgba(255,255,255,0.1);
}

.lib-card-icon {
    width: 40px; height: 40px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.lib-card-name {
    font-weight: 600;
    font-size: 0.92rem;
    line-height: 1.3;
}

.lib-card-desc {
    font-size: 0.76rem;
    color: #a19f9d;
    line-height: 1.4;
}

.lib-card-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
}

.lib-open-btn {
    flex: 1;
    border: none;
    color: white;
    padding: 7px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    transition: opacity 0.15s;
}

.lib-open-btn:hover { opacity: 0.85; }

.lib-reset-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: #a19f9d;
    padding: 7px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: color 0.15s, background 0.15s;
}

.lib-reset-btn:hover { color: white; background: rgba(255,255,255,0.12); }

.library-footer {
    padding: 16px 48px 24px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    gap: 14px;
}

.lib-import-btn {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    color: #c8c6c4;
    padding: 9px 18px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: 'Segoe UI', sans-serif;
    transition: background 0.15s, color 0.15s;
}

.lib-import-btn:hover { background: rgba(255,255,255,0.12); color: white; }

.lib-status {
    font-size: 0.82rem;
    color: #a19f9d;
    display: none;
}

.lib-user-badge {
    margin-left: auto;
    font-size: 0.78rem;
    color: #605e5c;
}

/* ========================================= */
/* SCORING & BERICHT                         */
/* ========================================= */

.rep-header { margin-bottom: 24px; }
.rep-meta-line { display: flex; gap: 20px; font-size: 0.85rem; color: #605e5c; margin-top: 4px; }
.rep-section-title {
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em;
    text-transform: uppercase; color: #605e5c;
    border-bottom: 1px solid #edebe9; padding-bottom: 6px;
    margin: 24px 0 12px;
}
.rep-score-section { margin: 16px 0 24px; }
.rep-zusammenfassung {
    background: #f3f9ff;
    border: 1px solid #c7e0f4;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.93rem;
    line-height: 1.6;
    color: #1b3a56;
}
.rep-zusammenfassung p { margin: 0 0 8px; }
.score-badge { display: flex; align-items: baseline; flex-wrap: wrap; }
.score-table th { font-weight: 600; }
.score-table tr:hover td { background: rgba(0,0,0,0.02); }

/* KI-Interpretation */
.rep-ai-section {
    background: linear-gradient(135deg, #f8f4ff 0%, #fdf6ff 100%);
    border: 1px solid #d6b4f0;
    border-radius: 8px;
    padding: 14px 18px 18px;
    margin: 24px 0;
}
.rep-ai-title { border-bottom-color: #d6b4f0; color: #5a2d8a; }
.rep-ai-badge {
    display: inline-block;
    font-size: 0.65rem;
    background: #7c3aed;
    color: #fff;
    border-radius: 4px;
    padding: 1px 6px;
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: none;
}
.rep-ai-box {
    font-size: 0.93rem;
    line-height: 1.7;
    color: #2d1b4e;
    min-height: 48px;
    margin-bottom: 14px;
}
.rep-ai-box p { margin: 0 0 10px; }
.rep-ai-btn {
    border: 1.5px solid #7c3aed;
    color: #7c3aed;
    background: #fff;
    font-weight: 600;
}
.rep-ai-btn:hover { background: #f3eeff; }
.rep-ai-disclaimer {
    font-size: 0.73rem;
    color: #7a6a8a;
    margin-top: 12px;
    font-style: italic;
}
@media print {
    .rep-ai-btn, .rep-ai-disclaimer { display: none; }
    .rep-ai-section { border-color: #d0d0d0; background: #fafafa; }
    .no-print { display: none !important; }
}

/* ========================================= */
/* WICHTIG: PDF DRUCK FIX              */
/* ========================================= */

/* ========================================= */
/* RESPONSIVE – TABLET & PEN                 */
/* ========================================= */

/* ═══════════════════════════════════════════════════════════
   TABLET RESPONSIVE  (≤ 1024px)
   Sidebar wird zur Bottom-Nav, alles wird touch-freundlich
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

    /* Body: vertikal statt horizontal */
    body { flex-direction: column; }

    /* Sidebar → Bottom-Navigation */
    .sidebar {
        width: 100% !important;
        height: 68px;
        flex-direction: row;
        padding: 0;
        order: 99;
        flex-shrink: 0;
        overflow-x: auto;
        justify-content: space-around;
    }
    .nav-icon {
        width: auto;
        min-width: 64px;
        height: 68px;
        flex-direction: column;
        font-size: 0.7rem;
        border-radius: 0;
        margin: 0;
        padding: 0 8px;
        flex: 1;
    }
    .nav-icon i { font-size: 1.4rem; margin-bottom: 3px; }

    /* Main-Area füllt den Rest */
    .main-area { flex: 1; min-height: 0; }

    /* Tabs-Header kompakter */
    .tabs-header { height: 52px; padding: 0 12px; gap: 6px; }
    .tabs-header h2 { font-size: 1rem; white-space: nowrap; }

    /* Interview Meta Bar */
    .interview-meta-bar { padding: 8px 12px; }
    .interview-meta-copy { gap: 2px; }

    /* Scroll-Canvas */
    .scroll-canvas { padding: 16px 12px; }

    /* Karten */
    .card { padding: 16px; margin-bottom: 14px; }

    /* Library */
    .library-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 12px !important; padding: 12px !important; }
    .library-screen { padding-bottom: 0; }
    .library-footer { flex-wrap: wrap; gap: 8px; padding: 10px 12px; }

    /* Login */
    .auth-box { padding: 28px 20px; }

    /* Bericht */
    .report-inner { max-width: 100%; padding: 0 4px; }

    /* Editor */
    .ed-layout { flex-direction: column; }
    .ed-tree { width: 100%; height: 200px; border-right: none; border-bottom: 1px solid var(--border); }
    .ed-content { padding: 16px; }
}

/* Kleine Tablets / große Phones */
@media (max-width: 600px) {
    .library-grid { grid-template-columns: 1fr !important; }
    .lib-card { padding: 12px; }
    .auth-box { padding: 24px 16px; }
    .tabs-header h2 { font-size: 0.9rem; }
}

/* ═══════════════════════════════════════════════════════════
   TOUCH & STIFT — größere Trefferzone, kein hover-Flackern
   ═══════════════════════════════════════════════════════════ */
@media (pointer: coarse), (pointer: fine) and (max-width: 1024px) {
    .checkbox-row   { min-height: 56px; padding: 12px 16px; font-size: 1rem; }
    .btn-choice     { min-height: 52px; font-size: 1rem; }
    .btn-primary, .btn-danger, .btn-secondary { min-height: 44px; font-size: 1rem; }
    .inp, textarea  { font-size: 1rem; padding: 12px; }
    .tab-btn        { min-height: 40px; padding: 8px 16px; }
    .nav-icon       { min-height: 44px; }
}

/* ═══════════════════════════════════════════════════════════
   HANDSCHRIFT-SYSTEM
   ═══════════════════════════════════════════════════════════ */

/* Stift-Button neben Texteingaben */
.pen-btn-wrap { position: relative; display: flex; gap: 6px; align-items: flex-start; }
.pen-btn-wrap textarea,
.pen-btn-wrap input { flex: 1; }
.pen-trigger-btn {
    flex-shrink: 0;
    width: 40px; height: 40px;
    border: 1.5px solid #8a8886;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem;
    color: #605e5c;
    transition: 0.15s;
    margin-top: 5px;
}
.pen-trigger-btn:hover, .pen-trigger-btn.active { background: var(--primary); color: white; border-color: var(--primary); }

/* Handwriting Overlay */
.hw-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 9000;
    display: flex; align-items: flex-end; justify-content: center;
    padding: 0;
}
.hw-panel {
    background: white;
    width: 100%;
    max-width: 900px;
    border-radius: 16px 16px 0 0;
    padding: 16px;
    display: flex; flex-direction: column; gap: 10px;
    max-height: 85vh;
}
.hw-header {
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 700; font-size: 1rem; color: #201f1e;
}
.hw-canvas-wrap {
    position: relative;
    background: #fafafa;
    border: 2px solid #e1dfdd;
    border-radius: 8px;
    overflow: hidden;
    flex: 1;
    min-height: 220px;
    cursor: crosshair;
    touch-action: none;
}
.hw-canvas {
    width: 100%; height: 100%;
    display: block;
    touch-action: none;
}
/* Linien-Hintergrund wie Notizblock */
.hw-canvas-wrap::before {
    content: '';
    position: absolute; inset: 0;
    background-image: repeating-linear-gradient(
        transparent, transparent 39px, #d0e8ff 39px, #d0e8ff 40px
    );
    pointer-events: none;
}
.hw-result {
    border: 1.5px solid var(--primary);
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 1rem;
    min-height: 44px;
    background: #f3f9ff;
    color: #1b3a56;
    word-break: break-word;
}
.hw-result-label { font-size: 0.75rem; color: #605e5c; font-weight: 600; margin-bottom: 3px; }
.hw-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hw-actions button { flex: 1; min-width: 100px; }
.hw-status { font-size: 0.8rem; color: #605e5c; font-style: italic; text-align: center; min-height: 18px; }

@media print {
    /* Alle Scroll-Container aufheben und auf volle Höhe setzen */
    html, body, .main-area, .view, .scroll-canvas, .report-wrapper {
        height: auto !important;
        overflow: visible !important;
        width: 100% !important;
        display: block !important;
        position: static !important;
    }

    /* Sidebar und Tabs ausblenden */
    .sidebar, .tabs-header, .nav-icon, button {
        display: none !important;
    }

    /* Alle Views ausblenden */
    .view {
        display: none !important;
    }

    /* Nur den Report-View (Bericht) anzeigen */
    #view-report {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Bericht-Inhalt formatieren */
    .report-inner {
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #rep-content {
        width: 100%;
    }

    /* Seitenumbrüche optimieren */
    .rep-cat {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-top: 20px;
        color: black !important; /* Druckerfreundlicher */
        background: transparent !important;
        border-bottom: 2px solid var(--primary);
        border-radius: 0;
        padding-left: 0;
    }

    .rep-pair {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* Admin Panel */
.admin-table { width:100%; border-collapse:collapse; font-size:0.88rem; }
.admin-table th { text-align:left; padding:6px 10px; border-bottom:2px solid #edebe9; color:#605e5c; font-weight:700; }
.admin-table td { padding:7px 10px; border-bottom:1px solid #f3f2f1; }
.admin-table tr:hover td { background:#faf9f8; }
.admin-table .btn-small { padding:3px 8px; font-size:0.78rem; margin-right:4px; }

/* === KIOSK-MODUS === */
body.kiosk-mode .sidebar { display: none !important; }
body.kiosk-mode #start-screen { display: none !important; }
body.kiosk-mode .tabs-header { padding-top: 52px; }
body.kiosk-mode .interview-meta-bar { margin-top: 0; }
body.kiosk-mode #kiosk-start-btn { display: none !important; }
body.kiosk-mode .main-area { width: 100vw !important; }
#kiosk-bar { display: none; }
