:root {
  --ink: #111111;
  --paper: #ffffff;
  --muted: #707070;
  --gutter: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { background: var(--paper); color: var(--ink); }

body {
  font: 400 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

/* Phone first: the grid on top, the card text underneath. */
.card {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 100vh;
  min-height: 100svh;
  padding:
    max(var(--gutter), env(safe-area-inset-top))
    max(var(--gutter), env(safe-area-inset-right))
    max(20px, env(safe-area-inset-bottom))
    max(var(--gutter), env(safe-area-inset-left));
}

.field {
  position: relative;
  flex: 1 1 auto;
  min-height: 44vh;
  min-height: 44svh;
}

.field canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.info { flex: 0 0 auto; max-width: 30rem; }

h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin-bottom: 10px;
}

.info p + p { margin-top: 8px; }

.links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  column-gap: 20px;
  margin-top: 14px;
}

.links a {
  display: inline-block;
  padding: 11px 0;              /* keeps each link a 44px tap target */
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.links a:hover { text-decoration-thickness: 2px; }

a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Laptop and up: text on the left, grid on the right. */
@media (min-width: 900px) and (min-height: 520px) {
  .card {
    flex-direction: row-reverse;
    gap: 64px;
    height: 100vh;
    padding: 48px;
  }
  .field { min-height: 0; }
  .info { flex: 0 0 26rem; align-self: flex-end; }
  h1 { font-size: 28px; }
}
