:root {
  --paper: #f4efe3;
  --paper-deep: #e9e2d2;
  --ink: #1b1613;
  --accent: #d6452a;
  --muted: #8a7f72;
}

* { box-sizing: border-box; }

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

body {
  background:
    radial-gradient(120% 90% at 20% 0%, rgba(214, 69, 42, .06), transparent 45%),
    var(--paper);
  color: var(--ink);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 26px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.quote {
  margin: 0;
  width: 100%;
  max-width: 34rem;
}

.mark {
  display: block;
  font-family: Georgia, serif;
  font-size: clamp(3.5rem, 18vw, 6rem);
  line-height: .7;
  color: var(--accent);
  margin-bottom: 10px;
}

blockquote {
  margin: 0;
  font-size: clamp(1.45rem, 6.2vw, 2.05rem);
  line-height: 1.38;
  font-weight: 400;
  letter-spacing: -0.01em;
  word-wrap: break-word;
}

figcaption {
  margin-top: 26px;
  font-size: .78rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  min-height: 1.2em;
}

figcaption::before {
  content: "";
  display: inline-block;
  width: 30px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 14px .22em 0;
}

.refresh {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  opacity: .55;
  transition: opacity .15s ease, transform .15s ease;
}

.refresh:hover { opacity: 1; }

.refresh:active { transform: rotate(90deg); }

.source {
  position: fixed;
  left: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  font-size: .66rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.source a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--muted);
  transition: color .15s ease, border-color .15s ease;
}

.source a:hover { color: var(--ink); border-color: var(--ink); }

/* subtle page-turn on new quote */
blockquote, figcaption { transition: opacity .18s ease; }
body.swoop blockquote, body.swoop figcaption { opacity: 0; }

@media (min-width: 600px) {
  .mark { margin-bottom: 14px; }
  body { padding: 48px; }
}
