/* DRAGDUEL "Pick your fight" layer: arrival picker, swap cards, Race 'em, Specs / Race modes.
   Loads after styles.css and mobile.css. */
:root { --hdr: 69px; }
.ico { width: 18px; height: 18px; flex: none; display: block; }

/* ---------- hero ---------- */
.pf { padding: 22px 0 4px; }
.pf-head { text-align: center; max-width: 780px; margin: 0 auto; }
.pf-eyebrow { color: var(--acc); font-size: 12.5px; font-weight: 800; letter-spacing: 2.2px; text-transform: uppercase; }
.pf h1 { font-size: 46px; line-height: 1.05; margin: 6px 0 6px; font-style: italic; font-weight: 900; letter-spacing: -0.5px; text-transform: uppercase; }
.pf.filled h1 { font-size: 32px; text-transform: none; letter-spacing: -0.3px; }
.pf h1 em { color: var(--acc); font-style: italic; padding: 0 2px; }
.pf-sub { color: var(--mut); margin: 0; font-size: 15.5px; line-height: 1.45; }

.pf-tools { display: flex; align-items: center; justify-content: center; gap: 10px 14px; flex-wrap: wrap; margin: 16px auto 0; }
.pf-find { display: flex; justify-content: center; flex: 0 1 380px; min-width: 0; }
.pf-search {
  position: relative; flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px;
  background: var(--panel); border: 1px solid #323a46; border-radius: 14px; color: var(--mut);
}
.pf-search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 3px rgba(255, 59, 47, 0.35); }
.pf-search > svg { width: 18px; height: 18px; flex: none; }
.pf-search input { flex: 1; min-width: 0; height: 100%; background: transparent; border: 0; outline: none; color: var(--txt); font-size: 16px; }
.pf-search input::placeholder { color: var(--mut); }
.pf-search input:focus-visible { outline: none; }
.pf-suggest {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 9; text-align: left;
  background: #10141a; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}
.pf-suggest button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 14px 8px 10px; min-height: 52px;
  background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--txt); text-align: left;
}
.pf-suggest button:last-child { border-bottom: 0; }
.pf-suggest button:hover, .pf-suggest button.on { background: #1b222b; }
.pf-suggest button:disabled { opacity: 0.5; cursor: default; }
.pf-suggest .sprite { width: 72px; height: 28px; object-fit: contain; flex: none; }
.pf-suggest .nm { min-width: 0; flex: 1; }
.pf-suggest .nm b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-suggest .nm small { display: block; color: var(--mut); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-suggest .cat { flex: none; color: var(--mut); font-size: 11.5px; font-weight: 750; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; }
.pf-none { padding: 14px; color: var(--mut); font-size: 13.5px; }

.pf-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 0; }
.modal-cats { margin: 0 0 12px; }
.pf-cats::-webkit-scrollbar { display: none; }
.pf-cat {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--panel); color: var(--txt); border-radius: 999px;
  padding: 7px 12px; font-size: 13px; font-weight: 750;
}
.pf-cat small { color: var(--mut); font-weight: 650; font-size: 12px; }
.pf-cat:hover { border-color: #3a4452; background: var(--panel2); }
.pf-cat.on { background: var(--txt); color: #111; border-color: var(--txt); }
.pf-cat.on small { color: #4b5563; }
.pf-cat .ico { width: 16px; height: 16px; }
.pf-surprise { color: var(--acc); border-color: rgba(255, 59, 47, 0.45); }

/* ---------- slots ---------- */
.pf-slots {
  display: grid; grid-template-columns: minmax(0, 1fr) 46px minmax(0, 1fr) 46px minmax(0, 1fr);
  align-items: stretch; margin: 18px 0 0;
}
.pf-slots .skeleton { height: 318px; }
.pf-vs {
  align-self: center; justify-self: center; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: #0f1317; border: 1px solid var(--line); color: var(--acc); font-weight: 900; font-style: italic; font-size: 13px; letter-spacing: 0.5px;
}
.pf-empty {
  position: relative; min-height: 190px; border: 2px dashed #323a46; border-radius: 18px;
  background: rgba(20, 24, 29, 0.55); transition: border-color 0.15s ease, background 0.15s ease;
}
.pf-empty:hover { border-color: var(--acc); background: rgba(255, 59, 47, 0.05); }
.pf-empty.next { border-color: #4a5463; }
.pf-empty.opt:not(.next) { opacity: 0.8; }
.pf-choose {
  position: absolute; inset: 0; width: 100%; height: 100%; background: none; border: 0; border-radius: 16px; color: var(--txt);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px;
}
.pf-choose .plus {
  width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 4px;
  background: rgba(255, 59, 47, 0.12); border: 1px solid rgba(255, 59, 47, 0.4); color: var(--acc); font-size: 38px; font-weight: 700; line-height: 1;
}
.pf-empty.next .pf-choose .plus { background: var(--btn, #d92d20); color: #fff; border-color: var(--btn, #d92d20); box-shadow: 0 8px 24px rgba(255, 59, 47, 0.35); }
.pf-choose b { font-size: 20px; font-weight: 850; }
.pf-choose small { color: var(--mut); font-size: 13px; font-weight: 650; }

.pf-card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: 18px;
}
.pf-card .bar { height: 4px; background: var(--accent); }
.pf-card.leader { outline: 2px solid var(--win); outline-offset: -2px; }
.pf-card.pop { animation: pf-pop 0.38s ease-out both; }
@keyframes pf-pop { from { transform: scale(0.95); opacity: 0.35; } to { transform: none; opacity: 1; } }
.pf-top { position: relative; }
.pf-media { display: block; width: 100%; padding: 0; border: 0; background: #10141a; overflow: hidden; position: relative; }
.pf-media img { width: 100%; height: 176px; object-fit: cover; display: block; transition: transform 0.25s ease; }
.pf-media:hover img { transform: scale(1.035); }
.pf-media::after {
  content: "View details"; position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, 0.7); color: #fff;
  border-radius: 999px; padding: 6px 11px; font-size: 12px; font-weight: 800; opacity: 0; transition: opacity 0.15s ease;
}
.pf-media:hover::after, .pf-media:focus-visible::after { opacity: 1; }
.pf-card .tally { position: absolute; top: 12px; left: 12px; }
.pf-card .x { position: absolute; top: 12px; right: 12px; z-index: 2; }
.pf-badges { position: absolute; left: 12px; bottom: 12px; display: flex; gap: 6px; pointer-events: none; }
.pf-place, .pf-crown { font-weight: 850; font-size: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.72); color: #fff; }
.pf-place.first, .pf-crown { background: var(--win); color: #04120a; }
.pf-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 12px 16px 14px; }
.pf-card h3 { margin: 4px 0 2px; font-size: 22px; line-height: 1.15; }
.pf-name { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; }
.pf-name:hover { color: var(--acc); }
.pf-card .trim { color: var(--mut); font-size: 13.5px; }
.pf-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; color: var(--dim); font-size: 12.5px; }
.pf-stats b { color: var(--txt); font-size: 13.5px; }
.pf-card-actions { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 12px; }
.pf-swap {
  flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px;
  border-radius: 11px; border: 1px solid #3a4452; background: #0f1317; color: var(--txt); font-weight: 850; font-size: 14.5px;
}
.pf-swap:hover { border-color: var(--accent, var(--acc)); background: #141a21; }
.pf-dice {
  flex: none; width: 44px; height: 44px; display: inline-grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--line); background: #0f1317; color: var(--txt);
}
.pf-dice:hover { color: var(--acc); border-color: var(--acc); }
.pf-dice .ico { transition: transform 0.3s ease; }
.pf-dice:active .ico, .pf-random:active .ico { transform: rotate(120deg); }
.pf-dice.corner { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; }
.pf-details { flex: none; color: var(--mut); font-size: 13px; font-weight: 750; padding: 0 4px; }
.pf-details:hover { color: var(--txt); }

/* ---------- Randomize + Race 'em ---------- */
.pf-actions { display: flex; justify-content: center; align-items: stretch; gap: 12px; margin: 18px auto 0; }
.pf-random {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 58px; padding: 0 24px;
  border-radius: 14px; border: 1px solid #4a5463; background: var(--panel2); color: var(--txt); font-weight: 850; font-size: 16.5px;
}
.pf-random .ico { width: 22px; height: 22px; transition: transform 0.3s ease; }
.pf-random:hover { border-color: var(--txt); }
.pf-race {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px; height: 58px; min-width: 300px; padding: 0 34px;
  border-radius: 14px; border: 0; background: var(--btn, #d92d20); color: #fff;
  font-weight: 900; font-style: italic; font-size: 21px; letter-spacing: 0.6px; text-transform: uppercase;
  box-shadow: 0 10px 28px rgba(255, 59, 47, 0.35); transition: transform 0.12s ease, filter 0.12s ease;
}
.pf-race .ico { width: 24px; height: 24px; }
.pf-race:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.pf-race:disabled { background: #232931; color: #7b8592; box-shadow: none; cursor: not-allowed; }
.pf-race.ready { animation: pf-pulse 2.4s ease-in-out infinite; }
@keyframes pf-pulse {
  0%, 100% { box-shadow: 0 10px 28px rgba(255, 59, 47, 0.35), 0 0 0 0 rgba(255, 59, 47, 0); }
  50% { box-shadow: 0 10px 34px rgba(255, 59, 47, 0.55), 0 0 0 7px rgba(255, 59, 47, 0.14); }
}
.pf-hint { text-align: center; color: var(--mut); font-size: 13px; margin-top: 10px; min-height: 18px; }
.pf-clear { background: none; border: 0; padding: 0 0 0 6px; color: var(--mut); font-size: 13px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.pf-clear:hover { color: var(--txt); }

/* ---------- result near the top ---------- */
.pf-result {
  display: flex; align-items: center; gap: 16px; max-width: 900px; margin: 16px auto 0; padding: 14px 18px;
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.16), rgba(20, 24, 29, 0.92) 62%);
  border: 1px solid rgba(34, 197, 94, 0.5); border-radius: 16px; animation: pf-pop 0.4s ease-out both;
}
.pf-result-main { min-width: 0; flex: 1; }
.pf-result .k { color: var(--win); font-size: 11.5px; font-weight: 850; letter-spacing: 1.5px; text-transform: uppercase; }
.pf-result .k .tag { vertical-align: 1px; }
.pf-result .win { font-size: 19px; font-weight: 900; margin-top: 3px; }
.pf-result .win span { color: var(--win); }
.pf-result .pf-photo { margin-top: 4px; color: var(--mut); font-size: 13.5px; font-weight: 650; }
.pf-result ol { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--mut); font-size: 13px; font-weight: 700; }
.pf-result ol b { color: var(--txt); }
.pf-result .dot, .mode-meta .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.pf-result .btns { display: flex; gap: 8px; flex: none; }

/* ---------- one-tap matchups ---------- */
.pf-matchups { margin: 20px 0 0; }
.pf-label { color: var(--mut); font-size: 11.5px; font-weight: 850; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 10px; text-align: center; }
.pf-mrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.pf-mrow::-webkit-scrollbar { display: none; }
.pf-match {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; min-height: 44px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--panel); border-radius: 12px; color: var(--txt); font-weight: 750; font-size: 13.5px;
}
.pf-match:hover { border-color: #3a4452; background: var(--panel2); }
.pf-match.on { border-color: var(--txt); background: var(--panel2); }
.pf-match .sprites { display: flex; align-items: center; }
.pf-match .sprite { width: 52px; height: 20px; object-fit: contain; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.5)); }
.pf-match .sprite + .sprite { margin-left: -12px; }
.pf-match em { color: var(--acc); font-style: italic; font-weight: 900; padding: 0 1px; }

/* ---------- Specs / Race mode bar ---------- */
.modebar {
  position: sticky; top: var(--hdr); z-index: 7; display: flex; align-items: center; gap: 16px;
  margin: 22px 0 0; padding: 10px 0; background: rgba(11, 13, 16, 0.94); backdrop-filter: blur(10px);
  box-shadow: 0 0 0 100vmax rgba(11, 13, 16, 0.94); clip-path: inset(0 -100vmax); border-bottom: 1px solid var(--line);
}
.modebar:empty { display: none; }
.mode-switch { display: inline-flex; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; flex: none; }
.mode-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 24px;
  border: 0; border-radius: 10px; background: none; color: var(--mut); font-weight: 850; font-size: 15px;
}
.mode-btn:hover { color: var(--txt); }
.mode-btn.on { background: var(--txt); color: #111; }
.mode-btn[data-mode="race"].on { background: var(--btn, #d92d20); color: #fff; }
.mode-meta { flex: 1; min-width: 0; color: var(--mut); font-size: 13.5px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mode-meta em { color: var(--acc); font-style: italic; font-weight: 900; padding: 0 8px; }
.mode-copy { flex: none; }

body:not(.has-matchup) #specs, body:not(.has-matchup) #race, body:not(.has-matchup) #charts { display: none; }
body.has-matchup:not(.mode-race) #race, body.has-matchup:not(.mode-race) #charts { display: none; }
body.mode-race #specs { display: none; }
body.is-loading #specs, body.is-loading #race, body.is-loading #charts { opacity: 0.55; transition: opacity 0.15s ease; }
#race h2 { margin-top: 22px; }
#specs .tools { margin-top: 18px; }
#specs, #race, #charts { scroll-margin-top: calc(var(--hdr) + 66px); }

/* ---------- the tree ---------- */
.tree {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 5; pointer-events: none;
  display: flex; gap: 10px; padding: 12px 16px; background: rgba(8, 10, 12, 0.9); border: 1px solid var(--line);
  border-radius: 999px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); transition: opacity 0.4s ease;
}
.tree i { width: 22px; height: 22px; border-radius: 50%; background: #2a2f37; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.45); }
.tree i.lit { background: #fbbf24; box-shadow: 0 0 16px #fbbf24; }
.tree i.go { background: var(--win); box-shadow: 0 0 20px var(--win); }
.tree.done { opacity: 0; }

/* ---------- arrival teaser ---------- */
.teaser { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 40px 0 0; }
.teaser .t { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.teaser .n { color: var(--acc); font-weight: 900; font-style: italic; font-size: 13px; letter-spacing: 1px; }
.teaser b { display: block; font-size: 16.5px; margin: 4px 0; }
.teaser p { margin: 0; color: var(--mut); font-size: 13.5px; line-height: 1.45; }

/* ---------- picker modal ---------- */
.modal { padding-top: 0; }
.modal-top { position: sticky; top: 0; z-index: 3; background: #12161b; padding-top: 18px; margin-bottom: 4px; }
.modal-cats { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 0 12px; padding-bottom: 2px; }
.modal-cats .pf-cat { flex: none; }
.pick { position: relative; }
.pick:hover { border-color: #3a4452; }
.pick .in-tag { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, 0.72); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }
.pick.on .in-tag { background: var(--win); color: #04120a; }
.pick .pq { color: var(--dim); font-size: 12px; margin-top: 2px; }

@media (max-width: 980px) {
  .pf h1 { font-size: 40px; }
  .pf.filled h1 { font-size: 28px; }
  .pf-race { min-width: 0; }
  .teaser { grid-template-columns: 1fr; }
}

/* ---------- phone ---------- */
@media (max-width: 640px) {
  #modebar { order: 2; }
  #teaser { order: 3; }
  body.browse-on #modebar, body.browse-on #teaser { display: none; }
  .pf { padding: 12px 0 0; }
  .pf-eyebrow { font-size: 10.5px; letter-spacing: 1.6px; }
  .pf h1, .pf.filled h1 {
    display: block; -webkit-line-clamp: unset; overflow: visible; font-size: 32px; line-height: 1.05; margin: 4px 0 6px; letter-spacing: -0.3px;
  }
  .pf.filled h1 {
    font-size: 21px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .pf-sub { font-size: 13.5px; }
  .pf.filled .pf-sub { display: none; }
  .pf-find { margin-top: 14px; }
  .pf-search { height: 48px; border-radius: 12px; }
  .pf-cats { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; margin: 10px -16px 0; padding: 0 16px 2px; scrollbar-width: none; }
  .pf-cat { flex: none; min-height: 38px; padding: 7px 12px; font-size: 13px; }
  .pf-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
  .pf-vs { display: none; }
  .pf-slots .skeleton { height: 160px; border-radius: 14px; }
  .pf-empty { min-height: 158px; border-radius: 14px; }
  .pf-choose { gap: 4px; padding: 8px 4px; border-radius: 12px; }
  .pf-choose .plus { width: 44px; height: 44px; font-size: 28px; margin-bottom: 2px; }
  .pf-choose b { font-size: 13.5px; }
  .pf-choose small { font-size: 11px; text-align: center; }
  .pf-dice.corner { top: 5px; right: 5px; width: 32px; height: 32px; border-radius: 9px; }
  .pf-dice.corner .ico { width: 16px; height: 16px; }
  .pf-card { border-radius: 14px; }
  .pf-card .bar { height: 3px; }
  .pf-media img { height: 72px; }
  .pf-media::after { display: none; }
  .pf-card .tally { top: 4px; left: 4px; padding: 2px 7px; font-size: 10.5px; }
  .pf-card .x { top: 3px; right: 3px; width: 28px; height: 28px; min-width: 28px; min-height: 28px; font-size: 15px; }
  .pf-badges { left: 4px; bottom: 4px; }
  .pf-place, .pf-crown { font-size: 10px; padding: 2px 7px; }
  .pf-crown { display: none; }
  .pf-body { padding: 6px 7px 7px; }
  .pf-card .yr { font-size: 9.5px; letter-spacing: 0.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pf-card h3 {
    font-size: 13.5px; line-height: 1.2; margin: 1px 0 0; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .pf-card .trim, .pf-stats { display: none; }
  .pf-card-actions { flex-wrap: wrap; gap: 5px; padding-top: 7px; }
  .pf-swap { height: 36px; min-height: 36px; font-size: 13px; gap: 4px; border-radius: 9px; padding: 0 4px; }
  .pf-swap .ico { width: 15px; height: 15px; }
  .pf-dice { width: 36px; height: 36px; min-height: 36px; border-radius: 9px; }
  .pf-dice .ico { width: 16px; height: 16px; }
  .pf-details { flex: 1 0 100%; text-align: center; font-size: 11.5px; padding: 3px 0 0; }
  .pf-actions { gap: 8px; margin-top: 12px; }
  .pf-random { flex: none; height: 54px; padding: 0 14px; font-size: 15px; gap: 7px; border-radius: 13px; }
  .pf-race { flex: 1; min-width: 0; height: 54px; padding: 0 10px; font-size: 19px; border-radius: 13px; }
  .pf-hint { font-size: 12.5px; margin-top: 8px; }
  .pf-result { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 14px; margin-top: 12px; border-radius: 14px; }
  .pf-result .win { font-size: 16.5px; }
  .pf-result ol { font-size: 12.5px; }
  .pf-result .btns button { flex: 1; min-height: 40px; }
  .pf-matchups { margin: 18px -16px 0; }
  .pf-label { text-align: left; padding: 0 16px; margin-bottom: 8px; font-size: 10.5px; }
  .pf-mrow { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding: 0 16px 4px; scrollbar-width: none; }
  .pf-match { flex: none; font-size: 12.5px; min-height: 42px; padding: 5px 12px 5px 6px; }
  .pf-match .sprite { width: 44px; height: 18px; }
  .modebar { top: 0; gap: 8px; margin-top: 14px; padding: 8px 0; }
  .mode-switch { flex: 1; }
  .mode-btn { flex: 1; height: 40px; padding: 0 8px; font-size: 14.5px; }
  .mode-meta { display: none; }
  .mode-copy { min-height: 46px; padding: 0 12px; font-size: 12px; }
  .teaser { margin-top: 20px; gap: 8px; }
  .teaser .t { padding: 12px 14px; border-radius: 14px; }
  .teaser b { font-size: 15px; }
  .teaser p { font-size: 12.5px; }
  .modal-top { padding-top: calc(12px + env(safe-area-inset-top)); }
  .modal-cats { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 10px; padding: 0 16px 2px; scrollbar-width: none; }
  .modal-cats .pf-cat { flex: none; }
  .slot-pick { flex-wrap: nowrap; overflow-x: auto; margin: 10px -16px; padding: 0 16px; scrollbar-width: none; }
  .slot-pick .preset { flex: none; white-space: nowrap; }
  .modal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pick img { height: 84px; }
  .pick .pad { padding: 8px 10px 10px; }
  .pick h3 { font-size: 13.5px; }
  .pick p { font-size: 11.5px; }
  .tree { padding: 8px 12px; gap: 8px; }
  .tree i { width: 18px; height: 18px; }
  #specs, #race, #charts { scroll-margin-top: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  .pf-race.ready, .pf-card.pop, .pf-result { animation: none; }
}

/* ---------- v2: compact empty slots (only after Start over) ---------- */
.pf-slots.picking .pf-empty { min-height: 170px; }
.pf-slots.picking .pf-choose .plus { width: 52px; height: 52px; font-size: 30px; }
.pf-slots.picking .pf-choose b { font-size: 18px; }

/* ---------- v2: race sound toggle ---------- */
.sound-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px 0 10px; flex: none;
  border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--mut); font-size: 13px; font-weight: 750;
}
.sound-btn .ico { width: 18px; height: 18px; }
.sound-btn.on { color: var(--txt); border-color: #3a4452; }
.sound-btn.on .ico { color: var(--acc); }
.sound-btn:hover { border-color: #4a5463; color: var(--txt); }
.modebar .sound-btn { height: 40px; }

@media (max-width: 980px) {
  .pf-find { flex: 1 1 100%; max-width: 640px; }
}
@media (max-width: 640px) {
  .pf-tools { display: block; margin-top: 10px; }
  .pf-find { margin: 0; max-width: none; }
  .pf-search { height: 44px; }
  .pf-cats { margin: 8px -16px 0; }
  .pf-cat { min-height: 36px; padding: 6px 11px; }
  .pf-slots { margin-top: 10px; }
  .pf-empty, .pf-slots.picking .pf-empty { min-height: 128px; }
  .pf-slots.picking .pf-choose .plus { width: 38px; height: 38px; font-size: 24px; }
  .pf-slots.picking .pf-choose b { font-size: 13px; }
  .pf-media img { height: 72px; }
  .pf-actions { margin-top: 10px; }
  .pf-matchups { margin-top: 14px; }
  .sound-btn span { display: none; }
  .sound-btn { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .race-controls .sound-btn { width: 36px; height: 36px; min-height: 36px; }
  .modebar .sound-btn { width: 46px; height: 46px; border-radius: 12px; }
}

/* ---------- v3: one-tap matchups row removed; close the gap it left ---------- */
.pf { padding-bottom: 0; }
.pf-hint { margin-bottom: 0; }
.modebar { margin-top: 16px; }
@media (max-width: 640px) {
  .modebar { margin-top: 10px; }
}

/* v5: photo and name link to the car page */
a.pf-name { display: inline; color: inherit; }
a.pf-media { color: inherit; }
