@font-face {
  font-family: Jua;
  src: url("./fonts/Jua-Regular.woff2") format("woff2"),
    url("./fonts/Jua-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fffdfd;
  --card: #fff;
  --cocoa: #442b20;
  --muted: #76665d;
  --sage: #e1e9d4;
  --forest: #405e49;
  --deep-forest: #304335;
  --pink: #f4a5ab;
  --round: Jua, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  margin: 0;
  background: var(--paper);
  color: var(--cocoa);
}
body::before, body::after {
  position: fixed;
  z-index: -1;
  pointer-events: none;
  content: "";
}
body::before {
  --corner-size: clamp(82px, 21vw, 160px) clamp(52px, 16vw, 100px);
  inset: 0;
  background:
    radial-gradient(ellipse 45% 67% at 81% 12%, #fbdcd9 97%, transparent) top right / var(--corner-size) no-repeat,
    radial-gradient(ellipse 43% 60% at 49% 2%, #f9dfd9 97%, transparent) top right / var(--corner-size) no-repeat,
    radial-gradient(ellipse at 100% 69%, #fff5f8 0, transparent 48%);
}
body::after {
  right: 0;
  bottom: 0;
  left: 0;
  height: 49px;
  background:
    radial-gradient(ellipse 44px 34px at 18px 108%, #dee7cc 97%, transparent),
    radial-gradient(ellipse 34px 28px at 61px 110%, #e6ebd7 97%, transparent),
    radial-gradient(ellipse 39px 28px at calc(100% - 66px) 114%, #fbe1dc 97%, transparent),
    radial-gradient(ellipse 51px 34px at calc(100% - 12px) 108%, #f9dcd8 97%, transparent);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.shelf {
  width: min(100% - 36px, 704px);
  margin-inline: auto;
  padding-block: 24px 46px;
}
.hero {
  position: relative;
  min-height: clamp(80px, 22vw, 142px);
}
.hero-copy {
  position: relative;
  z-index: 1;
  width: fit-content;
  padding-left: 10px;
}
.series {
  position: relative;
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: linear-gradient(110deg, #e4ecd5, #e0e8d0);
  color: #39432e;
  font: 400 clamp(.875rem, 3.8vw, 1.25rem) / 1.1 var(--round);
  white-space: nowrap;
}
h1 {
  margin-top: 8px;
  color: #3e261d;
  font: 400 clamp(2rem, 9.55vw, 3.65rem) / 1.02 var(--round);
  letter-spacing: -.022em;
  white-space: nowrap;
}
.underlined {
  position: relative;
  display: inline-block;
}
.underlined::after {
  position: absolute;
  right: -3px;
  bottom: -5px;
  left: -3px;
  height: 6px;
  border-radius: 65% 66% 44% 45%;
  background: #f4adad;
  transform: rotate(-.8deg);
  content: "";
}
.hero-art {
  position: absolute;
  top: 15px;
  right: -12px;
  width: clamp(112px, 38vw, 258px);
  aspect-ratio: 307 / 162;
  background: url("./art/header-mascot.webp") center / contain no-repeat;
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent),
    linear-gradient(180deg, transparent, #000 7%, #000 89%, transparent);
  mask-composite: intersect;
  pointer-events: none;
}
.rays {
  position: absolute;
  display: block;
  width: 21px;
  height: 22px;
  color: var(--pink);
  pointer-events: none;
}
.rays i {
  position: absolute;
  display: block;
  width: 3.5px;
  height: 9px;
  border-radius: 4px;
  background: currentColor;
}
.rays i:nth-child(1) { top: 0; left: 3px; transform: rotate(14deg); }
.rays i:nth-child(2) { top: 4px; left: 10px; transform: rotate(42deg); }
.rays i:nth-child(3) { top: 11px; left: 14px; transform: rotate(67deg); }
.brand-rays { top: -8px; left: -15px; transform: scaleX(-1) rotate(-6deg); }
.affiliate-notice {
  margin: 8px 8px 0;
  color: var(--muted);
  font-size: .8125rem;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.instruction {
  margin: 7px 8px 0;
  color: var(--muted);
  font-size: clamp(.8125rem, 3.45vw, 1rem);
  font-weight: 600;
  line-height: 1.45;
}
.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 49px;
  margin-top: 12px;
  padding: 3px 4px 3px 15px;
  border: 1.5px solid #adbdaa;
  border-radius: 999px;
  background: #fffdfb;
}
.search:focus-within {
  border-color: var(--forest);
  box-shadow: 0 0 0 2px #405e4929;
}
.magnifier { flex: 0 0 22px; width: 22px; height: 22px; color: #637666; }
.search input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 3px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--cocoa);
  font: 400 1rem var(--round);
}
.search input::placeholder { color: #7a6d65; opacity: 1; }
.find, .clear {
  flex: none;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  font: 400 1rem var(--round);
}
.find {
  min-width: 70px;
  padding-inline: 14px;
  background: linear-gradient(138deg, #58725b, #3d5b46 68%);
  color: #fff;
}
.find:hover { background: #344f3d; }
.clear { padding: 0 4px; background: transparent; color: var(--forest); font-size: .875rem; }
.clear:hover { background: #eaf0e2; }
.search-rays { top: -10px; right: -6px; color: #eebd67; }
.notice {
  margin: 7px 8px 0;
  color: var(--muted);
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.products { margin-top: 19px; }
.list-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.list-heading h2 {
  position: relative;
  margin-left: 8px;
  padding: 5px 15px 5px 33px;
  border-radius: 999px;
  background: linear-gradient(108deg, #fcece8, #f9ddda);
  font: 400 clamp(1.25rem, 5.3vw, 1.6rem) / 1.12 var(--round);
  white-space: nowrap;
}
.heading-bag {
  position: absolute;
  top: 50%;
  left: -8px;
  width: 37px;
  aspect-ratio: 75 / 80;
  transform: translateY(-50%);
  background: url("./art/section-bag.webp") center / contain no-repeat;
  mask-image: radial-gradient(ellipse 65% 60% at 49% 49%, #000 61%, transparent 100%);
  pointer-events: none;
}
.section-rays { right: -17px; top: -6px; transform: scale(.78); color: #f4a4a8; }
#result-count {
  padding: 4px 10px;
  border-radius: 999px;
  background: #e2e9d2;
  color: #584633;
  font: 400 1rem / 1 var(--round);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 4px;
  border: 1px solid #6b453812;
  border-radius: 17px;
  background: var(--card);
  box-shadow: 0 2px 8px #6a453315;
}
.card.search-result-pop {
  animation: search-result-pop 360ms ease-out;
}
@keyframes search-result-pop {
  0%, 100% { transform: scale(1); }
  45% {
    transform: scale(1.04);
    animation-timing-function: ease-in-out;
  }
  83% { transform: scale(.995); }
}
.cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 5 / 6;
  border-radius: 13px;
  background: #e8edde;
}
.thumbnail {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 65%;
}
.preview-grid .card[data-number="3"] .thumbnail,
.preview-grid .card[data-number="4"] .thumbnail { object-position: 50% 72%; }
.number {
  position: absolute;
  top: 5px;
  left: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--deep-forest);
  color: #fff;
  font: 400 clamp(.875rem, 3.6vw, 1rem) / 1 var(--round);
  font-variant-numeric: tabular-nums;
}
.card-content {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 7px 6px 4px;
}
.card h3 {
  display: -webkit-box;
  overflow: hidden;
  color: var(--cocoa);
  font: 400 clamp(1rem, 4.7vw, 1.4rem) / 1.13 var(--round);
  overflow-wrap: anywhere;
  word-break: keep-all;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.reel-title {
  overflow: hidden;
  margin-top: 3px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: clamp(.75rem, 3.25vw, .9375rem);
  font-weight: 600;
  line-height: 1.32;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shop, .shop-example {
  position: relative;
  isolation: isolate;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: auto;
  padding-inline: 4px;
  border-radius: 999px;
  color: #3e5c48;
  font: 400 clamp(.875rem, 3.75vw, 1rem) / 1.1 var(--round);
  text-align: center;
  text-decoration: none;
}
.shop::before, .shop-example::before {
  position: absolute;
  z-index: -1;
  inset: 6px 0;
  border-radius: inherit;
  background: linear-gradient(125deg, #e1ebd9, #dce7d3);
  content: "";
}
.shop:hover::before { background: #d0e0c7; }
.link-icon {
  position: relative;
  display: inline-block;
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  transform: rotate(-45deg);
}
.link-icon::before, .link-icon::after {
  position: absolute;
  top: 5px;
  width: 9px;
  height: 6px;
  border: 1.6px solid currentColor;
  border-radius: 5px;
  content: "";
}
.link-icon::before { left: 0; }
.link-icon::after { right: 0; }
.empty {
  padding: 20px 16px;
  border: 1px solid #6b453824;
  border-radius: 17px;
  background: var(--card);
  line-height: 1.6;
}
.empty button, .load-more {
  min-height: 44px;
  margin-top: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: var(--sage);
  color: var(--forest);
  font: 400 .9375rem var(--round);
}
.load-more {
  display: block;
  margin: 14px auto 0;
}

@media (max-width: 350px) {
  .hero-copy { padding-left: 7px; }
  .hero-art { width: 103px; right: -10px; top: 21px; }
  .series { padding-inline: 8px; }
  .find { min-width: 57px; padding-inline: 10px; }
  .clear { font-size: .8125rem; }
}
@media (min-width: 600px) {
  .shelf { padding-top: 38px; padding-bottom: 57px; }
  .hero-copy { padding-left: 16px; }
  .hero-art { top: 11px; right: 2px; }
  .search { padding-left: 18px; }
  .find { min-width: 94px; }
  .notice, .instruction, .affiliate-notice { margin-left: 12px; }
  .products { margin-top: 24px; }
  .list-heading { margin-bottom: 12px; }
  .product-grid { gap: 16px; }
  .card { padding: 6px; }
  .card-content { padding: 10px 10px 6px; }
}
