:root {
  --bg: #0a0a0a;
  --card: #151515;
  --input: #1e1e1e;
  --line: #2a2a2a;
  --text: #d8d8d8;
  --dim: #7a7a7a;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; min-height: 100vh; font-family: -apple-system, Roboto, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); font-size: 15px; padding-bottom: 28px;
}
a { color: var(--text); }

header { padding: 14px 14px 6px; }
.stats { color: var(--dim); font-size: 12px; }

.tabs { display: flex; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--bg); z-index: 5; overflow-x: auto; }
.tabs button {
  flex: 1 0 auto; padding: 12px 14px; border: none; background: transparent;
  color: var(--dim); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.tabs button.active { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); }

main { padding: 12px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 12px; margin-bottom: 8px;
}
.card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card .title { font-weight: 600; word-break: break-all; }
.card .sub { color: var(--dim); font-size: 12px; margin-top: 2px; }

.badge { font-size: 11px; color: var(--dim); }
.badge.on { color: var(--text); }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  font-size: 12px; padding: 4px 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--input); color: var(--dim);
}
.chip.pick { cursor: pointer; }
.emoji { font-size: 15px; }
.sub.dim { color: var(--dim); font-size: 11px; margin-top: 3px; }
.feed-item { padding: 10px 12px; }
.feed-item a { text-decoration: none; color: var(--dim); }

label { display: block; font-size: 12px; color: var(--dim); margin: 8px 0 3px; }
input, select {
  width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: var(--input); color: var(--text); font-size: 15px;
}
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path d='M2 4l4 4 4-4' stroke='%237a7a7a' stroke-width='1.5' fill='none'/></svg>");
  background-repeat: no-repeat; background-position: right 11px center;
}
select option { background: var(--input); color: var(--text); }
.hint { color: var(--dim); font-size: 12px; margin-top: 6px; }

button.act {
  border: 1px solid var(--line); border-radius: 6px; padding: 11px; width: 100%;
  margin-top: 12px; background: var(--input); color: var(--text);
  font-size: 15px; font-weight: 600;
}
button.mini {
  border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; font-size: 13px;
  background: var(--input); color: var(--text); font-weight: 600;
}
button.mini.danger { color: var(--dim); background: transparent; }

.section-title { font-size: 12px; color: var(--dim); margin: 16px 2px 6px; }
.empty { color: var(--dim); text-align: center; padding: 28px 20px; font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%) translateY(50px);
  background: var(--input); border: 1px solid var(--line); color: var(--text);
  padding: 9px 15px; border-radius: 6px; font-size: 13px; opacity: 0;
  transition: .2s; pointer-events: none; max-width: 90%;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.modal { position: fixed; inset: 0; background: #000c;
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 20; }
.modal[hidden] { display: none; }
.modal .box { background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 16px; width: 100%; max-width: 360px; }
.modal .err { color: var(--text); font-size: 12px; margin-top: 8px; min-height: 14px; }
