:root {
  --peach-top: #ffc6a8;
  --peach-mid: #f5d0b3;
  --peach-low: #ecddc7;
  --beige: #e8dccb;
  --ink: #2b1d14;
  --ink-soft: #4a362a;
  --muted: #7a5f4e;
  --muted-2: #a8907d;
  --accent: #b36a48;
  --accent-soft: #d98867;
  --coral: #ff8a78;
  --coral-deep: #f56b5b;
  --card-bg: rgba(255, 250, 245, 0.52);
  --card-border: rgba(255, 255, 255, 0.55);
  --card-border-top: rgba(255, 255, 255, 0.9);
  --line: rgba(43, 29, 20, 0.1);
  --line-strong: rgba(43, 29, 20, 0.16);
  --shadow-card: 0 24px 60px -24px rgba(80, 40, 20, 0.25);
  --shadow-pill: 0 8px 20px -8px rgba(180, 80, 50, 0.35);
  --radius-card: 28px;
  --radius-pill: 999px;
  --radius-btn: 16px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.018em;
  line-height: 1.45;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 55% at 50% 35%, rgba(255, 185, 150, 0.75) 0%, rgba(255, 185, 150, 0) 65%),
    radial-gradient(ellipse 60% 40% at 50% 80%, rgba(255, 220, 195, 0.5) 0%, rgba(255, 220, 195, 0) 70%),
    linear-gradient(165deg, var(--peach-top) 0%, var(--peach-mid) 45%, var(--peach-low) 78%, var(--beige) 100%);
  overflow-x: hidden;
  position: relative;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

em {
  font-family: "Noto Serif KR", "Nanum Myeongjo", "Times New Roman", Georgia, serif;
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--coral-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ========== Ambient paw prints ========== */
.paws {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.paw {
  position: absolute;
  color: #ffd9a8;
  opacity: 0;
  filter: drop-shadow(0 0 20px rgba(255, 190, 140, 0.7)) drop-shadow(0 0 8px rgba(255, 220, 180, 0.9));
  animation: pawFloat 8s ease-in-out infinite;
}
.paw-1 { top: 12%;  left: 6%;  width: 40px; --r: -15deg; animation-delay: 0s; }
.paw-2 { top: 22%;  left: 88%; width: 34px; --r:  18deg; animation-delay: -1.5s; }
.paw-3 { top: 52%;  left: 3%;  width: 46px; --r:   8deg; animation-delay: -2.5s; }
.paw-4 { top: 60%;  left: 92%; width: 38px; --r: -22deg; animation-delay: -3.5s; }
.paw-5 { top: 78%;  left: 8%;  width: 32px; --r:  25deg; animation-delay: -4.5s; }
.paw-6 { top: 82%;  left: 86%; width: 42px; --r: -12deg; animation-delay: -5.5s; }
.paw-7 { top: 38%;  left: 94%; width: 28px; --r:  32deg; animation-delay: -2s; }
.paw-8 { top: 40%;  left: 2%;  width: 30px; --r:  -8deg; animation-delay: -6s; }

@keyframes pawFloat {
  0%, 100% { opacity: 0.4;  transform: translateY(0)    rotate(var(--r, 0deg)) scale(1); }
  50%      { opacity: 0.75; transform: translateY(-10px) rotate(var(--r, 0deg)) scale(1.05); }
}

/* ========== Layout ========== */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 28px 20px 36px;
}

.shell {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

/* ========== Top row ========== */
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.brand-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 4px 10px rgba(180, 100, 60, 0.2));
}
.brand-mark svg { width: 100%; height: 100%; }

.brand-name {
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.05em;
}

.lang-pill {
  padding: 8px 18px;
  background: rgba(255, 250, 245, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background 0.2s, transform 0.15s;
  cursor: pointer;
}
.lang-pill:hover {
  background: rgba(255, 250, 245, 0.8);
}
.lang-pill:active {
  transform: scale(0.97);
}

/* ========== Hero ========== */
.hero {
  text-align: center;
  position: relative;
  padding-bottom: 8px;
}

.hero-title {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(26px, 6vw, 34px);
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.045em;
}
.hero-title em {
  display: inline;
  font-size: 1.02em;
}

.puppy-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
}

.puppy-glow {
  position: absolute;
  inset: 0 -10% -5% -10%;
  background: radial-gradient(ellipse 55% 50% at 50% 55%, rgba(255, 180, 140, 0.55) 0%, rgba(255, 180, 140, 0) 70%);
  pointer-events: none;
  z-index: 0;
}

