:root {
  color-scheme: light;
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-soft: #eef3f6;
  --text: #17212b;
  --muted: #687786;
  --line: #dfe6eb;
  --primary: #156f79;
  --primary-dark: #0f525a;
  --accent: #f2b84b;
  --success: #2d8b57;
  --shadow: 0 12px 30px rgba(23, 33, 43, 0.08);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(21, 111, 121, 0.1), rgba(245, 247, 249, 0) 270px),
    var(--bg);
  color: var(--text);
}

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

.app-shell {
  width: 100%;
  max-width: 680px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(16px + env(safe-area-inset-top)) 20px 14px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(223, 230, 235, 0.75);
  backdrop-filter: blur(18px);
}

.topbar h1 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.status-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(21, 111, 121, 0.22);
  border-radius: 999px;
  background: rgba(21, 111, 121, 0.08);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 800;
}

.content {
  padding: 16px 16px calc(104px + env(safe-area-inset-bottom));
}

.content:focus {
  outline: none;
}

.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 120px;
  gap: 12px;
  min-height: 150px;
  margin-bottom: 16px;
  padding: 22px;
  border: 1px solid rgba(21, 111, 121, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 22%, rgba(242, 184, 75, 0.28), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #e7f1f2 100%);
  box-shadow: var(--shadow);
}

.hero-copy {
  position: relative;
  z-index: 1;
  align-self: end;
}

.hero-copy strong {
  display: block;
  max-width: 260px;
  font-size: 25px;
  line-height: 1.22;
  letter-spacing: 0;
}

.hero-copy p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.amount-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 15px;
}

.amount-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(21, 111, 121, 0.1);
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.fuel-visual {
  position: relative;
  min-height: 112px;
}

.drop {
  position: absolute;
  display: block;
  width: 44px;
  height: 58px;
  border-radius: 52% 48% 54% 46%;
  background: linear-gradient(160deg, #1e8a95, #0f525a);
  transform: rotate(45deg);
  box-shadow: 0 18px 32px rgba(21, 111, 121, 0.22);
}

.drop-one {
  top: 10px;
  right: 22px;
}

.drop-two {
  top: 58px;
  right: 70px;
  width: 28px;
  height: 38px;
  background: linear-gradient(160deg, #f2b84b, #c9821d);
}

.gauge {
  position: absolute;
  right: 6px;
  bottom: 3px;
  width: 96px;
  height: 48px;
  border: 12px solid rgba(21, 111, 121, 0.22);
  border-bottom: 0;
  border-radius: 96px 96px 0 0;
}

.gauge::after {
  position: absolute;
  right: 16px;
  bottom: 0;
  width: 42px;
  height: 5px;
  content: "";
  background: var(--primary-dark);
  border-radius: 999px;
  transform: rotate(-28deg);
  transform-origin: right center;
}

.page-panel {
  display: none;
  animation: fade-up 180ms ease-out;
}

.page-panel.active {
  display: block;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 14px;
}

.section-title span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 13px;
  font-weight: 900;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.notice-box,
.info-card,
.summary-grid section,
.hook-card,
.quick-facts section,
.criteria-list section,
.news-card,
.news-toolbar {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 20px rgba(23, 33, 43, 0.05);
}

.hook-card {
  margin-bottom: 12px;
  padding: 18px;
  border-color: rgba(21, 111, 121, 0.18);
  background: linear-gradient(135deg, #ffffff, #edf7f4);
}

.hook-card p {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
  line-height: 1.55;
}

.hook-card strong {
  display: block;
  margin-top: 10px;
  color: var(--primary-dark);
  font-size: 14px;
  line-height: 1.6;
}

.notice-box {
  padding: 18px;
}

.notice-box strong,
.summary-grid strong {
  display: block;
  font-size: 17px;
  line-height: 1.35;
}

.notice-box p,
.summary-grid p,
.info-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.step-list {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 0;
  list-style: none;
}

.step-list li {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.step-list li > span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(242, 184, 75, 0.18);
  color: #9b6414;
  font-weight: 900;
}

.step-list strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
}

.step-list p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.primary-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-size: 16px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(21, 111, 121, 0.22);
}

.quick-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.quick-facts section {
  padding: 15px;
}

.quick-facts span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.quick-facts strong {
  display: block;
  font-size: 15px;
  line-height: 1.35;
}

.quick-facts p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.summary-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.summary-grid section {
  padding: 17px;
}

.info-card {
  margin-top: 14px;
  padding: 18px;
}

.info-card.compact {
  margin-bottom: 14px;
}

.info-card h3 {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: 0;
}

.info-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}

