:root {
  --color-bg: #fafbf8;
  --color-surface: #ffffff;
  --color-border: #e4e9e2;
  --color-text: #223126;
  --color-text-muted: #6c7a70;
  --color-accent: #3e7256;
  --color-accent-weak: #e2f0e7;
  --color-coral: #ff8a65;
  --color-coral-weak: #ffe9e0;
  --color-danger: #d64545;
  --radius: 14px;
  --nav-height: 60px;
}

* {
  box-sizing: border-box;
}

html,
body {
  padding: 0;
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR",
    sans-serif;
}

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

button {
  font-family: inherit;
}

.page {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-height) + 24px);
}

.container {
  padding: 16px;
}

.header {
  padding: 16px;
  font-size: 20px;
  font-weight: 700;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 5;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.card-link {
  display: block;
}

.title {
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 4px;
}

.muted {
  color: var(--color-text-muted);
  font-size: 13px;
}

.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--color-accent-weak);
  color: var(--color-accent);
}

.tag-coral {
  background: var(--color-coral-weak);
  color: var(--color-coral);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  background: var(--color-accent);
  color: #fff;
  width: 100%;
}

.btn:disabled {
  background: #cfd8d2;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-coral {
  background: var(--color-coral);
}

.btn-danger {
  background: var(--color-danger);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--color-text-muted);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="search"],
.field textarea,
.field select {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 15px;
  background: var(--color-surface);
  color: var(--color-text);
}

.field textarea {
  resize: vertical;
  min-height: 96px;
}

.error {
  color: var(--color-danger);
  font-size: 13px;
  margin: -8px 0 16px;
}

.empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 48px 16px;
  font-size: 14px;
}

.filters {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
  overflow-x: auto;
}

.filters select {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-size: 13px;
}

.template-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
}

.template-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  background: var(--color-accent-weak);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: var(--nav-height);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 10;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--color-text-muted);
}

.bottom-nav a.active {
  color: var(--color-accent);
  font-weight: 700;
}

.bottom-nav .icon {
  font-size: 20px;
  line-height: 1;
}

.comment {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.comment:last-child {
  border-bottom: none;
}

.comment .author {
  font-size: 13px;
  font-weight: 700;
}

.stat-box {
  background: var(--color-accent-weak);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  margin-bottom: 16px;
}

.stat-box .num {
  font-size: 22px;
  font-weight: 800;
  color: var(--color-accent);
}

.value-slider {
  margin-bottom: 16px;
}

.value-slider .row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 4px;
}

.value-slider input[type="range"] {
  width: 100%;
}

.track-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.track-card.top {
  border-color: var(--color-accent);
  background: var(--color-accent-weak);
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.info-table tr {
  border-bottom: 1px solid var(--color-border);
}

.info-table tr:last-child {
  border-bottom: none;
}

.info-table th,
.info-table td {
  padding: 6px 0;
  font-weight: 400;
  vertical-align: top;
}

.trait-chip {
  display: inline-block;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  margin: 2px 4px 2px 0;
}

.card-carousel {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 4px 4px 12px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.card-carousel::-webkit-scrollbar {
  height: 4px;
}

.card-carousel::-webkit-scrollbar-thumb {
  background: var(--color-border);
  border-radius: 999px;
}

.news-card {
  flex: 0 0 82%;
  max-width: 320px;
  scroll-snap-align: start;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  min-height: 300px;
}

.news-card .step {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 0.8;
  text-transform: uppercase;
}

.news-card .headline {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.35;
  margin-top: 10px;
}

.news-card .body {
  font-size: 13px;
  line-height: 1.6;
  margin-top: 12px;
  opacity: 0.95;
  flex: 1;
}

.news-card .note {
  font-size: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  opacity: 0.85;
}

.news-card.alt {
  background: var(--color-coral);
}
