/* ===========================
   토큰
=========================== */
:root {
  --ink: #1B2A3A;
  --ink-soft: #2C3E52;
  --paper: #F1EAD9;
  --paper-card: #FBF7EC;
  --paper-line: #D8CCB0;
  --broth: #C1502E;
  --broth-deep: #9C3D22;
  --gold: #C9A227;
  --charcoal: #2B2420;
  --charcoal-soft: #5A5044;

  --font-display: 'Noto Serif KR', serif;
  --font-body: 'Noto Sans KR', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-body);
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===========================
   노렌 헤더
=========================== */
.noren {
  position: relative;
  background: var(--ink);
  color: var(--paper);
  padding: 4.5rem 1.5rem 3.5rem;
  text-align: center;
  overflow: hidden;
  clip-path: polygon(
    0% 0%, 100% 0%, 100% 92%,
    95% 100%, 90% 92%, 85% 100%, 80% 92%, 75% 100%, 70% 92%, 65% 100%,
    60% 92%, 55% 100%, 50% 92%, 45% 100%, 40% 92%, 35% 100%, 30% 92%,
    25% 100%, 20% 92%, 15% 100%, 10% 92%, 5% 100%, 0% 92%
  );
  padding-bottom: 5rem;
}

.noren::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,0.05), transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(201,162,39,0.10), transparent 45%);
  pointer-events: none;
}

.noren__kicker {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin: 0 0 1rem;
  text-transform: uppercase;
}

.noren__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  margin: 0 0 0.8rem;
  letter-spacing: 0.04em;
}

.noren__sub {
  font-size: 0.95rem;
  color: rgba(241,234,217,0.72);
  margin: 0 0 2.2rem;
}

.stamp {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 2px solid var(--broth);
  color: var(--broth);
  background: rgba(193,80,46,0.08);
  transform: rotate(-8deg);
  position: relative;
}

.stamp__num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.1rem;
  line-height: 1;
}

.stamp__label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* ===========================
   본문 레이아웃
=========================== */
.ledger {
  max-width: 920px;
  margin: 0 auto;
  padding: 1rem 1.25rem 5rem;
}

.shop-group {
  margin-top: 3.6rem;
}

.shop-group:first-child {
  margin-top: 2.2rem;
}

.shop-group__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  margin: 0 0 1.1rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--paper-line);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.shop-group__name .collab {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--broth);
  letter-spacing: 0.02em;
}

.tickets {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* 사이드 메뉴를 메인 메뉴 옆에 나란히 붙이는 레이아웃 */
.ticket-row {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.ticket-row .ticket,
.ticket-row .ticket:nth-child(even) {
  grid-template-columns: 1fr;
}

.ticket-row .ticket .ticket__photo {
  order: 0;
  height: 220px;
}

.ticket-row .ticket .ticket__perforation {
  order: 0;
  width: auto;
  height: 0;
  border-left: none;
  border-top: 2px dashed var(--paper-line);
  margin: 0 14px;
}

.ticket-row .ticket .ticket__perforation::before,
.ticket-row .ticket .ticket__perforation::after {
  top: -8px;
  left: -8px;
}

.ticket-row .ticket .ticket__perforation::after {
  left: auto;
  right: -8px;
}

@media (max-width: 640px) {
  .ticket-row {
    grid-template-columns: 1fr;
  }
}

/* ===========================
   식권 카드
=========================== */
.ticket {
  display: grid;
  grid-template-columns: 40% 1fr;
  background: var(--paper-card);
  border-radius: 18px 4px 18px 4px;
  box-shadow: 0 10px 24px -14px rgba(27,42,58,0.35);
  overflow: hidden;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.ticket:nth-child(even) {
  grid-template-columns: 1fr 40%;
}

.ticket:nth-child(even) .ticket__photo {
  order: 2;
}

.ticket:nth-child(even) .ticket__perforation {
  order: 1;
}

.ticket__photo {
  position: relative;
  height: 300px;
  align-self: start;
  cursor: zoom-in;
}

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

.ticket__hanko {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid rgba(251,247,236,0.85);
  color: #fff;
  background: rgba(193,80,46,0.78);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: -0.02em;
  transform: rotate(-6deg);
}

.ticket__perforation {
  position: relative;
  width: 0;
  border-left: 2px dashed var(--paper-line);
  margin: 14px 0;
}

.ticket__perforation::before,
.ticket__perforation::after {
  content: "";
  position: absolute;
  left: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--paper);
}

.ticket__perforation::before { top: -14px; }
.ticket__perforation::after { bottom: -14px; }

.ticket__info {
  padding: 1.3rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
}

.ticket__no {
  position: absolute;
  top: 1.1rem;
  right: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--charcoal-soft);
  letter-spacing: 0.05em;
}

.ticket__shop {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--broth);
  margin: 0 0 0.3rem;
  text-transform: uppercase;
}

.ticket__menu {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--ink);
  margin: 0 0 0.6rem;
  padding-right: 3.2rem;
}

.ticket__desc {
  font-size: 0.88rem;
  color: var(--charcoal-soft);
  margin: 0 0 0.9rem;
}

.ticket__rating {
  display: flex;
  gap: 4px;
  margin-bottom: 0.6rem;
}

.ticket__rating svg {
  width: 18px;
  height: 18px;
}

.ticket__rating .star-empty { fill: none; stroke: var(--paper-line); stroke-width: 1.4; }
.ticket__rating .star-full { fill: var(--gold); stroke: var(--gold); stroke-width: 1.4; }
.ticket__rating .star-half { fill: url(#halfGradShared); stroke: var(--gold); stroke-width: 1.4; }

.ticket__rating-text {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--charcoal-soft);
  align-self: center;
  margin-left: 2px;
}

.ticket__review {
  font-size: 0.85rem;
  margin: 0;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--paper-line);
  color: var(--charcoal);
}

.ticket__review .placeholder {
  color: var(--charcoal-soft);
  font-style: italic;
}

/* ===========================
   MAP 박스 - 지도 세로 중앙 정렬
=========================== */
.ticket--map .ticket__photo {
  align-self: center;
  height: 220px;
  display: flex;
  align-items: center;
  cursor: default;
}

.ticket--map .ticket__photo iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.map-link {
  color: var(--broth);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.map-link:hover {
  text-decoration: underline;
}

/* ===========================
   푸터
=========================== */
.colophon {
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--charcoal-soft);
}

/* ===========================
   라이트박스
=========================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(27,42,58,0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 2rem;
}

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

.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox__close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

/* ===========================
   반응형
=========================== */
@media (max-width: 640px) {
  .ticket,
  .ticket:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .ticket:nth-child(even) .ticket__photo {
    order: 0;
  }
  .ticket:nth-child(even) .ticket__perforation {
    order: 0;
  }
  .ticket__photo {
    height: 220px;
  }
  .ticket__perforation {
    width: auto;
    height: 0;
    border-left: none;
    border-top: 2px dashed var(--paper-line);
    margin: 0 14px;
  }
  .ticket__perforation::before,
  .ticket__perforation::after {
    top: -8px;
    left: auto;
  }
  .ticket__perforation::before { left: -8px; }
  .ticket__perforation::after { right: -8px; left: auto; }
}
