:root {
  --night: #050b14;
  --ocean: #0a1d2f;
  --panel: rgba(10, 24, 38, 0.76);
  --panel-solid: #0b1b2a;
  --line: rgba(184, 227, 238, 0.14);
  --line-strong: rgba(184, 227, 238, 0.28);
  --text: #edf9f7;
  --muted: #91a9b4;
  --teal: #71e3c9;
  --blue: #5faaf4;
  --gold: #ffc85a;
  --danger: #ff8f88;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 46%, #0b2032 0, #07131f 36%, var(--night) 74%),
    var(--night);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(209, 249, 255, 0.52) 0 1px, transparent 1.4px),
    radial-gradient(circle at 83% 34%, rgba(209, 249, 255, 0.34) 0 1px, transparent 1.4px),
    radial-gradient(circle at 72% 78%, rgba(209, 249, 255, 0.22) 0 1px, transparent 1.4px),
    radial-gradient(circle at 31% 72%, rgba(209, 249, 255, 0.26) 0 1px, transparent 1.4px);
  background-size: 270px 270px, 340px 340px, 420px 420px, 510px 510px;
  content: "";
  opacity: 0.42;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(113, 227, 201, 0.55);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

svg {
  display: block;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 42vw;
  aspect-ratio: 1;
  border-radius: 999px;
  filter: blur(90px);
  opacity: 0.12;
  pointer-events: none;
}

.ambient-one {
  top: -28vw;
  left: -10vw;
  background: #3c8dc4;
}

.ambient-two {
  right: -20vw;
  bottom: -30vw;
  background: #4ac6a6;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100svh;
  padding: max(22px, env(safe-area-inset-top)) clamp(22px, 3vw, 48px) max(18px, env(safe-area-inset-bottom));
  padding-right: max(clamp(22px, 3vw, 48px), env(safe-area-inset-right));
  padding-left: max(clamp(22px, 3vw, 48px), env(safe-area-inset-left));
}

.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand > span:last-child {
  display: grid;
  gap: 2px;
}

.brand strong {
  font-size: 0.96rem;
  font-weight: 730;
  letter-spacing: -0.02em;
}

.brand small {
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-orbit {
  position: relative;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(113, 227, 201, 0.44);
  border-radius: 50%;
  transform: rotate(-18deg);
}

.brand-orbit::before,
.brand-orbit::after {
  position: absolute;
  border: 1px solid rgba(113, 227, 201, 0.22);
  border-radius: 50%;
  content: "";
}

.brand-orbit::before {
  inset: 6px -5px;
}

.brand-orbit::after {
  inset: -5px 9px;
}

.brand-orbit span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 16px rgba(113, 227, 201, 0.9);
}

.top-actions {
  display: flex;
  gap: 8px;
}

.quiet-button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: rgba(9, 22, 34, 0.54);
  backdrop-filter: blur(18px);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.quiet-button:hover,
.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(16, 38, 55, 0.78);
}

.quiet-button:active,
.icon-button:active {
  transform: scale(0.96);
}

.quiet-button {
  gap: 8px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  color: #c6d7dc;
  font-size: 0.76rem;
  font-weight: 680;
}

.quiet-button svg,
.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.quiet-button b {
  display: grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  margin-right: -6px;
  border-radius: 999px;
  background: rgba(113, 227, 201, 0.14);
  color: var(--teal);
  font-size: 0.64rem;
}

.game {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto;
  width: 100%;
  min-height: 0;
}

.progress-block {
  position: relative;
  z-index: 8;
  justify-self: center;
  width: min(270px, 48vw);
  margin-top: 2px;
  text-align: center;
}

.progress-block > p {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 730;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.progress-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.progress-value strong {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(1.5rem, 2.2vw, 2rem);
  font-weight: 560;
  letter-spacing: -0.06em;
}

.progress-value span {
  color: #758e9a;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.74rem;
}

.progress-track {
  display: block;
  width: 100%;
  height: 3px;
  margin-top: 9px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(184, 227, 238, 0.11);
}

.progress-track::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(184, 227, 238, 0.11);
}

.progress-track::-webkit-progress-value {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  box-shadow: 0 0 14px rgba(113, 227, 201, 0.55);
}

