/* =========================================================
   🍃 동물의 숲 완전정복 종합백과사전 스타일시트 (ACNH Encyclopedia Theme)
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Gaegu:wght@700&family=Jua&family=Nunito:wght@700;800;900&display=swap');

:root {
  --ac-mint: #78c8a1;
  --ac-mint-dark: #58a983;
  --ac-mint-light: #e8f7ee;
  --ac-yellow: #fde882;
  --ac-yellow-dark: #f0c946;
  --ac-orange: #ff9f43;
  --ac-blue: #70a1ff;
  --ac-wood: #8b5a2b;
  --ac-cream: #fffdf7;
  --ac-sand: #f4edd8;
  --ac-text: #4a433d;
  --ac-text-light: #7b7268;
  --ac-shadow: 0 10px 25px rgba(120, 200, 161, 0.25);
  --ac-border-radius: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Jua', 'Nunito', -apple-system, sans-serif;
  background-color: #f6fbf7;
  background-image: 
    radial-gradient(#c7ebd6 1.5px, transparent 1.5px),
    radial-gradient(#c7ebd6 1.5px, #f6fbf7 1.5px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
  color: var(--ac-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ================== 상단 네비게이션 & BGM ================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 253, 247, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 4px solid #e1f2e8;
  padding: 12px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.island-time-badge {
  background: var(--ac-mint-light);
  color: var(--ac-mint-dark);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 2px solid #bcead0;
}

.nav-links {
  display: flex;
  gap: 10px;
}

.nav-item {
  color: var(--ac-text);
  text-decoration: none;
  font-size: 1.05rem;
  padding: 8px 16px;
  border-radius: 16px;
  transition: all 0.2s ease;
  font-weight: 700;
}

.nav-item:hover, .nav-item.active {
  background: var(--ac-mint);
  color: white;
  transform: translateY(-2px);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 플로팅 BGM 플레이어 */
.bgm-controller {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--ac-yellow);
  padding: 6px 16px;
  border-radius: 999px;
  border: 3px solid #edd145;
  box-shadow: 0 4px 10px rgba(240, 201, 70, 0.3);
}

.bgm-btn {
  background: white;
  border: 2px solid #dab833;
  color: #795548;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease;
}

.bgm-btn:hover {
  transform: scale(1.1);
}

.bgm-label {
  font-size: 0.9rem;
  color: #6d4c41;
  font-weight: 800;
}

.volume-slider {
  width: 60px;
  accent-color: #795548;
  cursor: pointer;
}

/* ================== 메인 헤더 & 타이틀 로고 ================== */
.hero-header {
  text-align: center;
  padding: 40px 20px 20px;
  position: relative;
}

.logo-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.logo-wrapper:hover {
  transform: scale(1.03);
}

.official-logo {
  max-width: 440px;
  width: 85%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.12));
}

/* 사용자가 요청한 "백과사전" 일체형 서브타이틀 */
.encyclopedia-badge {
  margin-top: -12px;
  position: relative;
  background: linear-gradient(135deg, #78c8a1 0%, #489b72 100%);
  color: #ffffff;
  padding: 6px 36px;
  border-radius: 999px;
  border: 4px solid #ffffff;
  box-shadow: 0 8px 20px rgba(72, 155, 114, 0.35);
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-text {
  font-family: 'Jua', 'Gaegu', cursive, sans-serif;
  font-size: 2.1rem;
  letter-spacing: 3px;
  text-shadow: 2px 2px 0 #2e694c;
}

.badge-sub {
  font-size: 0.85rem;
  letter-spacing: 2px;
  color: #d1f7e3;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
}

.hero-tagline {
  margin-top: 14px;
  font-size: 1.2rem;
  color: var(--ac-text-light);
  font-weight: 700;
}

/* ================== 레이아웃 컨테이너 ================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.section-title {
  font-size: 2rem;
  color: var(--ac-text);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '🍃';
  font-size: 1.8rem;
}

/* ================== 🎴 공식 아미보 카드(Amiibo Cards) 쇼케이스 ================== */
.showcase-section {
  background: var(--ac-cream);
  border-radius: var(--ac-border-radius);
  border: 4px solid #dceed5;
  box-shadow: var(--ac-shadow);
  padding: 36px 30px;
  margin-bottom: 50px;
  position: relative;
}

.amiibo-stage-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* 3D 틸트 카드 박스 */
.amiibo-card-3d-box {
  width: 300px;
  height: 425px;
  perspective: 1200px;
  cursor: pointer;
  margin: 10px auto;
}

.amiibo-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
  border-radius: 20px;
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.18);
}

