/* ============================================================
   흥래 아일랜드 — UI 스타일 (파스텔 + 둥글둥글)
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --ink: #5b4a36;
  --ink-soft: #8a7a64;
  --cream: rgba(255, 252, 244, 0.92);
  --pink: #ff8fa3;
  --mint: #8fd4a8;
  --sky: #7ec8e3;
  --gold: #ffd166;
  --shadow: 0 6px 20px rgba(90, 70, 40, 0.18);
  --radius: 20px;
  font-size: 16px;
}

html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  font-family: 'Gowun Dodum', 'Apple SD Gothic Neo', 'Pretendard', sans-serif;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}

h1, h2, h3, h4, button, .chip, #levelBadge, #clockChip, .card-name, .toast {
  font-family: 'Jua', 'Apple SD Gothic Neo', sans-serif;
  font-weight: 400;
}

/* ---------- 하늘 ---------- */
#sky { position: fixed; inset: 0; z-index: 0; }
.sky-layer { position: absolute; inset: 0; transition: opacity 0.4s linear; }
#skyDay { background: linear-gradient(180deg, #6db8e8 0%, #a8dcf5 38%, #d8f0fb 70%, #fdeedc 100%); opacity: 1; }
#skySunset { background: linear-gradient(180deg, #7d8ed8 0%, #d8a0c8 35%, #ffb88a 68%, #ffd9a8 100%); opacity: 0; }
#skyNight { background: linear-gradient(180deg, #131c3a 0%, #25315c 45%, #3d4b7d 78%, #5a6798 100%); opacity: 0; }

#game { position: fixed; inset: 0; z-index: 1; display: block; }

/* ---------- UI 오버레이 ---------- */
#ui { position: fixed; inset: 0; z-index: 2; pointer-events: none; }
#ui > * { pointer-events: auto; }
.hidden { display: none !important; }

/* ---------- 상단 바 ---------- */
#topbar {
  position: absolute; top: 10px; left: 10px; right: 10px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  pointer-events: none;
}
#topbar > * { pointer-events: auto; }

.level-card {
  display: flex; align-items: center; gap: 8px;
  background: var(--cream); border-radius: 999px; padding: 6px 14px 6px 6px;
  box-shadow: var(--shadow);
}
#levelBadge {
  background: linear-gradient(135deg, var(--gold), #ffab4a);
  color: #7a4d00; border-radius: 999px; padding: 6px 12px; font-size: 1rem;
  box-shadow: inset 0 -2px 0 rgba(0,0,0,0.08);
  white-space: nowrap;
}
.xp-wrap { display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.xpbar {
  height: 10px; background: #e8ddca; border-radius: 999px; overflow: hidden;
}
#xpFill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, #8fd45f, #5fc8a8);
  transition: width 0.45s cubic-bezier(0.34, 1.4, 0.64, 1);
}
#xpText { font-size: 0.68rem; color: var(--ink-soft); text-align: center; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  background: var(--cream); border-radius: 999px; padding: 7px 12px;
  font-size: 0.92rem; box-shadow: var(--shadow); white-space: nowrap;
}
.chip b { color: var(--ink); }
.chip.ticket { background: linear-gradient(135deg, #ffe9f2, #ffd9e8); animation: glowPulse 2s infinite; }
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 6px 20px rgba(255, 120, 160, 0.25); }
  50% { box-shadow: 0 6px 26px rgba(255, 120, 160, 0.55); }
}
.chip.pulse { animation: chipPop 0.4s cubic-bezier(0.34, 1.6, 0.64, 1); }
@keyframes chipPop { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

.top-actions { display: flex; gap: 6px; margin-left: auto; align-items: center; }
#clockChip {
  background: var(--cream); border-radius: 999px; padding: 7px 12px;
  font-size: 0.9rem; box-shadow: var(--shadow); white-space: nowrap;
}
.icon-btn {
  width: 38px; height: 38px; border: none; border-radius: 50%;
  background: var(--cream); box-shadow: var(--shadow);
  font-size: 1.05rem; cursor: pointer; transition: transform 0.15s;
}
.icon-btn:active { transform: scale(0.88); }

