:root {
  --ink: #111111;
  --muted: #767676;
  --line: #e9e9e9;
  --paper: #ffffff;
  --soft: #f5f5f5;
  --red: #e60023;
  --shadow: 0 14px 34px rgba(0, 0, 0, .12);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; width: 100%; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto auto minmax(220px, 1fr);
  gap: 16px;
  align-items: center;
  padding: 12px 18px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(233,233,233,.85);
  backdrop-filter: blur(16px);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 900; }
.brand-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
}
.nav { display: flex; gap: 6px; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  font-weight: 800;
}
.nav a.active { color: #fff; background: var(--ink); }
.search span { position: absolute; width: 1px; height: 1px; overflow: hidden; }
.search input {
  width: 100%;
  height: 44px;
  padding: 0 18px;
  background: #f1f1f1;
  border: 1px solid transparent;
  border-radius: 999px;
  outline: none;
}
.search input:focus { background: #fff; border-color: #cfcfcf; box-shadow: 0 0 0 4px rgba(230,0,35,.08); }
.intro {
  max-width: 760px;
  margin: 0 auto;
  padding: 36px 18px 16px;
  text-align: center;
}
.intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: 0;
}
.intro p {
  max-width: 620px;
  margin: 14px auto 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: 0;
}
.topic-row {
  position: sticky;
  top: 69px;
  z-index: 30;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px 18px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(233,233,233,.75);
  backdrop-filter: blur(16px);
}
.topic-row button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 15px;
  color: #333;
  background: var(--soft);
  border: 0;
  border-radius: 999px;
  font-weight: 800;
}
.topic-row button.active, .topic-row button:hover { color: #fff; background: var(--ink); }
.ad-ribbon {
  display: grid;
  place-items: center;
  max-width: 1100px;
  min-height: 74px;
  margin: 18px auto 8px;
  color: #9a9a9a;
  background: #fafafa;
  border: 1px dashed #d7d7d7;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
}
.board-wrap { padding: 8px 14px 34px; }
.masonry-board {
  column-count: 6;
  column-gap: 16px;
  max-width: 1540px;
  margin: 0 auto;
}
.pin-card {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0 0 16px;
  break-inside: avoid;
  overflow: hidden;
  background: #fff;
  border-radius: 18px;
}
.pin-image-btn {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #eee;
  border-radius: 18px;
}
.pin-card img {
  object-fit: cover;
  background: #eee;
  transition: filter .18s ease, transform .18s ease;
}
.pin-card:hover img { filter: brightness(.78); transform: scale(1.01); }
.pin-actions {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease;
}
.pin-card:hover .pin-actions { opacity: 1; transform: translateY(0); }
.save-btn, .download-btn {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}
.save-btn { color: #fff; background: var(--red); }
.download-btn { color: var(--ink); background: rgba(255,255,255,.92); }
.pin-info { padding: 9px 4px 2px; }
.pin-info h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.3;
  letter-spacing: 0;
}
.pin-info p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0;
}
.native-pin {
  display: grid;
  place-items: center;
  min-height: 280px;
  padding: 20px;
  color: #999;
  background: #f7f7f7;
  border: 1px dashed #d8d8d8;
  border-radius: 18px;
  text-align: center;
  break-inside: avoid;
  margin-bottom: 16px;
}
.native-pin strong { display: block; margin-top: 6px; color: #555; }
.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px 22px 34px;
  color: #777;
  border-top: 1px solid var(--line);
}
.site-footer div, .site-footer nav { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.site-footer strong { color: var(--ink); }
.site-footer a:hover { color: var(--red); }
.lightbox, .ad-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 60px 18px 28px;
  background: rgba(0,0,0,.82);
}
.lightbox[hidden], .ad-modal[hidden] { display: none; }
.lightbox img {
  max-width: min(1120px, 96vw);
  max-height: 82vh;
  object-fit: contain;
  border-radius: 18px;
  box-shadow: var(--shadow);
}
.round-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  color: #fff;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  font-weight: 900;
}
.round-close.dark { position: absolute; color: var(--ink); background: #f2f2f2; border: 0; }
.ad-dialog {
  position: relative;
  width: min(420px, 94vw);
  padding: 22px;
  background: #fff;
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.modal-label { margin: 0 0 12px; color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; }
.ad-window {
  display: grid;
  place-items: center;
  min-height: 250px;
  color: #777;
  background: #f6f6f6;
  border: 1px dashed #d3d3d3;
  border-radius: 16px;
  text-align: center;
}
.ad-window strong, .ad-window span { display: block; }
.download-link {
  display: grid;
  place-items: center;
  min-height: 44px;
  margin-top: 14px;
  color: #fff;
  background: var(--red);
  border-radius: 999px;
  font-weight: 900;
}
.download-link.disabled { pointer-events: none; background: #b8b8b8; }
@media (max-width: 1360px) { .masonry-board { column-count: 5; } }
@media (max-width: 1100px) { .masonry-board { column-count: 4; } }
@media (max-width: 820px) {
  .topbar { grid-template-columns: auto 1fr; }
  .nav { justify-content: end; }
  .search { grid-column: 1 / -1; }
  .topic-row { top: 115px; }
  .masonry-board { column-count: 3; }
}
@media (max-width: 620px) {
  .intro { padding-top: 24px; }
  .intro h1 { font-size: 34px; }
  .masonry-board { column-count: 2; column-gap: 10px; }
  .pin-card, .pin-image-btn { border-radius: 14px; }
  .pin-actions { opacity: 1; }
  .save-btn { display: none; }
  .download-btn { min-height: 34px; padding: 0 10px; font-size: 12px; }
  .site-footer { flex-direction: column; }
}
