/* ── Error Panel ──────────────────────────────────────────────────────────── */

#xlang_error_panel {
    display: none;
    flex-direction: column;
    gap: 14px;
    width: 760px;
    max-width: 96vw;
    margin: 60px auto 0;
    padding: 28px 28px 32px;
    background: #fff9f9;
    border: 1px solid #fecaca;
    border-left: 5px solid #ef4444;
    border-radius: 14px;
    font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
    box-shadow: 0 4px 24px rgba(239,68,68,0.10);
}

#xlang_error_panel.xlang_err_visible {
    display: flex;
}

.xlang_err_badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .4px;
    color: #b91c1c;
    text-transform: uppercase;
}

.xlang_err_location {
    font-size: 13px;
    color: #6b7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.xlang_err_location i {
    color: #ef4444;
    font-size: 12px;
}

.xlang_err_location code {
    background: #fee2e2;
    color: #991b1b;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.xlang_err_code_wrap {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.xlang_err_opener {
    opacity: 0.75;
}

.xlang_err_code_label {
    font-size: 11px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.xlang_err_code {
    display: block;
    background: #1e1e2e;
    color: #f1f5f9;
    padding: 10px 14px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    letter-spacing: .3px;
    white-space: pre-wrap;
    word-break: break-all;
}

.xlang_err_message {
    font-size: 17px;
    font-weight: 600;
    color: #111827;
    line-height: 1.5;
}

.xlang_err_hint {
    font-size: 14px;
    color: #374151;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 10px 14px;
    line-height: 1.5;
}

/* ─────────────────────────────────────────────────────────────────────────── */

body, html, #xbody {
    background-color: transparent;
    height: 100%;
}

#xlang_body {
    margin: 0;
    height: 100%;
    position: relative;
}

#xlang_screen {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 54px;
}

#xlang_title {
    display: block;
    width: 800px;
    top: -40px;
    opacity: 0.9;
    font-size: 26px;
    font-weight: 900;
    color: #138282;
    text-align: center;
    position: absolute;
}

#xlang_canvas {
    background: white;
}

#xlang_dom {
    position: absolute;
    top: 0px;
    width: 800px;
    height: 800px;
    overflow: hidden;
}

#xlang_write {
    position: absolute;
    top: 0px;
    padding: 10px;
    width: 800px;
    height: 800px;
    overflow: hidden;
    z-index: 100;
    font-size: 14px;
    font-weight: 400;
    white-space: pre-wrap;
}

#xlang_write .write {
    padding: 3px;
}

#xlang_write .write.writespan {
    float: left;
}


#xlang_write .writeline {
    margin-top: 0px;
    clear: both;
    width: 100%;
}


.xlang_item {
    position: absolute;
    display: inline-block;
    width: auto;
    height: auto;
}

