:root {
  --black: #0a0a0a;
  --ink: #141414;
  --panel: #ffffff;
  --bg: #f6f5f1;
  --line: #e7e4dc;
  --muted: #6d6a62;
  --text: #121212;
  --gold: #d4af37;
  --gold-deep: #9a7b1a;
  --gold-soft: #f6efd6;
  --green: #1f8a4c;
  --red: #c0392b;
  --amber: #b7791f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --sans: 'Inter', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--text); background: var(--bg); line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: .01em; line-height: 1.1; margin: 0 0 .4em; }
.gold { color: var(--gold); }
.gold-deep { color: var(--gold-deep); }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--black); background: var(--black); color: #fff; padding: 10px 18px; border-radius: 999px; font: 600 14px var(--sans); cursor: pointer; text-decoration: none; transition: transform .1s, background .2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--black); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--text); }
.btn.sm { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: transparent; color: var(--red); border-color: #f0c9c4; }

input, textarea, select { width: 100%; font: 14px var(--sans); padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--gold); outline-offset: -1px; border-color: transparent; }
textarea { resize: vertical; min-height: 90px; }
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { font-size: 20px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #f0eee8; color: var(--muted); }
.tag.positive { background: #e3f4ea; color: var(--green); }
.tag.negative { background: #fbe7e4; color: var(--red); }
.tag.neutral { background: #fbf1dc; color: var(--amber); }
.tag.gold { background: var(--gold-soft); color: var(--gold-deep); }
.tag.dark { background: var(--black); color: var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--gold-soft); color: var(--gold-deep); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 500; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; padding: 0; line-height: 1; }
.chip.neg { background: #fbe7e4; color: var(--red); }
.stars { color: var(--gold); letter-spacing: 1px; }
.stars .off { color: #d9d5c9; }

/* toggle */
.switch { position: relative; width: 44px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d6d2c6; border-radius: 99px; cursor: pointer; transition: .2s; }
.switch span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--black); }
.switch input:checked + span::before { transform: translateX(20px); background: var(--gold); }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--black); color: #fff; padding: 12px 20px; border-radius: 999px; font-size: 14px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: calc(100vw - 32px); }
.toast.err { background: var(--red); }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
