:root {
  --accent-color: #e60023;
  --accent-hover: #ad081b;
  --fg-color: #f7f7f7;
  --muted-color: #b7b7b7;
  --border-color: rgba(255, 255, 255, 0.12);
  --main: #111111;
  --main-second: #1d1d1d;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(230, 0, 35, 0.28), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 26rem),
    var(--main);
  color: var(--fg-color);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
  padding: 0 0 6rem;
  margin: 0;
  font-size: 16px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 70%);
}


a {
  color: inherit;
  text-decoration: none;
}

.accent,
.no-decoration.accent {
  color: var(--accent-color);
}

.hide {
  display: none;
}

.bodyText,
.container {
  text-align: center;
}

button,
input {
  font: inherit;
}

input {
  width: 100%;
  outline: none;
  color: var(--fg-color);
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.9rem 1.1rem;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

input:focus {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(230, 0, 35, 0.72);
  box-shadow: 0 0 0 4px rgba(230, 0, 35, 0.18);
}

button,
.button-link {
  padding: 0.9rem 1.2rem;
  color: white;
  background: var(--accent-color);
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 800;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

button:hover,
.button-link:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(230, 0, 35, 0.28);
}

.secondary-button {
  color: var(--fg-color);
  background: var(--surface);
  border: 1px solid var(--border-color);
  box-shadow: none;
}

.secondary-button:hover {
  color: var(--fg-color);
  background: var(--surface-strong);
  box-shadow: none;
}

.compact-button {
  padding: 0.7rem 0.95rem;
  font-size: 0.88rem;
}

.save-search-button {
  justify-self: end;
  white-space: nowrap;
}

.pin-button {
  position: absolute;
  left: 0.85rem;
  bottom: 0.85rem;
  width: auto;
  padding: 0.78rem 1rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

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

.pin-open-link {
  display: block;
}

.img-result {
  padding-bottom: 4.2rem;
}

.img-result a,
.img-result img {
  display: block;
}

.img-result .pin-button {
  z-index: 2;
}

.feed-panel,
.boards-hero,
.board-card,
.pin-dialog,
.preview-dialog {
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.feed-panel {
  width: min(1120px, calc(100% - 2rem));
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.35rem;
}

.section-title-row,
.board-card-header,
.pin-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.section-title-row h2,
.board-card-header h2,
.pin-dialog-header h2 {
  margin: 0;
}

.section-title-row p,
.board-card-header p,
.pin-dialog-status {
  margin: 0;
  color: var(--muted-color);
}

.saved-feed-list,
.pin-board-list {
  margin-top: 1rem;
}

.pin-board-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0.75rem;
}

.feed-manager {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
  padding: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 18px;
}

.feed-manager p {
  margin: 0;
  color: var(--muted-color);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.feed-manager-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.feed-manager-chip {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  color: var(--fg-color);
  background: var(--surface-strong);
  border: 1px solid var(--border-color);
  border-radius: 999px;
}

.feed-manager-chip a {
  max-width: 12rem;
  overflow: hidden;
  padding: 0.5rem 0.15rem 0.5rem 0.75rem;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
  font-weight: 800;
}

.feed-remove-button {
  width: 2rem;
  min-width: 2rem;
  height: 2rem;
  padding: 0;
  color: var(--muted-color);
  background: transparent;
  box-shadow: none;
  font-size: 1.2rem;
  line-height: 1;
}

.feed-remove-button:hover {
  color: white;
  background: var(--accent-color);
  box-shadow: none;
}

.feed-image-grid {
  display: block;
  column-count: auto;
  column-width: 10rem;
  column-gap: 0.75rem;
}

.feed-image-grid .empty-inline {
  display: block;
  column-span: all;
}

.feed-image-grid .img-result {
  margin-bottom: 0.75rem;
  border-radius: 18px;
}

.feed-load-status {
  width: min(680px, calc(100% - 2rem));
  margin: 1.5rem auto;
  text-align: center;
  color: var(--muted-color);
  font-size: 0.95rem;
}

.feed-load-more {
  display: block;
  width: max-content;
  margin: 0 auto 1.5rem;
  border: 0;
  cursor: pointer;
}

.feed-sentinel {
  width: 100%;
  height: 1px;
}

.feed-sentinel[hidden] {
  display: none;
}

.feed-chip,
.board-choice {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: auto;
  padding: 0.7rem 0.95rem;
  color: var(--fg-color);
  background: var(--surface-strong);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: none;
}

.feed-chip:hover,
.board-choice:hover {
  color: var(--fg-color);
  background: var(--surface);
  box-shadow: none;
}

.feed-chip button {
  width: auto;
  padding: 0.35rem 0.6rem;
  color: inherit;
  background: var(--surface);
  box-shadow: none;
  font-size: 0.8rem;
}

.feed-chip button:hover {
  background: var(--surface-strong);
  box-shadow: none;
}

.feed-chip a {
  color: inherit;
  font-weight: 700;
}

.boards-page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 8rem;
}

.boards-hero {
  width: min(760px, 100%);
  margin: 0 auto 1.5rem;
  padding: clamp(1.5rem, 4vw, 2.5rem);
}

.board-create-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.board-create-form input {
  flex: 1 1 15rem;
  min-width: 0;
}

.boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  width: 100%;
  margin: 0 auto;
}

.boards-grid .empty-state {
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
}

.board-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
}

