/* ── PAWST CLASS v4.0 ── */
:root {
  --or:  #FF8C00;
  --orL: #FFF5E6;
  --orM: #FFD580;
  --orD: #C25E00;
  --tx:  #1C1C1E;
  --t2:  #6B6B6B;
  --t3:  #AEAEB2;
  --bg:  #F7F3EF;
  --wh:  #FFFFFF;
  --bd:  #E8E0D8;
  --re:  #D0021B;
  --reL: #FFF0F0;
  --gr:  #2D9E6B;
  --grL: #E8F7F0;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--tx);
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ── 화면 전환 ── */
.sc { display: none; min-height: 100vh; flex-direction: column; }
.sc.on { display: flex; }
#s-ob { height: 100vh; max-height: 100vh; overflow: hidden; }

/* ── 하단 탭바 ── */
.bnav {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%; max-width: 480px;
  background: var(--wh);
  border-top: 1px solid var(--bd);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}
.ni {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 0 8px;
  font-size: 10px; color: var(--t3);
  border: none; background: none; cursor: pointer;
  font-family: inherit; transition: color .15s;
}
.ni.on { color: var(--or); }
.ni .em { font-size: 20px; line-height: 1; margin-bottom: 3px; }

/* ── 카드 ── */
.card {
  background: var(--wh);
  border-radius: 16px; padding: 16px;
  margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

/* ── 버튼 ── */
.btn-pr {
  width: 100%; padding: 15px;
  background: var(--or); color: #fff;
  border: none; border-radius: 14px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  margin-bottom: 10px; transition: opacity .15s;
}
.btn-pr:active { opacity: .85; }

.btn-sec {
  width: 100%; padding: 14px;
  background: var(--wh); color: var(--tx);
  border: 1.5px solid var(--bd); border-radius: 14px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  margin-bottom: 10px; transition: background .15s;
}
.btn-sec:active { background: var(--bg); }

.btn-ghost {
  background: none; border: none;
  color: var(--t2); font-size: 13px;
  cursor: pointer; font-family: inherit;
  padding: 8px; text-decoration: underline;
}

.btn-sm {
  padding: 7px 14px; border-radius: 10px;
  font-size: 12px; font-weight: 700;
  cursor: pointer; font-family: inherit; border: none;
}
.btn-sm-or { background: var(--orL); color: var(--orD); }
.btn-sm-re { background: var(--reL); color: var(--re); }
.btn-sm-gr { background: var(--grL); color: var(--gr); }

/* ── 인풋 ── */
.fi {
  width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--bd);
  border-radius: 12px; font-size: 14px;
  background: var(--wh); color: var(--tx);
  font-family: inherit; margin-bottom: 10px;
  outline: none; transition: border-color .15s;
}
.fi:focus { border-color: var(--or); }
.fi-label {
  font-size: 12px; font-weight: 700;
  color: var(--t2); margin-bottom: 5px; display: block;
}
.fi-hint {
  font-size: 11px; color: var(--t3);
  margin-bottom: 14px; margin-top: -4px;
  padding-left: 2px;
}

/* ── 칩 ── */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip {
  padding: 8px 16px; border-radius: 20px;
  border: 1.5px solid var(--bd);
  font-size: 13px; font-weight: 600;
  color: var(--t2); cursor: pointer;
  background: var(--wh); font-family: inherit;
  transition: all .15s;
}
.chip.on { background: var(--or); color: #fff; border-color: var(--or); }

/* ── 섹션 헤더 ── */
.sec-hd { font-size: 18px; font-weight: 800; color: var(--tx); margin-bottom: 14px; }
.sec-sub { font-size: 13px; color: var(--t2); margin-bottom: 16px; line-height: 1.6; }

/* ── 뱃지 ── */
.badge {
  display: inline-block; padding: 3px 9px;
  border-radius: 9px; font-size: 11px; font-weight: 700;
}
.badge-or { background: var(--orL); color: var(--orD); }
.badge-gr { background: var(--grL); color: var(--gr); }
.badge-re { background: var(--reL); color: var(--re); }
.badge-gy { background: #F3F4F6; color: #6B7280; }

/* ── 에러 메시지 ── */
.err-msg {
  color: var(--re); font-size: 13px;
  background: var(--reL); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 10px; display: none;
}

/* ════════════════════════════════════
   SPLASH SCREEN
════════════════════════════════════ */
#splash-screen {
  position: fixed; inset: 0;
  background: linear-gradient(160deg, #B84500 0%, #D4600A 40%, #FF8C00 75%, #FFAA33 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; opacity: 1; transition: opacity 0.6s ease;
}
#splash-screen.fade-out { opacity: 0; pointer-events: none; }
#splash-content { display: flex; flex-direction: column; align-items: center; }
#splash-svg {
  width: 180px; height: 180px;
  opacity: 0; transform: scale(0.85);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#splash-svg.show { opacity: 1; transform: scale(1); }
#splash-plane.animate { animation: planeFly 1s cubic-bezier(0.25,0.46,0.45,0.94) forwards; }
@keyframes planeFly {
  0%   { transform: translate(130px,130px) rotate(-30deg) scale(0.6); opacity:0; }
  60%  { transform: translate(130px,130px) rotate(5deg)  scale(1.05); opacity:1; }
  100% { transform: translate(130px,130px) rotate(0deg)  scale(1);    opacity:1; }
}
#splash-title {
  font-family: Georgia, serif; font-size: 32px; font-weight: 700;
  color: #fff; letter-spacing: 1.5px; margin-top: 22px;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  text-align: center; padding: 0 16px;
}
#splash-title.show { opacity: 1; transform: translateY(0); }
#splash-sub {
  font-family: Arial, sans-serif; font-size: 9px;
  color: rgba(255,255,255,0.85); letter-spacing: 1.8px;
  margin-top: 8px; opacity: 0; transition: opacity 0.5s ease 0.15s;
  text-align: center; padding: 0 12px;
}
#splash-sub.show { opacity: 0.8; }
#splash-divider {
  width: 60px; height: 1px; background: rgba(255,255,255,0.6);
  opacity: 0; margin-top: 14px;
  transition: opacity 0.4s ease 0.2s, width 0.5s ease 0.2s;
}
#splash-divider.show { opacity: 0.6; width: 110px; }
#splash-credit {
  font-family: Arial, sans-serif; font-size: 11px;
  color: rgba(255,255,255,0.7); margin-top: 10px;
  opacity: 0; transition: opacity 0.5s ease 0.25s;
}
#splash-credit.show { opacity: 1; }
#splash-dots { display: flex; gap: 10px; margin-top: 32px; opacity: 0; transition: opacity 0.4s ease; }
#splash-dots.show { opacity: 1; }
.splash-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,0.9); opacity: 0.2; transition: opacity 0.3s ease;
}
.splash-dot.active { opacity: 1; }