/* ---------- 미션 ---------- */
#missions {
  position: absolute; top: 64px; left: 10px; width: 215px;
  display: flex; flex-direction: column; gap: 6px;
}
#missionToggle {
  border: none; background: var(--cream); border-radius: 14px;
  padding: 8px 12px; font-family: 'Jua', sans-serif; font-size: 0.92rem;
  color: var(--ink); box-shadow: var(--shadow); cursor: pointer; text-align: left;
}
#missions.collapsed #missionList { display: none; }
.mission {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255, 252, 244, 0.85); border-radius: 14px; padding: 8px 10px;
  box-shadow: var(--shadow); margin-bottom: 6px;
}
.mission.done { opacity: 0.65; }
.m-icon { font-size: 1.15rem; }
.m-body { flex: 1; min-width: 0; }
.m-text { font-size: 0.78rem; line-height: 1.25; }
.m-bar { height: 6px; background: #e8ddca; border-radius: 999px; margin-top: 4px; overflow: hidden; }
.m-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #ffab4a); border-radius: 999px; transition: width 0.3s; }
.m-prog { font-size: 0.72rem; color: var(--ink-soft); white-space: nowrap; }

/* ---------- 토스트 ---------- */
#toasts {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; width: min(92vw, 480px); z-index: 12; /* 카탈로그(8)·모달(10) 위 */
}
.toast {
  background: rgba(91, 74, 54, 0.92); color: #fff8ec;
  padding: 10px 18px; border-radius: 999px; font-size: 0.92rem;
  box-shadow: var(--shadow); text-align: center;
  animation: toastIn 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
  max-width: 100%;
}
.toast.out { opacity: 0; transform: translateY(-8px); transition: all 0.4s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.9); } }

/* ---------- 하단 도움말 + 툴바 ---------- */
#hudTip {
  position: absolute; bottom: 96px; left: 50%; transform: translateX(-50%);
  background: rgba(255, 252, 244, 0.85); border-radius: 999px;
  padding: 7px 16px; font-size: 0.82rem; color: var(--ink);
  box-shadow: var(--shadow); white-space: nowrap; max-width: 94vw;
  overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}

#toolbar {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; padding: 8px;
  background: var(--cream); border-radius: 26px; box-shadow: var(--shadow);
  max-width: 96vw;
}
.tool-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: none; background: transparent; border-radius: 18px;
  padding: 8px 10px; min-width: 58px; cursor: pointer;
  transition: transform 0.15s, background 0.2s;
  color: var(--ink);
}
.tool-btn:active { transform: scale(0.9); }
.tool-btn.active { background: linear-gradient(135deg, #d8f3c8, #b8e8d0); box-shadow: inset 0 -3px 0 rgba(95, 174, 70, 0.35); }
.t-ico { font-size: 1.5rem; line-height: 1.2; position: relative; }
.t-label { font-size: 0.72rem; font-family: 'Jua', sans-serif; }
.basket .t-ico i {
  position: absolute; top: -6px; right: -12px;
  background: var(--pink); color: white; font-style: normal;
  font-size: 0.66rem; border-radius: 999px; padding: 2px 6px;
  font-family: 'Jua', sans-serif;
}

/* ---------- 바텀 시트 패널 ---------- */
#panel {
  position: absolute; left: 50%; transform: translateX(-50%);
  bottom: 0; width: min(720px, 100vw);
  max-height: 62vh; display: flex; flex-direction: column;
  background: #fffaf0; border-radius: 26px 26px 0 0;
  box-shadow: 0 -10px 40px rgba(90, 70, 40, 0.3);
  animation: sheetUp 0.32s cubic-bezier(0.34, 1.3, 0.64, 1);
  z-index: 6;
}
@keyframes sheetUp { from { transform: translate(-50%, 40%); opacity: 0.4; } }
#panelHead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 8px;
}
#panelHead h2 { font-size: 1.2rem; }
#panelClose {
  border: none; width: 34px; height: 34px; border-radius: 50%;
  background: #f0e6d2; font-size: 1rem; cursor: pointer; color: var(--ink);
}
#panelBody {
  overflow-y: auto; padding: 8px 16px 24px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;
  -webkit-overflow-scrolling: touch;
}

