/* styles.css — mobile-first, big tap targets, one-handed. */
:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1f242e;
  --line: #2a313d;
  --text: #eef1f6;
  --muted: #9aa4b2;
  --brand: #5b8cff;
  --brand-press: #4a78e6;
  --good: #34d399;
  --bad: #f87171;
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding: 0 16px env(safe-area-inset-bottom);
  max-width: 560px;
  margin: 0 auto;
}

/* header */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 2px 10px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 5;
}
.brand { display: flex; align-items: center; gap: 9px; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand), #8a5bff);
}
.brand-name { font-weight: 700; letter-spacing: .2px; }
.quota {
  font-size: 13px; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--line);
  padding: 4px 10px; border-radius: 999px;
}

/* hero */
.hero { font-size: 26px; line-height: 1.15; margin: 6px 0 6px; }
.hero-sub { color: var(--muted); margin: 0 0 16px; }

/* steps */
.step { padding-bottom: 28px; }
.hidden { display: none !important; }
.step-title { font-size: 20px; margin: 4px 0 4px; }
.step-hint { color: var(--muted); margin: 0 0 14px; font-size: 14px; }

/* drop / camera */
.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; text-align: center;
  border: 1.5px dashed var(--line); border-radius: var(--radius);
  background: var(--panel);
  padding: 26px 16px; min-height: 128px; cursor: pointer;
}
.drop.dragover { border-color: var(--brand); background: var(--panel-2); }
.drop-text { font-weight: 600; font-size: 17px; }
.drop-sub { color: var(--muted); font-size: 13px; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }

/* inputs */
.note, .text-input, .voice, .facts input {
  width: 100%; color: var(--text); background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px;
  font-size: 16px; /* keeps iOS from zooming on focus */
}
.note { margin-top: 12px; resize: vertical; }
.markets { border: 1px solid var(--line); border-radius: 12px; margin: 14px 0 0; padding: 10px 12px; }
.markets legend { color: var(--muted); font-size: 13px; padding: 0 6px; }
.market-options { display: flex; flex-wrap: wrap; gap: 14px; }
.market-options label { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.market-cb { width: 20px; height: 20px; accent-color: var(--brand); }
.row { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.voice-label { color: var(--muted); font-size: 14px; }
.voice { flex: 1; }

/* buttons */
.primary, .ghost {
  width: 100%; margin-top: 16px; padding: 15px 16px;
  font-size: 17px; font-weight: 600; border-radius: 12px; border: 0; cursor: pointer;
  min-height: 52px;
}
.primary { background: var(--brand); color: #fff; }
.primary:active { background: var(--brand-press); }
.primary:disabled { opacity: .45; }
.ghost { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }
.ghost.wide { margin-top: 18px; }
.actions { display: flex; gap: 12px; }
.actions .primary, .actions .ghost { margin-top: 18px; }
.actions .ghost { flex: 0 0 38%; }
.actions .primary { flex: 1; }

/* facts */
.facts { display: flex; flex-direction: column; gap: 10px; }
.fact { display: flex; flex-direction: column; gap: 5px; }
.fact label { color: var(--muted); font-size: 13px; text-transform: capitalize; }
.confidence { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.confidence.low { color: var(--bad); }

/* results */
.results { display: flex; flex-direction: column; gap: 14px; }
.tag-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.tag-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tag-market { font-weight: 700; }
.copy-btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 14px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 40px;
}
.copy-btn.copied { background: var(--good); color: #04210f; border-color: var(--good); }
.tag-field { margin-top: 9px; }
.tag-field .lbl { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.tag-field .val { margin-top: 2px; white-space: pre-wrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-size: 13px; }

/* status */
.status {
  position: sticky; bottom: 12px; margin-top: 16px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; font-size: 15px; text-align: center;
}
.status.error { border-color: var(--bad); color: var(--bad); }
.status.spinner::after {
  content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 8px;
  border: 2px solid var(--muted); border-top-color: transparent; border-radius: 50%;
  vertical-align: -2px; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* footer */
.foot { color: var(--muted); font-size: 12px; text-align: center; padding: 18px 0 26px; }
