:root {
  --bg-1: #fff9f4;
  --bg-2: #f4fffb;
  --card: rgba(255, 255, 255, 0.88);
  --text-main: #24313b;
  --text-sub: #5f6d76;
  --accent: #ff8f7a;
  --accent-2: #52c7b8;
  --line: #dce7e3;
  --shadow: 0 18px 40px rgba(35, 52, 60, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Nunito", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 10% 10%, #ffd8cf 0%, transparent 32%),
    radial-gradient(circle at 90% 20%, #cef8ef 0%, transparent 30%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

.site-shell {
  width: min(1020px, 100%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.62);
  border-bottom: 1px solid rgba(220, 231, 227, 0.7);
}

.nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

.brand {
  color: var(--text-main);
  text-decoration: none;
  font-weight: 800;
}

.top-nav {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.top-nav a {
  color: #37505a;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}

.page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.page-long {
  display: grid;
  gap: 14px;
  align-content: start;
  padding-top: 28px;
  padding-bottom: 32px;
}

.card {
  width: min(760px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow);
  backdrop-filter: blur(7px);
  animation: rise 0.7s ease-out both;
}

.eyebrow {
  margin: 0;
  font-weight: 800;
  color: var(--accent-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

h1 {
  margin: 8px 0 10px;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  line-height: 1.2;
}

.subtitle {
  margin: 0 0 18px;
  color: var(--text-sub);
}

.upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), #ffa79a);
  color: #fff;
  font-weight: 800;
  padding: 13px 20px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(255, 143, 122, 0.34);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.upload:hover {
  transform: translateY(-2px);
  filter: saturate(1.08);
}

.upload input {
  display: none;
}

.status {
  margin: 12px 0 0;
  color: var(--text-sub);
  font-size: 0.95rem;
}

.preview-wrap {
  --preview-url: none;
  position: relative;
  margin-top: 16px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px dashed var(--line);
  background: #f8fffc;
  height: clamp(220px, 58vh, 560px);
  display: grid;
  place-items: center;
}

.preview-wrap.dragover {
  border-color: var(--accent-2);
  box-shadow: inset 0 0 0 2px rgba(82, 199, 184, 0.35);
}

.preview-wrap::before {
  content: "";
  position: absolute;
  inset: -6%;
  background-image: var(--preview-url);
  background-size: cover;
  background-position: center;
  filter: blur(22px) saturate(1.08);
  transform: scale(1.08);
  opacity: 0.85;
}

#preview-image {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
}

.drop-guide {
  position: relative;
  z-index: 1;
  margin: 0;
  color: #587078;
  font-weight: 700;
  text-align: center;
  padding: 0 16px;
  transition: opacity 0.2s ease;
}

.preview-wrap.has-image .drop-guide {
  opacity: 0;
  pointer-events: none;
}

.analyzing-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(248, 255, 252, 0.78);
  backdrop-filter: blur(3px);
  transition: opacity 0.2s ease;
}

.analyzing-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.paw-spinner {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffffff, #f0fffb);
  box-shadow: inset 0 0 0 1px #daf0ea, 0 8px 24px rgba(82, 199, 184, 0.25);
  animation: spinPulse 1.4s ease-in-out infinite;
}

.paw-spinner span {
  font-size: 1.8rem;
}

.analyzing-overlay p {
  margin: 0;
  color: #3b4a54;
  font-weight: 700;
}

.dot-loader {
  display: flex;
  gap: 8px;
}

.dot-loader span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent-2);
  animation: jump 0.7s ease-in-out infinite alternate;
}

.dot-loader span:nth-child(2) {
  animation-delay: 0.15s;
}

.dot-loader span:nth-child(3) {
  animation-delay: 0.3s;
}

.result {
  margin-top: 16px;
  padding: 16px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #eef3f1;
}

.result h2 {
  margin: 0;
  font-size: 1.25rem;
}

#top-desc {
  margin: 6px 0 12px;
  color: var(--text-sub);
}

.meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #eef3f2;
  overflow: hidden;
}

.meter-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-2), #86dccf);
  transition: width 0.35s ease;
}

.scores {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  background: #f8fcfb;
  border: 1px solid #edf3f1;
  border-radius: 12px;
  padding: 10px 12px;
}

.info-card {
  width: min(760px, 100%);
  padding: 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(220, 231, 227, 0.85);
  box-shadow: 0 10px 24px rgba(35, 52, 60, 0.08);
}

.info-card h2 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.info-card p {
  margin: 0 0 8px;
  color: var(--text-sub);
  line-height: 1.6;
}

.info-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-sub);
  line-height: 1.6;
}

.grid-info {
  width: min(760px, 100%);
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.policy-links a {
  text-decoration: none;
  color: #1f6f64;
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid rgba(220, 231, 227, 0.8);
  background: rgba(255, 255, 255, 0.55);
}

.site-footer .site-shell {
  padding: 18px 20px 24px;
}

.site-footer p {
  margin: 0;
  color: #5f6d76;
  font-size: 0.9rem;
}

.text-page {
  display: grid;
  gap: 12px;
  align-content: start;
  padding-top: 26px;
  padding-bottom: 34px;
}

.text-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(220, 231, 227, 0.85);
  border-radius: 20px;
  padding: 22px;
}

.text-card h1 {
  margin: 0 0 8px;
}

.text-card h2 {
  margin: 14px 0 6px;
  font-size: 1.08rem;
}

.text-card p,
.text-card li {
  color: #51626c;
  line-height: 1.62;
}

.contact-form {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}

.contact-form label {
  font-weight: 700;
  color: #35505a;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid #d8e7e2;
  border-radius: 12px;
  padding: 11px 12px;
  font: inherit;
  color: var(--text-main);
  background: #fff;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid rgba(82, 199, 184, 0.3);
  border-color: #7bd4c8;
}

.contact-form button {
  margin-top: 4px;
  border: none;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, var(--accent), #ffa79a);
  box-shadow: 0 12px 24px rgba(255, 143, 122, 0.34);
  cursor: pointer;
}

.contact-form button:disabled {
  background: #c7d3d8;
  box-shadow: none;
  cursor: not-allowed;
}

.form-status {
  margin: 2px 0 0;
  color: #305f57;
  min-height: 1.45em;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spinPulse {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.05);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

@keyframes jump {
  from {
    transform: translateY(0);
    opacity: 0.55;
  }
  to {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@media (max-width: 640px) {
  .nav-row {
    gap: 10px;
    align-items: flex-start;
    flex-direction: column;
  }

  .card {
    padding: 22px 18px;
    border-radius: 22px;
  }

  .preview-wrap {
    height: clamp(180px, 48vh, 420px);
  }

  .grid-info {
    grid-template-columns: 1fr;
  }
}
