@font-face {
  font-family: "Memoment";
  src: url("fonts/memoment.woff2") format("woff2");
  font-display: swap;
}

:root {
  --bg: #f5f5f5;
  --ink: #121020;
  --gray-label: #8f8f8f;
  --gray-value: #696969;
  --line: #e0e5ee;
  --green: #4c5f00;
  --blue: #0097e3;
  --sans: "Wanted Sans Variable", "Wanted Sans", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
img { display: block; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.wrap { max-width: 430px; margin: 0 auto; padding-bottom: 50px; }

/* ---------- 공통 히어로 ---------- */
.hero {
  position: relative;
  margin: 10px;
  aspect-ratio: 788 / 560;
  border-radius: 24px;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
}

/* 홈 히어로: 피그마 배치 그대로 (사진 1259×1679, left -232 / top -668) */
.hero-photo { position: absolute; left: -29.44%; top: -119.29%; width: 159.77%; height: 299.82%; z-index: -2; }
.hero-photo img, .post-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-dim { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); z-index: -1; }
.hero-body {
  height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 0 24px; text-align: center;
}
.avatar { position: relative; display: block; overflow: hidden; border-radius: 50%; background: #fff; flex-shrink: 0; }
.avatar img { position: absolute; left: -10%; width: 120%; height: auto; aspect-ratio: 1; }
.avatar-lg { width: 70px; height: 70px; }
.avatar-lg img { top: -13.9%; }
.handle { margin-top: 6px; font-size: 16px; line-height: 1.4; }
.intro { margin-top: 15px; font-size: 14px; line-height: 1.4; }
.intro span { display: block; }

/* ---------- 섹션 ---------- */
.section { padding: 30px 22px 0; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sec-title { font-size: 18.5px; font-weight: 500; line-height: 1.4; }
.sec-title-strong { font-size: 18px; font-weight: 600; }
.sec-hint { font-size: 13.4px; line-height: 1.4; white-space: nowrap; }
.hint-green { color: var(--green); }
.hint-blue { color: var(--blue); }

/* ---------- 홈 그리드 ---------- */
.grid { margin-top: 15px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tile {
  display: block; position: relative; overflow: hidden;
  aspect-ratio: 240 / 288; border-radius: 10px; background: #e6e6e6;
  transition: transform .15s ease;
}
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile:active { transform: scale(.97); }

/* ---------- 상세 히어로 ---------- */
.hero-post { background: #f5dcb5; }
/* 피그마 배치 그대로 (사진 795×1273, left -7 / top -267) */
.post-photo { position: absolute; left: -.89%; top: -47.68%; width: 100.89%; height: 227.32%; z-index: -2; }
.post-dim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 56.6%, rgba(0,0,0,.7) 100%);
}
.back {
  position: absolute; left: 18px; top: 22px;
  display: flex; align-items: center; gap: 7px;
  padding: 4px 8px 4px 6px; border-radius: 999px;
}
.back svg { margin-right: 3px; }
.avatar-sm { width: 37px; height: 37px; }
.avatar-sm img { top: -14%; }
.handle-sm { font-size: 12.8px; line-height: 1.4; }
.post-text { position: absolute; left: 30px; right: 24px; bottom: 30px; }
.kicker { font-size: 16px; color: #97dcff; }
.headline { margin-top: 8px; font-size: 29px; font-weight: 600; line-height: 1.22; }
.headline span { display: block; }

/* ---------- 메모 ---------- */
.memo {
  margin: 30px 22px 0;
  padding: 18px 17px 22px;
  background: #fff5ca;
  border: 1px solid #ddd1af;
  border-radius: 12px;
}
.memo p {
  --lh: 29px;
  padding: 0 5px;
  font-family: "Memoment", var(--sans);
  font-weight: 400;
  font-size: 14px;
  letter-spacing: -.01em;
  line-height: var(--lh);
  color: var(--gray-value);
  word-break: keep-all;
  background-image: linear-gradient(to bottom, transparent calc(var(--lh) - 1px), #00aaff calc(var(--lh) - 1px));
  background-size: 100% var(--lh);
  background-position: 0 0;
  margin: 0 -5px;
}

/* ---------- 제품 카드 ---------- */
.section-products { padding-top: 40px; }
.notice { margin-top: 8px; font-size: 12px; line-height: 1.5; color: var(--gray-label); }
.cards { margin-top: 15px; display: flex; flex-direction: column; gap: 10px; }
.card {
  display: block; background: #fff; border-radius: 12px;
  padding: 20px 17px 22px;
  transition: transform .15s ease;
}
.card:active { transform: scale(.985); }
.card-top { position: relative; display: flex; align-items: center; justify-content: space-between; padding-left: 5px; }
.card-title { font-size: 17px; font-weight: 600; line-height: 1; color: #000; }
.chip { position: absolute; right: -1px; top: -5.5px; width: 27px; height: 27px; }
.card-line { height: 1px; background: var(--line); margin: 17px 0; }
.card-body { display: flex; gap: 10px; padding: 0 5px; align-items: stretch; }
.photo {
  position: relative; flex: 0 0 68px; min-height: 82px;
  border-radius: 6px; overflow: hidden; background: #ebebeb;
}
.photo img { position: absolute; left: 50%; top: 6.5px; width: 78px; height: 78px; transform: translateX(-50%); object-fit: cover; }
.info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 0 5px; line-height: 1.4; }
.row { display: flex; gap: 5px; align-items: baseline; }
.row dt { flex: 0 0 40px; font-size: 12.5px; font-weight: 400; color: var(--gray-label); }
.row dd { font-size: 13.5px; color: var(--gray-value); letter-spacing: -.01em; overflow-wrap: anywhere; word-break: normal; }
.aff { margin-top: 12px; padding: 0 5px; font-size: 11.5px; line-height: 1.4; color: var(--gray-label); }
.aff b { display: inline-block; margin-right: 6px; padding: 1px 6px; border-radius: 4px; background: #f0f2f5; color: #5a6270; font-weight: 600; font-size: 11px; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom));
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  background: rgba(18, 16, 32, .88); color: #fff;
  font-size: 13.5px; padding: 10px 16px; border-radius: 999px; white-space: nowrap;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
