/* Geography games (Pin Drop, Flag Rush, Border Hop): on top of arcade.css. A column that fills the screen
   under the bar: a prompt card, the map or flag, then the controls. Phones never zoom or select text. */
html { touch-action: manipulation; }
.geo { display: flex; flex-direction: column; gap: 10px; height: calc(100dvh - 60px); max-width: 1100px; margin: 0 auto; padding: 0 10px 12px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.geo input { user-select: text; -webkit-user-select: text; }
.geo .panel { background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); padding: 10px 14px; }
.ask { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ask .q { flex: 1; min-width: 0; font-size: 15px; }
.ask .q b { font: 400 clamp(22px, 5vw, 30px)/1.05 var(--display); display: block; }
.ask .q small { font-weight: 600; opacity: .75; }
.pill { display: inline-flex; align-items: center; gap: 5px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 99px; padding: 2px 10px; font: 600 13px var(--body); white-space: nowrap; }
.pill b { font: 400 17px var(--display); }
.flag-sm { height: 1em; width: auto; vertical-align: -0.12em; border: 1.5px solid var(--ink); border-radius: 3px; }

/* The map */
.mapbox { position: relative; flex: 1; min-height: 180px; border: 4px solid var(--ink); border-radius: 20px; overflow: hidden; box-shadow: 6px 6px 0 var(--ink); background: #9EE3F5; touch-action: none; }
.geo-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.geo-svg .sea { fill: #9EE3F5; }
.geo-svg .land path, .geo-svg .land circle { fill: #FFF4E0; stroke: #111; stroke-width: 1.2px; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill .25s; }
.geo-svg .land .dot { fill: #FFF4E0; }
.geo-svg .land .on { stroke-width: 2.2px; }
.geo-svg .pin circle { fill: var(--pink); stroke: #111; }
.geo-svg .pin.real circle { fill: var(--lemon); }
.geo-svg .pin text { font-family: var(--display); text-anchor: middle; fill: #111; stroke: #fff; paint-order: stroke fill; }
.geo-svg .trail { stroke: #111; fill: none; }
.geo-zoom { position: absolute; right: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.geo-zoom button { width: 40px; height: 40px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); font: 400 22px/1 var(--display); box-shadow: 2px 2px 0 var(--ink); padding: 0; touch-action: manipulation; }
.geo-zoom button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.maptip { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); background: rgba(17,17,17,.82); color: #FFE066; padding: 5px 12px; border-radius: 99px; font: 600 13px var(--body); pointer-events: none; white-space: nowrap; }
.maptip[hidden] { display: none; }

.controls { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.result { text-align: center; font-weight: 600; }
.result b { font: 400 24px var(--display); }

/* Start / end card over the whole game */
.geo-over { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 18px; background: rgba(17,17,17,.38); overflow: auto; }
.geo-over[hidden] { display: none; }
.geo-over .card { width: min(100%, 380px); }
.geo-over .card ol, .geo-over .card ul { text-align: left; margin: 8px 0; padding-left: 22px; font-size: 14px; }
.recap { max-height: 32vh; overflow: auto; text-align: left; margin: 8px 0; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); }
.recap div { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; border-bottom: 2px dashed rgba(17,17,17,.12); font-size: 14px; }
.recap div:last-child { border-bottom: 0; }
.recap b { font: 400 16px var(--display); white-space: nowrap; }
.king { font-size: 14px; }

/* Flag Rush */
.timer { height: 14px; border: 3px solid var(--ink); border-radius: 99px; background: var(--paper); overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--teal); transition: width .2s linear; }
.timer.low i { background: var(--red); }
.flagbox { flex: 1; min-height: 140px; display: grid; place-items: center; position: relative; }
.flagbox img { max-width: min(92%, 520px); max-height: 100%; aspect-ratio: 4 / 3; object-fit: contain; border: 4px solid var(--ink); border-radius: 14px; box-shadow: 6px 6px 0 var(--ink); background: #fff; }
.flagbox img.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px) rotate(-2deg); } 75% { transform: translateX(8px) rotate(2deg); } }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choices button { min-height: 58px; border: 3px solid var(--ink); border-radius: 16px; background: var(--paper); font: 600 16px/1.15 var(--body); box-shadow: 4px 4px 0 var(--ink); padding: 8px; touch-action: manipulation; }
.choices button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.choices button.right { background: #7BE0A0; }
.choices button.wrong { background: var(--red); color: #fff; }
.choices button kbd { display: none; font: 600 11px var(--body); opacity: .55; margin-right: 6px; }
@media (hover: hover) and (pointer: fine) { .choices button kbd { display: inline; } }
.float { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); font: 400 34px var(--display); color: var(--lemon); -webkit-text-stroke: 2.5px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); pointer-events: none; opacity: 0; white-space: nowrap; }
.float.on { animation: toast .9s ease-out; }
.float.bad { color: var(--red); }

/* Border Hop */
.trip { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font: 400 clamp(19px, 4.6vw, 26px)/1.1 var(--display); }
.trip .route { font: 600 15px/1.35 var(--body); }
.trip .from { background: var(--teal); }
.trip .to { background: var(--violet); }
.trip span.c { border: 2.5px solid var(--ink); border-radius: 12px; padding: 3px 9px; box-shadow: 2px 2px 0 var(--ink); }
.guessrow { position: relative; display: flex; gap: 8px; }
.guessrow input { flex: 1; min-width: 0; padding: 11px 14px; border: 3px solid var(--ink); border-radius: 14px; background: var(--paper); font-size: 17px; }
.sugg { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); display: flex; flex-direction: column; background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 4px 4px 0 var(--ink); overflow: hidden; z-index: 4; }
.sugg[hidden] { display: none; }
.sugg button { text-align: left; border: 0; border-bottom: 2px dashed rgba(17,17,17,.12); background: none; padding: 10px 14px; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.sugg button:last-child { border-bottom: 0; }
.sugg button.on, .sugg button:hover { background: var(--lemon); }
.chips-row { display: flex; gap: 6px; flex-wrap: wrap; min-height: 28px; }
.gchip { display: inline-flex; align-items: center; gap: 5px; border: 2.5px solid var(--ink); border-radius: 99px; padding: 2px 10px; font: 600 13px var(--body); }
.h0 { background: #7BE0A0; } .h1 { background: #FFE066; } .h2 { background: #FFA94D; } .h3 { background: #FF5D73; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; opacity: .85; justify-content: center; }
.legend i { display: inline-block; width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 4px; vertical-align: -2px; margin-right: 3px; }

@media (max-width: 560px) {
  .geo { gap: 8px; padding: 0 8px 10px; }
  .geo .panel { padding: 8px 10px; border-radius: 14px; }
  .choices button { min-height: 52px; font-size: 15px; }
  .trip { font-size: 17px; gap: 5px; }
  .trip span.c { padding: 2px 7px; border-radius: 10px; }
}
.guessrow[hidden], .legend[hidden] { display: none; }

/* Friend challenge banner on the start card */
.challenge { display: grid; gap: 2px; background: var(--lemon); border: 3px solid var(--ink); border-radius: 14px; padding: 8px 10px; margin: 8px 0; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-1deg); }
.challenge b { font: 400 20px var(--display); }

/* Silhouette */
.shapebox { flex: 1; min-height: 160px; display: grid; place-items: center; position: relative; border: 4px solid var(--ink); border-radius: 20px; background: #9EE3F5; box-shadow: 6px 6px 0 var(--ink); overflow: hidden; }
.shapebox svg { width: 92%; height: 92%; }
.shapebox .shape { fill: var(--ink); stroke: var(--ink); stroke-width: 1px; vector-effect: non-scaling-stroke; stroke-linejoin: round; transition: fill .3s; }
.shapebox .shape.right { fill: #3DBE6B; }
.shapebox .shape.wrong { fill: var(--red); }
.shapebox .mini { position: absolute; left: 8px; bottom: 8px; width: 38%; height: auto; max-width: 220px; aspect-ratio: 2 / 1; background: #9EE3F5; border: 2.5px solid var(--ink); border-radius: 10px; }
.shapebox .mini path { fill: var(--cream); stroke: none; }
.shapebox .mini path.hit { fill: var(--red); }
.shapebox .mini[hidden] { display: none; }
.ring { position: absolute; right: 10px; top: 10px; }

/* Bigger or Smaller */
.duo { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; min-height: 0; }
.duo button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 4px solid var(--ink); border-radius: 20px; background: var(--paper); box-shadow: 6px 6px 0 var(--ink); padding: 12px 8px; font: 400 clamp(20px, 5vw, 30px)/1.05 var(--display); touch-action: manipulation; min-height: 0; overflow: hidden; }
.duo button:nth-child(2) { background: var(--cream); }
.duo button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--ink); }
.duo button img { width: min(80%, 200px); aspect-ratio: 4 / 3; object-fit: cover; border: 3px solid var(--ink); border-radius: 10px; background: #fff; }
.duo button svg { width: 80%; height: 30%; min-height: 50px; }
.duo button svg path { fill: var(--ink); vector-effect: non-scaling-stroke; }
.duo button small { font: 600 14px var(--body); opacity: .8; min-height: 1.2em; }
.duo button.right { background: #7BE0A0; }
.duo button.wrong { background: var(--red); color: #fff; }
.vs { text-align: center; font: 400 22px var(--display); }
@media (max-width: 560px) { .duo { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } .duo button { flex-direction: row; justify-content: flex-start; padding: 10px 14px; text-align: left; } .duo button img { width: 38%; } .duo button svg { display: none; } }

/* Capital Rush */
.capbox .country { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.capbox .country img { width: min(56vw, 260px); max-height: none; }
.capbox .country b { font: 400 clamp(30px, 8vw, 48px)/1 var(--display); text-shadow: 3px 3px 0 var(--cream); }

/* Capital Rush */
.capbox .country { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.capbox .country img { width: min(56vw, 260px); max-height: none; }
.capbox .country b { font: 400 clamp(30px, 8vw, 48px)/1 var(--display); text-shadow: 3px 3px 0 var(--cream); }

/* Timed face-offs (Bigger or Smaller, Country Showdown, Head Count, Wild Planet, Rich & Famous) */
.geo .timer[hidden] { display: none; }
.geo .timer i { transition: none; }
.ask .q b.less { text-decoration: underline wavy var(--pink); text-underline-offset: 4px; }
.vs-chips { justify-content: center; margin: 6px 0 2px; }
.vs-chips .gchip { background: var(--paper); }
.vs-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0 4px; }
.vs-modes a { display: block; padding: 7px 6px; border: 2.5px solid var(--ink); border-radius: 12px; background: var(--paper); font: 600 14px var(--body); color: var(--ink); text-decoration: none; box-shadow: 2px 2px 0 var(--ink); }
.vs-modes a.on { background: var(--lemon); box-shadow: 3px 3px 0 var(--ink); }
.vs-state { width: min(80%, 200px); aspect-ratio: 4 / 3; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border: 3px solid var(--ink); border-radius: 10px; font-style: normal;
  background: linear-gradient(180deg, hsl(var(--h) 85% 72%) 0 50%, hsl(calc(var(--h) + 40) 80% 62%) 50% 100%); }
.vs-state b { font: 400 clamp(30px, 9vw, 54px)/1 var(--display); color: #fff; -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 3px 3px 0 var(--ink); }
.vs-state em { font: 600 12px var(--body); font-style: normal; background: var(--paper); border: 2px solid var(--ink); border-radius: 99px; padding: 1px 8px; max-width: 92%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
