/* 메인 가입 이벤트 팝업 (partials/open-event.html · script/open-event.js) */
.oe {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(6, 14, 28, 0.62);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.3s ease;
}
.oe[hidden] {
  display: none;
}
.oe.is-open {
  opacity: 1;
}
.oe *,
.oe *::before,
.oe *::after {
  box-sizing: border-box;
}
.oe-dialog {
  position: relative;
  width: min(440px, 100%);
  max-height: calc(100vh - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  overflow-y: auto;
  color: var(--hl-ink);
  background: #fffdf8;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
  letter-spacing: -0.02em;
  word-break: keep-all;
  outline: none;
}
.oe.is-open .oe-dialog {
  transform: none;
}

.oe-x {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: var(--hl-navy);
  background: rgba(255, 255, 255, 0.7);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(160, 120, 50, 0.18);
  cursor: pointer;
  transition: background 0.2s ease;
}
.oe-x:hover {
  background: #fff;
}
.oe-x svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

/* 상단: JOIN EVENT — 밝은 샴페인 골드 바탕 + 반짝이 장식 */
.oe-head {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.4rem 1.2rem;
  text-align: center;
  color: var(--hl-ink);
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 30%, rgba(255, 255, 255, 0.9) 0 2.5px, transparent 3.5px),
    radial-gradient(circle at 72% 78%, rgba(255, 255, 255, 0.85) 0 1.8px, transparent 2.8px),
    radial-gradient(circle at 24% 80%, rgba(255, 255, 255, 0.8) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 50% -30%, rgba(255, 255, 255, 0.95), transparent 60%),
    linear-gradient(135deg, #fff6e4 0%, #fbe3b6 48%, #f3cf8f 100%);
}
.oe-head::before,
.oe-head::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  pointer-events: none;
}
.oe-head::before {
  top: -60px;
  left: -50px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.75), transparent 70%);
}
.oe-head::after {
  right: -55px;
  bottom: -70px;
  background: radial-gradient(circle, rgba(255, 214, 150, 0.7), transparent 70%);
}
.oe-head > * {
  position: relative;
  z-index: 1;
}
.oe-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.32em;
  color: #a77b35;
}
.oe-title {
  margin: 0;
  font-family: "Nanum Myeongjo", serif;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.04em;
}
.oe-title > span:first-child,
.oe-title .oe-title-gold {
  display: inline-block;
  font-size: clamp(2rem, 8vw, 2.45rem);
}
.oe-title > span:first-child {
  margin-right: 0.3em;
  color: var(--hl-navy);
}
.oe-title .oe-title-gold {
  color: #b5812f;
  background: linear-gradient(180deg, #d9a54b 0%, #a8742a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.oe-title .oe-title-ko {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.45rem;
  font-family: "Noto Sans KR", sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-indent: 0.3em;
  color: var(--hl-navy);
}
.oe-title .oe-title-ko::before,
.oe-title .oe-title-ko::after {
  content: "";
  width: 28px;
  height: 1px;
  background: rgba(20, 57, 104, 0.35);
}
.oe-lead {
  margin: 0.6rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  color: #6b5634;
}

/* 혜택 목록 */
.oe-list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  padding: 1rem 1.2rem 0.1rem;
  list-style: none;
}
.oe-list > li {
  display: flex;
  align-items: flex-start;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 0.9rem;
  background: #fff;
  border: 1px solid #f0e2c6;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(196, 150, 70, 0.08);
}
.oe-no {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  font-family: "Nanum Myeongjo", serif;
  font-size: 0.86rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #e8bd6a, #c18b39);
  border-radius: 50%;
  box-shadow: 0 3px 8px rgba(193, 139, 57, 0.35);
}
/* 대상은 한 줄, 혜택과 추가 표시(+상조 무료 가입 · 추첨일)는 폭이 되면 같은 줄에 */
.oe-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  min-width: 0;
}
.oe-body p {
  margin: 0;
}
.oe-body .oe-target {
  flex-basis: 100%;
}
.oe-target {
  font-size: 0.74rem;
  font-weight: 700;
  color: #b07a2c;
}
.oe-benefit {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--hl-ink);
}
.oe-benefit strong {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--hl-navy);
}
.oe-plus {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.18rem 0.6rem 0.18rem 0.28rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--hl-navy);
  background: #fff7e6;
  border: 1px solid #f0d9a8;
  border-radius: 999px;
}
.oe-plus span {
  display: grid;
  place-items: center;
  width: 1.05rem;
  height: 1.05rem;
  font-size: 0.8rem;
  line-height: 1;
  color: #fff;
  background: #d9a54b;
  border-radius: 50%;
}
.oe-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--hl-muted);
}
.oe-date span {
  padding: 0.1rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--hl-navy);
  border-radius: 4px;
}

