/* ============================================================
   皮卡堂文学 · 经典家具文案馆
   A pastel, pixel-flavoured fan archive.
   ============================================================ */

@font-face {
  font-family: "Zpix";
  src: url("../fonts/zpix-subset.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #fffaf0;
  --paper: #fffdf6;
  --paper-deep: #fff5df;
  --ink: #5b3a2a;
  --ink-soft: #7c5a46;
  --ink-faint: #a98770;
  --pink: #f7b3c8;
  --pink-deep: #e2648a;
  --pink-dark: #a84264;
  --yellow: #ffd966;
  --yellow-deep: #e5b53e;
  --mint: #cfe8cf;
  --mint-deep: #78a878;
  --blue: #c9def0;
  --blue-deep: #7899b8;
  --lav: #ddd2f0;
  --lav-deep: #9b85bd;
  --line: #d9a57f;
  --line-dark: #8a5a3b;
  --shadow: rgba(138, 90, 59, 0.16);
  --shadow-deep: rgba(138, 90, 59, 0.26);
  --radius: 18px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Zpix", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", monospace;
  font-size: 14px;
  line-height: 1.8;
  background-color: #fbe3ea;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.42) 50%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.42) 50%, transparent 50%);
  background-size: 56px 56px;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.85), transparent 32%),
    radial-gradient(circle at 88% 18%, rgba(255, 241, 184, 0.65), transparent 28%),
    radial-gradient(circle at 50% 100%, rgba(255, 255, 255, 0.6), transparent 45%),
    linear-gradient(180deg, #fde7ee 0%, #f9d9e4 52%, #fce9e2 100%);
}