.progress-track::-moz-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  box-shadow: 0 0 14px rgba(113, 227, 201, 0.55);
}

.globe-stage {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(68vh, 62vw, 760px);
  min-width: 290px;
  aspect-ratio: 1;
  margin: -16px 0 -10px;
  user-select: none;
}

.globe-halo {
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 153, 186, 0.16) 20%, rgba(69, 179, 181, 0.06) 56%, transparent 72%);
  filter: blur(20px);
  transform: scale(1.14);
}

#globe {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  cursor: grab;
  filter: drop-shadow(0 35px 60px rgba(0, 0, 0, 0.42));
  outline: none;
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
}

#globe:active {
  cursor: grabbing;
}

.sphere-shadow {
  fill: rgba(0, 0, 0, 0.48);
  filter: blur(13px);
  transform: translateY(17px) scale(0.96);
  transform-origin: center;
}

.sphere-ocean {
  fill: url("#oceanGradient");
  stroke: rgba(174, 230, 236, 0.22);
  stroke-width: 1.25;
}

.sphere-glare {
  fill: none;
  stroke: rgba(199, 246, 246, 0.1);
  stroke-width: 18;
}

.graticule {
  fill: none;
  stroke: rgba(168, 215, 224, 0.08);
  stroke-width: 0.7;
}

.country {
  fill: #263441;
  stroke: rgba(169, 194, 200, 0.22);
  stroke-width: 0.52;
  vector-effect: non-scaling-stroke;
  transition: fill 380ms ease, stroke 380ms ease, opacity 200ms ease;
}

.country.context-land {
  fill: #172632;
  stroke: rgba(143, 175, 185, 0.12);
}

.country.revealed {
  fill: url("#revealedGradient");
  stroke: rgba(226, 255, 249, 0.72);
  stroke-width: 0.78;
}

.country.revealing {
  filter: url("#countryGlow");
  animation: country-awaken 920ms ease-out both;
}

.sphere-rim {
  fill: none;
  stroke: rgba(162, 222, 228, 0.22);
  stroke-width: 1.4;
  pointer-events: none;
  transition: stroke 160ms ease, stroke-width 160ms ease;
}

#globe:focus-visible .sphere-rim {
  stroke: rgba(113, 227, 201, 0.9);
  stroke-width: 3;
  filter: drop-shadow(0 0 6px rgba(113, 227, 201, 0.7));
}

.marker {
  opacity: 0.6;
  transition: opacity 180ms ease;
}

.marker circle:first-child {
  fill: rgba(157, 184, 190, 0.12);
  stroke: rgba(181, 207, 211, 0.4);
  stroke-width: 0.7;
}

.marker circle:last-child {
  fill: #6f858d;
}

.marker.revealed {
  opacity: 1;
  filter: url("#countryGlow");
}

.marker.revealed circle:first-child {
  fill: rgba(113, 227, 201, 0.17);
  stroke: rgba(182, 255, 237, 0.88);
}

.marker.revealed circle:last-child {
  fill: var(--teal);
}

.marker.revealing {
  animation: marker-awaken 900ms ease-out both;
}

body.complete .sphere-ocean {
  stroke: rgba(255, 213, 119, 0.55);
  stroke-width: 1.8;
}

body.complete .globe-halo {
  background: radial-gradient(circle, rgba(255, 200, 90, 0.14) 12%, rgba(84, 192, 181, 0.12) 48%, transparent 72%);
  opacity: 1;
  animation: halo-breathe 4s ease-in-out infinite;
}

.globe-controls {
  position: absolute;
  z-index: 7;
  top: 50%;
  right: 1.5%;
  display: grid;
  gap: 2px;
  padding: 4px;
  border: 1px solid rgba(187, 224, 231, 0.16);
  border-radius: 999px;
  background: rgba(5, 15, 24, 0.72);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  transform: translateY(-50%);
}

.globe-controls button {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(220, 241, 242, 0.78);
  touch-action: manipulation;
  transition: color 160ms ease, background 160ms ease, transform 120ms ease;
}

.globe-controls button:hover {
  background: rgba(113, 227, 201, 0.1);
  color: var(--text);
}

.globe-controls button:active {
  background: rgba(113, 227, 201, 0.16);
  transform: scale(0.92);
}