.amiibo-card.is-flipped {
  transform: rotateY(180deg);
}

/* 카드 앞면과 뒷면 공통 */
.card-face {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  overflow: hidden;
  backface-visibility: hidden;
  border: 5px solid #eceff1;
  background: white;
  display: flex;
  flex-direction: column;
}

/* ================= [앞면] 공식 아미보 카드 ================= */
.card-front {
  background: #ffffff;
}

/* 3D 홀로그램 광택 레이어 */
.card-hologram-glare {
  position: absolute;
  inset: 0;
  border-radius: 16px;
  pointer-events: none;
  z-index: 20;
  opacity: 0;
  transition: opacity 0.2s ease;
  mix-blend-mode: color-dodge;
}

/* 카드 상단 헤더 */
.amiibo-card-header {
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
  font-weight: 900;
}

.card-no {
  font-size: 1.4rem;
  letter-spacing: 1px;
}

.card-series-tag {
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
}

.card-icons {
  display: flex;
  gap: 8px;
  font-size: 0.95rem;
}

/* 카드 중앙 일러스트 */
.amiibo-card-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin: 6px 10px;
  border-radius: 14px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

.amiibo-char-img {
  max-width: 85%;
  max-height: 85%;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.2));
  transition: transform 0.3s;
}

.amiibo-card-3d-box:hover .amiibo-char-img {
  transform: scale(1.06);
}

/* 카드 하단 정보 */
.amiibo-card-footer {
  padding: 8px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
}

.card-name-group {
  display: flex;
  flex-direction: column;
}

.card-name-ko {
  font-size: 1.5rem;
  color: var(--ac-text);
  line-height: 1.1;
}

.card-name-en {
  font-size: 0.85rem;
  color: #888;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
}

.card-birth-group {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.85rem;
  font-weight: 800;
  color: #5d4037;
}

/* 하단 브랜드 띠 */
.amiibo-brand-strip {
  background: #f5f5f5;
  border-top: 1px solid #e0e0e0;
  padding: 4px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  font-weight: 900;
  color: #9e9e9e;
  letter-spacing: 1px;
}

.amiibo-logo-text {
  color: #d32f2f;
}

/* ================= [뒷면] 공식 아미보 로고 & 스펙 ================= */
.card-back {
  transform: rotateY(180deg);
  background: #2b3a42;
  color: white;
  border-color: #37474f;
  position: relative;
}

.card-back-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#37474f 15%, transparent 16%);
  background-size: 16px 16px;
  opacity: 0.4;
}

.card-back-content {
  position: relative;
  z-index: 5;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.card-back-logo {
  text-align: center;
  margin-top: 10px;
}

.amiibo-logo-big {
  font-size: 2.2rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: 2px;
  display: block;
}

.ac-logo-sub {
  font-size: 0.85rem;
  color: #80cbc4;
  letter-spacing: 3px;
  font-weight: 800;
}

.card-spec-box {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.9rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
}

.spec-label {
  color: #b0bec5;
  font-weight: 700;
}

.spec-val {
  font-weight: 800;
  color: #ffffff;
}

.spec-quote {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.2);
  font-style: italic;
  font-size: 0.85rem;
  color: #ffe082;
  text-align: center;
}

.card-back-footer {
  text-align: center;
  font-size: 0.75rem;
  color: #78909c;
}

