:root {
    --void: #0A0F1A;
    --haze: #EEF1F5;
    --edge: #2EB8E0;
    --haze-dim: #B8BFC8;
    --line: #1A222F;
    --warn: #E0A82E;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    background: var(--void);
    color: var(--haze);
    font-family: -apple-system, system-ui, "SF Pro Text", "Inter", Helvetica, Arial, sans-serif;
    font-size: 16px;
    min-height: 100vh;
    min-height: 100dvh;
}

body {
    padding: env(safe-area-inset-top) env(safe-area-inset-right)
             env(safe-area-inset-bottom) env(safe-area-inset-left);
}

main {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 20px 80px;
}

header {
    margin-bottom: 24px;
}

h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--haze-dim);
    margin-bottom: 12px;
}

.subtitle {
    font-size: 13px;
    color: var(--haze-dim);
    margin-top: 4px;
}

.status-card {
    background: rgba(46, 184, 224, 0.04);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
}

.status-grid {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 8px 16px;
    align-items: baseline;
}

.status-grid dt {
    color: var(--haze-dim);
    font-size: 13px;
}

.status-grid dd {
    font-variant-numeric: tabular-nums;
    font-size: 18px;
    text-align: right;
}

.modality-list {
    list-style: none;
}

.modality-list li {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.modality-list li:last-child {
    border-bottom: none;
}

.modality-list .name {
    font-size: 15px;
}

.modality-list .state {
    color: var(--haze-dim);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.modality-list .state.active {
    color: var(--edge);
}

.modality-list .state.phase,
.modality-list .state.denied {
    color: var(--warn);
}

.wallet-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.wallet-line .label {
    color: var(--haze-dim);
    font-size: 13px;
}

#wallet-status {
    font-variant-numeric: tabular-nums;
    font-size: 14px;
}

.wallet-hint {
    color: var(--haze-dim);
    font-size: 12px;
    line-height: 1.5;
}

.actions {
    display: flex;
    gap: 12px;
    margin: 16px 0;
}

.actions button {
    flex: 1;
    background: var(--edge);
    color: var(--void);
    border: 0;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.actions button:disabled {
    background: var(--line);
    color: var(--haze-dim);
    cursor: not-allowed;
}

.actions button:not(:disabled):active {
    opacity: 0.7;
}

.thin-network p {
    color: var(--haze-dim);
    font-size: 12px;
    line-height: 1.55;
}

.typing-pad .pad-hint {
    color: var(--haze-dim);
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.typing-pad textarea {
    width: 100%;
    background: var(--void);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--haze);
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 14px;
    padding: 10px 12px;
    resize: vertical;
    outline: none;
}

.typing-pad textarea:focus {
    border-color: var(--edge);
}

.log ol {
    list-style: none;
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    color: var(--haze-dim);
    max-height: 200px;
    overflow-y: auto;
}

.log ol li {
    padding: 4px 0;
    border-bottom: 1px solid var(--line);
}

.log ol li:last-child {
    border-bottom: none;
}
