/* ============================================================
   Countries of the World — brand bar, home, and the Learn / Play
   screens. Loaded after theme.css; uses the --cg-* tokens, so light
   and dark both follow the theme toggle.

   Which screen is on show comes from <body> (set in app.js):
     data-screen   home | learn | play | names   the chooser on show
     data-mode     learn | play                  whose colour applies
     .cg-playing   a round or study session has the page
   ============================================================ */

:root {
  --cg-line: #d9e1e5;
  --cg-chrome: var(--cg-bg);          /* the brand bar: the page frame's own tone */
  --cg-hero: var(--cg-surface);       /* the home screen: content, the brightest surface */
  --cg-card-shadow: 0 18px 45px rgba(18, 23, 34, 0.10);

  /* The two things you can do here each own a colour: Learn is teal, Play
     is blue. --cg-learn / --cg-play are the fields (white text on top);
     the -ink values are that colour as text on the page. They are separate
     from --cg-accent so the colourblind palette, which turns the accent
     blue, can't make the two look alike. */
  --cg-learn: #0f766e;
  --cg-play: #2457c5;
  --cg-learn-ink: #0b6159;
  --cg-play-ink: #2150b8;

  /* A country drawn by its outline (Shapes) */
  --cg-shape: #2457c5;

  /* An earned star (levels): amber, dark enough to stand out on white */
  --cg-star: #d97706;

  /* The globe on the home screen (js/globe.js reads land, line and known) */
  --cg-globe-sea: #dfe9ef;
  --cg-globe-land: #ffffff;
  --cg-globe-line: #9db0bc;
  --cg-globe-rim: #c3d0d8;
}
[data-theme="dark"] {
  --cg-line: #2b3a52;
  --cg-chrome: #0b1220;
  --cg-hero: var(--cg-bg);
  --cg-card-shadow: 0 18px 45px rgba(0, 0, 0, 0.4);
  --cg-learn-ink: #5eead4;
  --cg-play-ink: #9bb9ff;
  --cg-star: #fbbf24;
  --cg-shape: #7ea2ff;
  --cg-globe-sea: #15203a;
  --cg-globe-land: #2a3954;
  --cg-globe-line: #4d6184;
  --cg-globe-rim: #2c3d5c;
}
body[data-mode="learn"], [data-mode="learn"] { --cg-mode: var(--cg-learn); --cg-mode-ink: var(--cg-learn-ink); }
body[data-mode="play"], [data-mode="play"] { --cg-mode: var(--cg-play); --cg-mode-ink: var(--cg-play-ink); }

::selection { background: color-mix(in srgb, var(--cg-mode, var(--cg-accent)) 26%, transparent); }

/* ===== Brand bar =====
   Chrome: it takes the page frame's tone, so the content under it is the
   brightest thing on screen. Every control in it is one height and one
   shape. */
.cg-nav {
  background: var(--cg-chrome);
  border-bottom: 1px solid var(--cg-line);
}
.cg-nav-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.cg-brand {
  display: flex; align-items: center; gap: 0.7rem;
  color: var(--cg-text); text-decoration: none;
  font-weight: 800; font-size: 1.06rem; letter-spacing: -0.015em; line-height: 1.12;
  white-space: nowrap;
}
.cg-brand:focus-visible { outline: 3px solid var(--cg-accent-2); outline-offset: 3px; border-radius: 8px; }
.cg-logo { display: block; flex: none; width: 36px; height: 36px; }
/* Home, Learn, Play: three icons in one pill, the current one raised */
.cg-modenav {
  flex: none;
  display: flex; gap: 0.15rem; padding: 0.2rem;
  margin-inline-start: 1.25rem;
  border: 1px solid var(--cg-line); border-radius: 999px;
}
.cg-navicon {
  width: 2.75rem; height: 2.25rem; padding: 0;
  display: grid; place-items: center;
}
.cg-navicon .cg-ic { width: 22px; height: 22px; }
.cg-navlinks { display: flex; gap: 0.15rem; margin-inline-start: 0.5rem; }
.cg-navlink {
  height: 2.5rem; padding: 0 0.9rem; border: 0; border-radius: 999px;
  background: transparent; color: var(--cg-text-dim);
  font-weight: 600; font-size: 0.92rem; cursor: pointer;
}
.cg-navlink:hover { color: var(--cg-text); }
.cg-navlink:focus-visible { outline: 3px solid var(--cg-accent-2); outline-offset: 1px; }
/* Where you are: Home, or the mode whose screens you are in */
.cg-navlink[aria-current="page"] {
  color: var(--cg-mode-ink, var(--cg-text));
  background: var(--cg-surface);
  box-shadow: inset 0 0 0 1px var(--cg-line);
}
.cg-nav-right { margin-inline-start: auto; display: flex; gap: 0.5rem; align-items: center; }
.cg-nav-streak {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-inline-end: 0.5rem;
  color: var(--cg-text); font-weight: 600; font-size: 0.9rem; white-space: nowrap;
}
.cg-nav-streak.hidden { display: none; }
.cg-nav .cg-theme-toggle,
.cg-nav #auth-slot .cg-btn {
  width: auto; height: 2.5rem; min-width: 2.5rem; padding: 0;
  border: 1px solid var(--cg-line); border-radius: 999px;
  background: transparent; color: var(--cg-text);
  font-weight: 600; font-size: 0.9rem;
}
.cg-nav .cg-theme-toggle:hover,
.cg-nav #auth-slot .cg-btn:hover { border-color: var(--cg-line); background: var(--cg-surface); }
.cg-nav #auth-slot .cg-btn { gap: 0.45rem; padding: 0 0.8rem; }