/* ================= 조작 컨트롤 바 ================= */
.amiibo-controls-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.flip-action-btn {
  background: linear-gradient(135deg, #78c8a1 0%, #489b72 100%);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(72, 155, 114, 0.35);
  transition: all 0.2s;
}

.flip-action-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(72, 155, 114, 0.45);
}

.tilt-guide-hint {
  font-size: 0.9rem;
  color: #7b7268;
  font-weight: 700;
}

/* ================= 아미보 바인더 앨범 그리드 ================= */
.amiibo-binder-section {
  margin-top: 36px;
  border-top: 2px dashed #dceed5;
  padding-top: 24px;
}

.binder-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.binder-title {
  font-size: 1.4rem;
  color: var(--ac-text);
  font-weight: 800;
}

.amiibo-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.amiibo-tab {
  border: 2px solid #cce8d7;
  background: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--ac-text);
  cursor: pointer;
  transition: all 0.15s;
}

.amiibo-tab:hover, .amiibo-tab.active {
  background: var(--ac-mint);
  color: white;
  border-color: var(--ac-mint-dark);
}

.amiibo-binder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
}

.binder-card-thumb {
  cursor: pointer;
  transition: all 0.2s;
}

.binder-card-thumb:hover, .binder-card-thumb.active {
  transform: translateY(-6px) scale(1.05);
}

.thumb-inner {
  background: white;
  border-radius: 12px;
  border: 3px solid #dceed5;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
}

.binder-card-thumb.active .thumb-inner {
  border-color: #d32f2f;
  box-shadow: 0 8px 20px rgba(211, 47, 47, 0.35);
}

.thumb-header {
  padding: 4px 8px;
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: white;
  font-weight: 900;
}

.thumb-img-wrap {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.thumb-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

.thumb-footer {
  padding: 6px 8px;
  background: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  font-weight: 800;
}

#threeCanvasContainer:active {
  cursor: grabbing;
}

/* 3D 뷰어 상단 컨트롤 바 */
.viewer-top-bar {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
}

.viewer-top-bar > * {
  pointer-events: auto;
}

.rotate-guide {
  background: rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: #455a64;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.viewer-controls {
  display: flex;
  gap: 8px;
}

.viewer-btn {
  background: white;
  border: 2px solid #b0bec5;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.viewer-btn:hover {
  background: var(--ac-mint);
  color: white;
  border-color: var(--ac-mint-dark);
}

/* 조명 테마 변경 셀렉터 */
.theme-selector {
  position: absolute;
  bottom: 14px;
  left: 14px;
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.85);
  padding: 5px 8px;
  border-radius: 999px;
}

