/* ⚡ 벼락딜 — 가격 기상특보
   팔레트: 폭풍 남색 하늘 + 전기 노랑 번개, 딜 리스트는 밝은 지면 */
:root {
  --storm-900: #14182a;
  --storm-700: #222a48;
  --storm-line: #2e3757;
  --bolt: #ffd21e;
  --bolt-deep: #f5b800;
  --paper: #f6f6f4;
  --card: #ffffff;
  --ink: #1c1e26;
  --ink-dim: #6a6e7e;
  --strike: #e5484d;
  --ended: #9ba0ae;
  --radius: 14px;
  --feed-w: 680px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
}

/* ── 폭풍 하늘 헤더 ───────────────────────── */
.sky {
  background:
    radial-gradient(120% 90% at 50% -20%, var(--storm-700) 0%, var(--storm-900) 65%);
  color: #fff;
  overflow: hidden;
  position: relative;
}

/* 특보 티커 — 긴급 기상특보 스트립 */
.alert-ticker {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bolt);
  color: var(--storm-900);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 16px;
  letter-spacing: 0.01em;
}
.ticker-bolt { animation: bolt-pulse 2.4s ease-in-out infinite; }

.sky-inner {
  max-width: var(--feed-w);
  margin: 0 auto;
  padding: 34px 20px 30px;
  position: relative;
}

.logo {
  font-family: "Black Han Sans", "Pretendard Variable", sans-serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  letter-spacing: 0.01em;
  line-height: 1.1;
}
.logo-bolt {
  color: var(--bolt);
  display: inline-block;
  margin-right: 2px;
  animation: logo-strike 0.5s ease-out 0.3s both;
}

.tagline {
  margin-top: 8px;
  font-size: 1.02rem;
  color: #cdd3ea;
}
.tagline em {
  font-style: normal;
  color: var(--bolt);
  font-weight: 700;
}

.obs-note {
  margin-top: 14px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: #8b93b8;
}

/* ── 카테고리 필터 ───────────────────────── */
.filters {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid #e5e5e0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 12px 16px;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
@supports (padding: max(0px)) {
  .filters { padding-left: max(16px, calc((100vw - var(--feed-w)) / 2)); }
}

.chip {
  flex: 0 0 auto;
  border: 1px solid #d9d9d3;
  background: var(--card);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 99px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.chip:hover { border-color: var(--storm-700); }
.chip.is-active {
  background: var(--storm-900);
  border-color: var(--storm-900);
  color: var(--bolt);
}
.chip:focus-visible,
.deal:focus-visible,
a:focus-visible {
  outline: 3px solid var(--bolt-deep);
  outline-offset: 2px;
}

/* ── 딜 피드 ─────────────────────────────── */
.feed {
  max-width: var(--feed-w);
  margin: 0 auto;
  padding: 18px 16px 40px;
  display: grid;
  gap: 12px;
}

.deal {
  display: block;
  background: var(--card);
  border: 1px solid #e8e8e3;
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}
.deal:hover {
  border-color: var(--storm-700);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(20, 24, 42, 0.08);
}

.deal-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.mall {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--storm-900);
  color: var(--bolt);
}
.badge-sample {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-dim);
  border: 1px dashed #c9c9c2;
  border-radius: 6px;
  padding: 2px 7px;
}
.badge-ended {
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: var(--ended);
  border-radius: 6px;
  padding: 3px 8px;
}

.deal-title {
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.deal-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.price {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.price-was {
  font-size: 0.88rem;
  color: var(--ink-dim);
  text-decoration: line-through;
  font-variant-numeric: tabular-nums;
}
.discount {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--strike);
}
.shipping {
  font-size: 0.82rem;
  color: var(--ink-dim);
}

.deal-meta {
  margin-top: 10px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  gap: 6px;
}
.deal-meta .m-bolt { color: var(--bolt-deep); }

/* 복사 버튼 — 카드 우상단, 방송용 텍스트 복사 */
.copy-btn {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--storm-700);
  background: var(--card);
  border: 1px solid #d9d9d3;
  border-radius: 6px;
  padding: 3px 9px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.copy-btn:hover { border-color: var(--storm-700); }
.copy-btn.is-copied {
  background: var(--storm-900);
  border-color: var(--storm-900);
  color: var(--bolt);
}
.copy-btn:focus-visible {
  outline: 3px solid var(--bolt-deep);
  outline-offset: 2px;
}

.deal.is-ended { opacity: 0.62; }
.deal.is-ended .price { text-decoration: line-through; color: var(--ink-dim); }

/* 빈 하늘 — 딜 없음 */
.clear-sky {
  text-align: center;
  padding: 64px 20px;
  color: var(--ink-dim);
}
.clear-sky .sun { font-size: 2.6rem; display: block; margin-bottom: 12px; }
.clear-sky strong { color: var(--ink); font-weight: 700; }

/* ── 톡방 배너 ───────────────────────────── */
.talk-banner {
  background: var(--storm-900);
  color: #fff;
}
.talk-inner {
  max-width: var(--feed-w);
  margin: 0 auto;
  padding: 28px 20px;
}
.talk-title {
  font-family: "Black Han Sans", sans-serif;
  font-size: 1.3rem;
  color: var(--bolt);
}
.talk-sub {
  margin-top: 6px;
  font-size: 0.9rem;
  color: #aab1d4;
}

/* ── 푸터 ────────────────────────────────── */
.ground {
  background: var(--storm-900);
  border-top: 1px solid var(--storm-line);
  color: #8b93b8;
  font-size: 0.78rem;
  line-height: 1.7;
}
.ground p {
  max-width: var(--feed-w);
  margin: 0 auto;
  padding: 0 20px;
}
.ground .disclosure { padding-top: 20px; color: #aab1d4; }
.ground .footer-brand { padding-bottom: 24px; padding-top: 10px; }

/* ── 모션 ────────────────────────────────── */
@keyframes bolt-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25); }
}
@keyframes logo-strike {
  0% { opacity: 0; transform: translateY(-14px); }
  55% { opacity: 1; transform: translateY(2px); }
  100% { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media (min-width: 720px) {
  .sky-inner { padding-top: 46px; padding-bottom: 40px; }
}
