/* Colours are Wim's "field" palette: ink, bone, rust, ochre, moss, sky, plum, slate. */
:root {
  --ink: #1f1d2b;
  --bone: #f2e8cf;
  --paper: #fbf6e8;
  --rust: #c0503a;
  --sky: #3d8fd6;
  --slate: #8d8a9b;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--bone);
  color: var(--ink);
  font: 15px/1.4 var(--serif);
}

#wall {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
}
#wall.dragging { cursor: grabbing; }
#wall:focus-visible { outline: 3px solid var(--sky); outline-offset: -3px; }

.plate {
  position: fixed;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgb(31 29 43 / 0.2);
}

header.plate {
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  max-width: min(360px, calc(100% - 24px));
  padding: 10px 14px;
}
header h1 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: 0.01em; }
header p { margin: 4px 0 0; font-size: 14px; }

a { color: var(--ink); text-decoration-color: var(--rust); text-underline-offset: 2px; }
a:hover { color: var(--rust); }

.status {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 12px 16px;
  max-width: calc(100% - 32px);
  text-align: center;
}
.status:empty { display: none; }
.status button { margin-top: 8px; }

.tools {
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  display: flex;
  padding: 0;
}
.tools button {
  width: 44px;
  height: 44px;
  border: 0;
  border-left: 2px solid var(--ink);
  background: none;
  color: var(--ink);
  font: 600 20px/1 var(--mono);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.tools button:first-child { border-left: 0; }
.tools button:hover { background: var(--bone); }
.tools button:focus-visible { outline: 3px solid var(--sky); outline-offset: -5px; }
.tools button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.tools svg { width: 20px; height: 20px; }
#sound .cross { display: none; }
#sound[aria-pressed="false"] .waves { display: none; }
#sound[aria-pressed="false"] .cross { display: inline; }
#sound[aria-pressed="true"] { background: none; color: var(--ink); }

button {
  font: inherit;
  color: inherit;
}
.status button {
  border: 2px solid var(--ink);
  background: var(--bone);
  padding: 4px 12px;
  cursor: pointer;
}

.hint {
  left: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  margin: 0;
  padding: 6px 10px;
  font: 12px/1.3 var(--mono);
  max-width: calc(100% - 270px);
}
@media (max-width: 560px) {
  .hint { display: none; }
}

/* The lens is drawn on the canvas; this is its invisible, focusable handle. */
.lens {
  position: fixed;
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: move;
  touch-action: none;
  padding: 0;
}
.lens:focus-visible { outline: 3px solid var(--sky); outline-offset: 6px; }

.card {
  position: fixed;
  width: 250px;
  padding: 12px 14px 10px;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgb(31 29 43 / 0.2);
  pointer-events: none;
}
.card p, .card h2 { margin: 0; }
.card-no { font: 600 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--rust); }
.card-name { font-size: 18px; font-weight: 600; margin-top: 6px !important; line-height: 1.2; }
.card-label { margin-top: 6px !important; }
.card-remarks { margin-top: 8px !important; font-style: italic; }
.card-remarks:empty { display: none; }
.card-date { margin-top: 10px !important; font: 11px/1 var(--mono); color: #5d5a6b; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
