/*
 * Home: Who's reading?, add a reader, the check, the shelf, the grown-ups
 * panel, the offer page and the printable win card
 * (docs/product/Visual_Design.md § 5–6). Values come from tokens.css.
 */

.home {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--gutter) 48px;
}

.nowrap {
  white-space: nowrap;
}

/* ---- The lockup: mark · Pip Reader ------------------------------------- */

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 24px;
}

.lockup-mark {
  width: 44px;
  height: 44px;
}

/* ---- Who's reading?, a new reader, the check --------------------------- */

.picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  min-height: 100dvh;
  padding: 40px 0;
  text-align: center;
  justify-content: center;
}

.picker-title {
  font-size: clamp(32px, 5vw, 56px);
}

.reader-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
}

.reader-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 136px;
  min-height: 150px;
  padding: 20px 24px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-card);
  background: var(--surface-card);
  cursor: pointer;
}

.reader-chip:active {
  background: var(--surface-pressed);
}

.reader-chip .reader-dot {
  font-size: 30px;
}

.reader-name {
  font-size: 22px;
  font-weight: 700;
}

.reader-chip.add {
  border-style: dashed;
  border-color: var(--neutral-500);
  background: transparent;
}

.add-dot {
  background: transparent;
  color: var(--text-ink);
  box-shadow: inset 0 0 0 2px var(--pip-ink);
}

.add-form {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(100%, 30rem);
}

.name-input {
  flex: 1 1 14rem;
  min-height: var(--button-height);
  padding: 0 18px;
  border: 2px solid var(--pip-ink);
  border-radius: var(--radius-button);
  background: var(--surface-card);
  font-size: 22px;
}

.check-tip {
  max-width: 34rem;
  margin: 0;
  font-size: 20px;
  color: var(--text-muted);
}

.check-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 8px 0;
}

.check-word {
  min-width: 140px;
  min-height: 96px;
  padding: 0 24px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-tile);
  background: var(--surface-card);
  font-size: 44px;
  cursor: pointer;
}

.check-word.read {
  border-color: var(--pip-ink);
  background: var(--surface-pressed);
}

/* ---- The shelf --------------------------------------------------------- */

.shelf-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 96px;
  padding: 16px 0;
}

.shelf-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.shelf-title h1 {
  font-size: clamp(24px, 3.6vw, 40px);
  white-space: nowrap;
}

.grownups-btn,
.hero-actions .big-btn {
  white-space: nowrap;
}

.shelf-bird {
  width: 52px;
  height: 52px;
}

.shelf-side {
  display: flex;
  align-items: center;
  gap: 16px;
}

.week {
  margin: 0;
  font-size: 22px;
  color: var(--text-muted);
}

.shelf-head .reader-chip {
  flex-direction: row;
  gap: 10px;
  min-width: 0;
  min-height: var(--button-height);
  padding: 0 16px 0 8px;
  border-radius: 999px;
}

.shelf-head .reader-chip .reader-dot {
  font-size: 18px;
}

.shelf-head .reader-name {
  font-size: 18px;
}

/* Up next: the book beside the words. */
.up-next {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center;
  gap: clamp(24px, 5vw, 72px);
  padding: 16px 0 40px;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-cover {
  display: block;
  aspect-ratio: 1;
  padding: 10px;
  border-radius: var(--radius-cover);
  background: var(--surface-card);
  box-shadow: var(--shadow-book);
}

.hero-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 4px;
}

.hero-title {
  display: block;
  text-decoration: none;
}

.hero-label {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-muted);
}

.hero-name {
  display: block;
  margin-top: 8px;
  font-size: clamp(34px, 5.4vw, 72px);
  font-weight: 700;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.hero-meta,
.hero-pattern {
  margin: 20px 0 0;
  font-size: 22px;
  color: var(--text-muted);
}

.hero-pattern {
  margin-top: 10px;
}

.hero-pattern b {
  color: var(--text-ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 32px;
}

.hero-actions .big-btn:first-child {
  min-width: 160px;
}

/* Read again and All books: rows of square covers, title above. */
.row-title {
  margin: 36px 0 16px;
  font-size: 26px;
}

.step {
  margin-bottom: 28px;
}

.step-label {
  margin: 0 0 12px;
  font-size: 20px;
  color: var(--text-muted);
}

.step.here .step-label::after {
  content: " · reading now";
  font-weight: 400;
  color: var(--text-quiet);
}

.book-row {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  margin: 0 -4px;
  scroll-snap-type: x proximity;
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: none;
  width: 168px;
  color: var(--text-ink);
  text-decoration: none;
  scroll-snap-align: start;
}

.book-title {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.book-thumb {
  position: relative;
  display: block;
  aspect-ratio: 1;
  padding: 6px;
  border-radius: var(--radius-cover);
  background: var(--surface-card);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--pip-ink) 10%, transparent);
}

.book-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 3px;
}

.plan-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--surface-card);
  box-shadow: inset 0 0 0 2px var(--pip-ink);
  font-size: 14px;
  font-weight: 700;
}

/* ---- Narrow screens ---------------------------------------------------- */

@media (max-width: 720px) {
  .shelf-head {
    min-height: 72px;
    padding: 12px 0;
  }

  .shelf-bird {
    width: 36px;
    height: 36px;
  }

  .week {
    display: none;
  }

  .shelf-side {
    gap: 8px;
  }

  .shelf-head .reader-name {
    display: none;
  }

  .shelf-head .reader-chip {
    padding: 0 6px;
  }

  .grownups-btn {
    min-height: var(--touch-min);
    padding: 0 12px;
    font-size: 16px;
  }

  .shelf-title {
    gap: 10px;
  }

  .up-next {
    grid-template-columns: 112px 1fr;
    gap: 4px 20px;
    padding-bottom: 28px;
  }

  .hero-label {
    font-size: 18px;
  }

  .hero-name {
    margin-top: 4px;
    font-size: 26px;
  }

  .hero-meta,
  .hero-pattern {
    margin-top: 8px;
    font-size: 17px;
  }

  .hero-actions {
    grid-column: 1 / -1;
    margin-top: 16px;
  }

  .hero-info {
    display: contents;
  }

  .hero-cover {
    grid-row: span 3;
    align-self: start;
    padding: 6px;
  }

  .hero-actions .big-btn {
    flex: 1 1 0;
    padding: 0 0.5em;
    font-size: 19px;
  }

  .book-card {
    width: 136px;
  }

  .row-title {
    margin-top: 28px;
    font-size: 22px;
  }

  .check-word {
    min-width: 112px;
    min-height: 80px;
    font-size: 36px;
  }
}