img { max-width: 100%; display: block; }
a { color: var(--pink-dark); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: var(--pink); color: #fff; }

:focus-visible {
  outline: 3px dashed var(--pink-deep);
  outline-offset: 3px;
}

/* ---------- pixel decorations ---------- */

.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.page-bg span { position: absolute; opacity: 0.56; }

.px-cloud {
  width: 10px;
  height: 10px;
  background: #fff;
  box-shadow:
    10px 0 #fff, 20px 0 #fff, 30px 0 #fff,
    -10px 10px #fff, 0 10px #fff, 10px 10px #fff, 20px 10px #fff, 30px 10px #fff, 40px 10px #fff,
    0 20px #fff, 10px 20px #fff, 20px 20px #fff, 30px 20px #fff;
  animation: drift 26s ease-in-out infinite alternate;
}

.c1 { top: 11%; left: 6%; transform: scale(1.2); }
.c2 { top: 24%; right: 8%; transform: scale(0.85); animation-delay: -8s; }
.c3 { top: 62%; left: 3%; transform: scale(0.65); animation-delay: -14s; }

.px-star {
  width: 6px;
  height: 6px;
  background: var(--yellow);
  box-shadow:
    0 -6px var(--yellow), 0 6px var(--yellow), -6px 0 var(--yellow), 6px 0 var(--yellow),
    -12px -12px rgba(255, 255, 255, 0.9), 12px 12px rgba(255, 255, 255, 0.9);
  animation: twinkle 4.5s steps(2, end) infinite;
}

.s1 { top: 18%; left: 26%; }
.s2 { top: 9%; right: 30%; animation-delay: -1.4s; transform: scale(0.8); }
.s3 { top: 48%; right: 5%; animation-delay: -2.6s; }

.px-heart {
  width: 6px;
  height: 6px;
  background: var(--pink-deep);
  box-shadow:
    6px 0 var(--pink-deep), 18px 0 var(--pink-deep), 24px 0 var(--pink-deep),
    0 6px var(--pink-deep), 6px 6px var(--pink-deep), 12px 6px var(--pink-deep), 18px 6px var(--pink-deep), 24px 6px var(--pink-deep), 30px 6px var(--pink-deep),
    0 12px var(--pink-deep), 6px 12px var(--pink-deep), 12px 12px var(--pink-deep), 18px 12px var(--pink-deep), 24px 12px var(--pink-deep), 30px 12px var(--pink-deep),
    6px 18px var(--pink-deep), 12px 18px var(--pink-deep), 18px 18px var(--pink-deep), 24px 18px var(--pink-deep),
    12px 24px var(--pink-deep), 18px 24px var(--pink-deep);
}

.h1 { top: 34%; left: 9%; transform: scale(0.8); animation: floaty 7s ease-in-out infinite; }
.h2 { top: 57%; right: 11%; transform: scale(0.55); animation: floaty 8s ease-in-out infinite reverse; }

@keyframes drift {
  from { transform: translateX(0) translateY(0); }
  to { transform: translateX(34px) translateY(-12px); }
}
@keyframes twinkle {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}
@keyframes floaty {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  padding: 64px 20px 34px;
}

.hero-card {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 44px 34px;
  text-align: center;
  background:
    linear-gradient(rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    repeating-linear-gradient(0deg, transparent 0 31px, rgba(217, 165, 127, 0.14) 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, rgba(217, 165, 127, 0.14) 31px 32px),
    var(--cream);
  border: 3px solid var(--line-dark);
  border-radius: 34px;
  box-shadow:
    0 0 0 7px var(--cream),
    0 0 0 10px var(--line),
    11px 13px 0 rgba(138, 90, 59, 0.16);
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  top: 24px;
  width: 9px;
  height: 9px;
  background: var(--pink);
  box-shadow:
    9px 0 var(--pink), 18px 0 var(--pink),
    0 9px var(--pink), 9px 9px var(--pink), 18px 9px var(--pink),
    9px 18px var(--pink);
  opacity: 0.9;
}
.hero-card::before { left: 30px; }
.hero-card::after { right: 30px; transform: scale(-1, 1); }

.tape {
  position: absolute;
  top: -14px;
  width: 94px;
  height: 28px;
  background: rgba(255, 224, 138, 0.78);
  border-left: 2px dashed rgba(185, 138, 62, 0.4);
  border-right: 2px dashed rgba(185, 138, 62, 0.4);
  box-shadow: 0 2px 4px rgba(138, 90, 59, 0.12);
  z-index: 2;
}
.tape-l { left: 72px; transform: rotate(-5deg); }
.tape-r { right: 72px; transform: rotate(4deg); }

.eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 2.4px;
  color: var(--ink-faint);
}

.logo {
  margin: 0;
  font-size: clamp(48px, 7.6vw, 82px);
  line-height: 1.06;
  letter-spacing: 5px;
  font-weight: 400;
  text-shadow:
    3px 3px 0 #fff,
    6px 6px 0 rgba(217, 165, 127, 0.28);
}

.logo-pink { color: var(--pink-deep); }
.logo-brown { color: var(--line-dark); margin-left: 6px; }

.subtitle {
  display: inline-block;
  margin: 16px 0 0;
  padding: 4px 18px 5px;
  font-size: 18px;
  letter-spacing: 8px;
  color: var(--pink-dark);
  background: #fff;
  border: 2px dashed var(--pink);
  border-radius: 999px;
}

.tagline {
  margin: 18px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
  letter-spacing: 1px;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 26px 0 24px;
  padding: 16px 10px;
  border-top: 2px dotted var(--line);
  border-bottom: 2px dotted var(--line);
}

.stat { display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.stat strong { font-size: 30px; color: var(--pink-deep); font-weight: 400; }
.stat span { margin-top: 5px; font-size: 11px; letter-spacing: 1px; color: var(--ink-faint); }
.dot { width: 6px; height: 6px; background: var(--line); box-shadow: 6px 0 var(--line); }

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 22px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.2;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  color: #6b4328;
  background: var(--yellow);
  border: 2px solid #b98a3e;
  box-shadow: 3px 3px 0 #d7a84b;
}
.btn-primary:hover { background: #ffe27f; box-shadow: 4px 4px 0 #d7a84b; }

.btn-ghost {
  color: var(--ink-soft);
  background: #fffdf6;
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 rgba(217, 165, 127, 0.35);
}
.btn-ghost:hover { background: #fff7e4; }

.btn-icon { font-size: 16px; color: var(--pink-deep); }

.hero-note {
  margin: 22px 0 0;
  font-size: 11px;
  letter-spacing: 1px;
  color: var(--ink-faint);
}

/* ---------- toolbar ---------- */

#archive { scroll-margin-top: 92px; }

main {
  position: relative;
  z-index: 1;
  width: min(1380px, calc(100% - 40px));
  margin: 0 auto;
  padding: 8px 0 60px;
}

.toolbar {
  position: sticky;
  top: 10px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 16px;
  padding: 12px 16px;
  background: rgba(255, 250, 240, 0.9);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: 5px 5px 0 rgba(217, 165, 127, 0.22);
  backdrop-filter: blur(8px);
}

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

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px 6px;
  font-size: 13px;
  line-height: 1.2;
  color: var(--ink-soft);
  background: #fffdf7;
  border: 2px solid var(--line);
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(217, 165, 127, 0.28);
  transition: all 0.14s ease;
  white-space: nowrap;
}
.chip:hover { background: #fff2dc; transform: translateY(-1px); }
.chip .count { font-size: 10px; color: var(--ink-faint); }
.chip.active {
  color: #7c2c4a;
  background: var(--pink);
  border-color: var(--pink-deep);
  box-shadow: 1px 1px 0 rgba(162, 66, 100, 0.3);
  transform: translateY(1px);
}
.chip.active .count { color: #7c2c4a; }
.chip.fav-chip { border-style: dashed; }
.chip.fav-chip.active { background: #ffd7e3; }

.search-box {
  position: relative;
  flex: 0 0 270px;
}
.search-box input {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 34px;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 999px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-box input::placeholder { color: #b79a87; }
.search-box input:focus {
  border-color: var(--pink-deep);
  box-shadow: 0 0 0 3px rgba(226, 100, 138, 0.16);
}
.search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 12px;
  height: 12px;
  margin-top: -7px;
  border: 2px solid var(--ink-faint);
  border-radius: 50%;
  pointer-events: none;
}
.search-icon::after {
  content: "";
  position: absolute;
  right: -5px;
  bottom: -4px;
  width: 7px;
  height: 2px;
  background: var(--ink-faint);
  transform: rotate(45deg);
}
.clear-search {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  padding: 0;
  line-height: 20px;
  font-size: 16px;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  border-radius: 50%;
}
.clear-search:hover { background: #ffe3ea; color: var(--pink-dark); }

.result-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 6px 18px;
}
#resultCount { margin: 0; font-size: 13px; color: var(--ink-soft); }
#resultCount b { color: var(--pink-deep); font-weight: 400; }
.result-hint { margin: 0; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.5px; }

/* ---------- masonry ---------- */

.masonry {
  column-count: 4;
  column-gap: 20px;
}

/* JS masonry: shortest-column packing, left-to-right order. */
.masonry.js-masonry {
  position: relative;
  column-count: initial;
  column-gap: 0;
}
.masonry.js-masonry .card {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  margin: 0;
  content-visibility: visible;
  contain-intrinsic-size: none;
}

.card {
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  break-inside: avoid;
  overflow: hidden;
  text-align: left;
  background: var(--paper);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 5px 5px 0 var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  opacity: 0;
  transform: translateY(14px);
}
.card.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease, transform 0.45s ease, box-shadow 0.18s ease;
}
.card:hover {
  transform: translateY(-4px) rotate(-0.25deg);
  box-shadow: 8px 9px 0 var(--shadow-deep);
}

.card-banner {
  position: relative;
  aspect-ratio: 636 / 256;
  overflow: hidden;
  background: var(--paper-deep);
  border-bottom: 2px dashed #e8c9a8;
}
.card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.card:hover .card-banner img { transform: scale(1.025); }

.card-body { padding: 14px 16px 12px; }

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.card-id {
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--ink-faint);
}

.cat-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 3px;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: 1px;
  color: #6b4328;
  background: var(--mint);
  border: 1px solid rgba(107, 67, 40, 0.22);
  border-radius: 999px;
  white-space: nowrap;
}
.cat-tag::before {
  content: "";
  width: 5px;
  height: 5px;
  background: currentColor;
  opacity: 0.55;
}
.cat-治愈 { background: #d9ecd2; color: #4f7448; }
.cat-爱情 { background: #ffd6e2; color: #9c3f60; }
.cat-孤独 { background: #d9e4f2; color: #4e6b8c; }
.cat-童话 { background: #ffedb8; color: #8b6a1f; }
.cat-节日 { background: #ffd9c8; color: #9b4b32; }
.cat-趣味 { background: #ccebe6; color: #3f716b; }
.cat-小物 { background: #e8e1d4; color: #6f604e; }

.card-name {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0.5px;
  color: var(--line-dark);
  text-shadow: 1px 1px 0 #fff;
}

.card-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.95;
  color: #6b4a3a;
  white-space: pre-line;
  word-break: break-word;
  text-wrap: pretty;
}

.card-desc::before {
  content: "“";
  color: var(--pink);
  margin-right: 1px;
}
.card-desc::after {
  content: "”";
  color: var(--pink);
  margin-left: 1px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 13px;
  padding-top: 10px;
  border-top: 1px dotted #e2c6a8;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 62%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 10px;
  letter-spacing: 0.3px;
  color: var(--ink-faint);
}
.source-chip::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  background: var(--pink);
  box-shadow: 0 0 0 2px rgba(247, 179, 200, 0.28);
}
.source-chip.weibo::before { background: var(--yellow-deep); box-shadow: 0 0 0 2px rgba(229, 181, 62, 0.24); }

.card-actions { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }

.icon-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 15px;
  line-height: 1;
  color: #d98aa4;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 50%;
  transition: all 0.14s ease;
}
.icon-btn:hover { background: #ffe6ee; border-color: #f3c0d0; }
.icon-btn.is-fav { color: var(--pink-deep); }

.origin-btn {
  padding: 3px 10px 4px;
  font-size: 11px;
  line-height: 1.4;
  color: #7a4a2a;
  background: var(--yellow);
  border: 2px dashed #b98a3e;
  border-radius: 999px;
  transition: all 0.14s ease;
  white-space: nowrap;
}
.origin-btn:hover { background: #ffe27f; transform: translateY(-1px); }

/* ---------- empty ---------- */

.empty {
  padding: 60px 20px 70px;
  text-align: center;
}
.empty-face {
  width: 86px;
  height: 86px;
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: var(--ink-soft);
  background: var(--cream);
  border: 3px solid var(--line);
  border-radius: 22px;
  box-shadow: 5px 5px 0 var(--shadow);
  transform: rotate(-3deg);
}
.empty h2 { margin: 0 0 6px; font-size: 24px; font-weight: 400; color: var(--line-dark); }
.empty p { margin: 0 0 20px; color: var(--ink-faint); font-size: 13px; }

/* ---------- archive note ---------- */

.archive-note[hidden] { display: none; }

.archive-note {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 20px;
  margin: 46px 0 0;
}

.note-card {
  padding: 26px 28px;
  background: var(--cream);
  border: 2px solid var(--line);
  border-radius: 20px;
  box-shadow: 5px 5px 0 var(--shadow);
}
.note-card h2 {
  margin: 0 0 12px;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 1px;
  color: var(--line-dark);
}
.note-card p { margin: 0 0 10px; font-size: 12.5px; line-height: 1.95; color: var(--ink-soft); }
.note-card.small { background: #fff3f6; border-color: #e8b7c6; }
.signature { text-align: right; color: var(--pink-dark) !important; }

.note-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 14px; }
.text-link {
  font-size: 12px;
  color: var(--pink-dark);
  border-bottom: 1px dashed currentColor;
}
.text-link:hover { text-decoration: none; color: var(--pink-deep); }

/* ---------- footer ---------- */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 20px;
  padding: 34px 20px 40px;
  text-align: center;
  background: rgba(255, 250, 240, 0.72);
  border-top: 2px dashed #d9a57f;
}
.footer-inner { max-width: 900px; margin: 0 auto; }
.footer-logo { margin: 0 0 10px; font-size: 18px; letter-spacing: 2px; color: var(--pink-deep); }
.site-footer p { margin: 4px 0; font-size: 11px; line-height: 1.9; color: var(--ink-faint); }
.site-footer a { color: var(--ink-soft); border-bottom: 1px dotted var(--line); }
.copyright { opacity: 0.86; }
.made { margin-top: 12px !important; letter-spacing: 1px; }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}
.lightbox[hidden] { display: none; }

.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(72, 38, 54, 0.55);
  backdrop-filter: blur(7px);
  animation: fadeIn 0.22s ease both;
}

.lb-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  width: min(1080px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  background: var(--paper);
  border: 3px solid var(--line-dark);
  border-radius: 24px;
  box-shadow:
    0 0 0 6px var(--cream),
    0 0 0 9px var(--line),
    14px 16px 0 rgba(72, 38, 54, 0.24);
  animation: popIn 0.26s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 6;
  width: 38px;
  height: 38px;
  padding: 0;
  font-size: 24px;
  line-height: 30px;
  color: #fff;
  background: #e05a5a;
  border: 2px solid #a83a3a;
  border-radius: 50%;
  box-shadow: 2px 2px 0 rgba(120, 40, 40, 0.3);
}
.lb-close:hover { background: #f06a6a; transform: rotate(6deg); }

.lb-nav {
  position: absolute;
  top: 50%;
  z-index: 6;
  width: 38px;
  height: 46px;
  padding: 0;
  font-size: 30px;
  line-height: 1;
  color: var(--line-dark);
  background: rgba(255, 250, 240, 0.92);
  border: 2px solid var(--line);
  border-radius: 12px;
  box-shadow: 2px 3px 0 var(--shadow);
}
.lb-nav:hover { background: #fff; transform: translateY(-2px); }
.lb-prev { left: 12px; transform: translateY(-50%); }
.lb-next { right: 12px; transform: translateY(-50%); }
.lb-prev:hover { transform: translateY(calc(-50% - 2px)); }
.lb-next:hover { transform: translateY(calc(-50% - 2px)); }

.lb-shot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 34px 30px 22px;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8), transparent 40%),
    repeating-linear-gradient(45deg, rgba(217, 165, 127, 0.08) 0 12px, transparent 12px 24px),
    #f8e5d5;
  border-right: 2px dashed #e0bd9c;
  overflow: auto;
}

.lb-shot {
  max-width: 100%;
  padding: 8px;
  background: #fff;
  border: 2px solid var(--line);
  box-shadow: 5px 5px 0 rgba(138, 90, 59, 0.2);
  transform: rotate(-0.6deg);
}
.lb-shot img {
  display: block;
  max-width: 100%;
  max-height: 58vh;
  width: auto;
  height: auto;
  object-fit: contain;
  image-rendering: pixelated;
}
.lb-shot-note { margin: 16px 0 0; font-size: 10px; letter-spacing: 0.5px; color: #9c735b; text-align: center; }

.lb-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 42px 40px 32px;
  overflow: auto;
}
.lb-kicker { margin: 0 0 6px; font-size: 10px; letter-spacing: 2px; color: var(--ink-faint); }
.lb-title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lb-title-row h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 1px;
  color: var(--line-dark);
  text-shadow: 2px 2px 0 #fff;
}
.lb-desc {
  position: relative;
  margin: 26px 0 0;
  padding: 0 0 0 22px;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 2.1;
  color: #5f3f2f;
  white-space: pre-line;
  border-left: 4px solid var(--pink);
}
.lb-desc::before {
  content: "“";
  position: absolute;
  left: 10px;
  top: -22px;
  font-size: 46px;
  line-height: 1;
  color: var(--pink);
  opacity: 0.7;
}
.lb-source { margin: 26px 0 0; font-size: 11px; color: var(--ink-faint); }
.lb-source a { color: var(--ink-soft); border-bottom: 1px dotted var(--line); }
.lb-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.lb-actions .btn { min-height: 36px; padding: 6px 16px; font-size: 12px; }
.lb-counter { margin: 18px 0 0; font-size: 10px; letter-spacing: 1px; color: var(--ink-faint); }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 200;
  padding: 9px 20px;
  font-size: 12px;
  color: #6b4328;
  background: var(--yellow);
  border: 2px solid #b98a3e;
  border-radius: 999px;
  box-shadow: 3px 3px 0 rgba(138, 90, 59, 0.25);
  opacity: 0;
  transform: translate(-50%, 18px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body.lb-open { overflow: hidden; }

/* ---------- responsive ---------- */

@media (max-width: 1240px) {
  .masonry { column-count: 3; }
}

@media (max-width: 980px) {
  .hero { padding-top: 46px; }
  .hero-card { padding: 42px 28px 30px; }
  .masonry { column-count: 2; column-gap: 18px; }
  .card { margin-bottom: 18px; }
  .toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .search-box { flex-basis: auto; }
  .lb-panel { grid-template-columns: 1fr; max-height: calc(100vh - 32px); }
  .lb-shot-wrap { border-right: 0; border-bottom: 2px dashed #e0bd9c; padding: 26px 22px 18px; }
  .lb-shot img { max-height: 34vh; }
  .lb-copy { padding: 24px 26px 26px; overflow: visible; }
  .archive-note { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 13px; }
  .hero { padding: 30px 12px 22px; }
  .hero-card { padding: 34px 18px 26px; border-radius: 26px; box-shadow: 0 0 0 5px var(--cream), 0 0 0 8px var(--line), 7px 9px 0 rgba(138, 90, 59, 0.16); }
  .hero-card::before, .hero-card::after { display: none; }
  .tape { width: 64px; height: 22px; top: -11px; }
  .tape-l { left: 30px; }
  .tape-r { right: 30px; }
  .eyebrow { font-size: 9px; letter-spacing: 0.8px; white-space: nowrap; }
  .logo { font-size: 46px; letter-spacing: 3px; }
  .subtitle { font-size: 14px; letter-spacing: 5px; }
  .tagline { font-size: 12px; }
  .hero-stats { gap: 16px; margin: 20px 0; }
  .stat strong { font-size: 24px; }
  .hero-actions { gap: 10px; }
  .btn { min-height: 38px; padding: 7px 16px; font-size: 12.5px; }

  main { width: calc(100% - 24px); padding-bottom: 40px; }
  .toolbar { top: 6px; padding: 10px; border-radius: 16px; }
  .toolbar { position: static; }
  .filters { flex-wrap: wrap; overflow: visible; }
  .chip { flex: 0 0 auto; padding: 5px 11px; font-size: 12px; }
  .result-meta { flex-direction: column; gap: 2px; padding-bottom: 14px; }
  .result-hint { display: none; }
  .masonry { column-count: 1; }
  .card { margin-bottom: 16px; }
  .card-name { font-size: 20px; }
  .card-desc { font-size: 13px; }
  .archive-note { margin-top: 30px; }
  .note-card { padding: 20px 18px; }
  .lightbox { padding: 10px; }
  .lb-panel { border-radius: 18px; max-height: calc(100vh - 20px); overflow-y: auto; box-shadow: 0 0 0 4px var(--cream), 0 0 0 7px var(--line); }
  .lb-shot-wrap { padding: 20px 14px 14px; }
  .lb-shot img { max-height: 36vh; }
  .lb-copy { padding: 18px 18px 22px; }
  .lb-desc { margin-top: 18px; font-size: 15px; line-height: 2; }
  .lb-nav { display: none; }
  .lb-close { position: fixed; top: 16px; right: 16px; width: 34px; height: 34px; font-size: 21px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .card { opacity: 1; transform: none; }
}
