/* Punktgenau: shared styles */
/* D-DIN by Datto, a free (SIL OFL 1.1) version of DIN 1451, the German standard
   typeface of road signs and technical drawings. Served from this server, no third parties. */
@font-face {
  font-family: "D-DIN";
  src: url("/static/fonts/D-DIN.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "D-DIN";
  src: url("/static/fonts/D-DIN-Bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

:root {
  --paper: #ffffff;
  --ink: #17323a;        /* text */
  --muted: #5b6d73;      /* secondary text */
  --rule: #d6dfe1;       /* lines */
  --well: #eef3f4;       /* image background, quiet surfaces */
  --petrol: #0a6170;     /* the one UI accent */
  --petrol-dark: #084c58;
  --danger: #a8281e;
  --others: #2457f5;     /* other people's pins */
  --mine: #ffb800;       /* your own pin */
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); }
body { font: 18px/1.45 "D-DIN", "Arial Narrow", system-ui, sans-serif; font-variant-numeric: tabular-nums; }
h1, h2, h3 { font-weight: 700; line-height: 1.15; margin: 0; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }

button {
  background: var(--petrol); color: #fff; border: 1px solid var(--petrol); border-radius: 6px;
  padding: 10px 18px; font-weight: 700; cursor: pointer;
}
button:hover:not(:disabled) { background: var(--petrol-dark); border-color: var(--petrol-dark); }
button.quiet { background: var(--paper); color: var(--ink); border-color: var(--rule); }
button.quiet:hover:not(:disabled) { background: var(--well); border-color: var(--rule); }
button.danger { background: var(--paper); color: var(--danger); border-color: #e3bdb9; }
button.danger:hover:not(:disabled) { background: #fbf0ef; border-color: #e3bdb9; }
button:disabled { opacity: .4; cursor: default; }
:focus-visible { outline: 3px solid var(--mine); outline-offset: 2px; }

input[type=text], input[type=password], textarea {
  width: 100%; background: var(--paper); border: 1px solid #b9c7ca; border-radius: 6px; padding: 11px 12px;
}
input:focus, textarea:focus { border-color: var(--petrol); outline: none; box-shadow: 0 0 0 3px rgba(10,97,112,.18); }

.muted { color: var(--muted); }
.small { font-size: 14px; }
.hidden { display: none !important; }

/* connection notice (only visible when the connection drops) */
.offline {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 16px;
  background: var(--ink); color: #fff; font-size: 15px; text-align: center;
}

/* phase indicator: a small square plus plain text */
.phase { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; }
.phase::before { content: ""; width: 10px; height: 10px; background: var(--muted); }
.phase.open::before { background: var(--petrol); }
.phase.revealed::before { background: var(--mine); }

/* image + overlay */
.stage { position: relative; width: 100%; line-height: 0; user-select: none; -webkit-user-select: none; }
.stage img { width: 100%; height: auto; display: block; -webkit-user-drag: none; pointer-events: none; }
.stage .layer { position: absolute; inset: 0; pointer-events: none; }
.lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lines line { vector-effect: non-scaling-stroke; stroke-linecap: round; }
.lines .under { stroke: rgba(255,255,255,.9); stroke-width: 4px; }
.lines .over { stroke: var(--ink); stroke-width: 2px; }
.lines .faint { stroke: rgba(255,255,255,.55); stroke-width: 1.5px; }

.pin {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: var(--others); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(23,50,58,.55);
}
.pin.me {
  width: 22px; height: 22px; margin: -11px 0 0 -11px; z-index: 3;
  background: var(--mine); border: 3px solid var(--ink); box-shadow: 0 0 0 2px #fff;
}
/* the correct spot: a black-and-white registration mark, readable on any image */
.truth { position: absolute; width: 40px; height: 40px; margin: -20px 0 0 -20px; z-index: 4; }
.truth svg { width: 100%; height: 100%; overflow: visible; display: block; }

.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 15px; color: var(--muted); align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend .k-me { width: 14px; height: 14px; border-radius: 50%; background: var(--mine); border: 2px solid var(--ink); }
.legend .k-others { width: 12px; height: 12px; border-radius: 50%; background: var(--others); }
.legend .k-truth { width: 18px; height: 18px; }

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