.board-card.is-dragging,
.board-pin.is-dragging {
  opacity: 0.45;
}

.board-cover {
  position: relative;
  display: grid;
  place-items: end start;
  min-height: 12rem;
  width: 100%;
  padding: 1rem;
  overflow: hidden;
  text-align: left;
  background-color: var(--surface-strong);
  background-position: center;
  background-size: cover;
  border-radius: 20px;
  box-shadow: inset 0 -5rem 4rem rgba(0, 0, 0, 0.45);
}

.board-cover:hover {
  box-shadow: inset 0 -5rem 4rem rgba(0, 0, 0, 0.5), 0 16px 34px rgba(0, 0, 0, 0.25);
}

.board-cover-empty,
.board-cover-empty:hover {
  cursor: default;
  color: var(--muted-color);
  background: var(--surface);
  box-shadow: none;
  transform: none;
}

.board-actions,
.board-pin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  justify-content: flex-end;
}

.board-title {
  min-width: 0;
}

.board-title h2 {
  overflow-wrap: anywhere;
}

.board-rename-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.board-rename-form[hidden] {
  display: none;
}

.board-rename-form input {
  flex: 1 1 12rem;
}

.drag-handle {
  cursor: grab;
}

.drag-handle:active {
  cursor: grabbing;
}

.board-pin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 0.75rem;
}

.board-pin {
  display: grid;
  gap: 0.55rem;
  align-content: start;
}

.board-pin a {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: var(--surface-strong);
}

.board-pin img {
  width: 100%;
  height: auto;
}

.board-pin-actions .compact-button {
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
}

.empty-inline {
  margin: 0;
  padding: 1rem;
  text-align: center;
  color: var(--muted-color);
  background: var(--surface);
  border: 1px dashed var(--border-color);
  border-radius: 18px;
}

.pin-dialog-backdrop,
.preview-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
}

.pin-dialog-backdrop[hidden],
.preview-dialog-backdrop[hidden] {
  display: none;
}

.pin-dialog {
  width: min(760px, 100%);
  max-height: min(90vh, 860px);
  overflow: auto;
  padding: 1.25rem;
  background: var(--main);
}

.pin-dialog-header button {
  width: auto;
  padding: 0.7rem 1rem;
}

.board-choice {
  justify-content: flex-start;
  width: 100%;
  min-height: 3.2rem;
  overflow-wrap: anywhere;
  text-align: left;
  border-radius: 16px;
  box-shadow: none;
}

.pin-dialog .board-create-form {
  gap: 0.75rem;
  margin-top: 1rem;
}

.pin-dialog > a {
  display: inline-flex;
  margin-top: 0.75rem;
  color: var(--muted-color);
  font-weight: 800;
}

.preview-dialog {
  position: relative;
  display: grid;
  place-items: center;
  width: min(1120px, 100%);
  max-height: min(92vh, 900px);
  overflow: hidden;
  padding: 1rem;
  background: var(--main);
}

.preview-close {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 2;
  width: auto;
  padding: 0.7rem 1rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
}

.preview-media {
  display: grid;
  place-items: center;
  min-height: 18rem;
  max-width: 100%;
  overflow: auto;
  background: rgba(0, 0, 0, 0.22);
  border-radius: calc(var(--radius) - 6px);
}

.preview-media img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(92vh - 4rem);
  border-radius: calc(var(--radius) - 10px);
}

/* home */


.mainContainer {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
}

