:root {
  color-scheme: light;
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #121212;
  --muted: #767676;
  --line: #e9e9e9;
  --chip: #f1f1f1;
  --accent: #111111;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  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;
}

.appHeader {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  min-height: 72px;
  padding: 12px clamp(16px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
  background: rgb(255 255 255 / 96%);
  backdrop-filter: blur(14px);
}

.brandMark {
  display: inline-block;
  color: var(--ink);
  font-size: 25px;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  white-space: nowrap;
}

.headerSearch input {
  width: 100%;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #f1f1f1;
  color: var(--ink);
  padding: 0 18px;
  outline: none;
}

.headerLink,
.backLink,
.brandFilter {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 13px;
  font-size: 13px;
  font-weight: 850;
}

.languageToggle {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-self: end;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 2px;
}

.languageToggle button {
  width: 34px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.languageToggle button.active {
  background: var(--ink);
  color: #fff;
}

main {
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 18px clamp(12px, 2.6vw, 34px) 58px;
}

.boardTitle {
  display: grid;
  gap: 8px;
  padding: 6px 0 14px;
}

.backLink {
  display: none;
  width: fit-content;
  color: var(--muted);
}

.boardTitle h1 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.05;
  letter-spacing: 0;
}

.boardTitle p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.topicHero {
  max-width: 980px;
}

.topicBackLink {
  display: inline-flex;
}

.topicTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topicTag,
.topicProduct {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #f1f1f1;
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 850;
}

.topicBrief {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  margin-bottom: 16px;
}

.topicBriefText {
  display: grid;
  gap: 5px;
}

.topicBriefText strong {
  font-size: 16px;
}

.topicBriefText span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.topicLeaders,
.topicProducts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.topicLeader {
  min-height: 38px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 11px;
}

.topicLeader strong {
  font-size: 13px;
}

.topicLeader small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.brandFilters {
  display: flex;
  gap: 9px;
  overflow-x: auto;
  padding: 0 0 16px;
  scrollbar-width: none;
}

.brandFilters::-webkit-scrollbar {
  display: none;
}

.brandFilter {
  flex: 0 0 auto;
  cursor: pointer;
}

.brandFilter.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.pinBoard {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 8px;
  gap: 14px;
  align-items: start;
}

.pinCard {
  display: block;
  width: 100%;
  margin: 0;
  border-radius: 8px;
  background: transparent;
  overflow: visible;
  box-shadow: none;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.pinCard:hover {
  transform: translateY(-3px);
  box-shadow: none;
}

.pinMedia {
  position: relative;
  aspect-ratio: 4 / 5;
  min-height: 0;
  border-radius: 8px;
  background: #f1f1f1;
  overflow: hidden;
}

.pinMedia.tall {
  aspect-ratio: 3 / 4;
}

.pinMedia.short {
  aspect-ratio: 1 / 1;
}

.pinMedia::after {
  content: "";
  position: absolute;
  inset: 38% 0 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0%) 0%, rgb(0 0 0 / 76%) 100%);
  pointer-events: none;
}

.pinMedia img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pinMedia.tall img {
  min-height: 0;
}

.pinMedia.short img {
  min-height: 0;
  max-height: none;
}

.pinOverlay {
  position: absolute;
  left: 9px;
  right: 9px;
  top: 9px;
  bottom: auto;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  z-index: 2;
}

.pinBadge,
.pinScore {
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgb(255 255 255 / 92%);
  color: var(--ink);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.pinScore {
  color: var(--accent);
}

.pinBody {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 52px 12px 12px;
  color: #fff;
}

.pinTitle {
  margin: 0;
  font-size: 17px;
  line-height: 1.18;
  overflow-wrap: anywhere;
  color: #fff;
  text-shadow: 0 1px 16px rgb(0 0 0 / 50%);
}

.pinMeta,
.pinReason {
  margin: 7px 0 0;
  color: rgb(255 255 255 / 82%);
  font-size: 12px;
  line-height: 1.45;
}

.pinReason {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.topicProducts {
  margin-top: 10px;
}

.topicProduct {
  max-width: 100%;
  background: rgb(255 255 255 / 88%);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emptyMessage {
  border-radius: 8px;
  background: #f7f7f7;
  padding: 26px;
  color: var(--muted);
}

@media (max-width: 1180px) {
  .pinBoard {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .topicBrief {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 880px) {
  .appHeader {
    grid-template-columns: auto 1fr auto;
  }

  .headerSearch {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .headerLink {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
  }

  .languageToggle {
    grid-column: 2;
    grid-row: 1;
  }

  .pinBoard {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .appHeader {
    padding: 12px;
  }

  main {
    padding-inline: 10px;
  }

  .boardTitle h1 {
    font-size: 34px;
  }

  .pinBoard {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .pinCard {
    border-radius: 8px;
  }

  .pinMedia,
  .pinMedia img {
    min-height: 0;
  }

  .pinMedia.tall img {
    min-height: 0;
  }

  .pinTitle {
    font-size: 15px;
  }

  .pinBody {
    padding: 44px 10px 10px;
  }
}
