/* The card itself reuses .registration-card from style.css so it matches the
   event page exactly. Only the Kakao button, the fallback form, and small bits
   are defined here. */

.button.primary.reg-kakao,
.reg-kakao {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  background: #fee500 !important;
  color: #191600 !important;
  border: 0;
  border-radius: 999px;
  padding: 16px 20px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  min-height: 56px;
}
.button.primary.reg-kakao:hover,
.reg-kakao:hover {
  background: #ffe92b !important;
}
.reg-kakao svg {
  flex: none;
}

.reg-kakao-wrap {
  position: relative;
  margin-top: 6px;
}
.reg-kakao-chip {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  background: #ffffff;
  color: #191600;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}
.reg-opt {
  font-style: normal;
  font-weight: 500;
  color: #9db2de;
  font-size: 0.85em;
}

.reg-note {
  margin: 10px 0 0 !important;
  font-size: 13px;
  text-align: center;
  color: #9db2de !important;
  line-height: 1.5;
}

.reg-alt-toggle {
  display: block;
  margin: 18px auto 0;
  padding: 4px 2px;
  border: 0;
  background: none;
  color: #9db2de;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.reg-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
  text-align: left;
}
.reg-form[hidden] {
  display: none;
}
.reg-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: #c4d0ea;
}
.reg-form input[type='text'],
.reg-form input[type='tel'] {
  width: 100%;
  box-sizing: border-box;
  background: #0d162b;
  border: 1px solid #ffffff2b;
  border-radius: 10px;
  padding: 13px 14px;
  color: #eaf0fb;
  font-size: 16px;
}
.reg-form input:focus {
  outline: none;
  border-color: #6f93e0;
}
.reg-consent {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #a9b8d8 !important;
  line-height: 1.45;
}
.reg-consent input {
  margin-top: 2px;
}
.reg-submit {
  width: 100%;
}
.reg-msg {
  margin: 2px 0 0;
  font-size: 14px;
  min-height: 1.2em;
  color: #b7c4e0;
}
.reg-msg.is-error {
  color: #ff9ba3;
}
.reg-msg.is-done {
  color: #8fe0b0;
}
.reg-home {
  display: inline-block;
  margin-top: 16px;
  color: #9db2de;
  font-size: 14px;
  text-decoration: none;
}

.reg-check {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #2f7d55;
  color: #fff;
  font-size: 32px;
  line-height: 60px;
  text-align: center;
}
.reg-done-card .registration-action > h3 {
  margin-top: 4px;
}

/* ───────── 완료 화면 (세련된 빛 착지 연출) ───────── */
.done-body {
  margin: 0;
  min-height: 100svh;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% 8%, var(--bg-2), transparent 70%),
    radial-gradient(ellipse 90% 70% at 50% 0%, var(--bg-2), var(--bg) 72%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
/* same galaxy loop as the event finale, masked top + bottom */
.done-galaxy {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  opacity: 0.8;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%);
}
/* twinkling stars (same .star system as the event page) over the galaxy */
.done-stars {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  inset: 0;
  z-index: 0;
}
.paused .done-stars .star {
  animation: none;
}

