:root { --rinde: #23291f; --birke: #eef0e8; --blatt: #fbfcf8; --moos: #3f7d3a; --laub: #b9d45a; --stamm: #7a5a3c; --linie: #cfd4c4; --leise: #5d6654; }
  * { box-sizing: border-box; }
  html, body { margin: 0; height: 100%; overflow: hidden; background: #bfd9ea; color: var(--rinde); font: 15px/1.4 ui-rounded, "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
  canvas#bild { position: fixed; left: 0; top: 0; width: calc(100% - 340px); height: 100%; display: block; touch-action: none; }
  /* the sheet with the values of the chosen tree */
  #blatt { position: fixed; right: 0; top: 0; bottom: 0; width: 340px; background: var(--birke); border-left: 1px solid var(--linie); overflow-y: auto; padding: 18px 20px 28px; }
  #blatt h1 { margin: 0 0 2px; font-size: 22px; font-weight: 800; letter-spacing: -0.01em; }
  #blatt p.hin { margin: 0 0 14px; color: var(--leise); font-size: 13.5px; }
  .arten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 16px; }
  .arten button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border: 1px solid var(--linie); border-radius: 10px; background: var(--blatt); color: var(--rinde); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
  .arten button svg { width: 34px; height: 38px; display: block; }
  .arten button img { width: 52px; height: 52px; display: block; }
  .arten button[aria-pressed="true"] { border-color: var(--moos); box-shadow: inset 0 0 0 1.5px var(--moos); background: #fff; }
  nav.modus { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0 0 14px; padding: 3px; background: #e3e6da; border-radius: 12px; }
  nav.modus button { flex: 1 1 auto; font: inherit; font-size: 13px; font-weight: 700; padding: 7px 3px; border: 0; border-radius: 9px; background: transparent; color: var(--leise); cursor: pointer; }
  nav.modus button[aria-pressed="true"] { background: var(--blatt); color: var(--rinde); box-shadow: 0 0 0 1px var(--linie); }
  .arten button.ohne { padding: 10px 4px; }
  .elemente { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin: 6px 0 8px; }
  .elemente button { display: flex; align-items: center; gap: 6px; padding: 3px 8px 3px 4px; border: 1px solid var(--linie); border-radius: 9px; background: #fff; color: var(--rinde); font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
  .elemente button img { width: 30px; height: 30px; flex: none; }
  .elw { display: flex; flex-direction: column; gap: 2px; } .elw > button[data-el] { flex: 1; }
  .elemente button.sicht { justify-content: center; padding: 1px 6px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--moos); background: transparent; } .elemente button.sicht[aria-pressed="true"] { color: var(--rinde); background: var(--blatt); border-style: dashed; }
  .elemente button[aria-pressed="false"] { background: transparent; color: var(--leise); text-decoration: line-through; } .elemente button[aria-pressed="false"] img { opacity: 0.3; filter: grayscale(1); }
  .elemente button.sicht[aria-pressed="false"] { color: var(--moos); text-decoration: none; }      /* (the choice "auch im Flug" is not a switched-off element) */
  .faecher { display: flex; flex-direction: column; gap: 5px; margin: 4px 0 16px; }
  .fach { border: 1px solid var(--linie); border-radius: 10px; background: var(--blatt); }
  .fachkopf { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; width: 100%; padding: 8px 10px; border: 0; background: transparent; color: var(--rinde); font: inherit; font-size: 14.5px; font-weight: 700; text-align: left; cursor: pointer; }
  .fachkopf::before { content: '▸'; color: var(--moos); margin-right: -2px; } .fachkopf[aria-expanded="true"]::before { content: '▾'; } .fachkopf span { flex: 1; } .fachkopf small { color: var(--leise); font-weight: 600; font-size: 12.5px; }
  .fach .arten, .fach .elemente { margin: 2px 8px 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); } .fach .elemente { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fach .arten button { font-size: 12.5px; overflow-wrap: break-word; hyphens: auto; } .faecher + h1 { margin-top: 4px; } .wahl.filter { grid-template-columns: auto minmax(0, 1fr); } select[data-elland] { min-width: 0; width: 100%; } .fachfuss { margin: 0 8px 8px; }
  nav.gruppen { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
  nav.gruppen button { font: inherit; font-size: 13.5px; font-weight: 700; padding: 5px 12px; border: 1px solid var(--linie); border-radius: 999px; background: transparent; color: var(--leise); cursor: pointer; }
  nav.gruppen button[aria-pressed="true"] { background: var(--moos); border-color: var(--moos); color: #fff; }
  .neu { display: flex; gap: 6px; margin: 4px 0 4px; } .neu input { flex: 1; min-width: 0; font: inherit; padding: 7px 9px; border: 1px solid var(--linie); border-radius: 9px; background: #fff; color: var(--rinde); }
  .satz { padding: 10px 0; border-top: 1px solid var(--linie); } .satz b { display: block; } .satz span { display: block; color: var(--leise); font-size: 13px; margin: 0 0 6px; } .satz button { margin: 0 5px 0 0; }
  .haken2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 6px 0 4px; } .haken2 label { display: flex; gap: 7px; align-items: center; font-weight: 600; font-size: 14px; } .haken2 input { accent-color: var(--moos); width: 16px; height: 16px; }
  input.eins { width: 100%; margin: 4px 0 0; accent-color: var(--moos); }
  label.haken { display: flex; gap: 8px; align-items: center; margin: 4px 0 10px; font-weight: 600; }
  ul.regeln { margin: 4px 0 0; padding-left: 18px; color: var(--rinde); font-size: 13.5px; } ul.regeln li { margin: 0 0 5px; }
  .legende { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; margin: 0 0 8px; } .legende i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
  h2 { margin: 18px 0 6px; font-size: 15px; font-weight: 800; color: var(--stamm); }
  .wert { margin: 0 0 12px; }
  .wert .kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
  .wert .kopf span { font-weight: 600; }
  .wert .kopf output { color: var(--moos); font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
  /* a slider with two handles: from - to */
  .zwei { position: relative; height: 26px; margin-top: 2px; }
  .zwei::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px; background: var(--linie); }
  .zwei i { position: absolute; top: 11px; height: 4px; border-radius: 2px; background: var(--moos); }
  .zwei input { position: absolute; left: 0; top: 0; width: 100%; height: 26px; margin: 0; background: transparent; pointer-events: none; -webkit-appearance: none; appearance: none; }
  .zwei input::-webkit-slider-runnable-track { height: 26px; background: transparent; }
  .zwei input::-moz-range-track { height: 26px; background: transparent; }
  .zwei input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; margin-top: 3px; border-radius: 50%; background: #fff; border: 2px solid var(--moos); cursor: grab; }
  .zwei input::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 2px solid var(--moos); cursor: grab; }
  .zwei input:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--laub); outline-offset: 1px; }
  .zwei input:focus-visible::-moz-range-thumb { outline: 3px solid var(--laub); outline-offset: 1px; }
  .wahl { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; margin: 0 0 9px; }
  .wahl span { font-weight: 600; }
  select { font: inherit; padding: 5px 8px; border: 1px solid var(--linie); border-radius: 8px; background: var(--blatt); color: var(--rinde); }
  .fuss { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--linie); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
  .fuss small { flex-basis: 100%; color: var(--leise); font-size: 13px; }
  button.klein { font: inherit; font-size: 13.5px; font-weight: 600; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--linie); background: var(--blatt); color: var(--rinde); cursor: pointer; }
  button.klein:hover, .arten button:hover, #leiste button:hover { border-color: var(--moos); }
  textarea { width: 100%; height: 86px; margin-top: 6px; font: 12px/1.35 ui-monospace, Menlo, Consolas, monospace; border: 1px solid var(--linie); border-radius: 8px; padding: 6px; background: var(--blatt); color: var(--rinde); display: none; }
  /* the bar under the picture: what is shown, and in which light */
  #leiste { position: fixed; left: 14px; bottom: 14px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; max-width: calc(100% - 368px); }
  #leiste .gruppe { display: flex; background: rgba(251, 252, 248, 0.92); border: 1px solid var(--linie); border-radius: 12px; padding: 3px; }
  #leiste button { font: inherit; font-size: 14px; font-weight: 600; color: var(--rinde); background: transparent; border: 1px solid transparent; border-radius: 9px; padding: 6px 12px; cursor: pointer; }
  #leiste button[aria-pressed="true"] { background: var(--moos); color: #fff; }
  #leiste .wort { padding: 6px 4px 6px 10px; color: var(--leise); font-size: 14px; }
  button:focus-visible, select:focus-visible { outline: 3px solid var(--laub); outline-offset: 2px; }
  #vorlage { position: fixed; left: 14px; top: 14px; width: 34vw; max-width: 520px; display: none; border-radius: 10px; overflow: hidden; border: 1px solid var(--linie); background: #fff; cursor: pointer; }
  #vorlage img { display: block; width: 100%; }
  #fehler { position: fixed; left: 14px; top: 14px; max-width: 60vw; background: #fff; border: 2px solid #b3261e; border-radius: 10px; padding: 10px 14px; display: none; }
  body.foto #blatt, body.foto #leiste, body.flug #blatt, body.flug #leiste { display: none; } body.foto canvas#bild, body.flug canvas#bild { width: 100%; touch-action: none; }
  body.sim #blatt, body.sim #leiste { display: none; } body.sim canvas#bild { width: 100%; touch-action: none; }
  #sim { display: none; } body.sim #sim { display: block; }
  #qr { position: fixed; left: 14px; top: 14px; display: flex; gap: 11px; align-items: center; padding: 9px 13px 9px 9px; border-radius: 14px; background: rgba(251, 252, 248, 0.95); border: 1px solid var(--linie); max-width: 292px; }
  #qr canvas { width: 108px; height: 108px; flex: none; image-rendering: pixelated; background: #fff; border-radius: 6px; } #qr b { display: block; font-size: 14.5px; } #qr span { display: block; font-size: 13px; color: var(--leise); }
  @media (pointer: coarse) { #qr { display: none !important; } }
  #fps { position: fixed; left: 8px; bottom: 8px; z-index: 6; display: none; padding: 3px 8px; border-radius: 7px; background: rgba(24, 30, 22, 0.66); color: #fff; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; pointer-events: none; }
  body.fern #menuKnopf, body.fern #menu .knoepfe, body.fern #menu .huelle, body.fern #menu .ecke { display: none !important; } #qr.ok span { font-size: 12.5px; }      /* a phone that shows the menu itself: this screen is only the picture (simRemote) */
  #qr.bild { padding: 9px; } #qr.ok { padding: 7px 13px; } #qr.ok b { font-size: 13.5px; color: var(--moos); } #qr:empty { display: none; }
  .griff { position: fixed; bottom: 16vh; width: 148px; height: 148px; margin: -74px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.08); display: none; pointer-events: none; } body.griffe .griff { display: block; }
  .griff i { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px; border-radius: 50%; background: rgba(255, 255, 255, 0.78); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
  #griffL { left: 20vw; } #griffR { left: 80vw; border-radius: 44px; width: 84px; margin-left: -42px; }
  #nullpunkt { position: fixed; left: 50%; top: 14px; transform: translateX(-50%); display: none; font: inherit; font-size: 14.5px; font-weight: 700; padding: 9px 16px; border-radius: 12px; border: 1px solid var(--linie); background: var(--blatt); color: var(--rinde); cursor: pointer; } 
  body.kipp #griffR { border-radius: 50%; width: 148px; margin-left: -74px; }
  #ziel { position: fixed; inset: 0; display: none; pointer-events: none; } body.maus #ziel { display: block; } body.maus .griff { display: none !important; }
  #kreuz, #kreuzG { position: absolute; left: 50%; top: 30%; width: 40px; height: 40px; margin: -20px; background: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40' fill='none'><circle cx='20' cy='20' r='17.5' stroke='rgba(0,0,0,0.25)' stroke-width='3.5' stroke-dasharray='20.49 7' stroke-dashoffset='-3.5'/><circle cx='20' cy='20' r='17' stroke='rgba(255,255,255,0.9)' stroke-width='2.2' stroke-dasharray='19.9 6.8' stroke-dashoffset='-3.4'/><circle cx='20' cy='20' r='2' fill='%23fff'/></svg>") no-repeat; }      /* the cross hairs as in maus_zielt.png and the app: a ring broken at top, bottom and sides, and a dot */
  #kreuzG { position: fixed; display: none; pointer-events: none; z-index: 1; } body.gerade:not(.maus) #kreuzG { display: block; }      /* (2026-11-25) shooting straight ahead: the same cross hairs over the flight path (fwdCross places them) */
  #ziel::before { content: ''; position: absolute; inset: 0; border-radius: 44px; box-shadow: inset 0 0 0 12px rgba(94, 62, 36, 0.9), inset 0 0 0 16px rgba(52, 34, 20, 0.55), inset 0 0 110px 26px rgba(40, 26, 14, 0.3); } #treffer { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); padding: 6px 13px; border-radius: 999px; background: rgba(35, 41, 31, 0.78); color: #fff; font-size: 14px; } #treffer:empty { display: none; }
  /* Luftkampf: the line of lives, score and time; markers and arrows; the lead ring; radar; the red flash of a hit; the end of a match */
  #kampf { display: none; } body.kampf #kampf { display: block; } body.kampf #qr { display: none; }
  #kHud { position: fixed; left: 50%; top: 12px; transform: translateX(-50%); display: flex; gap: 14px; align-items: center; padding: 6px 15px; border-radius: 999px; background: rgba(24, 30, 22, 0.72); color: #fff; font-weight: 700; font-size: 14.5px; pointer-events: none; white-space: nowrap; z-index: 3; }
  #kHud .leben { color: #ff5a5f; letter-spacing: 1px; } #kHud .leben s { text-decoration: none; color: rgba(255, 255, 255, 0.28); } body.maus #kHud { top: 54px; }
  #kMarken { position: fixed; inset: 0; pointer-events: none; overflow: hidden; } .marke { position: absolute; left: 0; top: 0; width: 0; height: 0; }
  .marke i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; transform: rotate(45deg); border: 2px solid var(--c); background: rgba(255, 255, 255, 0.25); box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); }
  .marke.feind i { background: var(--c); } .marke span { position: absolute; left: 50%; top: -28px; transform: translateX(-50%); white-space: nowrap; color: #fff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); } .marke.weg { opacity: 0.4; }
  .marke.rand i { left: -9px; top: -9px; width: 0; height: 0; border: 9px solid transparent; border-left: 14px solid var(--c); background: none; box-shadow: none; transform: rotate(var(--r)); transform-origin: 9px 9px; } .marke.rand span { top: 12px; }
  #kVorhalt { position: fixed; left: 0; top: 0; width: 30px; height: 30px; margin: -15px; border-radius: 50%; border: 2.5px solid var(--c, #fff); box-shadow: 0 0 0 1.5px rgba(0, 0, 0, 0.35), inset 0 0 0 1.5px rgba(0, 0, 0, 0.25); display: none; pointer-events: none; } #kVorhalt::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px; border-radius: 50%; background: var(--c, #fff); }
  #kRadar { position: fixed; left: 12px; top: 12px; width: 132px; height: 132px; pointer-events: none; } body.maus #kRadar { left: 22px; top: 22px; }
  #kBlitz { position: fixed; inset: 0; pointer-events: none; opacity: 0; box-shadow: inset 0 0 120px 40px rgba(220, 30, 20, 0.75); }
  #kEnde { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); display: none; min-width: 260px; padding: 18px 22px; border-radius: 16px; background: var(--birke); border: 1px solid var(--linie); box-shadow: 0 10px 34px rgba(35, 41, 31, 0.3); text-align: center; z-index: 5; }
  #kEnde b { display: block; font-size: 26px; margin-bottom: 6px; } #kEnde span { display: block; color: var(--leise); margin: 3px 0; } #kEnde div { display: flex; gap: 8px; margin-top: 14px; } #kEnde button { flex: 1; font: inherit; font-size: 15px; font-weight: 800; padding: 11px; border-radius: 12px; border: 0; background: var(--moos); color: #fff; cursor: pointer; } #kEnde button + button { background: var(--blatt); color: var(--rinde); border: 1px solid var(--linie); }
  #meldung { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; background: rgba(35, 41, 31, 0.84); color: #fff; font-weight: 600; font-size: 14.5px; display: none; pointer-events: none; }
  #menu[data-scr="mehr"] ~ #meldung { z-index: 6; }      /* (Mehrspieler: why a match or a join ended must be seen over the menu) */
  #flugEnde { position: fixed; left: 14px; top: 14px; display: none; font: inherit; font-size: 14px; font-weight: 600; padding: 9px 14px; border-radius: 10px; border: 1px solid var(--linie); background: var(--blatt); color: var(--rinde); cursor: pointer; } body.flug #flugEnde { display: block; }
  @media (max-width: 760px) {
    html, body { overflow: auto; height: auto; }
    canvas#bild { position: relative; width: 100%; height: 56vh; }
    #blatt { position: relative; width: 100%; border-left: 0; border-top: 1px solid var(--linie); }
    #leiste { position: relative; left: 0; bottom: 0; max-width: 100%; padding: 8px 10px; background: var(--birke); }
    body.sim { overflow: hidden; height: 100%; } body.sim canvas#bild { position: fixed; height: 100%; }
  }
