:root{--bg:#0d0d11;--surface:#1a1a24;--surface-hover:#25252f;--border:#33334a;--text:#e8e8f0;--text-dim:#9999aa;--accent:#8b5cf6;--accent-hover:#a78bfa;--green:#22c55e;--red:#ef4444}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans JP",sans-serif;background:var(--bg);color:var(--text);line-height:1.6;max-width:720px;margin:0 auto;padding:16px}
header{text-align:center;padding:24px 0 16px}
header h1{font-size:1.6rem}
.subtitle{color:var(--text-dim);font-size:.85rem;margin-top:4px}
nav{display:flex;gap:8px;border-bottom:1px solid var(--border);padding-bottom:12px;margin-bottom:20px}
.nav-btn{background:transparent;border:1px solid var(--border);color:var(--text-dim);padding:8px 16px;border-radius:8px;cursor:pointer;font-size:.9rem;transition:all .2s}
.nav-btn:hover:not(:disabled){background:var(--surface-hover);color:var(--text)}
.nav-btn.active{background:var(--accent);color:#fff;border-color:var(--accent)}
.nav-btn:disabled{opacity:.4;cursor:not-allowed}
.view{display:none}
.view.active{display:block}
h2{font-size:1.2rem;margin-bottom:8px}
.view>p{color:var(--text-dim);font-size:.85rem;margin-bottom:12px}
.input-group{display:flex;gap:8px;margin-bottom:16px}
input[type=text]{flex:1;background:var(--surface);border:1px solid var(--border);color:var(--text);padding:10px 14px;border-radius:8px;font-size:.95rem}
input[type=text]:focus{outline:none;border-color:var(--accent)}
button{background:var(--accent);color:#fff;border:none;padding:10px 20px;border-radius:8px;cursor:pointer;font-size:.9rem;font-weight:600;transition:background .2s}
button:hover:not(:disabled){background:var(--accent-hover)}
button:disabled{opacity:.5;cursor:not-allowed}
.result{margin-top:8px}
.status{padding:8px 12px;border-radius:8px;font-size:.85rem;margin-bottom:12px}
.status.loading{background:rgba(139,92,246,.15);color:var(--accent-hover)}
.status.success{background:rgba(34,197,94,.15);color:var(--green)}
.status.error{background:rgba(239,68,68,.15);color:var(--red)}
.profile-card{background:var(--surface);border:1px solid var(--border);border-radius:12px;padding:20px;margin-bottom:20px}
.profile-header{display:flex;gap:16px;align-items:flex-start}
.profile-avatar{width:64px;height:64px;border-radius:50%;background:var(--border);object-fit:cover;flex-shrink:0}
.profile-info h3{font-size:1.1rem;margin-bottom:2px}
.profile-info .npub{color:var(--text-dim);font-size:.75rem;word-break:break-all}
.profile-info .nip05{color:var(--green);font-size:.8rem}
.profile-about{margin-top:12px;font-size:.9rem;color:var(--text-dim);white-space:pre-wrap}
.search-item{display:flex;gap:12px;align-items:center;background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:12px 16px;margin-bottom:8px;cursor:pointer;transition:background .2s}
.search-item:hover{background:var(--surface-hover)}
.search-item img{width:40px;height:40px;border-radius:50%;background:var(--border);object-fit:cover;flex-shrink:0}
.search-item .name{font-weight:600;font-size:.95rem}
.search-item .nip05{color:var(--green);font-size:.8rem}
.search-item .npub{color:var(--text-dim);font-size:.75rem}
.note{background:var(--surface);border:1px solid var(--border);border-radius:10px;padding:14px 16px;margin-bottom:10px}
.note-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}
.note-author{font-weight:600;font-size:.9rem}
.note-time{color:var(--text-dim);font-size:.75rem}
.note-content{font-size:.92rem;white-space:pre-wrap;word-break:break-word}
.note-content a{color:var(--accent-hover);text-decoration:none}
.note-content a:hover{text-decoration:underline}
.img-toggle{display:inline-block;color:var(--accent-hover);cursor:pointer;font-size:.88rem;padding:2px 6px;border:1px dashed var(--border);border-radius:6px;margin:2px 0}
.img-toggle:hover{background:var(--surface-hover)}
.note-image{margin:8px 0}
.note-image img{max-width:100%;border-radius:8px;border:1px solid var(--border)}
.section-title{font-size:1rem;font-weight:600;margin:20px 0 10px;padding-bottom:6px;border-bottom:1px solid var(--border)}
.empty{color:var(--text-dim);font-size:.9rem;padding:20px;text-align:center}
footer{text-align:center;padding:24px 0;color:var(--text-dim);font-size:.75rem;border-top:1px solid var(--border);margin-top:20px}