/* 셋째(크루즈 추첨) 강조 — 밝은 골드 */
.oe-list > li.is-highlight {
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 255, 255, 0.9) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.8) 0 1.5px, transparent 2.5px),
    linear-gradient(135deg, #fff1d2 0%, #f8d996 100%);
  border-color: #eec980;
  box-shadow: 0 6px 18px rgba(214, 160, 70, 0.22);
}
.oe-list > li.is-highlight .oe-no {
  color: #fff;
  background: linear-gradient(145deg, var(--hl-navy), var(--hl-deep));
  box-shadow: 0 3px 8px rgba(20, 57, 104, 0.3);
}
.oe-list > li.is-highlight .oe-target {
  color: #94631f;
}
.oe-list > li.is-highlight .oe-date {
  color: #6b5634;
}

/* 버튼 */
.oe-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.9rem 1.2rem 0;
}
.oe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: 44px;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: 10px;
  transition: filter 0.2s ease, background 0.2s ease;
}
.oe-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.oe-btn.is-gold {
  color: #fff !important;
  background: linear-gradient(135deg, #e4b45d, #c48c3a);
  box-shadow: 0 6px 16px rgba(196, 140, 58, 0.3);
}
.oe-btn.is-gold:hover {
  filter: brightness(1.05);
}
.oe-btn.is-line {
  color: var(--hl-navy) !important;
  background: #fff;
  border: 1px solid var(--hl-navy);
}
.oe-btn.is-line:hover {
  background: #f1f5fb;
}
.oe-note {
  margin: 0.6rem 1.2rem 0;
  font-size: 0.7rem;
  text-align: center;
  color: #8b97a6;
}

.oe-foot {
  display: flex;
  margin-top: 0.8rem;
  border-top: 1px solid #f0e6d2;
}
.oe-foot button {
  flex: 1;
  height: 42px;
  padding: 0;
  font: inherit;
  font-size: 0.83rem;
  color: var(--hl-muted);
  background: #faf5ea;
  border: 0;
  cursor: pointer;
}
.oe-foot button + button {
  font-weight: 700;
  color: var(--hl-ink);
  border-left: 1px solid #ebeef2;
}
.oe-foot button:hover {
  background: #eef1f5;
}

@media (max-width: 420px) {
  .oe {
    padding: 0.75rem;
  }
  .oe-head {
    padding: 1.5rem 1.2rem 1.25rem;
  }
  .oe-list {
    padding: 0.95rem 0.9rem 0.2rem;
  }
  .oe-list > li {
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
  }
  .oe-actions {
    padding: 0.8rem 0.9rem 0;
  }
  .oe-note {
    margin: 0.55rem 0.9rem 0;
  }
}
/* 세로가 짧은 화면(노트북 · 작은 휴대폰): 닫기까지 한 화면에 보이도록 한 단계 더 줄인다 */
@media (max-height: 700px) {
  .oe-head {
    padding: 1.2rem 1.3rem 1.05rem;
  }
  .oe-kicker {
    margin-bottom: 0.4rem;
  }
  .oe-title > span:first-child,
  .oe-title .oe-title-gold {
    font-size: 1.85rem;
  }
  .oe-title .oe-title-ko {
    margin-top: 0.3rem;
  }
  .oe-lead {
    margin-top: 0.5rem;
    font-size: 0.8rem;
  }
  .oe-list {
    gap: 0.4rem;
    padding-top: 0.8rem;
  }
  .oe-list > li {
    padding: 0.55rem 0.8rem;
  }
  .oe-no {
    width: 2.2rem;
    height: 2.2rem;
    font-size: 0.8rem;
  }
  .oe-actions {
    padding-top: 0.7rem;
  }
  .oe-btn {
    height: 40px;
  }
  .oe-note {
    margin-top: 0.45rem;
  }
  .oe-foot {
    margin-top: 0.6rem;
  }
  .oe-foot button {
    height: 38px;
  }
}
@media (max-height: 580px) {
  .oe-kicker,
  .oe-lead,
  .oe-note {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .oe,
  .oe-dialog {
    transition: none;
  }
}
