/* Reader completion and spoiler-profile controls. */

.reader-completion {
  width: 100%;
  margin: 18px auto 0;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-raised) 92%, transparent);
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
}

.reader-completion[hidden] {
  display: none;
}

.book-stage:has(.book-spread.continuous) .reader-completion {
  max-width: 760px;
}

.reader-completion-copy {
  max-width: 62ch;
}

.reader-completion .eyebrow {
  margin-bottom: 6px;
}

.reader-completion h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2.3vw, 1.85rem);
  font-weight: 400;
}

.reader-completion-text {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.reader-completion-actions {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.reader-completion-primary {
  color: var(--text);
  border-color: var(--metal);
}

.reader-completion-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  color: var(--metal);
  text-underline-offset: 4px;
}

.reader-progress-end-sentinel {
  display: block;
  width: 100%;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 760px) {
  .reader-completion {
    align-items: stretch;
    flex-direction: column;
    padding: 18px;
  }

  .reader-completion-actions {
    justify-content: flex-start;
  }
}
