/*
 * BikeGuess. Dark ground, one accent — and the accent is BikeFind's own yellow, so the game reads
 * as the shop's sibling without looking like the shop (design canvas, 2026-09-20). The ground stays
 * dark on purpose: nobody mistakes a game for a recommendation. Mobile first: one column, 16px
 * gutters, every tap target at least 48px, the price in a size a thumb can read from arm's length.
 *
 * `--mid` is amber, not yellow: the middle tile, the "close" reaction and the accuracy pill share
 * it, and they must not be mistaken for the brand colour beside them.
 */
:root {
  --bg: #101114;
  --card: #191b20;
  --line: #2a2d35;
  --fg: #f4f4f1;
  --mut: #9a9fa8;
  --acc: #ffd400;
  --acc-ink: #17191d;
  --ok: #4fdc7a;
  --mid: #ffb020;
  --bad: #ff5c5c;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
a { color: var(--acc); }
button { font: inherit; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -0.02em; text-decoration: none; color: var(--fg); font-size: 20px; }
.brand .mark { width: 40px; height: auto; display: block; }
.hero-mark { display: flex; justify-content: center; padding: 6px 0 2px; }
.hero-mark svg { width: 150px; height: auto; }
.mark-result { width: 64px; height: auto; flex: none; }
.totalrow { display: flex; align-items: center; gap: 14px; }
.lang { color: var(--mut); text-decoration: none; font-size: 14px; padding: 8px; }

main { flex: 1; width: 100%; max-width: 520px; margin: 0 auto; padding: 0 16px 24px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 16px; }
h1 { font-size: 28px; line-height: 1.15; margin: 4px 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 20px; margin: 0 0 8px; }
.how, .small, .mut { color: var(--mut); font-size: 15px; }
.nojs { color: var(--mid); }

.primary, .ghost, .fine button, .pad button {
  min-height: 48px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  padding: 0 18px;
  font-weight: 700;
}
.primary { width: 100%; background: var(--acc); color: var(--acc-ink); font-size: 18px; margin-top: 8px; }
.primary:disabled { opacity: 0.45; cursor: default; }
.ghost { width: 100%; background: transparent; color: var(--fg); border: 1px solid var(--line); margin-top: 10px; }

.meta { display: flex; justify-content: space-between; color: var(--mut); font-size: 14px; margin-bottom: 8px; }
.shot {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: #fff;
  border-radius: 10px;
  display: block;
}
.name { font-size: 22px; font-weight: 800; margin: 12px 0 2px; letter-spacing: -0.01em; }
.cat { color: var(--mut); font-size: 14px; margin-bottom: 10px; }
.spec { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 15px; margin: 0 0 14px; }
.spec dt { color: var(--mut); margin: 0; }
.spec dd { margin: 0; }

.ask { font-weight: 700; margin: 6px 0 4px; }
.price { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; text-align: center; margin: 4px 0; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; height: 48px; margin: 0; accent-color: var(--acc); }
input[type="range"]::-webkit-slider-thumb { width: 34px; height: 34px; }
.range-ends { display: flex; justify-content: space-between; color: var(--mut); font-size: 13px; margin-top: -6px; }
.fine { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 10px 0 4px; }
.fine button { background: var(--line); color: var(--fg); padding: 0; font-variant-numeric: tabular-nums; }
.pad input {
  width: 100%;
  min-height: 56px;
  font: inherit;
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-variant-numeric: tabular-nums;
}

/* The clock. Grey and thin while there is time, amber under five seconds, red and pulsing under three. */
.timer { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; }
.timer-track { flex: 1; height: 4px; background: var(--line); border-radius: 2px; overflow: hidden; }
.timer-bar { height: 100%; width: 100%; background: var(--mut); border-radius: 2px; transition: width 0.1s linear, background-color 0.3s; }
.timer-num { min-width: 34px; text-align: right; font-size: 13px; color: var(--mut); font-variant-numeric: tabular-nums; }
.timer.warn .timer-bar { background: var(--mid); }
.timer.warn .timer-num { color: var(--mid); }
.timer.urgent .timer-bar { background: var(--bad); }
.timer.urgent .timer-num { color: var(--bad); font-weight: 800; animation: pulse 0.5s infinite alternate; }
@keyframes pulse { from { opacity: 0.45; } to { opacity: 1; } }
.timeup { color: var(--mid); font-size: 14px; margin: 0 0 6px; }

.reveal { margin-top: 8px; }
.reveal .big { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.reveal .row { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-top: 1px solid var(--line); font-size: 15px; }
.reveal .row:first-of-type { border-top: 0; }
.reveal .row b { font-variant-numeric: tabular-nums; }
.pts { display: inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 800; background: var(--line); }
.pts.g { background: var(--ok); color: var(--acc-ink); }
.pts.y { background: var(--mid); color: var(--acc-ink); }
.pts.r { background: var(--bad); color: #fff; }
.pts.s { background: var(--acc); color: var(--acc-ink); margin-left: 6px; }
.pills { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 0; justify-content: flex-end; }
.breakdown { color: var(--mut); font-size: 14px; margin: -4px 0 10px; }
.bucket { color: var(--mut); font-size: 14px; margin: 10px 0 0; }
.bf { display: block; margin-top: 12px; font-weight: 700; }

.react { font-size: 22px; font-weight: 800; margin: 0 0 4px; letter-spacing: -0.01em; }
.react.g { color: var(--ok); }
.react.y { color: var(--mid); }
.react.r { color: var(--bad); }

/* The leaderboard: one question (your name), asked once, and a list of ten. */
.nick label { display: block; font-weight: 700; margin: 14px 0 4px; }
.nick .hint { color: var(--mut); font-size: 14px; margin: 0 0 8px; }
.nick input {
  width: 100%;
  min-height: 48px;
  font: inherit;
  font-size: 18px;
  padding: 0 12px;
  background: var(--bg);
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.nick .err { color: var(--bad); font-size: 14px; margin: 6px 0 0; }
.standing { font-size: 18px; font-weight: 700; margin: 10px 0 2px; }
.standing .pct { color: var(--acc); }
.board { margin-top: 18px; }
.board h3 { font-size: 16px; margin: 0 0 6px; color: var(--mut); }
.board ol { list-style: none; margin: 0; padding: 0; }
.board li { display: grid; grid-template-columns: 2.2em 1fr auto; gap: 8px; padding: 7px 8px; border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.board li:first-child { border-top: 0; }
.board li .r { color: var(--mut); }
.board li .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board li b { font-weight: 800; }
.board li.you { background: var(--line); border-radius: 8px; }
.board .mut { font-size: 14px; }

.total { font-size: 44px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin: 4px 0; }
.tiles { display: flex; gap: 6px; margin: 2px 0 10px; }
.tile { flex: 1; height: 44px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; font-variant-numeric: tabular-nums; color: var(--acc-ink); }
.tile.g { background: var(--ok); }
.tile.y { background: var(--mid); }
.tile.r { background: var(--bad); color: #fff; }
.offby { font-size: 18px; margin: 0 0 6px; }
.worst { color: var(--mut); font-size: 15px; margin: 0 0 12px; }
.streak { color: var(--mut); font-size: 14px; margin: 12px 0 0; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--acc); color: var(--acc-ink); padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 15px; }

.foot { color: var(--mut); font-size: 13px; text-align: center; padding: 14px 16px 24px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--mut); }
