/* El ojo: shared sheet for every plate. Paper, type and the few controls a plate needs. */
:root {
  --paper: #fbf9f4;
  --ink: #1a1714;
  --muted: #6f665b;
  --rule: rgba(26, 23, 20, .3);
  --crimson: #9c2f3a;
}
@media (prefers-color-scheme: dark) {
  :root { --paper: #1b1916; --ink: #ece4d6; --muted: #a39a8c; --rule: rgba(236, 228, 214, .28); --crimson: #c77a70; }
  body::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .89 0 0 0 0 .82 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E") !important;
    mix-blend-mode: screen !important;
    opacity: .16 !important;
  }
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings: "SOFT" 100, "WONK" 0;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 30;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .48 0 0 0 0 .44 0 0 0 .42 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  opacity: .4;
}
h1, h2, .it { font-style: italic; font-weight: 300; font-variation-settings: "SOFT" 100, "WONK" 1; }
a { color: inherit; }
.link, button.link {
  font: inherit; font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1;
  color: var(--ink); background: none; border: 0; cursor: pointer; padding: .35rem .1rem;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em;
  text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent);
  transition: text-decoration-color .3s, color .3s;
  -webkit-tap-highlight-color: transparent;
}
.link:hover, .link:focus-visible { text-decoration-color: currentColor; outline: none; }
.link[aria-pressed="true"] { text-decoration-color: var(--crimson); color: var(--crimson); }
.muted { color: var(--muted); }

/* A plate fills the screen: the drawing is the page, the words sit in its margins. */
.plate { position: fixed; inset: 0; touch-action: none; }
.plate canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.head {
  position: fixed; z-index: 5; left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right));
  top: max(14px, env(safe-area-inset-top)); pointer-events: none;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.head a { pointer-events: auto; text-decoration: none; color: var(--muted); font-size: .95rem; }
.head a:hover, .head a:focus-visible { color: var(--ink); outline: none; }
.head h1 { font-size: 1.05rem; color: var(--muted); }
.foot {
  position: fixed; z-index: 5; left: 0; right: 0; bottom: max(18px, env(safe-area-inset-bottom));
  padding: 0 16px; text-align: center; pointer-events: none;
}
.foot > * { pointer-events: auto; }
.ask { font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem); font-style: italic; font-variation-settings: "SOFT" 100, "WONK" 1; min-height: 1.5em; pointer-events: none; }
.say { color: var(--muted); font-size: 1rem; line-height: 1.45; max-width: 34rem; margin: .35rem auto 0; min-height: 1.45em; pointer-events: none; }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: .1rem 1.1rem; margin-top: .5rem; font-size: 1.05rem; }
.fade { transition: opacity 1.5s ease; }
.gone { opacity: 0; pointer-events: none !important; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) { .fade { transition: none; } }

/* Plates built by ojo.plate(): the words start right under the drawing. */
.foot.auto { --reserve: 172px; bottom: auto; top: calc(100dvh - var(--reserve) + 18px); }
@media (max-width: 600px) { .foot.auto { --reserve: 204px; } }
.plate.auto canvas { cursor: grab; }