.centered {
  position: relative;
  min-height: calc(100vh - 5rem);
  display: grid;
  place-items: center;
  transform: none;
  top: auto;
  left: auto;
}

.hero-panel {
  width: min(840px, 100%);
  padding: clamp(2rem, 8vw, 5rem);
  text-align: center;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-color);
  border-radius: clamp(28px, 6vw, 56px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

#bodyHeader,
.logo-wordmark {
  margin: 0;
  letter-spacing: -0.07em;
  line-height: 0.92;
}

#bodyHeader {
  font-size: clamp(3.8rem, 13vw, 9.5rem);
}

.logo-dot {
  display: inline-grid;
  place-items: center;
  width: 0.84em;
  height: 0.84em;
  margin-right: 0.04em;
  color: white;
  background: var(--accent-color);
  border-radius: 50%;
  font-family: Georgia, serif;
  font-style: italic;
  letter-spacing: -0.12em;
}

.mainContainer p,
.hero-copy {
  max-width: 46rem;
  margin: 1.2rem auto 2rem;
  color: var(--muted-color);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.6;
}

.searchContainer,
.search-box {
  width: min(680px, 100%);
  margin: 0 auto;
}

#inputWrapper,
.search-input-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem;
  text-align: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid var(--border-color);
  border-radius: 999px;
}

#inputWrapper input,
.search-input-row input {
  background: transparent;
  border: 0;
  box-shadow: none;
}

#inputWrapper input:focus,
.search-input-row input:focus {
  box-shadow: none;
}

.quick-searches {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.5rem;
}

.quick-searches a,
.search-chip {
  padding: 0.65rem 0.95rem;
  color: rgba(255, 255, 255, 0.84);
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid var(--border-color);
  border-radius: 999px;
}

.quick-searches a:hover,
.search-chip:hover {
  color: white;
  background: var(--surface-strong);
}

/* search */

.search-container {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(12rem, 44rem) auto;
  align-items: center;
  gap: 1rem;
  margin: 0;
  padding: 0.85rem clamp(9.5rem, 16vw, 12rem) 0.85rem clamp(1rem, 3vw, 2rem);
  background: rgba(17, 17, 17, 0.82);
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(18px);
}

.search-container h1 {
  margin: 0;
  font-size: 1.4rem;
}

.search-container input {
  min-width: 0;
}

.search-meta {
  justify-self: end;
  color: var(--muted-color);
  font-size: 0.95rem;
}

.results-heading {
  width: min(1400px, 100%);
  margin: 1.4rem auto 0;
  padding: 0 clamp(1rem, 2vw, 1.5rem);
}

.results-heading h2 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.7rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
}

.results-heading p {
  margin: 0;
  color: var(--muted-color);
}

.img-container {
  width: min(1400px, 100%);
  margin: 0 auto;
  column-count: auto;
  column-width: 15rem;
  column-gap: 1rem;
  padding: 1.4rem clamp(1rem, 2vw, 1.5rem) 2rem;
}

.img-result {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 1rem;
  overflow: hidden;
  break-inside: avoid;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateZ(0);
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.img-result:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46);
  filter: brightness(1.05);
}