/* ════════════════════════════════════
   본 스플래시 (로그인 선택 화면)
════════════════════════════════════ */
.splash-hero {
  background: linear-gradient(180deg,#FFF5E6,#FFE8C0);
  padding: 48px 24px 28px; text-align: center;
  position: relative; overflow: hidden; flex-shrink: 0;
}
.splash-blob {
  position: absolute; width: 180px; height: 180px;
  border-radius: 50%; background: rgba(255,140,0,.1);
  top: -50px; right: -50px;
}
.splash-emoji { font-size: 56px; margin-bottom: 12px; }
.splash-logo { font-size: 26px; font-weight: 900; color: var(--tx); }
.splash-logo .or { color: var(--or); }
.splash-sub-txt { font-size: 12px; color: var(--t2); margin-top: 6px; letter-spacing: .06em; }
.splash-body { padding: 24px; flex: 1; display: flex; flex-direction: column; }
.splash-tagline {
  font-size: 15px; font-weight: 700;
  color: var(--tx); line-height: 1.75;
  text-align: center; margin-bottom: 24px;
}

/* 파트너 */
.partner-row { display: flex; justify-content: center; gap: 12px; margin-bottom: 24px; }
.partner-wrap { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.partner-icon {
  width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--bd);
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.partner-label { font-size: 10px; color: var(--t2); font-weight: 600; }

/* ════════════════════════════════════
   상단 헤더
════════════════════════════════════ */
.top-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; background: var(--wh);
  border-bottom: 1px solid var(--bd);
  position: sticky; top: 0; z-index: 50;
}
.top-hd-title { font-size: 17px; font-weight: 800; color: var(--tx); }

/* ════════════════════════════════════
   홈 배너
════════════════════════════════════ */
.home-banner {
  background: linear-gradient(135deg, #FF8C00, #FFB347);
  border-radius: 18px; padding: 20px;
  color: #fff; margin-bottom: 14px;
  position: relative; overflow: hidden;
}
.home-banner::after {
  content: '✈️'; position: absolute;
  right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 48px; opacity: 0.3;
}
.home-banner-title { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.home-banner-sub { font-size: 13px; opacity: 0.85; line-height: 1.5; }

/* 인스타 버튼 */
.insta-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; width: 100%; padding: 14px;
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
  color: #fff; border: none; border-radius: 14px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: inherit;
  margin-bottom: 10px; text-decoration: none;
}

/* ════════════════════════════════════
   강아지 카드
════════════════════════════════════ */
.dog-card {
  background: var(--wh); border-radius: 16px;
  padding: 14px; margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  display: flex; align-items: center; gap: 12px;
}
.dog-emoji {
  width: 52px; height: 52px; border-radius: 14px;
  background: var(--orL); display: flex;
  align-items: center; justify-content: center;
  font-size: 28px; flex-shrink: 0;
}
.dog-info { flex: 1; min-width: 0; }
.dog-name { font-size: 15px; font-weight: 800; margin-bottom: 3px; }
.dog-detail { font-size: 12px; color: var(--t2); line-height: 1.5; }

/* 카카오 버튼 */
.kakao-btn {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; padding: 13px;
  background: #FEE500; color: #3A1D1D;
  border: none; border-radius: 12px;
  font-size: 14px; font-weight: 800;
  cursor: pointer; font-family: inherit;
}
.kakao-btn:active { opacity: .85; }

/* ════════════════════════════════════
   봉사자 항공편 카드
════════════════════════════════════ */
.flight-card {
  background: var(--wh); border-radius: 16px;
  padding: 16px; margin-bottom: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.flight-route {
  display: flex; align-items: center; gap: 8px;
  font-size: 16px; font-weight: 800; margin-bottom: 8px;
}
.flight-detail { font-size: 13px; color: var(--t2); line-height: 1.6; }
.flight-actions { display: flex; gap: 8px; margin-top: 12px; }

/* ════════════════════════════════════
   모달 (바텀시트)
════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 500; display: flex; align-items: flex-end; justify-content: center;
}
.modal-sheet {
  background: var(--wh); border-radius: 20px 20px 0 0;
  padding: 20px 20px max(20px, env(safe-area-inset-bottom));
  width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto;
}
.modal-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--bd); margin: 0 auto 16px; }
.modal-title { font-size: 17px; font-weight: 800; margin-bottom: 16px; }

/* ════════════════════════════════════
   앱 종료 팝업
════════════════════════════════════ */
#app-exit-popup {
  position: fixed; inset: 0; z-index: 9998;
  background: rgba(0,0,0,.6);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.exit-box { background: var(--wh); border-radius: 20px; padding: 28px 24px; text-align: center; width: 100%; }
.exit-title { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.exit-sub { font-size: 13px; color: var(--t2); margin-bottom: 24px; }
.exit-btns { display: flex; gap: 10px; }
.exit-btns button { flex: 1; padding: 14px; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; border: none; }
.exit-cancel { background: var(--bg); color: var(--tx); }
.exit-confirm { background: var(--or); color: #fff; }

/* ════════════════════════════════════
   기관 대시보드 탭
════════════════════════════════════ */
.dash-tab-row {
  display: flex; gap: 8px; padding: 14px 16px 0;
  border-bottom: 1px solid var(--bd);
  background: var(--wh); flex-shrink: 0;
}
.dash-tab {
  padding: 10px 16px; border-radius: 10px 10px 0 0;
  font-size: 13px; font-weight: 700;
  border: none; background: none; cursor: pointer;
  color: var(--t3); font-family: inherit;
  border-bottom: 2px solid transparent; transition: all .15s;
}
.dash-tab.on { color: var(--or); border-bottom-color: var(--or); }

/* ════════════════════════════════════
   언어 토글
════════════════════════════════════ */
.lang-toggle {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.2); color: var(--tx);
  border: 1px solid rgba(0,0,0,.15); border-radius: 8px;
  padding: 5px 10px; font-size: 12px; font-weight: 700;
  cursor: pointer; z-index: 10;
}
/* 탭 콘텐츠 내부 상단에 띄우는 작은 언어 토글 (8-A-04 피드백 반영)
   주의: 이 버튼은 absolute로 떠 있고 바로 아래 sec-hd 제목과 같은 줄 높이에서
   시작하기 때문에, 영어 모드처럼 제목이 길어지는 경우 겹칠 수 있다.
   이를 막기 위해 (1) 버튼을 패딩 영역 안쪽 더 위로 당기고,
   (2) 버튼을 사용하는 탭의 첫 sec-hd에는 별도로 우측 여백을 준다(.has-lang-toggle 참고). */
.lang-toggle-tab {
  position: absolute; top: 16px; right: 16px;
  background: #fff; color: var(--t2);
  border: 1px solid var(--bd); border-radius: 8px;
  padding: 3px 8px; font-size: 10px; font-weight: 700;
  cursor: pointer; z-index: 5;
}
/* lang-toggle-tab과 같은 줄에 위치하는 sec-hd는 토글 버튼 너비만큼 오른쪽을 비워서
   영어 모드에서 제목이 길어져도 겹치지 않게 한다. */
.sec-hd.has-lang-toggle { padding-right: 56px; }

/* ════════════════════════════════════
   구글 로그인 버튼
════════════════════════════════════ */
.btn-google {
  width: 100%; padding: 13px 16px;
  background: #fff; color: #3c4043;
  border: 1.5px solid var(--bd); border-radius: 14px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: background .15s;
}
.btn-google:active { background: #f5f5f5; }

/* Apple 로그인 버튼 */
.btn-apple {
  width: 100%; padding: 13px 16px;
  background: #000; color: #fff;
  border: 1.5px solid #000; border-radius: 14px;
  font-size: 14px; font-weight: 600;
  cursor: pointer; font-family: inherit;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  transition: background .15s;
}
.btn-apple:active { background: #333; }
/* 구분선 */
.divider-row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px;
}
.divider-line { flex: 1; height: 1px; background: var(--bd); }
.divider-txt { font-size: 12px; color: var(--t3); white-space: nowrap; }

/* ════════════════════════════════════
   로그인 화면
════════════════════════════════════ */
.login-hero {
  background: linear-gradient(180deg, #FFF5E6, #FFE8C0);
  padding: 40px 24px 24px; text-align: center; flex-shrink: 0;
}
.login-emoji { font-size: 52px; margin-bottom: 10px; }
.login-title { font-size: 20px; font-weight: 900; color: var(--tx); }
.login-sub { font-size: 12px; color: var(--t2); margin-top: 4px; }
.login-body { padding: 24px; flex: 1; }
.login-tab-row { display: flex; gap: 8px; margin-bottom: 20px; }
.login-tab {
  flex: 1; padding: 11px; border-radius: 10px;
  font-size: 14px; font-weight: 700;
  border: none; cursor: pointer; font-family: inherit;
  background: var(--bg); color: var(--t2); transition: all .15s;
}
.login-tab.on { background: var(--or); color: #fff; }

/* ════════════════════════════════════
   빈 상태
════════════════════════════════════ */
.empty-state { text-align: center; padding: 40px 20px; color: var(--t2); }
.empty-state .em { font-size: 48px; margin-bottom: 12px; }
.empty-state .msg { font-size: 14px; line-height: 1.6; }

/* ════════════════════════════════════
   어드민
════════════════════════════════════ */
.admin-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.admin-stat-box { background: var(--wh); border-radius: 14px; padding: 16px; text-align: center; }
.admin-stat-n { font-size: 28px; font-weight: 900; color: var(--or); }
.admin-stat-l { font-size: 11px; color: var(--t2); margin-top: 4px; }

/* ════════════════════════════════════
   마이페이지 통계
════════════════════════════════════ */
.mypage-stat-card {
  background: linear-gradient(135deg, #FFF5E6, #FFE8C0);
  border-radius: 18px; padding: 18px;
  margin-bottom: 6px;
  border: 1.5px solid var(--orM);
}
.mypage-stat-box {
  flex: 1; text-align: center;
  background: rgba(255,255,255,0.6);
  border-radius: 12px; padding: 12px 6px;
}
.mypage-stat-n { font-size: 26px; font-weight: 900; color: var(--tx); }
.mypage-stat-l { font-size: 10px; color: var(--t2); margin-top: 3px; }

/* ════════════════════════════════════
   완료 카운트 배너 (기관 대시보드)
════════════════════════════════════ */
.done-count-banner {
  background: var(--grL);
  border-radius: 14px; padding: 16px 20px;
  margin-bottom: 14px;
  display: flex; align-items: center;
  border: 1.5px solid #A7F3D0;
}
.ob-slides { flex: 1; width: 100%; position: relative; }
.ob-slide { display: none; flex-direction: column; justify-content: center; align-items: center; width: 100%; height: 100%; padding: 40px 32px; text-align: center; }
.ob-emoji { font-size: 72px; margin-bottom: 24px; }
.ob-title { font-size: 22px; font-weight: 900; margin-bottom: 12px; line-height: 1.4; }
.ob-desc { font-size: 14px; color: var(--t2); line-height: 1.7; }
.ob-dots { display: flex; justify-content: center; gap: 6px; padding: 16px; }
.ob-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--bd); transition: all .3s; }
.ob-dot.on { width: 22px; background: var(--or); }

/* ════════════════════════════════════
   개인정보 동의 체크박스
════════════════════════════════════ */
.agree-box {
  background: #FFF8F0;
  border: 1.5px solid var(--orM);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
}
.agree-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--tx); cursor: pointer; line-height: 1.5;
}
.agree-row input[type="checkbox"] {
  width: 18px; height: 18px; flex-shrink: 0;
  accent-color: var(--or); margin-top: 1px;
}
