/* My Map — Rubbel-Weltkarte. Kopf/Fuß und Navigation kommen aus css/main.css. */

.mm {
  flex: 1;
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 24px 40px;
}

.mm-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 14px; flex-wrap: wrap; }
.mm-titel { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 4px; }
.mm-unter { margin: 0; color: var(--ink-muted); max-width: 56ch; }

.mm-zahl {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  column-gap: 8px;
  min-width: 250px;
  padding: 10px 16px 12px;
  border-radius: var(--radius);
  background: var(--bg-panel);
  border: 1px solid color-mix(in srgb, var(--amber) 40%, var(--line));
}
.mm-zahl strong { font-family: var(--font-display); font-size: 2rem; line-height: 1; color: var(--amber); }
:root[data-theme="light"] .mm-zahl strong { color: #b47a00; }
.mm-zahl > span { color: var(--ink-muted); font-weight: 600; }
.balken { grid-column: 1 / -1; height: 8px; margin: 8px 0 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink-muted) 22%, transparent); overflow: hidden; }
.balken i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #c79a3c, #f3d27a); transition: width 0.4s ease; }
.mm-zahl small { grid-column: 1 / -1; color: var(--ink-muted); font-size: 0.8rem; }

/* ---------- Karte ---------- */
.karte-rahmen {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #15122a;
}
.karte { display: block; width: 100%; height: auto; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.karte.zieht { cursor: grabbing; }
.meer { fill: #15122a; }
.netz { fill: none; stroke: rgba(167, 162, 207, 0.08); stroke-width: 0.6; vector-effect: non-scaling-stroke; }
.fremd path { fill: #24203f; stroke: #2e2a52; stroke-width: 0.5; vector-effect: non-scaling-stroke; }

/* Goldfolie (nicht besucht) */
.staat {
  fill: url(#mm-folie);
  stroke: rgba(110, 72, 8, 0.55);
  stroke-width: 0.6;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  cursor: pointer;
  transition: filter 0.15s ease;
}
.staat:hover { filter: brightness(1.12); }
/* Freigerubbelt: eigene Farbe */
.staat.offen { fill: var(--farbe); stroke: rgba(15, 12, 35, 0.45); }
:root[data-theme="light"] .staat.offen { stroke: rgba(30, 27, 52, 0.35); }
.staat-punkt { stroke: rgba(110, 72, 8, 0.8); stroke-width: 1; }
.staat-punkt.offen { stroke: #fff; stroke-width: 1.2; }
.rubbel { pointer-events: none; }
.flocke {
  fill: #f3d27a;
  pointer-events: none;
  transform-box: fill-box;
  transform-origin: center;
  animation: flocke 0.7s cubic-bezier(.2, .7, .4, 1) forwards;
}
@keyframes flocke {
  to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
}

/* Zoom-Knöpfe und Hinweis (wie in den Spielen) */
.zoom { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; }
.zoom-btn {
  font: inherit; font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; line-height: 1;
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 11px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-panel) 88%, transparent); color: var(--ink); cursor: pointer;
}
.zoom-btn:hover:not(:disabled) { border-color: var(--amber); background: var(--bg-panel-2); }
.zoom-btn:disabled { opacity: 0.4; cursor: default; }
.zoom-reset { font-size: 1.1rem; }
.zoom-tipp {
  position: absolute; left: 12px; bottom: 10px; margin: 0; padding: 4px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 75%, transparent); color: var(--ink-muted); font-size: 0.8rem; pointer-events: none;
}
.hover-name {
  position: absolute; z-index: 3; pointer-events: none; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(21, 18, 42, 0.86); border: 1px solid rgba(167, 162, 207, 0.25);
  color: #f3f1ff; font-size: 0.8rem; font-weight: 600;
  transform: translate(10px, calc(-100% - 8px));
}
.hover-name.da { color: #fde68a; }
:root[data-theme="light"] .hover-name.da { color: #8a5a00; }

/* Knöpfe (wie game-base.css, das hier nicht geladen ist) */
.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 12px 20px; border-radius: var(--radius-sm); border: none;
  background: var(--akzent); color: #1e1b34; transition: filter 0.14s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 55%, transparent); }

/* ---------- Unter der Karte ---------- */
.mm-unten { margin-top: 16px; }
.suche { --auswahl-farbe: var(--amber); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; max-width: 520px; }
.eingabe {
  font: inherit; font-size: 1.02rem; width: 100%; padding: 11px 14px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--bg-panel); color: var(--ink);
}
.eingabe:focus-visible { outline: none; border-color: var(--amber); box-shadow: 0 0 0 3px color-mix(in srgb, var(--amber) 35%, transparent); }
.suche .btn { --akzent: #f3d27a; padding: 11px 22px; background: linear-gradient(135deg, #f7de95, #c79a3c); }
.meldung { min-height: 1.4em; margin: 8px 0 10px; color: var(--ink-muted); font-weight: 600; }

.kontinente { list-style: none; margin: 0 0 22px; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
/* Territories (Grönland & Co.): zählen extra, nicht zu den 197 Ländern */
.kontinente li.gebiete { grid-column: 1 / -1; border-style: dashed; background: transparent; }
.k-hinweis { font-weight: 400; margin-left: 6px; font-size: 0.8rem; }
.kontinente li.gebiete .k-name { color: var(--ink-muted); white-space: normal; }
.l-zu { margin-left: 2px; font-size: 0.78rem; color: var(--ink-muted); white-space: nowrap; }
.kontinente li {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; align-items: baseline;
  padding: 9px 12px; border-radius: var(--radius-sm); background: var(--bg-panel); border: 1px solid var(--line);
}
.k-name { font-weight: 700; font-size: 0.86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.k-zahl { color: var(--ink-muted); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.k-zahl strong { color: var(--ink); }
.k-balken { grid-column: 1 / -1; height: 5px; border-radius: 999px; background: color-mix(in srgb, var(--ink-muted) 22%, transparent); overflow: hidden; }
.k-balken i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #c79a3c, #f3d27a); }

.besucht-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.besucht-kopf h2 { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.btn-leise { background: var(--bg-panel); color: var(--ink); border: 1px solid var(--line); }
.btn-klein { padding: 7px 14px; font-size: 0.88rem; }
.liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.liste li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 6px; border-radius: 999px;
  background: color-mix(in srgb, var(--farbe) 16%, var(--bg-panel));
  border: 1px solid color-mix(in srgb, var(--farbe) 50%, var(--line));
  font-weight: 600; font-size: 0.9rem;
}
.liste img { width: 22px; height: 16px; object-fit: cover; border-radius: 3px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2); }
.liste button {
  width: 22px; height: 22px; border-radius: 50%; border: none; cursor: pointer;
  background: transparent; color: var(--ink-muted); font-size: 1rem; line-height: 1;
}
.liste button:hover { background: color-mix(in srgb, var(--ink-muted) 20%, transparent); color: var(--ink); }
.leer { color: var(--ink-muted); margin: 0; }

@media (max-width: 900px) { .kontinente { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .mm { padding: 16px 14px 32px; }
  .mm-zahl { min-width: 0; width: 100%; }
  .kontinente { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .zoom-btn { width: 34px; height: 34px; }
  .zoom-tipp { display: none; }
}
@media (prefers-reduced-motion: reduce) { .flocke { animation: none; display: none; } .balken i { transition: none; } }
