/**
 * guestbook.css — 응원의 메시지 · 방명록 장면 + 임팩트 푸터
 */

.guestbook {
  --gb-yellow: #ffee00;
  --gb-yellow-deep: #ffe600;
  --gb-blue: #cce6ff;
  --gb-blue-soft: #e8f4ff;
  --gb-navy: #005eb8;
  --gb-navy-deep: #003d7a;
  --gb-footer-bg: #005eb8;
  --gb-white-iris: 0;
  --gb-iris-scroll-vh: 2;
  --gb-prelude-scroll-vh: 1;
  --gb-iris-ring-opacity: 0;
  --gb-hero-opacity: 0;
  position: relative;
  width: 100%;
  margin: 0;
  background: #fff;
  color: var(--gb-navy);
  overflow: clip;
}

.guestbook__iris-track {
  min-height: calc(100dvh + var(--gb-iris-scroll-vh, 6) * 1vh);
}

.guestbook__iris-pin {
  position: sticky;
  top: 0;
  height: 100dvh;
  height: 100vh;
  overflow: hidden;
  isolation: isolate;
  background: #fff;
}

.guestbook__main {
  position: relative;
  z-index: 2;
  margin-top: calc(var(--gb-iris-scroll-vh, 2) * -1vh);
  padding-bottom: 0;
  background: #fff;
}

/* 흰 원 가득 참 / p5 handoff: 아이리스 트랙 접기 → 타이틀 즉시 노출 */
.guestbook.guestbook--from-p5 .guestbook__iris-track,
.guestbook.guestbook--iris-full .guestbook__iris-track {
  min-height: 0;
  height: 0;
  overflow: visible;
}

.guestbook.guestbook--from-p5 .guestbook__iris-pin,
.guestbook.guestbook--iris-full .guestbook__iris-pin {
  display: none;
}

.guestbook.guestbook--from-p5 .guestbook__main,
.guestbook.guestbook--iris-full .guestbook__main {
  margin-top: 0;
}

/* 흰 배경·파티클 구간 — 프롤로드 텍스트용 스크롤 여백(파티클만 보이는 구간) */
.guestbook__prelude-track {
  min-height: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.guestbook.guestbook--iris-full .guestbook__prelude-track {
  min-height: calc(var(--gb-prelude-scroll-vh, 1) * 100dvh);
  min-height: calc(var(--gb-prelude-scroll-vh, 1) * 100vh);
}

/* p5-green 흰 원 이어짐 — 가득 찬 뒤 타이틀 등장 */
.guestbook-iris {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: calc(var(--gb-white-iris, 0) * 280vmax);
  height: calc(var(--gb-white-iris, 0) * 280vmax);
  border-radius: 50%;
  background: #fff;
  transform: translate(-50%, -50%);
  opacity: calc(
    var(--gb-iris-ring-opacity, 0) *
    clamp(0, (var(--gb-white-iris, 0) - 0.03) * 40, 1)
  );
  pointer-events: none;
  will-change: width, height, opacity;
}

.guestbook.guestbook--white .guestbook-iris {
  opacity: 0;
  visibility: hidden;
}

/* ----- 파티클: 응원·버블·푸터 구간 — 뷰포트 전체(100vw×100vh) 낙하 ----- */
.guestbook-particles {
  position: fixed;
  inset: 0;
  z-index: 5;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease-smooth, ease);
}

.guestbook.guestbook--particles .guestbook-particles {
  opacity: 1;
  visibility: visible;
}

.guestbook-particle {
  position: absolute;
  top: 0;
  left: var(--gb-pt-left, 10%);
  width: var(--gb-pt-size, 40px);
  height: var(--gb-pt-size, 40px);
  border-radius: 0;
  opacity: 0;
  transform: translate3d(0, var(--gb-pt-y-start, -12dvh), 0) rotate(var(--gb-pt-rot, 0deg));
  animation: guestbook-particle-fall var(--gb-pt-duration, 6s) linear infinite;
  animation-delay: var(--gb-pt-delay, 0s);
  animation-play-state: paused;
  will-change: transform, opacity;
}