.img-result img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.empty-state,
.next-page {
  width: min(680px, calc(100% - 2rem));
  margin: 2rem auto;
  padding: 2rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.next-page a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.next-page.auto-load .button-link {
  pointer-events: none;
}

.next-page.is-loading .button-link::before {
  content: "";
  width: 0.85rem;
  height: 0.85rem;
  margin-right: 0.6rem;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.next-page.has-error .button-link {
  pointer-events: auto;
  background: var(--surface-strong);
}

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

@media (hover: none) {
  button:hover,
  .button-link:hover,
  .img-result:hover {
    transform: none;
  }
}

/* footer */

.site-actions {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 7;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem;
  background: rgba(29, 29, 29, 0.78);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.top-action-link,
.theme-toggle {
  display: inline-grid;
  place-items: center;
  min-height: 2.45rem;
  color: rgba(255, 255, 255, 0.82);
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
}

.top-action-link {
  padding: 0.55rem 0.9rem;
}

.top-action-link:hover,
.theme-toggle:hover {
  color: white;
  background: var(--surface-strong);
  box-shadow: none;
}

footer {
  position: fixed;
  right: 50%;
  bottom: 1rem;
  z-index: 6;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.8rem;
  max-width: min(720px, calc(100% - 2rem));
  padding: 0.7rem 1rem;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(29, 29, 29, 0.78);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transform: translateX(50%);
}

footer a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

footer a:hover {
  color: white;
}

.theme-toggle {
  width: 2.45rem;
  padding: 0;
  font-size: 1.2rem;
  line-height: 1;
}

.footer-count {
  color: var(--muted-color);
}

/* donate */

.donate-container {
  width: min(760px, calc(100% - 2rem));
  margin: 3rem auto 7rem;
}

.donate-container h2 {
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  letter-spacing: -0.06em;
  margin-bottom: 1.5rem;
}

.flexbox-column {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.inner-wrap {
  min-width: 0;
  padding: 1.4rem;
}

.qr-box {
  width: 100%;
  display: flex;
  word-break: break-word;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.qr-box img {
  margin: 1rem;
  border-radius: 18px;
}

.flex-row {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
}

.flex-row a img {
  max-width: 220px;
  height: auto;
}

hr.small-line {
  border: 2px solid var(--fg-color);
  height: 0;
  width: 100px;
  margin: 30px;
  border-radius: 2px;
}

@media (prefers-color-scheme: light) {
  :root {
    --fg-color: #21191c;
    --muted-color: #62585c;
    --border-color: rgba(33, 25, 28, 0.12);
    --main: #fff8fa;
    --main-second: #ffffff;
    --surface: rgba(33, 25, 28, 0.055);
    --surface-strong: rgba(33, 25, 28, 0.105);
    --shadow: 0 18px 50px rgba(33, 25, 28, 0.12);
  }

  body {
    background:
      radial-gradient(circle at top left, rgba(230, 0, 35, 0.16), transparent 32rem),
      radial-gradient(circle at bottom right, rgba(33, 25, 28, 0.08), transparent 26rem),
      var(--main);
  }

  body::before {
    background-image: linear-gradient(rgba(33, 25, 28, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(33, 25, 28, 0.04) 1px, transparent 1px);
  }

  input {
    background: rgba(33, 25, 28, 0.06);
  }

  input::placeholder {
    color: rgba(33, 25, 28, 0.52);
  }

  input:focus {
    background: rgba(255, 255, 255, 0.78);
  }

  .hero-panel {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.54));
  }

  #inputWrapper,
  .search-input-row,
  .quick-searches a,
  .search-chip {
    background: rgba(33, 25, 28, 0.06);
  }

  .quick-searches a,
  .search-chip {
    color: rgba(33, 25, 28, 0.78);
  }

  .quick-searches a:hover,
  .search-chip:hover {
    color: var(--fg-color);
  }

  .search-container {
    background: rgba(255, 248, 250, 0.84);
  }

  .img-result {
    box-shadow: 0 1px 0 rgba(33, 25, 28, 0.08);
  }

  .img-result:hover {
    box-shadow: 0 18px 42px rgba(33, 25, 28, 0.18);
  }

  .site-actions {
    background: rgba(255, 255, 255, 0.78);
  }

  .top-action-link,
  .theme-toggle {
    color: rgba(33, 25, 28, 0.78);
  }

  footer {
    color: rgba(33, 25, 28, 0.66);
    background: rgba(255, 255, 255, 0.78);
  }

  footer a {
    color: rgba(33, 25, 28, 0.74);
  }

  footer a:hover {
    color: var(--fg-color);
  }
}

html[data-theme="light"] {
  --fg-color: #21191c;
  --muted-color: #62585c;
  --border-color: rgba(33, 25, 28, 0.12);
  --main: #fff8fa;
  --main-second: #ffffff;
  --surface: rgba(33, 25, 28, 0.055);
  --surface-strong: rgba(33, 25, 28, 0.105);
  --shadow: 0 18px 50px rgba(33, 25, 28, 0.12);
}

html[data-theme="dark"] {
  --fg-color: #f7f7f7;
  --muted-color: #b7b7b7;
  --border-color: rgba(255, 255, 255, 0.12);
  --main: #111111;
  --main-second: #1d1d1d;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at top left, rgba(230, 0, 35, 0.16), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(33, 25, 28, 0.08), transparent 26rem),
    var(--main);
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top left, rgba(230, 0, 35, 0.28), transparent 32rem),
    radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.08), transparent 26rem),
    var(--main);
}

html[data-theme="light"] body::before {
  background-image: linear-gradient(rgba(33, 25, 28, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(33, 25, 28, 0.04) 1px, transparent 1px);
}

html[data-theme="dark"] body::before {
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
}

html[data-theme="light"] input {
  background: rgba(33, 25, 28, 0.06);
}

html[data-theme="dark"] input {
  background: rgba(255, 255, 255, 0.11);
}

html[data-theme="light"] input::placeholder {
  color: rgba(33, 25, 28, 0.52);
}

html[data-theme="dark"] input::placeholder {
  color: rgba(255, 255, 255, 0.62);
}

html[data-theme="light"] input:focus {
  background: rgba(255, 255, 255, 0.78);
}

html[data-theme="dark"] input:focus {
  background: rgba(255, 255, 255, 0.16);
}

html[data-theme="light"] .hero-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.54));
}

