/* The pieces every animated app screen shares (website/sceneParts.ts): the screen, text, buttons, covers,
   tab bar, taps and toasts. Each screen's own pieces are in screens.css. Sizes are in em, so a scene scales
   with its phone. Without the script, or with "reduce motion", every scene simply shows its last frame. */
.phone {
  container-type: inline-size;
}

.screen {
  position: relative;
  aspect-ratio: 9 / 17;
  overflow: hidden;
  padding: 2.6em 1.3em 0;
  border-radius: 34px;
  background: var(--bg);
  color: var(--ink);
  font-size: 4.4cqw;
  line-height: 1.35;
  text-align: left;
}

.screen p {
  margin: 0;
}

.s-brand,
.s-title,
.s-heading,
.s-book,
.s-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
}

.s-brand {
  color: var(--accent);
  font-size: 1.1em;
}

.s-title {
  font-size: 1.9em;
  margin-bottom: 0.4em !important;
}

.s-heading {
  font-size: 1.25em;
  margin: 0.9em 0 0.5em !important;
}

.s-label,
.s-small,
.s-author {
  color: var(--muted);
  font-size: 0.85em;
}

.s-label {
  margin: 0.9em 0 0.4em !important;
}

.s-book {
  line-height: 1.2;
}

.s-button,
.s-soft {
  display: block;
  padding: 0.7em;
  border-radius: 0.8em;
  text-align: center;
  font-weight: 600;
  font-size: 0.95em;
}

.s-button {
  background: var(--accent);
  color: var(--onAccent);
}

.s-soft {
  margin-top: 0.7em;
  background: var(--pink);
  color: var(--accent);
}

.s-card {
  padding: 0.9em;
  border: 1px solid var(--line);
  border-radius: 1.2em;
  background: var(--paper);
}

.s-row {
  display: flex;
  align-items: center;
  gap: 0.7em;
}

/* Drawn covers */
.s-cover {
  flex-shrink: 0;
  display: block;
  overflow: hidden;
  border-radius: 0.25em;
  color: var(--paper);
  box-shadow: 0 0.2em 0.5em -0.2em var(--backdrop);
}

.s-cover span {
  display: block;
  padding: 0.5em 0.35em;
  font-family: 'Playfair Display', Georgia, serif;
  line-height: 1.1;
}

.s-cover-small {
  width: 2.6em;
  height: 3.8em;
}

.s-cover-small span {
  font-size: 0.42em;
}

.s-cover-big {
  width: 5.5em;
  height: 8em;
  margin: 0 auto 0.6em;
}

.s-cover-big span {
  font-size: 0.7em;
}

.s-rose {
  background: linear-gradient(150deg, var(--accent), var(--recording));
}

.s-apricot {
  background: linear-gradient(150deg, var(--apricot), var(--star));
}

.s-lavender {
  background: linear-gradient(150deg, var(--fieldBorder), var(--muted));
}

.s-shelf {
  display: flex;
  gap: 0.6em;
}

.s-shelf .s-cover-small {
  width: 3.4em;
  height: 5em;
}

.s-progress {
  display: block;
  height: 0.45em;
  margin: 0.8em 0 0.4em;
  border-radius: 1em;
  background: var(--pink);
  overflow: hidden;
}

.s-fill {
  display: block;
  width: 61%;
  height: 100%;
  border-radius: 1em;
  background: var(--accent);
}

/* Tab bar */
.s-tabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.s-tabs span {
  flex: 1;
  padding: 0.8em 0 1.6em;
  text-align: center;
  color: var(--muted);
  font-size: 0.8em;
}

.s-tabs .s-active {
  background: var(--pink);
  color: var(--accent);
  font-weight: 600;
}

/* A finger tap: a ring that grows and fades. Only seen while animating. */
.s-tap {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.6em;
  height: 2.6em;
  margin: -1.3em 0 0 -1.3em;
  border: 0.18em solid var(--accent);
  border-radius: 50%;
  opacity: 0;
}

.s-toast {
  position: absolute;
  top: 2.4em;
  left: 1.3em;
  right: 1.3em;
  padding: 0.7em 0.9em;
  border-radius: 0.8em;
  background: var(--toast);
  color: var(--bg);
  font-size: 0.85em;
  text-align: center;
}

.s-center {
  text-align: center;
}