.theme-pill {
  border: none;
  background: transparent;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.theme-pill.active {
  background: var(--ac-mint);
  color: white;
}

/* 3D 캐릭터 프로필 정보 카드 */
.showcase-info-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.char-header-badge {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.char-name-ko {
  font-size: 2.6rem;
  color: var(--ac-text);
  line-height: 1;
}

.char-name-foreign {
  font-size: 1.1rem;
  color: var(--ac-text-light);
  font-family: 'Nunito', sans-serif;
  margin-top: 4px;
}

.char-personality-tag {
  background: var(--ac-yellow);
  color: #795548;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 800;
  border: 2px solid #edd145;
}

.char-speech-bubble {
  position: relative;
  background: white;
  padding: 16px 20px;
  border-radius: 20px;
  border: 3px solid #dceed5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
  font-size: 1.15rem;
  color: #37474f;
}

.char-speech-bubble::before {
  content: '';
  position: absolute;
  left: 25px;
  bottom: -12px;
  border-width: 12px 12px 0;
  border-style: solid;
  border-color: #dceed5 transparent;
  display: block;
  width: 0;
}

.char-detail-list {
  background: var(--ac-sand);
  padding: 16px;
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 0.95rem;
}

.detail-row {
  display: flex;
  flex-direction: column;
}

.detail-label {
  font-size: 0.8rem;
  color: var(--ac-text-light);
  font-weight: 800;
}

.detail-val {
  font-weight: 800;
  color: var(--ac-text);
}

.bounce-action-btn {
  background: linear-gradient(135deg, var(--ac-mint) 0%, var(--ac-mint-dark) 100%);
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 16px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(120, 200, 161, 0.4);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.bounce-action-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 20px rgba(120, 200, 161, 0.5);
}

/* 3D 뷰어 하단 캐릭터 선택 캐러셀 */
.char-selector-strip {
  margin-top: 24px;
  border-top: 2px dashed #dceed5;
  padding-top: 18px;
}

.strip-label {
  font-size: 1rem;
  color: var(--ac-text-light);
  margin-bottom: 12px;
  font-weight: 800;
}

.avatar-scroll-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.avatar-scroll-container::-webkit-scrollbar {
  height: 8px;
}

.avatar-scroll-container::-webkit-scrollbar-thumb {
  background: #c2e2d0;
  border-radius: 999px;
}

.avatar-btn {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: white;
  border: 3px solid #dceed5;
  padding: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.avatar-btn:hover, .avatar-btn.active {
  border-color: var(--ac-mint);
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 6px 14px rgba(120, 200, 161, 0.35);
  background: var(--ac-mint-light);
}

/* ================== 전체 도감 탐색기 (주민 & NPC) ================== */
.catalog-section {
  margin-bottom: 60px;
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
  background: var(--ac-cream);
  padding: 16px 20px;
  border-radius: 18px;
  border: 3px solid #e1f2e8;
}

.search-input {
  flex: 1;
  min-width: 220px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 2px solid #cce8d7;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
}

.search-input:focus {
  border-color: var(--ac-mint);
}

.filter-select {
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid #cce8d7;
  font-size: 0.95rem;
  font-family: inherit;
  background: white;
  color: var(--ac-text);
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}

.char-card {
  background: var(--ac-cream);
  border-radius: 20px;
  border: 3px solid #e1f2e8;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  position: relative;
  overflow: hidden;
}

.char-card:hover {
  transform: translateY(-6px);
  border-color: var(--ac-mint);
  box-shadow: 0 12px 24px rgba(120, 200, 161, 0.25);
}

.char-card-img-wrap {
  width: 110px;
  height: 110px;
  margin: 0 auto 12px;
  background: radial-gradient(circle, #eef9f2 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.char-card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

.char-card-name {
  font-size: 1.35rem;
  color: var(--ac-text);
  margin-bottom: 4px;
}

.char-card-badge {
  display: inline-block;
  font-size: 0.8rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--ac-mint-light);
  color: var(--ac-mint-dark);
  font-weight: 800;
}

.char-card-3d-btn {
  margin-top: 12px;
  width: 100%;
  background: white;
  border: 2px solid var(--ac-mint);
  color: var(--ac-mint-dark);
  border-radius: 999px;
  padding: 6px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.char-card-3d-btn:hover {
  background: var(--ac-mint);
  color: white;
}

/* ================== 마이홈 증축 계산기 ================== */
.housing-section {
  background: var(--ac-cream);
  border-radius: var(--ac-border-radius);
  border: 4px solid #fae6c3;
  padding: 30px;
  margin-bottom: 60px;
  box-shadow: 0 10px 25px rgba(240, 180, 80, 0.15);
}

.housing-dashboard {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 30px;
  align-items: center;
}

.housing-summary-box {
  background: #fff8eb;
  border: 3px solid #f2d59f;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
}

.current-stage-title {
  font-size: 2.2rem;
  color: #6d4c41;
  margin-bottom: 6px;
}

.current-stage-icon {
  font-size: 4rem;
  margin: 10px 0;
}

.loan-cost-tag {
  font-size: 1.8rem;
  color: #d84315;
  font-weight: 900;
}

.storage-spec-badge {
  display: inline-block;
  background: #ffe082;
  color: #5d4037;
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 800;
  margin-top: 10px;
}

.housing-steps-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.step-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: white;
  border: 2px solid #edd7b4;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.step-card:hover, .step-card.active {
  border-color: var(--ac-orange);
  background: #fffbf2;
  transform: translateX(6px);
}

.step-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-number {
  background: var(--ac-orange);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 900;
}

.step-info-title {
  font-weight: 800;
  font-size: 1.05rem;
}

.step-price {
  font-weight: 900;
  color: #bf360c;
}

/* ================== 이스터에그 체험관 ================== */
.easter-section {
  margin-bottom: 60px;
}

.easter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.easter-card {
  background: var(--ac-cream);
  border: 3px solid #e1f2e8;
  border-radius: 20px;
  padding: 24px;
  position: relative;
  transition: transform 0.2s;
}

.easter-card:hover {
  transform: translateY(-4px);
  border-color: var(--ac-mint);
}

.easter-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.easter-icon {
  font-size: 2.2rem;
}

.easter-title {
  font-size: 1.35rem;
  color: var(--ac-text);
}

.easter-badge {
  font-size: 0.75rem;
  background: var(--ac-yellow);
  color: #795548;
  padding: 3px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.easter-cond {
  font-size: 0.9rem;
  color: #d84315;
  background: #fbe9e7;
  padding: 6px 12px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-weight: 800;
}

.easter-desc {
  font-size: 0.95rem;
  color: var(--ac-text-light);
  line-height: 1.5;
}

.easter-action-btn {
  margin-top: 14px;
  background: var(--ac-mint-light);
  border: 2px solid var(--ac-mint);
  color: var(--ac-mint-dark);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}

.easter-action-btn:hover {
  background: var(--ac-mint);
  color: white;
}

/* ================== 모달 (외계인 TV & 세부 정보) ================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--ac-cream);
  border-radius: 28px;
  padding: 30px;
  max-width: 550px;
  width: 90%;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border: 5px solid #dceed5;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: #eceff1;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  cursor: pointer;
}

/* 외계인 TV 시뮬레이터 전용 스타일 */
.alien-tv-frame {
  background: #3e2723;
  border: 12px solid #5d4037;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.alien-screen {
  background: #111;
  height: 240px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  color: #00ff66;
  text-shadow: 0 0 8px #00ff66;
}

.scanlines {
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.4) 50%);
  background-size: 100% 4px;
  pointer-events: none;
}

.ufo-symbol {
  font-size: 4rem;
  animation: alienGlitch 0.4s infinite alternate;
}

@keyframes alienGlitch {
  0% { transform: translate(0, 0) skew(0deg); opacity: 0.9; }
  50% { transform: translate(-3px, 2px) skew(-2deg); opacity: 0.6; }
  100% { transform: translate(3px, -2px) skew(2deg); opacity: 1; }
}

/* ================== 푸터 ================== */
.footer {
  text-align: center;
  padding: 40px 20px;
  border-top: 3px solid #dceed5;
  background: #eef7f1;
  color: var(--ac-text-light);
  font-size: 0.95rem;
}

.footer-leaf {
  font-size: 2rem;
  margin-bottom: 10px;
}

/* ================== 반응형 ================== */
@media (max-width: 900px) {
  .showcase-grid {
    grid-template-columns: 1fr;
  }
  .viewer-3d-box {
    height: 380px;
  }
  .housing-dashboard {
    grid-template-columns: 1fr;
  }
  .navbar {
    flex-direction: column;
    gap: 12px;
  }
  .badge-text {
    font-size: 1.7rem;
  }
}

/* ================== 📜 방문기록 & 동물의 숲 대화 말풍선 섹션 ================== */
.guestbook-section {
  background: #fdfbf7;
  border-radius: var(--ac-border-radius);
  border: 3.5px solid #ebd9bf;
  padding: 22px 22px 20px;
  margin-bottom: 40px;
  box-shadow: 0 8px 24px rgba(100, 80, 50, 0.06);
}

.guestbook-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); /* 남기는 칸과 기록 모아보는 칸 5:5 (반반) 비율 */
  gap: 20px;
  align-items: stretch;
}

/* 좌측: 방문기록 작성 폼 카드 */
.guestbook-form-card {
  background: #ffffff;
  border: 2px solid #ebd9bf;
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.guestbook-form-card .form-card-title {
  font-size: 1.15rem;
  color: #5d4037;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.guestbook-form-card .form-card-sub {
  font-size: 0.82rem;
  color: #8d6e63;
  margin-bottom: 12px;
}

.guestbook-form .form-group {
  margin-bottom: 9px;
}

.guestbook-form label {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: #4e342e;
  margin-bottom: 2px;
}

.guestbook-form input[type="text"],
.guestbook-form select,
.guestbook-form textarea {
  width: 100%;
  padding: 7px 11px;
  border: 1.8px solid #e0d2bd;
  border-radius: 10px;
  background: #fffdf9;
  font-family: inherit;
  font-size: 0.88rem;
  color: #3e2723;
  transition: all 0.2s;
  box-sizing: border-box;
}

.guestbook-form input[type="text"]:focus,
.guestbook-form select:focus,
.guestbook-form textarea:focus {
  outline: none;
  border-color: var(--ac-mint);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(85, 187, 137, 0.2);
}

.guestbook-form .form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 아바타 선택 그리드 */
.avatar-label-wrap {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: 4px;
}

.avatar-select-hint {
  font-size: 0.75rem;
  color: #795548;
}

.villager-circle-picker-group {
  margin-top: 4px;
  margin-bottom: 9px;
}

/* 방명록 폼: 두 줄(2-row)로 정렬된 50px 원형 주민 프로필 스크롤 트랙 */
.avatar-circles-scroll-wrap {
  border: 1.8px solid #ecdcc7;
  background: #fffdf9;
  border-radius: 14px;
  padding: 8px 10px;
  overflow-x: auto;
  overflow-y: hidden;
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.03);
  scrollbar-width: thin;
  scrollbar-color: #e2cca8 #fdf6ec;
}

.avatar-circles-scroll-wrap::-webkit-scrollbar {
  height: 6px;
}

.avatar-circles-scroll-wrap::-webkit-scrollbar-track {
  background: #fdf6ec;
  border-radius: 999px;
}

.avatar-circles-scroll-wrap::-webkit-scrollbar-thumb {
  background: #dfcbab;
  border-radius: 999px;
}

.avatar-circles-scroll-wrap::-webkit-scrollbar-thumb:hover {
  background: #cfb38a;
}

/* 3줄(3-row)로 정렬된 원형 주민 프로필 스크롤 트랙 */
.avatar-circles-track {
  display: grid;
  grid-template-rows: repeat(3, auto);
  grid-auto-flow: column;
  gap: 5px 8px;
  width: max-content;
  align-items: center;
  padding-bottom: 2px;
}

/* 개별 주민 원형 프로필 버튼 아이템 */
.villager-circle-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 2px 3px;
  border-radius: 9px;
  transition: all 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  user-select: none;
}