html[data-theme="dark"] .hero-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
}

html[data-theme="light"] #inputWrapper,
html[data-theme="light"] .search-input-row,
html[data-theme="light"] .quick-searches a,
html[data-theme="light"] .search-chip {
  background: rgba(33, 25, 28, 0.06);
}

html[data-theme="dark"] #inputWrapper,
html[data-theme="dark"] .search-input-row,
html[data-theme="dark"] .quick-searches a,
html[data-theme="dark"] .search-chip {
  background: rgba(255, 255, 255, 0.11);
}

html[data-theme="light"] .quick-searches a,
html[data-theme="light"] .search-chip {
  color: rgba(33, 25, 28, 0.78);
}

html[data-theme="dark"] .quick-searches a,
html[data-theme="dark"] .search-chip {
  color: rgba(255, 255, 255, 0.84);
}

html[data-theme="light"] .quick-searches a:hover,
html[data-theme="light"] .search-chip:hover,
html[data-theme="light"] .theme-toggle:hover {
  color: var(--fg-color);
}

html[data-theme="dark"] .quick-searches a:hover,
html[data-theme="dark"] .search-chip:hover,
html[data-theme="dark"] .theme-toggle:hover {
  color: white;
}

html[data-theme="light"] .search-container {
  background: rgba(255, 248, 250, 0.84);
}

html[data-theme="dark"] .search-container {
  background: rgba(17, 17, 17, 0.82);
}

html[data-theme="light"] .img-result {
  box-shadow: 0 1px 0 rgba(33, 25, 28, 0.08);
}

html[data-theme="dark"] .img-result {
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="light"] .img-result:hover {
  box-shadow: 0 18px 42px rgba(33, 25, 28, 0.18);
}

html[data-theme="dark"] .img-result:hover {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46);
}

html[data-theme="light"] .site-actions {
  background: rgba(255, 255, 255, 0.78);
}

html[data-theme="dark"] .site-actions {
  background: rgba(29, 29, 29, 0.78);
}

html[data-theme="light"] .top-action-link,
html[data-theme="light"] .theme-toggle {
  color: rgba(33, 25, 28, 0.78);
}

html[data-theme="dark"] .top-action-link,
html[data-theme="dark"] .theme-toggle {
  color: rgba(255, 255, 255, 0.82);
}

html[data-theme="light"] footer {
  color: rgba(33, 25, 28, 0.66);
  background: rgba(255, 255, 255, 0.78);
}

html[data-theme="dark"] footer {
  color: rgba(255, 255, 255, 0.72);
  background: rgba(29, 29, 29, 0.78);
}

html[data-theme="light"] footer a {
  color: rgba(33, 25, 28, 0.74);
}

html[data-theme="dark"] footer a {
  color: rgba(255, 255, 255, 0.78);
}

html[data-theme="light"] .top-action-link:hover,
html[data-theme="light"] .theme-toggle:hover,
html[data-theme="light"] footer a:hover {
  color: var(--fg-color);
}

html[data-theme="dark"] .top-action-link:hover,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] footer a:hover {
  color: white;
}