.guestbook.guestbook--particles .guestbook-particle {
  animation-play-state: running;
  animation-fill-mode: backwards;
}

.guestbook-particle--yellow {
  background: var(--gb-yellow);
}

.guestbook-particle--blue {
  background: var(--gb-blue);
}

@keyframes guestbook-particle-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, var(--gb-pt-y-start, -12dvh), 0) rotate(var(--gb-pt-rot, 0deg));
  }
  4% {
    opacity: 0.92;
  }
  100% {
    opacity: 0.92;
    transform: translate3d(var(--gb-pt-drift, 0px), calc(100dvh + 12dvh), 0)
      rotate(calc(var(--gb-pt-rot, 0deg) + 180deg));
  }
}

/* ----- 히어로 (타이틀 · CTA) — 문서 흐름 ----- */
@keyframes guestbook-hero-rise-in {
  from {
    opacity: 0;
    transform: translate3d(0, 1.25rem, 0);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

/* ----- 프롤로드: 파티클과 함께 표시 (2문단, 중앙 정렬) ----- */
.guestbook-prelude {
  position: relative;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: min(100dvh, 100vh);
  margin: 0;
  padding:
    clamp(1.5rem, 4vh, 2.5rem)
    clamp(1.25rem, 5vw, 4.5rem)
    clamp(1.25rem, 3vh, 2rem);
  box-sizing: border-box;
  pointer-events: none;
  visibility: hidden;
}

.guestbook.guestbook--iris-full .guestbook-prelude {
  visibility: visible;
}

.guestbook-prelude__inner {
  position: relative;
  z-index: 12;
  width: min(100%, 34rem);
  max-width: 88vw;
  margin-inline: auto;
  text-align: center;
}

.guestbook-prelude__para {
  margin: 0;
  font-family: "Paperlogy Octin", var(--font-sans);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1.5;
  color: #005eb8;
  word-break: keep-all;
}

.guestbook-prelude__para + .guestbook-prelude__para {
  margin-top: clamp(0.85rem, 2.2vh, 1.35rem);
}

.guestbook-hero {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0;
  padding:
    clamp(0.5rem, 1.5vh, 1rem)
    clamp(1rem, 4vw, 2rem)
    clamp(0.75rem, 2vh, 1rem);
  text-align: center;
  opacity: 0;
  transform: translate3d(0, 1.25rem, 0);
}

.guestbook:not(.guestbook--hero-visible) .guestbook-hero {
  visibility: hidden;
}

.guestbook.guestbook--hero-visible .guestbook-hero {
  visibility: visible;
}

.guestbook.guestbook--hero-visible .guestbook-hero.guestbook-hero--revealed {
  animation: guestbook-hero-rise-in 0.52s var(--ease-smooth-in-out, cubic-bezier(0.33, 0.72, 0.29, 1)) both;
}

@media (prefers-reduced-motion: reduce) {
  .guestbook.guestbook--hero-visible .guestbook-hero.guestbook-hero--revealed {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.guestbook-hero__title {
  margin: 0 0 0.65rem;
  color: var(--gb-navy);
  scroll-margin-top: var(--process-header-height, 64px);
}

.guestbook-hero__lead {
  margin: 0 0 clamp(0.85rem, 2.5vw, 1.25rem);
  max-width: 22rem;
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 2.2vw, 1.125rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--gb-navy);
}

.guestbook-hero__cta {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: auto;
  min-width: clamp(8.5rem, 28vw, 10.5rem);
  height: 64px;
  margin: 0;
  padding: 0 16px 0 0;
  border: none;
  border-radius: 999px;
  background-color: var(--gb-yellow, #ffee00);
  color: var(--gb-navy);
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.22s var(--ease-smooth, ease);
}

.guestbook-hero__cta:hover,
.guestbook-hero__cta:active {
  transform: scale(1.1);
  box-shadow: none;
  filter: none;
}

.guestbook-hero__cta:focus-visible {
  outline: 3px solid var(--gb-navy);
  outline-offset: 4px;
}

.guestbook-hero__cta-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: clamp(2.5rem, 8vw, 3rem);
  height: clamp(2.5rem, 8vw, 3rem);
}

.guestbook-hero__cta-label {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2.8vw, 1.2rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--gb-navy);
  white-space: nowrap;
}

.guestbook:not(.guestbook--hero-visible) .guestbook-bubbles {
  visibility: hidden;
}

/* ----- 메시지 버블 (CTA 바로 아래) ----- */
.guestbook-bubbles {
  --gb-bubble-size: clamp(10.25rem, 16vw, 18.5rem);
  --gb-loop-bundle-overlap: calc(var(--gb-bubble-size) * 0.5); /* 루프 묶음↔묶음만 절반 겹침 */
  --gb-grid-span-x: 4.5; /* 4열 + 2행 50% 오프셋 */
  --gb-bubble-overlap-y: calc(var(--gb-bubble-size) * 0.134);
  --gb-grid-visual-h: calc(var(--gb-bubble-size) * 3 - var(--gb-bubble-overlap-y) * 2);
  margin-top: 80px !important;
  padding-bottom: 0 !important;
  position: relative;
  z-index: 10;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
  padding:
    clamp(0.25rem, 1vh, 0.5rem)
    0
    0;
  background: #fff;
}

/* 원형 묶음: 페이드·슬라이드 인 없이 즉시 표시 (히어로 타이틀 애니메이션과 분리) */
.guestbook-bubbles,
.guestbook-bubbles__viewport,
.guestbook-bubbles__track,
.guestbook-bubbles__grid:not(.guestbook-bubbles__grid--clone) {
  opacity: 1;
  visibility: visible;
}

.guestbook-bubble__img {
  opacity: 1;
}

.guestbook-bubbles__viewport {
  overflow-x: auto;
  overflow-y: hidden;
  width: 100%;
  max-width: 100%;
  height: var(--gb-grid-visual-h);
  margin-bottom: 0;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  cursor: grab;
}

.guestbook-bubbles__viewport::-webkit-scrollbar {
  display: none;
}

.guestbook-bubbles__viewport.is-dragging {
  cursor: grabbing;
  user-select: none;
}

/* 데스크톱: 원형 영역 클릭·드래그로 좌우 스크롤 (이미지 기본 드래그 방지) */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .guestbook-bubbles__viewport .guestbook-bubbles__grid:not(.guestbook-bubbles__grid--clone) {
    cursor: grab;
    user-select: none;
  }

  .guestbook-bubbles__viewport.is-dragging .guestbook-bubbles__grid:not(.guestbook-bubbles__grid--clone) {
    cursor: grabbing;
  }

  .guestbook-bubble__img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
  }
}

