:root {
  --primary: #005bff;
  --primary-hover: #004dda;
  --navy: #001b5e;
  --secondary-blue: #1565c0;
  --light-blue: #eaf3ff;
  --accent-red: #d92d20;
  --accent-yellow: #ffb21c;
  --text: #172033;
  --text-secondary: #667085;
  --text-tertiary: #98a2b3;
  --surface: #ffffff;
  --background: #f7f9fc;
  --divider: #eaecf0;
  --success: #16a66a;
  --shadow-sm: 0 5px 18px rgba(0, 27, 94, 0.05);
  --shadow-md: 0 12px 38px rgba(0, 27, 94, 0.08);
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; overflow-x: clip; }
body {
  margin: 0;
  overflow-x: clip;
  color: var(--text);
  background: var(--surface);
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  word-break: keep-all;
}
body, button, input { font-family: inherit; }
button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid rgba(234,236,240,.85);
  backdrop-filter: saturate(180%) blur(18px);
}
.header-inner {
  width: min(var(--container), calc(100% - 48px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 44px;
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.wordmark-symbol {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: white;
  background: var(--primary);
  border-radius: 11px 11px 11px 4px;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.05em;
}
.wordmark-name { color: var(--navy); font-size: 21px; font-weight: 800; letter-spacing: -.04em; }
.desktop-nav { display: flex; align-items: center; gap: 30px; }
.desktop-nav a { position: relative; padding: 25px 0 23px; color: var(--text-secondary); font-size: 14px; font-weight: 650; }
.desktop-nav a:hover, .desktop-nav a.active { color: var(--text); }
.desktop-nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); border-radius: 2px; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-button, .my-button { min-width: 44px; min-height: 44px; border: 0; border-radius: 12px; background: transparent; cursor: pointer; }
.icon-button { display: grid; place-items: center; }
.icon-button:hover { background: var(--background); color: var(--primary); }
.my-button { padding: 0 13px; color: var(--text-secondary); font-size: 13px; font-weight: 650; }
.my-button:hover { color: var(--primary); background: var(--light-blue); }

.hero {
  width: min(var(--container), calc(100% - 48px));
  margin: 0 auto;
  padding: 68px 0 52px;
}
.hero-copy { text-align: center; }
.eyebrow { display: block; margin-bottom: 12px; color: var(--primary); font-size: 12px; font-weight: 800; letter-spacing: .11em; }
.hero h1 { margin: 0; color: var(--navy); font-size: clamp(43px, 6vw, 64px); line-height: 1.12; letter-spacing: -.055em; }
.hero-copy p { margin: 16px 0 0; color: var(--text-secondary); font-size: 18px; line-height: 1.6; }
.hero-search-wrap { max-width: 720px; margin: 36px auto 0; }
.hero-search {
  min-height: 64px;
  padding: 0 18px 0 20px;
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface);
  border: 1px solid #dfe5ef;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.hero-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(0,91,255,.11), var(--shadow-md); transform: translateY(-1px); }
.hero-search svg { flex: 0 0 auto; color: var(--primary); width: 25px; height: 25px; }
.hero-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 17px; }
.hero-search input::placeholder { color: #a4acba; }
.hero-search kbd { padding: 5px 8px; color: var(--text-tertiary); background: var(--background); border: 1px solid var(--divider); border-radius: 7px; font-size: 11px; font-family: inherit; }
.search-suggestions { padding: 13px 6px 0; display: flex; align-items: center; justify-content: center; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.search-suggestions span, .search-suggestions button { flex: 0 0 auto; font-size: 12px; }
.search-suggestions span { color: var(--text-tertiary); font-weight: 700; }
.search-suggestions button { padding: 5px 0; color: var(--text-secondary); background: transparent; border: 0; cursor: pointer; }
.search-suggestions button:hover { color: var(--primary); }
.quick-menu { max-width: 880px; margin: 42px auto 0; display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.quick-menu a, .quick-menu button { min-width: 0; padding: 16px; display: grid; grid-template-columns: 42px 1fr; grid-template-rows: auto auto; column-gap: 12px; text-align: left; background: var(--surface); border: 0; border-radius: 16px; cursor: pointer; transition: background .18s, transform .18s; }
.quick-menu a:hover, .quick-menu button:hover { background: var(--background); transform: translateY(-2px); }
.quick-icon { grid-row: 1 / 3; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; font-size: 19px; }
.quick-icon.red { background: #fff0ee; }
.quick-icon.yellow { background: #fff6dc; }
.quick-icon.blue { background: var(--light-blue); }
.quick-icon.mint { background: #eafaf4; }
.quick-menu strong { align-self: end; color: var(--text); font-size: 14px; }
.quick-menu small { align-self: start; margin-top: 2px; color: var(--text-tertiary); font-size: 11px; }

.section { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; }
.section-head { margin-bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.section-head h2 { margin: 5px 0 0; color: var(--navy); font-size: clamp(25px, 3vw, 32px); line-height: 1.3; letter-spacing: -.04em; }
.section-head p { margin: 8px 0 0; color: var(--text-secondary); font-size: 14px; }
.section-kicker { color: var(--primary); font-size: 12px; font-weight: 800; }
.section-kicker i { display: inline-block; width: 7px; height: 7px; margin: 0 5px 1px 0; background: var(--accent-red); border-radius: 50%; box-shadow: 0 0 0 4px rgba(217,45,32,.1); }
.text-link { padding: 8px 0; color: var(--text-secondary); font-size: 13px; font-weight: 700; }
.text-link:hover { color: var(--primary); }
.text-link span { margin-left: 3px; }

.popular-section { padding: 56px 0 70px; border-top: 1px solid var(--divider); }
.popular-list { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 10px; }
.popular-item { min-width: 0; padding: 20px 17px; background: var(--background); border-radius: 18px; cursor: pointer; transition: background .18s, transform .18s, box-shadow .18s; }
.popular-item:hover { background: var(--surface); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.rank-line { display: flex; align-items: center; justify-content: space-between; }
.rank-number { color: var(--primary); font-size: 22px; font-weight: 900; }
.rank-heat { color: var(--text-tertiary); font-size: 11px; font-weight: 650; }
.popular-item:nth-child(-n+3) .rank-heat { color: var(--accent-red); }
.popular-item h3 { height: 42px; margin: 17px 0 15px; overflow: hidden; color: var(--text); font-size: 14px; line-height: 1.5; letter-spacing: -.02em; }
.rank-price { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.rank-price strong { color: var(--text); font-size: 16px; }
.rank-price em { color: var(--accent-red); font-size: 12px; font-style: normal; font-weight: 800; }

.category-section { padding: 68px 0; }
.section-head.compact { margin-bottom: 24px; }
.category-list { display: grid; grid-template-columns: repeat(10,minmax(0,1fr)); gap: 10px; }
.category-item { min-width: 0; min-height: 92px; padding: 12px 7px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--text-secondary); background: var(--background); border: 0; border-radius: 18px; cursor: pointer; transition: color .18s, background .18s, transform .18s, box-shadow .18s; }
.category-item span { width: 38px; height: 38px; display: grid; place-items: center; background: var(--surface); border-radius: 13px; font-size: 18px; transition: background .18s; }
.category-item strong { font-size: 12px; }
.category-item:hover { color: var(--primary); transform: translateY(-2px); }
.category-item.active { color: white; background: var(--primary); box-shadow: 0 9px 20px rgba(0,91,255,.18); }
.category-item.active span { background: rgba(255,255,255,.17); }

.deals-section { padding: 72px 0 92px; }
.deals-head { align-items: flex-end; }
.sort-control { display: flex; align-items: center; gap: 4px; padding: 4px; background: var(--background); border-radius: 12px; }
.sort-control button { min-height: 38px; padding: 0 12px; color: var(--text-secondary); background: transparent; border: 0; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 650; }
.sort-control button:hover { color: var(--primary); }
.sort-control button.active { color: var(--primary); background: var(--surface); box-shadow: var(--shadow-sm); font-weight: 800; }
.deal-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.deal-card { min-width: 0; overflow: hidden; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-sm); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.deal-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.product-media { position: relative; aspect-ratio: 1.3; overflow: hidden; display: grid; place-items: center; background: var(--light-blue); }
.product-media.tone-navy { background: #e8edfa; }
.product-media.tone-red { background: #fff0ee; }
.product-media.tone-mint { background: #eafaf4; }
.product-media.tone-gray { background: #f0f2f5; }
.product-media.tone-yellow { background: #fff6dc; }
.product-media.tone-sky { background: #e9f8ff; }
.product-media.tone-purple { background: #f3efff; }
.product-media.tone-dark { background: #e8eaee; }
.product-media.tone-orange { background: #fff1e8; }
.product-placeholder { position: relative; width: 72%; height: 60%; display: grid; place-items: center; color: var(--navy); background: rgba(255,255,255,.8); border-radius: 24px; box-shadow: 0 15px 35px rgba(0,27,94,.1); font-size: clamp(16px,2vw,23px); font-weight: 900; letter-spacing: -.025em; transform: rotate(-2deg); }
.product-placeholder::before, .product-placeholder::after { content: ""; position: absolute; border-radius: 50%; background: rgba(0,91,255,.12); }
.product-placeholder::before { width: 38px; height: 38px; top: -15px; right: -13px; }
.product-placeholder::after { width: 22px; height: 22px; bottom: -8px; left: -7px; background: rgba(255,178,28,.5); }
.badge { position: absolute; top: 13px; left: 13px; z-index: 2; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.badge-hot { color: white; background: var(--accent-red); }
.badge-popular, .badge-recommend { color: var(--navy); background: var(--accent-yellow); }
.badge-new { color: var(--primary); background: white; }
.card-body { padding: 17px 17px 18px; }
.card-store { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--text-tertiary); font-size: 11px; }
.card-store strong { min-width: 0; overflow: hidden; color: var(--text-secondary); text-overflow: ellipsis; white-space: nowrap; }
.card-title { height: 44px; margin: 10px 0 13px; overflow: hidden; color: var(--text); font-size: 15px; line-height: 1.47; letter-spacing: -.022em; }
.price-row { display: flex; align-items: baseline; gap: 7px; }
.discount { color: var(--accent-red); font-size: 19px; font-weight: 800; }
.current-price { color: var(--navy); font-size: 20px; font-weight: 800; letter-spacing: -.03em; }
.original-price { margin: 3px 0 0 47px; color: var(--text-tertiary); font-size: 11px; text-decoration: line-through; }
.card-meta { margin-top: 14px; padding-top: 13px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--divider); color: var(--text-tertiary); font-size: 10px; }
.reactions { display: flex; align-items: center; gap: 8px; }
.reactions .hot { color: var(--accent-red); }
.load-more { min-width: 210px; min-height: 50px; margin: 34px auto 0; padding: 0 22px; display: block; color: var(--primary); background: var(--light-blue); border: 0; border-radius: 14px; cursor: pointer; font-weight: 750; transition: background .18s, transform .18s; }
.load-more:hover { background: #dcecff; transform: translateY(-2px); }
.empty-state { padding: 72px 20px; text-align: center; background: var(--background); border-radius: 22px; }
.empty-illustration { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; color: var(--primary); background: var(--light-blue); border-radius: 50%; font-size: 30px; font-weight: 800; }
.empty-state h3 { margin: 0 0 8px; font-size: 20px; }
.empty-state p { margin: 0 0 22px; color: var(--text-secondary); }
.empty-state button { min-height: 46px; padding: 0 18px; color: white; background: var(--primary); border: 0; border-radius: 12px; cursor: pointer; font-weight: 750; }

.latest-section { padding: 76px 0 84px; background: var(--navy); }
.section-head.light h2 { color: white; }
.section-head.light .section-kicker { color: #9fc1ff; }
.refresh-button { min-height: 42px; padding: 0 13px; color: #c5d7f5; background: rgba(255,255,255,.08); border: 0; border-radius: 11px; cursor: pointer; font-size: 12px; font-weight: 700; }
.refresh-button:hover { color: white; background: rgba(255,255,255,.13); }
.latest-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.latest-item { min-width: 0; padding: 18px; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 13px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; cursor: pointer; transition: background .18s, transform .18s; }
.latest-item:hover { background: rgba(255,255,255,.11); transform: translateY(-2px); }
.latest-icon { width: 44px; height: 44px; display: grid; place-items: center; color: white; background: var(--primary); border-radius: 13px; font-size: 18px; }
.latest-copy { min-width: 0; }
.latest-copy strong { display: block; overflow: hidden; color: white; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.latest-copy small { display: block; margin-top: 4px; color: #91a6c8; font-size: 10px; }
.latest-price { text-align: right; }
.latest-price em { display: block; color: #ff918a; font-size: 11px; font-style: normal; font-weight: 800; }
.latest-price strong { color: white; font-size: 13px; }

.site-footer { padding: 52px 0 110px; color: var(--text-secondary); background: var(--background); }
.footer-inner { width: min(var(--container), calc(100% - 48px)); margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 35px 60px; }
.footer-wordmark .wordmark-symbol { width: 30px; height: 30px; font-size: 18px; }
.footer-wordmark .wordmark-name { font-size: 18px; }
.footer-inner > div:first-child p { margin: 12px 0 0; font-size: 13px; }
.footer-links { display: flex; align-items: flex-start; gap: 20px; font-size: 12px; font-weight: 650; }
.footer-links a:hover { color: var(--primary); }
.footer-note { grid-column: 1 / 3; padding-top: 24px; border-top: 1px solid var(--divider); }
.footer-note span { color: var(--navy); font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.footer-note p, .footer-note small { font-size: 11px; }
.footer-note p { margin: 10px 0 5px; }
.bottom-nav { display: none; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 100; padding: 12px 17px; color: white; background: rgba(23,32,51,.94); border-radius: 12px; box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transform: translate(-50%,12px); transition: opacity .2s, transform .2s; font-size: 13px; }
.toast.show { opacity: 1; transform: translate(-50%,0); }

.skeleton-list .rank-skeleton, .skeleton-grid .card-skeleton { position: relative; overflow: hidden; background: #eef1f5; border-radius: 18px; }
.rank-skeleton { height: 164px; }
.card-skeleton { min-height: 360px; }
.skeleton-list .rank-skeleton::after, .skeleton-grid .card-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent); animation: skeleton 1.25s infinite; }
@keyframes skeleton { to { transform: translateX(100%); } }

:focus-visible { outline: 3px solid rgba(0,91,255,.35); outline-offset: 2px; }

@media (max-width: 980px) {
  .desktop-nav { gap: 20px; }
  .popular-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .popular-item:nth-child(n+4) { display: none; }
  .category-list { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .deal-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .latest-list { grid-template-columns: 1fr 1fr; }
  .latest-item:nth-child(n+5) { display: none; }
}

@media (max-width: 720px) {
  html { scroll-padding-top: 72px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .header-inner, .section, .hero, .footer-inner { width: min(100% - 40px,var(--container)); }
  .header-inner { height: 62px; }
  .wordmark-symbol { width: 31px; height: 31px; border-radius: 10px 10px 10px 4px; font-size: 19px; }
  .wordmark-name { font-size: 19px; }
  .desktop-nav, .my-button span { display: none; }
  .my-button { display: none; }
  .hero { padding: 46px 0 34px; }
  .eyebrow { margin-bottom: 9px; }
  .hero h1 { font-size: 42px; }
  .hero-copy p { margin-top: 12px; font-size: 16px; }
  .hero-search-wrap { margin-top: 28px; }
  .hero-search { min-height: 58px; border-radius: 18px; }
  .hero-search input { font-size: 15px; }
  .hero-search kbd { display: none; }
  .search-suggestions { justify-content: flex-start; padding-inline: 2px; }
  .quick-menu { margin-top: 30px; grid-template-columns: 1fr 1fr; gap: 7px; }
  .quick-menu a, .quick-menu button { padding: 12px; grid-template-columns: 38px 1fr; column-gap: 9px; }
  .quick-icon { width: 38px; height: 38px; border-radius: 12px; }
  .popular-section { padding: 44px 0 54px; }
  .popular-list { margin-right: -20px; padding-right: 20px; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .popular-item { width: 190px; flex: 0 0 auto; scroll-snap-align: start; }
  .popular-item:nth-child(n) { display: block; }
  .category-section { padding: 54px 0; }
  .category-list { margin-right: -20px; padding: 2px 20px 12px 0; display: flex; overflow-x: auto; scrollbar-width: none; }
  .category-item { width: 76px; min-height: 82px; flex: 0 0 auto; border-radius: 16px; }
  .deals-section { padding: 56px 0 70px; }
  .deals-head { align-items: flex-start; flex-direction: column; }
  .sort-control { width: 100%; overflow-x: auto; scrollbar-width: none; }
  .sort-control button { flex: 0 0 auto; }
  .deal-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .card-body { padding: 14px; }
  .card-title { font-size: 14px; }
  .current-price { font-size: 18px; }
  .original-price { margin-left: 42px; }
  .latest-section { padding: 58px 0 68px; }
  .latest-list { grid-template-columns: 1fr; }
  .latest-item:nth-child(n) { display: grid; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { grid-row: 2; flex-wrap: wrap; gap: 14px 18px; }
  .footer-note { grid-column: 1; }
  .bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; height: calc(64px + env(safe-area-inset-bottom)); padding: 6px 10px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5,1fr); background: rgba(255,255,255,.96); border-top: 1px solid var(--divider); backdrop-filter: blur(18px); }
  .bottom-nav a, .bottom-nav button { min-width: 0; min-height: 52px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 3px; color: var(--text-tertiary); background: transparent; border: 0; font-size: 10px; font-weight: 650; }
  .bottom-nav span { height: 22px; color: inherit; font-size: 19px; line-height: 22px; }
  .bottom-nav .active { color: var(--primary); }
  .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

@media (max-width: 460px) {
  .header-inner, .section, .hero, .footer-inner { width: calc(100% - 32px); }
  .popular-list { margin-right: -16px; padding-right: 16px; }
  .category-list { margin-right: -16px; padding-right: 16px; }
  .hero { padding-top: 38px; }
  .hero h1 { font-size: 39px; }
  .quick-menu a, .quick-menu button { grid-template-columns: 36px 1fr; }
  .quick-menu small { display: none; }
  .section-head h2 { font-size: 25px; }
  .deal-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .deal-card { border-radius: 16px; }
  .product-media { aspect-ratio: 1.08; }
  .product-placeholder { width: 78%; height: 55%; border-radius: 18px; font-size: 15px; }
  .card-body { padding: 12px; }
  .badge { top: 9px; left: 9px; }
  .card-store { display: block; }
  .card-store span { display: none; }
  .card-title { height: 40px; margin: 8px 0 10px; font-size: 13px; line-height: 1.5; }
  .price-row { gap: 4px; }
  .discount { font-size: 16px; }
  .current-price { font-size: 16px; }
  .original-price { margin-left: 0; font-size: 10px; }
  .card-meta { margin-top: 11px; padding-top: 10px; }
  .card-meta > span { display: none; }
  .reactions { width: 100%; justify-content: space-between; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