.villager-circle-item:hover {
  background: rgba(255, 248, 230, 0.9);
  transform: translateY(-1px);
}

.villager-circle-item.active {
  background: #fff5e0;
}

/* 대화 말풍선 프로필 사진 크기와 어우러지는 44px 원형 프레임 */
.villager-circle-frame {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 40%, #fdf5e2 100%);
  border: 2.8px solid #dcd1bb;
  box-shadow: 0 3px 8px rgba(78, 52, 46, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: all 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.villager-circle-frame img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
  transition: transform 0.18s;
}

.villager-circle-item:hover .villager-circle-frame {
  transform: scale(1.06);
  border-color: var(--ac-mint);
  box-shadow: 0 4px 10px rgba(85, 187, 137, 0.3);
}

.villager-circle-item.active .villager-circle-frame {
  transform: scale(1.08);
  border-color: #ff9800;
  border-width: 3px;
  background: #fff8eb;
  box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.35), 0 4px 12px rgba(255, 152, 0, 0.2);
}

/* 선택 활성화 체크 배지 */
.villager-circle-frame .circle-check {
  display: none;
  position: absolute;
  bottom: 0;
  right: 0;
  background: #ff9800;
  color: white;
  font-size: 0.6rem;
  font-weight: 900;
  border-radius: 50%;
  width: 15px;
  height: 15px;
  text-align: center;
  line-height: 15px;
  border: 1.5px solid #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.villager-circle-item.active .circle-check {
  display: block;
}