/* Sign up / Sign in, and the signed-in player's menu */
.cg-auth { position: relative; }
.cg-auth-menu {
  position: absolute; inset-inline-end: 0; top: calc(100% + 0.4rem); min-width: 12rem; padding: 0.3rem;
  display: grid; background: var(--cg-surface); border: 1px solid var(--cg-line); border-radius: var(--cg-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25); z-index: 60; text-align: start;
}
.cg-auth-menu[hidden] { display: none; }
.cg-auth-handle { padding: 0.45rem 0.7rem 0.3rem; font-size: 0.8rem; color: var(--cg-text-dim); white-space: nowrap; }
.cg-auth-menu button {
  text-align: start; padding: 0.5rem 0.7rem; border: 0; border-radius: calc(var(--cg-radius) - 2px);
  background: none; color: var(--cg-text); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer;
}
.cg-auth-menu button:hover, .cg-auth-menu button:focus-visible { background: var(--cg-bg); }

/* ===== Home ===== */
.cg-hero {
  position: relative;
  overflow: hidden;
  background: var(--cg-hero);
  border-bottom: 1px solid var(--cg-line);
}
body.cg-playing .cg-hero,
body[data-screen]:not([data-screen="home"]) .cg-hero { display: none; }
.cg-hero-inner {
  position: relative;
  max-width: 80rem;
  min-height: min(calc(100vh - 64px), 52rem);
  margin: 0 auto;
  padding: 4rem 2rem 3.5rem;
  display: flex; flex-direction: column; justify-content: center;
}
/* The words keep to the left of the globe, whatever the window's width */
.cg-hero-copy, .cg-doors, .cg-jump { position: relative; z-index: 1; max-width: min(39rem, 42vw + 5.5rem); }
.cg-hero-title {
  margin: 0;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -0.04em;
  color: var(--cg-text);
  text-wrap: balance;
}
.cg-hero-title em {
  font-style: normal;
  color: var(--cg-learn-ink);
}
.cg-hero-sub {
  margin: 1.25rem 0 0;
  max-width: 34rem;
  font-size: 1.125rem; line-height: 1.55;
  color: var(--cg-text-dim);
}
/* Headings take focus when a screen opens, so keyboard and screen-reader
   users land on the new screen's name */
/* Focus moves to a screen's title so screen readers announce it; the title
   isn't a control, so it shows no ring */
.cg-hero-title:focus,
.cg-screen-title:focus { outline: none; }

.cg-known {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 1rem 0 0;
  font-size: 0.98rem; color: var(--cg-text);
  font-variant-numeric: tabular-nums;
}
.cg-known.hidden { display: none; }
.cg-known i { flex: none; width: 0.7rem; height: 0.7rem; border-radius: 999px; background: var(--cg-map-guessed); }
.cg-known b { font-weight: 700; }

/* ----- Today's goal: an icon, the count in words, and a bar ----- */
.cg-goal {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.55rem;
  margin: 0.6rem 0 0;
  font-size: 0.98rem; color: var(--cg-text);
  font-variant-numeric: tabular-nums;
}
.cg-goal.hidden { display: none; }
.cg-goal .cg-ic { color: var(--cg-text-dim); }
.cg-goal b { font-weight: 700; }
.cg-goal-bar {
  flex: none; width: 6rem; height: 0.4rem;
  overflow: hidden; border-radius: 999px;
  background: color-mix(in srgb, var(--cg-text) 12%, transparent);
}
.cg-goal-bar i {
  display: block; height: 100%; border-radius: 999px;
  background: var(--cg-map-guessed);
  transform: scaleX(var(--fill, 0)); transform-origin: left center;
}
[dir="rtl"] .cg-goal-bar i { transform-origin: right center; }
.cg-goal.is-met .cg-ic { color: var(--cg-map-guessed); }
#play-goal { margin: 0 0 1.1rem; }
.cg-result-goal { margin: 0; font-size: inherit; color: var(--cg-text-dim); }

/* ----- The globe -----
   Beside the words on a wide screen, running off the edge; on a narrow one
   it rises behind the menu (see Narrow below). */
.cg-globe-stage { position: absolute; inset: 0; pointer-events: none; }
.cg-globe {
  --cg-globe-known: var(--cg-map-guessed);
  --cg-globe-lat: 16;                /* the latitude facing the viewer */
  position: absolute; top: 50%; inset-inline-start: calc(2rem + min(42rem, 42vw + 8.5rem));
  width: min(50rem, 58vw); aspect-ratio: 1;
  transform: translateY(-50%);
  overflow: hidden; border-radius: 50%;
  background: var(--cg-globe-sea);
  cursor: grab; touch-action: pan-y; user-select: none;
  pointer-events: auto;
}
.cg-globe.is-dragging { cursor: grabbing; }
.cg-globe canvas { display: block; width: 100%; height: 100%; }
.cg-globe::after {
  content: '';
  position: absolute; inset: 0; border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--cg-globe-rim);
  pointer-events: none;
}

/* ----- The Learn and Play doors -----
   Two equals, as a menu of two rows: same size, same parts, neither filled
   in as "the" button. Each carries its mode's colour, which its screen
   then keeps. */
