@font-face {
  font-family: "Pretendard";
  src: url("/fonts/Pretendard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard";
  src: url("/fonts/Pretendard-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pretendard";
  src: url("/fonts/Pretendard-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0e0f11;
  --muted: #5a5f64;
  --soft: #83878d;
  --line: #e5ded4;
  --warm: #faf8f3;
  --surface: #ffffff;
  --green: #289570;
  --green-soft: #e7f6ee;
  --blue: #205498;
  --blue-soft: #e6f0fb;
  --yellow: #bd8616;
  --yellow-soft: #fff4d4;
  --orange: #de6726;
  --orange-soft: #ffeddc;
  --coral: #d63b2d;
  --coral-soft: #ffecea;
  --shadow: 0 20px 50px rgba(24, 20, 14, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #efefed;
  color: var(--ink);
  font-family: "Pretendard", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.index-shell {
  width: min(920px, 100%);
  background: var(--warm);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 44px;
  box-shadow: var(--shadow);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: white;
}

.index-shell h1 {
  margin: 0 0 10px;
  font-size: 34px;
  line-height: 42px;
}

.index-shell p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 24px;
}

.screen-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.screen-link {
  padding: 22px;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.screen-link strong {
  font-size: 18px;
  line-height: 26px;
}

.screen-link span {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.stage {
  width: min(100%, 760px);
  display: grid;
  place-items: center;
  gap: 18px;
}

.stage-title {
  width: 390px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stage-title a {
  color: var(--green);
}

.phone {
  width: 390px;
  min-height: 844px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 36px;
  box-shadow: var(--shadow);
}

body.mobile-web {
  background: var(--surface);
}

body.mobile-web .page {
  min-height: 100svh;
  display: block;
  padding: 0;
  background: var(--surface);
}

body.mobile-web .stage {
  width: 100%;
  min-height: 100svh;
  display: block;
}

body.mobile-web .stage-title {
  display: none;
}

body.mobile-web .phone {
  width: 100%;
  max-width: 480px;
  min-height: 100svh;
  margin: 0 auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

body.mobile-web .app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 64px;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}

body.mobile-web .content {
  padding: 24px max(20px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

body.mobile-web .home-indicator {
  display: none;
}

.app-header {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: white;
}

.icon-button {
  width: 28px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  font-size: 26px;
  line-height: 1;
}

.app-title {
  flex: 1;
  font-size: 17px;
  font-weight: 700;
}

.content {
  padding: 24px;
}

.greeting {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.headline {
  margin: 6px 0 12px;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

.body-copy {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.category-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.category-card {
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 15px 14px 15px 18px;
  display: grid;
  grid-template-columns: 38px 1fr 18px;
  align-items: center;
  column-gap: 14px;
  background: white;
}

.category-card.selected {
  border-color: var(--orange);
  box-shadow: inset 0 0 0 1px var(--orange);
}

.category-card.emergency {
  border-color: #ff8b7f;
  background: var(--coral-soft);
}

.level {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  font-size: 12px;
  font-weight: 700;
}

.level.l1 {
  background: var(--green);
}

.level.l2 {
  background: var(--yellow);
}

.level.l3 {
  background: var(--orange);
}

.level.l4 {
  background: var(--coral);
}

.category-text strong {
  display: block;
  font-size: 16px;
  line-height: 22px;
}

.category-text span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.divider {
  height: 1px;
  margin: 28px 0 18px;
  background: var(--line);
}

.plain-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
}

.primary-button {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 16px;
  background: var(--ink);
  color: white;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
}

.home-indicator {
  width: 118px;
  height: 5px;
  margin: 36px auto 0;
  border-radius: 999px;
  background: var(--ink);
}

.receipt-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.check-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-weight: 700;
}

.receipt-row h1 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

.receipt-row p {
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.result-card,
.partner-card,
.notice-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.result-card {
  margin-top: 28px;
  padding: 20px;
}

.card-label {
  display: block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 700;
}

.classification-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.route-badge {
  padding: 7px 22px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
}

.confidence {
  color: var(--orange);
  font-size: 11px;
  font-weight: 700;
}

.result-card p {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.criteria {
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid var(--blue);
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  text-align: center;
  font-size: 10px;
  font-weight: 500;
}

.section-title {
  margin: 18px 0 12px;
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
}

.progress {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  margin: 10px 8px 28px;
}

.progress::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  right: 16px;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.progress::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 16px;
  width: 31%;
  height: 4px;
  border-radius: 999px;
  background: var(--orange);
}

.step {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}

.step b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: white;
  color: var(--soft);
  font-size: 10px;
}

.step.active b {
  border-color: var(--orange);
  background: var(--orange);
  color: white;
}

.step.current b {
  border-color: var(--orange);
  background: white;
  color: var(--orange);
}

.step.active,
.step.current {
  color: var(--ink);
}

.partner-card {
  padding: 20px;
}

.partner-top {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 14px;
  align-items: center;
}

.partner-icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--blue);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 700;
}

.partner-top strong {
  display: block;
  font-size: 15px;
  line-height: 22px;
}

.partner-top span,
.visit-time {
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.visit-time {
  margin: 17px 0 12px;
  color: var(--ink);
  font-weight: 700;
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.secondary,
.dark {
  height: 32px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

.secondary {
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.dark {
  border: 0;
  background: var(--ink);
  color: white;
}

.notice-card {
  margin-top: 14px;
  padding: 14px 20px;
  background: var(--warm);
}

.notice-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
}

.notice-card p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.reclassify {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 118px;
  align-items: center;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.reclassify button {
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  color: var(--ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 520px) {
  .page {
    padding: 18px 10px;
  }

  .phone,
  .stage-title {
    width: min(390px, 100%);
  }

  .index-shell {
    padding: 28px;
  }

  .screen-links {
    grid-template-columns: 1fr;
  }
}
