:root {
  --pink: #ff6f91;
  --pink-deep: #e8547a;
  --lav: #a385ff;
  --ink: #5a4f6b;
  --sub: #9a8fae;
  --card-bg: #fffdfd;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Pretendard", "Malgun Gothic", sans-serif;
  color: var(--ink);
}

/* 배경 배너 영역 */
.hs-wrap {
  position: relative;
  width: 100%;
  padding: 48px 24px 40px;
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 182, 193, 0.55), transparent 55%),
    radial-gradient(circle at 88% 15%, rgba(163, 133, 255, 0.4), transparent 55%),
    linear-gradient(120deg, #fdf1f4 0%, #f4eefc 45%, #eaf4fb 100%);
  overflow: hidden;
}

.hs-crown {
  display: block;
  text-align: center;
  font-size: 22px;
  color: var(--pink);
  margin-bottom: 6px;
}

.hs-title {
  text-align: center;
  font-size: 40px;
  font-weight: 900;
  letter-spacing: 1px;
  margin: 0;
  background: linear-gradient(90deg, var(--pink-deep), var(--lav));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hs-subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--sub);
  margin: 6px 0 0;
  letter-spacing: 0.5px;
}

.hs-subtitle b {
  color: var(--pink-deep);
  font-weight: 700;
}

.hs-hint-pill {
  display: block;
  width: max-content;
  margin: 16px auto 0;
  padding: 6px 18px;
  font-size: 12px;
  color: var(--pink-deep);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 111, 145, 0.35);
  border-radius: 999px;
}

/* 카드 목록 (slot > card > inner > face front/back) */
.grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  max-width: 1080px;
  margin: 36px auto 0;
}

.slot {
  position: relative;
  --accent: #a385ff;
  --accent-ink: #7a5fd0;
}

.card {
  position: relative;
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  perspective: 1000px;
  cursor: pointer;
  font: inherit;
}

.card:focus-visible {
  outline: 2px solid var(--lav);
  outline-offset: 3px;
  border-radius: 14px;
}

/* height:100%는 aspect-ratio로만 정해진 .card 높이를 확정값으로 안 쳐주는
   브라우저가 있어서 0이 돼버림 -> position:absolute + inset:0으로 대체 */
.inner {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform .55s cubic-bezier(.4, .2, .2, 1);
}

/* data-flipped는 JS가 클릭할 때마다 토글하는 속성 */
.slot[data-flipped="true"] .inner {
  transform: rotateY(180deg);
}

.slot[data-flipped="true"] .card {
  filter: drop-shadow(0 10px 22px rgba(163, 133, 255, 0.35));
}

.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background: var(--card-bg);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(120, 90, 150, 0.12);
  display: flex;
  flex-direction: column;
  text-align: left;
}

.face.back {
  transform: rotateY(180deg);
}

.photo {
  position: relative;
  width: 100%;
  flex: 1;
  background: #e9e4f5;
}

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

.num {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.plate {
  padding: 8px 10px 12px;
  text-align: center;
}

.plate .name {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.plate .name-en {
  display: block;
  font-size: 10px;
  letter-spacing: 0.5px;
  color: var(--sub);
  margin-top: 3px;
  text-transform: uppercase;
}

.zoom {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e9dcff;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

/* 카드가 뒤집혔을 때만 zoom 버튼이 보이고, JS가 tabindex도 0으로 바꿔줌 */
.slot[data-flipped="true"] .zoom {
  display: flex;
}

.zoom svg {
  width: 14px;
  height: 14px;
  stroke: var(--accent-ink);
}

.hs-footer {
  text-align: center;
  font-size: 12px;
  color: var(--sub);
  margin: 22px 0 0;
  letter-spacing: 0.5px;
}

/* 확대 라이트박스 */
.lb {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(58, 42, 54, 0.92);
  padding: 24px;
}

.lb.is-open {
  display: flex;
}

.lb-box {
  position: relative;
  max-width: 480px;
  width: 100%;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.lb-box img,
.lb-box svg {
  width: 100%;
  height: auto;
  display: block;
}

.lb-caption {
  padding: 14px 16px 18px;
  text-align: center;
}

.lb-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