.guestbook-bubbles__track {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0;
  column-gap: 0;
  row-gap: 0;
  width: max-content;
  min-width: 100%;
  margin: 0;
  padding: 0;
}

/* 무한 루프: 묶음(그리드) 사이만 간격 축소 — 원끼리 배치는 그대로 */
.guestbook-bubbles__track > .guestbook-bubbles__grid + .guestbook-bubbles__grid {
  margin-left: calc(-1 * var(--gb-loop-bundle-overlap));
}

.guestbook-bubbles__grid {
  display: grid;
  grid-template-columns: repeat(4, var(--gb-bubble-size));
  grid-template-rows: repeat(3, var(--gb-bubble-size));
  height: var(--gb-grid-visual-h);
  justify-content: start;
  align-content: start;
  gap: 0;
  column-gap: 0;
  row-gap: 0;
  flex: 0 0 calc(var(--gb-bubble-size) * var(--gb-grid-span-x, 4.5));
  width: calc(var(--gb-bubble-size) * var(--gb-grid-span-x, 4.5));
  min-width: calc(var(--gb-bubble-size) * var(--gb-grid-span-x, 4.5));
  max-width: calc(var(--gb-bubble-size) * var(--gb-grid-span-x, 4.5));
  margin: 0;
  padding: 0;
  list-style: none;
  overflow: visible;
  box-sizing: border-box;
}

