/* Grandad.io Road Trip pages: the site look, plus the pieces the games use */
:root {
    --night-deep: #14152c; --night: #1b1d3a; --night-soft: #262a52;
    --gold-soft: #f6c793; --cream: #fffcf2; --coral: #ee6c4d;
    box-sizing: border-box; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  }
*, *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: env(safe-area-inset-top, 0px); height: 100%; }
body { margin: 0; min-height: 100%; font-family: 'Nunito', -apple-system, BlinkMacSystemFont, sans-serif; color: var(--cream); overflow-x: hidden;
    background: radial-gradient(ellipse 120% 90% at 50% 20%, var(--night-soft) 0%, var(--night) 45%, var(--night-deep) 100%); }
.stars { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.star { position: absolute; background: var(--cream); border-radius: 50%; opacity: 0.7; animation: twinkle 4s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: 0.2; } 50% { opacity: 0.9; } }
@media (prefers-reduced-motion: reduce) { .star { animation: none; } }
.title { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 2rem; color: var(--gold-soft); margin: 0 0 0.2rem; line-height: 1.1; }
.sub { color: rgba(255,252,242,0.75); margin: 0 auto 1rem; max-width: 26rem; }
.linkish { background: none; border: none; color: rgba(255,252,242,0.8); font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; padding: 0.4rem 0.6rem; border-radius: 10px; display: inline-block; }
.linkish:hover, .linkish:focus-visible { color: var(--cream); background: rgba(255,252,242,0.1); }
.btn { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.05rem; background: var(--gold-soft); color: var(--night); border: none; border-radius: 999px; padding: 0.55rem 1.1rem; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn.alt { background: rgba(255,252,242,0.14); color: var(--cream); }
.btn:disabled { opacity: 0.4; cursor: default; }
.btn svg { width: 1.1em; height: 1.1em; }
.btn:focus-visible, .swatch:focus-visible, .pic:focus-visible { outline: 3px solid #9bc9e8; outline-offset: 2px; }
.sub-h { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.1rem; color: var(--gold-soft); margin: 1.1rem 0 0.2rem; }
.note { color: rgba(255,252,242,0.78); font-size: 0.92rem; margin: 0.4rem auto 0.6rem; max-width: 24rem; }
.note a { color: var(--gold-soft); font-weight: 700; }
.toast { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); background: var(--gold-soft); color: var(--night); font-family: 'Baloo 2', sans-serif; font-weight: 700; padding: 0.6rem 1.2rem; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 80; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.home-btn { position: fixed; top: calc(1rem + env(safe-area-inset-top, 0px)); left: 1rem; z-index: 50; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,252,242,0.12); display: flex; align-items: center; justify-content: center; color: var(--cream); text-decoration: none; transition: background 0.15s ease, transform 0.15s ease; }
.home-btn:hover, .home-btn:focus-visible { background: rgba(255,252,242,0.22); transform: translateY(-1px); }
.home-btn svg { width: 22px; height: 22px; }

/* ===== Road Trip ===== */
main { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; padding: 3.6rem 1rem 3.5rem; text-align: center; }
.rt-count { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 1.15rem; color: var(--cream); margin: 0.1rem 0 0.4rem; }
.rt-bar { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; margin: 0.3rem 0 0.7rem; }
.rt-seg { display: inline-flex; background: rgba(255,252,242,0.12); border-radius: 999px; padding: 3px; }
.rt-seg button { font: inherit; font-weight: 700; font-size: 0.92rem; color: var(--cream); background: none; border: none; border-radius: 999px; padding: 0.35rem 1.05rem; cursor: pointer; }
.rt-seg button[aria-pressed="true"] { background: var(--gold-soft); color: var(--night); }
.rt-seg button:focus-visible, .rt-chip:focus-visible, .rt-tile:focus-visible, .rt-link:focus-visible { outline: 3px solid #9bc9e8; outline-offset: 2px; }
.rt-trip { color: rgba(255,252,242,0.82); font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 0.3rem 0.8rem; justify-content: center; align-items: center; }
.rt-link { background: none; border: none; font: inherit; font-weight: 700; color: var(--gold-soft); cursor: pointer; text-decoration: underline; padding: 0.2rem 0.3rem; }
.rt-old { background: rgba(246,199,147,0.16); border-radius: 14px; padding: 0.45rem 0.8rem; font-size: 0.92rem; }
.rt-filter { display: flex; gap: 0.4rem; justify-content: center; flex-wrap: wrap; margin: 0.2rem 0 0.8rem; }
.rt-chip { font: inherit; font-weight: 700; font-size: 0.85rem; color: var(--cream); background: rgba(255,252,242,0.1); border: none; border-radius: 999px; padding: 0.3rem 0.85rem; cursor: pointer; }
.rt-chip[aria-pressed="true"] { background: rgba(246,199,147,0.9); color: var(--night); }
.rt-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem 0.6rem; }
@media (min-width: 520px) { .rt-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 740px) { .rt-grid { grid-template-columns: repeat(4, 1fr); } }
.rt-tile { background: none; border: none; padding: 0; margin: 0; cursor: pointer; font: inherit; color: var(--cream); display: flex; flex-direction: column; align-items: center; gap: 0.25rem; border-radius: 12px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.rt-tile svg { width: 100%; height: auto; display: block; transition: filter 0.25s ease, transform 0.15s ease; }
.rt-tile.off svg { filter: grayscale(1) brightness(0.8) opacity(0.5); }
.rt-tile.on svg { filter: drop-shadow(0 5px 10px rgba(0,0,0,0.4)); }
.rt-tile:hover svg, .rt-tile:focus-visible svg { transform: translateY(-2px); }
.rt-tile.pop svg { animation: rtpop 0.45s ease; }
@keyframes rtpop { 0% { transform: scale(0.92); } 50% { transform: scale(1.08); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .rt-tile.pop svg { animation: none; } .rt-tile svg { transition: none; } }
.rt-when { font-size: 0.74rem; line-height: 1.15; min-height: 1.15em; color: rgba(255,252,242,0.78); }
.rt-tile.off .rt-when { color: rgba(255,252,242,0.38); }
.rt-empty { color: rgba(255,252,242,0.8); padding: 1.5rem 0; }
.rt-foot { margin: 1.4rem auto 0; max-width: 28rem; color: rgba(255,252,242,0.72); font-size: 0.88rem; }
.rt-switch { display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 700; color: var(--cream); }
.rt-switch input { width: 1.2rem; height: 1.2rem; accent-color: #f6c793; }
.rt-back { margin-bottom: 0.2rem; }
/* the dialogs (a spotting's details, and starting a new trip) */
.rt-shade { position: fixed; inset: 0; background: rgba(10,10,25,0.62); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.rt-shade[hidden] { display: none; }
.rt-sheet { background: #fffaf0; color: #2b2740; border-radius: 22px; padding: 1.1rem 1.2rem 1.2rem; max-width: 22rem; width: 100%; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.5); max-height: 90vh; overflow: auto; }
.rt-sheet h2 { font-family: 'Baloo 2', sans-serif; margin: 0 0 0.1rem; font-size: 1.5rem; line-height: 1.1; }
.rt-sheet .nick { color: #5b5873; margin: 0 0 0.6rem; font-weight: 700; }
.rt-sheet p { margin: 0.35rem 0; }
.rt-sheet .plate { width: 62%; margin: 0.2rem auto 0.4rem; }
.rt-sheet .plate svg { width: 100%; height: auto; display: block; }
.rt-sheet input[type="text"] { font: inherit; width: 100%; padding: 0.6rem 0.8rem; border-radius: 12px; border: 2px solid #c9c2d8; margin: 0.5rem 0; background: #fff; color: #2b2740; }
.rt-sheet a { color: #1f5fb0; font-weight: 700; }
.rt-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; margin-top: 0.8rem; }
.rt-sheet .btn { font-size: 1rem; }
.rt-sheet .btn.alt { background: #e6e1f0; color: #2b2740; }
.rt-sheet .btn.warn { background: #ee6c4d; color: #fff; }
/* the map */
.rt-map { width: 100%; height: auto; display: block; touch-action: manipulation; margin: 0.2rem 0 0.6rem; }
.rt-map path { stroke: #1b1d3a; stroke-width: 1.4; stroke-linejoin: round; cursor: pointer; transition: fill 0.2s ease; }
.rt-map path.off { fill: #3b3f6e; }
.rt-map path.off:hover, .rt-map path:focus-visible { fill: #50558a; }
.rt-map path:focus-visible { outline: none; stroke: #fffcf2; stroke-width: 3; }
.rt-map text { font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 15px; text-anchor: middle; pointer-events: none; }
.rt-map .on-label { fill: #1b1d3a; } .rt-map .off-label { fill: rgba(255,252,242,0.55); }
.rt-chips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.4rem; margin-top: 0.6rem; }
@media (min-width: 560px) { .rt-chips { grid-template-columns: repeat(6, 1fr); } }
.rt-st { font: inherit; border: none; border-radius: 12px; padding: 0.35rem 0.2rem; cursor: pointer; background: rgba(255,252,242,0.08); color: rgba(255,252,242,0.7); display: flex; flex-direction: column; align-items: center; line-height: 1.1; min-height: 3rem; justify-content: center; touch-action: manipulation; }
.rt-st b { font-family: 'Baloo 2', sans-serif; font-size: 1.05rem; }
.rt-st small { font-size: 0.62rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rt-st.on { color: #1b1d3a; }
.rt-st:focus-visible { outline: 3px solid #9bc9e8; outline-offset: 2px; }
/* the Road Trip home page */
.rt-hub { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.9rem; margin: 0.6rem 0 1.2rem; }
@media (min-width: 560px) { .rt-hub { grid-template-columns: repeat(3, 1fr); } }
.rt-card { display: flex; flex-direction: column; gap: 0.35rem; border: none; border-radius: 22px; padding: 0.55rem; color: #1b1d3a; font: inherit; text-decoration: none; cursor: pointer; transition: transform 0.15s ease, filter 0.15s ease; text-align: center; }
.rt-card:hover, .rt-card:focus-visible { transform: translateY(-2px); filter: brightness(1.05); }
.rt-card:focus-visible { outline: 3px solid #9bc9e8; outline-offset: 2px; }
.rt-card .thumb { background: #fffaf0; border-radius: 14px; overflow: hidden; line-height: 0; padding: 0.4rem; }
.rt-card .thumb svg { width: 100%; height: auto; display: block; }
.rt-card b { font-family: 'Baloo 2', sans-serif; font-size: 1.1rem; line-height: 1.1; }
.rt-card small { font-weight: 700; color: rgba(27,29,58,0.72); font-size: 0.8rem; }
.rt-card.soon { opacity: 0.55; cursor: default; }
.rt-card.soon:hover { transform: none; filter: none; }
/* Park Rides: the park chooser, the ride cards, and the star ratings */
.rt-parks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; margin: 0.2rem 0 0.7rem; }
@media (min-width: 640px) { .rt-parks { grid-template-columns: repeat(4, 1fr); } }
.rt-park { font: inherit; border: 3px solid transparent; border-radius: 18px; padding: 0.35rem 0.4rem 0.45rem; cursor: pointer; background: rgba(255,252,242,0.1); color: var(--cream); display: flex; flex-direction: column; align-items: center; gap: 0.1rem; min-height: 44px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.rt-park svg { width: 54px; height: auto; display: block; }
.rt-park b { font-family: 'Baloo 2', sans-serif; font-size: 0.95rem; line-height: 1.1; }
.rt-park small { font-weight: 700; font-size: 0.78rem; opacity: 0.8; }
.rt-park[aria-pressed="true"] { background: var(--park); color: #1b1d3a; border-color: #fffcf2; }
.rt-park:focus-visible, .rt-ride:focus-visible, .rt-bigstars button:focus-visible, .rt-smallstars button:focus-visible { outline: 3px solid #9bc9e8; outline-offset: 2px; }
.rt-ride { position: relative; font: inherit; border: none; border-radius: 18px; padding: 0.4rem 0.4rem 0.45rem; cursor: pointer; background: rgba(255,252,242,0.08); color: rgba(255,252,242,0.7); display: flex; flex-direction: column; align-items: center; gap: 0.25rem; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.rt-ride.on { background: var(--park); color: #1b1d3a; box-shadow: 0 5px 12px rgba(0,0,0,0.35); }
.rt-ride-pic { display: block; width: 100%; line-height: 0; }
.rt-ride-pic svg { width: 100%; height: auto; display: block; border-radius: 12px; transition: filter 0.25s ease, transform 0.15s ease; }
.rt-ride.off .rt-ride-pic svg { filter: grayscale(1) brightness(0.8) opacity(0.55); }
.rt-ride:hover .rt-ride-pic svg, .rt-ride:focus-visible .rt-ride-pic svg { transform: translateY(-2px); }
.rt-ride.pop .rt-ride-pic svg { animation: rtpop 0.45s ease; }
.rt-ride-name { font-family: 'Baloo 2', sans-serif; font-weight: 700; font-size: 0.92rem; line-height: 1.12; flex: 1; display: flex; align-items: center; overflow-wrap: anywhere; }
.rt-ride .rt-when { min-height: 18px; line-height: 18px; color: inherit; opacity: 0.8; }
.rt-stars { display: inline-flex; gap: 1px; height: 18px; }
.rt-stars svg { width: 18px; height: 18px; display: block; }
.rt-ride-n { position: absolute; top: 0.15rem; right: 0.15rem; background: #ee6c4d; color: #fff; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 0.95rem; line-height: 1; padding: 0.3rem 0.5rem; border-radius: 999px; border: 2px solid #fffcf2; }
@media (prefers-reduced-motion: reduce) { .rt-ride.pop .rt-ride-pic svg { animation: none; } .rt-ride-pic svg { transition: none; } }
.rt-tm { font-size: 0.78rem; opacity: 0.85; }
.rt-sheet .plate svg { border-radius: 12px; }
.rt-bigstars { display: flex; justify-content: center; gap: 0.3rem; margin: 0.4rem 0 0.2rem; }
.rt-bigstars button { width: 54px; height: 54px; padding: 4px; border: none; background: none; cursor: pointer; border-radius: 12px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.rt-bigstars button svg { width: 100%; height: 100%; display: block; transition: transform 0.15s ease; }
.rt-bigstars button.lit svg { transform: scale(1.12); }
@media (prefers-reduced-motion: reduce) { .rt-bigstars button svg { transition: none; } }
.rt-ridelist { list-style: none; padding: 0; margin: 0.4rem 0; text-align: left; }
.rt-ridelist li { border-top: 1px solid #e6e1f0; padding: 0.4rem 0; display: flex; flex-direction: column; gap: 0.1rem; }
.rt-ridelist small { color: #5b5873; }
.rt-ridewhen { font-weight: 700; font-size: 0.92rem; }
.rt-smallstars { display: flex; gap: 0; }
.rt-smallstars button, .rt-smallstars span { width: 44px; height: 44px; padding: 9px; border: none; background: none; cursor: pointer; display: block; border-radius: 10px; }
.rt-smallstars span { cursor: default; width: 30px; height: 30px; padding: 4px; }
.rt-smallstars svg { width: 100%; height: 100%; display: block; }
.rt-sheet .btn.go { background: #3fae7a; color: #fff; }