.done-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.done-light {
  position: relative;
  height: 150px;
  margin-bottom: 8px;
}
/* a thin beam falls from the top and feeds the orb */
.done-beam {
  position: absolute;
  top: -40px;
  left: 50%;
  width: 1.5px;
  height: 120px;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  background: linear-gradient(180deg, transparent, #cfe0ffcc 60%, #fff);
  animation: done-beam-fall 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes done-beam-fall {
  0% { transform: translateX(-50%) scaleY(0); opacity: 0; }
  40% { opacity: 1; }
  100% { transform: translateX(-50%) scaleY(1); opacity: 0.5; }
}
/* a luminous light, not a solid ball: bright core melting into the sky,
   no rim, no plastic highlight. Same light as the opening "내려오라" dot. */
.done-orb {
  position: absolute;
  top: 70px;
  left: 50%;
  width: 108px;
  height: 108px;
  margin: -54px 0 0 -54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(
    circle at 50% 47%,
    #ffffff 0%,
    #ffffff 22%,
    #eef3ffe6 36%,
    #c9d7ff7a 56%,
    #a6baff30 74%,
    transparent 86%
  );
  opacity: 0;
  transform: translateY(-24px) scale(0.6);
  animation: done-orb-land 0.6s cubic-bezier(0.22, 1.2, 0.36, 1) 0.5s forwards;
}
/* soft outer bloom, breathing after it lands */
.done-orb::before {
  content: "";
  position: absolute;
  top: -26%; right: -26%; bottom: -26%; left: -26%;
  inset: -26%;
  border-radius: 50%;
  z-index: -1;
  background: radial-gradient(circle, #d6e2ff8c 0%, #96b4ff33 44%, transparent 68%);
  animation: done-breathe 3.6s ease-in-out 1.2s infinite;
}
@keyframes done-orb-land {
  0% { opacity: 0; transform: translateY(-24px) scale(0.6); }
  60% { opacity: 1; transform: translateY(4px) scale(1.06); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes done-breathe {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}
.done-check {
  width: 38px;
  height: 38px;
  position: relative;
}
.done-check-ring {
  fill: none;
  stroke: #ffffff00;
  stroke-width: 0;
}
.done-check-mark {
  fill: none;
  stroke: var(--bg, #0c1323);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: done-draw 0.5s cubic-bezier(0.65, 0, 0.35, 1) 0.95s forwards;
}
@keyframes done-draw {
  to { stroke-dashoffset: 0; }
}
/* soft ripple rings radiating when the orb lands */
.done-ripple {
  position: absolute;
  top: 70px;
  left: 50%;
  width: 84px;
  height: 84px;
  margin: -42px 0 0 -42px;
  border-radius: 50%;
  border: 1.5px solid #96b4ff80;
  opacity: 0;
  animation: done-ripple 1.1s ease-out 0.95s forwards;
}
.done-ripple-2 {
  animation-delay: 1.2s;
}
@keyframes done-ripple {
  0% { opacity: 0.7; transform: scale(1); }
  100% { opacity: 0; transform: scale(2.4); }
}

.done-eyebrow,
.done-title,
.done-sub,
.done-actions,
.done-form {
  opacity: 0;
  animation: done-rise 0.6s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}
.done-eyebrow { animation-delay: 1.0s; }
.done-title { animation-delay: 1.15s; }
.done-sub { animation-delay: 1.3s; }
.done-form { animation-delay: 1.4s; }
.done-actions { animation-delay: 1.5s; }
@keyframes done-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.done-eyebrow {
  margin: 0 0 10px;
  font-family: "Pretendard Variable", Pretendard, sans-serif;
  font-size: var(--fs-overline, 13px);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--peri, #9db2de);
}
.done-title {
  margin: 0 0 12px;
  font-size: var(--fs-title-2, 28px);
  line-height: var(--lh-title-2, 1.3);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-shadow: 0 2px 24px #0b142580;
}
.done-sub {
  margin: 0;
  font-size: var(--fs-body, 16px);
  line-height: var(--lh-body, 1.6);
  color: var(--text-2);
}
.done-form {
  margin-top: 26px;
  text-align: left;
}
.done-actions {
  margin-top: 28px;
}
.done-home {
  display: inline-block;
  color: var(--text-3);
  font-size: var(--fs-caption, 14px);
  text-decoration: none;
  border-bottom: 1px solid var(--line, #ffffff2b);
  padding-bottom: 3px;
}
.done-home:hover {
  color: var(--text);
}

@media (prefers-reduced-motion: reduce) {
  .done-galaxy { display: none; }
  .done-body {
    background:
      radial-gradient(ellipse 90% 70% at 50% 0%, var(--bg-2), var(--bg) 72%),
      center / cover url("/inland-seoul-2026/assets/galaxy-loop.webp");
  }
  .done-beam, .done-orb, .done-check-mark, .done-ripple,
  .done-eyebrow, .done-title, .done-sub, .done-actions, .done-form {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .done-check-mark { stroke-dashoffset: 0; }
  .done-orb { opacity: 1; }
}

/* ───────── 별도 신청 페이지(/register): 중앙 정렬 ───────── */
.reg-standalone .heading {
  text-align: center;
}
.reg-standalone .registration-card {
  grid-template-columns: 1fr;
  max-width: 520px;
  gap: 28px;
}
.reg-standalone .registration-card > div:first-child {
  text-align: center;
}
.reg-standalone .registration-action {
  padding-left: 0;
  border-left: 0;
  text-align: center;
}
.reg-standalone .registration-action .reg-note,
.reg-standalone .registration-action > p {
  text-align: center;
}
.reg-standalone .reg-form {
  text-align: left;
}
.reg-standalone .reg-home {
  display: block;
  margin: 18px auto 0;
}

/* ───────── 메인 이벤트 카드: 참가 신청 영역 중앙 정렬 + 캘린더 숨김 ───────── */
.reg-live,
.reg-done {
  text-align: center;
}
.reg-live .calendar,
.reg-live #calendar-status {
  display: none;
}

/* 세션 글: 어두운 배경에서 더 잘 읽히게 밝은 글자색 (데스크톱·모바일 공통) */
#speaker-dialog #speaker-detail-description {
  color: #e8edf8;
}
/* ───────── 세션 모달(모바일): 손그림 와이어프레임 레이아웃 ───────── */
/* 이름은 왼쪽 위, 인물 사진(머리+어깨)은 오른쪽 위, 세션 글은 그 아래
   전체 폭 왼쪽 정렬. 긴 글이면 모달 전체가 스크롤, 짧은 글이면 높이 딱 맞음. */
@media (max-width: 700px) {
  #speaker-dialog {
    display: block;
    grid-template-columns: none;
    grid-template-rows: none;
    position: relative;
    height: fit-content;
    max-height: 92svh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: left;
  }
  /* 인물: 오른쪽 위. 카드와 같은 사진을 쓰되 네모 박스·배경·테두리 없이,
     가장자리를 페이드해서 모달 배경에 녹아드는 누끼 느낌으로 보여준다. */
  #speaker-dialog .sd-photo {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 128px;
    height: 128px;
    background: none !important;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    z-index: 1;
    -webkit-mask: radial-gradient(120% 120% at 50% 38%, #000 52%, #0000 82%);
    mask: radial-gradient(120% 120% at 50% 38%, #000 52%, #0000 82%);
  }
  #speaker-dialog .sd-photo:after {
    display: none;
  }
  /* 카드와 똑같은 크롭(머리+어깨)을 그대로 보여준다 */
  #speaker-dialog .sd-photo .portrait-window {
    position: absolute;
    top: 0;
    left: 50%;
    width: 118%;
    aspect-ratio: 1;
    transform: translateX(-50%);
  }
  #speaker-dialog .sd-photo .portrait-window .portrait {
    position: absolute;
    left: 50%;
    top: var(--portrait-top, 0%);
    width: var(--portrait-width, 128%);
    max-width: none;
    height: auto;
    transform: translateX(-50%);
    filter: grayscale(1);
  }
  /* 닫기 버튼: 맨 위 오른쪽 모서리(사진 위) */
  #speaker-dialog .speaker-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 3;
  }
  /* 본문: 왼쪽 정렬 */
  #speaker-dialog .sd-body {
    display: block;
    overflow: visible;
    padding: 26px 24px 30px;
    text-align: left;
  }
  /* 이름 영역은 오른쪽 사진을 피해 왼쪽에만 */
  #speaker-dialog .sd-kind,
  #speaker-dialog #speaker-detail-name,
  #speaker-dialog .sd-org {
    padding-right: 128px;
  }
  #speaker-dialog #speaker-detail-name {
    margin-top: 8px;
  }
  /* 세션 글: 전체 폭, 왼쪽 정렬 */
  #speaker-dialog .sd-session {
    margin-top: 24px;
    border-top: 1px solid #ffffff1a;
    padding-top: 22px;
  }
  #speaker-dialog #speaker-detail-description {
    font-size: 16px;
    line-height: 1.75;
  }
  #speaker-dialog #speaker-detail-description .sd-line {
    margin: 0 0 13px;
  }
  #speaker-dialog #speaker-detail-description .sd-line:last-child {
    margin-bottom: 0;
  }
  #speaker-dialog #speaker-detail-description .sd-line.sd-para {
    margin-top: 22px;
  }
}
/* 작은 폰(아이폰 SE 등): 사진 조금 작게 + 줄간격 좁힘 */
@media (max-width: 700px) and (max-height: 720px) {
  #speaker-dialog .sd-photo {
    width: 96px;
    height: 96px;
    top: 18px;
    right: 18px;
  }
  #speaker-dialog .sd-kind,
  #speaker-dialog #speaker-detail-name,
  #speaker-dialog .sd-org {
    padding-right: 110px;
  }
  #speaker-dialog .sd-session {
    margin-top: 18px;
    padding-top: 18px;
  }
  #speaker-dialog #speaker-detail-description {
    line-height: 1.65;
  }
}
