/* Bright, slow-moving gradients, not strobes. Cancel stays outside page transforms. */
html { overflow-x: clip; }
html.page-transforming { overflow: clip; }
#page-stage { position: relative; isolation: isolate; background: var(--paper); }
.rainbow-mode .announcement, .rainbow-mode .city-ribbon, .rainbow-mode .final-cta, .rainbow-mode .construction {
  background-image: linear-gradient(100deg, #fff076, #ffabdf, #bfc7ff, #8ceaff, #a5ffb9, #fff076);
  background-size: 300% 100%;
  animation: rainbow-travel 9s linear infinite alternate;
}
.rainbow-mode .site-header, .rainbow-mode .included-section, .rainbow-mode .dialog-bar {
  background-image: linear-gradient(110deg, #000099, #730066, #004075, #390080, #000099);
  background-size: 300% 100%;
  animation: rainbow-travel 12s linear infinite alternate;
}
.rainbow-mode .mean-it { color: #b00045; text-shadow: 3px 3px #fff, 6px 6px #ffa3f4, 9px 9px #7deeff; }
.rainbow-mode .button, .rainbow-mode .forbidden-button { box-shadow: 3px 3px #141414, 6px 6px #ff39aa, 9px 9px #00dfdf; }
.rainbow-mode .city-card { box-shadow: 4px 4px #141414, 7px 7px #ff39aa, 10px 10px #9cff62; }
.rainbow-mode .highlight { background: #fff076; box-shadow: 5px 0 #fff076, -5px 0 #fff076; }
.utility-controls { display: flex; align-items: flex-end; gap: 10px; }
.utility-controls > button { min-height: 44px; padding: 8px 12px; background: #ffef00; border: var(--border); box-shadow: 3px 3px #141414; font-size: 12px; font-weight: 700; }
.utility-controls #open-roulette { background: #b2ffff; }
.utility-controls #music-toggle { background: #ffd0ed; }
.cookie-note { bottom: 84px; }
.site-footer { padding-bottom: 180px; }
.random-event { position: fixed; top: 18px; right: 18px; z-index: 12; width: min(380px, calc(100% - 32px)); padding: 5px; border: 3px outset white; background: #c6c6c6; box-shadow: 6px 6px #0009; }
.event-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: #940043; color: white; padding: 8px 10px; font-size: 13px; }
#event-countdown { font-family: monospace; font-size: 24px; line-height: 1; min-width: 28px; text-align: center; }
#event-message { font-size: 16px; font-weight: 700; padding: 16px 12px 0; margin: 0; line-height: 1.4; }
.event-actions { display: flex; gap: 10px; padding: 16px 12px 12px; }
.event-actions button { min-height: 44px; border: 2px solid #141414; box-shadow: 3px 3px #141414; padding: 8px 12px; font-size: 12px; font-weight: 700; flex: 1; background: #ffef00; }
.event-actions #event-cancel { background: #32f55d; }
.rainbow-surge #page-stage { outline: 12px solid #ff39aa; outline-offset: -12px; }
.rainbow-surge .hero, .rainbow-surge .finder-section, .rainbow-surge .cities-section, .rainbow-surge .stories-section { background: linear-gradient(110deg, #ffc7ee, #c8ffff, #edffb1, #ffc7ee); background-size: 300% 100%; animation: rainbow-travel 4s linear infinite alternate; }
.winner-popup { width: min(510px, calc(100% - 28px)); padding: 5px; background: linear-gradient(135deg, #ff39aa, #ffef00, #31ef79, #80f4ff, #ff39aa); background-size: 300% 300%; animation: rainbow-travel 8s linear infinite alternate; }
.winner-popup .dialog-body { background: #fffbbd; border: 2px solid #141414; margin-top: 4px; }
.winner-popup .dialog-house { display: inline-block; animation: trophy-bob 3s ease-in-out infinite alternate; }
.winner-popup .winner-kicker { letter-spacing: 4px; font-size: 13px; font-weight: 700; margin: 12px 0 2px; }
.winner-popup h2 { font-family: Impact, 'Comic Neue', sans-serif; font-size: clamp(44px, 9vw, 66px); color: #ba004a; text-shadow: 3px 3px #ffb2dd; line-height: 1; margin: 6px 0 20px; }
.winner-popup h2 > span { display: block; font-size: 27px; margin-top: 6px; }
.winner-popup .dialog-body #welcome-description { font-size: 16px; }
.winner-popup .button { font-size: 16px; }
.winner-popup .tiny { font-size: 11px; }
#roulette { width: min(480px, calc(100% - 24px)); max-height: calc(100svh - 24px); overflow: auto; }
#roulette .dialog-bar { font-size: 11px; }
#roulette .dialog-bar button { min-width: 36px; min-height: 36px; }
.roulette-body { padding: 16px 18px 20px; text-align: center; background: #fff7d7; margin-top: 4px; }
#roulette-description { font-size: 11px; font-weight: 700; letter-spacing: .5px; margin-bottom: 12px; }
.wheel-frame { position: relative; width: 280px; height: 280px; margin: 18px auto 26px; }
#roulette-wheel { position: relative; width: 100%; height: 100%; border-radius: 50%; border: 6px solid #141414; box-shadow: 5px 5px #141414; background: conic-gradient(from -20deg, #ffef00 0deg 40deg, #ff7ac4 40deg 80deg, #91eaff 80deg 120deg, #87ff9b 120deg 160deg, #e0a6ff 160deg 200deg, #ffb96d 200deg 240deg, #b3ffff 240deg 280deg, #ffc7dd 280deg 320deg, #c4ff7d 320deg 360deg); }
#roulette-wheel > span { position: absolute; left: 50%; top: 50%; width: 66px; font-size: 24px; line-height: 1; text-align: center; transform: translate(-50%, -50%) rotate(calc(var(--wedge) * 40deg)) translateY(-101px) rotate(calc(var(--wedge) * -40deg)); }
#roulette-wheel small { display: block; font-size: 10px; font-weight: 700; margin-top: 5px; }
.wheel-pointer { position: absolute; left: 50%; top: -20px; translate: -50% 0; z-index: 2; font-size: 34px; color: #b30043; -webkit-text-stroke: 2px #141414; line-height: 1; }
.wheel-hub { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; width: 56px; height: 56px; border: 4px solid #141414; border-radius: 50%; background: white; font-weight: 700; font-size: 33px; }
#spin-wheel { font-size: 14px; width: 100%; min-height: 50px; padding: 12px 14px; }
#spin-wheel:disabled { cursor: wait; opacity: .75; rotate: 0deg; scale: 1; }
#roulette-result { font-size: 16px; font-weight: 700; min-height: 48px; margin: 22px 0 0; }
.roulette-body .tiny { font-size: 10px; }
#roulette-city { font-size: 15px; margin-top: 12px; }
#interaction-layer { position: fixed; inset: 0; z-index: 11; overflow: hidden; pointer-events: none; }
.click-spark, .cursor-spark, .click-word { position: absolute; top: 0; left: 0; line-height: 1; pointer-events: none; will-change: transform, opacity; }
.click-spark { font-size: 23px; animation: spark-burst .8s ease-out both; }
.cursor-spark { font-size: 15px; color: #a00051; text-shadow: 2px 2px #ffef00; animation: cursor-fade .7s ease-out both; }
.click-word { font-size: 18px; font-weight: 700; padding: 5px 8px; color: #141414; background: #ffef00; border: 2px solid #141414; box-shadow: 3px 3px #ff39aa; animation: word-pop .8s ease-out both; }
.arcade-status { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
button, .button, .city-card, summary, .mini-tags span, .stamp, .new-sticker, .feature, .quote, .community-photo, .photo-window, .polaroid, h1, h2, h3, .eyebrow, .web-badge { transition: rotate .2s, scale .2s, box-shadow .2s, text-shadow .2s, background-color .2s; }
button:active, .button:active { scale: .93; }
@media (hover: hover) and (pointer: fine) {
  button:not(:disabled):hover, .button:hover { rotate: -4deg; scale: 1.06; }
  button:not(:disabled):nth-child(even):hover, .button:nth-child(even):hover { rotate: 4deg; }
  .utility-controls button:hover { box-shadow: 4px 4px #ff39aa, 7px 7px #141414; }
  .city-card:hover { rotate: 3deg; scale: 1.035; }
  .city-card:nth-child(even):hover { rotate: -3deg; }
  :is(.feature, .quote):hover { rotate: -3deg; scale: 1.03; box-shadow: 7px 7px #ff39aa, 10px 10px #141414; }
  :is(.community-photo, .photo-window, .polaroid):hover { rotate: 4deg; scale: 1.035; }
  :is(h1, h2, h3):hover { text-shadow: 3px 3px #ff8ad0, -2px -2px #80f4ff; rotate: -1deg; }
  :is(.mini-tags span, .stamp, .new-sticker, .web-badge, .eyebrow):hover { rotate: -7deg; scale: 1.07; }
  .site-header nav a:hover, .footer-links a:hover { color: #ffef00; background: #141414; box-shadow: 3px 3px #ff39aa; }
  summary:hover { background-color: #ffe180; color: #141414; }
  select:hover { background-color: #d2ffff; box-shadow: 3px 3px #ff39aa; }
  main img { cursor: crosshair; }
}
.motion-paused #interaction-layer { display: none; }
.motion-paused :is(button, .button, .city-card, .feature, .quote, .community-photo, .photo-window, .polaroid, h1, h2, h3, .mini-tags span, .stamp, .new-sticker, .web-badge, .eyebrow):hover { rotate: 0deg; scale: 1; }
@keyframes rainbow-travel { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }
@keyframes trophy-bob { from { transform: rotate(-9deg) translateY(0); } to { transform: rotate(9deg) translateY(-5px); } }
@keyframes spark-burst { from { opacity: 1; transform: translate(var(--x), var(--y)) scale(.5); } to { opacity: 0; transform: translate(calc(var(--x) + var(--dx)), calc(var(--y) + var(--dy))) rotate(100deg) scale(1.3); } }
@keyframes cursor-fade { from { opacity: .9; transform: translate(var(--x), var(--y)) scale(1); } to { opacity: 0; transform: translate(var(--x), calc(var(--y) + 22px)) scale(.3); } }
@keyframes word-pop { from { opacity: 1; transform: translate(var(--x), var(--y)) rotate(-10deg) scale(.7); } to { opacity: 0; transform: translate(var(--x), calc(var(--y) - 70px)) rotate(10deg) scale(1.1); } }
@media (max-width: 800px) { .utility-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .utility-controls > button { font-size: 11px; padding: 8px; } .utility-controls #music-toggle { grid-column: 1 / -1; } .cookie-note { bottom: 132px; } }
@media (max-width: 560px) { .utility-controls { width: 174px; } .utility-controls > button, .utility-controls #motion-toggle { font-size: 10px; } .help-widget { width: 106px; max-width: 106px; } .help-widget > summary { font-size: 10px; } .help-widget > summary > span { display: none; } .random-event { top: 12px; right: 12px; width: calc(100% - 24px); } #event-message { font-size: 14px; } .winner-popup .dialog-body { padding: 16px 12px; } .winner-popup .dialog-house { font-size: 44px; } .winner-popup .winner-kicker { font-size: 11px; margin-top: 10px; } .winner-popup h2 { font-size: 52px; } .winner-popup h2 > span { font-size: 23px; } .winner-popup .dialog-body #welcome-description { font-size: 14px; } .winner-popup .button { font-size: 14px; } .winner-popup .tiny { font-size: 10px; } .winner-popup .dialog-bar { font-size: 10px; } .roulette-body { padding: 12px; } .wheel-frame { width: 248px; height: 248px; } #roulette-wheel > span { font-size: 22px; width: 58px; transform: translate(-50%, -50%) rotate(calc(var(--wedge) * 40deg)) translateY(-88px) rotate(calc(var(--wedge) * -40deg)); } #roulette-wheel small { font-size: 8px; } #roulette-description { font-size: 9px; } #roulette .dialog-bar { font-size: 9px; } #roulette-result { font-size: 14px; } }
@media (prefers-reduced-motion: reduce) { #interaction-layer { display: none; } :is(button, .button, .city-card, .feature, .quote, .community-photo, .photo-window, .polaroid, h1, h2, h3, .mini-tags span, .stamp, .new-sticker, .web-badge, .eyebrow):hover { rotate: 0deg; scale: 1; } }
