:root {
  color-scheme: light;
  --bg: #f6f8f7;
  --ink: #151515;
  --muted: #74716b;
  --line: #ddd8d7;
  --surface: #ffffff;
  --brand-green: #33821e;
  --brand-purple: #821e6f;
  --accent: var(--brand-green);
  --accent-ink: #ffffff;
  --shadow: 0 20px 45px rgba(51, 130, 30, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  position: relative;
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: -28%;
  z-index: 0;
  background-image: url("./assets/pikaroo-pattern.png");
  background-position: 0 0;
  background-repeat: repeat;
  background-size: 900px 620px;
  content: "";
  opacity: 0.058;
  pointer-events: none;
}

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

.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 124px;
  padding: 24px clamp(18px, 4vw, 48px) 14px;
  background: transparent;
}

.logo {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.logo-image {
  display: block;
  width: min(570px, 90vw);
  height: auto;
  mix-blend-mode: normal;
}

.layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: clamp(18px, 3vw, 38px);
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: clamp(18px, 4vw, 46px);
  isolation: isolate;
  z-index: 1;
}

.gallery {
  position: relative;
  min-width: 0;
  z-index: 1;
}

.active-filter-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 42px;
  margin: 0 0 14px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.active-filter-chips[hidden] {
  display: flex;
  visibility: hidden;
}

.active-filter-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid color-mix(in srgb, var(--brand-purple) 44%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-purple) 10%, white);
  color: var(--brand-purple);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
}

.load-more-button {
  display: block;
  min-height: 44px;
  margin: clamp(18px, 3vw, 28px) auto 0;
  padding: 10px 20px;
  border: 1px solid var(--brand-green);
  border-radius: 999px;
  background: var(--brand-green);
  color: var(--accent-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 760;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.load-more-button:hover {
  border-color: var(--brand-purple);
  background: var(--brand-purple);
  transform: translateY(-1px);
}

.load-more-button[hidden] {
  display: none;
}

.post-item {
  position: relative;
  min-width: 0;
}

.post-card {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  outline-offset: 4px;
  touch-action: manipulation;
}

.skeleton-card {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 76%, var(--bg));
  box-shadow: var(--shadow);
}

.skeleton-card::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255, 255, 255, 0.72) 45%,
    transparent 72%
  );
  content: "";
  animation: skeleton-sweep 1200ms ease-in-out infinite;
  transform: translateX(-100%);
}

@keyframes skeleton-sweep {
  to {
    transform: translateX(100%);
  }
}

.post-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition:
    transform 180ms ease,
    filter 180ms ease;
}

.post-card:hover > img,
.post-card:focus-visible > img {
  transform: scale(1.035);
  filter: saturate(1.04) contrast(1.03);
}

.post-card:hover,
.post-card:focus-visible {
  border-color: color-mix(in srgb, var(--brand-green) 52%, var(--line));
}

.watermark {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(130, 30, 111, 0.16);
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.watermark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  transform: none;
  filter: none;
}

.share-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--brand-purple);
  box-shadow: 0 10px 24px rgba(25, 23, 20, 0.12);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-3px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.post-item:hover .share-button,
.share-button:focus-visible {
  opacity: 1;
  transform: translateY(0);
}

.filters {
  min-width: 0;
  z-index: 1;
}

.filter-sticky {
  position: sticky;
  top: 100px;
  display: grid;
  gap: 16px;
}

.filter-list {
  display: grid;
  gap: 9px;
}

.filter-group {
  display: grid;
  gap: 9px;
}

.filter-title {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0;
}

.filter-button {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 680;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.filter-button:hover {
  border-color: color-mix(in srgb, var(--brand-purple) 55%, var(--line));
  color: var(--brand-purple);
  transform: translateX(-2px);
}

.filter-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 160px;
  display: grid;
  gap: 12px;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  text-align: center;
}

.empty-reset-button {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--brand-green);
  border-radius: 999px;
  background: var(--brand-green);
  color: var(--accent-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 760;
  cursor: pointer;
}

.copy-status {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  margin: 0;
  padding: 10px 13px;
  border-radius: 999px;
  background: var(--brand-purple);
  color: #ffffff;
  box-shadow: 0 14px 34px rgba(25, 23, 20, 0.18);
  font-size: 13px;
  font-weight: 760;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.copy-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.side-contact {
  display: grid;
  gap: 9px;
  padding-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 680;
}

.side-contact a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: inherit;
  text-decoration: none;
}

.side-contact a:hover {
  color: var(--brand-purple);
}

.site-note {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  margin: -12px auto 34px;
  padding: 0 clamp(18px, 4vw, 46px);
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
  font-size: 12px;
  font-weight: 620;
  line-height: 1.55;
  text-align: center;
}

.site-note a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.site-note a:hover {
  color: var(--brand-purple);
}

.instagram-link svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

@media (max-width: 900px) {
  .site-header {
    min-height: 104px;
    padding: 18px 16px 9px;
  }

  .logo-image {
    width: min(450px, 90vw);
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 12px clamp(12px, 3vw, 22px) 26px;
  }

  .layout::before {
    content: none;
  }

  body::before {
    inset: -34%;
    background-size: 620px 427px;
    opacity: 0.05;
  }

  .filters {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 8;
    margin-inline: calc(clamp(12px, 3vw, 22px) * -1);
    padding: 10px clamp(12px, 3vw, 22px) 16px;
    background: rgba(246, 248, 247, 0.94);
    border-bottom: 1px solid color-mix(in srgb, var(--brand-purple) 18%, var(--line));
    backdrop-filter: blur(14px);
  }

  .filter-sticky {
    position: static;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
  }

  .filter-list,
  .filter-group,
  .side-contact {
    display: contents;
  }

  .filter-button {
    width: auto;
    min-width: max-content;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 13px;
    text-align: center;
    white-space: nowrap;
  }

  .filter-button:hover {
    transform: translateY(-1px);
  }

  .filter-title {
    display: none;
  }

  .post-grid {
    gap: 12px;
  }

  .post-card {
    border-radius: 7px;
    box-shadow: 0 12px 28px rgba(25, 23, 20, 0.08);
  }

  .share-button {
    top: 8px;
    right: 8px;
    min-height: 30px;
    padding: 5px 9px;
    opacity: 1;
    transform: none;
  }

  .watermark {
    right: 8px;
    bottom: 8px;
    width: 32px;
    height: 32px;
    padding: 5px;
  }

  .watermark img {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 760px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .layout {
    padding-inline: 10px;
    padding-bottom: 22px;
  }

  .post-grid {
    gap: 9px;
  }

  .filters {
    margin-inline: -10px;
    padding-inline: 10px;
  }

  .filter-button {
    min-height: 36px;
    padding-inline: 11px;
    font-size: 12px;
  }

  .watermark {
    right: 6px;
    bottom: 6px;
    width: 30px;
    height: 30px;
    padding: 4px;
  }

  .watermark img {
    width: 22px;
    height: 22px;
  }
}