/* 원형 프로필 아래 주민 이름 라벨 */
.villager-circle-name {
  font-size: 0.72rem;
  font-weight: 800;
  color: #4e342e;
  margin-top: 2px;
  text-align: center;
  white-space: nowrap;
}

.villager-circle-item.active .villager-circle-name {
  color: #bf360c;
  font-weight: 900;
}

/* 말버릇 직접 변경 컴팩트 필드 */
.custom-catchphrase-compact-row {
  margin-top: -2px;
  margin-bottom: 8px;
}

.custom-catchphrase-compact-row label {
  font-size: 0.78rem;
  color: #795548;
  font-weight: 800;
  margin-bottom: 2px;
}

.custom-catchphrase-compact-row input {
  font-size: 0.84rem;
  padding: 6px 12px;
  border-radius: 9px;
  background: #fdfaf4;
  border: 1.5px dashed #dbc9af;
}

.custom-catchphrase-compact-row input:focus {
  background: #ffffff;
  border-style: solid;
  border-color: var(--ac-mint);
}

.char-counter {
  text-align: right;
  font-size: 0.74rem;
  color: #8d6e63;
  margin-top: 2px;
}

/* 실시간 말풍선 미리보기 상자 */
.preview-box-wrap {
  margin-top: 8px;
  padding: 8px 12px;
  background: #f7f3ea;
  border: 1.8px dashed #ded0bd;
  border-radius: 14px;
}

