:root { color-scheme: dark; --bg:#0f1115; --card:#1a1e26; --text:#e8ebf0; --muted:#9aa3b2; --accent:#5b8cff; --danger:#ff6b6b; --border:#2a3040; }
@media (prefers-color-scheme: light) { :root { color-scheme: light; --bg:#f6f7f9; --card:#ffffff; --text:#161a22; --muted:#5b6472; --border:#d9dee7; } }
* { box-sizing: border-box; }
body { margin:0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background:var(--bg); color:var(--text); }
header { display:flex; justify-content:space-between; align-items:center; padding:14px 16px; border-bottom:1px solid var(--border); }
h1 { font-size:20px; margin:0; } h2 { font-size:17px; }
main { max-width:720px; margin:0 auto; padding:16px; display:flex; flex-direction:column; gap:14px; }
label { display:flex; flex-direction:column; gap:6px; font-size:14px; color:var(--muted); }
label.row, .row { display:flex; flex-direction:row; align-items:center; gap:10px; flex-wrap:wrap; color:var(--text); }
input[type="text"] { padding:12px; border-radius:10px; border:1px solid var(--border); background:var(--card); color:var(--text); font-size:16px; width:100%; }
button, .button { padding:10px 14px; border-radius:10px; border:1px solid var(--border); background:var(--card); color:var(--text); font-size:15px; cursor:pointer; text-decoration:none; min-height:44px; }
button.primary { background:var(--accent); border-color:var(--accent); color:#fff; font-weight:600; }
button.danger { color:var(--danger); }
.address code { font-size:16px; word-break:break-all; }
.warn, .meta, .empty { color:var(--muted); }
.error { color:var(--danger); }
.list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; }
.list .msg { width:100%; text-align:start; white-space:normal; word-break:break-word; }
.list .msg.active { border-color:var(--accent); }
#viewer { border:1px solid var(--border); border-radius:12px; padding:14px; background:var(--card); }
#frame { width:100%; min-height:320px; border:1px solid var(--border); border-radius:8px; background:#fff; }
#textBody { white-space:pre-wrap; word-break:break-word; font-family:inherit; }
.codebox { border:1px dashed var(--accent); border-radius:10px; padding:10px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.codebox strong { font-size:22px; letter-spacing:2px; }
a { color:var(--accent); word-break:break-all; }
[dir="rtl"] .list .msg { text-align:right; }
