:root {
  /* 디딤 브랜드 컬러 (랜딩페이지와 동일) */
  --green: #3DC46F;
  --green-hover: #2FA35A;
  --green-deep: #1E4B3A;
  --green-pale: #E4F2E6;
  --ink: #1A1A1A;
  --ink-dark: #0F1412;
  --cream: #F8F6F1;

  --bg: var(--cream);
  --surface: #ffffff;
  --text: var(--ink);
  --muted: #5F6368;
  --line: #e6e4de;
  --accent: var(--green);
  --accent-soft: var(--green-pale);
  --radius: 12px;
  --shadow: none;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header (디딤 히어로 톤) */
.site-header {
  background: var(--ink-dark);
  color: #fff;
  padding: 36px 0 32px;
}
.site-header .brand {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--green);
}
.site-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.site-header .lead {
  margin: 10px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, .75);
}
.site-header__in {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.site-header__text { min-width: 0; }
.site-header__mascot {
  flex: 0 0 auto;
  width: 108px;
  height: auto;
  margin-bottom: -6px;
}
@media (min-width: 640px) {
  .site-header { padding: 48px 0 40px; }
  .site-header h1 { font-size: 36px; }
  .site-header__mascot { width: 150px; margin-bottom: -10px; }
}

/* Views */
main.container { padding: 36px 16px 48px; }
@media (min-width: 640px) {
  main.container { padding-top: 48px; }
}
.view[hidden] { display: none; }

/* Item grid */
.item-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.item-grid > li { display: flex; }
@media (min-width: 640px) {
  .item-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.item-card {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding: 12px 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.item-card:active { transform: scale(.97); }
.item-card:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

.item-card .thumb {
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.item-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.item-card .name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.item-card .sub {
  font-size: 13px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0;
  min-height: calc(13px * 1.4 * 2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Detail */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.back-btn:hover { color: var(--text); }

.detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.detail-card .hero {
  background: #fff;
  height: min(calc(100vw - 32px), 380px);
  width: 100%;
  padding: 12px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.detail-card .hero img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  border-radius: 12px;
}
.detail-card .body { padding: 22px 20px 28px; }
@media (min-width: 640px) {
  .detail-card .body { padding: 28px 32px 36px; }
}

.gallery {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
}
.gallery-thumb {
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  opacity: .6;
}
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-thumb.is-active { border-color: var(--ink); opacity: 1; }

.detail-card .intro {
  margin: 0 0 14px;
  font-size: 16px;
  line-height: 1.7;
}
.detail-card ul.specs {
  margin: 0;
  padding-left: 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
}

.detail-card h2 {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.detail-card .sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 500;
}
.detail-card h3.section-title {
  margin: 28px 0 4px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--ink);
  font-size: 19px;
  font-weight: 800;
  color: var(--text);
}
.detail-card ul {
  margin: 0;
  padding-left: 22px;
}
.detail-card ul li { margin: 4px 0; }

/* 사용 방법: 번호 + 구분선 */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}
.steps li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.65;
}
.steps li:last-child { border-bottom: 0; }
.step-num {
  flex: 0 0 auto;
  min-width: 22px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.4;
  color: var(--green-deep);
  font-variant-numeric: tabular-nums;
}
.step-text { flex: 1; }

.notice {
  margin-top: 28px;
  padding-top: 10px;
  border-top: 2px solid var(--ink);
  font-size: 16px;
  line-height: 1.7;
}
.notice strong {
  display: block;
  margin-bottom: 6px;
  font-size: 19px;
  font-weight: 800;
}
.notice ul { padding-left: 18px; }
.notice li { margin: 6px 0; }

/* Footer */
.site-footer {
  padding: 20px 0 calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.site-footer p { margin: 4px 0; }
.site-footer a { color: inherit; }