.cg-doors { margin-top: 2.5rem; border-top: 1px solid var(--cg-line); }
.cg-door {
  display: grid; grid-template-columns: 10.5rem minmax(0, 1fr) auto; align-items: center; gap: 1.25rem;
  padding: 1.15rem 0.5rem 1.15rem 0.25rem;
  border-bottom: 1px solid var(--cg-line);
  color: var(--cg-text); text-decoration: none;
  transition: background var(--cg-anim-fast);
}
.cg-door:hover { background: var(--cg-surface-2); }
.cg-door:focus-visible { outline: 3px solid var(--cg-mode-ink); outline-offset: 2px; border-radius: 6px; }
.cg-door-name {
  display: flex; align-items: center; gap: 0.65rem;
  font-size: 1.75rem; font-weight: 800; letter-spacing: -0.025em; line-height: 1.15;
}
.cg-door-name .cg-ic { color: var(--cg-mode-ink); }
.cg-door-desc { font-size: 0.98rem; line-height: 1.45; color: var(--cg-text-dim); }
.cg-door-desc b {
  display: block; margin-top: 0.25rem;
  font-size: 0.9rem; font-weight: 600; color: var(--cg-text);
  font-variant-numeric: tabular-nums;
}
.cg-door-go {
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--cg-surface-2); color: var(--cg-text);
  transition: background var(--cg-anim-fast), color var(--cg-anim-fast), transform var(--cg-anim-fast) cubic-bezier(0.16, 1, 0.3, 1);
}
.cg-door:hover .cg-door-go { background: var(--cg-mode); color: #fff; transform: translateX(4px); }
[dir="rtl"] .cg-door:hover .cg-door-go { transform: translateX(-4px); }

/* ----- Returning players: back to what they were doing ----- */
.cg-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 1.5rem; }
.cg-jump.hidden { display: none; }
.cg-jump-label { margin-inline-end: 0.25rem; font-size: 0.92rem; font-weight: 600; color: var(--cg-text-dim); }
.cg-jump-chip {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 2.75rem; padding: 0.35rem 1rem 0.35rem 0.75rem;
  border: 1px solid var(--cg-line); border-radius: 999px;
  background: var(--cg-surface); color: var(--cg-text);
  font-size: 0.92rem; text-align: start; cursor: pointer;
  transition: border-color var(--cg-anim-fast), background var(--cg-anim-fast);
}
.cg-jump-chip .cg-ic { color: var(--cg-mode-ink); }
.cg-jump-chip b { font-weight: 700; }
.cg-jump-chip small { font-size: 0.82rem; color: var(--cg-text-dim); font-variant-numeric: tabular-nums; }
.cg-jump-chip:hover { border-color: var(--cg-mode); background: var(--cg-surface-2); }
.cg-jump-chip:focus-visible { outline: 3px solid var(--cg-mode-ink); outline-offset: 2px; }

/* ===== Learn / Play screens =====
   The band is the door's colour carried through: it says which of the two
   you are in before a word is read. */