.globe-controls svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.drag-hint {
  position: absolute;
  z-index: 5;
  bottom: 9%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(187, 224, 231, 0.12);
  border-radius: 999px;
  background: rgba(5, 15, 24, 0.62);
  color: rgba(203, 225, 229, 0.62);
  font-size: 0.63rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 240ms ease;
}

.globe-stage.has-dragged .drag-hint {
  opacity: 0;
}

.drag-hint svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.map-loading {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 50%;
  background: rgba(6, 16, 25, 0.62);
  color: var(--muted);
  font-size: 0.72rem;
  transition: opacity 300ms ease;
}

.map-loading.done {
  opacity: 0;
  pointer-events: none;
}

.map-loading span {
  width: 13px;
  height: 13px;
  border: 2px solid rgba(113, 227, 201, 0.2);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.voice-dock {
  position: relative;
  z-index: 12;
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 42px);
  justify-self: center;
  width: min(850px, 92vw);
  min-height: 78px;
  padding: 10px 18px 10px 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 19, 30, 0.78);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(24px);
}

.dock-copy {
  min-width: 0;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-row strong {
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 690;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #71828a;
  box-shadow: 0 0 0 4px rgba(113, 130, 138, 0.1);
}

.voice-dock.listening .status-dot {
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(113, 227, 201, 0.12), 0 0 14px rgba(113, 227, 201, 0.62);
}

.voice-dock.success .status-dot {
  background: var(--blue);
}

.voice-dock.error .status-dot {
  background: var(--danger);
}

.dock-copy p {
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mic-button {
  position: relative;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 1px solid rgba(113, 227, 201, 0.6);
  border-radius: 50%;
  background: linear-gradient(145deg, #86ead3, #4faec1);
  color: #06131d;
  box-shadow: 0 0 0 8px rgba(113, 227, 201, 0.07), 0 8px 30px rgba(46, 176, 165, 0.25);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.mic-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 10px rgba(113, 227, 201, 0.08), 0 12px 34px rgba(46, 176, 165, 0.35);
}

.mic-button:active {
  transform: scale(0.96);
}

.mic-button:disabled {
  cursor: not-allowed;
  filter: grayscale(0.45);
  opacity: 0.48;
  transform: none;
}

.mic-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.stop-icon {
  display: none;
}

.mic-ripple {
  position: absolute;
  inset: -1px;
  border: 1px solid rgba(113, 227, 201, 0.5);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}

.voice-dock.listening .mic-button {
  background: #102e39;
  color: var(--teal);
}

.voice-dock.listening .mic-icon {
  display: none;
}

.voice-dock.listening .stop-icon {
  display: block;
}

.voice-dock.listening .mic-ripple {
  animation: mic-pulse 1.8s ease-out infinite;
}

.country-form {
  min-width: 0;
}

.country-form label {
  display: block;
  margin: 0 0 6px 3px;
  color: #718a95;
  font-size: 0.58rem;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.country-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(2, 11, 18, 0.46);
}

.country-form input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 0.875rem;
}

.country-form input::placeholder {
  color: #748b95;
}

.country-form button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: rgba(113, 227, 201, 0.1);
  color: var(--teal);
}

.country-form button:hover {
  background: rgba(113, 227, 201, 0.18);
}

.country-form button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(1, 6, 11, 0.62);
  backdrop-filter: blur(5px);
  animation: fade-in 160ms ease both;
}