.puppy {
  position: relative;
  z-index: 1;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(120, 60, 30, 0.18));
  animation: puppyBreathe 4s ease-in-out infinite;
  transform-origin: 50% 90%;
  pointer-events: none;
  user-select: none;
}

@keyframes puppyBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.008); }
}

/* ========== Glass login card ========== */
.login-card {
  margin-top: -40px;
  position: relative;
  z-index: 2;
  background: var(--card-bg);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--card-border);
  border-top-color: var(--card-border-top);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 26px 22px 20px;
}

.login-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.04em;
}

.login-sub {
  margin: 0 0 22px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  letter-spacing: -0.01em;
}

.google-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-pill);
  padding: 10px 14px 10px 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, border-color 0.2s;
  min-height: 56px;
}
.google-btn:hover {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.9);
}
.google-btn:active {
  transform: scale(0.995);
}

.google-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.9), transparent 55%),
    linear-gradient(135deg, #f5d5b5 0%, #d9a584 100%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  flex: 0 0 auto;
  box-shadow: inset 0 -2px 4px rgba(60, 30, 10, 0.08);
}

.google-copy {
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 1px;
  line-height: 1.2;
}

.google-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-email-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.google-email {
  font-size: 11.5px;
  color: var(--muted);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.google-caret {
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1;
  flex-shrink: 0;
}

.google-mark {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.google-mark svg {
  width: 22px;
  height: 22px;
}

/* Separator */
.sep {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 500;
}
.sep::before,
.sep::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(43, 29, 20, 0.12);
}

/* Guest button with warm gradient */
.guest-btn {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: var(--radius-pill);
  background:
    linear-gradient(135deg, #ffb89a 0%, #ff8977 45%, #f16a5c 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
  cursor: pointer;
  transition: transform 0.15s, filter 0.2s, box-shadow 0.2s;
  box-shadow:
    var(--shadow-pill),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 8px 16px;
  line-height: 1.2;
}
.guest-btn:hover {
  filter: brightness(1.04) saturate(1.05);
  box-shadow:
    0 12px 28px -10px rgba(220, 90, 70, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.guest-btn:active {
  transform: scale(0.995);
}
.guest-btn .guest-en {
  font-family: "Inter", "Pretendard", sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-shadow: 0 1px 2px rgba(180, 60, 40, 0.25);
}
.guest-btn .guest-ko {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.95;
  text-shadow: 0 1px 2px rgba(180, 60, 40, 0.25);
}

/* Footer */
.login-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.login-footer a {
  letter-spacing: -0.01em;
  transition: color 0.2s;
}
.login-footer a:hover {
  color: var(--ink);
}
.login-footer .dot {
  color: var(--muted-2);
}

/* ========== Splash (keep compatible) ========== */
.splash-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  z-index: 1;
}

.splash-card {
  width: 100%;
  max-width: 400px;
  background: var(--card-bg);
  backdrop-filter: blur(24px) saturate(1.3);
  -webkit-backdrop-filter: blur(24px) saturate(1.3);
  border: 1px solid var(--card-border);
  border-top-color: var(--card-border-top);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  text-align: center;
  padding: 48px 32px 38px;
  position: relative;
}

.splash-logo {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 20px;
  box-shadow: 0 8px 20px -8px rgba(180, 100, 60, 0.3);
}

.splash-brand {
  font-size: 28px;
  line-height: 1.1;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.05em;
}

.splash-sub {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

.splash-loader {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(43, 29, 20, 0.1);
  border-top-color: var(--accent-soft);
  border-right-color: var(--accent-soft);
  margin: 26px auto 0;
  animation: spin 0.9s cubic-bezier(0.5, 0.1, 0.5, 0.9) infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ========== Responsive ========== */
@media (min-width: 640px) {
  .page { padding: 40px 24px 48px; }
  .shell { max-width: 520px; }

  .hero-title {
    font-size: 34px;
  }

  .puppy-stage {
    max-width: 460px;
  }

  .login-card {
    padding: 30px 26px 22px;
    margin-top: -48px;
  }

  .login-title {
    font-size: 24px;
  }
}

@media (min-width: 960px) {
  .shell { max-width: 560px; }

  .top-row {
    margin-bottom: 16px;
  }

  .puppy-stage {
    max-width: 500px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .puppy, .paw, .splash-loader {
    animation: none;
  }
}
