/* Shop League — Take 5 brand theme
   Red #E02010 · Yellow #F0C000 · Black · Off-white #F0F0F0
   Chunky, bold, high-contrast, flat. */
:root {
  --bg: #F0F0F0;
  --card: #ffffff;
  --line: #111111;
  --text: #141414;
  --dim: #5c5c5c;
  --red: #E02010;
  --yellow: #F0C000;
  --yellow-soft: #FFF3C4;
  --green: #1d9e4b;
  --blue: #E02010;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Arial Black", sans-serif;
  font-size: 15px; line-height: 1.45;
  padding-bottom: 84px;
}

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--red);
  border-bottom: 3px solid #000;
  padding: 12px 16px 10px;
}
.brand {
  font-size: 22px; font-weight: 900; letter-spacing: .5px;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #000;
}
.brand .tag {
  font-size: 10px; font-weight: 800; vertical-align: middle;
  background: var(--yellow); color: #000;
  border: 2px solid #000; border-radius: 20px;
  padding: 2px 8px; margin-left: 8px;
  text-shadow: none;
}
.sub { font-size: 12px; color: #fff; margin-top: 2px; font-weight: 600; }

main { max-width: 520px; margin: 0 auto; padding: 12px 12px 20px; }

/* ---------- cards ---------- */
.card {
  background: var(--card); border: 2px solid var(--line);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
  box-shadow: 3px 3px 0 #111;
}
.card h3 { margin: 0 0 10px; font-size: 16px; font-weight: 900; }
.dim { color: var(--dim); }
.small { font-size: 12.5px; }

/* ---------- leaderboard rows ---------- */
.row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 2px solid var(--line);
  border-radius: 12px; padding: 12px; margin-bottom: 8px;
  width: 100%; color: inherit; font: inherit; text-align: left; cursor: pointer;
  box-shadow: 2px 2px 0 #111;
}
.row:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 #111; }
.rank {
  font-size: 22px; font-weight: 900; width: 38px; text-align: center; flex: none;
  background: #eee; border: 2px solid #111; border-radius: 10px; padding: 2px 0;
}
.rank.r1 { background: var(--yellow); color: #000; }
.rank.r2 { background: #d7dbe2; color: #000; }
.rank.r3 { background: #f0b26b; color: #000; }
.store-no { font-weight: 900; font-size: 18px; }
.row .meta { flex: 1; min-width: 0; }
.row .pts { font-weight: 900; font-size: 19px; color: var(--red); }
.trend-up { color: var(--green); font-weight: 800; }
.trend-down { color: var(--red); font-weight: 800; }
.trend-flat { color: var(--dim); }
.bar { height: 8px; background: #e2e2e2; border: 1px solid #111; border-radius: 5px; margin-top: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--red); border-radius: 3px; }

/* ---------- shop picker chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.chip {
  border: 2px solid #111; background: #fff; color: var(--text);
  border-radius: 20px; padding: 8px 14px; font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 2px 2px 0 #111;
}
.chip.active { background: var(--yellow); border-color: #111; color: #000; }

/* ---------- stat cards ---------- */
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.stat { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 10px 8px; text-align: center; box-shadow: 2px 2px 0 #111; }
.stat .v { font-size: 18px; font-weight: 900; }
.stat .l { font-size: 11px; color: var(--dim); margin-top: 2px; font-weight: 700; }

/* ---------- tables ---------- */
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 8px 6px; border-bottom: 2px solid #e0e0e0; text-align: right; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th { color: #000; font-weight: 900; font-size: 11.5px; text-transform: uppercase; }
table.data td { font-weight: 600; }

/* ---------- trend bars ---------- */
.trendbars { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin: 6px 0 2px; }
.trendbars .tb { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.trendbars .tb i { width: 100%; max-width: 34px; background: var(--red); border: 2px solid #111; border-bottom: 0; border-radius: 5px 5px 0 0; min-height: 3px; }
.trendbars .tb span { font-size: 10px; color: var(--dim); margin-top: 4px; font-weight: 700; }

/* ---------- roster ---------- */
.member { background: var(--card); border: 2px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; box-shadow: 2px 2px 0 #111; }
.member .nm { font-weight: 900; font-size: 16px; }
.member .rl { color: var(--dim); font-size: 12.5px; font-weight: 700; }
.member .kv { display: flex; gap: 14px; margin-top: 8px; flex-wrap: wrap; font-size: 13px; }
.member .kv b { display: block; font-size: 17px; color: var(--red); }
.certs { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.cert { background: var(--yellow-soft); border: 2px solid #111; border-radius: 16px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.empty-note { color: var(--dim); font-size: 13px; }

/* ---------- forms ---------- */
label.f { display: block; margin-bottom: 10px; font-size: 13px; color: var(--text); font-weight: 700; }
label.f input, label.f select {
  display: block; width: 100%; margin-top: 4px;
  background: #fff; border: 2px solid #111; color: var(--text);
  border-radius: 10px; padding: 12px; font-size: 16px; font-weight: 600;
}
.btn {
  display: block; width: 100%; border: 2px solid #111; border-radius: 12px;
  background: var(--yellow); color: #000; font-weight: 900; font-size: 16px;
  padding: 14px; cursor: pointer; margin-top: 6px;
  box-shadow: 3px 3px 0 #111;
}
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #111; }
.btn.ghost { background: #fff; color: var(--text); border: 2px solid #111; }
.msg { margin-top: 10px; font-size: 14px; font-weight: 800; }
.msg.ok { color: var(--green); } .msg.err { color: var(--red); }
.goalrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.goalrow .sn { font-weight: 900; width: 52px; flex: none; }
.goalrow input {
  flex: 1; min-width: 0; background: #fff; border: 2px solid #111;
  color: var(--text); border-radius: 10px; padding: 10px; font-size: 15px; font-weight: 600;
}
.goalrow .u { font-size: 11px; color: var(--dim); width: 64px; flex: none; font-weight: 700; }

/* ---------- tab bar ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; background: #000; border-top: 3px solid #000;
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom));
}
.tabbar button {
  flex: 1; background: none; border: 0; color: #8a8a8a;
  font-size: 20px; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px; cursor: pointer;
}
.tabbar button span { font-size: 11px; font-weight: 800; }
.tabbar button.active { color: var(--yellow); }

.howto ol { margin: 8px 0; padding-left: 20px; }
.howto li { margin-bottom: 6px; }
code.pin { background: var(--yellow); border: 2px solid #111; border-radius: 6px; padding: 1px 7px; font-weight: 900; color: #000; }

/* ---------- v2: quiz, reviews, qlik ---------- */
.badge {
  display: inline-block; background: var(--red); color: #fff;
  border: 2px solid #111; border-radius: 12px; font-size: 10px; font-weight: 900;
  padding: 0 7px; margin-left: 2px; vertical-align: middle;
}
.qq { font-size: 16px; font-weight: 800; margin: 10px 0 12px; }
.qchoice { margin-bottom: 8px; text-align: left; }
.sampletag {
  display: inline-block; background: var(--yellow); color: #000;
  border: 2px dashed #111; border-radius: 6px;
  font-size: 10.5px; font-weight: 900; padding: 2px 8px; margin-bottom: 6px; letter-spacing: .4px;
}
.sampletag.sm { margin-bottom: 0; }
.qrow {
  display: flex; gap: 8px; align-items: flex-start;
  border-bottom: 2px solid #e0e0e0; padding: 8px 0;
}
.qrow .qq-small { flex: 1; font-size: 13px; font-weight: 600; }
.btn.smbtn { width: auto; padding: 8px 14px; font-size: 13px; margin-top: 0; flex: none; box-shadow: 2px 2px 0 #111; }
.rolenote {
  background: var(--yellow-soft); border: 2px dashed #111; color: #000;
  border-radius: 8px; font-size: 12px; font-weight: 700; padding: 6px 10px; margin-top: 8px;
}
.alertcard { border-color: var(--red); }
.miniselect {
  background: #fff; border: 2px solid #111; color: var(--text);
  border-radius: 8px; padding: 8px; font-size: 13px; font-weight: 700; max-width: 130px;
}
label.f input[type="file"] { padding: 10px; font-size: 14px; }
