:root {
  color-scheme: dark;
  --bg: #061525;
  --bg-2: #0a2037;
  --panel: rgba(10, 32, 55, 0.84);
  --panel-strong: #0b2944;
  --ink: #f5fbff;
  --muted: #9fb8cd;
  --muted-2: #7894ab;
  --line: rgba(211, 237, 255, 0.14);
  --line-strong: rgba(211, 237, 255, 0.26);
  --accent: #ffd36a;
  --accent-strong: #ffb74d;
  --mint: #77e0bf;
  --sky: #68c7ff;
  --danger: #ff9e9e;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

html {
  background: var(--bg);
}

body {
  min-height: 100dvh;
  overflow: hidden;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 5%, rgba(40, 128, 175, 0.24), transparent 32%),
    radial-gradient(circle at 92% 82%, rgba(32, 92, 140, 0.18), transparent 36%),
    linear-gradient(145deg, #051321 0%, #081b2e 48%, #061321 100%);
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  width: 100%;
  height: 100dvh;
  padding: calc(10px + env(safe-area-inset-top)) 18px calc(10px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 2px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at 31% 27%, rgba(255, 255, 255, 0.92), transparent 10%),
    radial-gradient(circle at 62% 42%, #6ee2c4 0 16%, transparent 17%),
    radial-gradient(circle at 40% 72%, #65d3a9 0 11%, transparent 12%),
    linear-gradient(145deg, #1aa2d2, #0b4b86 72%);
  box-shadow:
    inset -10px -8px 18px rgba(0, 14, 34, 0.55),
    0 8px 20px rgba(48, 166, 209, 0.26);
}

.brand-orbit {
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(226, 250, 255, 0.54);
  border-radius: 50%;
  transform: rotate(-28deg) scaleY(0.42);
  opacity: 0.75;
}

.brand-dot {
  position: absolute;
  right: 7px;
  top: 22px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(255, 211, 106, 0.9);
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-copy strong {
  overflow: hidden;
  font-size: clamp(17px, 1.7vw, 21px);
  font-weight: 760;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.language-switch {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 24, 43, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.language-button {
  min-width: 68px;
  min-height: 38px;
  padding: 0 15px;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.language-button.is-active {
  color: #152334;
  background: var(--accent);
  font-weight: 760;
  box-shadow: 0 4px 14px rgba(255, 195, 74, 0.22);
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 14px;
  min-height: 0;
}

.stage {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 48%, #10324e 0%, #081d32 46%, #051321 100%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  touch-action: none;
  user-select: none;
}

.space-bg,
.camera-feed,
.camera-shade,
.globe-halo,
#globeCanvas,
.axis-overlay,
.marker-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.space-bg {
  z-index: 0;
  opacity: 1;
  background-image:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.66) 0 1px, transparent 1.8px),
    radial-gradient(circle at 76% 29%, rgba(255, 255, 255, 0.42) 0 1px, transparent 1.8px),
    radial-gradient(circle at 84% 73%, rgba(255, 255, 255, 0.5) 0 1px, transparent 1.8px),
    radial-gradient(circle at 35% 81%, rgba(255, 255, 255, 0.37) 0 1px, transparent 1.8px),
    radial-gradient(circle at 64% 12%, rgba(121, 208, 255, 0.48) 0 1px, transparent 1.8px),
    radial-gradient(circle at 45% 36%, rgba(255, 255, 255, 0.22) 0 1px, transparent 1.8px);
  background-size: 190px 190px, 260px 260px, 310px 310px, 230px 230px, 280px 280px, 170px 170px;
  transition: opacity 220ms ease;
}

.space-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 54%, transparent 26%, rgba(3, 13, 25, 0.22) 62%, rgba(3, 12, 22, 0.65) 100%),
    linear-gradient(180deg, rgba(9, 35, 56, 0.16), transparent 32%, rgba(2, 10, 18, 0.32));
}

.camera-feed {
  z-index: 1;
  display: block;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.58) brightness(0.62) contrast(1.04);
  transform: scale(1.02);
  transition: opacity 240ms ease;
}

.camera-shade {
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse at 50% 50%, transparent 22%, rgba(3, 14, 25, 0.22) 65%, rgba(3, 12, 22, 0.72) 100%),
    linear-gradient(180deg, rgba(4, 16, 29, 0.32), transparent 38%, rgba(4, 16, 29, 0.44));
  transition: opacity 240ms ease;
}

.stage.is-mr .space-bg,
.stage.is-mr .globe-halo {
  opacity: 0;
}

.stage.is-mr .camera-feed,
.stage.is-mr .camera-shade {
  opacity: 1;
}

.globe-halo {
  z-index: 3;
  top: 50%;
  left: 50%;
  width: min(72%, 620px);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(83, 204, 255, 0.23) 0%, rgba(47, 143, 211, 0.11) 48%, transparent 69%);
  filter: blur(18px);
  transition: opacity 240ms ease;
}

#globeCanvas {
  z-index: 4;
  display: block;
  touch-action: none;
  cursor: grab;
}