/* 2행 이후: 벌집 — 가로 50% 오프셋 + 세로 밀착 */
.guestbook-bubbles__grid > .guestbook-bubble:nth-child(n + 5) {
  margin-top: calc(-1 * var(--gb-bubble-overlap-y));
}

.guestbook-bubbles__grid > .guestbook-bubble:nth-child(n + 5):nth-child(-n + 8) {
  transform: translateX(50%);
  z-index: 2;
}

.guestbook-bubbles__grid > .guestbook-bubble:nth-child(n + 9):nth-child(-n + 12) {
  /* 3행: 그리드 3번째 트랙 기준이라 2행과 동일 시각 간격을 위해 겹침 2배 */
  margin-top: calc(-2 * var(--gb-bubble-overlap-y));
  z-index: 3;
}

.guestbook-bubbles__grid--clone {
  pointer-events: none;
}

.guestbook-bubble {
  position: relative;
  display: grid;
  align-content: center;
  justify-content: center;
  justify-items: center;
  justify-self: start;
  align-self: start;
  box-sizing: border-box;
  width: var(--gb-bubble-size);
  height: var(--gb-bubble-size);
  max-width: none;
  flex-shrink: 0;
  margin: 0;
  padding: clamp(0.55rem, 1.2vw, 0.95rem);
  border-radius: 50%;
  text-align: center;
  overflow: hidden;
  opacity: 1;
  animation: none;
  transition: none;
}

.guestbook-bubble--yellow {
  background: var(--gb-yellow);
}

.guestbook-bubble--blue {
  background: #b9ddff;
}

/* section3 손글씨 버블 이미지 (텍스트 없음) */
.guestbook-bubble--asset {
  width: var(--gb-bubble-size);
  height: var(--gb-bubble-size);
  max-width: none;
  padding: clamp(0.3rem, 0.9vw, 0.55rem);
  border-radius: 50%;
  background: var(--gb-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
}

.guestbook-bubble--asset.guestbook-bubble--yellow {
  background: var(--gb-yellow);
}

.guestbook-bubble--asset.guestbook-bubble--blue {
  background: #b9ddff;
}

.guestbook-bubble__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.guestbook-bubble__text {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  flex: none;
  font-family: "Paperlogy Octin", var(--font-sans);
  font-size: clamp(0.72rem, 1.35vw, 0.95rem);
  font-weight: 400;
  line-height: 1.45;
  color: var(--gb-navy);
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-clamp: 4;
}

.guestbook-bubble__text--hand {
  font-weight: 400;
  font-size: clamp(0.85rem, 1.6vw, 1.1rem);
  line-height: 1.35;
}

.guestbook-bubble__author {
  margin: 0.2rem 0 0;
  width: 100%;
  max-width: 100%;
  flex-shrink: 0;
  font-family: "Paperlogy Octin", var(--font-sans);
  font-size: clamp(0.65rem, 1.1vw, 0.8rem);
  font-weight: 400;
  color: var(--gb-navy);
  opacity: 0.85;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guestbook-bubble--hand-only .guestbook-bubble__text {
  font-size: clamp(0.9rem, 1.8vw, 1.15rem);
  -webkit-line-clamp: 5;
  line-clamp: 5;
}

@media (min-width: 768px) {
  .guestbook-bubble {
    padding: clamp(0.65rem, 1.5vw, 1rem);
  }

  .guestbook-bubble--asset {
    padding: clamp(0.3rem, 0.85vw, 0.55rem);
  }
}

/* ----- 모달 (Figma 707:40609 pc / 707:40734 mo) — 뷰포트 정중앙 1:1 노란 원 ----- */
.guestbook-modal {
  --gb-modal-size: min(100vw, 100dvh, 100vh);
  width: 100vw;
  height: 100dvh;
  height: 100vh;
  max-width: 100vw;
  max-height: 100dvh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  overflow: hidden;
  box-sizing: border-box;
  overscroll-behavior: none;
}

html.guestbook-modal-open,
body.guestbook-modal-open {
  overflow: hidden !important;
  overscroll-behavior: none;
}

body.guestbook-modal-open {
  position: fixed;
  width: 100%;
  left: 0;
  right: 0;
}

.guestbook-modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.guestbook-modal::backdrop {
  background: rgba(0, 45, 90, 0.45);
}

.guestbook-modal__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: var(--gb-modal-size);
  height: var(--gb-modal-size);
  max-width: 100vw;
  max-height: 100dvh;
  max-height: 100vh;
  aspect-ratio: 1;
  margin: 0;
  padding: calc(var(--gb-modal-size) * 0.2) calc(var(--gb-modal-size) * 0.14);
  border: none;
  border-radius: 50%;
  background: var(--gb-yellow);
  color: var(--gb-navy);
  box-sizing: border-box;
  box-shadow: none;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
  scrollbar-width: none;
}

.guestbook-modal__panel::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.guestbook-modal__body,
.guestbook-modal__success {
  width: 100%;
  max-width: min(42rem, 78vmin);
  margin: 0 auto;
}

.guestbook-modal .guestbook-form {
  width: 100%;
}

.guestbook-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: clamp(1rem, 3vw, 1.25rem);
}

