:root {
  --ink: #1c2b3a;
  --muted: #667485;
  --paper: #faf8f3;
  --surface: #ffffff;
  --line: #e3e1d8;
  --accent: #3278ad;
  --accent-soft: #eaf1f8;
  --accent-ink: #1f4d70;
  --night: #16222f;
  --font-sans: "Avenir Next", "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", "Baskerville", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

/* Several elements below (.empty-visual, .resource-loading, .toast, ...) set their own
   `display` value; without this, that always wins over the browser's [hidden] rule since
   author styles beat the user-agent stylesheet regardless of specificity. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
a,
.drop-zone {
  -webkit-tap-highlight-color: transparent;
}

/* Header */

.topbar {
  height: 76px;
  padding: 0 clamp(22px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.brand-badge {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--ink);
}

.brand-badge .brand-icon {
  color: white;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.main-nav a {
  padding: 9px 15px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: 150ms ease;
}

.main-nav a:hover,
.main-nav .is-current {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

/* Card maker */

.maker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 1080px;
  margin: 56px auto 96px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  overflow: hidden;
}

.form-panel,
.preview-panel {
  padding: clamp(28px, 4vw, 48px);
}

.form-panel {
  border-right: 1px solid var(--line);
}

.preview-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
}

.form-intro {
  margin-bottom: 26px;
}

.form-intro span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.form-intro h1 {
  margin: 9px 0 6px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(24px, 2.6vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.form-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.resource-actions {
  margin: 0 0 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.resource-actions > button {
  min-width: 0;
  min-height: 48px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.resource-actions > button:hover,
.resource-actions > button.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.resource-actions > button > svg:first-child {
  color: var(--accent);
}

.resource-actions > button > svg:last-child {
  transition: transform 150ms ease;
}

.resource-actions > button.is-active > svg:last-child {
  transform: rotate(180deg);
}

.resource-panel {
  margin: -9px 0 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  animation: panel-in 150ms ease both;
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(-4px); }
}

.resource-panel-heading {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.resource-panel-heading > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.resource-panel-heading span {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.resource-panel-heading strong {
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.resource-panel-heading small {
  color: #96998f;
  font-size: 8px;
}

.bible-controls {
  display: grid;
  grid-template-columns: 0.7fr 1.5fr 0.7fr;
  gap: 8px;
}

.bible-controls label {
  min-width: 0;
}

.bible-controls label > span {
  margin-bottom: 5px;
  display: block;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.bible-controls select {
  width: 100%;
  height: 37px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 10px;
}

.bible-controls select:focus {
  border-color: var(--accent);
}

.verse-results {
  max-height: 265px;
  margin-top: 13px;
  overflow-y: auto;
  border-top: 1px solid var(--line);
  scrollbar-width: thin;
}

.verse-results > button {
  width: 100%;
  padding: 11px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 18px;
  align-items: start;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.verse-results > button:hover {
  background: var(--accent-soft);
}

.verse-results > button > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 8px;
  font-weight: 800;
}

.verse-results p {
  margin: 1px 0 0;
  color: #444d57;
  font-family: var(--font-serif);
  font-size: 11px;
  line-height: 1.48;
}

.verse-results svg {
  margin-top: 4px;
  color: var(--accent);
}

.image-search-form {
  height: 41px;
  padding-left: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
}

.image-search-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  font-size: 10px;
}

.image-search-form button {
  align-self: stretch;
  padding: 0 14px;
  border: 0;
  border-radius: 0 9px 9px 0;
  background: var(--ink);
  color: white;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}

.image-results {
  max-height: 330px;
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.image-results > button {
  min-width: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
  text-align: left;
  cursor: pointer;
}

.image-results > button:hover {
  border-color: var(--accent);
}

.image-results img {
  width: 100%;
  height: 82px;
  display: block;
  object-fit: cover;
  background: var(--line);
}

.image-results > button > span {
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.image-results strong,
.image-results small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-results strong {
  font-size: 8px;
}

.image-results small {
  color: #8b8e85;
  font-size: 7px;
}

.resource-loading {
  min-height: 95px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 9px;
}

.resource-loading svg {
  color: var(--accent);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.resource-error {
  margin: 14px 0 2px;
  color: #a53d35;
  font-size: 9px;
  line-height: 1.4;
}

.drop-zone {
  min-height: 176px;
  margin-bottom: 24px;
  border: 1.5px dashed #c3c9d1;
  border-radius: 16px;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: 150ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload-icon {
  width: 42px;
  height: 42px;
  margin-bottom: 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.drop-zone strong {
  font-size: 13px;
}

.drop-zone > span:not(.upload-icon) {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.drop-zone small {
  margin-top: 14px;
  color: #9a9e94;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.drop-zone.has-image {
  border-style: solid;
  padding: 0;
}

.drop-zone.has-image #drop-zone-filled {
  width: 100%;
  align-self: stretch;
  position: relative;
}

.drop-zone.has-image img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: inherit;
}

.image-controls {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.image-controls > span {
  max-width: calc(100% - 48px);
  padding: 8px 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(23, 25, 21, 0.78);
  color: white;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.image-controls button,
.card-actions button,
.search button {
  border: 0;
  cursor: pointer;
}

.image-controls button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: white;
}

.field {
  display: block;
  margin-top: 18px;
}

.field > span {
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
}

.field > span small {
  color: #9a9e97;
  font-size: 9px;
  font-weight: 600;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: var(--surface);
  padding: 13px 15px;
  color: var(--ink);
  font-size: 13px;
  transition: 150ms ease;
}

.field textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.5;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #a6a9a1;
}

.layout-picker {
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.layout-picker legend {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
}

.layout-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.layout-options > button {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  text-align: left;
  cursor: pointer;
  transition: 150ms ease;
}

.layout-options > button:hover {
  border-color: var(--accent);
}

.layout-options > button.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.layout-options > button > span:nth-child(2) {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.layout-options strong {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout-options small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout-options > button > svg {
  color: var(--accent);
}

.layout-thumb {
  width: 38px;
  height: 44px;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: var(--ink);
}

.layout-thumb i {
  display: block;
  border-radius: 1px;
}

.thumb-below i:first-child {
  height: 23px;
  background: #8a97a4;
}

.thumb-below i:last-child {
  width: 75%;
  height: 7px;
  background: #f1efe7;
}

.thumb-overlay {
  justify-content: flex-end;
  background: #29394a;
}

.thumb-overlay i:first-child {
  width: 58%;
  height: 3px;
  background: var(--accent);
}

.thumb-overlay i:last-child {
  width: 82%;
  height: 6px;
  background: #fff;
}

.error {
  margin: 14px 0 -2px;
  color: #a53d35;
  font-size: 11px;
  line-height: 1.4;
}

.primary-button {
  width: 100%;
  margin-top: 22px;
  padding: 15px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
  transition: 150ms ease;
}

.primary-button:hover {
  background: var(--accent);
}

.preview-label {
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.preview-label span:last-child {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.preview-wrap {
  width: min(100%, 340px);
  margin: 0 auto;
  position: relative;
  aspect-ratio: 0.8;
}

.flashcard,
.card-shadow {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.preview-card {
  z-index: 3;
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(28, 43, 58, 0.1);
}

.card-shadow {
  display: none;
}

.card-image {
  height: 58%;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.card-image img,
.library-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.empty-visual {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--paper);
  color: var(--muted);
  font-size: 11px;
}

.card-number {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(22, 34, 47, 0.78);
  color: white;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.card-copy {
  height: 42%;
  padding: 22px 24px 20px;
}

.card-kicker,
.library-copy > span {
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.card-copy h3,
.library-copy h3 {
  margin: 9px 0 8px;
  font-family: var(--font-serif);
  font-weight: 580;
  letter-spacing: -0.03em;
}

.card-copy h3 {
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.08;
}

.card-copy p,
.library-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.card-copy p {
  font-size: 10px;
}

.preview-card.layout-overlay::after {
  content: "";
  position: absolute;
  inset: 28% 0 0;
  z-index: 1;
  border-radius: 16px;
  background: linear-gradient(to bottom, transparent, rgba(12, 18, 25, 0.9));
  pointer-events: none;
}

.preview-card.layout-overlay .card-image {
  height: 100%;
}

.preview-card.layout-overlay .card-number {
  z-index: 3;
}

.preview-card.layout-overlay .card-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  height: auto;
  padding: 28px 26px 27px;
  color: white;
}

.preview-card.layout-overlay .card-kicker {
  color: #cfe0ee;
}

.preview-card.layout-overlay .card-copy h3 {
  font-size: clamp(22px, 2.5vw, 29px);
}

.preview-card.layout-overlay .card-copy p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 10px;
}

.preview-hint {
  max-width: 340px;
  margin: 24px auto 0;
  color: var(--muted);
  text-align: center;
  font-size: 10px;
  line-height: 1.5;
}

/* Verse library */

.library {
  padding: 80px clamp(22px, 5vw, 64px) 100px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.standalone-library {
  min-height: calc(100vh - 176px);
}

.standalone-library-hero {
  max-width: 720px;
  margin: 0 auto 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.back-link {
  align-self: flex-start;
  margin-bottom: 22px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.back-link:hover {
  color: var(--accent);
}

.library-hero-icon {
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: var(--ink);
  display: grid;
  place-items: center;
  color: white;
}

.standalone-library-hero .eyebrow {
  margin-bottom: 12px;
}

.standalone-library-hero h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(38px, 5.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.standalone-library-hero > p {
  max-width: 520px;
  margin: 16px auto 26px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.library-page-search {
  width: min(100%, 520px);
  height: 52px;
  padding: 0 16px 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--accent);
}

.library-page-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.library-page-search input::placeholder {
  color: #9aa3ab;
}

.library-page-search button {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  color: var(--accent);
  cursor: pointer;
}

.library-count {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.library-count span {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
  color: var(--accent-ink);
}

.library-alert {
  max-width: 1080px;
  margin: -26px auto 26px;
  padding: 12px 15px;
  border: 1px solid #edc4b8;
  border-radius: 10px;
  background: #fff5f1;
  color: #9b4f3f;
  font-size: 10px;
}

.card-grid {
  max-width: 1080px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.library-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface);
  transition: 150ms ease;
}

.library-card:hover {
  border-color: #c7cdd4;
}

.library-image {
  height: 220px;
  position: relative;
  overflow: hidden;
  background: var(--line);
}

.library-image > span {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(22, 34, 47, 0.78);
  color: white;
  font-size: 8px;
  font-weight: 800;
}

.card-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: flex;
  gap: 7px;
  opacity: 0;
  transition: 150ms ease;
}

.library-card:hover .card-actions,
.library-card:focus-within .card-actions {
  opacity: 1;
}

.card-actions button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
}

.card-actions button:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.library-copy {
  min-height: 168px;
  padding: 20px 22px 24px;
}

.library-copy h3 {
  font-size: 20px;
  line-height: 1.12;
}

.library-copy p {
  display: -webkit-box;
  overflow: hidden;
  font-size: 11px;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.image-credit {
  margin-top: 11px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #8b939c;
  font-size: 7px;
  text-decoration: none;
}

.image-credit:hover {
  text-decoration: underline;
}

.library-card.layout-overlay {
  min-height: 388px;
  position: relative;
  background: var(--night);
}

.library-card.layout-overlay::after {
  content: "";
  position: absolute;
  inset: 32% 0 0;
  z-index: 1;
  background: linear-gradient(to bottom, transparent, rgba(10, 15, 22, 0.94));
  pointer-events: none;
}

.library-card.layout-overlay .library-image {
  height: 388px;
}

.library-card.layout-overlay .library-image > span {
  z-index: 3;
}

.library-card.layout-overlay .card-actions {
  top: 12px;
  right: 12px;
  bottom: auto;
  z-index: 4;
}

.library-card.layout-overlay .library-copy {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  min-height: 0;
  padding: 26px 22px 25px;
  color: white;
}

.library-card.layout-overlay .library-copy > span {
  color: #cfe0ee;
}

.library-card.layout-overlay .library-copy h3 {
  color: white;
  font-size: 24px;
}

.library-card.layout-overlay .library-copy p {
  color: rgba(255, 255, 255, 0.8);
  -webkit-line-clamp: 4;
}

.library-card.layout-overlay .image-credit {
  color: rgba(255, 255, 255, 0.65);
}

.empty-library {
  max-width: 1080px;
  min-height: 240px;
  margin: 0 auto;
  border: 1px dashed var(--line);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
}

.empty-library > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}

.empty-library h3 {
  margin: 14px 0 4px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 20px;
}

.empty-library p {
  margin: 0;
  font-size: 11px;
}

.empty-library > a {
  margin-top: 16px;
  padding: 10px 15px;
  border-radius: 10px;
  background: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: white;
  font-size: 10px;
  font-weight: 750;
  text-decoration: none;
}

.empty-library > a:hover {
  background: var(--accent);
}

/* Footer */

footer {
  min-height: 92px;
  padding: 26px clamp(22px, 5vw, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

footer .brand-icon {
  color: var(--accent);
}

footer p,
footer > span {
  color: var(--muted);
  font-size: 10px;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  border-radius: 12px;
  background: var(--ink);
  color: white;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.16);
  font-size: 11px;
  animation: toast-in 200ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

/* Responsive */

@media (max-width: 900px) {
  .maker {
    grid-template-columns: 1fr;
    margin: 40px 20px 72px;
  }

  .form-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 64px;
    padding: 0 18px;
  }

  .brand > span:last-child {
    display: none;
  }

  .main-nav a {
    padding: 8px 11px;
    font-size: 10px;
  }

  .resource-actions {
    grid-template-columns: 1fr;
  }

  .bible-controls {
    grid-template-columns: 0.8fr 1.35fr 0.7fr;
  }

  .image-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .maker {
    margin: 32px 12px 64px;
  }

  .form-panel,
  .preview-panel {
    padding: 26px 20px;
  }

  .preview-wrap {
    width: min(100%, 300px);
  }

  .library {
    padding: 56px 18px 70px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .library-card.layout-overlay,
  .library-card.layout-overlay .library-image {
    height: 300px;
  }

  .card-actions {
    opacity: 1;
  }

  .standalone-library-hero {
    margin-bottom: 40px;
  }

  .back-link {
    align-self: center;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  footer > span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