.cg-screen-head { display: none; background: var(--cg-mode); color: #fff; }
body[data-screen="learn"]:not(.cg-playing) .cg-screen-head,
body[data-screen="play"]:not(.cg-playing) .cg-screen-head,
body[data-screen="names"]:not(.cg-playing) .cg-screen-head,
body[data-screen="flags"]:not(.cg-playing) .cg-screen-head,
body[data-screen="capitals"]:not(.cg-playing) .cg-screen-head,
body[data-screen="shapes"]:not(.cg-playing) .cg-screen-head,
body[data-screen="locate"]:not(.cg-playing) .cg-screen-head,
body[data-screen="journey"]:not(.cg-playing) .cg-screen-head,
body[data-screen="passport"]:not(.cg-playing) .cg-screen-head { display: block; }
/* Slim: the screen's name and one line on what it is for. Moving between
   screens is the Home / Learn / Play icons in the bar above. */
.cg-screen-head-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0.85rem 2rem;
}
.cg-screen-heading { display: flex; align-items: center; gap: 0.85rem; }
.cg-screen-ic { flex: none; display: grid; place-items: center; }
.cg-screen-text { flex: 1 1 auto; min-width: 0; }
.cg-screen-title {
  margin: 0;
  font-size: 1.4rem; font-weight: 850; letter-spacing: -0.02em; line-height: 1.15;
  width: fit-content; max-width: 100%;
  text-wrap: balance;
}
.cg-screen-sub {
  margin: 0.15rem 0 0;
  max-width: 60em;
  font-size: 0.92rem; line-height: 1.4;
  color: color-mix(in srgb, #fff 92%, var(--cg-mode));
}

/* Arriving on a screen: its choices settle into place, once */
.cg-enter .cg-screen-heading,
#home-screen.cg-enter { animation: cg-enter 0.28s cubic-bezier(0.16, 1, 0.3, 1) both; }
@keyframes cg-enter { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  .cg-enter .cg-screen-heading, #home-screen.cg-enter { animation: none; }
  .cg-door, .cg-door-go, .cg-game-card { transition: none; }
}
.cg-reduced-motion .cg-enter .cg-screen-heading,
.cg-reduced-motion #home-screen.cg-enter { animation: none; }

/* ----- Breadcrumb: where you are, and one step back ----- */
.cg-crumbs {
  display: flex; align-items: center; gap: 0.35rem;
  min-width: 0;
  font-size: 0.92rem; font-weight: 600;
}
.cg-crumb-back {
  flex: none;
  width: 2.75rem; height: 2.75rem; margin-inline-start: -0.7rem;
  display: grid; place-items: center;
  border-radius: 999px;
  color: inherit;
  transition: background var(--cg-anim-fast);
}
.cg-crumb-back:hover { background: rgb(255 255 255 / 0.18); }
.cg-crumb-back:focus-visible,
.cg-crumb-list a:focus-visible { outline: 3px solid currentColor; outline-offset: -3px; border-radius: 999px; }
.cg-crumb-list {
  display: flex; align-items: center;
  min-width: 0; margin: 0; padding: 0;
  list-style: none;
}
.cg-crumb-list li { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.cg-crumb-list li + li::before {     /* the › between steps, drawn so it mirrors in RTL */
  content: '';
  flex: none;
  width: 0.42rem; height: 0.42rem; margin: 0 0.7rem 0 0.5rem;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
[dir="rtl"] .cg-crumb-list li + li::before {
  margin: 0 0.5rem 0 0.7rem;
  border-right: 0; border-left: 2px solid currentColor;
  transform: rotate(-45deg);
}
.cg-crumb-list a {
  display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: 0 0.15rem;
  color: color-mix(in srgb, #fff 92%, var(--cg-mode));
  text-decoration: none;
}
.cg-crumb-list a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.25em; }
.cg-crumb-list [aria-current] { overflow: hidden; text-overflow: ellipsis; font-weight: 700; }

/* ----- "How to play" button (screen band, and the bar above a round) ----- */
.cg-howto-btn {
  flex: none;
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 2.75rem; padding: 0 1rem;
  border: 1px solid color-mix(in srgb, currentColor 50%, transparent); border-radius: 999px;
  background: transparent; color: inherit;
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
  transition: background var(--cg-anim-fast);
}
.cg-howto-btn.hidden { display: none; }
.cg-howto-btn:hover { background: rgb(255 255 255 / 0.18); }
.cg-howto-btn:focus-visible { outline: 3px solid currentColor; outline-offset: 2px; }

/* ===== The choices on a screen ===== */
/* Off the home screen the main area sits on the page, not in a card. */
body:not(.cg-playing) #game-container.cg-main {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding-top: 1.75rem;
  text-align: left;
}
[dir="rtl"] body:not(.cg-playing) #game-container.cg-main { text-align: right; }
body[data-screen="home"]:not(.cg-playing) #game-container.cg-main { padding-top: 0; padding-bottom: 0; margin-top: 0; }
body[data-screen="home"] #home-screen { display: none; }
.cg-home-h2 { margin: 0; font-size: 1.3rem; font-weight: 750; letter-spacing: -0.01em; color: var(--cg-text); }
#home-screen .cg-tiles { max-width: none; margin: 0; justify-content: flex-start; }
#home-screen .cg-tiles.hidden { display: none; }
.cg-link-btn {
  border: 0; background: none; padding: 0.25rem 0;
  color: var(--cg-text-dim); font-weight: 600; font-size: 0.9rem; cursor: pointer;
}
.cg-link-btn:hover { color: var(--cg-accent); }
.cg-link-btn:focus-visible { outline: 3px solid var(--cg-accent-2); outline-offset: 2px; border-radius: 4px; }

/* ----- Play: one card per game, all the same size -----
   Built like the region tiles: a sample of the game on top, then its
   name, what you do, and how big a round is. */
/* As many columns as fit, each card at least 15rem: three in a half-width
   window, four or more on a wide one. (Phones get a list, below.) */
.cg-game-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: 1rem; }
.cg-game-cards.hidden { display: none; }
.cg-game-card {
  position: relative;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--cg-line); border-radius: 1rem;
  background: var(--cg-surface);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  transition: transform var(--cg-anim-fast), border-color var(--cg-anim-fast), box-shadow var(--cg-anim-fast);
}
.cg-game-card:hover { transform: translateY(-3px); border-color: var(--cg-mode); box-shadow: var(--cg-card-shadow); }
.cg-game-main {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column;
  padding: 0; border: 0; border-radius: inherit;
  background: none; color: var(--cg-text);
  font: inherit; text-align: start; cursor: pointer;
}
.cg-game-main:disabled { cursor: wait; opacity: 0.6; }
.cg-game-main:focus-visible { outline: 3px solid var(--cg-mode-ink); outline-offset: -3px; }
.cg-game-art {
  display: grid; place-items: center;
  width: 100%; height: 6.5rem; padding: 0.6rem;
  background: color-mix(in srgb, var(--cg-mode) 8%, var(--cg-surface));
  color: var(--cg-text);
}
.cg-game-art svg { display: block; width: 100%; height: 100%; }
.cg-game-body { display: flex; flex-direction: column; gap: 0.2rem; padding: 0.8rem 1rem 0.95rem; }
.cg-game-name { font-weight: 700; font-size: calc(1.05rem * var(--cg-font-scale)); line-height: 1.25; }
.cg-game-desc { font-size: 0.88rem; line-height: 1.4; color: var(--cg-text-dim); }
.cg-game-meta {
  margin-top: 0.4rem;
  font-size: 0.8rem; font-weight: 600; line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
.cg-game-meta:empty { display: none; }
/* The "?" on each card: that game's instructions */
.cg-game-help {
  position: absolute; top: 0.45rem; inset-inline-end: 0.45rem;
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: var(--cg-surface); color: var(--cg-mode-ink);
  box-shadow: 0 2px 6px -1px rgb(0 0 0 / 0.2);
  cursor: pointer;
  transition: background var(--cg-anim-fast), color var(--cg-anim-fast);
}
.cg-game-help:hover { background: var(--cg-mode); color: #fff; }
.cg-game-help:focus-visible { outline: 3px solid var(--cg-mode-ink); outline-offset: 2px; }

/* Samples: a piece of each game, from the real data */
.cg-art-flag { font-size: 3.75rem; line-height: 1; filter: drop-shadow(0 2px 4px rgb(0 0 0 / 0.2)); }
.cg-art-flagsheet { display: grid; place-items: center; }
.cg-art-flags { display: flex; gap: 0.6rem; font-size: 2.4rem; line-height: 1; }
/* Capitals: a country, and its capital under the mapmaker's mark for one
   (a star in a ring) */
.cg-art-capital { display: flex; align-items: center; gap: 0.9rem; min-width: 0; }
.cg-art-capital-flag { flex: none; font-size: 3.4rem; line-height: 1; }
.cg-art-capital-text { display: grid; justify-items: start; gap: 0.3rem; min-width: 0; }
.cg-art-capital-text b { font-size: 1.05rem; font-weight: 700; line-height: 1.15; }
.cg-art-capital-city {
  display: inline-flex; align-items: center; gap: 0.35rem;
  min-height: 1.9rem; padding: 0 0.7rem 0 0.45rem;
  border-radius: 999px;
  background: var(--cg-mode); color: #fff;
  font-size: 0.95rem; font-weight: 700; white-space: nowrap;
}
.cg-art-capital-city svg { width: 18px; height: 18px; }
/* A card's picture on a sheet of sea (the maps, and the
   flag too) that fills the picture area */
.cg-art-plate {
  position: relative;
  place-self: stretch; min-height: 4.75rem;
  overflow: hidden; border-radius: 0.6rem;
}
.cg-game-art .cg-art-plate svg { position: absolute; inset: 0.4rem; width: calc(100% - 0.8rem); height: calc(100% - 0.8rem); }
.cg-game-art:has(.cg-art-plate) { padding: 0.45rem; }
/* Locate: a small political map in soft colours, the country to find in
   its region's colour under a red pin. It fills its plate edge to edge. */
.cg-game-art .cg-art-locate svg { inset: 0; width: 100%; height: 100%; }
.cg-loc-art { --lp-line: #fff; }
.cg-loc-art path { stroke: var(--lp-line); }
.cg-lp0 { fill: #fde68a; } .cg-lp1 { fill: #bbf7d0; } .cg-lp2 { fill: #bfdbfe; }
.cg-lp3 { fill: #fecdd3; } .cg-lp4 { fill: #ddd6fe; } .cg-lp5 { fill: #fed7aa; }
.cg-lp-pin path { fill: #dc2626; stroke: #fff; }
.cg-lp-pin circle { fill: #fff; }
.cg-lp-pin { filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / 0.35)); }
/* Dark: the same colours as soft tints over the dark sea */
[data-theme="dark"] .cg-loc-art { --lp-line: rgb(15 23 42 / 0.9); }
[data-theme="dark"] .cg-loc-art [class^="cg-lp"]:not(.cg-lp-hit):not(.cg-lp-pin) { fill-opacity: 0.6; }
/* Shapes: the outline alone (no neighbours), in colour */
.cg-art-shape { color: var(--cg-shape); }
.cg-art-shape svg path:first-child { display: none; }
.cg-art-date {
  display: grid; justify-items: center;
  width: 4.4rem; overflow: hidden;
  border-radius: 0.65rem;
  background: var(--cg-surface);
  box-shadow: 0 3px 8px -3px rgb(0 0 0 / 0.3);
}
.cg-art-date small {
  width: 100%; padding: 0.2rem 0;
  background: var(--cg-mode); color: #fff;
  font-size: 0.75rem; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: 0.05em;
}
.cg-art-date b { font-size: 1.75rem; font-weight: 800; line-height: 1.55; font-variant-numeric: tabular-nums; }
/* Journey: levels along a path, the ones passed filled in */
.cg-art-path { position: relative; display: flex; align-items: center; gap: 0.9rem; }
.cg-art-path::before {
  content: '';
  position: absolute; inset-inline: 0.4rem; top: 50%;
  height: 2px; margin-top: -1px;
  background: color-mix(in srgb, var(--cg-mode) 35%, var(--cg-surface));
}
.cg-art-path i {
  position: relative;
  width: 1rem; height: 1rem; border-radius: 999px;
  border: 2px solid color-mix(in srgb, var(--cg-mode) 45%, var(--cg-surface));
  background: var(--cg-surface);
}
.cg-art-path i.is-done { border-color: var(--cg-mode); background: var(--cg-mode); }
.cg-art-path i.is-next { width: 1.3rem; height: 1.3rem; border-width: 3px; border-color: var(--cg-mode); }

/* ----- Under the tiles: the same activity in other forms ----- */
.cg-extras { margin-top: 2.25rem; }
.cg-extras:empty { display: none; }
.cg-extras .cg-home-h2 { margin-bottom: 0.8rem; }
.cg-extras .cg-menu-grid { grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); max-width: 62rem; }
.cg-extras .cg-menu-item { min-height: 3.75rem; border-color: var(--cg-line); background: var(--cg-surface); }
.cg-extras .cg-menu-item:hover { border-color: var(--cg-mode); }

/* ===== Levels (#/play/flags, …/capitals, …/shapes) =====
   Where you stand and the one next step, then the levels tier by tier,
   then every country at once. A level is a tile: its best-known flag, its
   number and its stars; a lock until the one before is passed; "Play" on
   the one that's next. */
.cg-levels.hidden { display: none; }
.cg-levels-head { display: grid; justify-items: start; gap: 0.35rem; max-width: 44rem; }
.cg-levels-count {
  margin: 0;
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.cg-levels-count b { font-weight: 850; color: var(--cg-mode-ink); }
.cg-levels-stars {
  display: flex; align-items: center; gap: 0.4rem;
  margin: 0;
  font-size: 0.95rem; font-weight: 600; color: var(--cg-text-dim);
  font-variant-numeric: tabular-nums;
}
.cg-levels-bar {
  justify-self: stretch;
  height: 0.5rem; margin-top: 0.55rem;
  overflow: hidden; border-radius: 999px;
  background: color-mix(in srgb, var(--cg-text) 10%, transparent);
}
.cg-levels-bar-fill {
  height: 100%; border-radius: 999px;
  background: var(--cg-mode);
  transform: scaleX(var(--fill, 0)); transform-origin: left center;
}
[dir="rtl"] .cg-levels-bar-fill { transform-origin: right center; }
.cg-levels-actions { display: flex; flex-wrap: wrap; gap: 0 0.6rem; }
.cg-levels-head .cg-btn { margin-top: 0.9rem; min-height: 2.75rem; padding: 0 1.25rem; border-radius: 999px; }
.cg-levels-head .cg-btn-primary { background: var(--cg-mode); color: #fff; }
.cg-levels-head .cg-btn-ghost { border-color: var(--cg-line); background: var(--cg-surface); }

/* Missed countries waiting to come back into the next level */
.cg-levels-review { margin: 0.6rem 0 0; font-size: 0.92rem; color: var(--cg-text-dim); font-variant-numeric: tabular-nums; }

.cg-level-tier { margin-top: 2.25rem; }
.cg-level-tier > .cg-home-h2 { margin-bottom: 0.8rem; }
.cg-level-tier-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.9rem; margin-bottom: 0.8rem; }
.cg-level-tier-head p { margin: 0; font-size: 0.92rem; line-height: 1.45; color: var(--cg-text-dim); }
.cg-level-grid {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.75rem;
  margin: 0; padding: 0; list-style: none;
}
.cg-level {
  width: 100%; min-height: 7.25rem;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem;
  padding: 0.8rem 0.4rem 0.7rem;
  border: 1px solid var(--cg-line); border-radius: 1rem;
  background: var(--cg-surface); color: var(--cg-text);
  font: inherit; cursor: pointer;
  transition: border-color var(--cg-anim-fast), background var(--cg-anim-fast);
}
.cg-level:hover:not(:disabled):not(.is-locked) { border-color: var(--cg-mode); background: var(--cg-surface-2); }
.cg-level:focus-visible { outline: 3px solid var(--cg-mode-ink); outline-offset: 2px; }
.cg-level:disabled { cursor: wait; opacity: 0.6; }
.cg-level-flag { font-size: 2.1rem; line-height: 1; }
/* Shapes: the country's outline alone, no neighbours */
.cg-level-shape { display: block; width: 3rem; height: 2.1rem; color: var(--cg-shape); }
.cg-level-shape svg { display: block; width: 100%; height: 100%; }
.cg-level-shape svg path:first-child { display: none; }
.cg-level-num { font-size: 1.05rem; font-weight: 750; line-height: 1.2; font-variant-numeric: tabular-nums; }
.cg-level-foot {
  display: flex; align-items: center; justify-content: center; gap: 0.1rem;
  min-height: 1.25rem;
  font-size: 0.82rem; font-weight: 700;
}
/* Journey: a level has a name as well as a number, so its tiles are wider */
.cg-level-grid.is-named { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.cg-level-name { font-size: 0.85rem; font-weight: 600; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.cg-journey-level { text-align: start; }
.cg-journey-level p { margin: 0; }
.cg-journey-level-n { font-size: 0.92rem; font-weight: 600; color: var(--cg-text-dim); }
.cg-journey-level-name { margin: 0.1rem 0 0.2rem; font-size: 1.4rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; }
.cg-journey-level-facts { color: var(--cg-text-dim); font-variant-numeric: tabular-nums; }
.cg-journey-level-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }
.cg-journey-level-actions .cg-btn { flex: 1 1 9rem; min-height: 2.75rem; border-radius: 999px; }
.cg-journey-level-actions .cg-btn-primary { background: var(--cg-mode); color: #fff; }

/* The next level: the way in, in the mode's colour */
.cg-level.is-next { border: 2px solid var(--cg-mode); padding: calc(0.8rem - 1px) calc(0.4rem - 1px) calc(0.7rem - 1px); }
.cg-level.is-next .cg-level-foot { gap: 0.3rem; color: var(--cg-mode-ink); }
/* Not open yet: faint, like a passport stamp still to earn */
.cg-level.is-locked {
  border-style: dashed; border-color: color-mix(in srgb, var(--cg-text-dim) 45%, transparent);
  background: transparent; color: var(--cg-text-dim);
  cursor: default;
}
.cg-level.is-locked .cg-level-flag { filter: grayscale(1); opacity: 0.4; }
.cg-level.is-locked .cg-level-shape { color: var(--cg-text-dim); opacity: 0.4; }

/* Stars: the same drawing, filled in once earned */
.cg-star { display: inline-grid; color: color-mix(in srgb, var(--cg-text-dim) 55%, transparent); }
.cg-star.is-on { color: var(--cg-star); }
.cg-star.is-on path { fill: currentColor; }

/* Every country at once, after the last level */
.cg-level-all {
  display: flex; align-items: center; gap: 0.9rem;
  width: 100%; max-width: 44rem; min-height: 4.5rem;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--cg-line); border-radius: 1rem;
  background: var(--cg-surface); color: var(--cg-text);
  font: inherit; text-align: start; cursor: pointer;
  transition: border-color var(--cg-anim-fast), background var(--cg-anim-fast);
}
.cg-level-all:hover:not(:disabled):not(.is-locked) { border-color: var(--cg-mode); background: var(--cg-surface-2); }
.cg-level-all:focus-visible { outline: 3px solid var(--cg-mode-ink); outline-offset: 2px; }
.cg-level-all:disabled { cursor: wait; opacity: 0.6; }
.cg-level-all-ic {
  flex: none;
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--cg-mode); color: #fff;
}
.cg-level-all-text { display: grid; gap: 0.15rem; min-width: 0; }
.cg-level-all-text b { font-size: 1.05rem; font-weight: 700; line-height: 1.25; }
.cg-level-all-text small { font-size: 0.88rem; line-height: 1.35; color: var(--cg-text-dim); font-variant-numeric: tabular-nums; }
.cg-level-all.is-locked {
  border-style: dashed; border-color: color-mix(in srgb, var(--cg-text-dim) 45%, transparent);
  background: transparent; cursor: default;
}
.cg-level-all.is-locked .cg-level-all-ic { background: var(--cg-surface-2); color: var(--cg-text-dim); }
@media (prefers-reduced-motion: reduce) { .cg-level, .cg-level-all { transition: none; } }

/* ===== Passport =====
   How far along and the one next step, then a page of stamps per region.
   A stamp is inked once its country is known; until then it waits, faint. */
.cg-passport.hidden { display: none; }
.cg-pass-head { max-width: 44rem; }
.cg-pass-count { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.015em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.cg-pass-count b { font-weight: 850; color: var(--cg-learn-ink); }
.cg-pass-bar { height: 0.5rem; margin-top: 0.9rem; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--cg-text) 10%, transparent); }
.cg-pass-bar-fill { height: 100%; min-width: 0.5rem; border-radius: 999px; background: var(--cg-map-guessed); }
.cg-pass-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.25rem; }
.cg-pass-actions .cg-btn { min-height: 2.75rem; padding: 0 1.15rem; border-radius: 999px; }
.cg-pass-actions .cg-btn-ghost { border-color: var(--cg-line); background: var(--cg-surface); }
.cg-pass-region { margin-top: 2.5rem; }
.cg-pass-region-name {
  display: flex; align-items: baseline; gap: 0.75rem;
  margin: 0 0 0.8rem;
  font-size: 1.3rem; font-weight: 750; letter-spacing: -0.01em;
}
.cg-pass-region-name span { font-size: 0.92rem; font-weight: 600; color: var(--cg-text-dim); font-variant-numeric: tabular-nums; }
.cg-stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.6rem; }
.cg-stamp {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
  min-height: 5.75rem; padding: 0.8rem 0.4rem 0.65rem;
  border: 1px dashed color-mix(in srgb, var(--cg-text-dim) 45%, transparent); border-radius: 0.8rem;
  background: transparent; color: var(--cg-text-dim);
  font: inherit; cursor: pointer;
  transition: border-color var(--cg-anim-fast), background var(--cg-anim-fast);
}
.cg-stamp:hover { border-color: var(--cg-learn-ink); background: var(--cg-surface); }
.cg-stamp:focus-visible { outline: 3px solid var(--cg-learn-ink); outline-offset: 2px; }
.cg-stamp-flag { font-size: 2rem; line-height: 1; filter: grayscale(1); opacity: 0.4; }
.cg-stamp-name { font-size: 0.8rem; font-weight: 600; line-height: 1.25; text-align: center; overflow-wrap: anywhere; }
.cg-stamp.is-known { border: 1px solid var(--cg-line); background: var(--cg-surface); color: var(--cg-text); }
.cg-stamp.is-known .cg-stamp-flag { filter: none; opacity: 1; }
.cg-stamp-tick {
  position: absolute; top: 0.35rem; inset-inline-end: 0.35rem;
  width: 1.25rem; height: 1.25rem;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--cg-map-guessed); color: #fff;
}
.cg-stamp-card { display: grid; gap: 1rem; }
.cg-stamp-card .cg-btn { justify-self: start; border-radius: 999px; }
@media (max-width: 720px) {
  .cg-pass-count { font-size: 1.25rem; }
  .cg-pass-region { margin-top: 1.75rem; }
  .cg-stamps { grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr)); gap: 0.45rem; }
  .cg-stamp { min-height: 5.25rem; }
  .cg-stamp-flag { font-size: 1.7rem; }
}
@media (prefers-reduced-motion: reduce) { .cg-stamp { transition: none; } }

