/* Skeet-Ablaufblatt: eine Quelle für Bildschirm, Handy und A4-Druck (PDF). */

@font-face {
  font-family: "DejaVu Sans";
  src: url("../fonts/dejavu-sans.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DejaVu Sans";
  src: url("../fonts/dejavu-sans-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --bg: #e9edf0;
  --paper: #ffffff;
  --ink: #162d3b;
  --muted: #586a75;
  --soft: #f2f4f6;
  --line: #d8dfe4;
  --dub: #dfe6ec;
  --h: #1869a0;
  --n: #b5531f;
  --accent: #e7eef4;
}
@media screen and (prefers-color-scheme: dark) {
  :root {
    --bg: #0c151c;
    --paper: #13212b;
    --ink: #e8eef2;
    --muted: #9aabb6;
    --soft: #192b37;
    --line: #26394a;
    --dub: #22384a;
    --h: #3f8fd0;
    --n: #d0703d;
    --accent: #1d3343;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 "DejaVu Sans", system-ui, sans-serif;
}

/* ---------- Seitenrahmen ---------- */
.topbar {
  display: flex; gap: 12px; align-items: center; justify-content: space-between;
  max-width: 794px; margin: 0 auto; padding: 14px 16px 0;
  font-size: 14px;
}
.topbar a { color: var(--h); font-weight: 700; text-decoration: none; }
.topbar .pdf {
  padding: 8px 14px; border-radius: 999px;
  background: var(--h); color: #fff;
}

.sheet {
  max-width: 794px;           /* = 210 mm bei 96 dpi */
  margin: 12px auto 32px;
  padding: 40px 44px 30px;
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(22, 45, 59, .08);
}

/* ---------- Kopf ---------- */
.head { display: flex; align-items: flex-start; gap: 20px; }
.head .titles { flex: 1; min-width: 0; }
.eyebrow {
  margin: 0; color: var(--muted);
  font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
h1 { margin: 2px 0 6px; font-size: 38px; line-height: 1.08; letter-spacing: -.01em; }
.sub { margin: 0; color: var(--muted); font-size: 14px; }
.badge {
  flex: none; min-width: 92px; padding: 10px 14px 9px;
  border-radius: 12px; background: var(--accent);
  text-align: center; color: var(--h);
}
.badge b { display: block; font-size: 32px; line-height: 1; }
.badge span { display: block; margin-top: 5px; font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }

/* ---------- Draufsicht + Legende ---------- */
.figrow { display: flex; gap: 24px; align-items: center; margin: 16px 0 12px; }
.figrow .field { flex: 1 1 auto; min-width: 0; max-width: 500px; }
.figrow .legend { flex: 0 0 190px; flex-direction: column; align-items: flex-start; margin: 0; }
.field { margin: 0; }
.field svg { display: block; width: 100%; height: auto; }
.field .st circle { fill: var(--paper); stroke: var(--line); stroke-width: 2.5; }
.field .st text { fill: var(--ink); font-size: 13px; font-weight: 700; text-anchor: middle; dominant-baseline: central; }
.field .st.mid circle { fill: var(--ink); stroke: var(--ink); }
.field .st.mid text { fill: var(--paper); }
.field .st.off circle { stroke-dasharray: 3 3; fill: none; }
.field .st.off text { fill: var(--muted); }
.field .arc { fill: none; stroke: var(--line); stroke-width: 2.5; }
.field .chord { stroke: var(--line); stroke-width: 1.5; stroke-dasharray: 2 5; }
.field .house { stroke: none; }
.field .house.h { fill: var(--h); }
.field .house.n { fill: var(--n); }
.field .lbl { font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.field .lbl.h { fill: var(--h); }
.field .lbl.n { fill: var(--n); text-anchor: end; }
.field .path { fill: none; stroke-width: 2.2; stroke-dasharray: 7 5; }
.field .path.h { stroke: var(--h); }
.field .path.n { stroke: var(--n); }
.field .cross { stroke: var(--ink); stroke-width: 2; }
.field .note { fill: var(--muted); font-size: 10.5px; }
.field .note.c { text-anchor: middle; }

/* ---------- Legende ---------- */
.legend {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center;
  margin: 8px 0 14px; color: var(--muted); font-size: 12.5px;
}
.legend > span { display: inline-flex; align-items: center; gap: 7px; }
.legend small { display: block; font-size: 11px; line-height: 1.35; }

/* ---------- Kacheln H / N / Dublette ---------- */
.k {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 7px;
  color: #fff; font-weight: 700; font-size: 14px;
}
.k.h { background: var(--h); }
.k.n { background: var(--n); }
.legend .k { width: 22px; height: 22px; font-size: 11px; border-radius: 5px; }
.dub {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 6px; border: 2px solid var(--ink); border-radius: 10px;
  background: var(--dub);
}
.dub i { font-style: normal; color: var(--muted); font-weight: 700; }
.legend .dub { padding: 2px 4px; gap: 4px; border-radius: 7px; }
.extra { margin-left: 8px; color: var(--n); font-size: 12px; font-weight: 700; white-space: nowrap; }

/* ---------- Tabelle ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
thead th {
  padding: 0 10px 2px; text-align: left;
  color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
}
thead th.num, td.num { text-align: right; }
tbody th, tbody td { padding: 7px 10px; background: var(--soft); vertical-align: middle; }
tbody th { width: 92px; border-radius: 10px 0 0 10px; text-align: left; font-size: 26px; line-height: 1; }
tbody th small { margin-left: 6px; font-size: 11px; color: var(--h); letter-spacing: .02em; vertical-align: middle; }
tbody td.num { width: 70px; border-radius: 0 10px 10px 0; font-size: 20px; font-weight: 700; }
tbody td.none { color: var(--line); font-weight: 700; }
tbody tr.ret th, tbody tr.ret td { background: var(--accent); }
tfoot td { padding: 6px 10px 0; color: var(--muted); font-size: 13px; }
tfoot td.num { color: var(--ink); font-size: 20px; font-weight: 700; }
col.c-stand { width: 92px; }
col.c-num { width: 70px; }

/* ---------- Merksätze ---------- */
.rules { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 0; }
.rule { padding: 12px 14px; border-radius: 12px; background: var(--soft); }
.rule h3 { margin: 0 0 4px; color: var(--muted); font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; }
.rule p { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.2; }
.rule p small { display: block; margin-top: 3px; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.35; }
.hc { color: var(--h); }
.nc { color: var(--n); }

.dubnote { margin: 14px 0 0; font-size: 13px; }
.dubnote b { display: block; margin-bottom: 2px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Fuß ---------- */
.foot {
  display: flex; gap: 20px; align-items: flex-end; justify-content: space-between;
  margin-top: 16px; padding-top: 14px; border-top: 1.5px solid var(--line);
}
.order { margin: 0; font-size: 14px; font-weight: 700; }
.src { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.qr { display: flex; gap: 12px; align-items: center; flex: none; }
.qr img { width: 96px; height: 96px; display: block; background: #fff; padding: 4px; border-radius: 4px; }
.qr p { margin: 0; text-align: right; font-size: 11px; color: var(--muted); line-height: 1.4; }
.qr p b { display: block; color: var(--ink); font-size: 13px; }

/* ---------- Handy ---------- */
@media screen and (max-width: 640px) {
  .sheet { margin: 8px 0 24px; padding: 22px 16px 20px; border-radius: 0; box-shadow: none; }
  h1 { font-size: 28px; }
  .badge { min-width: 70px; padding: 8px 10px 7px; }
  .badge b { font-size: 24px; }
  .k { width: 26px; height: 26px; font-size: 12px; border-radius: 6px; }
  .dub { gap: 3px; padding: 3px 4px; border-radius: 8px; }
  tbody th, tbody td { padding: 6px 6px; }
  tbody th { font-size: 20px; }
  tbody th small { display: block; margin: 3px 0 0; font-size: 9.5px; }
  thead th { padding: 0 6px 2px; font-size: 9.5px; }
  col.c-stand { width: 52px; }
  col.c-num { width: 40px; }
  tbody td.num, tfoot td.num { font-size: 16px; }
  .extra { display: block; margin: 3px 0 0; font-size: 10.5px; }
  .rules { grid-template-columns: 1fr; }
  .figrow { flex-direction: column; align-items: stretch; gap: 10px; }
  .figrow .legend { flex: none; flex-direction: row; }
  .qr { display: none; }          /* auf dem Handy ist man schon da */
}

/* ---------- Druck: exakt eine A4-Seite ---------- */
@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  .topbar { display: none; }
  .sheet {
    width: 210mm; height: 297mm; max-width: none;
    margin: 0; padding: 13mm 14mm 10mm;
    border-radius: 0; box-shadow: none; overflow: hidden;
    display: flex; flex-direction: column;
  }
  .sheet { padding-top: 11mm; }
  .foot { margin-top: auto; padding-top: 10px; }
  .figrow { margin: 10px 0 6px; }
  .figrow .field { max-width: 440px; }
  table { border-spacing: 0 4px; }
  .k { width: 25px; height: 25px; font-size: 12.5px; border-radius: 6px; }
  .dub { padding: 2px 5px; gap: 5px; border-radius: 8px; }
  tbody th, tbody td { padding: 4px 10px; }
  tbody th { font-size: 22px; }
  tbody td.num, tfoot td.num { font-size: 18px; }
  tfoot td { padding-top: 2px; }
  .rules { margin-top: 10px; }
  .rule { padding: 10px 12px; }
  .rule p { font-size: 17px; }
  .dubnote { margin-top: 10px; }
  .qr img { width: 84px; height: 84px; }
  /* Jagdlich hat nur 7 Zeilen – die Fläche nutzen statt Leerraum */
  .roomy .figrow { margin: 16px 0 14px; }
  .roomy .figrow .field { max-width: 480px; }
  .roomy table { border-spacing: 0 7px; }
  .roomy table .k { width: 30px; height: 30px; font-size: 14px; }
  .roomy tbody th, .roomy tbody td { padding: 8px 10px; }
  .roomy tbody th { font-size: 26px; }
  .roomy .rules { margin-top: 16px; }
  .roomy .rule { padding: 14px 16px; }
  .roomy .rule p { font-size: 19px; }
  .roomy .dubnote { margin-top: 16px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