#globeCanvas:active {
  cursor: grabbing;
}

.axis-overlay {
  z-index: 5;
  overflow: visible;
  pointer-events: none;
  opacity: 0.88;
  transition: opacity 180ms ease;
}

.axis-overlay.is-hidden {
  opacity: 0;
}

.marker-layer {
  z-index: 6;
  pointer-events: none;
}

.country-marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: rgba(7, 27, 47, 0.82);
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.34),
    0 0 0 5px rgba(255, 211, 106, 0.12);
  pointer-events: auto;
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: box-shadow 160ms ease, scale 160ms ease;
  animation: marker-in 300ms cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.country-marker:hover,
.country-marker:focus-visible {
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.4),
    0 0 0 7px rgba(255, 211, 106, 0.2);
}

.country-marker.is-selected {
  border-color: var(--accent);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    0 0 0 8px rgba(255, 211, 106, 0.22);
}

.country-marker .flag-mini {
  width: 23px;
  height: 15px;
  overflow: hidden;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.24);
}

.country-marker svg {
  display: block;
  width: 100%;
  height: 100%;
}

.marker-label {
  position: absolute;
  top: 39px;
  left: 50%;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(5, 20, 36, 0.78);
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.country-marker:hover .marker-label,
.country-marker:focus-visible .marker-label,
.country-marker.is-selected .marker-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.stage-topline {
  position: absolute;
  z-index: 10;
  top: 18px;
  right: 18px;
  left: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.mode-badge,
.ghost-button {
  border: 1px solid rgba(224, 244, 255, 0.18);
  background: rgba(5, 20, 36, 0.58);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.mode-badge {
  padding: 9px 13px;
  border-radius: 999px;
  color: #dff7ff;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ghost-button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
  pointer-events: auto;
  transition: background 180ms ease, border-color 180ms ease;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  border-color: rgba(255, 211, 106, 0.5);
  background: rgba(13, 42, 67, 0.82);
}

.stage-hint {
  position: absolute;
  z-index: 9;
  bottom: 22px;
  left: 50%;
  max-width: min(72%, 460px);
  padding: 10px 16px;
  border: 1px solid rgba(224, 244, 255, 0.12);
  border-radius: 999px;
  color: #eaf8ff;
  background: rgba(5, 21, 38, 0.62);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  font-size: 12px;
  font-weight: 640;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
  backdrop-filter: blur(12px);
  pointer-events: none;
}

.stage-actions {
  position: absolute;
  z-index: 10;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 8px;
}

.round-button {
  display: grid;
  place-items: center;
  gap: 1px;
  width: 54px;
  height: 54px;
  padding: 4px;
  border: 1px solid rgba(224, 244, 255, 0.16);
  border-radius: 18px;
  color: #d9effb;
  background: rgba(5, 20, 36, 0.58);
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.round-button:hover,
.round-button:focus-visible,
.round-button.is-on {
  border-color: rgba(255, 211, 106, 0.38);
  color: var(--accent);
  background: rgba(24, 48, 68, 0.78);
}

.round-icon {
  font-size: 19px;
  line-height: 1;
}

.round-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.camera-note {
  position: absolute;
  z-index: 12;
  top: 50%;
  left: 50%;
  display: grid;
  gap: 9px;
  width: min(82%, 400px);
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 24px;
  color: var(--ink);
  background: rgba(5, 21, 38, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(18px);
}

.camera-note strong {
  font-size: 15px;
}

.camera-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.camera-note button {
  justify-self: center;
  min-height: 42px;
  margin-top: 4px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: #162332;
  background: var(--accent);
  font-weight: 760;
  cursor: pointer;
}

.toast {
  position: absolute;
  z-index: 14;
  bottom: 92px;
  left: 50%;
  max-width: min(84%, 440px);
  padding: 11px 17px;
  border: 1px solid rgba(255, 211, 106, 0.32);
  border-radius: 13px;
  color: #fff7df;
  background: rgba(20, 34, 44, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.26);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.info-panel {
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(15, 44, 70, 0.82), rgba(6, 24, 42, 0.9)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.info-content {
  height: 100%;
  overflow-y: auto;
  padding: 24px;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.info-content::-webkit-scrollbar {
  width: 6px;
}

.info-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--mint);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.info-title {
  margin: 0;
  font-size: clamp(23px, 2.4vw, 32px);
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.info-title.en {
  font-size: clamp(21px, 2.2vw, 29px);
}

.info-subtitle {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.stat-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.stat-card strong {
  color: var(--accent);
  font-size: 19px;
  font-weight: 760;
}

.stat-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

.section-label {
  margin: 24px 0 10px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.country-list {
  display: grid;
  gap: 8px;
}

.country-list-button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.country-list-button:hover,
.country-list-button:focus-visible {
  border-color: rgba(255, 211, 106, 0.38);
  background: rgba(255, 255, 255, 0.07);
}

.list-flag {
  width: 38px;
  height: 25px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
}

.list-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}

.list-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.list-name strong {
  font-size: 13px;
}

.list-name span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-arrow {
  margin-left: auto;
  color: var(--muted-2);
  font-size: 18px;
}

.country-card {
  display: grid;
  gap: 16px;
  animation: card-in 260ms cubic-bezier(0.18, 0.8, 0.2, 1) both;
}

.flag-frame {
  width: 106px;
  height: 70px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.flag-frame svg {
  display: block;
  width: 100%;
  height: 100%;
}

.country-heading {
  display: grid;
  gap: 4px;
}

.country-name {
  margin: 0;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.05;
}

.country-name-en {
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.02em;
}

.continent-line {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.continent-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 10px rgba(119, 224, 191, 0.6);
}

.voice-grid {
  display: grid;
  gap: 8px;
}

.voice-button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 58px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.voice-button:hover,
.voice-button:focus-visible {
  border-color: rgba(119, 224, 191, 0.4);
  background: rgba(119, 224, 191, 0.08);
}

.voice-button:active {
  transform: scale(0.99);
}

.voice-language {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #0b2438;
  background: var(--mint);
  font-size: 11px;
  font-weight: 800;
}

.voice-button[data-voice="en"] .voice-language {
  background: var(--sky);
}

.voice-name {
  display: grid;
  gap: 2px;
}

.voice-name strong {
  font-size: 12px;
}

.voice-name span {
  color: var(--muted);
  font-size: 10px;
}

.voice-play {
  color: var(--accent);
  font-size: 20px;
}

.hint-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  line-height: 1.55;
}

.hint-line strong {
  color: var(--ink);
}

.quiz-prompt {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(255, 211, 106, 0.35);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(255, 211, 106, 0.12), rgba(255, 183, 77, 0.04));
}

.quiz-prompt span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.quiz-prompt strong {
  font-size: 19px;
  line-height: 1.2;
}

.quiz-prompt em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.result-line {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.45;
}

.result-line.is-success {
  color: #dff9ef;
  background: rgba(64, 190, 139, 0.16);
}

.result-line.is-retry {
  color: #ffe9cf;
  background: rgba(255, 159, 82, 0.12);
}

.tab-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  align-self: end;
  width: min(100%, 560px);
  min-height: 66px;
  margin: 0 auto;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: rgba(7, 24, 42, 0.78);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
}

.tab-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  border: 0;
  border-radius: 18px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: color 180ms ease, background 180ms ease, transform 180ms ease;
}

.tab-button:hover,
.tab-button:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.tab-button.is-active {
  color: #102338;
  background: var(--accent);
  font-weight: 780;
  box-shadow: 0 7px 18px rgba(255, 195, 74, 0.22);
}

.tab-icon {
  font-size: 20px;
  line-height: 1;
}

.tab-copy {
  font-size: 12px;
}

@keyframes marker-in {
  from {
    opacity: 0;
    scale: 0.7;
  }
  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 300px;
  }

  .info-content {
    padding: 20px;
  }
}

@media (max-width: 820px) {
  body {
    overflow: hidden;
  }

  .app-shell {
    gap: 10px;
    padding: calc(8px + env(safe-area-inset-top)) 12px calc(8px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 50px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .brand-copy span {
    font-size: 9px;
  }

  .language-button {
    min-width: 58px;
    min-height: 34px;
    padding: 0 11px;
    font-size: 12px;
  }

  .workspace {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(300px, 51dvh) minmax(0, 1fr);
    gap: 10px;
  }

  .stage {
    border-radius: 24px;
  }

  .info-panel {
    border-radius: 23px;
  }

  .info-content {
    padding: 18px;
  }

  .stage-hint {
    bottom: 16px;
    max-width: 68%;
    font-size: 11px;
  }

  .stage-actions {
    right: 14px;
    bottom: 13px;
  }

  .round-button {
    width: 48px;
    height: 48px;
    border-radius: 15px;
  }

  .stage-topline {
    top: 14px;
    right: 14px;
    left: 14px;
  }

  .tab-bar {
    min-height: 60px;
    border-radius: 20px;
  }

  .tab-button {
    min-height: 48px;
    border-radius: 15px;
  }

  .tab-icon {
    font-size: 18px;
  }

  .tab-copy {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .brand-copy span {
    display: none;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .language-switch {
    gap: 2px;
    padding: 3px;
  }

  .language-button {
    min-width: 48px;
    min-height: 31px;
    padding: 0 8px;
    font-size: 11px;
  }

  .workspace {
    grid-template-rows: minmax(290px, 49dvh) minmax(0, 1fr);
  }

  .stage-hint {
    display: none;
  }

  .mode-badge {
    padding: 8px 10px;
    font-size: 9px;
  }

  .ghost-button {
    min-height: 38px;
    padding: 0 12px;
    font-size: 11px;
  }

  .stat-card strong {
    font-size: 17px;
  }

  .country-name {
    font-size: 30px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .app-shell {
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: calc(6px + env(safe-area-inset-top)) 12px calc(6px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 42px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand-copy span {
    display: none;
  }

  .workspace {
    grid-template-columns: minmax(0, 1fr) minmax(230px, 31vw);
    grid-template-rows: 1fr;
    gap: 8px;
  }

  .stage {
    border-radius: 20px;
  }

  .info-panel {
    border-radius: 20px;
  }

  .info-content {
    padding: 15px;
  }

  .stage-hint {
    display: none;
  }

  .stage-actions {
    right: 10px;
    bottom: 10px;
  }

  .round-button {
    width: 43px;
    height: 43px;
  }

  .tab-bar {
    min-height: 48px;
    margin: 0 auto;
    padding: 4px;
    border-radius: 17px;
  }

  .tab-button {
    min-height: 39px;
    border-radius: 13px;
  }

  .info-title {
    font-size: 22px;
  }

  .stat-grid {
    margin-top: 12px;
  }

  .section-label {
    margin-top: 14px;
  }
}

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

.back-link {
  justify-self: start;
  padding: 8px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
}

.ghost-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.stage.no-webgl #globeCanvas {
  display: none;
}

@media (max-width: 820px) {
  .info-content {
    padding-bottom: 22px;
  }
}

.zoom-control {
  position: absolute;
  z-index: 10;
  right: 18px;
  bottom: 82px;
  display: grid;
  gap: 8px;
}

.zoom-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid rgba(224, 244, 255, 0.16);
  border-radius: 15px;
  color: #e5f6ff;
  background: rgba(5, 20, 36, 0.58);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  font-size: 24px;
  font-weight: 520;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 120ms ease;
}

.zoom-button:hover,
.zoom-button:focus-visible {
  border-color: rgba(56, 200, 236, 0.56);
  color: #9beeff;
  background: rgba(18, 54, 78, 0.78);
}

.zoom-button:active {
  transform: scale(0.94);
}

@media (max-width: 820px) {
  .zoom-control {
    right: 14px;
    bottom: 72px;
    gap: 6px;
  }

  .zoom-button {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    font-size: 22px;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .zoom-control {
    right: 10px;
    bottom: 60px;
    gap: 5px;
  }

  .zoom-button {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    font-size: 20px;
  }
}


/* Single-column globe layout: no detail panel between globe and bottom navigation */
.workspace {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.info-panel {
  display: none !important;
}

.stage {
  min-height: 0;
}

.app-shell {
  gap: 8px;
}

@media (max-width: 820px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }
}

@media (max-height: 560px) and (orientation: landscape) {
  .workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }
}
