/*
 * The web edition's own controls (handoff 37): add books, shelves, remove,
 * storage, the first-run note.  Linked only by the web build's index.html
 * (scripts/build_web.py); Paul's Shelf never loads it.
 */

.web-library-bar {
  display: grid;
  gap: var(--space-3);
  margin: 0 0 var(--space-8);
  padding: var(--space-5);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}

.web-library-bar.is-empty {
  padding: var(--space-8) var(--space-6);
  text-align: center;
  justify-items: center;
}

.web-library-welcome h2 {
  margin: 0 0 var(--space-2);
  font-family: var(--font-display);
}

.web-library-welcome p {
  max-width: 36rem;
  margin: 0 auto;
  color: var(--color-muted);
}

.web-library-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.web-library-note {
  margin: 0;
  color: var(--color-muted);
}

.web-book-tools,
.web-shelf-tools {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin: var(--space-6) 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-line-soft);
}

.web-book-shelf {
  display: inline-flex;
  gap: var(--space-2);
  align-items: center;
}

.web-book-shelf select {
  min-height: 2.5rem;
  padding: 0 var(--space-3);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: var(--color-surface-raised);
  color: var(--color-ink);
  font: inherit;
}

.web-choice-dialog .sheet-frame {
  display: grid;
  gap: var(--space-3);
  max-width: 30rem;
}

.web-choice-dialog h2 {
  margin: 0;
}

.web-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.button-danger {
  color: var(--color-warning);
}

.web-first-run {
  position: relative;
  z-index: 19;
  padding: var(--space-3) var(--space-6);
  color: var(--color-ink);
  background: var(--color-accent-soft);
  border-bottom: 1px solid color-mix(in srgb, var(--color-accent) 35%, transparent);
  text-align: center;
  font-size: var(--text-sm);
}

.reader-open .web-first-run {
  display: none;
}

.web-first-run-dismiss {
  min-height: 2rem;
  margin-left: var(--space-2);
}

/* No local model to ask in the web edition (handoff 37 phase D). */
.tx-selection-bar [data-action="ask"] {
  display: none;
}

/* The tab bar holds what this build shows (Feed and Saved only with a demo feed). */
.tab-bar {
  grid-template-columns: none;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
}

@media (max-width: 40rem) {
  .web-library-bar {
    padding: var(--space-4);
  }
  .web-library-actions .button {
    flex: 1 1 auto;
  }
}