/* ===== In a round or a study session: where this is, and the way back ===== */
.cg-context {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  min-height: 2.75rem; margin: -0.5rem 0 0.75rem;
  color: var(--cg-mode-ink);
  text-align: start;
}
.cg-context:empty { display: none; }
.cg-context .cg-crumb-list a { color: inherit; }
.cg-context .cg-crumb-list a:hover { color: inherit; }
.cg-context .cg-crumb-list [aria-current] { color: var(--cg-text); }
.cg-context .cg-crumb-back:hover,
.cg-context .cg-howto-btn:hover { background: color-mix(in srgb, var(--cg-mode) 12%, transparent); }

/* ===== Narrow =====
   No room beside the words: the globe rises behind the menu instead, its
   top third showing above the first row. */
@media (max-width: 900px) {
  .cg-hero-inner { min-height: 0; display: block; padding-bottom: 2.5rem; }
  .cg-hero-copy, .cg-doors, .cg-jump { max-width: none; }
  .cg-globe-stage { position: relative; inset: auto; height: 10.5rem; margin: 1.5rem -2rem 0; overflow: hidden; }
  .cg-globe {
    --cg-globe-lat: 2;
    top: 0; inset-inline-start: 50%; width: min(26rem, 104vw);
    transform: translateX(-50%);
  }
  [dir="rtl"] .cg-globe { transform: translateX(50%); }
  .cg-doors { margin-top: 0; }
}
@media (max-width: 1024px) {
  .cg-navlinks { display: none; }
  .cg-brand { white-space: normal; font-size: 0.95rem; }
  .cg-brand-text span { display: block; }       /* the name on two lines beside the icons */
}

