@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=Inter:wght@400;500;600;700&display=swap');
:root {
  --bg:#14171c; --panel:#1c2129; --panel-2:#232a34; --accent:#c9a15a;
  --text:#ece8e0; --sub:#8a93a3; --border:rgba(255,255,255,0.08); --danger:#c96a5a; --ok:#5fb37a;
}
* { box-sizing:border-box; }
body { margin:0; background:var(--bg); color:var(--text); font-family:'Inter', system-ui, sans-serif; }
header { display:flex; flex-direction:column; align-items:center; justify-content:center; padding:16px 76px; border-bottom:1px solid var(--border); text-align:center; }
.brand { display:flex; align-items:center; justify-content:center; gap:10px; font-weight:700; }
.mark { width:26px; height:26px; border-radius:50%; border:2px dashed var(--accent); display:flex; align-items:center; justify-content:center; font-family:'IBM Plex Mono', monospace; font-size:9px; color:var(--accent); }
.tag { font-size:12px; color:var(--sub); font-family:'IBM Plex Mono', monospace; margin-top:4px; }

.home-tile {
  position:fixed; top:10px; left:10px; z-index:99999;
  width:52px; height:52px; border-radius:14px;
  background:rgba(15,15,15,0.85); border:1px solid rgba(255,255,255,0.12);
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  text-decoration:none; color:#fff; box-shadow:0 2px 10px rgba(0,0,0,0.4);
  backdrop-filter:blur(4px); -webkit-backdrop-filter:blur(4px);
}
.home-tile:active { background:rgba(255,255,255,0.15); }
.home-tile-icon { width:20px; height:20px; color:var(--accent); }
.home-tile-label { font-size:9px; font-weight:600; letter-spacing:0.03em; text-transform:uppercase; color:#fff; }

.record-box { border:1px solid var(--border); border-radius:12px; padding:18px; text-align:center; margin-bottom:16px; }
.record-btn { display:inline-flex; align-items:center; gap:9px; padding:11px 20px; border-radius:8px; border:1px solid var(--border); background:var(--panel-2); color:var(--text); font-size:13.5px; font-weight:600; cursor:pointer; }
.record-btn.recording { border-color:#c96a5a; color:#e0897a; }
.record-dot { width:9px; height:9px; border-radius:50%; background:#c96a5a; display:none; }
.record-btn.recording .record-dot { display:inline-block; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100%{ opacity:1; } 50%{ opacity:0.25; } }
.record-status { margin-top:9px; font-size:12px; color:var(--sub); font-family:'IBM Plex Mono', monospace; }
.record-hint { margin-top:6px; font-size:11.5px; color:var(--sub); }
.or-divider { text-align:center; color:var(--sub); font-size:11.5px; margin:14px 0; text-transform:uppercase; letter-spacing:0.08em; }


.wrap { max-width:640px; margin:0 auto; padding:20px 20px 60px; }
.section-title { font-size:12px; text-transform:uppercase; letter-spacing:0.08em; color:var(--sub); margin:24px 0 10px; }
.section-title:first-child { margin-top:0; }
.field { margin-bottom:14px; }
.field label { display:block; font-size:12px; color:var(--sub); margin-bottom:5px; }
.field select, .field input[type="text"] { width:100%; padding:10px 11px; border-radius:7px; border:1px solid var(--border); background:var(--panel); color:var(--text); font-size:13.5px; }

.dropzone { border:2px dashed var(--border); border-radius:12px; padding:30px 20px; text-align:center; cursor:pointer; margin-bottom:16px; }
.dropzone:hover { border-color:var(--accent); }
.dropzone .filename { margin-top:8px; font-size:12px; color:var(--accent); font-family:'IBM Plex Mono', monospace; }

.card { background:var(--panel); border:1px solid var(--border); border-radius:12px; padding:20px; margin-bottom:16px; }
.card-title { font-weight:700; font-size:15px; margin-bottom:4px; }
.card-sub { font-size:12px; color:var(--sub); margin-bottom:16px; }

.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:12px 22px; border-radius:8px; border:1px solid var(--accent); background:var(--accent); color:#14171c; font-weight:600; font-size:14px; cursor:pointer; }
.btn.ghost { background:transparent; color:var(--text); border-color:var(--border); }
.btn:disabled { opacity:0.4; cursor:not-allowed; }

.result-row { display:flex; gap:16px; margin:14px 0; }
.result-box { flex:1; background:var(--panel-2); border-radius:9px; padding:16px; text-align:center; }
.result-box .val { font-family:'IBM Plex Mono', monospace; font-size:28px; color:var(--accent); font-weight:700; }
.result-box .lbl { font-size:11px; color:var(--sub); margin-top:4px; text-transform:uppercase; letter-spacing:0.06em; }
.result-box .conf { font-size:10.5px; color:var(--sub); margin-top:6px; }

.tap-area { text-align:center; margin-top:10px; }
.tap-btn { width:100%; padding:20px; font-size:15px; }
.tap-readout { font-family:'IBM Plex Mono', monospace; font-size:13px; color:var(--sub); margin-top:8px; }

.token-bar { display:flex; gap:10px; align-items:center; background:var(--panel-2); border-radius:9px; padding:12px 14px; margin-bottom:14px; }
.token-bar input { flex:1; padding:9px 10px; border-radius:6px; border:1px solid var(--border); background:var(--bg); color:var(--text); font-family:'IBM Plex Mono', monospace; font-size:12.5px; }
.token-status { font-size:11px; white-space:nowrap; }
.token-status.set { color:var(--ok); }
.token-status.unset { color:var(--sub); }

.chip-row { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:14px; }
.chip { padding:8px 14px; border-radius:20px; border:1px solid var(--border); background:var(--panel-2); color:var(--sub); font-size:12.5px; cursor:pointer; }
.chip.active { border-color:var(--accent); color:var(--accent); background:rgba(201,161,90,0.1); }

.mock-toggle { display:flex; align-items:center; gap:8px; font-size:12.5px; color:var(--sub); margin-bottom:14px; }

.status-line { font-size:12px; color:var(--sub); margin-top:10px; font-family:'IBM Plex Mono', monospace; white-space:pre-wrap; }
.status-line.error { color:var(--danger); }
.status-line.ok { color:var(--ok); }

.stem-list { margin-top:14px; }
.stem-item { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid var(--border); }
.stem-item:last-child { border-bottom:none; }

.debug-toggle { font-size:11px; color:var(--sub); cursor:pointer; text-decoration:underline; margin-top:10px; display:inline-block; }
.debug-box { display:none; background:var(--bg); border-radius:7px; padding:10px; margin-top:8px; font-family:'IBM Plex Mono', monospace; font-size:10.5px; color:var(--sub); white-space:pre-wrap; max-height:200px; overflow:auto; }
.debug-box.open { display:block; }

.disclaimer { margin-top:20px; padding:14px 16px; border-radius:9px; background:var(--panel); border:1px solid var(--border); font-size:12px; color:var(--sub); line-height:1.6; }
