:root {
  --accent: #f04438;
  --accent-dark: #cf2f27;
  --accent-soft: #fff0ee;
  --background: #f6f5f2;
  --ink: #15171a;
  --muted: #6b7280;
  --line: #e6e2dc;
  --surface: #fff;
  --dark: #101214;
  --header-height: 72px;
  color-scheme: light;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--background); color: var(--ink); margin: 0; min-width: 320px; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgb(246 245 242 / 88%);
  border-bottom: 1px solid rgb(230 226 220 / 80%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  height: var(--header-height);
  padding: 0 max(24px, env(safe-area-inset-left));
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand { align-items: center; color: var(--ink); display: flex; font-size: 19px; font-weight: 900; gap: 10px; text-decoration: none; width: max-content; }
.brand-mark { align-items: center; background: var(--ink); border-radius: 11px; color: white; display: inline-flex; font-family: Georgia, serif; font-size: 19px; height: 36px; justify-content: center; transform: rotate(-4deg); width: 36px; }
.desktop-nav { background: #eae8e3; border-radius: 13px; display: flex; padding: 4px; }
.nav-button { background: transparent; border: 0; border-radius: 10px; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 800; min-width: 88px; padding: 10px 16px; }
.nav-button.is-active { background: var(--surface); box-shadow: 0 2px 8px rgb(17 24 39 / 7%); color: var(--ink); }
.header-status { align-items: center; color: var(--muted); display: flex; font-size: 12px; font-weight: 700; gap: 8px; justify-self: end; }
.status-dot { background: #22a06b; border: 3px solid #d9f2e7; border-radius: 50%; height: 11px; width: 11px; }
.status-dot.is-error { background: var(--accent); border-color: #ffd7d2; }

.feed-view { display: none; margin: 0 auto; max-width: 1240px; padding: 76px 32px 100px; }
.feed-view.is-active { display: block; }
.hero { align-items: end; display: flex; justify-content: space-between; margin-bottom: 70px; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 900; letter-spacing: 1.7px; margin: 0 0 17px; }
h1 { font-size: clamp(48px, 7vw, 92px); letter-spacing: -.065em; line-height: .98; margin: 0; }
h1 em { color: var(--accent); font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
.hero-copy { color: var(--muted); font-size: 15px; line-height: 1.75; margin: 25px 0 0; }
.hero-stat { align-items: flex-end; border-left: 1px solid var(--line); display: flex; flex-direction: column; margin-bottom: 4px; padding: 20px 0 6px 45px; }
.hero-stat strong { font-family: Georgia, serif; font-size: 64px; font-weight: 500; line-height: 1; }
.hero-stat span { color: var(--muted); font-size: 13px; margin-top: 8px; }
.feed-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 24px; padding-bottom: 15px; }
.feed-toolbar p { color: var(--muted); font-size: 13px; margin: 0; }
.refresh-button { align-items: center; background: transparent; border: 0; color: var(--ink); cursor: pointer; display: flex; font-size: 13px; font-weight: 800; gap: 6px; padding: 8px; }
.refresh-button.is-loading span { animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.deal-grid { display: grid; gap: 26px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.deal-card { background: var(--surface); border: 1px solid transparent; border-radius: 24px; box-shadow: 0 14px 35px rgb(27 31 35 / 7%); display: flex; flex-direction: column; min-width: 0; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.deal-card:hover { box-shadow: 0 22px 48px rgb(27 31 35 / 13%); transform: translateY(-6px); }
.card-image-wrap { aspect-ratio: 1.25; background: #e9e7e2; overflow: hidden; position: relative; }
.card-image { height: 100%; object-fit: cover; transition: transform .45s ease; width: 100%; }
.deal-card:hover .card-image { transform: scale(1.035); }
.card-label { background: rgb(255 255 255 / 92%); border-radius: 999px; color: var(--accent); font-size: 11px; font-weight: 900; left: 14px; padding: 7px 10px; position: absolute; top: 14px; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 20px; }
.card-meta { align-items: center; color: var(--muted); display: flex; font-size: 11px; justify-content: space-between; margin-bottom: 10px; }
.card-title { display: -webkit-box; font-size: 19px; font-weight: 850; letter-spacing: -.025em; line-height: 1.42; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.card-summary { color: var(--muted); display: -webkit-box; font-size: 13px; line-height: 1.6; margin: 9px 0 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.badge { background: var(--accent-soft); border-radius: 7px; color: var(--accent); font-size: 10px; font-weight: 800; padding: 5px 7px; }
.price-row { align-items: baseline; display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 18px; }
.price-label { color: var(--accent); font-size: 18px; font-weight: 950; }
.sale-price { font-size: 21px; font-weight: 950; }
.original-price { color: #a0a5ad; font-size: 12px; text-decoration: line-through; }
.product-button { align-items: center; background: var(--ink); border-radius: 13px; color: white; display: flex; font-size: 13px; font-weight: 850; justify-content: space-between; margin-top: 16px; padding: 14px 15px; text-decoration: none; }
.product-button:hover { background: var(--accent); }

.shorts-view { background: var(--dark); display: none; height: calc(100dvh - var(--header-height)); overflow: hidden; position: relative; }
.shorts-view.is-active { display: block; }
.shorts-rail { height: 100%; margin: 0 auto; max-width: 560px; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: contain; scroll-snap-type: y mandatory; scrollbar-width: none; }
.shorts-rail::-webkit-scrollbar { display: none; }
.short-card { height: 100%; padding: 12px; scroll-snap-align: start; scroll-snap-stop: always; }
.short-background { background-position: center; background-size: cover; border-radius: 28px; height: 100%; overflow: hidden; position: relative; }
.short-background::after { background: linear-gradient(180deg, rgb(0 0 0 / 12%) 20%, rgb(0 0 0 / 83%) 100%); content: ""; inset: 0; position: absolute; }
.short-top { display: flex; justify-content: space-between; left: 20px; position: absolute; right: 20px; top: 20px; z-index: 1; }
.short-chip { backdrop-filter: blur(12px); background: rgb(0 0 0 / 40%); border: 1px solid rgb(255 255 255 / 14%); border-radius: 999px; color: white; font-size: 11px; font-weight: 850; padding: 8px 11px; }
.short-chip:first-child { background: var(--accent); border-color: var(--accent); }
.short-content { bottom: 0; color: white; left: 0; padding: 32px; position: absolute; right: 0; z-index: 1; }
.short-price-label { background: white; border-radius: 999px; color: var(--accent); display: inline-block; font-size: 12px; font-weight: 900; padding: 8px 12px; }
.short-title { font-size: clamp(28px, 5vw, 38px); letter-spacing: -.045em; line-height: 1.18; margin: 14px 0 0; }
.short-summary { color: rgb(255 255 255 / 80%); font-size: 14px; line-height: 1.55; margin: 10px 0 0; }
.short-prices { align-items: baseline; display: flex; gap: 10px; margin-top: 17px; }
.short-prices strong { font-size: 25px; }
.short-prices del { color: rgb(255 255 255 / 55%); font-size: 13px; }
.short-button { background: var(--accent); border: 0; border-radius: 15px; color: white; cursor: pointer; display: block; font-size: 15px; font-weight: 900; margin-top: 18px; padding: 16px; text-align: center; text-decoration: none; width: 100%; }
.short-disclosure { color: rgb(255 255 255 / 55%); font-size: 10px; margin: 9px 0 0; text-align: center; }
.scroll-hint { align-items: center; bottom: 24px; color: rgb(255 255 255 / 65%); display: flex; flex-direction: column; font-size: 9px; gap: 4px; left: calc(50% + 300px); letter-spacing: .14em; position: absolute; text-transform: uppercase; }
.scroll-hint b { animation: bounce 1.2s ease infinite; font-size: 18px; }
@keyframes bounce { 50% { transform: translateY(5px); } }
.empty-state { border: 1px dashed #d2cec7; border-radius: 22px; color: var(--muted); grid-column: 1 / -1; padding: 70px 20px; text-align: center; }
.empty-state strong { color: var(--ink); display: block; font-size: 19px; }
.mobile-nav { display: none; }
.site-footer { align-items: center; border-top: 1px solid var(--line); color: var(--muted); display: flex; font-size: 12px; gap: 18px; justify-content: space-between; margin: 0 auto; max-width: 1176px; padding: 25px 0 35px; }
.site-footer span:last-child { display: flex; gap: 16px; }
.site-footer a { color: inherit; text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .deal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-stat { display: none; }
  .scroll-hint { display: none; }
}

@media (max-width: 640px) {
  :root { --header-height: 60px; }
  body { padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .site-header { display: flex; height: var(--header-height); justify-content: space-between; padding: 0 17px; }
  .brand-mark { border-radius: 9px; height: 32px; width: 32px; }
  .desktop-nav { display: none; }
  .header-status { font-size: 10px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .feed-view { padding: 39px 16px 50px; }
  .hero { margin-bottom: 42px; }
  h1 { font-size: 48px; }
  .hero-copy br { display: none; }
  .deal-grid { gap: 17px; grid-template-columns: 1fr; }
  .card-image-wrap { aspect-ratio: 1.45; }
  .feed-toolbar p { max-width: 60%; }
  .shorts-view { height: calc(100dvh - var(--header-height) - 66px - env(safe-area-inset-bottom)); }
  .shorts-rail { max-width: none; }
  .short-card { padding: 7px 8px; }
  .short-background { border-radius: 23px; }
  .short-content { padding: 23px 20px; }
  .short-title { font-size: 28px; }
  .mobile-nav { background: rgb(255 255 255 / 97%); border-top: 1px solid var(--line); bottom: 0; display: flex; height: calc(66px + env(safe-area-inset-bottom)); left: 0; padding-bottom: env(safe-area-inset-bottom); position: fixed; right: 0; z-index: 30; }
  body.is-shorts .mobile-nav { background: rgb(16 18 20 / 97%); border-color: #2b2e31; }
  .mobile-nav-button { align-items: center; background: transparent; border: 0; color: #8b9199; display: flex; flex: 1; flex-direction: column; font-size: 10px; font-weight: 850; gap: 3px; justify-content: center; }
  .mobile-nav-button span { font-size: 18px; }
  .mobile-nav-button.is-active { color: var(--accent); }
  .site-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
  .status-dot, .scroll-hint b { animation: none; }
}