.guestbook-modal__title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
  font-family: "Paperlogy Octin", var(--font-sans);
  font-weight: 500;
  font-size: clamp(1.125rem, 4.5vw, 2rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--gb-navy);
}

.guestbook-modal__close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin: 0;
  padding: 0;
  border: 1.33px solid var(--gb-navy);
  border-radius: 50%;
  background: transparent;
  color: var(--gb-navy);
  cursor: pointer;
  box-shadow: none;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.guestbook-modal__close:hover {
  background: var(--gb-navy);
  border-color: var(--gb-navy);
  color: #fff;
}

.guestbook-modal__close:focus-visible {
  outline: 3px solid var(--gb-navy);
  outline-offset: 3px;
}

.guestbook-modal .guestbook-form__fields {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.guestbook-modal .guestbook-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.guestbook-modal .guestbook-form__textarea,
.guestbook-modal .guestbook-form__input {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0.5rem;
  border: none;
  border-radius: 6px; /* mobile */
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--gb-navy);
  background: #fff;
  box-sizing: border-box;
  resize: none;
  overflow-y: auto;
  scrollbar-width: none;
}

.guestbook-modal .guestbook-form__textarea::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.guestbook-modal .guestbook-form__textarea {
  min-height: 7.5rem;
}

.guestbook-modal .guestbook-form__textarea::placeholder,
.guestbook-modal .guestbook-form__input::placeholder {
  color: #ccc;
}

.guestbook-modal .guestbook-form__textarea:focus,
.guestbook-modal .guestbook-form__input:focus {
  outline: 2px solid var(--gb-navy);
  outline-offset: 1px;
}

.guestbook-form__counter {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.02em;
  text-align: right;
  color: rgba(0, 94, 184, 0.65);
}

.guestbook-modal__note {
  margin: 0.5rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: -0.02em;
  color: var(--gb-navy);
}

.guestbook-modal .guestbook-form__submit {
  width: 100%;
  max-width: none;
  box-shadow: none;
  min-height: 2.75rem;
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 999px;
  background: var(--gb-navy);
  color: #fff;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.guestbook-form__submit:hover:not(:disabled) {
  opacity: 0.92;
}