.preview-badge {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  color: #6d4c41;
  margin-bottom: 6px;
}

.submit-guestbook-btn {
  width: 100%;
  margin-top: 8px;
  background: linear-gradient(135deg, #55bb89 0%, #3ca06f 100%);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(60, 160, 111, 0.35);
  transition: all 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.submit-guestbook-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(60, 160, 111, 0.45);
  background: linear-gradient(135deg, #5ec993 0%, #43ae79 100%);
}

.submit-guestbook-btn:active {
  transform: translateY(1px);
}

/* 우측: 방명록 피드 카드 */
.guestbook-feed-card {
  background: #ffffff;
  border: 2px solid #ebd9bf;
  border-radius: 20px;
  padding: 16px 18px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 2px dashed #ebd9bf;
}

.feed-title-badge {
  font-size: 1.08rem;
  font-weight: 900;
  color: #4e342e;
}

.feed-count {
  font-size: 0.8rem;
  font-weight: 800;
  background: #eef7f1;
  color: var(--ac-mint-dark);
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
}

.reset-feed-btn {
  background: #fdf5e6;
  border: 1.5px solid #ecd8ba;
  color: #8d6e63;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}

.reset-feed-btn:hover {
  background: #ffe0b2;
  color: #bf360c;
  border-color: #ffb74d;
}

.acnh-speech-feed {
  max-height: 520px;
  overflow-y: auto;
  padding-right: 6px;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ========================================================
   🍃 정통 모여봐요 동물의 숲 (ACNH) 대화 말풍선 디자인 
   ======================================================== */
.acnh-speech-wrap {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  position: relative;
  width: 100%;
  animation: speechBubblePop 0.28s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes speechBubblePop {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* 1. 화자 아바타 원형 프레임 (48px) */
.acnh-avatar-frame {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, #ffffff 40%, #fdf5e2 100%);
  border: 3px solid #8d6e63;
  box-shadow: 0 3px 8px rgba(78, 52, 46, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  overflow: hidden;
  margin-bottom: 2px;
}

.acnh-avatar-frame img {
  width: 86%;
  height: 86%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.1));
}

/* 2. 동물의 숲 본체 말풍선 (답답하지 않게 넉넉한 5:5 공간 활용) */
.acnh-speech-bubble {
  position: relative;
  flex: 1;
  background: #fffef8;
  border: 3px solid #d9ceb2;
  border-radius: 20px;
  padding: 12px 34px 10px 18px;
  box-shadow: 0 4px 14px rgba(90, 70, 50, 0.07), inset 0 2px 0 #ffffff;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 말풍선 꼬리 (왼쪽 아바타를 향하는 동숲 고유의 둥근 부리형 꼬리) */
.acnh-speech-bubble::before {
  content: "";
  position: absolute;
  left: -13px;
  bottom: 11px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 13px 8px 0;
  border-color: transparent #d9ceb2 transparent transparent;
  z-index: 1;
}

.acnh-speech-bubble::after {
  content: "";
  position: absolute;
  left: -9px;
  bottom: 12px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 7px 10px 7px 0;
  border-color: transparent #fffef8 transparent transparent;
  z-index: 2;
}

/* 3. 말풍선 위쪽에 얹혀진 화자 네임태그 (Speaker Nametag) */
.speech-nametag {
  position: absolute;
  top: -11px;
  left: 16px;
  background: #455a64;
  color: #ffffff;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  border: 2px solid #ffffff;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.2px;
}

/* 4. 대화 메시지 본문 (3-4줄 자연스러운 줄바꿈 및 문장 끝 말버릇 연동) */
.speech-body {
  margin-top: 2px;
  display: block;
  line-height: 1.6;
}

.speech-message {
  display: inline;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #433931;
  font-weight: 700;
  margin: 0;
  margin-right: 6px;
  word-break: break-word;
}

/* 5. 동숲 주민 말버릇 강조 배지 (Catchphrase Badge) */
.speech-catchphrase {
  display: inline-block;
  padding: 1px 8px;
  background: #ffe3a8;
  color: #8c4e0b;
  border: 1.3px dashed #f59e0b;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 900;
  vertical-align: baseline;
  box-shadow: 0 1px 4px rgba(245, 158, 11, 0.2);
  animation: catchphraseWobble 3s infinite ease-in-out;
}

@keyframes catchphraseWobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-2.5deg); }
  75% { transform: rotate(2.5deg); }
}

/* 6. 닌텐도 스위치 대화 넘김 프롬프트 버튼 (A ▶ Prompt) */
.speech-next-btn {
  position: absolute;
  bottom: 6px;
  right: 10px;
  background: #00bcd4;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 6px;
  border-radius: 999px;
  box-shadow: 0 2px 5px rgba(0, 188, 212, 0.35);
  animation: promptBlink 1.4s infinite ease-in-out;
  pointer-events: none;
  letter-spacing: 0.4px;
}

@keyframes promptBlink {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.85;
  }
  50% {
    transform: translateY(-2px);
    opacity: 1;
  }
}

/* 개별 삭제 버튼 */
.speech-delete-btn {
  position: absolute;
  top: 4px;
  right: 8px;
  background: transparent;
  border: none;
  color: #b0bec5;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 2px 5px;
  border-radius: 6px;
  transition: all 0.15s;
}

.speech-delete-btn:hover {
  color: #e53935;
  background: #ffebee;
}

/* 타임스탬프 메타 */
.speech-meta {
  font-size: 0.68rem;
  color: #a1887f;
  margin-top: 4px;
  align-self: flex-start;
}

/* 반응형 모바일 대응 */
@media (max-width: 820px) {
  .guestbook-container {
    grid-template-columns: 1fr;
  }
  .acnh-speech-feed {
    max-height: 420px;
  }
}

@media (max-width: 600px) {
  .guestbook-section {
    padding: 16px 12px;
  }
  .guestbook-form-card, .guestbook-feed-card {
    padding: 14px;
  }
  .guestbook-form .form-row-2col, .guestbook-form .form-row {
    grid-template-columns: 1fr;
  }
  .acnh-avatar-frame {
    width: 42px;
    height: 42px;
    min-width: 42px;
  }
  .acnh-speech-bubble {
    padding: 10px 12px 8px 12px;
    border-radius: 16px;
  }
  .speech-message {
    font-size: 0.88rem;
  }
}

