.v-signpost {
  --blue: #1d4f91; --green: #1b6b3a; --yellow: #ffcb05; --red: #c4281c; --ink: #14181c; --white: #fff; --asphalt: #2a2d32;
  background: linear-gradient(#9cc3e0, #dcebf4 62%); color: var(--ink); font: 600 1rem/1.4 Overpass, system-ui, sans-serif;
}
.v-signpost :focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.v-signpost .sp-road :focus-visible { outline-color: var(--yellow); }
.sp-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.sp-bar { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem 0; }
.sp-bar h1 { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.01em; }
.sp-intro { max-width: 19rem; padding: 0.5rem 1.25rem 0; color: #1f3a52; font-size: 0.9375rem; font-weight: 600; line-height: 1.35; text-wrap: pretty; }
.sp-steps { display: flex; gap: 0.375rem; }
.sp-steps li { display: grid; place-items: center; width: 1.75rem; height: 1.25rem; border-radius: 4px; background: var(--blue); color: var(--white); opacity: 0.35; }
.sp-steps li.now { opacity: 1; box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--blue); }
.sp-steps li.won { opacity: 1; background: var(--green); }
.sp-steps li.lost { opacity: 1; background: var(--white); color: var(--red); box-shadow: inset 0 0 0 2px var(--red); }
.sp-steps svg { width: 0.75rem; height: 0.75rem; }

/* the rig: two posts running down into the road, signs bolted across them */
.sp-scene { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 1.5rem 1.25rem 0; overflow: hidden;
  /* two ranges of hills on the horizon behind the rig */
  background: radial-gradient(90% 9rem at 85% 100%, #7fae8c 0 99%, transparent 100%), radial-gradient(110% 12rem at 10% 100%, #a3c7ad 0 99%, transparent 100%); }
.sp-rig { position: relative; display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 4rem; transform-origin: 50% 100%; }
.sp-rig::before, .sp-rig::after { content: ""; position: absolute; z-index: 0; top: 1rem; bottom: -60rem; width: 0.75rem; border-radius: 2px 2px 0 0; background: linear-gradient(90deg, #6d7781, #b9c2ca 45%, #7d8791); }
.sp-rig::before { left: 16%; }
.sp-rig::after { right: 16%; }
.sp-rig > * { position: relative; z-index: 1; }

.sp-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 0.875rem; padding: 1.125rem 1.125rem; border-radius: 14px; background: var(--blue); color: var(--white); outline: 3px solid currentColor; outline-offset: -9px; box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 10px 18px -8px rgb(10 30 60 / 0.55); }
.sp-arrow { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; margin-left: 0.25rem; border-radius: 8px; background: var(--white); color: var(--blue); }
.sp-arrow svg { width: 1.5rem; height: 1.5rem; }
.sp-name { display: block; font-size: clamp(1.125rem, calc(21.5rem / var(--n, 8)), 2rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sp-answer { display: block; margin-top: 0.3rem; color: var(--yellow); font-size: 1.1875rem; font-weight: 800; line-height: 1.15; }
.sp-dist { display: grid; justify-items: center; margin-right: 0.375rem; line-height: 1; }
.sp-dist b { font-size: 2.125rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sp-dist small { margin-top: 0.125rem; font-size: 0.75rem; font-weight: 700; opacity: 0.85; }
.sp-main.won { background: var(--green); }
.sp-main.won .sp-arrow { color: var(--green); }
.sp-main.lost { background: var(--white); color: var(--ink); outline-color: var(--red); outline-width: 5px; }
.sp-main.lost .sp-arrow { background: var(--red); color: var(--white); }
.sp-main.lost .sp-answer { color: var(--red); }

/* auxiliary plates: the hints. Bagged (hatched tarp) until uncovered. */
.sp-aux { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.sp-plate { position: relative; display: grid; gap: 0.125rem; min-height: 4.25rem; align-content: center; padding: 0.625rem 0.875rem; border: 0; border-radius: 10px; background: var(--yellow); color: var(--ink); text-align: start; outline: 2px solid currentColor; outline-offset: -6px; overflow: hidden; box-shadow: 0 8px 14px -8px rgb(10 30 60 / 0.5); }
.sp-plate small { font-size: 0.75rem; font-weight: 700; opacity: 0.75; }
.sp-plate b { font-size: 1.0625rem; font-weight: 800; line-height: 1.15; overflow-wrap: anywhere; }
.sp-bagged { background: repeating-linear-gradient(135deg, #5f6973 0 12px, #55606a 12px 24px); color: var(--white); outline-style: dashed; outline-color: rgb(255 255 255 / 0.7); }
.sp-bagged i { font-style: normal; margin-left: 0.25rem; padding: 0.0625rem 0.375rem; border-radius: 4px; background: var(--yellow); color: var(--ink); font-variant-numeric: tabular-nums; }
.sp-bagged:disabled { cursor: default; }
.sp-bagged:disabled b { opacity: 0.45; }
.sp-plate.peel::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, #5f6973 0 12px, #55606a 12px 24px); }

/* end-of-town plates: the cities it is not */
.sp-missed { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.sp-missed:empty { display: none; }
.sp-end { position: relative; padding: 0.375rem 0.875rem; border: 2.5px solid var(--ink); border-radius: 8px; background: linear-gradient(to top right, transparent 46%, var(--red) 46% 54%, transparent 54%) var(--white); font-weight: 800; white-space: nowrap; }

/* the road: where the player acts */
.sp-road { position: relative; z-index: 2; display: grid; gap: 0.75rem; padding: 1.125rem 1.25rem 1.5rem; background: var(--asphalt); color: var(--white); border-top: 4px solid #eef1f3; }
.sp-entry { display: flex; gap: 0.5rem; }
.sp-combo { position: relative; flex: 1; min-width: 0; }
.sp-combo input { width: 100%; height: 3.25rem; padding-inline: 1rem; border: 0; border-radius: 10px; background: var(--white); color: var(--ink); font: 700 1.0625rem/1 Overpass, system-ui, sans-serif; }
.sp-combo input::placeholder { color: #5b6670; opacity: 1; }
.sp-combo ul { position: absolute; inset-inline: 0; bottom: calc(100% + 0.375rem); margin: 0; padding: 0.3rem; border-radius: 12px; background: var(--white); color: var(--ink); box-shadow: 0 12px 28px -6px rgb(0 0 0 / 0.5), 0 0 0 2px var(--ink); }
.sp-combo li { display: flex; align-items: center; min-height: 2.75rem; padding-inline: 0.75rem; border-radius: 7px; font-weight: 700; cursor: pointer; }
.sp-combo li[aria-selected="true"] { background: var(--yellow); }
.sp-go { height: 3.25rem; padding-inline: 1.375rem; border: 0; border-radius: 10px; background: var(--yellow); color: var(--ink); font-weight: 800; white-space: nowrap; transition: scale 150ms ease-out, background-color 150ms ease-out; }
.sp-go:disabled { background: #4a4f56; color: #aab2ba; cursor: default; }
.sp-giveup { justify-self: start; padding: 0.25rem 0; border: 0; background: none; color: #c9d0d6; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.sp-note { color: #dfe4e8; font-weight: 500; text-wrap: pretty; }
.sp-note::first-letter { text-transform: uppercase; }
.sp-total { grid-template-columns: 1fr auto; align-items: center; }
.sp-total strong { font-size: 3rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.sp-total small { font-size: 1.5rem; opacity: 0.7; }

@media (prefers-reduced-motion: no-preference) {
  .sp-rig.drop { animation: sp-drop 620ms cubic-bezier(0.2, 0, 0, 1) both; }
  .sp-main.shake { animation: sp-shake 340ms ease-out both; }
  .sp-main.flip { animation: sp-flip 420ms cubic-bezier(0.2, 0, 0, 1) both; }
  .sp-plate.peel::after { animation: sp-peel 480ms cubic-bezier(0.2, 0, 0, 1) both; }
  .sp-end.pop { animation: sp-pop 260ms cubic-bezier(0.2, 0, 0, 1) both; }
  .sp-go:not(:disabled):active { scale: 0.96; }
}
@media (prefers-reduced-motion: reduce) { .sp-plate.peel::after { display: none; } }
@keyframes sp-drop { from { transform: translateY(60%) rotate(-3deg); opacity: 0; } 70% { transform: translateY(0) rotate(0.8deg); opacity: 1; } }
@keyframes sp-shake { 20% { translate: -8px 0; } 45% { translate: 7px 0; } 70% { translate: -4px 0; } 90% { translate: 2px 0; } }
@keyframes sp-flip { from { transform: perspective(40rem) rotateX(-88deg); } }
@keyframes sp-peel { to { transform: translateY(105%) rotate(4deg); opacity: 0.6; } }
@keyframes sp-pop { from { scale: 0.6; opacity: 0; } }
