:root {
  color-scheme: light;
  --bg: #fff;
  --text: #777;
  --link: #222;
  --quote: #333;
  --muted: #999;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

main {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right))
           max(20px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}

/* гифка: не больше своего размера, помещается и по ширине, и по высоте экрана */
.pic {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 220px);
  max-height: calc(100dvh - 220px);
}

.quote {
  margin: 0;
  max-width: 34em;
  text-align: center;
}
.quote blockquote { margin: 0; }
.quote p {
  margin: 0;
  color: var(--quote);
  font-size: 16px;
  line-height: 1.45;
  font-style: italic;
  text-wrap: balance;
}
.quote figcaption {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 12px;
  text-align: center;
  letter-spacing: .02em;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 0, 0, .3);
}
a:hover, a:focus-visible { border-bottom-color: currentColor; }
