/* ...existing styles... */
:root {
  --bg: #fff;
  --text: #111;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #111;
  --primary-contrast: #fff;
}
* { box-sizing: border-box; }
body { margin:0; font-family:"Cal Sans","Noto Sans",system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,"Noto Sans","Apple Color Emoji","Segoe UI Emoji",sans-serif; color:var(--text); background:var(--bg); }
.topbar { display:flex; justify-content:space-between; align-items:center; padding:12px 16px; border-bottom:1px solid var(--border); position:sticky; top:0; background:var(--bg); z-index:10; }
.brand { font-weight:700; letter-spacing:.3px; }
.token-status { font-size:12px; color:var(--muted); }

.container { padding:12px 12px 80px; max-width:720px; margin:0 auto; }
.tabs { display:flex; gap:8px; margin:12px 0 16px; }
.tab { flex:1; padding:10px 12px; border:1px solid var(--border); background:#fff; color:#111; border-radius:10px; font-weight:600; }
.tab.active { border-color:#111; box-shadow:0 1px 0 #000; }
.panel { display:none; }
.panel.active { display:block; }

.form { display:flex; flex-direction:column; gap:12px; }
.label { font-size:13px; color:var(--muted); }
.input { width:100%; padding:10px 12px; border:1px solid var(--border); border-radius:10px; background:#fff; }
.file { width:100%; }

.row.two { display:flex; gap:10px; }
.row.two .col { flex:1; }
@media (max-width:560px) { .row.two { flex-direction:column; } }

.preview { display:flex; gap:8px; flex-wrap:wrap; }
.preview img { width:96px; height:96px; object-fit:cover; border-radius:10px; border:1px solid var(--border); }

.btn { padding:12px 14px; border-radius:12px; border:1px solid var(--border); background:#fff; font-weight:600; }
.btn.primary { background:var(--text); color:var(--primary-contrast); border-color:var(--text); }
.btn[disabled] { opacity:.6; }

.status { margin-top:8px; font-size:13px; color:var(--muted); display:flex; align-items:center; gap:8px; min-height:24px; }
.status .dot { width:8px; height:8px; border-radius:50%; background:var(--muted); animation:pulse 1s infinite; }
@keyframes pulse { 0%{opacity:.4} 50%{opacity:1} 100%{opacity:.4} }

.output { margin-top:12px; }
.output img { width:100%; border-radius:12px; border:1px solid var(--border); }

.footer { position:fixed; bottom:0; left:0; right:0; padding:10px 16px; border-top:1px solid var(--border); background:var(--bg); display:flex; justify-content:center; }
.footer small { color:var(--muted); }

.mention-wrap { position:relative; }
.mention-list { position:absolute; left:8px; right:8px; bottom:8px; transform:translateY(100%); background:#fff; border:1px solid var(--border); border-radius:10px; box-shadow:0 8px 24px rgba(0,0,0,.06); padding:6px; display:flex; gap:6px; flex-wrap:wrap; }
.mention-chip { padding:6px 8px; border-radius:999px; border:1px solid var(--border); font-size:12px; }
.mention-chip.active { border-color:#111; }
/* ...existing styles... */

.preview-item {
  position: relative;
}

.delete-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 16px;
  font-weight: bold;
  line-height: 24px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}
