* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body { font-family: Arial, Helvetica, sans-serif; background: transparent; color: #1f1f1f; }
#app { padding: 16px; }
#status { padding: 12px; border-radius: 8px; background: #f4f5f7; font-size: 14px; }
.hidden { display: none !important; }
.overlay {
    position: fixed; inset: 0; z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    padding: 16px; background: rgba(0, 0, 0, 0.45);
}
.popup {
    width: min(480px, 100%); max-height: 90vh; overflow-y: auto;
    padding: 24px; border-radius: 12px; background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}
.popup h1 { margin: 0 0 20px; font-size: 22px; }
.loading-area { padding: 18px 0; }
.error-area {
    margin: 12px 0; padding: 12px; border: 1px solid #c62828;
    border-radius: 6px; background: #ffebee; color: #b71c1c;
}
.call-data { margin: 0; }
.data-row {
    display: grid; grid-template-columns: 125px 1fr; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid #eee;
}
.data-row dt { font-weight: 700; }
.data-row dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.question { margin: 24px 0 14px; font-size: 18px; font-weight: 700; }
.button-row { display: flex; gap: 12px; }
.decision-button {
    flex: 1; min-height: 44px; padding: 10px 18px;
    border: 0; border-radius: 7px; font-size: 16px;
    font-weight: 700; cursor: pointer;
}
.decision-button:disabled { cursor: wait; opacity: 0.6; }
.yes-button { background: #168243; color: #fff; }
.no-button { background: #c62828; color: #fff; }


.debug-panel {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #ffffff;
}

.debug-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.debug-header h2 {
    margin: 0;
    font-size: 16px;
}

.debug-actions {
    display: flex;
    gap: 8px;
}

.debug-actions button {
    padding: 6px 10px;
    border: 1px solid #b8b8b8;
    border-radius: 5px;
    background: #f5f5f5;
    cursor: pointer;
}

.debug-hint {
    margin: 10px 0;
    font-size: 13px;
    color: #555;
}

.event-log {
    min-height: 220px;
    max-height: 52vh;
    margin: 0;
    padding: 12px;
    overflow: auto;
    border-radius: 6px;
    background: #161616;
    color: #e8e8e8;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
