/* Quote screen: direction B "Big quote" from docs/GOAL.md. Colours and type come from tokens.css. */

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

/* Paint the whole window bone, including any area under Android's gesture bar,
   so no white shows below the page. */
html {
  background-color: var(--bg);
}

body {
  overflow-x: hidden;
}

.screen {
  position: relative;
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 560px;
  margin: 0 auto;
  padding:
    calc(var(--space-8) - 8px + env(safe-area-inset-top))
    28px
    calc(170px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.date {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.quote {
  flex-grow: 1;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-5);
  position: relative;
  z-index: 1;
  transition: opacity var(--duration) ease-out;
}

.quote.is-loading {
  opacity: 0;
}

.quote-mark {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 112px;
  line-height: 0.6;
  height: 52px;
  color: var(--accent);
}

.quote-text {
  margin: 0;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 400;
  font-size: 36px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  text-wrap: pretty;
}

/* Longer quotes step down in size so up to 140 characters fit a phone screen. */
.quote-text[data-length="medium"] { font-size: 30px; }
.quote-text[data-length="long"] { font-size: 26px; line-height: 1.3; }

.quote-author {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 500;
  color: var(--text-muted);
}

.dash {
  flex: none;
  width: 24px;
  height: 3px;
  border-radius: var(--radius-pill);
  background: var(--pop-2);
}

.message {
  color: var(--text-muted);
}

/* Bottom-right corner: beige circle, sky arc and the curved countdown.
   Fixed to the real bottom edge of the screen (behind the gesture bar, which is fine for the circle).
   The countdown text sits 44px+ above the edge; only a taller inset (e.g. 3-button navigation)
   lifts the corner, by the amount over 32px. */
.corner {
  position: fixed;
  right: max(0px, calc((100vw - 560px) / 2));
  bottom: 0;
  width: 280px;
  height: 280px;
  transform: translateY(calc(-1 * max(0px, env(safe-area-inset-bottom, 0px) - 32px)));
  pointer-events: none;
}

.corner-circle {
  fill: var(--brand-beige);
}

.corner-arc {
  fill: none;
  stroke: var(--pop);
  stroke-width: 9;
  stroke-linecap: round;
}

.countdown {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  fill: var(--brand-brown);
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-height: 700px) {
  .quote-mark { font-size: 88px; height: 40px; }
  .quote-text { font-size: 30px; }
  .quote-text[data-length="medium"] { font-size: 26px; }
  .quote-text[data-length="long"] { font-size: 23px; }
}