.guestbook-form__submit:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.guestbook-status {
  min-height: 1.25rem;
  margin: 0.5rem 0 0;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--gb-navy);
}

.guestbook-status.error {
  color: #b91c1c;
}

.guestbook-modal__success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1.25rem, 4vmin, 1.75rem);
  width: 100%;
  text-align: center;
}

.guestbook-modal--success .guestbook-modal__panel {
  justify-content: center;
}

.guestbook-modal__success[hidden] {
  display: none !important;
}

.guestbook-modal__body[hidden] {
  display: none !important;
}

.guestbook-modal__success-icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
}

.guestbook-modal__success-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.guestbook-modal__success-title,
.guestbook-modal__success-desc {
  margin: 0;
  width: 100%;
  font-family: "Paperlogy Octin", var(--font-sans);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--gb-navy);
}

.guestbook-modal__success-title {
  font-size: clamp(1.125rem, 4.2vw, 2rem);
  line-height: 1.4;
}

.guestbook-modal__success-desc {
  font-family: var(--font-sans);
  font-size: clamp(0.75rem, 2.8vw, 0.875rem);
  font-weight: 600;
  line-height: 1.5;
}

.guestbook-modal__success-close {
  flex: 0 0 auto;
  min-width: 7.5rem;
  min-height: 2.75rem;
  margin-top: 0.25rem;
  padding: 0.75rem 2rem;
  border: 2px solid var(--gb-navy);
  border-radius: 999px;
  background: transparent;
  color: var(--gb-navy);
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.guestbook-modal__success-close:hover {
  background: var(--gb-navy);
  color: #fff;
}

.guestbook-modal__success-close:focus-visible {
  outline: 2px solid var(--gb-navy);
  outline-offset: 3px;
}

@media (min-width: 768px) {
  .guestbook-modal {
    --gb-modal-size: min(100vw, 100dvh, 100vh);
    overflow: hidden;
  }

  .guestbook-modal__panel {
    max-width: 100vw;
    max-height: 100dvh;
    max-height: 100vh;
    padding: calc(var(--gb-modal-size) * 0.2) calc(var(--gb-modal-size) * 0.14);
  }

  .guestbook-modal__head {
    margin-bottom: 2.5rem;
  }

  .guestbook-modal__close {
    width: 2.5rem;
    height: 2.5rem;
  }

  .guestbook-modal .guestbook-form__fields {
    gap: 0.375rem;
  }

  .guestbook-modal .guestbook-form__textarea,
  .guestbook-modal .guestbook-form__input {
    padding: 1rem;
    font-size: 0.875rem;
    border-radius: 12px; /* desktop */
  }

  .guestbook-modal .guestbook-form__textarea {
    min-height: 10rem;
  }

  .guestbook-modal .guestbook-form__input {
    min-height: 3.75rem;
  }

  .guestbook-form__counter {
    font-size: 0.75rem;
  }

  .guestbook-modal__note {
    margin-top: 1rem;
    font-size: 0.875rem;
  }

  .guestbook-modal .guestbook-form__submit {
    min-height: 3rem;
    margin-top: 2rem;
    font-size: 1rem;
  }
}

/* ----- 모바일: Figma 707:40734 — 모달 원형 화면 오버플로 ----- */
@media (max-width: 767px) {
  .guestbook-modal {
    --gb-modal-size: 158vw;
    overflow: hidden;
  }

  .guestbook-modal[open] {
    align-items: flex-start;
    justify-content: center;
    padding-top: clamp(1.25rem, 5vh, 2.5rem);
    overflow: hidden;
  }

  .guestbook-modal__panel {
    width: var(--gb-modal-size);
    height: var(--gb-modal-size);
    max-width: none;
    max-height: none;
    flex-shrink: 0;
    margin-inline: auto;
    padding: 21vw 11.5vw 19vw;
  }

  .guestbook-modal__body,
  .guestbook-modal__success {
    width: 100%;
    max-width: 90vw;
  }

  .guestbook-modal__head {
    margin-bottom: 1rem;
  }

  .guestbook-modal__title {
    font-size: 1.125rem;
    line-height: 1.35;
  }

  .guestbook-modal .guestbook-form__textarea {
    min-height: 8.5rem;
  }

  .guestbook-modal .guestbook-form__submit {
    margin-top: 0.85rem;
  }

  .guestbook-modal__success {
    gap: 1.25rem;
    padding: 0 0.25rem;
  }

  .guestbook-modal__success-icon {
    width: 3.75rem;
    height: 3.75rem;
  }

  .guestbook-modal__success-icon svg {
    width: 3.75rem;
    height: 3.75rem;
  }

  .guestbook-modal__success-title {
    font-size: 1.125rem;
  }

  .guestbook-modal__success-desc {
    font-size: 0.75rem;
  }

  .guestbook-modal__success-close {
    min-width: 6.5rem;
    min-height: 2.5rem;
    margin-top: 0.15rem;
    padding: 0.65rem 1.75rem;
    font-size: 0.8125rem;
  }
}

/* ----- 모바일: 4열 × 3행 (데스크톱과 동일 3단 벌집) ----- */
@media (max-width: 767px) {
  .guestbook {
    --gb-iris-scroll-vh: 1.5;
    --gb-prelude-scroll-vh: 0.85;
  }

  .guestbook-prelude__para {
    font-size: 1.5rem;
  }

  .guestbook-prelude__para + .guestbook-prelude__para {
    margin-top: 0.75rem;
  }

  .guestbook-bubbles {
    /* 3단(4×3) 유지 · 묶음은 가로 스크롤되므로 원은 크게 */
    --gb-bubble-size: clamp(8.25rem, 39vw, 11rem);
    --gb-grid-span-x: 4.5;
    padding:
      clamp(0.25rem, 1vh, 0.5rem)
      0
      0;
    margin-bottom: 0;
  }

  .guestbook-bubbles__viewport {
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
  }

  .guestbook-bubbles__track {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    width: max-content;
  }

  .guestbook-bubbles__grid {
    grid-template-columns: repeat(4, var(--gb-bubble-size));
    grid-template-rows: repeat(3, var(--gb-bubble-size));
    flex: 0 0 calc(var(--gb-bubble-size) * var(--gb-grid-span-x, 4.5));
    width: calc(var(--gb-bubble-size) * var(--gb-grid-span-x, 4.5));
    min-width: calc(var(--gb-bubble-size) * var(--gb-grid-span-x, 4.5));
    max-width: calc(var(--gb-bubble-size) * var(--gb-grid-span-x, 4.5));
  }

  .guestbook-bubble {
    width: var(--gb-bubble-size);
    height: var(--gb-bubble-size);
    max-width: none;
    padding: clamp(0.4rem, 1.8vw, 0.55rem);
  }

  .guestbook-bubble--asset {
    width: var(--gb-bubble-size);
    height: var(--gb-bubble-size);
    max-width: none;
    padding: clamp(0.3rem, 1.5vw, 0.5rem);
  }

  .guestbook-bubble--asset .guestbook-bubble__img {
    width: 100%;
    max-width: 100%;
    height: 100%;
  }

  .guestbook-bubble__text {
    font-size: clamp(0.68rem, 2.5vw, 0.85rem);
  }

  .guestbook-bubble__text--hand {
    font-size: clamp(0.78rem, 2.9vw, 0.95rem);
  }

  .guestbook-bubble__author {
    font-size: clamp(0.58rem, 2.1vw, 0.72rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .guestbook-bubbles__viewport {
    scroll-behavior: auto;
  }

  .guestbook-iris {
    display: none;
  }

  .guestbook__iris-track {
    min-height: 0;
    height: 0;
    overflow: hidden;
  }

  .guestbook-particles {
    display: none;
  }
}