.region-table,
.income-table {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.region-table > div,
.income-table > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  min-height: 56px;
  border-bottom: 1px solid var(--line);
}

.region-table > div {
  grid-template-columns: 1.25fr 0.85fr 1fr;
}

.region-table > div:first-child,
.income-table > div:first-child {
  min-height: 46px;
  background: var(--surface-soft);
}

.region-table > div:last-child,
.income-table > div:last-child {
  border-bottom: 0;
}

.region-table strong,
.region-table span,
.income-table strong,
.income-table span {
  display: flex;
  align-items: center;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.5;
}

.region-table span:first-child,
.income-table span:first-child {
  color: var(--primary-dark);
  font-weight: 900;
}

.region-table span:not(:first-child),
.income-table span:last-child {
  color: var(--muted);
}

.criteria-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.criteria-list section {
  padding: 16px;
}

.criteria-list strong {
  display: block;
  font-size: 16px;
  line-height: 1.35;
}

.criteria-list p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.news-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
}

.news-toolbar span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.news-toolbar strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.3;
}

.refresh-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(21, 111, 121, 0.2);
  border-radius: 50%;
  background: rgba(21, 111, 121, 0.08);
  color: var(--primary-dark);
  cursor: pointer;
}

.refresh-button:disabled {
  cursor: progress;
  opacity: 0.55;
}

.refresh-button svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.news-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.news-card {
  display: block;
  padding: 17px;
}

.news-card:active {
  transform: translateY(1px);
}

.news-source {
  display: inline-flex;
  max-width: 100%;
  margin-bottom: 9px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.news-card strong {
  display: block;
  font-size: 17px;
  line-height: 1.45;
}

.news-card p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.news-card time {
  display: block;
  margin-top: 12px;
  color: #8995a1;
  font-size: 12px;
  font-weight: 800;
}

.news-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--muted);
  text-align: center;
}

.news-state p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}

.loader {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(21, 111, 121, 0.18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 760ms linear infinite;
}

.disclaimer {
  margin: 18px 2px 0;
  color: #7b8792;
  font-size: 12px;
  line-height: 1.6;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 680px;
  margin: 0 auto;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 28px rgba(23, 33, 43, 0.08);
  backdrop-filter: blur(18px);
}

.nav-item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 62px;
  border-radius: 8px;
  color: #6f7b86;
  font-size: 11px;
  font-weight: 800;
}

.nav-item svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.active {
  background: rgba(21, 111, 121, 0.1);
  color: var(--primary-dark);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (min-width: 520px) {
  .content {
    padding-right: 22px;
    padding-left: 22px;
  }

  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .criteria-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 360px) {
  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .topbar h1 {
    font-size: 20px;
  }

  .status-pill {
    display: none;
  }

  .content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero {
    grid-template-columns: 1fr 88px;
    padding: 18px;
  }

  .hero-copy strong {
    font-size: 22px;
  }

  .income-table > div {
    grid-template-columns: 78px 1fr;
  }

  .region-table > div {
    grid-template-columns: 1fr 76px 82px;
  }

  .region-table strong,
  .region-table span,
  .income-table strong,
  .income-table span {
    padding-right: 10px;
    padding-left: 10px;
    font-size: 13px;
  }

  .quick-facts {
    grid-template-columns: 1fr;
  }

  .nav-item {
    font-size: 10px;
  }
}