@media only screen and (max-width: 750px) {
  body {
    padding-bottom: 2rem;
    font-size: 14px;
  }

  body:has(.img-container),
  body:has(.donate-container) {
    padding-bottom: 2rem;
  }

  input {
    font-size: 16px;
  }

  .mainContainer {
    width: 100%;
  }

  .centered {
    display: block;
    min-height: auto;
    padding: 4.5rem 0 2rem;
  }

  .hero-panel {
    width: 100%;
    padding: 1.4rem 0.8rem;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  #bodyHeader {
    font-size: clamp(3.3rem, 18vw, 5.2rem);
  }

  .mainContainer p,
  .hero-copy {
    margin: 0.9rem auto 1.25rem;
    font-size: 1rem;
    line-height: 1.45;
  }

  .feed-panel {
    width: 100%;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 22px;
  }

  #inputWrapper,
  .search-input-row {
    align-items: stretch;
    flex-direction: column;
    gap: 0.45rem;
    border-radius: 22px;
  }

  button,
  .button-link {
    width: 100%;
    padding: 0.82rem 1rem;
  }

  .search-container {
    position: static;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    padding: 4.4rem 0.75rem 0.85rem;
  }

  .search-container h1 {
    font-size: 1.15rem;
  }

  .save-search-button {
    justify-self: stretch;
  }

  .results-heading {
    margin-top: 1rem;
    padding: 0 0.85rem;
  }

  .results-heading h2 {
    font-size: clamp(1.5rem, 8vw, 2.4rem);
  }

  .search-meta {
    justify-self: start;
  }

  .img-container {
    column-width: 9.25rem;
    column-gap: 0.65rem;
    padding: 1rem 0.65rem 1.5rem;
  }

  .img-result {
    margin-bottom: 0.65rem;
    border-radius: 16px;
  }

  .img-result:hover {
    transform: none;
    filter: none;
  }

  .pin-button {
    left: 0.55rem;
    bottom: 0.55rem;
    padding: 0.58rem 0.75rem;
    font-size: 0.82rem;
  }

  .site-actions {
    top: 0.65rem;
    right: 0.65rem;
    gap: 0.35rem;
    padding: 0.35rem;
  }

  .top-action-link,
  .theme-toggle {
    min-height: 2.25rem;
  }

  .top-action-link {
    padding: 0.45rem 0.75rem;
  }

  footer {
    position: static;
    max-width: calc(100% - 1.5rem);
    margin: 2rem auto 0.75rem;
    border-radius: 22px;
    transform: none;
  }

  .theme-toggle {
    width: 2.25rem;
  }

  .pin-dialog-backdrop,
  .preview-dialog-backdrop {
    align-items: end;
    padding: 0.7rem;
  }

  .pin-dialog {
    width: 100%;
    max-height: calc(100dvh - 1.4rem);
    padding: 1rem;
    border-radius: 22px;
  }

  .pin-dialog-header {
    align-items: center;
  }

  .pin-board-list {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .pin-dialog .board-create-form {
    flex-direction: column;
  }

  .pin-dialog .board-create-form button,
  .board-choice {
    width: 100%;
  }

  .feed-manager {
    padding: 0.65rem;
  }

  .feed-manager-chip a {
    max-width: 10rem;
  }

  .boards-page {
    width: 100%;
    padding: 4.5rem 0.75rem 2rem;
  }

  .boards-hero {
    margin-bottom: 1rem;
    padding: 1.15rem;
    border-radius: 22px;
  }

  .boards-hero .logo-wordmark {
    display: inline-block;
    max-width: calc(100% - 7rem);
    font-size: 1.35rem;
  }

  .board-create-form {
    flex-direction: column;
  }

  .board-create-form input,
  .board-create-form button {
    width: 100%;
  }

  .board-create-form input {
    flex: 0 1 auto;
  }

  .boards-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .board-card {
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 22px;
  }

  .board-card-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .board-actions {
    justify-content: flex-start;
  }

  .board-cover {
    min-height: 10rem;
    border-radius: 18px;
  }

  .board-pin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .board-pin-actions {
    gap: 0.35rem;
  }

  .board-pin-actions .compact-button {
    padding: 0.48rem 0.56rem;
    font-size: 0.72rem;
  }

  .donate-container {
    text-align: center;
  }

  .qr-box {
    flex-direction: column;
  }

  .qr-box img {
    width: 45%;
    min-width: 140px;
    height: auto;
    padding: 0;
  }

  .preview-dialog {
    width: 100%;
    max-height: calc(100dvh - 1.4rem);
    overflow: auto;
    padding: 0.7rem;
    border-radius: 22px;
  }

  .preview-close {
    top: 0.7rem;
    left: 0.7rem;
  }

  .preview-media {
    min-height: 12rem;
  }

  .preview-media img {
    max-height: 80vh;
  }

  .board-actions,
  .board-pin-actions {
    justify-content: flex-start;
  }

  .pin-button,
  .board-card-header .secondary-button,
  .pin-dialog-header button,
  .board-pin-actions .secondary-button {
    width: auto;
  }
}
