/* GymRhythm feedback board — monochrome (black & white), mobile-first. */
:root {
  --ink: #0a0a0a;       /* near-black text */
  --muted: #71717a;     /* gray secondary text */
  --line: #e4e4e7;      /* light gray borders */
  --card: #ffffff;      /* white cards */
  --bg: #f4f4f5;        /* light gray page */
  --black: #0a0a0a;
  /* grayscale status ramp (reviewing → done gets darker) */
  --g-100: #e4e4e7;
  --g-300: #a1a1aa;
  --g-600: #52525b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.05);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.18);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

/* ---------- Hero (black top bar) ---------- */
.hero {
  background: #000;
  color: #fff;
  padding: calc(env(safe-area-inset-top) + 28px) 20px 30px;
  border-bottom: 1px solid #1c1c1f;
}
.hero__inner { max-width: 720px; margin: 0 auto; }
.hero__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.hero__logo {
  height: 30px; width: auto; display: block;
  filter: invert(1);          /* black G asset → white on the black bar */
}
.hero__name { font-weight: 700; letter-spacing: .2px; font-size: 16px; color: #fff; }
.hero__title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.4px; }
.hero__subtitle { margin: 7px 0 0; font-size: 15px; color: #b4b4b8; max-width: 30em; }

/* ---------- Layout ---------- */
.wrap { max-width: 720px; margin: 0 auto; padding: 20px 16px 64px; }

/* ---------- Auth states ---------- */
.state { text-align: center; padding: 64px 20px; color: var(--muted); }
.state__emoji { font-size: 40px; margin-bottom: 10px; filter: grayscale(1); }
.state h2 { color: var(--ink); margin: 0 0 8px; font-size: 20px; }
.state p { margin: 0 auto; max-width: 28em; }
.spinner {
  width: 34px; height: 34px; margin: 0 auto 16px;
  border: 3px solid var(--line); border-top-color: var(--black);
  border-radius: 50%; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; justify-content: flex-end; margin-bottom: 18px; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer;
  font: inherit; font-weight: 650; font-size: 15px;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px;
  transition: transform .06s ease, opacity .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--black); color: #fff; }
.btn--primary:hover { background: #26262b; }
.btn--primary:disabled { opacity: .5; cursor: default; }
.btn--block { width: 100%; justify-content: center; margin-top: 18px; padding: 14px; }
.icon { width: 18px; height: 18px; fill: none; }

/* ---------- Section headings ---------- */
.section-heading {
  font-size: 13px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
  color: var(--muted); margin: 8px 2px 12px;
}
.section-heading--done { margin-top: 34px; }

/* ---------- List + cards ---------- */
.list { display: flex; flex-direction: column; gap: 12px; }
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); border: 1px solid var(--line); padding: 16px;
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
}
.card--done { opacity: .9; }

/* Vote button */
.vote {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 54px; padding: 9px 0; border-radius: 13px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer;
  color: var(--ink); transition: border-color .15s, background .15s, color .15s, transform .06s;
  user-select: none;
}
.vote:hover { border-color: var(--black); }
.vote:active { transform: scale(.94); }
.vote.is-voted { background: var(--black); border-color: var(--black); color: #fff; }
.vote.is-locked { cursor: default; opacity: .65; }
.vote.is-locked:hover { border-color: var(--line); }
.vote__arrow { width: 18px; height: 18px; }
.vote__count { font-weight: 750; font-size: 15px; line-height: 1; }

/* Card body */
.card__body { min-width: 0; }
.card__title { margin: 0 0 4px; font-size: 16px; font-weight: 700; letter-spacing: -.2px; word-wrap: break-word; }
.card__desc { margin: 0; color: #3f3f46; font-size: 14.5px; white-space: pre-wrap; word-wrap: break-word; }
.card__meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; align-items: center; }

/* Chips / badges (grayscale ramp) */
.chip {
  font-size: 11.5px; font-weight: 650; padding: 4px 9px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px; line-height: 1;
}
.chip--cat { background: #f4f4f5; color: #52525b; border: 1px solid var(--line); }
.badge { font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.badge--reviewing { background: var(--g-100); color: #3f3f46; }
.badge--planned   { background: var(--g-300); color: #fff; }
.badge--building  { background: var(--g-600); color: #fff; }
.badge--done      { background: var(--black); color: #fff; }

/* Developer response */
.response {
  margin-top: 12px; padding: 11px 13px; border-radius: 12px;
  background: #f4f4f5; border: 1px solid var(--line); border-left: 3px solid var(--black);
}
.response__label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--ink); }
.response__text { margin: 3px 0 0; font-size: 14px; color: #3f3f46; white-space: pre-wrap; }

/* Admin controls */
.admin {
  margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.admin__label { font-size: 11px; font-weight: 700; color: var(--ink); text-transform: uppercase; letter-spacing: .5px; }
.admin select, .admin .admin__btn {
  font: inherit; font-size: 13px; padding: 6px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink);
}
.admin__btn--danger { color: #fff; background: var(--black); border-color: var(--black); }
.admin__btn--danger:hover { background: #26262b; }

.empty { text-align: center; color: var(--muted); padding: 28px 12px; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; display: grid; place-items: end center; z-index: 50; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(2px); }
.modal__card {
  position: relative; width: 100%; max-width: 560px;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 20px 18px calc(env(safe-area-inset-bottom) + 20px);
  box-shadow: var(--shadow-lg); animation: sheet-up .22s cubic-bezier(.2,.8,.2,1);
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@media (min-width: 600px) {
  .modal { place-items: center; }
  .modal__card { border-radius: 22px; }
}
.modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal__head h2 { margin: 0; font-size: 19px; font-weight: 800; }
.modal__close { border: 0; background: #f4f4f5; width: 32px; height: 32px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }

.field { display: block; margin-bottom: 14px; }
.field__label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 650; color: #3f3f46; margin-bottom: 6px; }
.field__label em { font-style: normal; color: var(--muted); font-weight: 500; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 15px; padding: 11px 12px;
  border: 1.5px solid var(--line); border-radius: 12px; background: #fafafa; resize: vertical; color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--black); background: #fff; }

.seg { display: flex; gap: 8px; margin: 6px 0 4px; }
.seg__opt {
  flex: 1; font: inherit; font-size: 13.5px; font-weight: 600; padding: 9px 6px;
  border: 1.5px solid var(--line); border-radius: 11px; background: #fff; cursor: pointer; color: #52525b;
}
.seg__opt.is-active { border-color: var(--black); background: var(--black); color: #fff; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 22px);
  transform: translateX(-50%); z-index: 60;
  background: var(--black); color: #fff; font-size: 14px; font-weight: 550;
  padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow-lg);
  max-width: 90vw; text-align: center;
}
.toast--error { background: #fff; color: var(--black); border: 1.5px solid var(--black); }

.hidden { display: none !important; }