/* ===== Phone ===== */
@media (max-width: 720px) {
  .cg-nav-inner { padding: 0 1rem; height: 56px; gap: 0.5rem; }
  .cg-brand { min-width: 0; flex: 1 1 auto; font-size: 0.86rem; gap: 0.55rem; white-space: normal; }
  .cg-brand-text span { display: block; }       /* the name on two lines, whole */
  .cg-logo { width: 32px; height: 32px; }
  .cg-nav-right { gap: 0.35rem; }
  .cg-nav-streak, .cg-auth-name { display: none; }
  .cg-nav .cg-theme-toggle,
  .cg-nav #auth-slot .cg-btn { height: 2.75rem; min-width: 2.75rem; padding: 0; }

  /* Home: title, globe and both doors in the first screenful */
  .cg-hero-inner { padding: 1.75rem 1rem 2rem; }
  .cg-hero-sub { display: none; }               /* the doors say it */
  .cg-globe-stage { height: 9rem; margin: 1.25rem -1rem 0; }
  .cg-globe { width: 23rem; }
  .cg-known { font-size: 0.92rem; }
  .cg-door { grid-template-columns: minmax(0, 1fr) auto; gap: 0.2rem 1rem; padding: 0.95rem 0.25rem; }
  .cg-door-name { font-size: 1.4rem; }
  .cg-door-name .cg-ic { width: 22px; height: 22px; }
  .cg-door-desc { grid-column: 1; font-size: 0.92rem; }
  .cg-door-go { grid-column: 2; grid-row: 1 / span 2; }
  .cg-jump { margin-top: 1.1rem; }

  .cg-screen-head-inner { padding: 0.5rem 1rem 0.55rem; }
  .cg-screen-heading { gap: 0.5rem; }
  .cg-screen-ic { display: none; }
  .cg-screen-title { font-size: 1.15rem; }
  .cg-screen-sub { margin-top: 0.1rem; font-size: 0.8rem; line-height: 1.35; }
  /* How to play: the icon alone beside the title (its words stay for screen readers) */
  .cg-screen-heading .cg-howto-btn { flex: none; align-self: flex-start; width: 2.5rem; min-height: 2.5rem; padding: 0; justify-content: center; }
  .cg-screen-heading .cg-howto-btn span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
  /* The bar: logo, the three icons, then the rest. The name goes to make room
     (the logo still goes Home). */
  .cg-brand { flex: 0 0 auto; }
  .cg-brand-text { display: none; }
  .cg-modenav { margin-inline-start: 0; }
  .cg-navicon { width: 2.5rem; height: 2.15rem; }
  body:not(.cg-playing) #game-container.cg-main { margin-top: 0; padding-top: 1.1rem; }
  .cg-home-h2 { font-size: 1.12rem; }

  /* Games become a list: sample on the side, every game on screen */
  .cg-game-cards { grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
  .cg-game-main { flex-direction: row; }
  .cg-game-art { flex: none; width: 6.25rem; height: auto; min-height: 5.75rem; }
  .cg-game-body { flex: 1 1 auto; min-width: 0; padding: 0.75rem 3.4rem 0.8rem 0.9rem; }
  [dir="rtl"] .cg-game-body { padding: 0.75rem 0.9rem 0.8rem 3.4rem; }
  .cg-game-help { top: 50%; margin-top: -1.375rem; box-shadow: none; background: transparent; }
  .cg-art-flag { font-size: 3rem; }
  .cg-art-flags { gap: 0.3rem; font-size: 1.6rem; }
  /* the side column is narrow: flag over capital, the name left to the card */
  .cg-art-capital { flex-direction: column; gap: 0.35rem; }
  .cg-art-capital-flag { font-size: 2.4rem; }
  .cg-art-capital-text b { display: none; }
  .cg-art-capital-city { min-height: 1.6rem; padding: 0 0.5rem 0 0.35rem; font-size: 0.8rem; }
  .cg-art-capital-city svg { width: 15px; height: 15px; }
  .cg-art-date { width: 3.75rem; }
  .cg-art-path { gap: 0.4rem; }
  .cg-art-path i { width: 0.75rem; height: 0.75rem; }

  /* Levels: four to a row */
  .cg-levels-count { font-size: 1.25rem; }
  .cg-level-tier { margin-top: 1.75rem; }
  .cg-level-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; }
  .cg-level { min-height: 6.5rem; padding: 0.65rem 0.25rem 0.6rem; }
  .cg-level.is-next { padding: calc(0.65rem - 1px) calc(0.25rem - 1px) calc(0.6rem - 1px); }
  .cg-level-flag { font-size: 1.85rem; }

  .cg-context { margin-top: 0; }
}
@media (max-width: 560px) {
  /* Room for the last two steps of the trail; the back arrow covers the rest */
  .cg-crumb-list li:nth-last-child(n+3) { display: none; }
  .cg-crumb-list li:nth-last-child(2)::before { display: none; }
  .cg-context .cg-howto-btn { width: 2.75rem; padding: 0; justify-content: center; }
  .cg-context .cg-howto-btn span {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
  }
}
@media (max-width: 440px) {
  .cg-nav-inner { gap: 0.4rem; }
  .cg-nav-right { gap: 0.25rem; }
  .cg-nav .cg-theme-toggle,
  .cg-nav #auth-slot .cg-btn { height: 2.5rem; min-width: 2.5rem; }
}
@media (max-width: 370px) {
  .cg-navicon { width: 2.2rem; }
  .cg-nav .cg-theme-toggle,
  .cg-nav #auth-slot .cg-btn { height: 2.3rem; min-width: 2.3rem; }
}
@media (max-width: 350px) {
  /* The smallest phones: the Home icon stands in for the logo */
  .cg-brand { display: none; }
}

