/* 꿈 놀이터 — 전문적인 뼈대 + 아이들의 순수함
   Pretendard 폰트, 정돈된 그리드, 부드러운 그림자의 흰 카드 */
:root {
  --bg: #F6FAF1;
  --surface: #FFFFFF;
  --green: #43A047;
  --green-deep: #2E7D33;
  --green-soft: #EAF5E4;
  --coral: #F08A5D;
  --coral-deep: #DB6B3C;
  --ink: #2C332A;
  --muted: #6E7A69;
  --line: #E8EFE1;
  --shadow: 0 8px 28px rgba(60, 100, 55, .08);
  --shadow-hover: 0 14px 36px rgba(60, 100, 55, .14);
  --radius: 20px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  line-height: 1.5;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  border-radius: 14px;
  padding: 12px 22px;
  cursor: pointer;
  transition: transform .12s, box-shadow .15s, background .15s;
}
.btn:active { transform: scale(.96); }

/* ── 헤더 ── */
#hub-header {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { font-size: 24px; font-weight: 800; color: var(--green-deep); letter-spacing: -.5px; }
.brand-mark { margin-right: 2px; }
.account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--green-deep);
  background: var(--green-soft);
  border: none;
  border-radius: 22px;
  padding: 9px 18px;
  cursor: pointer;
}
.account .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }

/* ── 본문 ── */
#hub { max-width: 1080px; margin: 0 auto; padding: 0 28px 70px; }

.hero { text-align: center; padding: 62px 10px 54px; }
.hero-badge {
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  color: var(--green-deep);
  background: var(--green-soft);
  padding: 7px 16px;
  border-radius: 20px;
  margin-bottom: 22px;
}
.hero h1 {
  font-size: 52px;
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.2;
  color: var(--ink);
}
.hero p {
  margin: 20px auto 0;
  max-width: 640px;
  font-size: 18px;
  line-height: 1.7;
  color: var(--muted);
}

/* ── 섹션 헤더 ── */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 8px 4px 20px;
}
.section-head h2 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.section-head .count { font-size: 14px; color: var(--muted); font-weight: 600; }

/* ── 도구 카드 (이미지 상단형) ── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .16s, box-shadow .16s;
  display: flex;
  flex-direction: column;
}
.tool-card:not(.soon):hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }

.tool-banner {
  height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.banner-cafe { background: var(--green-soft); }
.banner-sign { width: 82%; max-height: 70%; object-fit: contain; }
.banner-soon { font-size: 52px; }
.banner-soon span { opacity: .8; }
.banner-a { background: #FBF3DC; }
.banner-b { background: #F3EEFA; }

.tool-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.tool-tag {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  color: var(--green-deep);
  background: var(--green-soft);
  padding: 4px 11px;
  border-radius: 12px;
  margin-bottom: 12px;
}
.tag-soon { color: var(--muted); background: #EFEFEA; }
.tool-body h3 { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.tool-body p { margin-top: 7px; font-size: 15px; line-height: 1.6; color: var(--muted); flex: 1; }
.tool-actions { display: flex; gap: 9px; margin-top: 18px; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }
.btn-ghost { background: var(--green-soft); color: var(--green-deep); }
.tool-card.soon { opacity: .72; }

/* ── 후원 ── */
.support { margin-top: 40px; }
.support-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 32px;
  display: flex;
  gap: 34px;
  align-items: center;
  flex-wrap: wrap;
}
.support-left { flex: 1; min-width: 280px; }
.support-head { display: flex; align-items: center; gap: 10px; }
.support-head .cup {
  width: 40px; height: 40px; border-radius: 12px;
  background: #FDEEE4; display: inline-flex; align-items: center; justify-content: center; font-size: 22px;
}
.support-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.5px; color: var(--coral-deep); }
.support-left > p { margin: 14px 0 18px; font-size: 15px; line-height: 1.7; color: var(--muted); }

