/* ============================================================
   RIDGEWAY — Car Node
   Aesthetic: polished mirror chrome on deep dark, fully centered,
   big & blocky, early-2000s. Neon felt, never spelled out.
   ============================================================ */

/* ---------- Theme tokens ---------- */
:root {
  --bg:        #050608;
  --bg-2:      #0b0d12;
  --panel:     #0f1117;
  --line:      #20242e;
  --ink:       #dfe5ee;
  --ink-dim:   #828b9c;

  /* polished mirror-chrome — strong reflective banding, deep silver (not black) dips */
  --chrome: linear-gradient(180deg,
      #aab2bd 0%,
      #eef2f7 10%,
      #ffffff 22%,
      #c8cfd9 33%,
      #7c8490 44%,   /* deep silver dip — reflection contrast, not a black line */
      #ffffff 54%,
      #d2d8e0 64%,
      #858d99 74%,   /* second silver dip */
      #ffffff 86%,
      #aeb6c1 100%);

  /* polished silver fill for solid panels (thumbnails, chips) — mirror-bright */
  --silver: linear-gradient(160deg,
      #ffffff 0%,
      #d3dae3 18%,
      #9aa2ad 34%,
      #6d747f 50%,   /* deep silver, gives mirror depth */
      #aeb6c1 64%,
      #e8edf3 82%,
      #ffffff 100%);

  --faint-cyan: rgba(120, 200, 220, .10);
  --faint-mag:  rgba(220, 130, 180, .08);

  /* ---- Brand display font ----
     Swap this one value to restyle the RIDGEWAY wordmark. Loaded options:
       "Titan One"   — chunky & bubbly (current)
       "Modak"       — extra-rounded, maximum bubble
       "Bungee"      — boxy arcade signage
       "Bowlby One SC" — fat rounded, retro-bold
       "Lilita One"  — softer rounded bubble                                  */
  --brand-font: "Modak", "Arial Black", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Trebuchet MS", "Segoe UI", Tahoma, sans-serif;
  color: var(--ink);
  text-align: center;
  background:
    radial-gradient(1100px 520px at 50% -8%, var(--faint-mag), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, var(--faint-cyan), transparent 55%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
}

/* faint reflective floor grid, centered & fading */
body::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(180,200,220,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(180,200,220,.035) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 60%, #000 30%, transparent 75%);
}

a { color: #cfd6df; text-decoration: none; }

/* generous container that actually uses big / ultrawide displays,
   but still caps so it never sprawls uncomfortably wide */
.wrap { position: relative; z-index: 1; width: 100%; max-width: 1760px; margin: 0 auto; padding: 0 40px; }

/* ============================================================
   Reusable chrome text utility
   ============================================================ */
.chrome-text {
  background: var(--chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  /* bevel + lift: dark top edge, bright bottom edge, soft drop */
  filter:
    drop-shadow(0 1px 0 rgba(255,255,255,.35))
    drop-shadow(0 -1px 0 rgba(0,0,0,.5))
    drop-shadow(0 6px 14px rgba(0,0,0,.55));
}

/* heavier extruded chrome just for the big wordmark */
.brand.chrome-text {
  filter:
    drop-shadow(0 1px 0 rgba(255,255,255,.55))
    drop-shadow(0 2px 0 rgba(0,0,0,.45))
    drop-shadow(0 3px 0 rgba(0,0,0,.35))
    drop-shadow(0 4px 0 rgba(0,0,0,.28))
    drop-shadow(0 12px 18px rgba(0,0,0,.6));
}

/* ---------- Header ---------- */
.site-header {
  position: relative; z-index: 2;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15,17,23,.94), rgba(5,6,8,.94));
  box-shadow: 0 1px 0 rgba(200,215,230,.12);
  backdrop-filter: blur(6px);
  padding: 22px 0 24px;
}
.brand {
  font-family: var(--brand-font);
  font-size: clamp(50px, 11vw, 104px);
  font-weight: 400;            /* these display faces ship at one weight */
  letter-spacing: clamp(0px, .2vw, 2px);   /* puffy letters sit close, Heaven-style */
  text-transform: uppercase;
  line-height: 1;
  display: inline-block;
}
.brand-sub {
  margin-top: 10px;
  font-size: 11px; letter-spacing: 5px; text-transform: uppercase;
  color: var(--ink-dim);
}

/* header nav */
.site-nav { margin-top: 10px; display: flex; gap: 22px; justify-content: center; }
.site-nav a { font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ink-dim); }
.site-nav a:hover, .site-nav a.current { color: #e6ebf2; text-shadow: 0 0 8px rgba(150,210,230,.5); }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 1; padding: 40px 0 8px; }
.hero h1 {
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(20px, 3.5vw, 30px);
  letter-spacing: clamp(3px, 1vw, 8px);
  text-transform: uppercase;
  display: inline-block;
}
.hero p { color: var(--ink-dim); margin-top: 10px; font-size: 14px; letter-spacing: 1px; }

/* chrome divider */
.chrome-rule {
  height: 3px; max-width: 1180px; margin: 26px auto 0;
  background: var(--chrome);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.6);
}

/* ============================================================
   HOME — world map (Gran Turismo style)
   ============================================================ */
.map-title {
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(22px, 4vw, 36px); letter-spacing: clamp(3px, 1vw, 9px);
  text-transform: uppercase; display: inline-block; margin-top: 30px;
}
.map-hint { color: var(--ink-dim); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; margin: 8px 0 22px; }

#world-wrap {
  position: relative;
  width: 100%;
  max-width: 1500px;
  margin: 28px auto 50px;
  aspect-ratio: 2754 / 1398;
  border-radius: 14px;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(120,200,220,.06), transparent 60%),
    linear-gradient(180deg, #0a0d13, #060709);
  border: 1px solid #2a2f3a;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 16px 40px rgba(0,0,0,.6);
}
#world-map { position: absolute; inset: 0; }
#world-map svg { width: 100%; height: 100%; display: block; }
/* recolour the map: dark land, faint borders */
#world-map .landxx { fill: #1b2029; stroke: #0c0e13; stroke-width: 0.5; }
#world-map .oceanxx, #world-map .antxx { fill: transparent; }
/* car-nations light up */
#world-map .active-land { fill: #7d8794; }

#flag-layer { position: absolute; inset: 0; }
.flag-pin {
  position: absolute; transform: translate(-50%, -50%);
  display: block; text-decoration: none; cursor: pointer;
  transition: transform .15s ease;
}
.flag-pin img {
  display: block; width: 28px; height: 19px; object-fit: cover; border-radius: 3px;
  border: 1.5px solid #cdd4dd;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 0 0 1px rgba(0,0,0,.5), 0 3px 8px rgba(0,0,0,.6);
  background: var(--silver);
}
/* labels hidden until hover so the flags don't collide; hovered flag jumps to front */
.flag-pin .pin-name {
  position: absolute; left: 50%; top: calc(100% + 5px); transform: translateX(-50%);
  white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s ease;
  font-family: "Arial Black", sans-serif; font-size: 11px; letter-spacing: .5px; text-transform: uppercase;
  color: #eef2f7; background: rgba(6,8,12,.92);
  padding: 3px 8px; border-radius: 6px; border: 1px solid rgba(200,215,230,.3);
  box-shadow: 0 4px 12px rgba(0,0,0,.6);
}
.flag-pin .pin-sub { display: none; }
.flag-pin:hover { transform: translate(-50%, -50%) scale(1.7); z-index: 20; }
.flag-pin:hover .pin-name { opacity: 1; }
.flag-pin:hover img { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 0 1px #fff, 0 0 14px rgba(150,210,230,.7), 0 6px 14px rgba(0,0,0,.7); }
.flag-pin.inactive { filter: grayscale(1) brightness(.55); cursor: default; }
.flag-pin.inactive:hover { transform: translate(-50%, -50%) scale(1.35); z-index: 20; }

/* ============================================================
   COUNTRY & MANUFACTURER pages
   ============================================================ */
.page-head { padding: 8px 0 26px; }
.page-head .head-flag {
  width: 96px; height: 64px; object-fit: cover; border-radius: 8px; margin-bottom: 12px;
  border: 3px solid #cdd4dd;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 6px 16px rgba(0,0,0,.6);
}
.page-head h2 {
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(32px, 6vw, 56px); letter-spacing: 2px; text-transform: uppercase;
  line-height: 1.04; display: inline-block;
}
.page-sub { color: var(--ink-dim); font-size: 12px; letter-spacing: 3px; text-transform: uppercase; margin-top: 8px; }

.tile-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px; padding: 8px 0 60px; justify-items: center;
}
.tile {
  width: 100%; min-height: 130px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-align: center; text-decoration: none;
  background: linear-gradient(180deg, #14171f, #0d0f15);
  border: 1px solid #2a2f3a; border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), 0 10px 22px rgba(0,0,0,.5);
  transition: transform .16s ease, box-shadow .22s ease, border-color .22s ease;
}
.tile:hover { transform: translateY(-5px); border-color: #c9d0da; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 1px rgba(220,230,240,.4), 0 16px 30px rgba(0,0,0,.6); }
.tile-name { font-family: "Arial Black", Impact, sans-serif; font-size: 24px; letter-spacing: 1px; text-transform: uppercase; }
.tile-sub  { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-dim); }

/* manufacturer badge/logo — shown in place of the maker's NAME where we have a logo.
   Light "plate" so any logo (incl. black/transparent ones) reads on the dark theme. */
.badge {
  display: inline-block; vertical-align: middle; width: auto; object-fit: contain;
  background: #f5f7fa; border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 6px 16px rgba(0,0,0,.5);
}
.page-badge-h { line-height: 1; }
.page-badge-h .badge { height: 92px; padding: 14px 22px; max-width: 360px; }
.tile-name .badge { height: 56px; padding: 9px 14px; max-width: 168px; }

.empty { color: var(--ink-dim); margin-top: 24px; font-size: 14px; }

/* ============================================================
   GLOSSARY
   ============================================================ */
.gloss-head { text-align: center; padding: 24px 0 16px; }
.gloss-head h2 {
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(30px, 5vw, 48px); letter-spacing: 2px; text-transform: uppercase; display: inline-block;
}
#gloss-search {
  display: block; width: 100%; max-width: 460px; margin: 18px auto 0;
  background: #0f1117; color: var(--ink); border: 1px solid #2a2f3a; border-radius: 10px;
  padding: 12px 16px; font: inherit; font-size: 15px; text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05), inset 0 2px 8px rgba(0,0,0,.5);
}
#gloss-search:focus { outline: none; border-color: #7d8794; box-shadow: inset 0 2px 8px rgba(0,0,0,.5), 0 0 0 1px rgba(150,210,230,.4); }
#gloss-search::placeholder { color: #5a616c; }
.gloss-filters { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.gloss-chip {
  font: inherit; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; cursor: pointer;
  color: var(--ink-dim); background: linear-gradient(180deg, #14171f, #0d0f15);
  border: 1px solid #2a2f3a; border-radius: 20px; padding: 7px 13px; transition: all .15s ease;
}
.gloss-chip:hover { color: var(--ink); border-color: #4a515c; }
.gloss-chip.active { color: #11141f; background: var(--silver); border-color: #cdd4dd; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255,255,255,.7); }
.gloss-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px; padding: 8px 0 64px; align-items: start;
}
.gloss-term {
  background: linear-gradient(180deg, #14171f, #0d0f15);
  border: 1px solid #2a2f3a; border-radius: 12px; padding: 16px 18px; text-align: left;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.07), 0 8px 18px rgba(0,0,0,.4);
}
.gloss-cat { display: inline-block; font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-dim); border: 1px solid var(--line); border-radius: 12px; padding: 2px 8px; margin-bottom: 8px; }
.gloss-term h3 { font-family: "Arial Black", sans-serif; font-size: 16px; letter-spacing: .3px; margin-bottom: 6px; display: inline-block; }
.gloss-short { font-size: 14.5px; color: var(--ink); font-weight: 600; line-height: 1.45; }
.gloss-detail { font-size: 13px; color: var(--ink-dim); line-height: 1.6; margin-top: 7px; }

/* ============================================================
   Garage grid
   ============================================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  padding: 34px 0 64px;
  justify-items: center;
}

.card {
  position: relative;
  width: 100%;
  display: block;
  text-align: center;
  background: linear-gradient(180deg, #14171f, #0d0f15);
  border: 1px solid #2a2f3a;
  border-radius: 12px;
  overflow: hidden;
  color: var(--ink);
  /* chrome-edge frame */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.10),
    inset 0 0 0 1px rgba(150,165,185,.06),
    0 10px 22px rgba(0,0,0,.5);
  transition: transform .16s ease, box-shadow .22s ease, border-color .22s ease;
}
.card:hover {
  transform: translateY(-5px);
  border-color: #c9d0da;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 0 0 1px rgba(220,230,240,.4),
    0 16px 30px rgba(0,0,0,.6);
}

/* reflective silver thumbnail */
.thumb {
  position: relative;
  height: 172px;
  background: var(--silver);
  border-bottom: 1px solid #2a2f3a;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* moving sheen streak across the metal */
.thumb::after {
  content: "";
  position: absolute; top: -50%; left: -30%;
  width: 40%; height: 200%;
  background: linear-gradient(105deg, transparent, rgba(255,255,255,.75), transparent);
  transform: rotate(8deg);
  transition: left .5s ease;
}
.card:hover .thumb::after { left: 120%; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .placeholder {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: #3c424c; font-weight: 700; text-shadow: 0 1px 0 rgba(255,255,255,.5);
}

.card .body { padding: 16px; }
.card .make { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--ink-dim); }
.card .name {
  font-family: "Arial Black", Impact, sans-serif;
  font-size: 22px; letter-spacing: 1px; text-transform: uppercase;
  margin: 4px 0 5px; display: inline-block;
}
.card .gen { font-size: 12px; color: var(--ink-dim); }
.card .quickspecs {
  display: flex; justify-content: center; gap: 22px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 11px; text-transform: uppercase; letter-spacing: 1px;
}
.card .quickspecs span { color: var(--ink-dim); }
.card .quickspecs span b {
  display: block; font-size: 17px; letter-spacing: 0; margin-bottom: 2px;
  font-family: "Arial Black", sans-serif;
}

/* chrome chip */
.chip {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 800;
  padding: 5px 11px; border-radius: 20px;
  color: #2a2f38;
  background: var(--silver);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 5px rgba(0,0,0,.5);
  text-shadow: 0 1px 0 rgba(255,255,255,.4);
}
.chip.owned { box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 0 10px rgba(120,200,160,.5), 0 2px 5px rgba(0,0,0,.5); }

/* ============================================================
   Detail page
   ============================================================ */
.back {
  display: inline-block; margin: 28px 0 6px;
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-dim);
}
.back:hover { color: #e6ebf2; }

.detail-head { padding: 10px 0 22px; }
.detail-head .make { font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--ink-dim); }
.detail-head h2 {
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(34px, 6vw, 56px); letter-spacing: 2px; text-transform: uppercase;
  line-height: 1.04; margin: 4px 0 8px; display: inline-block;
}
.detail-head .gen { color: var(--ink-dim); font-size: 14px; }

.rating-badge {
  display: inline-block; margin-top: 16px;
  font-family: "Arial Black", sans-serif; font-weight: 900; font-size: 26px;
  border-radius: 12px; padding: 10px 18px;
  color: #2a2f38; background: var(--silver);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 4px 10px rgba(0,0,0,.5);
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}
.rating-badge small { display: block; font-size: 9px; letter-spacing: 2px; color: #5a616c; font-weight: 700; }

/* one shared content width so the hero, gallery and spec panels all line up */
.detail-wrap { max-width: 1200px; margin: 0 auto; }

.detail-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;          /* consistent, no squashing */
  border-radius: 14px; overflow: hidden; margin: 0 auto 14px;
  background: var(--silver);
  border: 1px solid #2a2f3a;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.5), 0 14px 30px rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
}
.detail-hero.zoomable { cursor: zoom-in; }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; display: block; }
.detail-hero .placeholder {
  color: #3c424c; letter-spacing: 2px; text-transform: uppercase; font-size: 12px;
  font-weight: 700; text-shadow: 0 1px 0 rgba(255,255,255,.5); padding: 0 20px;
}
/* enlarge hint */
.zoom-hint {
  position: absolute; bottom: 12px; right: 12px;
  font-size: 11px; letter-spacing: 1px; text-transform: uppercase; font-weight: 700;
  color: #e8edf3; background: rgba(8,10,14,.6); border: 1px solid rgba(220,230,240,.35);
  padding: 6px 11px; border-radius: 20px; backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .15s ease; pointer-events: none;
}
.detail-hero.zoomable:hover .zoom-hint { opacity: 1; }