/* The credits keep clear of the screen edge on a phone */
body > footer { padding-inline: 1rem; }

/* ===== Learn: which topics the quick checks ask about ===== */
.cg-topics { margin: 0 0 1.4rem; }
.cg-topics.hidden { display: none; }
.cg-topics-head { margin-bottom: 0.7rem; }
.cg-topics-hint { margin: 0.2rem 0 0; color: var(--cg-text-dim); font-size: 0.92rem; }
.cg-topics-row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.cg-topic {
  --tp: var(--cg-mode, var(--cg-accent));
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 2.75rem; padding: 0.45rem 0.9rem 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1.5px solid var(--cg-surface-2);
  background: var(--cg-surface); color: var(--cg-text-dim);
  font-weight: 650; font-size: 0.98rem; cursor: pointer;
  transition: background var(--cg-anim-fast), border-color var(--cg-anim-fast), color var(--cg-anim-fast);
}
.cg-topic:hover { border-color: var(--tp); color: var(--cg-text); }
.cg-topic:focus-visible { outline: 3px solid var(--cg-accent-2); outline-offset: 2px; }
.cg-topic.is-on {
  color: var(--cg-text);
  border-color: var(--tp);
  background: color-mix(in srgb, var(--tp) 14%, var(--cg-surface));
}
.cg-topic-ic { font-size: 1.15rem; line-height: 1; }
.cg-topic-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.25rem; height: 1.25rem; border-radius: 50%;
  border: 1.5px solid var(--cg-surface-2);
}
.cg-topic.is-on .cg-topic-tick { background: var(--tp); border-color: var(--tp); color: #fff; }