.btn-kakao { background: #FEE500; color: #3A2E1E; font-size: 16px; padding: 13px 26px; }
.btn-kakao:hover { background: #FADA00; }
.btn-record {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-size: 15px;
  padding: 11px;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
}
.btn-record:hover { background: #dcefd0; }
.btn-record:disabled { opacity: .7; cursor: default; }

.accounts { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.acct {
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  background: #FBFBF8;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
}
.acct:hover { border-color: #d8e3cc; }
.acct .bank { color: var(--muted); font-weight: 700; }
.acct i { margin-left: auto; font-style: normal; font-size: 13px; color: var(--coral-deep); font-weight: 700; }
.acct-name { text-align: right; font-size: 13px; color: #a7b0a0; padding-right: 2px; }

.support-qr {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
  background: #FBFBF8;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.support-qr img { display: block; border-radius: 8px; }
.support-qr span { font-size: 13px; color: var(--muted); font-weight: 600; }

/* ── 푸터 ── */
#hub-footer {
  text-align: center;
  padding: 30px;
  font-size: 14px;
  color: #a7b0a0;
  font-weight: 600;
}
#hub-footer .sep { margin: 0 8px; }

#toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  background: var(--green-deep);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 26px;
  box-shadow: 0 10px 26px rgba(46, 125, 51, .32);
  z-index: 20;
}

/* ── 로그인/가입 잠금 ── */
body.locked #hub-header,
body.locked #hub,
body.locked #hub-footer { display: none; }

#gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 20px;
  overflow: auto;
}
.gate-box {
  width: min(92vw, 400px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
  text-align: center;
}
.gate-brand { font-size: 22px; font-weight: 800; color: var(--green-deep); margin-bottom: 6px; }
.gate-box h2 { font-size: 23px; font-weight: 800; letter-spacing: -.5px; }
.gate-sub { font-size: 15px; color: var(--muted); margin: 6px 0 20px; }

.gate-box form { display: flex; flex-direction: column; gap: 10px; }
.gate-box input,
.gate-box select {
  font-family: inherit;
  font-size: 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.gate-box input:focus,
.gate-box select:focus { border-color: var(--green); }

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}
.social-btn:hover { border-color: #d8e3cc; background: #FBFCF9; }
.social-btn .g {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: #4285F4; border: 1px solid #e6e6e6;
  font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 14px;
}

.gate-divider { display: flex; align-items: center; gap: 12px; margin: 16px 0; color: var(--muted); font-size: 13px; }
.gate-divider::before, .gate-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.gate-row { display: flex; gap: 8px; }
.gate-primary, .gate-secondary {
  flex: 1;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  padding: 13px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}
.gate-primary { background: var(--green); color: #fff; }
.gate-primary:hover { background: var(--green-deep); }
.gate-secondary { background: var(--green-soft); color: var(--green-deep); }
.gate-box button:disabled { opacity: .6; cursor: default; }
.gate-err { min-height: 18px; margin-top: 12px; font-size: 14px; color: #d24b3a; font-weight: 600; }

/* 로그인 확인 중 스플래시 */
.gate-splash { text-align: center; animation: gatePulse 1.6s ease-in-out infinite; }
.gate-splash .em { font-size: 64px; display: block; margin-bottom: 12px; }
.gate-splash .tx { font-size: 22px; font-weight: 800; color: var(--green-deep); }
@keyframes gatePulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ── 마이페이지 ── */
#mypage-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(44, 51, 42, .45);
  padding: 20px;
  overflow: auto;
}
.mypage-card {
  width: min(92vw, 400px);
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(30, 50, 25, .25);
  padding: 26px 28px 28px;
}
.mypage-head { display: flex; align-items: center; justify-content: space-between; }
.mypage-head h2 { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.mypage-x {
  font-family: inherit; font-size: 18px; color: var(--muted);
  background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.mypage-x:hover { background: #f1f4ee; }
.mypage-email { font-size: 14px; color: var(--muted); margin: 2px 0 18px; }

#mp-form { display: flex; flex-direction: column; }
#mp-form label { font-size: 13px; font-weight: 700; color: var(--muted); margin: 12px 0 6px; }
#mp-form input, #mp-form select {
  font-family: inherit; font-size: 16px; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; outline: none;
  background: #fff; color: var(--ink); width: 100%;
}
#mp-form input:focus, #mp-form select:focus { border-color: var(--green); }
.mypage-save {
  margin-top: 18px; font-family: inherit; font-size: 16px; font-weight: 700;
  color: #fff; background: var(--green); border: none; border-radius: 12px; padding: 13px; cursor: pointer;
}
.mypage-save:hover { background: var(--green-deep); }
.mypage-save:disabled { opacity: .6; cursor: default; }

.mypage-divider { height: 1px; background: var(--line); margin: 20px 0 14px; }
.mypage-logout {
  width: 100%; font-family: inherit; font-size: 15px; font-weight: 700;
  color: var(--ink); background: #f1f4ee; border: none; border-radius: 12px; padding: 12px; cursor: pointer;
}
.mypage-logout:hover { background: #e8ede2; }
.mypage-delete {
  width: 100%; margin-top: 10px; font-family: inherit; font-size: 14px; font-weight: 600;
  color: #c0402f; background: none; border: none; cursor: pointer; padding: 8px;
}
.mypage-delete:hover { text-decoration: underline; }
.mypage-err { min-height: 18px; margin-top: 6px; font-size: 14px; color: #d24b3a; font-weight: 600; text-align: center; }
