/* ============================================================
   PICKS — 모바일 세로 화면용 제품 링크 허브
   ============================================================ */

:root {
  --bg: #f6f6f8;
  --surface: #ffffff;
  --ink: #17181c;
  --ink-soft: #5c606b;
  --ink-faint: #8b8f9a;
  --line: #e8e9ee;
  --accent: #ff5a36;
  --accent-deep: #e2451f;
  --accent-tint: #fff1ed;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 1px 2px rgba(17, 18, 22, .04), 0 8px 24px rgba(17, 18, 22, .06);
  --maxw: 460px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
               "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.app {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px calc(28px + env(safe-area-inset-bottom));
}

/* ---------- 헤더 ---------- */

.hero {
  padding: 28px 4px 18px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--accent);
}

.hero h1 {
  margin: 0 0 10px;
  font-size: 30px;
  line-height: 1.24;
  letter-spacing: -.02em;
  font-weight: 800;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.sub {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--ink-soft);
}

.sub strong {
  color: var(--ink);
  font-weight: 700;
}

/* ---------- 검색 ---------- */

.search {
  position: relative;
  display: flex;
  align-items: center;
}

.search__icon {
  position: absolute;
  left: 16px;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink-faint);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
}

#search {
  width: 100%;
  height: 52px;
  padding: 0 46px 0 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  box-shadow: var(--shadow);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

#search::placeholder { color: var(--ink-faint); }
#search::-webkit-search-cancel-button { -webkit-appearance: none; }

#search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-tint), var(--shadow);
}

.search__clear {
  position: absolute;
  right: 8px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--bg);
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.search__clear:active { background: var(--line); }

/* ---------- 탭 ---------- */

.tabs {
  display: flex;
  gap: 8px;
  margin: 0 -16px 18px;
  padding: 2px 16px 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex: 0 0 auto;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

/* ---------- 목록 ---------- */

.count {
  margin: 0 4px 10px;
  font-size: 13px;
  color: var(--ink-faint);
}

.cards {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  position: relative;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: rise .28s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-tint);
  color: var(--accent-deep);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
}

.card__reviews {
  font-size: 12px;
  color: var(--ink-faint);
}

.card__name {
  margin: 0 0 6px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
  letter-spacing: -.01em;
}

.card__tagline {
  margin: 0 0 14px;
  font-size: 14px;
  color: var(--ink-soft);
}

.card__price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.card__price b {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.02em;
}

.card__price span {
  font-size: 12px;
  color: var(--ink-faint);
}

.card__bullets {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.card__bullets li {
  position: relative;
  padding-left: 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.card__bullets li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .62em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.card__tags span {
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--bg);
  font-size: 11.5px;
  color: var(--ink-soft);
}

.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 50px;
  padding: 13px 18px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s ease;
}

.cta:hover, .cta:focus-visible { background: var(--accent-deep); }

.card__search {
  display: block;
  margin: 10px 2px 0;
  font-size: 12px;
  color: var(--ink-faint);
  text-decoration: none;
  text-align: center;
  word-break: keep-all;
}

.card__search:hover { color: var(--ink-soft); text-decoration: underline; }

/* ---------- 빈 상태 · 오류 ---------- */

.empty {
  padding: 44px 20px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
}

.empty__emoji { margin: 0 0 10px; font-size: 30px; }

.empty__title { margin: 0 0 8px; font-size: 16px; font-weight: 700; }

.empty__body { margin: 0 0 18px; font-size: 13.5px; color: var(--ink-soft); }

.empty__reset {
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.error {
  margin: 18px 0 0;
  padding: 16px;
  border-radius: var(--radius-md);
  background: #fff6f6;
  color: #a1332c;
  font-size: 13.5px;
  line-height: 1.6;
}

/* ---------- 푸터 ---------- */

.footer {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.disclosure {
  margin: 0 0 8px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink-soft);
}

.fineprint {
  margin: 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--ink-faint);
}

/* ---------- 넓은 화면 ---------- */

@media (min-width: 520px) {
  .hero { padding-top: 40px; }
  .hero h1 { font-size: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  * { transition: none !important; }
}