/* thumbnail gallery strip (shown when a car has more than one image) */
.gallery-strip { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin: 0 0 18px; }
.gallery-strip img {
  width: 96px; height: 64px; object-fit: cover; border-radius: 7px; cursor: pointer;
  border: 2px solid transparent; opacity: .55; transition: opacity .15s ease, border-color .15s ease;
}
.gallery-strip img:hover { opacity: 1; }
.gallery-strip img.active { opacity: 1; border-color: #cdd4dd; box-shadow: 0 0 10px rgba(150,210,230,.4); }

.img-credit { color: var(--ink-dim); font-size: 11px; letter-spacing: .5px; margin: 2px 0 24px; }

/* full-screen lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3,4,6,.93); backdrop-filter: blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 4vw; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.75); }
.lb-close {
  position: absolute; top: 16px; right: 26px; font-size: 38px; line-height: 1;
  color: #cdd4dd; background: none; border: none; cursor: pointer; font-family: inherit;
}
.lb-close:hover { color: #fff; }

.spec-groups {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 20px; text-align: left;
}
.panel {
  background: linear-gradient(180deg, #14171f, #0d0f15);
  border: 1px solid #2a2f3a; border-radius: 12px; padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.45);
}
.panel h3 {
  font-family: "Arial Black", sans-serif;
  font-size: 13px; letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
  text-align: center; display: block;
}
.spec-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 14px; }
.spec-row .k { color: var(--ink-dim); }
.spec-row .v { color: var(--ink); font-weight: 700; text-align: right; }

.notes-panel { margin-top: 20px; grid-column: 1 / -1; text-align: center; }
.notes-panel p { color: var(--ink); font-size: 15px; line-height: 1.75; max-width: 760px; margin: 0 auto; }

/* ---------- Footer ---------- */
.site-footer {
  position: relative; z-index: 1;
  border-top: 1px solid var(--line); margin-top: 44px;
  padding: 26px 0; color: var(--ink-dim); font-size: 12px; letter-spacing: 1px;
}

/* ---------- Country flag grid (mobile alternative to the world map) ---------- */
.country-grid { display: none; }
.cgrid-tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; text-decoration: none; padding: 16px 10px;
  background: linear-gradient(180deg, #14171f, #0d0f15);
  border: 1px solid #2a2f3a; border-radius: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.45);
}
.cgrid-tile img {
  width: 66px; height: 44px; object-fit: cover; border-radius: 5px;
  border: 2px solid #cdd4dd; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 3px 8px rgba(0,0,0,.5);
}
.cgrid-name { font-family: "Arial Black", sans-serif; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: var(--ink); }
.cgrid-sub  { font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--ink-dim); }
.cgrid-tile.inactive { opacity: .45; filter: grayscale(1); pointer-events: none; }

/* ============================================================
   Responsive / mobile
   ============================================================ */
@media (max-width: 820px) {
  .wrap { padding: 0 16px; }

  /* swap the GT map for a tappable flag grid */
  #world-wrap { display: none; }
  .country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
    gap: 12px; padding: 6px 0 50px;
  }

  .site-header { padding: 16px 0 18px; }
  .hero { padding: 26px 0 4px; }
  .map-title { margin-top: 20px; }

  /* single, comfortable column for cards, tiles and spec panels */
  .grid, .tile-grid { grid-template-columns: 1fr; gap: 16px; }
  .spec-groups { grid-template-columns: 1fr; gap: 14px; }
  .panel { padding: 15px 16px; }

  .detail-wrap { max-width: 100%; }
  .page-badge-h .badge { height: 76px; }
  .tile-name .badge { height: 52px; }

  .gallery-strip img { width: 72px; height: 48px; }
  .notes-panel p { font-size: 14.5px; }
}

@media (max-width: 460px) {
  .card .quickspecs { gap: 14px; }
  .gallery-strip { gap: 7px; }
  .gallery-strip img { width: 60px; height: 40px; }
  .detail-head .gen { font-size: 13px; }
}