.drawer {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 28px));
  padding: max(28px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-left: max(24px, env(safe-area-inset-left));
  border-left: 1px solid var(--line);
  background: rgba(7, 20, 31, 0.97);
  box-shadow: -30px 0 80px rgba(0, 0, 0, 0.38);
  overflow-y: auto;
  transform: translateX(105%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.drawer-header p,
.modal-kicker {
  margin: 0 0 5px;
  color: var(--teal);
  font-size: 0.62rem;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.drawer-header h2 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.icon-button {
  flex: 0 0 auto;
  width: 39px;
  height: 39px;
  padding: 0;
  border-radius: 50%;
}

.drawer-score {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin: 28px 0 20px;
}

.drawer-score strong {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 2.8rem;
  font-weight: 500;
  letter-spacing: -0.08em;
}

.drawer-score span {
  color: var(--muted);
  font-size: 0.72rem;
}

.continent-progress {
  display: grid;
  gap: 10px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.continent-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 10px;
}

.continent-row > span {
  color: #b5c7cd;
  font-size: 0.68rem;
}

.continent-row > progress {
  width: 100%;
  height: 3px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(184, 227, 238, 0.09);
}

.continent-row > progress::-webkit-progress-bar {
  border-radius: 999px;
  background: rgba(184, 227, 238, 0.09);
}

.continent-row > progress::-webkit-progress-value {
  background: var(--teal);
}

.continent-row > progress::-moz-progress-bar {
  background: var(--teal);
}

.continent-row > b {
  color: #79909b;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.62rem;
  font-weight: 500;
  text-align: right;
}

.found-list-heading {
  display: flex;
  justify-content: space-between;
  margin: 23px 0 10px;
  color: #708792;
  font-size: 0.6rem;
  font-weight: 720;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.found-list {
  flex: 1;
  min-height: 0;
  margin: 0 -8px 0 0;
  padding: 0 8px 0 0;
  overflow: auto;
  list-style: none;
  scrollbar-color: rgba(149, 183, 192, 0.25) transparent;
}

.found-list li:not(.empty-state) {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 2px;
  border-bottom: 1px solid rgba(184, 227, 238, 0.07);
}

.found-list li .found-number {
  color: #718891;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.6rem;
}

.found-list li strong {
  overflow: hidden;
  font-size: 0.76rem;
  font-weight: 610;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.found-list li small {
  color: #8298a1;
  font-size: 0.64rem;
}

.empty-state {
  padding: 28px 16px;
  border: 1px dashed rgba(184, 227, 238, 0.13);
  border-radius: 14px;
  color: #718792;
  font-size: 0.72rem;
  line-height: 1.55;
  text-align: center;
}

.reset-button {
  align-self: flex-start;
  margin-top: 20px;
  padding: 8px 0;
  border: 0;
  background: transparent;
  color: #728792;
  font-size: 0.67rem;
  text-decoration: underline;
  text-decoration-color: rgba(114, 135, 146, 0.45);
  text-underline-offset: 3px;
}

.reset-button:hover {
  color: var(--danger);
}

.modal {
  width: min(500px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: clamp(28px, 5vw, 48px);
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0, rgba(86, 183, 176, 0.11), transparent 38%),
    #0a1b2a;
  color: var(--text);
  box-shadow: var(--shadow);
}

.modal[open] {
  animation: modal-in 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.modal::backdrop {
  background: rgba(2, 8, 13, 0.74);
  backdrop-filter: blur(8px);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
}

.modal h2 {
  margin: 8px 0 18px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.35rem, 7vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.96;
}

.modal > p:not(.modal-kicker):not(.fine-print) {
  margin: 0;
  color: #a2b8c0;
  font-size: 0.82rem;
  line-height: 1.65;
}

.about-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 25px 0;
}

.about-rules div {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(4, 14, 23, 0.36);
}

.about-rules strong {
  color: var(--teal);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1.35rem;
  font-weight: 520;
}

.about-rules span {
  color: #7f98a2;
  font-size: 0.63rem;
  line-height: 1.35;
}

.fine-print {
  margin: 0 0 25px;
  color: #849ba5;
  font-size: 0.7rem;
  line-height: 1.55;
}

.primary-button {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(113, 227, 201, 0.5);
  border-radius: 14px;
  background: linear-gradient(135deg, #7ce4cc, #55adc6);
  color: #06141e;
  font-size: 0.76rem;
  font-weight: 760;
}

.primary-button:hover {
  filter: brightness(1.08);
}

.completion-modal {
  text-align: center;
}

.completion-modal h2 {
  font-size: clamp(3rem, 10vw, 5rem);
}

.completion-orbit {
  position: relative;
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  margin: -90px auto 26px;
  border: 1px solid rgba(255, 200, 90, 0.45);
  border-radius: 50%;
  background: #0a1b2a;
  box-shadow: 0 0 50px rgba(255, 200, 90, 0.16);
}

.completion-orbit::before,
.completion-orbit::after {
  position: absolute;
  border: 1px solid rgba(113, 227, 201, 0.28);
  border-radius: 50%;
  content: "";
}

.completion-orbit::before {
  inset: 15px -9px;
  transform: rotate(20deg);
}

.completion-orbit::after {
  inset: -9px 22px;
  transform: rotate(-20deg);
}

.completion-orbit span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #9debd8, #387f96 56%, #102737);
}

.completion-orbit i {
  position: absolute;
  top: 5px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(255, 200, 90, 0.8);
}

.completion-stat {
  display: grid;
  gap: 4px;
  margin: 25px 0;
  padding: 16px;
  border: 1px solid rgba(255, 200, 90, 0.18);
  border-radius: 14px;
  background: rgba(255, 200, 90, 0.04);
}

.completion-stat span {
  color: #718994;
  font-size: 0.59rem;
  font-weight: 720;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.completion-stat strong {
  color: var(--gold);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 1.1rem;
  font-weight: 520;
}

.text-button {
  margin-top: 15px;
  padding: 6px;
  border: 0;
  background: transparent;
  color: #78909a;
  font-size: 0.67rem;
}

.text-button:hover {
  color: var(--text);
}

.toast {
  position: fixed;
  z-index: 80;
  top: max(78px, calc(env(safe-area-inset-top) + 60px));
  left: 50%;
  padding: 10px 16px;
  border: 1px solid rgba(113, 227, 201, 0.26);
  border-radius: 999px;
  background: rgba(8, 25, 37, 0.92);
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.28);
  color: #ccece6;
  font-size: 0.72rem;
  transform: translateX(-50%);
  animation: toast-in 220ms ease both;
}

@keyframes country-awaken {
  0% { opacity: 0.25; transform: scale(0.98); }
  30% { opacity: 1; }
  55% { fill: #c5fff2; }
  100% { transform: scale(1); }
}

@keyframes marker-awaken {
  0% { opacity: 0; transform: scale(0.3); }
  55% { opacity: 1; transform: scale(1.7); }
  100% { transform: scale(1); }
}

@keyframes mic-pulse {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.65); }
}

@keyframes halo-breathe {
  0%, 100% { transform: scale(1.1); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(15px) scale(0.98); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100svh;
    padding: max(16px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    padding-right: max(14px, env(safe-area-inset-right));
    padding-left: max(14px, env(safe-area-inset-left));
  }

  .quiet-button {
    width: 40px;
    padding: 0;
  }

  .quiet-button > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .found-button {
    width: auto;
    padding: 0 9px 0 11px;
  }

  .game {
    grid-template-rows: auto minmax(300px, 1fr) auto;
  }

  .progress-block {
    margin-top: 10px;
  }

  .globe-stage {
    width: min(94vw, 58vh, 560px);
    min-width: 0;
    margin: -6px 0 -4px;
  }

  .voice-dock {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 10px 14px;
    width: 100%;
    padding: 12px 12px 12px 16px;
    border-radius: 19px;
  }

  .dock-copy {
    grid-column: 1;
    grid-row: 1;
  }

  .status-row {
    align-items: flex-start;
  }

  .status-row strong,
  .dock-copy p {
    overflow: visible;
    line-height: 1.35;
    text-overflow: clip;
    white-space: normal;
  }

  .mic-button {
    grid-column: 2;
    grid-row: 1;
    width: 54px;
    height: 54px;
  }

  .country-form {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .country-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .country-form input {
    font-size: 1rem;
  }

  .modal {
    padding: 34px 24px 26px;
    border-radius: 24px;
  }

  .completion-orbit {
    margin-top: -77px;
  }
}

@media (max-height: 720px) and (min-width: 761px) {
  .app-shell {
    padding-top: 16px;
    padding-bottom: 12px;
  }

  .globe-stage {
    width: min(60vh, 54vw, 600px);
  }

  .voice-dock {
    min-height: 70px;
  }
}

@media (max-height: 640px) {
  body {
    overflow: auto;
  }

  .modal {
    max-height: calc(100dvh - 24px);
    overflow: auto;
  }

  .completion-orbit {
    margin-top: 0;
  }

  .found-list {
    flex: 0 0 auto;
    max-height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}