/* 카드 */
.card {
  text-align: left; border: 2px solid transparent; border-radius: 18px;
  background: white; padding: 12px; cursor: pointer;
  box-shadow: 0 3px 12px rgba(90, 70, 40, 0.1);
  transition: transform 0.15s, border 0.2s;
  display: flex; flex-direction: column; gap: 5px;
  font-family: inherit; color: var(--ink);
}
.card:hover { transform: translateY(-2px); }
.card:active { transform: scale(0.97); }
.card.selected { border-color: var(--mint); background: #f4fcf2; }
.card.locked { opacity: 0.62; filter: saturate(0.5); }
.card-top { display: flex; justify-content: space-between; align-items: center; }
.card-emoji { font-size: 1.7rem; }
.card-rarity { font-size: 0.78rem; letter-spacing: 1px; }
.card-cat { font-size: 0.72rem; color: var(--ink-soft); background: #f4ecdc; border-radius: 999px; padding: 3px 8px; }
.card-name { font-size: 1.02rem; }
.card-stats { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 0.75rem; color: var(--ink-soft); }
.card-stats .short { color: #d86a6a; }
.card-trait { font-size: 0.74rem; color: #5f9c6e; }
.card-effect { font-size: 0.74rem; color: #4a7fa8; background: #ecf5fc; border-radius: 10px; padding: 4px 8px; }
.card-dust { font-size: 0.74rem; color: #b8862a; }
.card-desc { font-size: 0.76rem; color: var(--ink-soft); line-height: 1.45; }
.lock-tag {
  font-size: 0.74rem; color: #9a6dbd; background: #f5ecfc;
  border-radius: 10px; padding: 4px 8px; align-self: flex-start;
}

/* 바구니 */
.basket-row {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px;
  background: white; border-radius: 16px; padding: 10px 14px;
  box-shadow: 0 3px 12px rgba(90, 70, 40, 0.1);
}
.b-emoji { font-size: 1.6rem; }
.b-info { flex: 1; display: flex; flex-direction: column; }
.b-info small { color: var(--ink-soft); }
.b-info em { color: #5f9c6e; font-style: normal; }
.empty-note {
  grid-column: 1 / -1; text-align: center; color: var(--ink-soft);
  padding: 30px 10px; line-height: 1.7; font-size: 0.95rem;
}

.btn {
  border: none; border-radius: 14px; padding: 10px 16px;
  font-family: 'Jua', sans-serif; font-size: 0.95rem; cursor: pointer;
  color: var(--ink); background: #f0e6d2; transition: transform 0.15s;
}
.btn:active { transform: scale(0.94); }
.btn.primary { background: linear-gradient(135deg, #8fd45f, #5fc8a8); color: #1d4d33; }
.btn.ghost { background: #f0e6d2; }
.btn.small { padding: 8px 12px; font-size: 0.85rem; white-space: nowrap; }
.btn.wide { grid-column: 1 / -1; padding: 13px; font-size: 1.05rem; }

/* 도움말 */
.help { grid-column: 1 / -1; line-height: 1.65; font-size: 0.9rem; }
.help h4 { margin: 14px 0 4px; font-size: 1rem; color: #3f7a52; }
.help h4:first-child { margin-top: 0; }
.help p { color: var(--ink-soft); }

/* ---------- 모달 ---------- */
#modalRoot {
  position: fixed; inset: 0; z-index: 10;
  background: rgba(60, 45, 25, 0.45);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.25s;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal-card {
  background: #fffaf0; border-radius: 24px; padding: 24px;
  width: min(380px, 88vw); text-align: center;
  box-shadow: 0 16px 50px rgba(40, 25, 8, 0.35);
  animation: modalPop 0.3s cubic-bezier(0.34, 1.4, 0.64, 1);
}
@keyframes modalPop { from { transform: scale(0.8); opacity: 0; } }
.modal-card h3 { font-size: 1.2rem; margin-bottom: 10px; }
.modal-card p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.6; }
.modal-card small { font-size: 0.8rem; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

/* ---------- 스플래시 ---------- */
#splash {
  position: fixed; inset: 0; z-index: 20;
  background: linear-gradient(180deg, #8ecdee 0%, #b8e4f7 45%, #ffeeda 100%);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.6s;
}
#splash.out { opacity: 0; pointer-events: none; }
.splash-inner { text-align: center; padding: 24px; animation: splashFloat 3.5s ease-in-out infinite; }
@keyframes splashFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.splash-logo { width: min(190px, 45vw); margin-bottom: 8px; filter: drop-shadow(0 8px 16px rgba(70, 50, 20, 0.25)); }
#splash h1 {
  font-size: clamp(2.2rem, 8vw, 3.4rem); color: #fff;
  text-shadow: 0 3px 0 rgba(95, 140, 80, 0.7), 0 8px 24px rgba(60, 90, 130, 0.35);
  letter-spacing: 2px;
}
.splash-sub { margin-top: 8px; color: #51708a; font-size: clamp(0.9rem, 3.4vw, 1.05rem); }
#startBtn {
  margin-top: 26px; border: none; cursor: pointer;
  font-family: 'Jua', sans-serif; font-size: 1.25rem;
  padding: 15px 38px; border-radius: 999px; color: #1d4d33;
  background: linear-gradient(135deg, #aef07e, #5fc8a8);
  box-shadow: 0 8px 0 #4aa285, 0 14px 30px rgba(60, 120, 90, 0.4);
  transition: transform 0.12s, box-shadow 0.12s;
}
#startBtn:active { transform: translateY(6px); box-shadow: 0 2px 0 #4aa285, 0 6px 14px rgba(60, 120, 90, 0.4); }
.splash-tip { margin-top: 22px; font-size: 0.8rem; color: #6a8298; }

/* ============================================================
   v2 — 커스텀 아이콘 / 카탈로그 팝업 / 로그인 / 동물
   ============================================================ */

/* ---------- 툴바 SVG 아이콘 ---------- */
.ticon { width: 30px; height: 30px; display: block; }
.t-ico { position: relative; }
.sel-badge {
  position: absolute; right: -10px; bottom: -4px;
  font-size: 0.78rem; font-style: normal;
  background: #fff; border-radius: 999px; padding: 1px 3px;
  box-shadow: 0 2px 6px rgba(90, 70, 40, 0.25);
  pointer-events: none;
}
.count-badge {
  position: absolute; top: -7px; right: -11px;
  background: var(--pink); color: white; font-style: normal;
  font-size: 0.66rem; border-radius: 999px; padding: 2px 6px;
  font-family: 'Jua', sans-serif;
  pointer-events: none;
}
.tool-btn.active .ticon { filter: drop-shadow(0 2px 4px rgba(95, 174, 70, 0.5)); transform: scale(1.08); }

/* ---------- 도감 카탈로그 팝업 ---------- */
#catalog {
  position: fixed; inset: 0; z-index: 8;
  background: rgba(60, 45, 25, 0.42);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.25s;
  padding: 14px;
}
.catalog-card {
  width: min(880px, 96vw); height: min(620px, 92vh);
  background: #fffaf0; border-radius: 26px;
  box-shadow: 0 20px 60px rgba(40, 25, 8, 0.4);
  display: flex; flex-direction: column; overflow: hidden;
  animation: modalPop 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.catalog-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 8px; gap: 10px;
}
.catalog-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.catalog-tabs button {
  border: none; border-radius: 999px; padding: 9px 16px;
  font-family: 'Jua', sans-serif; font-size: 0.95rem; color: var(--ink);
  background: #f0e6d2; cursor: pointer; transition: all 0.18s;
}
.catalog-tabs button.active {
  background: linear-gradient(135deg, #8fd45f, #5fc8a8); color: #1d4d33;
  box-shadow: 0 4px 12px rgba(95, 200, 130, 0.4);
}
.catalog-main {
  flex: 1; display: flex; min-height: 0;
}
.catalog-detail {
  width: 318px; min-width: 318px; padding: 4px 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
  overflow-y: auto;
}
.preview-wrap {
  position: relative;
  background: linear-gradient(180deg, #cdeafa 0%, #e8f7e0 100%);
  border-radius: 20px; overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(90, 70, 40, 0.12);
}
#previewCanvas { width: 100%; height: 230px; display: block; }
.preview-hint {
  position: absolute; bottom: 8px; right: 12px;
  font-size: 0.68rem; color: rgba(91, 74, 54, 0.55);
  font-family: 'Jua', sans-serif;
}
#detailInfo { display: flex; flex-direction: column; gap: 7px; }
#detailInfo h3 { font-size: 1.25rem; display: flex; align-items: center; gap: 8px; }
#detailInfo .d-rarity { font-size: 0.8rem; letter-spacing: 1.5px; }
#detailInfo .d-personality { color: #5f9c6e; font-size: 0.82rem; }
#detailInfo .d-desc { color: var(--ink-soft); font-size: 0.85rem; line-height: 1.55; }
#detailInfo .d-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px;
  background: #fff; border-radius: 14px; padding: 10px 12px;
  font-size: 0.8rem; color: var(--ink);
  box-shadow: 0 2px 8px rgba(90, 70, 40, 0.08);
}
#detailInfo .d-effect { font-size: 0.8rem; color: #4a7fa8; background: #ecf5fc; border-radius: 12px; padding: 7px 10px; }
#detailInfo .d-lock { font-size: 0.84rem; color: #9a6dbd; background: #f5ecfc; border-radius: 12px; padding: 8px 10px; }
#detailInfo .d-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#detailInfo .d-actions .btn { flex: 1; min-width: 120px; }

/* 애정도 */
.aff-wrap { background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: 0 2px 8px rgba(90, 70, 40, 0.08); }
.aff-top { display: flex; justify-content: space-between; font-size: 0.8rem; margin-bottom: 5px; }
.aff-title { color: #d8627a; font-family: 'Jua', sans-serif; }
.aff-bar { height: 10px; background: #ffe3ea; border-radius: 999px; overflow: hidden; }
.aff-bar i { display: block; height: 100%; background: linear-gradient(90deg, #ff9fb2, #ff5d73); border-radius: 999px; transition: width 0.4s; }
.feed-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.feed-chip {
  border: none; background: #fff4e0; border-radius: 999px; padding: 6px 10px;
  font-size: 0.8rem; cursor: pointer; font-family: inherit; color: var(--ink);
  transition: transform 0.12s;
}
.feed-chip:active { transform: scale(0.92); }
.feed-chip.fav { background: linear-gradient(135deg, #ffe9f2, #ffd9e8); box-shadow: 0 0 0 1.5px #ffb3c9 inset; }
.feed-chip:disabled { opacity: 0.45; cursor: default; }

#catalogGrid {
  flex: 1; overflow-y: auto; padding: 4px 14px 16px 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px; align-content: start;
  -webkit-overflow-scrolling: touch;
}
.gcard {
  border: 2.5px solid transparent; border-radius: 16px; background: #fff;
  padding: 10px 8px; cursor: pointer; text-align: center;
  box-shadow: 0 3px 10px rgba(90, 70, 40, 0.09);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-family: inherit; color: var(--ink);
  transition: transform 0.14s, border-color 0.18s;
}
.gcard:hover { transform: translateY(-2px); }
.gcard.selected { border-color: var(--mint); background: #f4fcf2; }
.gcard.locked { opacity: 0.55; filter: saturate(0.4); }
.gcard .g-emoji { font-size: 1.7rem; line-height: 1.2; }
.gcard .g-name { font-family: 'Jua', sans-serif; font-size: 0.82rem; }
.gcard .g-sub { font-size: 0.68rem; color: var(--ink-soft); }
.gcard .g-sub.owned { color: #5f9c6e; }
.gcard .g-aff { font-size: 0.68rem; color: #d8627a; }

/* ---------- 방문 배너 ---------- */
#visitBanner {
  position: absolute; top: 58px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, #d8ecff, #e8f4ff);
  border-radius: 999px; padding: 8px 10px 8px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: var(--shadow); z-index: 4;
  font-family: 'Jua', sans-serif; font-size: 0.92rem; color: #2e5f8a;
}
#visitExit {
  border: none; border-radius: 999px; padding: 8px 14px;
  background: #fff; color: #2e5f8a; font-family: 'Jua', sans-serif;
  cursor: pointer; box-shadow: 0 2px 8px rgba(46, 95, 138, 0.2);
}

/* ---------- 계정 모달 ---------- */
.account-rows { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; text-align: left; }
.code-row {
  display: flex; align-items: center; gap: 8px;
  background: #fff; border-radius: 14px; padding: 10px 14px;
  box-shadow: 0 2px 8px rgba(90, 70, 40, 0.1);
}
.code-row b { font-size: 1.3rem; letter-spacing: 3px; font-family: 'Jua', sans-serif; flex: 1; }
.code-row small { color: var(--ink-soft); }
.visit-row { display: flex; gap: 8px; }
.visit-row input {
  flex: 1; border: 2px solid #e8ddca; border-radius: 14px; padding: 10px 14px;
  font-family: 'Jua', sans-serif; font-size: 1.05rem; letter-spacing: 2px;
  text-transform: uppercase; color: var(--ink); outline: none; min-width: 0;
  background: #fff;
}
.visit-row input:focus { border-color: var(--mint); }
.account-note { font-size: 0.78rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- 스플래시 로그인 ---------- */
.splash-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 26px; align-items: center; }
#googleBtn {
  display: flex; align-items: center; gap: 10px;
  border: none; cursor: pointer;
  font-family: 'Jua', sans-serif; font-size: 1.15rem; color: #444;
  padding: 14px 34px; border-radius: 999px; background: #fff;
  box-shadow: 0 6px 0 #d8d2c2, 0 12px 26px rgba(60, 90, 130, 0.3);
  transition: transform 0.12s, box-shadow 0.12s;
}
#googleBtn:active { transform: translateY(5px); box-shadow: 0 1px 0 #d8d2c2, 0 5px 12px rgba(60, 90, 130, 0.3); }
#startBtn { margin-top: 0; font-size: 1.05rem; padding: 12px 30px; }
#splashStatus { margin-top: 14px; font-size: 0.85rem; color: #4a6f8e; min-height: 1.2em; font-family: 'Jua', sans-serif; }

/* ---------- 모바일 ---------- */
@media (max-width: 640px) {
  .xp-wrap { min-width: 76px; }
  #xpText { display: none; }
  .chip { padding: 6px 9px; font-size: 0.8rem; }
  #clockChip { display: none; }
  #missions { width: 178px; top: 100px; }
  .m-text { font-size: 0.72rem; }
  #toasts { top: 104px; }
  .toast { font-size: 0.8rem; padding: 8px 14px; }
  .tool-btn { min-width: 38px; padding: 7px 4px; }
  .t-ico { font-size: 1.3rem; }
  .ticon { width: 25px; height: 25px; }
  .t-label { font-size: 0.6rem; }
  #toolbar { gap: 3px; padding: 7px; }
  #hudTip { bottom: 86px; font-size: 0.72rem; }
  #panelBody { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  #panel { max-height: 68vh; }
  /* 카탈로그: 세로 스택 */
  #catalog { padding: 8px; }
  .catalog-card { height: 94vh; }
  .catalog-main { flex-direction: column; overflow-y: auto; }
  .catalog-detail { width: auto; min-width: 0; overflow: visible; }
  #previewCanvas { height: 170px; }
  #catalogGrid {
    overflow: visible; padding: 4px 14px 16px;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  }
  .catalog-tabs button { padding: 8px 11px; font-size: 0.82rem; }
  #visitBanner { top: 100px; font-size: 0.8rem; }
}
