/* Terrakel – Styles */
:root {
  --bg: #F7F5F0; --surface: #FFFFFF; --ink: #1C1B19; --muted: #6B675F;
  --line: #E4E0D7; --line2: #D6D1C6; --seg: #ECE8E0; --track: #EFEBE3;
  --tintBlue: #E8EDF4; --tintWarm: #F1E6DE; --warmInk: #8A3A10; --orange: #B5501A;
  --off: #8A857B; --accent: #2B4C7E; --danger: #B42318;
  --heat2: #D08A4E; --heat3: #CDBFA9; --heat4: #DDD6C9;
  --fs: 16px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #151413; --surface: #1F1E1C; --ink: #F2EFE8; --muted: #A39E94;
  --line: #33312D; --line2: #46433E; --seg: #2A2826; --track: #2A2826;
  --tintBlue: #232B38; --tintWarm: #33261E; --warmInk: #F0A877; --orange: #E0864F;
  --off: #5E5A54; --accent: #8FB0E0; --danger: #F0907F;
  --heat2: #B9774A; --heat3: #6E6457; --heat4: #4A4640;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { font-size: var(--fs); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.4; -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
p, h1, h2, h3 { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.mono { font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--muted); }
.warm { color: var(--warmInk); }
.orange { color: var(--orange); }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.screen {
  flex: 1; width: 100%; min-width: 0; max-width: 560px; margin: 0 auto;
  padding: 28px 24px 120px; display: flex; flex-direction: column; gap: 24px;
}
.screen.play { padding: 16px 24px 24px; min-height: 100vh; min-height: 100dvh; gap: 20px; }
.screen.plain { padding-bottom: 32px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  padding: 8px 8px calc(12px + env(safe-area-inset-bottom));
  background: var(--bg); border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  min-height: 52px; font-size: 12px; font-weight: 500; color: var(--muted); text-decoration: none; border-radius: 10px;
}
.tab[aria-current="page"] { color: var(--ink); font-weight: 600; }
/* Unterseiten ohne eigenen Handy-Tab (Rangliste, Einstellungen) markieren „Profil“ */
@media (max-width: 899px) { .tab.sub-current { color: var(--ink); font-weight: 600; } }
.nav-brand, .desk-only { display: none; }

@media (min-width: 900px) {
  .shell.has-nav { flex-direction: row; }
  .tabbar {
    position: sticky; top: 0; height: 100vh; width: 240px; flex: none;
    display: flex; flex-direction: column; gap: 4px; padding: 28px 16px;
    border-top: 0; border-right: 1px solid var(--line);
  }
  .tab { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 12px; min-height: 44px; font-size: 15px; }
  .tab[aria-current="page"] { background: var(--seg); }
  .nav-brand { display: flex; align-items: center; gap: 10px; padding: 0 12px 24px; font-size: 17px; font-weight: 700; letter-spacing: -0.01em; text-decoration: none; }
  .desk-only { display: flex; }
  .tabbar > .tab:last-child { margin-top: auto; }  /* Einstellungen unten in der Seitenleiste */
  .screen { max-width: 760px; padding: 40px 40px 56px; }
  .screen.play { max-width: 560px; }
}

/* ---------- Splash ---------- */
.splash {
  position: fixed; inset: 0; z-index: 100; background: #1C1B19; color: #F7F5F0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  font-size: 28px; font-weight: 700; letter-spacing: -0.03em; transition: opacity var(--m-slow) ease;
}
.splash.hide { opacity: 0; pointer-events: none; }
.splash p { display: flex; flex-direction: column; align-items: center; gap: 6px; letter-spacing: -0.035em; }
.splash p span { font-size: 15px; font-weight: 400; letter-spacing: 0; color: #B8B2A7; }
.nav-brand span { letter-spacing: -0.02em; }
.splash .needle { transform-origin: 60px 60px; animation: needle 1.1s cubic-bezier(.3,1.6,.5,1) forwards; }
@keyframes needle { from { transform: rotate(-60deg); } to { transform: rotate(35deg); } }

/* ---------- Type ---------- */
.h1 { font-size: 1.875rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.h1.sm { font-size: 1.6rem; line-height: 1.15; }
.h2 { font-size: .95rem; font-weight: 600; }
.label { font-family: 'DM Mono', ui-monospace, monospace; font-size: .75rem; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
.lead { font-size: 1rem; line-height: 1.5; color: var(--muted); }
.big { font-family: 'DM Mono', ui-monospace, monospace; font-size: 4.5rem; font-weight: 500; letter-spacing: -0.05em; line-height: 1; }
.big small { font-size: 1.75rem; color: var(--muted); letter-spacing: 0; }

/* ---------- Layout helpers ---------- */
.stack { display: flex; flex-direction: column; gap: 10px; }
.stack.lg { gap: 16px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.between.base { align-items: baseline; }
.row-flex { display: flex; align-items: center; gap: 12px; }
.bottom { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 54px; padding: 0 20px; border-radius: 14px; border: 0;
  background: var(--ink); color: var(--bg); font-size: 1rem; font-weight: 600;
  text-decoration: none; cursor: pointer; text-align: center;
}
.btn.outline { background: transparent; color: var(--ink); border: 1px solid var(--line2); font-weight: 500; }
.btn.small { min-height: 44px; border-radius: 999px; padding: 0 14px; font-size: .875rem; }
.btn.sq { width: 56px; min-height: 56px; padding: 0; flex: none; }
.btn.danger { background: var(--danger); color: #fff; }
[data-theme="dark"] .btn.danger { color: #151413; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--seg); color: var(--muted); border-color: transparent; cursor: not-allowed; }
.iconbtn {
  width: 44px; height: 44px; margin-left: -10px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; flex: none;
}
.iconbtn.ring { margin: 0; border: 1px solid var(--line); background: var(--surface); }
.linkbtn { border: 0; background: none; padding: 0; min-height: 44px; color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.textbtn-danger { border: 0; background: none; padding: 0; min-height: 44px; color: var(--danger); font-weight: 500; cursor: pointer; text-align: left; }

/* ---------- Surfaces ---------- */
.card { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.card.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.card.dark .muted, .card.dark .label { color: var(--line2); }
.card.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 18px; text-decoration: none; color: var(--ink); }
.card.hero .deco { position: absolute; right: -28px; top: -24px; color: var(--accent); opacity: .9; pointer-events: none; }
.card.hero .copy { position: relative; display: flex; flex-direction: column; gap: 6px; max-width: 230px; }
.note { padding: 12px 14px; border-radius: 12px; background: var(--bg); font-size: .875rem; line-height: 1.45; color: var(--muted); }
.card .note { background: var(--bg); }
.feedback { padding: 14px 16px; border-radius: 14px; font-size: .95rem; line-height: 1.45; background: var(--tintBlue); }
.feedback.no { background: var(--tintWarm); color: var(--warmInk); }
.empty { padding: 24px 16px; border-radius: 16px; border: 1px dashed var(--line2); text-align: center; color: var(--muted); font-size: .95rem; line-height: 1.5; }

/* ---------- Lists ---------- */
.rows { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.row {
  display: flex; align-items: center; gap: 14px; min-height: 68px; width: 100%; padding: 0;
  border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink);
  text-decoration: none; text-align: left; cursor: pointer;
}
.rows > :last-child, .rows > li:last-child > .row { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title { font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.row-sub { font-size: .875rem; color: var(--muted); }
.row .end { flex: none; font-family: 'DM Mono', ui-monospace, monospace; font-size: .85rem; color: var(--muted); }
.row .end.new { color: var(--orange); }
.tile {
  flex: none; width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--tintBlue); color: var(--accent); font-family: 'DM Mono', ui-monospace, monospace; font-size: .8rem; font-weight: 500;
}
.tile.warm { background: var(--tintWarm); color: var(--warmInk); }
.group { display: flex; flex-direction: column; padding: 0 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.group > .item { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 6px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.group > .item:last-child { border-bottom: 0; }
.group .item .sub { display: block; font-size: .8rem; color: var(--muted); }
.rank-row { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 0 12px; border-radius: 12px; }
.rank-row.me { background: var(--surface); border: 1px solid var(--accent); }
.rank-row .rk { width: 26px; font-family: 'DM Mono', ui-monospace, monospace; font-size: .9rem; color: var(--muted); }
.rank-row .rk.top { color: var(--orange); }
.rank-row .sc { font-family: 'DM Mono', ui-monospace, monospace; font-size: .95rem; }

/* ---------- Chips / segments ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips.scroll { position: relative; /* hält absolut positionierte Screenreader-Texte im Scrollbereich */ flex-wrap: nowrap; overflow-x: auto; margin: 0 -24px; padding: 2px 24px; scrollbar-width: none; }
.chips.scroll::-webkit-scrollbar { display: none; }
/* Laufleisten: weicher Rand rechts zeigt, dass es weitergeht */
@media (max-width: 899px) {
  .chips.scroll, .modes {
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
}
.chip {
  flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2);
  background: transparent; color: var(--ink); font-size: .875rem; font-weight: 500; cursor: pointer;
}
.chip.lg { min-height: 44px; padding: 0 16px; font-size: .95rem; }
.chip[aria-pressed="true"], .chip[aria-current="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding: 4px; border-radius: 12px; background: var(--seg); }
.seg button { min-height: 44px; border-radius: 9px; border: 0; background: transparent; font-size: .95rem; font-weight: 500; cursor: pointer; padding: 0 6px; }
.seg button[aria-pressed="true"] { background: var(--surface); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.modes { display: flex; gap: 10px; overflow-x: auto; margin: 0 -24px; padding: 2px 24px; scrollbar-width: none; }
.modes::-webkit-scrollbar { display: none; }
.mode {
  flex: none; width: 118px; display: flex; flex-direction: column; gap: 10px; padding: 14px 12px; text-align: left;
  border-radius: 16px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; color: var(--ink);
}
.mode[aria-pressed="true"] { border: 1.5px solid var(--ink); }
.mode .t { font-size: .95rem; font-weight: 600; }
.mode .s { font-size: .75rem; color: var(--muted); }
.mode svg { color: var(--accent); }
.mode.alt svg { color: var(--orange); }
/* Spielarten: am Desktop alle auf einen Blick statt abgeschnittener Laufleiste */
@media (min-width: 900px) {
  .modes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; margin: 0; padding: 0; }
  .modes .mode { width: auto; }
}

/* ---------- Inputs ---------- */
.input {
  width: 100%; min-height: 56px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--ink);
  background: var(--surface); color: var(--ink); font: inherit; font-size: 1.1rem;
}
.input.soft { border-color: var(--line2); min-height: 50px; font-size: 1rem; }
.input::placeholder { color: var(--muted); }
.input:disabled { opacity: .6; }
.search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); color: var(--muted); }
.search input { flex: 1; min-width: 0; min-height: 44px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; }
.search input:focus { outline: none; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.inrow { display: flex; gap: 8px; }
.inrow .input { flex: 1; min-width: 0; }
.msg { min-height: 20px; font-size: .9rem; color: var(--warmInk); }
.shake { animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-6px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }

/* ---------- Progress ---------- */
.bar { height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; background: var(--accent); transition: width var(--m-slow); }
.bar.thin { height: 4px; }
.segbar { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.segbar span { height: 6px; border-radius: 999px; background: var(--line); }
.segbar span.on { background: var(--accent); }
.segbar span.hot { background: var(--orange); }
.pill { padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-family: 'DM Mono', ui-monospace, monospace; font-size: .95rem; font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--orange); }

/* ---------- Switch ---------- */
.switch { flex: none; width: 52px; height: 44px; padding: 6px 0; border: 0; background: transparent; cursor: pointer; }
.switch span { display: block; width: 52px; height: 32px; padding: 3px; border-radius: 999px; background: var(--off); transition: background var(--m-instant); }
.switch span::after { content: ''; display: block; width: 26px; height: 26px; border-radius: 999px; background: #fff; transition: transform var(--m-instant); }
.switch[aria-checked="true"] span { background: var(--accent); }
.switch[aria-checked="true"] span::after { transform: translateX(20px); }
.swatches { display: flex; gap: 12px; }
.swatch { width: 44px; height: 44px; padding: 4px; border-radius: 999px; border: 2px solid transparent; background: transparent; cursor: pointer; }
.swatch span { display: block; width: 100%; height: 100%; border-radius: 999px; }
.swatch[aria-pressed="true"] { border-color: var(--ink); }
.stepper { display: flex; align-items: center; gap: 4px; }
.stepper button { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: transparent; font-size: 1.25rem; cursor: pointer; }
.stepper output { min-width: 76px; text-align: center; font-family: 'DM Mono', ui-monospace, monospace; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); min-width: 0; }
.stat dt { font-size: .75rem; color: var(--muted); }
.stat dd { margin: 0; font-family: 'DM Mono', ui-monospace, monospace; font-size: 1.25rem; font-weight: 500; white-space: nowrap; }
.stat.dark { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stat.dark dt { color: var(--line2); }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; align-items: end; height: 140px; }
.week div { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.week i { display: block; width: 100%; min-height: 4px; border-radius: 6px; background: var(--accent); }
.week i.today { background: var(--orange); }
.week i.zero { background: var(--line); }
.week span { font-family: 'DM Mono', ui-monospace, monospace; font-size: .7rem; color: var(--muted); }
.week span.today { color: var(--ink); font-weight: 500; }
.topic-row { display: grid; grid-template-columns: 104px minmax(0, 1fr) 44px; align-items: center; gap: 12px; }
.topic-row .p { font-family: 'DM Mono', ui-monospace, monospace; font-size: .8rem; text-align: right; color: var(--muted); }

/* ---------- Games ---------- */
.qhead { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.qhead .count { flex: none; font-family: 'DM Mono', ui-monospace, monospace; font-size: 1.75rem; font-weight: 500; letter-spacing: -0.02em; }
.qhead .count small { font-size: 1rem; color: var(--muted); }
.slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.slot { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 12px; border-radius: 10px; border: 1px solid var(--line); font-size: .95rem; color: var(--muted); min-width: 0; }
.slot .n { flex: none; width: 20px; font-family: 'DM Mono', ui-monospace, monospace; font-size: .75rem; }
.slot .t { min-width: 0; overflow-wrap: anywhere; line-height: 1.2; }
.slot.hit { background: var(--surface); border-color: var(--accent); color: var(--ink); font-weight: 600; animation: pop .25s; }
.slot.miss { border-style: dashed; }
.slot.hint .t { color: var(--orange); font-family: 'DM Mono', ui-monospace, monospace; }
@keyframes pop { 50% { transform: scale(1.04); } }
.flagbox { display: flex; justify-content: center; padding: 28px 0; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.flag { display: flex; width: 228px; height: 152px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.flag.h { flex-direction: column; }
.flag span { flex: 1; }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 60px; padding: 6px 12px;
  border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 1rem; font-weight: 600; cursor: pointer; text-align: center; overflow-wrap: anywhere;
}
.opt:disabled { cursor: default; }
.opt.right { border-color: var(--accent); background: var(--tintBlue); color: var(--ink); }
.opt.wrong { border-color: var(--orange); background: var(--tintWarm); color: var(--warmInk); }
.opt.sel { border: 2px solid var(--ink); }
.match { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.match .col { display: flex; flex-direction: column; gap: 10px; }
.match .opt { justify-content: space-between; text-align: left; min-height: 56px; }
.match .opt .num { font-family: 'DM Mono', ui-monospace, monospace; font-size: .75rem; color: var(--accent); }
.tfcard { flex: 1; min-height: 260px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; padding: 24px; border-radius: 24px; background: var(--surface); border: 1.5px solid var(--line); }
.tfcard.ok { border-color: var(--accent); }
.tfcard.no { border-color: var(--orange); }
.tfcard h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.tfbtns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tfbtns .btn { min-height: 64px; border-radius: 16px; font-size: 1.05rem; }
.tfbtns .btn.outline { border: 1.5px solid var(--ink); font-weight: 600; }
.guess { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.guess .between span:first-child { font-weight: 600; }
.guess .km { font-family: 'DM Mono', ui-monospace, monospace; font-size: .9rem; }
.guess .bar { background: var(--track); }
.heat1 { background: var(--orange) !important; }
.heat2 { background: var(--heat2) !important; }
.heat3 { background: var(--heat3) !important; }
.heat4 { background: var(--heat4) !important; }
.winbox { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 16px; background: var(--ink); color: var(--bg); }
.winbox .label { color: var(--line2); }
.winbox strong { font-size: 1.4rem; letter-spacing: -0.02em; }
.dots { display: grid; grid-template-columns: repeat(auto-fill, minmax(18px, 1fr)); gap: 5px; }
.dots i { display: block; height: 26px; border-radius: 6px; border: 1.5px solid var(--orange); }
.dots i.on { background: var(--accent); border-color: var(--accent); }

/* ---------- Karte & Umriss ---------- */
:root { --sea: #E3EAF2; --land: #FFFFFF; --landctx: #E4DFD4; --t2: #D4A93B; --t4: #B42318; --hit: #2fb585; }
[data-theme="dark"] { --sea: #131A23; --land: #3D3B37; --landctx: #24221F; --t2: #C9A34A; --t4: #E5735F; }
.mapbox { position: relative; height: min(56vh, 540px); min-height: 280px; border-radius: 16px; overflow: hidden; background: var(--sea); border: 1px solid var(--line); touch-action: none; }
/* Breite nie über den Container hinaus: sonst verbreitern Seitenverhältnis + Mindesthöhe die Karte auf dem Handy (horizontales Scrollen) */
.mapbox { max-width: 100%; }
.mapbox svg { display: block; width: 100%; height: 100%; cursor: pointer; user-select: none; -webkit-user-select: none; }
.mapbox .ctx { fill: var(--landctx); stroke: var(--line2); stroke-width: .6px; vector-effect: non-scaling-stroke; pointer-events: none; }
.mapbox .tgt { fill: var(--land); stroke: var(--muted); stroke-width: .7px; vector-effect: non-scaling-stroke; transition: fill var(--m-instant); }
.mapbox .tgt:hover { fill: var(--tintBlue); }
/* Quizkarte: Hervorhebung beim Überfahren/Antippen (Fläche + Kreis gemeinsam); Ergebnisfarben t1–t4 bleiben, nur die Kontur kommt dazu */
.mapbox:not(.nohover) .tgt.m-hov { fill: color-mix(in srgb, var(--accent) 22%, var(--land)); stroke: var(--accent); stroke-width: 1.4px; transition: fill var(--m-fast) var(--m-ease-out), stroke var(--m-fast) var(--m-ease-out); }
.mapbox .wmtip { white-space: nowrap; }
.mapbox .t1 { fill: var(--accent) !important; }
.mapbox .t2 { fill: var(--t2) !important; }
.mapbox .t3 { fill: var(--orange) !important; }
.mapbox .t4 { fill: var(--t4) !important; }
.mapbox .flash { animation: mflash .6s; }
.mapbox .blink { animation: mblink .4s 4; }
@keyframes mflash { 50% { fill: var(--orange); } }
@keyframes mblink { 50% { fill: var(--land); } }
.maploading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--muted); margin: 0; }
.maptools { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 6px; }
.maptools button { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 1.3rem; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .t1 { background: var(--accent); } .legend .t2 { background: var(--t2); } .legend .t3 { background: var(--orange); } .legend .t4 { background: var(--t4); }
.mapbox.nohover .tgt:hover { fill: var(--land); }
.mapbox.nohover svg { cursor: grab; }
.mapbox .cur { fill: var(--orange) !important; stroke: var(--ink); stroke-width: 1.4px; animation: mcur 1.4s ease-in-out infinite; }
.mapbox circle.mini { fill-opacity: .85; stroke-width: 1px; vector-effect: non-scaling-stroke; }
@keyframes mcur { 50% { fill-opacity: .55; } }
.mapbox .pinland { fill: var(--land); stroke: var(--muted); stroke-width: .7px; vector-effect: non-scaling-stroke; pointer-events: none; }
.mapbox .pinline { stroke: var(--ink); stroke-width: 1.5px; stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.mapbox .pinyou { fill: var(--orange); stroke: var(--surface); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.mapbox .pintrue { fill: var(--accent); stroke: var(--surface); stroke-width: 1.5px; vector-effect: non-scaling-stroke; }
.mapbox .pinlabel { fill: var(--ink); font-family: 'DM Sans', system-ui, sans-serif; font-weight: 700; paint-order: stroke; stroke: var(--land); stroke-width: 3px; vector-effect: non-scaling-stroke; }
.flagwrap { position: relative; }
.tiles { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); border-radius: 6px; overflow: hidden; }
.tiles i { background: var(--seg); border: 1px solid var(--surface); transition: opacity var(--m-slow); }
.tiles i.open { opacity: 0; }
.miniflag { display: inline-flex; width: 30px; height: 20px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); flex: none; }
.miniflag.h { flex-direction: column; }
.miniflag i { flex: 1; }
.shapebox { position: relative; height: min(36vh, 300px); min-height: 200px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 16px; }
.shapebox svg { width: 100%; height: 100%; }
.shapebox path { fill: var(--ink); }
.shapebox.solved path { fill: var(--accent); }

/* ---------- Level & badges ---------- */
.ring { position: relative; flex: none; width: 88px; height: 88px; }
.ring svg { transform: rotate(-90deg); }
.ring .in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ranks li { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ranks .track { display: flex; align-items: center; width: 100%; }
.ranks .track i { flex: 1; height: 2px; background: var(--line2); }
.ranks .track i.on { background: var(--accent); }
.ranks .track i.none { background: transparent; }
.ranks .track b { flex: none; width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--line2); background: var(--bg); }
.ranks .track b.on { background: var(--accent); border-color: var(--accent); }
.ranks .track b.cur { width: 20px; height: 20px; background: var(--surface); border-color: var(--accent); }
.ranks .n { font-size: .72rem; font-weight: 500; color: var(--muted); hyphens: auto; }
.ranks .n.on { color: var(--ink); }
.ranks .n.cur { font-weight: 700; }
.badges { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 10px; }
@media (min-width: 600px) { .badges { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.badges a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; text-decoration: none; color: var(--ink); padding: 4px; border-radius: 12px; }
.badges .bn { font-size: .8rem; font-weight: 600; line-height: 1.25; }
.badges .bs { font-family: 'DM Mono', ui-monospace, monospace; font-size: .7rem; color: var(--muted); }
.hex .shape { fill: transparent; stroke: var(--line2); stroke-dasharray: 3 3; }
.hex .glyph { stroke: var(--muted); }
.hex.got .shape { fill: var(--tintBlue); stroke: var(--accent); stroke-dasharray: none; }
.hex.got .glyph { stroke: var(--accent); }
.new-tag { position: absolute; top: -4px; right: 6px; padding: 2px 6px; border-radius: 999px; background: var(--orange); color: var(--surface); font-family: 'DM Mono', ui-monospace, monospace; font-size: .62rem; }
.unlock { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; }
.unlock .halo { position: relative; width: 240px; height: 240px; display: flex; align-items: center; justify-content: center; }
.unlock .halo > svg:first-child { position: absolute; inset: 0; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tag { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: var(--tintWarm); color: var(--warmInk); font-family: 'DM Mono', ui-monospace, monospace; font-size: .75rem; letter-spacing: .06em; }
.tag.center { align-self: center; }

/* ---------- Feinschliff: Tiefe, Farbe, Bewegung ---------- */
:root {
  --ease: var(--m-ease-out, cubic-bezier(.2, .8, .2, 1));   /* Alias auf das Motion-System (css/motion.css) */
  --shadow: 0 1px 2px rgba(28, 27, 25, .04), 0 6px 20px -8px rgba(28, 27, 25, .10);
  --shadow-lg: 0 2px 4px rgba(28, 27, 25, .05), 0 14px 32px -12px rgba(28, 27, 25, .18);
  --c-map: #2F6FB0; --c-pin: #C2562A; --c-list: #1F7A5C; --c-flags: #A86F12; --c-match: #6B4FA8;
  --c-tf: #B23A63; --c-guess: #1C7C8C; --c-shape: #4F5B6B; --c-flagle: #9A5B26;
  --tile-mix: 13%;
}
[data-theme="dark"] {
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 18px 40px -14px rgba(0, 0, 0, .7);
  --c-map: #7FB0E8; --c-pin: #F0936A; --c-list: #6FCBA6; --c-flags: #E8B65A; --c-match: #B9A2EE;
  --c-tf: #EE8FB0; --c-guess: #6FC7D3; --c-shape: #A7B2C1; --c-flagle: #E0A36F;
  --tile-mix: 17%;
}

/* Flächen mit leichter Tiefe */
.card, .group, .stat, .mode, .flagbox, .shapebox, .tfcard, .guess { box-shadow: var(--shadow); }
.card { border-radius: 22px; }
.card.hero {
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 14%, var(--surface)) 0%, var(--surface) 62%);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}
.card.hero .btn { box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--ink) 60%, transparent); }

/* Farbige Symbole je Quiz-Art */
.t-map { --c: var(--c-map); } .t-pin { --c: var(--c-pin); } .t-list { --c: var(--c-list); }
.t-flags { --c: var(--c-flags); } .t-match { --c: var(--c-match); } .t-tf { --c: var(--c-tf); }
.t-guess { --c: var(--c-guess); } .t-shape { --c: var(--c-shape); } .t-flagle { --c: var(--c-flagle); }
.t-worldtype { --c: var(--c-map); } .t-outline { --c: var(--c-shape); }
.tile[class*="t-"] { color: var(--c); background: color-mix(in srgb, var(--c) var(--tile-mix), var(--surface)); }
.mode[class*="t-"] svg { color: var(--c); }
.mode[class*="t-"][aria-pressed="true"] { border-color: var(--c); background: color-mix(in srgb, var(--c) 8%, var(--surface)); }

/* „neu“ als kleines Label */
.row .end.new {
  padding: 3px 9px; border-radius: 999px; font-size: .72rem; letter-spacing: .04em;
  background: var(--tintWarm); color: var(--warmInk);
}

/* Fortschrittsbalken mit Verlauf */
.bar > span, .segbar span.on { background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 65%, var(--surface)), var(--accent)); }
.bar > span { transition: width var(--m-reward) var(--ease); }
.week i:not(.zero) { background: linear-gradient(180deg, var(--accent), color-mix(in srgb, var(--accent) 60%, var(--surface))); }
.week i.today:not(.zero) { background: linear-gradient(180deg, var(--orange), color-mix(in srgb, var(--orange) 60%, var(--surface))); }
.week.is-empty { height: 40px; }
.week-empty { margin: 4px 0 -4px; font-size: .9rem; line-height: 1.5; color: var(--muted); }

/* Fortschritt: Serie nur hervorheben, wenn es eine gibt */
.stat.hot { background: var(--tintWarm); border-color: color-mix(in srgb, var(--orange) 30%, var(--line)); }
.stat.hot dt, .stat.hot dd { color: var(--warmInk); }

/* Profil-Kopf */
.profile-head { gap: 16px; }
.avatar {
  flex: none; width: 60px; height: 60px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 700; color: var(--bg); background: var(--accent);
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 70%, var(--surface)), var(--accent));
  box-shadow: 0 6px 18px -8px var(--accent);
}
.iconbtn.bordered { margin: 0; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }

/* Navigation: leicht durchscheinend, aktiver Tab in Akzentfarbe */
.tabbar {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(16px); backdrop-filter: saturate(1.4) blur(16px);
}
.tab svg { transition: transform var(--m-fast) var(--ease), color var(--m-fast); }
.tab[aria-current="page"] svg { color: var(--accent); transform: translateY(-1px); }

/* Sanfte Übergänge und Tipp-Feedback */
.btn, .chip, .mode, .card, .row, .tab, .opt, .iconbtn, .group > .item, .seg button, .stepper button, .swatch, .tile, .search {
  transition: transform var(--m-instant) var(--ease), background-color var(--m-fast), border-color var(--m-fast), box-shadow var(--m-fast) var(--ease), color var(--m-fast), opacity var(--m-fast);
}
.switch span, .switch span::after { transition-timing-function: var(--m-spring); transition-duration: var(--m-fast); }
.btn:active:not(:disabled), .chip:active, .mode:active, .opt:active:not(:disabled), .iconbtn:active, .stepper button:active { transform: scale(var(--m-press)); }
a.card:active, .row:active { transform: scale(.985); }
@media (hover: hover) {
  a.card:hover, .mode:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
  .row:hover .tile { transform: scale(1.06); }
  .btn:hover:not(:disabled) { box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--ink) 55%, transparent); }
  .chip:hover:not([aria-pressed="true"]) { border-color: var(--muted); }
  .group > a.item:hover { color: var(--accent); }
}

/* Seitenwechsel: siehe „tkRise“ weiter unten (eine einzige Einstiegsanimation) */

/* ---------- Atlas ---------- */
:root { --c-atlas: #8A5A1F; --lv1: var(--accent); --lv2: #C2562A; --lv3: #1C7C8C; }
[data-theme="dark"] { --c-atlas: #E3B26C; --lv2: #F0936A; --lv3: #6FC7D3; }
.t-atlas { --c: var(--c-atlas); }

.aflag { flex: none; width: 40px; height: 30px; border-radius: 5px; object-fit: cover; box-shadow: 0 0 0 1px var(--line); background: var(--seg); }
.aflag.xs { width: 22px; height: 16px; border-radius: 3px; }
.aflag.lg { width: 132px; height: 99px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }
.aflag.quiz { width: min(240px, 70vw); height: auto; aspect-ratio: 4 / 3; border-radius: 8px; }
/* Flagge aufdecken: Flagge im eigenen Seitenverhältnis, damit die Aufdeck-Felder genau die Flagge abdecken */
.aflag.reveal-flag { display: block; width: min(260px, 72vw); height: auto; aspect-ratio: auto; object-fit: contain; border-radius: 6px; }
.aflag.none { display: inline-flex; align-items: center; justify-content: center; color: var(--muted); border: 1px dashed var(--line2); box-shadow: none; background: transparent; }

.lvl-badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-family: 'DM Mono', ui-monospace, monospace; font-size: .7rem; font-weight: 500; letter-spacing: .04em; vertical-align: middle;
  color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.lvl-badge.l2 { color: var(--lv2); background: color-mix(in srgb, var(--lv2) 13%, var(--surface)); }
.lvl-badge.l3 { color: var(--lv3); background: color-mix(in srgb, var(--lv3) 13%, var(--surface)); }
.lvl-badge.plain { color: var(--muted); background: var(--seg); }

.atiles .atile { text-align: left; cursor: pointer; font: inherit; color: inherit; border-top: 3px solid var(--lv1); }
.atiles .atile.l2 { border-top-color: var(--lv2); } .atiles .atile.l3 { border-top-color: var(--lv3); }
.atiles .atile .sub { font-size: .72rem; color: var(--muted); }
.atiles .atile dt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atiles .atile[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: var(--accent); }
.atiles .atile.l2[aria-pressed="true"] { background: color-mix(in srgb, var(--lv2) 9%, var(--surface)); border-color: var(--lv2); }
.atiles .atile.l3[aria-pressed="true"] { background: color-mix(in srgb, var(--lv3) 9%, var(--surface)); border-color: var(--lv3); }
.alead { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px 12px; margin-top: -8px; }
.alead p { flex: 1 1 240px; min-width: 0; font-size: .9rem; line-height: 1.5; }
.alead .chip { flex: none; min-height: 36px; }
/* Farbpunkt je Kategorie – dieselbe Farbe wie Kachelrand, Abzeichen und Kartenlegende */
.lvdot { display: inline-block; width: 8px; height: 8px; margin-right: 6px; border-radius: 999px; vertical-align: 1px; background: var(--lv1); }
.atile.l2 .lvdot { background: var(--lv2); } .atile.l3 .lvdot { background: var(--lv3); }
@media (max-width: 420px) { .lvdot { display: none; } }   /* schmal: farbiger Kachelrand genügt, Name bleibt lesbar */
.flabel { margin: 0 0 -4px; font-size: .75rem; color: var(--muted); }
.screen > .flabel { margin-bottom: -16px; }   /* Beschriftung rückt an das Bedienelement darunter */
/* Quizliste: Gruppen nach Bereich */
#qlist { display: flex; flex-direction: column; gap: 22px; }
.qgroup { display: flex; flex-direction: column; gap: 2px; }
.qgroup .qn { font-size: .8rem; font-weight: 400; }
.qcount { font-size: .8rem; margin-bottom: -16px; }
.row > svg:last-child { flex: none; color: var(--muted); }
.acount .linkbtn { min-height: 32px; font-size: .85rem; }
.afilters { display: flex; gap: 8px; align-items: flex-end; }
.selwrap { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: .75rem; color: var(--muted); }
.select { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem; }
.acount { font-size: .8rem; margin-bottom: 4px; min-height: 32px; }
.arow { min-height: 62px; }
.amarks { display: flex; gap: 3px; flex: none; }
.mk { display: inline-flex; width: 20px; height: 20px; border-radius: 999px; align-items: center; justify-content: center; font-style: normal; }
.mk.v { background: color-mix(in srgb, var(--c-list) 18%, var(--surface)); color: var(--c-list); }
.mk.f { background: color-mix(in srgb, var(--c-flags) 18%, var(--surface)); color: var(--c-flags); }
.mk.l { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }

/* Karte */
.atlasmap { height: auto; aspect-ratio: 2 / 1; min-height: 220px; }
.mapbox .a-l1 { fill: var(--land); stroke: var(--muted); stroke-width: .5px; vector-effect: non-scaling-stroke; }
.mapbox .a-l2 { fill: color-mix(in srgb, var(--lv2) 55%, var(--land)); stroke: var(--lv2); stroke-width: .8px; vector-effect: non-scaling-stroke; }
.mapbox .a-l3 { fill: color-mix(in srgb, var(--lv3) 45%, var(--land)); stroke: var(--lv3); stroke-width: .6px; vector-effect: non-scaling-stroke; }
.mapbox .a-dim { opacity: .3; }
.mapbox .a-ctx { fill: var(--land); stroke: var(--line2); stroke-width: .5px; vector-effect: non-scaling-stroke; }
.mapbox .a-sel { fill: var(--orange) !important; stroke: var(--ink); stroke-width: 1.2px; vector-effect: non-scaling-stroke; opacity: 1; }
.mapbox [class^="a-"] { cursor: pointer; transition: fill var(--m-fast), opacity var(--m-fast); }
:root { --cc0: #D9A441; --cc1: #C9634B; --cc2: #5B7DB8; --cc3: #6A9E5B; --cc4: #4FA39A; --cc5: #8E6BB5; }
[data-theme="dark"] { --cc0: #C99A43; --cc1: #C46E57; --cc2: #6F8FC7; --cc3: #7BAE6C; --cc4: #5DB3A9; --cc5: #A083C6; }
.mapbox .a-c0, .legend .a-c0 { fill: var(--cc0); background: var(--cc0); } .mapbox .a-c1, .legend .a-c1 { fill: var(--cc1); background: var(--cc1); }
.mapbox .a-c2, .legend .a-c2 { fill: var(--cc2); background: var(--cc2); } .mapbox .a-c3, .legend .a-c3 { fill: var(--cc3); background: var(--cc3); }
.mapbox .a-c4, .legend .a-c4 { fill: var(--cc4); background: var(--cc4); } .mapbox .a-c5, .legend .a-c5 { fill: var(--cc5); background: var(--cc5); }
.mapbox [class^="a-c"] { stroke: var(--surface); stroke-width: .5px; vector-effect: non-scaling-stroke; }
.mapbox .a-learned, .legend .a-learned { fill: var(--accent); background: var(--accent); }
.mapbox .a-visited, .legend .a-visited { fill: var(--c-list); background: var(--c-list); }
.mapbox .a-fav, .legend .a-fav { fill: var(--c-flags); background: var(--c-flags); }
.mapbox .a-seen, .legend .a-seen { fill: color-mix(in srgb, var(--accent) 30%, var(--land)); background: color-mix(in srgb, var(--accent) 30%, var(--land)); }
.mapbox .a-none, .legend .a-none { fill: var(--land); background: var(--land); }
.mapbox .a-learned, .mapbox .a-visited, .mapbox .a-fav, .mapbox .a-seen, .mapbox .a-none { stroke: var(--muted); stroke-width: .5px; vector-effect: non-scaling-stroke; }
.legend .a-l1 { background: var(--land); box-shadow: inset 0 0 0 1px var(--muted); }
.legend .a-l2 { background: color-mix(in srgb, var(--lv2) 55%, var(--land)); box-shadow: inset 0 0 0 1px var(--lv2); }
.legend .a-l3 { background: color-mix(in srgb, var(--lv3) 45%, var(--land)); box-shadow: inset 0 0 0 1px var(--lv3); }
.legend .a-none { box-shadow: inset 0 0 0 1px var(--muted); }
.apick { padding: 12px 14px; gap: 12px; text-decoration: none; color: var(--ink); align-items: center; }
.apick .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.aminimap { height: 200px; min-height: 0; }
.aminimap.aq { height: 230px; }

/* Detailseite */
.ahero { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; border-top: 4px solid var(--lv1); }
.ahero.l2 { border-top-color: var(--lv2); } .ahero.l3 { border-top-color: var(--lv3); }
.ahero .h1 { overflow-wrap: anywhere; }
.astatus p { margin-top: 4px; font-size: .9rem; }
.tgls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tgl { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 64px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; box-shadow: var(--shadow); transition: transform var(--m-fast) var(--ease), background-color var(--m-fast), color var(--m-fast), border-color var(--m-fast); }
.tgl:active { transform: scale(.96); }
.tgl[aria-pressed="true"][data-k="visited"] { color: var(--c-list); border-color: var(--c-list); background: color-mix(in srgb, var(--c-list) 10%, var(--surface)); }
.tgl[aria-pressed="true"][data-k="fav"] { color: var(--c-flags); border-color: var(--c-flags); background: color-mix(in srgb, var(--c-flags) 10%, var(--surface)); }
.tgl[aria-pressed="true"][data-k="learned"] { color: var(--accent); border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.afacts { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.afacts dl { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.fact { min-width: 0; }
.fact dt { font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.fact dt .hint { font-family: 'DM Mono', ui-monospace, monospace; font-size: .65rem; padding: 1px 6px; border-radius: 999px; background: var(--seg); white-space: nowrap; }
.fact dd { margin: 0; font-weight: 600; font-size: .95rem; line-height: 1.35; overflow-wrap: anywhere; }
.fact dd b { font-family: 'DM Mono', ui-monospace, monospace; font-weight: 500; }
.fact dd .sub { display: block; margin-top: 2px; font-size: .78rem; font-weight: 400; color: var(--muted); }
.na { color: var(--muted); font-weight: 400; font-style: italic; }
.nbchips { display: flex; flex-wrap: wrap; gap: 8px; }
.nbchip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 12px 0 8px; border-radius: 999px; border: 1px solid var(--line2); text-decoration: none; color: var(--ink); font-size: .875rem; font-weight: 500; transition: border-color var(--m-fast), transform var(--m-fast) var(--ease); }
.nbchip:active { transform: scale(.96); }
@media (hover: hover) { .nbchip:hover { border-color: var(--accent); } }
.asrc { font-size: .75rem; color: var(--muted); line-height: 1.5; }
.asrc a { color: inherit; }
.aqhead { display: flex; align-items: center; gap: 12px; font-size: 1.1rem; }
.opts.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 380px) { .afacts dl { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .tab { font-size: 11px; } }

/* ---------- 3D-Globus ---------- */
.screen.globe { max-width: none; padding: 0; gap: 0; }
.gwrap {
  position: relative; overflow: hidden; color: #F2EFE8;
  height: calc(100vh - 77px - env(safe-area-inset-bottom)); height: calc(100dvh - 77px - env(safe-area-inset-bottom));
  /* Sternfeld aus Blender/Python (backend/globe/build-globe-assets.py), darunter der bisherige Verlauf als Rückfall */
  background: url("../vendor/globe/stars.webp") center / cover no-repeat, radial-gradient(ellipse at 50% 40%, #16233a 0%, #0b1220 45%, #05070d 100%);
}
.gwrap::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .25;
  background-image: radial-gradient(1px 1px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 72% 12%, #fff, transparent), radial-gradient(1px 1px at 38% 78%, #fff, transparent),
    radial-gradient(1px 1px at 88% 64%, #fff, transparent), radial-gradient(1.5px 1.5px at 22% 52%, #cfe0ff, transparent), radial-gradient(1px 1px at 58% 34%, #fff, transparent),
    radial-gradient(1px 1px at 8% 88%, #fff, transparent), radial-gradient(1.5px 1.5px at 94% 28%, #ffe9cf, transparent), radial-gradient(1px 1px at 48% 8%, #fff, transparent); }
.gstage { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.gstage:active { cursor: grabbing; }
.gload { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 32px; text-align: center; color: #A9B4C6; margin: 0; line-height: 1.5; }
.gtop { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; gap: 8px; align-items: flex-start; z-index: 3; }
.gbtn { margin: 0; flex: none; width: 44px; height: 44px; color: #F2EFE8; background: rgba(20, 28, 44, .62); border: 1px solid rgba(255, 255, 255, .14);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.gsearchbox { position: relative; flex: 1; min-width: 0; max-width: 420px; }
.gsearch { min-height: 44px; background: rgba(20, 28, 44, .62); border-color: rgba(255, 255, 255, .14); color: #A9B4C6; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.gsearch input { color: #F2EFE8; }
.gsearch input::placeholder { color: #A9B4C6; }
.gresults { position: absolute; top: calc(100% + 6px); left: 0; right: 0; display: flex; flex-direction: column; border-radius: 14px; overflow: hidden;
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
.gresults:empty { display: none; }
.gres { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.gres:last-child { border-bottom: 0; }
.gres span:first-of-type { flex: 1; }
@media (hover: hover) { .gres:hover { background: var(--seg); } }
.glegend { position: absolute; left: 12px; bottom: 12px; z-index: 2; display: flex; gap: 12px; padding: 6px 12px; border-radius: 999px; font-size: .72rem; color: #CBD3E1;
  background: rgba(20, 28, 44, .55); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity var(--m-slow); }
.glegend span { display: inline-flex; align-items: center; gap: 6px; }
.glegend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid rgba(255, 255, 255, .6); }
.glegend .l1 { background: rgba(255, 255, 255, .15); } .glegend .l2 { background: rgba(240, 147, 106, .7); border-color: #F0936A; } .glegend .l3 { background: rgba(111, 199, 211, .6); }
.gwrap.has-panel .glegend, .gwrap.has-panel .gcredit { opacity: 0; pointer-events: none; }
.gcredit { position: absolute; right: 12px; bottom: 14px; z-index: 2; margin: 0; font-size: .65rem; color: rgba(203, 211, 225, .6); transition: opacity var(--m-slow); }
@media (max-width: 520px) { .gcredit { bottom: 48px; } }
.gpanel {
  position: absolute; z-index: 4; left: 0; right: 0; bottom: 0; max-height: 50%; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 14px; padding: 18px 18px 22px; border-radius: 22px 22px 0 0;
  background: var(--surface); color: var(--ink); box-shadow: 0 -10px 40px rgba(0, 0, 0, .35); animation: gpanel .38s var(--ease);
}
.gpanel[hidden] { display: none; }
@keyframes gpanel { from { transform: translateY(24px); opacity: 0; } }
.gpanel-head { display: flex; gap: 14px; align-items: center; }
.gpanel-head .stack { flex: 1; }
.gclose { margin: 0 -6px 0 0; align-self: flex-start; }
.gtitle { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; overflow-wrap: anywhere; }
.aflag.gflag { width: 72px; height: 54px; border-radius: 8px; }
.gsmall { font-size: .85rem; line-height: 1.45; }
.gnote { padding: 10px 12px; border-radius: 12px; background: var(--tintWarm); color: var(--warmInk); font-size: .85rem; line-height: 1.45; }
.gfacts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.gsec { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.ggroup { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.gchips { display: flex; flex-wrap: wrap; gap: 6px; }
.gchip { min-height: 34px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; color: var(--ink); font: inherit; font-size: .82rem; font-weight: 500; cursor: pointer;
  transition: border-color var(--m-fast), background-color var(--m-fast), transform var(--m-fast) var(--ease); }
.gchip:active { transform: scale(.96); }
.gchip[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #fff; }
@media (hover: hover) { .gchip:hover { border-color: var(--accent); } }
.gmore { align-self: flex-start; }
.gtip { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border-radius: 10px; background: rgba(15, 20, 32, .88); color: #F2EFE8; font-family: 'DM Sans', system-ui, sans-serif; font-size: 13px; }
.gtip span { font-size: 11px; color: #A9B4C6; }
@media (min-width: 900px) {
  .gwrap { height: 100vh; }
  .gpanel { left: auto; top: 72px; right: 16px; bottom: 16px; width: 380px; max-height: none; border-radius: 22px; box-shadow: var(--shadow-lg); }
  .gwrap.has-panel .glegend { opacity: 1; pointer-events: auto; }
}

/* ---------- Toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 104px; z-index: 50; max-width: calc(100% - 32px);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  padding: 12px 16px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: .9rem; transition: var(--m-fast);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Desktop: keine untere Leiste – Hinweis mittig über dem Inhalt, nicht über der Seitenleiste */
@media (min-width: 900px) { #toast { bottom: 32px; } .shell.has-nav ~ #toast { left: calc(50% + 120px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---- Sprachen (Phase 1) ---- */
.langs { display: flex; flex-wrap: wrap; gap: 8px; }
.langs .chip { min-height: 44px; padding: 0 16px; }
.natlist { display: flex; flex-direction: column; gap: 6px; }
.nat { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.nat-n { font-weight: 600; font-size: 1rem; unicode-bidi: isolate; }
.nat-r { color: var(--muted); font-style: italic; font-size: .875rem; }
.nat-l { color: var(--muted); font-size: .75rem; letter-spacing: .02em; }
.nat-l::before { content: "· "; }
/* ---- Schwierigkeitsgrade (Phase 2) ---- */
.lvcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
@media (min-width: 640px) { .lvcards { grid-template-columns: 1fr 1fr; } }
.lvcard { position: relative; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); transition: border-color var(--m-fast), transform var(--m-fast) var(--ease), box-shadow var(--m-fast) var(--ease); }
@media (hover: hover) { .lvcard:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); } }
.lvcard:active { transform: scale(.99); }
.lvlink { display: flex; flex-direction: column; gap: 8px; padding: 16px; color: var(--ink); text-decoration: none; min-height: 100%; }
.lvtop { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.lvname { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.lvcount { font-family: 'DM Mono', ui-monospace, monospace; font-size: .8rem; color: var(--muted); }
.lvdesc { font-size: .9rem; line-height: 1.45; color: var(--muted); }
.lvfoot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 2px; }
.lvdots { display: inline-flex; gap: 3px; }
.lvdots i { width: 14px; height: 6px; border-radius: 999px; background: var(--line); }
.lvdots i.on { background: var(--accent); }
.lv-expert .lvdots i.on { background: var(--orange); }
.lvtag { font-size: .75rem; padding: 2px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.lvtag.muted { color: var(--muted); }
.lvbest { margin-left: auto; font-size: .8rem; font-weight: 600; color: var(--accent); }
.lvtimer { position: absolute; right: 10px; bottom: 6px; display: flex; align-items: center; gap: 4px; font-size: .8rem; color: var(--muted); }
.lv-expert .lvlink { padding-bottom: 54px; }
.qtimer { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.qtimer span { display: block; height: 100%; width: 100%; background: var(--orange); transition: width .1s linear; }
.aqhint { font-size: .85rem; color: var(--muted); margin-top: -6px; }

/* ---- Länderumrisse ---- */
.olbox { height: min(42vh, 340px); min-height: 220px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; padding: 18px; }
.olbox svg { width: 100%; height: 100%; }
.olbox path { fill: var(--ink); transition: fill var(--m-fast); }
.olbox.hit path { fill: var(--accent); }
.msg.ok { color: var(--accent); font-weight: 600; }
.msg.no { color: var(--orange); }
.olscroll { overflow: auto; max-height: 62vh; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overscroll-behavior: contain; touch-action: pan-x pan-y; }
.olgrid { --olt: 88px; --olc: 14; display: grid; grid-template-columns: repeat(var(--olc), var(--olt)); gap: 6px; padding: 10px; width: max-content; }
.oltile { width: var(--olt); height: calc(var(--olt) * 1.18); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); cursor: pointer; font: inherit; }
@media (hover: hover) { .oltile:hover:not(:disabled) { border-color: var(--accent); } }
.oltile.cur { border-color: var(--ink); box-shadow: 0 0 0 2px var(--accent); }
.oltile.got { cursor: default; background: color-mix(in srgb, var(--accent) 12%, var(--bg)); border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.olshape { flex: 1; width: 100%; min-height: 0; display: flex; align-items: center; justify-content: center; }
.olshape svg { width: 100%; height: 100%; }
.olshape path { fill: var(--muted); }
.oltile.got .olshape path { fill: var(--accent); }
.olname { font-size: calc(var(--olt) * .12); line-height: 1.15; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: 'DM Mono', ui-monospace, monospace; }
.oltile.got .olname { color: var(--ink); font-family: inherit; font-weight: 600; }
.olnone { color: var(--muted); font-size: 1.2rem; }
.btn.outline.danger { border-color: var(--orange); color: var(--orange); }
#olplay[hidden], #olall[hidden] { display: none !important; }

/* ---- Eingabevorschläge (js/suggest.js) ---- */
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 30; list-style: none; margin: 0; padding: 6px; max-height: min(48vh, 340px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.28); }
.sugg li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.sugg li:hover, .sugg li[aria-selected="true"] { background: var(--bg); }
.sugg .aflag { width: 26px; height: auto; border-radius: 3px; flex: none; }
.sg-n { display: flex; flex-direction: column; min-width: 0; flex: 1; font-weight: 500; }
.sg-via { font-size: .78rem; font-weight: 400; color: var(--muted); }
.gres .sg-n { text-align: left; }

/* ---- Vollständigkeitscheck ---- */
.cklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.cklist li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cklist li .grow { display: flex; flex-direction: column; gap: 2px; }
.cklist .sub { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.ckicon { flex: none; width: 22px; height: 22px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-size: .8rem; font-weight: 700; }
.cklist li.ok .ckicon { background: var(--accent); color: var(--bg); }
.cklist li.bad { border-color: var(--orange); }
.cklist li.bad .ckicon { background: var(--orange); color: var(--bg); }
.cktable { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.cktable table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cktable th, .cktable td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.cktable th:first-child, .cktable td:first-child { text-align: left; }
.ck-ok { color: var(--accent); font-weight: 700; }
.ck-bad { color: var(--orange); font-weight: 700; }
/* ---- Land erraten auf dem Globus (js/landraten.js) ---- */
.screen.glplay { max-width: 1180px; }
.glwrap { display: grid; gap: 16px; }
.glstage { position: relative; height: min(52vh, 460px); min-height: 300px; border-radius: 22px; overflow: hidden; background: url("../vendor/globe/stars.webp") center / cover no-repeat, radial-gradient(ellipse at 50% 45%, #1a2a44 0%, #0b1220 70%); border: 1px solid var(--line); touch-action: none; }
.glstage .gload { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #cfd8e6; font-size: .9rem; padding: 20px; text-align: center; }
@media (min-width: 960px) {
  .glwrap { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); align-items: start; }
  .glstage { height: calc(100vh - 140px); max-height: 760px; position: sticky; top: 16px; }
}
.glscale { display: flex; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); }
.glscale i { flex: 1; height: 8px; border-radius: 999px; background: linear-gradient(90deg, rgb(252,244,230), rgb(246,196,128), rgb(240,145,72), rgb(221,92,38), rgb(143,29,20)); border: 1px solid var(--line); }
.gllist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.glrow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 500; }
.glrow i { width: 14px; height: 14px; border-radius: 4px; flex: none; border: 1px solid rgba(0,0,0,.15); }
.glrow.hit { border-color: var(--hit); }
.glkm { font-family: 'DM Mono', ui-monospace, monospace; font-size: .85rem; color: var(--muted); }
.gldir { color: var(--muted); flex: none; }
/* ---- Welt- und Kontinentkarte (js/worldmap.js) ---- */
.mapbox.wmbox { aspect-ratio: auto; height: min(62vh, 620px); min-height: 300px; }
.wm { position: relative; width: 100%; height: 100%; }
.wmsvg { display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.wmsea { fill: var(--sea); }
.wmbox path { stroke-linejoin: round; transition: fill var(--m-instant), opacity var(--m-instant); }
.wmbox .wm-out { fill: var(--landctx); stroke: var(--line2); stroke-width: .5px; vector-effect: non-scaling-stroke; opacity: .55; pointer-events: none; }
.wmbox path[data-id] { stroke: var(--muted); stroke-width: .6px; vector-effect: non-scaling-stroke; }
.wmbox path { transition: fill var(--m-fast) var(--m-ease-out), stroke var(--m-fast) var(--m-ease-out), opacity var(--m-instant); }
/* Hover/Antippen: dezent – Fläche leicht in Akzentfarbe getönt, klare Umrandung, keine harte Signalfarbe */
.wmbox path.wm-hov { fill: color-mix(in srgb, var(--accent) 38%, var(--land)) !important; stroke: var(--accent); stroke-width: 1.5px; opacity: 1 !important; }
.wmbox circle.wm-dot[data-id] { stroke: var(--ink); stroke-width: .9px; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill var(--m-fast) var(--m-ease-out); }
.wmbox circle.wm-dot[data-id].a-dim { opacity: .35; }
.wmbox circle.wm-dot.wm-hov { fill: var(--accent) !important; stroke: var(--surface); stroke-width: 1.4px; opacity: 1; }
.wmtip.in { animation: m-fade-in var(--m-fast) var(--m-ease-out) both; }
.wmtip { position: absolute; z-index: 3; pointer-events: none; display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: .85rem; box-shadow: 0 6px 18px rgba(0,0,0,.3); white-space: nowrap; }
.wmtip .aflag { width: 22px; border-radius: 2px; }
.wmtip span { font-size: .7rem; opacity: .75; }
.wmctl { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; gap: 6px; }
.wmctl .iconbtn { background: var(--surface); width: 40px; height: 40px; font-size: 1.1rem; }
.mapbox.wmbox { max-height: 72vh; }

/* ---- Spielmodus und Anzahl ---- */
.modecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.modecard { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; font: inherit; transition: border-color var(--m-fast), background-color var(--m-fast), transform var(--m-fast) var(--ease); }
.modecard:active { transform: scale(.97); }
@media (hover: hover) { .modecard:hover { border-color: var(--accent); } }
.modecard[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); box-shadow: inset 0 0 0 1px var(--accent); }
.mc-ic { color: var(--accent); display: inline-flex; }
.mc-t { font-weight: 700; font-size: .95rem; }
.mc-d { font-size: .8rem; line-height: 1.35; color: var(--muted); }
.ncustom { flex: none; }
.ncustom .input { width: 96px; min-height: 40px; padding: 0 12px; border-radius: 999px; }
.flagopts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flagopt { padding: 10px; min-height: 0; display: flex; align-items: center; justify-content: center; }
.flagopt img { width: 100%; max-height: 110px; object-fit: contain; border-radius: 6px; box-shadow: 0 0 0 1px var(--line); }
.input.ok { border-color: var(--accent); }
.input.no { border-color: var(--orange); }
/* ---- Globus: Überarbeitung (Runde 2) ---- */
.gsearchbox { max-width: 560px; }
.gresults { max-height: min(56vh, 460px); overflow-y: auto; overscroll-behavior: contain; }
.gres { min-height: 50px; }
.gres .aflag.xs { width: 26px; border-radius: 3px; flex: none; }
.glegend { font-size: .8rem; gap: 14px; padding: 8px 14px; }
.glegend i { width: 12px; height: 12px; }
.gpanel { gap: 16px; padding: 22px 20px 26px; max-height: 58%; scrollbar-width: thin; }
.gpanel::before { content: ''; align-self: center; width: 40px; height: 4px; border-radius: 999px; background: var(--line2); margin: -10px 0 -4px; flex: none; }
.gpanel-head { align-items: flex-start; }
.gtitle { font-size: 1.6rem; }
.gfacts { gap: 14px 18px; }
.gfacts .fact dt { font-size: .75rem; letter-spacing: .02em; color: var(--muted); }
.gfacts .fact dd { font-size: .98rem; font-weight: 600; overflow-wrap: anywhere; }
.gdet { padding-top: 0; }
.gdet > summary { list-style: none; display: flex; flex-direction: column; gap: 2px; padding: 12px 0 4px; cursor: pointer; position: relative; }
.gdet > summary::-webkit-details-marker { display: none; }
.gdet > summary::after { content: ''; position: absolute; right: 4px; top: 18px; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform var(--m-fast); }
.gdet[open] > summary::after { transform: rotate(-135deg); top: 22px; }
.gdet-hint { font-size: .8rem; color: var(--muted); }
.gdet #gadm { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.gmore { align-self: stretch; justify-content: center; }
@media (min-width: 900px) {
  .gpanel { top: 76px; right: 18px; bottom: 18px; width: 400px; max-height: none; padding: 22px 22px 26px; }
  .gpanel::before { display: none; }
  .gwrap.has-panel .gcredit { opacity: 0; }
  .gwrap.has-panel .gtop { right: 436px; }
}
@media (max-width: 899px) {
  .gwrap.has-panel .glegend { opacity: 0; }
}

/* ---- Funfact-Karte ---- */
.funfact { display: flex; gap: 12px; padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--ink); }
.ffic { flex: none; width: 36px; height: 36px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--bg); }
.funfact .label { color: var(--accent); }
.fftext { font-size: .95rem; line-height: 1.5; }
.ffsrc { font-size: .75rem; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
/* ---- Avatare (js/avatar.js) ---- */
.avatar-svg { display: block; border-radius: 999px; flex: none; }
.avatar-link { position: relative; flex: none; display: inline-flex; border-radius: 999px; text-decoration: none; }
.avatar-link .avatar-svg, .avatar-link .avatar { box-shadow: 0 0 0 3px var(--surface), 0 0 0 4px var(--line); }
.avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 24px; height: 24px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--bg); box-shadow: 0 0 0 2px var(--bg); }
.avmini { flex: none; display: inline-flex; border-radius: 999px; overflow: hidden; }
.avletter { align-items: center; justify-content: center; background: var(--seg); color: var(--ink); font-weight: 700; font-size: .85rem; }
.avedit { display: grid; gap: 18px; }
@media (min-width: 720px) { .avedit { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } }
.avprev { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); position: sticky; top: 12px; }
.avopts { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.avopt { display: flex; align-items: center; justify-content: center; padding: 6px; border-radius: 16px; border: 2px solid transparent; background: var(--surface); cursor: pointer; transition: border-color var(--m-instant), transform var(--m-instant); }
@media (hover: hover) { .avopt:hover { border-color: var(--line2); } }
.avopt[aria-pressed="true"] { border-color: var(--accent); }
.avopt:active { transform: scale(.96); }
.avopt.col { aspect-ratio: 1; }
.avsw { width: 100%; height: 100%; min-height: 48px; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.avedit > * { min-width: 0; }
.avprev .avatar-svg { width: 168px; height: 168px; }

/* ---- Heute: Weltreise, Fakt des Tages, Bewegung (Design-Runde nach Krillion-Analyse) ---- */
.trip { display: flex; flex-direction: column; gap: 14px; padding: 18px; text-decoration: none; color: var(--ink); }
.tbig { font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.tsub { font-size: .75rem; }
.troute { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; }
.troute::before, .troute::after { content: ''; position: absolute; left: 8%; right: 8%; top: 13px; height: 4px; border-radius: 999px; background: var(--line); }
.troute::after { right: auto; width: calc(84% * var(--done) / 100); background: linear-gradient(90deg, var(--accent), var(--orange)); transition: width var(--m-reward) var(--ease); }
.tstop { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; min-width: 0; }
.tdot { width: 30px; height: 30px; border-radius: 999px; background: conic-gradient(var(--accent) var(--p), var(--seg) 0); box-shadow: 0 0 0 4px var(--surface); position: relative; }
.tdot::after { content: ''; position: absolute; inset: 7px; border-radius: 999px; background: var(--surface); }
.tstop.full .tdot::after { background: var(--accent); }
.tname { font-size: .7rem; font-weight: 600; line-height: 1.15; -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; /* nie mitten im Wort trennen; weiche Trennstellen kommen aus app.js */ }
@media (max-width: 420px) { .tname { font-size: .64rem; letter-spacing: -.01em; } }
.tnum { font-family: 'DM Mono', ui-monospace, monospace; font-size: .65rem; color: var(--muted); }
.factday { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; text-decoration: none; color: var(--ink); background: linear-gradient(135deg, color-mix(in srgb, var(--orange) 14%, var(--surface)), var(--surface)); border-color: color-mix(in srgb, var(--orange) 30%, var(--line)); }
.factday .label { color: var(--orange); }
.factday .aflag.xs { width: 30px; border-radius: 3px; }
.factday strong { font-size: 1.05rem; }
/* Weiterspielen / Empfehlung: Quizkarte mit Hauptaktion */
.qcard { display: flex; flex-direction: column; gap: 14px; padding: 16px; }
.qcard-main { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; min-width: 0; }
.qcard-main .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.qcard .btn { min-height: 48px; }
.qcard-more { margin: -2px 0 -8px; border-top: 1px solid var(--line); }
.qcard-more .row { min-height: 56px; }
.qcard-more .tile { width: 36px; height: 36px; border-radius: 10px; }
.qcard-more .tile svg { width: 18px; height: 18px; }
@media (hover: hover) { .qcard-main:hover .row-title { color: var(--accent); } }
.reco { border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.reco-why { display: flex; align-items: center; gap: 8px; margin: -2px 0 0; font-size: .85rem; font-weight: 500; color: var(--accent); }
.reco-why svg { flex: none; }
/* Lernstand: Tagesziel, Serie und Level in einer Karte */
.dayprog { display: flex; flex-direction: column; gap: 10px; padding: 16px; text-decoration: none; color: var(--ink); }
.dp-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; font-size: .85rem; }
.dp-streak { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--muted); }
.dp-streak .dot { background: var(--line2); }
.dp-streak.on { color: var(--warmInk); }
.dp-streak.on .dot { background: var(--orange); }
/* Fortschritt: Kennzahlen mit Erklärung, Länderkenntnis, Entwicklung */
.stat-sub { font-size: .68rem; line-height: 1.3; color: var(--muted); }
.stat.hot .stat-sub { color: var(--warmInk); opacity: .8; }
/* Handy: drei Kennzahlen als Zeilen, damit die Erklärung nicht in schmalen Kacheln umbricht */
@media (max-width: 520px) {
  .fstats { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .fstats .stat { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "s v"; align-items: center; column-gap: 12px; row-gap: 2px; padding: 12px 14px; }
  .fstats dt { grid-area: l; } .fstats dd { grid-area: v; } .fstats .stat-sub { grid-area: s; }
}
.sm { font-size: .85rem; line-height: 1.45; }
.tsub2 { display: block; font-size: .7rem; font-weight: 400; color: var(--muted); }
.kbig { margin: 4px 0 0; font-size: 1rem; color: var(--muted); }
.kbig strong { font-size: 1.9rem; font-weight: 500; color: var(--ink); letter-spacing: -.02em; }
.kbig span { color: var(--ink); font-weight: 600; }
.kverdict { display: flex; flex-wrap: wrap; gap: 6px; }
.kv { padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--seg); color: var(--muted); }
.kv.good { background: color-mix(in srgb, var(--c-list) 14%, var(--surface)); color: var(--c-list); }
.kv.low { background: var(--tintWarm); color: var(--warmInk); }
.ctable { display: flex; flex-direction: column; gap: 10px; }
.crow { display: grid; grid-template-columns: minmax(84px, 112px) minmax(0, 1fr) 48px 52px; align-items: center; gap: 10px; }
.crow.chead { font-size: .7rem; color: var(--muted); }
.crow.chead span:last-child { text-align: right; }
.cname { font-size: .9rem; font-weight: 500; overflow-wrap: anywhere; }
.cnum { font-size: .8rem; color: var(--muted); text-align: right; }
.acc { display: block; text-align: right; font-family: 'DM Mono', ui-monospace, monospace; font-size: .8rem; font-weight: 500; }
.acc.good { color: var(--c-list); } .acc.mid { color: var(--c-flags); } .acc.low { color: var(--warmInk); } .acc.none { color: var(--off); }
/* Einstellungen: Datenspeicherung */
.sinfo { display: flex; flex-direction: column; gap: 10px; margin: 0; }
.srow dt { font-size: .8rem; font-weight: 600; color: var(--ink); }
.srow dd { margin: 2px 0 0; font-size: .85rem; line-height: 1.5; color: var(--muted); }
/* Rangliste */
.rboard { gap: 12px; padding: 16px; }
.rlist { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.rhead { font-size: .8rem; }
.rpos { font-weight: 600; color: var(--accent); }
.rank-row .rk { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 999px; background: var(--seg); color: var(--muted); font-size: .8rem; }
.rank-row .rk.r1 { background: color-mix(in srgb, #D4A93B 28%, var(--surface)); color: #8A6A12; }
.rank-row .rk.r2 { background: color-mix(in srgb, #9AA3AE 28%, var(--surface)); color: #4F5B6B; }
.rank-row .rk.r3 { background: color-mix(in srgb, #C2562A 22%, var(--surface)); color: var(--warmInk); }
[data-theme="dark"] .rank-row .rk.r1 { color: #E8C66A; } [data-theme="dark"] .rank-row .rk.r2 { color: #C3CAD3; }
.rank-row.me { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.rank-row .sc { text-align: right; }
.scp { display: block; font-size: .7rem; color: var(--muted); }
/* Länder vergleichen */
.cmpsel { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; }
.cmpcard { padding: 8px 14px; overflow-x: auto; }
.cmptab { width: 100%; border-collapse: collapse; font-size: .9rem; table-layout: fixed; }
.cmptab th, .cmptab td { padding: 10px 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: break-word; }
@media (max-width: 520px) {
  .cmpcard { padding: 6px 10px; }
  .cmptab { font-size: .82rem; }
  .cmptab tbody th { width: 32%; font-size: .66rem; }
  .cmptab thead th a { font-size: .86rem; }
  .cmptab th, .cmptab td { padding: 9px 4px; }
}
.cmptab tr:last-child th, .cmptab tr:last-child td { border-bottom: 0; }
.cmptab tbody th { width: 30%; font-size: .78rem; font-weight: 500; color: var(--muted); }
.cmptab thead th a { display: flex; flex-direction: column; gap: 6px; color: var(--ink); text-decoration: none; font-weight: 700; }
.cmpv { display: block; font-weight: 600; }
.cmpv.hi { color: var(--accent); }
.cmpbar { display: block; height: 5px; margin-top: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.cmpbar i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
/* Tägliche Herausforderung */
.chal { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-color: color-mix(in srgb, var(--orange) 30%, var(--line)); }
.chal .label { color: var(--orange); }
.chal.done { background: color-mix(in srgb, var(--c-list) 8%, var(--surface)); border-color: color-mix(in srgb, var(--c-list) 35%, var(--line)); }
.chal.done .label { color: var(--c-list); }
.chal-t { font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em; }
.chal .btn { min-height: 46px; }
/* Häufige Fehler */
.errlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.errlist a { display: flex; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.errlist li:last-child a { border-bottom: 0; }
.errlist .grow { flex: 1; min-width: 0; font-weight: 600; }
/* Profil */
.pcard { display: flex; flex-direction: column; gap: 12px; padding: 16px; text-decoration: none; color: var(--ink); }
.pbadges { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.pbadge-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pstats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pstats dd { font-size: 1.05rem; white-space: normal; }
@media (max-width: 420px) { .pstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@keyframes tkRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.screen.enter > * { animation: tkRise var(--m-slow) var(--ease) both; }
.screen.enter > *:nth-child(2) { animation-delay: calc(var(--m-stagger) * 1); } .screen.enter > *:nth-child(3) { animation-delay: calc(var(--m-stagger) * 2); }
.screen.enter > *:nth-child(4) { animation-delay: calc(var(--m-stagger) * 3); } .screen.enter > *:nth-child(5) { animation-delay: calc(var(--m-stagger) * 4); }
.screen.enter > *:nth-child(n+6) { animation-delay: calc(var(--m-stagger) * 5); }
@media (prefers-reduced-motion: reduce) { .screen.enter > * { animation: none; } .troute::after { transition: none; } }
/* ---- Länder der Welt (js/worldtype.js) ----
   Zusammengeführt aus mehreren Überarbeitungsrunden; Ergebnis unverändert:
   offene Länder goldgelb, gefundene dunkelgrün, fehlende rot; Punkte kleiner Länder nur bei „Fehlende Länder anzeigen“. */
.screen.wtplay { max-width: 1180px; }
.wthead { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
/* Eingabe + Fortschritt: zentrale Fläche, auf schmalen Bildschirmen oben haftend (Liste/Karte scrollen darunter) */
.wtpanel { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.wtprog { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.wtcount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; margin: 0; font-family: 'DM Mono', ui-monospace, monospace; }
.wtcount strong { font-size: 1.9rem; font-weight: 500; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.wtof { color: var(--muted); font-size: 1rem; }
.wtlbl { font-family: 'DM Sans', system-ui, sans-serif; font-size: .9rem; color: var(--muted); margin-left: 4px; }
.wtpct { flex: none; font-family: 'DM Mono', ui-monospace, monospace; font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.bar.wtfill { height: 10px; }
.bar.wtfill > span { transition: width var(--m-slow) var(--m-ease-out); }
.wtinrow .wtinput { min-height: 58px; font-size: 1.2rem; font-weight: 500; border-color: var(--line2); background: var(--bg); transition: border-color var(--m-fast) var(--m-ease-out), box-shadow var(--m-fast) var(--m-ease-out); }
.wtinrow .wtinput:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); background: var(--surface); }
.wtinrow .wtgive { flex: none; min-height: 58px; }
.wtmsg { min-height: 22px; margin: -2px 0 0; }
@media (max-width: 899px) {
  .wtpanel { position: sticky; top: 0; z-index: 6; margin: 0 -8px; padding: 12px; }
  .wtcount strong { font-size: 1.6rem; }
}
@media (max-width: 420px) {
  .wtlbl { display: none; }   /* Platz sparen: „35 / 197“ + Prozent bleiben */
  .wtinrow .wtgive { padding: 0 14px; }
}
#wtclock.low { background: var(--orange); color: #fff; }
.mapbox.wtmap { max-height: 64vh; }
.wtplay, .wtmap { --wt-open: #EBC13F; --wt-got: #1D6B3F; --wt-new: #34B26A; --wt-miss: #A3201A; --wt-pin: #E0473C; }
.wtmap path { transition: fill var(--m-fast); }
.wtmap path.wt-open { fill: var(--wt-open); stroke: rgba(90,60,0,.5); stroke-width: .5px; vector-effect: non-scaling-stroke; }
.wtmap.nob path.wt-open { stroke: var(--wt-open); stroke-width: .3px; }
.wtmap path.wt-other { fill: var(--landctx); stroke: var(--line2); stroke-width: .4px; vector-effect: non-scaling-stroke; }
.wtmap path.wt-got, .wtmap circle.wm-dot.wt-got { fill: var(--wt-got); stroke: rgba(255,255,255,.55); stroke-width: .5px; vector-effect: non-scaling-stroke; fill-opacity: 1; }
.wtmap .wt-new { fill: var(--wt-new) !important; }
.wtmap path.wt-miss, .wtmap circle.wm-dot.wt-miss { fill: var(--wt-miss); stroke: rgba(255,255,255,.6); stroke-width: .6px; vector-effect: non-scaling-stroke; fill-opacity: 1; }
/* Punkte (Kreise) kleiner Länder */
.wtmap circle.wm-dot { stroke: var(--ink); stroke-width: .8px; vector-effect: non-scaling-stroke; fill-opacity: .9; }
.wtmap circle.wm-dot.wt-open, .wtmap circle.wm-dot.wt-got, .wtmap circle.wm-dot.wt-miss { display: none; }
.wtmap circle.wm-dot.keep.wt-got { display: block; }
.wtmap.show-miss circle.wm-dot.wt-miss { display: block; }
.wtmap.show-miss circle.wm-dot.wt-open { display: block; fill: var(--wt-pin); fill-opacity: 1; stroke: #fff; stroke-width: 1.2px; animation: wtPin .35s var(--ease) both; }
.wtmap circle.wm-pin { display: none; fill: var(--wt-pin); stroke: #fff; stroke-width: 1.2px; vector-effect: non-scaling-stroke; pointer-events: none; }
.wtmap.show-miss circle.wm-pin.open { display: block; animation: wtPin .35s var(--ease) both; }
@keyframes wtPin { from { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.3); } }
.wtcols { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.wtcol { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); overflow: hidden; }
.wtcol h2 { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin: 0; padding: 10px 12px; font-size: .9rem; font-weight: 700; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-bottom: 1px solid var(--line); }
.wtcol h2 span { font-family: 'DM Mono', ui-monospace, monospace; font-size: .75rem; font-weight: 500; color: var(--muted); }
.wtcol.done h2 span { color: var(--c-list); }
.wtcbar { border-radius: 0; }
/* gefundene/fehlende Länder als ruhige Chips; fehlende klar abgesetzt (Farbe + Rahmen, nicht nur Farbe) */
.wtchips { list-style: none; margin: 0; padding: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.wtchip { padding: 4px 10px; border-radius: 999px; font-size: .85rem; line-height: 1.3; background: color-mix(in srgb, var(--c-list) 12%, var(--surface)); color: var(--ink); overflow-wrap: anywhere; }
.wtchip.miss { background: transparent; color: var(--warmInk); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--orange) 70%, transparent); font-weight: 600; }
.wtchip.new { animation: m-pop var(--m-fast) var(--m-spring); background: color-mix(in srgb, var(--c-list) 30%, var(--surface)); }
.wtnone { margin: 0; padding: 12px; font-size: .85rem; color: var(--muted); }
.wtfilter { display: flex; flex-direction: column; gap: 8px; }
.wtfilter[hidden] { display: none; }
.wtmiss { margin: 0; font-weight: 700; }
@media (max-width: 420px) { .wtcols { grid-template-columns: 1fr; } }
.wtbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: -6px; }
.wtlegend { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); }
.wtlegend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-left: 6px; }
.wtlegend i:first-child { margin-left: 0; }
.wtlegend .lg-open { background: var(--wt-open, #EBC13F); box-shadow: inset 0 0 0 1px rgba(90,60,0,.35); }
.wtlegend .lg-got { background: var(--wt-got, #1D6B3F); }
.wtlegend .lg-pin { background: var(--wt-pin, #E0473C); border-radius: 999px; }
.wttog { border: 0; background: none; padding: 6px 0; min-height: 44px; font: inherit; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.wttog[aria-pressed="true"] { color: var(--orange); }
.wttog[hidden] { display: none; }
.wtclockbox { display: flex; align-items: center; gap: 6px; }
.wtcbtn { width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; font: inherit; font-size: 1.25rem; line-height: 1; transition: background-color var(--m-fast), border-color var(--m-fast), color var(--m-fast), transform var(--m-fast) var(--ease); }
.wtcbtn:active:not(:disabled) { transform: scale(.94); }
@media (hover: hover) { .wtcbtn:hover:not(:disabled) { border-color: var(--accent); } }
.wtcbtn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.wtcbtn:disabled { opacity: .4; cursor: default; }
.wtmapwrap { position: relative; }
.wtpaused { position: absolute; inset: 0; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; border-radius: 16px; background: color-mix(in srgb, var(--bg) 70%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.wtpaused[hidden] { display: none; }
.wtpaused strong { font-size: 1.4rem; letter-spacing: -.01em; }
.wtpaused .btn svg { margin-right: 6px; }
.wtmap.is-paused { filter: blur(10px); }
.wtcols.is-paused { filter: blur(6px); pointer-events: none; user-select: none; }

/* ---- Freunde herausfordern (js/challenge.js) – nur bestehende Tokens/Komponenten (.card, .rows, .kv, .seg, .btn) ---- */
.ch-count { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--orange); color: #fff; font-family: 'DM Mono', ui-monospace, monospace; font-size: .75rem; font-weight: 500; display: inline-flex; align-items: center; justify-content: center; }
.ch-count[hidden] { display: none; }
.ch-entry { padding: 14px 16px; text-decoration: none; color: var(--ink); }
.ch-cards { margin: 0; padding: 0; list-style: none; gap: 10px; }
.ch-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.ch-card.ch-new { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange), var(--shadow); }
.ch-title { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.ch-newtag { flex: none; }
.ch-meta { font-size: .8rem; }
.ch-row .ch-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ch-score { font-size: .85rem; color: var(--muted); }
.ch-row.ch-turn .row-title { color: var(--accent); }
.kv.ch-st { white-space: nowrap; }
.ch-row .grow { min-width: 0; flex: 1 1 55%; }
.ch-row .ch-end { max-width: 45%; }
.ch-row .ch-end .kv.ch-st { white-space: normal; text-align: right; line-height: 1.25; }
.kv.new { background: var(--tintWarm); color: var(--warmInk); }
.kv.turn { background: var(--tintBlue); color: var(--accent); }
.ch-pick { width: 100%; text-align: left; background: transparent; border-left: 0; border-right: 0; border-top: 0; font: inherit; color: inherit; cursor: pointer; }
.ch-radio { flex: none; width: 22px; height: 22px; border-radius: 999px; border: 2px solid var(--line2); transition: border-color var(--m-fast) var(--m-ease-out), box-shadow var(--m-fast) var(--m-ease-out); }
.ch-pick[aria-checked="true"] .ch-radio { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface), inset 0 0 0 12px var(--accent); }
.ch-pick[aria-checked="true"] .row-title { color: var(--accent); }
.ch-friends { max-height: min(46vh, 420px); overflow-y: auto; overscroll-behavior: contain; }
.ch-okmark { width: 56px; height: 56px; border-radius: 999px; background: var(--tintBlue); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.ch-okmark .m-check { width: 30px; height: 30px; }
.ch-head { font-size: 1.6rem; font-weight: 700; letter-spacing: -.01em; }
.ch-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; padding: 18px 12px; }
.ch-vsmark { align-self: center; color: var(--muted); font-size: .85rem; }
.ch-side { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; min-width: 0; padding: 10px 6px; border-radius: 14px; position: relative; }
.ch-side.win { background: var(--tintBlue); }
.ch-name { max-width: 100%; overflow-wrap: anywhere; line-height: 1.25; }
.ch-big { font-size: 2.4rem; font-weight: 500; letter-spacing: -.04em; line-height: 1; }
.ch-big small { font-size: 1rem; color: var(--muted); letter-spacing: 0; }
.ch-resbox { padding: 14px 16px; }
.ch-reslink { text-decoration: none; color: var(--ink); }
.ch-detail { padding: 16px; }
@media (max-width: 360px) {
  .ch-big { font-size: 2rem; }
  .ch-vs { padding: 14px 6px; gap: 4px; }
}
/* ---- Herausforderungen v2 (DESIGN-HERAUSFORDERUNGEN-V2.md): Statusfarben als Tokens (Farbenblind-Modus kann sie tauschen),
   jede Pille zusätzlich mit eigenem Zeichen/Rahmen, damit nichts nur über Farbe erkennbar ist ---- */
:root { --ch-wait: #8A6100; --ch-waitbg: #F6EDD5; --ch-run: #2B4C7E; }
[data-theme="dark"] { --ch-wait: #E8C26A; --ch-waitbg: #3A3120; --ch-run: #8FB0E0; }
[data-cvd] { --ch-wait: #7A5A00; }
[data-theme="dark"][data-cvd] { --ch-wait: #F0E442; }
.kv.ch-st { display: inline-flex; align-items: center; gap: 5px; border: 1.5px solid transparent; }
.kv.ch-st::before { font-size: .8em; line-height: 1; }
.kv.new::before { content: '●'; content: '●' / ''; }
.kv.turn::before { content: '▸'; content: '▸' / ''; }
.kv.run { background: var(--surface); color: var(--ch-run); border-color: var(--ch-run); }
.kv.run::before { content: '◐'; content: '◐' / ''; }
.kv.wait { background: var(--ch-waitbg); color: var(--ch-wait); border-color: var(--ch-wait); border-style: dashed; }
.kv.wait::before { content: '⧗'; content: '⧗' / ''; }
.kv.good::before { content: '✓'; content: '✓' / ''; }
.kv.ch-st.good { color: color-mix(in srgb, var(--c-list) 78%, var(--ink)); }   /* Kontrast ≥ 4,5:1 im Hellmodus */
.kv.low::before { content: '✗'; content: '✗' / ''; }
.kv.draw::before { content: '='; content: '=' / ''; }
.kv.done { background: var(--seg); color: var(--ink); }
.kv.done::before { content: '✓'; content: '✓' / ''; }
.kv.off { background: transparent; color: var(--muted); border-color: var(--line2); }   /* --muted statt --off: Kontrast ≥ 4,5:1 */
.kv.off::before { content: '–'; content: '–' / ''; }
.ch-row.ch-waitrow { box-shadow: inset 3px 0 0 var(--ch-wait); }
.ch-pending { padding: 16px; border-color: var(--ch-wait); }
.ch-pendhead { margin: 0; }
.ch-pendhead .kv { font-size: .9rem; padding: 6px 12px; }
.ch-steps { list-style: none; margin: 0; padding: 4px 4px 0; display: flex; flex-direction: column; gap: 10px; }
.ch-steps li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .92rem; }
.ch-steps li.on { color: var(--ink); }
.ch-steps li.cur { color: var(--ink); font-weight: 600; }
.ch-dot { flex: none; width: 14px; height: 14px; border-radius: 999px; border: 2px solid var(--line2); background: var(--surface); }
.ch-steps li.on .ch-dot { background: var(--accent); border-color: var(--accent); }
.ch-steps li.cur .ch-dot { border-color: var(--ch-wait); border-style: dashed; }
.ch-tablecard { padding: 6px 12px; overflow-x: auto; }
.ch-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.ch-table th, .ch-table td { padding: 10px 6px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ch-table thead th { font-size: .75rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.ch-table tbody tr:last-child th, .ch-table tbody tr:last-child td { border-bottom: 0; }
.ch-table tbody th { font-weight: 600; }
.ch-table tr.win th { color: var(--accent); }
.ch-tname { overflow-wrap: anywhere; }
/* Hinweis auf neue Herausforderung / freigeschaltetes Ergebnis – bleibt, bis geöffnet oder geschlossen */
.ch-notice {
  position: fixed; z-index: 45; left: 50%; top: calc(10px + env(safe-area-inset-top)); transform: translateX(-50%);
  width: min(560px, calc(100% - 32px)); display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px;
  background: var(--surface); color: var(--ink); border: 1.5px solid var(--orange); border-radius: 14px; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.12));
}
.ch-notice[hidden] { display: none; }
.ch-notice.is-done { border-color: var(--accent); }
.ch-ntext { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-decoration: none; color: inherit; min-height: 44px; justify-content: center; }
.ch-ntext strong { overflow-wrap: anywhere; line-height: 1.25; }
@media (min-width: 900px) { .shell.has-nav ~ .ch-notice { left: calc(50% + 120px); } }
/* Zähler am Profil-Tab */
.tab { position: relative; }
.ch-count.tabcount { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; font-size: .68rem; }
@media (min-width: 900px) { .ch-count.tabcount { position: static; margin-left: 8px; } }

/* ================= Farbenblind-Modus (Einstellungen → Darstellung → Farbsehschwäche, data-cvd am <html>) =================
   Nur informationstragende Farben werden getauscht (Karten, Diagramme, Erfolg/Fehler, Treffer); Grundpalette, Akzent und
   Flächen bleiben. Paletten nach Okabe-Ito (für alle Farbsehschwächen unterscheidbar) bzw. für Tritan ohne Blau/Gelb-Paare.
   Zusätzlich in allen drei Modi: Symbole, Muster und Umrandungen, damit nichts nur über Farbe erkennbar ist. */
[data-cvd="protan"], [data-cvd="deutan"] {
  --m-ok: #0072B2; --hit: #0072B2; --c-list: #1D5F9E;
  --t2: #E9C83A; --t4: #5E1A00;
  --cc0: #E69F00; --cc1: #D55E00; --cc2: #0072B2; --cc3: #56B4E9; --cc4: #009E73; --cc5: #CC79A7;
}
[data-theme="dark"][data-cvd="protan"], [data-theme="dark"][data-cvd="deutan"] {
  --m-ok: #56B4E9; --hit: #56B4E9; --c-list: #7DB5E6; --t2: #F0E442; --t4: #FF9A6B;
}
[data-cvd="protan"] .wtplay, [data-cvd="protan"] .wtmap, [data-cvd="deutan"] .wtplay, [data-cvd="deutan"] .wtmap {
  --wt-open: #F0E442; --wt-got: #0072B2; --wt-new: #56B4E9; --wt-miss: #D55E00; --wt-pin: #D55E00;
}
[data-cvd="tritan"] {
  --hit: #00897B; --t2: #F2A5B8; --t4: #6B0F1A;
  --cc0: #E57373; --cc1: #B71C1C; --cc2: #1565C0; --cc3: #80DEEA; --cc4: #6D4C41; --cc5: #9E9E9E;
}
[data-theme="dark"][data-cvd="tritan"] { --t2: #F7B9C8; --t4: #FF8A80; }
[data-cvd="tritan"] .wtplay, [data-cvd="tritan"] .wtmap {
  --wt-open: #F3CFD8; --wt-got: #00695C; --wt-new: #26A69A; --wt-miss: #C62828; --wt-pin: #C62828;
}

/* Richtig/Falsch: Symbol + Umrandung zusätzlich zur Farbe */
[data-cvd] .opt.right::after, [data-cvd] .opt.wrong::after {
  flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px;
  font-size: .85rem; font-weight: 700; line-height: 1;
}
[data-cvd] .opt.right::after { content: '✓'; background: var(--accent); color: var(--bg); }
[data-cvd] .opt.wrong::after { content: '✗'; background: var(--warmInk); color: var(--bg); }
[data-cvd] .opt.right { border-width: 2.5px; }
[data-cvd] .opt.wrong { border-width: 2.5px; border-style: dashed; }
[data-cvd] .tfcard.ok { border-width: 3px; }
[data-cvd] .tfcard.no { border-width: 3px; border-style: dashed; }
[data-cvd] .input.ok { border-width: 2.5px; }
[data-cvd] .input.no { border-width: 2.5px; border-style: dashed; }
[data-cvd] .feedback.no { box-shadow: inset 4px 0 0 var(--warmInk); }
/* Fortschritt: falsche Abschnitte gestreift, verpasste Punkte schraffiert */
[data-cvd] .segbar span.hot { background: repeating-linear-gradient(135deg, var(--orange) 0 3px, color-mix(in srgb, var(--orange) 35%, transparent) 3px 6px); }
[data-cvd] .dots i:not(.on) { background: repeating-linear-gradient(135deg, transparent 0 4px, color-mix(in srgb, var(--orange) 45%, transparent) 4px 6px); }
/* Karten: Fehler/fehlend mit gestrichelter, kräftiger Kontur; Treffer mit heller Kontur */
[data-cvd] .mapbox .t4, [data-cvd] .wtmap path.wt-miss, [data-cvd] .wtmap circle.wm-dot.wt-miss { stroke: var(--ink) !important; stroke-width: 1.4px !important; stroke-dasharray: 3 2; }
[data-cvd] .mapbox .t1, [data-cvd] .wtmap path.wt-got { stroke: var(--surface) !important; stroke-width: 1.1px !important; }
[data-cvd] .wtlegend .lg-pin { box-shadow: 0 0 0 1.5px var(--ink); }
/* Treffer in „Land erraten“: zusätzlich Häkchen */
[data-cvd] .glrow.hit { border-width: 2.5px; }
[data-cvd] .glrow.hit .grow::after { content: ' ✓'; font-weight: 700; color: var(--hit); }
/* Vorschau in den Einstellungen */
.cvdprev { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cvdprev .opt { min-height: 48px; cursor: default; }

/* ---- Tab-Vervollständigung (js/suggest.js) ---- */
.sugg.inline { position: static; margin: -2px 0 0; max-height: 236px; box-shadow: none; }
.sugg li.tabnext { background: color-mix(in srgb, var(--accent) 8%, transparent); }
@media (hover: hover) and (pointer: fine) {
  /* Tastatur-Hinweis nur auf Geräten mit Tastatur/Maus */
  .sugg li.tabnext::after, .sugg li[aria-selected="true"]::after {
    content: 'Tab ↹'; margin-left: auto; flex: none; padding: 2px 6px; border-radius: 6px; border: 1px solid var(--line2);
    font-family: 'DM Mono', ui-monospace, monospace; font-size: .7rem; color: var(--muted);
  }
}

/* ---- App installieren (js/install.js) – bestehende .card/.btn/.note, Motion über m-slide-in ---- */
.insticon { flex: none; width: 48px; height: 48px; border-radius: 12px; box-shadow: var(--shadow); }
.instcard { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.instbox .lead { font-size: .95rem; }
.inststeps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.inststeps li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--bg); font-size: .92rem; line-height: 1.35; }
.inststeps li svg { flex: none; color: var(--accent); }
.instios summary { list-style: none; cursor: pointer; }
.instios summary::-webkit-details-marker { display: none; }
.instios[open] summary { margin-bottom: 10px; }
.updbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(88px + env(safe-area-inset-bottom)); z-index: 90; display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; width: min(440px, calc(100% - 24px)); box-shadow: var(--shadow-lg); justify-content: space-between; }
@media (min-width: 900px) { .updbar { bottom: 24px; } }
/* Gerätetest: Bildrate des Globus (js/globe.js, measure) */
.gmeasure { position: absolute; left: 50%; transform: translateX(-50%); bottom: 64px; z-index: 5; width: min(460px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; background: rgba(15, 20, 32, .9); color: #F2EFE8; border-color: rgba(255,255,255,.14); }
.gmeasure .muted { color: #A9B4C6; }

/* ---- Neuer Einstieg (app.js V.onboarding, js/startquiz.js) ---- */
.obscreen { gap: 22px; }
.oblang { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--seg); }
.oblang button { border: 0; background: transparent; min-width: 34px; min-height: 30px; border-radius: 999px; font: inherit; font-size: .75rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); cursor: pointer; }
.oblang button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.obhero { display: flex; justify-content: center; color: var(--ink); padding: 4px 0; }
.obhero svg g { transform-origin: 60px 60px; animation: obNeedle 1.2s cubic-bezier(.3,1.6,.5,1) both; }
.obhero svg circle:nth-of-type(2) { transform-origin: 60px 60px; animation: obArc 1.4s var(--m-ease-out) both; }
@keyframes obNeedle { from { transform: rotate(-60deg); } to { transform: rotate(35deg); } }
@keyframes obArc { from { transform: rotate(-90deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .obhero svg g, .obhero svg circle:nth-of-type(2) { animation: none; } .obhero svg g { transform: rotate(35deg); } }
.obrows { display: flex; flex-direction: column; gap: 10px; }
.obrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 0 16px; border-radius: 16px; border: 1px solid var(--line2); background: var(--surface); color: var(--ink); font: inherit; font-size: 1.02rem; font-weight: 600; text-align: left; cursor: pointer; }
.obrow .grow { flex: 1; }
.obrow > svg:last-child { color: var(--muted); flex: none; }
.obic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--tintBlue); color: var(--accent); }
.obquiz { align-self: center; border: 0; background: none; padding: 8px 4px; min-height: 44px; font: inherit; font-size: .95rem; font-weight: 600; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.oblegal { margin-top: auto; text-align: center; font-size: .78rem; color: var(--muted); }
.oblegal a { color: inherit; }
.obsheet-wrap { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(10, 10, 10, .55); }
.obsheet { width: min(460px, 100%); display: flex; flex-direction: column; gap: 10px; padding: 18px; padding-bottom: calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .obsheet-wrap { align-items: center; } }
.obperks { margin: 0 0 6px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: .92rem; }
.nudgecard { border-color: var(--accent); }
.lvrec { display: inline-flex; vertical-align: middle; margin-left: 6px; padding: 2px 8px; border-radius: 999px; font-size: .68rem; font-weight: 600; letter-spacing: .02em; background: var(--tintBlue); color: var(--accent); }
.lvcard.rec { box-shadow: inset 0 0 0 2px var(--accent); }
.mqmap { max-height: 46vh; }
.mqmap .mq-t { fill: var(--orange) !important; stroke: var(--ink); stroke-width: 1.2px; }
.sqlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sqlist li { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: .92rem; }
.sqlist li.ok > span:first-child { color: var(--accent); font-weight: 700; }
.sqlist li.no > span:first-child { color: var(--warmInk); font-weight: 700; }
.journey .jrows { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.journey .jrows div { padding: 10px 12px; border-radius: 12px; background: var(--bg); display: flex; flex-direction: column; gap: 2px; }
.journey dt { font-size: .75rem; color: var(--muted); }
.journey dd { margin: 0; font-size: 1rem; font-weight: 500; }
.jtests { display: flex; gap: 6px; flex-wrap: wrap; }
.jtest { display: inline-flex; flex-direction: column; align-items: center; gap: 1px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: .72rem; color: var(--muted); }
.jtest b { font-family: 'DM Mono', ui-monospace, monospace; font-size: .95rem; color: var(--ink); font-weight: 500; }
.sqgrid { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: .9rem; }
.sqgrid th { font-weight: 600; text-align: center; color: var(--muted); font-size: .78rem; }
.sqgrid tbody th { text-align: left; color: var(--ink); font-size: .88rem; padding: 0 8px 0 0; }
.sqgrid td { text-align: center; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 0; }
.sqgrid td:first-of-type { border-left: 1px solid var(--line); border-radius: 10px 0 0 10px; }
.sqgrid td:last-child { border-right: 1px solid var(--line); border-radius: 0 10px 10px 0; }
.sqgrid .ok { color: var(--accent); font-weight: 700; }
.sqgrid .no { color: var(--warmInk); font-weight: 700; }
[data-cvd] .sqgrid .no { text-decoration: underline wavy; }

/* ---- Einstellungen: Übersicht mit Gruppen ---- */
.group > .item .ival { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: .9rem; text-align: right; min-width: 0; }
.group > .item .ival svg { flex: none; }
.group > .item.col { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 0; }
.group > .item.col .seg { width: 100%; }
.swatches.sm { gap: 4px; }
.swatches.sm .swatch { width: 36px; height: 36px; padding: 3px; }

/* ================= Tablets und iPads (DESIGN-TABLET.md) =================
   Bisher sprang das Layout erst ab 900 px auf die Seitenleiste – alle iPads im Hochformat (744–834 px) und viele
   Android-Tablets bekamen die Handy-Spalte (560 px) mit gestreckter Unterleiste. Jetzt:
   600–899 px Breite UND ≥ 600 px Höhe → schmale Navigationsleiste links (Rail), breiterer Inhalt, größere Karten.
   Querformat-Handys (geringe Höhe) behalten die Unterleiste. Ab 900 px gilt wie bisher die Desktop-Seitenleiste. */
@media (min-width: 600px) and (max-width: 899px) and (min-height: 600px) {
  .shell.has-nav { flex-direction: row; }
  .tabbar {
    position: sticky; top: 0; height: 100vh; height: 100dvh; width: 92px; flex: none; z-index: 10;
    display: flex; flex-direction: column; align-items: stretch; gap: 6px;
    padding: calc(20px + env(safe-area-inset-top)) 8px calc(16px + env(safe-area-inset-bottom)) calc(8px + env(safe-area-inset-left));
    border-top: 0; border-right: 1px solid var(--line);
  }
  .nav-brand { display: flex; justify-content: center; padding: 0 0 18px; }
  .nav-brand span { display: none; }
  .tab { flex: none; min-height: 64px; font-size: 12px; gap: 6px; padding: 6px 4px; text-align: center; }
  .tab[aria-current="page"] { background: var(--seg); }
  .ch-count.tabcount { top: 4px; left: calc(50% + 8px); }
  .screen { max-width: 720px; padding: calc(32px + env(safe-area-inset-top)) 32px 48px; }
  .screen.play { max-width: 720px; }
  .screen.plain { padding-bottom: 40px; }
  .gwrap { height: 100vh; height: 100dvh; }
  .chips.scroll { margin: 0; padding: 2px 0; }
  .modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); overflow: visible; margin: 0; padding: 0; -webkit-mask-image: none; mask-image: none; }
  .modes .mode { width: auto; }
  #toast { bottom: 32px; }
  .shell.has-nav ~ #toast, .shell.has-nav ~ .ch-notice { left: calc(50% + 46px); }
}
/* Tablets allgemein (auch Querformat): Karten und Spielflächen nutzen die Höhe; Hochformat-Spiele breiter */
@media (min-width: 600px) and (min-height: 700px) {
  .mapbox { height: min(62vh, 720px); }
  .screen.play { gap: 24px; }
}
/* Touch-Geräte (iPad, Android): keine Doppeltipp-Verzögerung, kein Zoom beim Fokus auf Eingabefelder (iOS zoomt unter 16 px),
   keine grauen Tipp-Flächen; Eingabefelder nicht vom Inhalt verdecken lassen */
@media (pointer: coarse) {
  a, button, .opt, .tab, [role="button"], summary { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
  .input { font-size: max(16px, 1.1rem); }
  .input.soft, .search input, textarea, select { font-size: max(16px, 1rem); }
  .input, .search input { scroll-margin-block: 96px; }
}
/* Startseite auf Tablets im Hochformat: zweispaltig statt einer langen Handy-Liste (Kopf, Land des Tages und Fakten über volle Breite) */
@media (min-width: 700px) and (max-width: 899px) and (min-height: 600px) {
  .screen:has(> .card.hero) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 20px; }
  .screen:has(> .card.hero) > .between, .screen:has(> .card.hero) > .card.hero, .screen:has(> .card.hero) > .card.trip, .screen:has(> .card.hero) > .hfact { grid-column: 1 / -1; }
}
/* iPad/Tablet im Querformat (≥ 900 px, Touch): Spielfläche breiter als am Computer (dort bleibt 560 px für kurze Mauswege) */
@media (min-width: 900px) and (pointer: coarse) {
  .screen.play { max-width: 760px; }
}

/* ================= Alters-Zeitstrahl beim Konto anlegen (DESIGN-ALTER.md) ================= */
.agebox { gap: 10px; }
.ageout { font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
.agebox.unset .ageout { color: var(--muted); font-weight: 600; font-size: 1.15rem; }
.agetl { position: relative; padding: 14px 0 26px; }
.agezones { position: absolute; left: 0; right: 0; top: 50%; height: 10px; margin-top: -18px; border-radius: 999px; overflow: hidden; background: var(--track); pointer-events: none; }
.agezones .z { position: absolute; top: 0; bottom: 0; }
.agezones .kid { background: color-mix(in srgb, var(--off) 45%, var(--track)); }
.agezones .teen { background: color-mix(in srgb, var(--accent) 45%, var(--track)); }
.agezones .adult { background: var(--accent); }
.agemarks { position: absolute; left: 0; right: 0; bottom: 0; height: 18px; pointer-events: none; }
.agemarks span { position: absolute; transform: translateX(-50%); font-family: 'DM Mono', ui-monospace, monospace; font-size: .72rem; color: var(--muted); }
.agemarks span:last-child { transform: translateX(-100%); }
.agemarks span::before { content: ''; position: absolute; left: 50%; top: -12px; width: 2px; height: 8px; background: var(--line2); }
.agerange { position: relative; z-index: 1; width: 100%; height: 44px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; touch-action: pan-y; }
.agerange::-webkit-slider-runnable-track { height: 10px; background: transparent; }
.agerange::-moz-range-track { height: 10px; background: transparent; }
.agerange::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; margin-top: -10px; border-radius: 999px; background: var(--surface); border: 3px solid var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.agerange::-moz-range-thumb { width: 24px; height: 24px; border-radius: 999px; background: var(--surface); border: 3px solid var(--ink); }
.agebox.unset .agerange::-webkit-slider-thumb { border-style: dashed; border-color: var(--muted); }
.agebox.unset .agerange::-moz-range-thumb { border-style: dashed; border-color: var(--muted); }
.agerange:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
.agelegend { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: var(--muted); }
.agelegend span { flex: 1; text-align: center; padding: 4px 6px; border-radius: 999px; border: 1px solid transparent; }
.agelegend span:first-child { text-align: left; } .agelegend span:last-child { text-align: right; }
.agebox[data-zone="kid"] .agelegend .kid, .agebox[data-zone="teen"] .agelegend .teen, .agebox[data-zone="adult"] .agelegend .adult { color: var(--ink); font-weight: 600; border-color: var(--line2); background: var(--surface); }
.agebox[data-zone="kid"] .agenote { color: var(--warmInk); }
/* Push: Bestätigung „16 oder Eltern einverstanden“ */
.pushconsent { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; cursor: pointer; }
.pushconsent input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--accent); }
