:root {
  color-scheme: light;

  --bg: #FAFAF7;
  --surface: #FFFFFF;
  --text: #111111;
  --muted: rgba(17,17,17,.62);
  --hairline: rgba(17,17,17,.10);
  --hairlineStrong: rgba(17,17,17,.14);
  --shadow: 0 16px 40px rgba(0,0,0,.07);
  --shadow2: 0 1px 0 rgba(0,0,0,.05);
  --radius: 18px;

  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial;

  --textSm: 13px;
  --textMd: 15px;
  --textLg: 17px;
  --lhTight: 1.25;
  --lhNormal: 1.45;
  --lhRelaxed: 1.65;

  --wRegular: 400;
  --wMedium: 500;
  --wSemibold: 600;
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

body {
  min-height: 100vh;
  padding: max(28px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom)) 18px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--textMd);
  line-height: var(--lhNormal);
  font-weight: var(--wRegular);
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font: inherit;
}

p {
  margin: 0;
}

.main {
  width: min(720px, 100%);
  display: grid;
  gap: 24px;
}

.header {
  display: grid;
  gap: 8px;
}

.title {
  font-size: 24px;
  line-height: var(--lhTight);
  font-weight: var(--wSemibold);
  letter-spacing: -0.01em;
  color: var(--text);
}

.subtitle {
  font-size: var(--textMd);
  line-height: var(--lhNormal);
  font-weight: var(--wRegular);
  color: var(--muted);
  max-width: 58ch;
}

.quoteCard {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  box-shadow: var(--shadow), var(--shadow2);
  padding: 18px;
  display: grid;
  gap: 12px;
}

.cardLabel {
  font-size: var(--textSm);
  line-height: var(--lhTight);
  font-weight: var(--wMedium);
  color: var(--muted);
  letter-spacing: 0.01em;
}

.quoteRegion {
  display: block;
}

.quoteText {
  margin: 0;
  font-size: var(--textLg);
  line-height: var(--lhRelaxed);
  font-weight: var(--wRegular);
  color: var(--text);
  max-width: 62ch;
  text-wrap: pretty;
  hyphens: auto;
}

.placeholderText {
  color: var(--muted);
}

.quoteFade {
  animation: quoteFade 180ms ease-out;
}

@keyframes quoteFade {
  from {
    opacity: 0;
    transform: translateY(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.buttonRow {
  display: flex;
  justify-content: center;
  align-items: center;
}

.quoteButton {
  appearance: none;
  width: min(100%, 360px);
  min-width: 220px;
  height: 52px;
  border: 1px solid var(--hairlineStrong);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 0 14px 30px rgba(0,0,0,.08);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: box-shadow 180ms ease, transform 120ms ease;
}

.quoteButton:hover {
  box-shadow: 0 18px 34px rgba(0,0,0,.10);
}

.quoteButton:active {
  transform: scale(0.99);
}

.quoteButton:focus-visible {
  outline: 2px solid rgba(0,0,0,.18);
  outline-offset: 3px;
}

.buttonText {
  font-size: var(--textMd);
  line-height: var(--lhNormal);
  font-weight: var(--wSemibold);
  letter-spacing: 0.01em;
  color: var(--text);
}

@media (max-width: 640px) {
  .main {
    gap: 16px;
  }

  .quoteButton {
    width: 100%;
    min-width: 0;
  }
}

@media (hover: none), (pointer: coarse) {
  .quoteButton:hover {
    box-shadow: 0 14px 30px rgba(0,0,0,.08);
  }
}
