@import url("https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap");

:root, [data-theme="dark"] {
  --ink: #eef3fb;
  --ink-soft: #9aa7bc;
  --navy: #0f1626;
  --blue: #4a75ff;
  --blue-soft: #182338;
  --mint: #78e8b6;
  --mint-strong: #3cd48b;
  --yellow: #ffd571;
  --surface: #131b29;
  --surface-alt: #1a2537;
  --canvas: #090e18;
  --line: #222d40;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --ink: #1c2333;
  --ink-soft: #677084;
  --navy: #14213d;
  --blue: #3459d4;
  --blue-soft: #eef2ff;
  --mint: #c7f6e0;
  --mint-strong: #41c98a;
  --yellow: #ffd571;
  --surface: #ffffff;
  --surface-alt: #f6f8fb;
  --canvas: #f6f8fb;
  --line: #e4e8ef;
  --shadow: 0 24px 70px rgba(31, 48, 88, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Noto Sans KR", "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: background .2s ease, color .2s ease;
}
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { border: 0; cursor: pointer; }
.noise { position: fixed; inset: 0; pointer-events: none; opacity: .03; z-index: 10; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.4'/%3E%3C/svg%3E"); }
.shell { width: min(1180px, calc(100% - 64px)); margin: 0 auto; }

.topbar { height: 82px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 800; letter-spacing: -.06em; }
.brand-mark { display: grid; width: 31px; height: 31px; place-items: center; color: #0b111e; background: var(--mint); border-radius: 10px; font-size: 18px; font-weight: 800; letter-spacing: -.12em; }
.topnav { display: flex; align-items: center; gap: 38px; margin-left: 60px; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.topnav a { position: relative; padding: 31px 0 28px; }
.topnav a.active, .topnav a:hover { color: var(--ink); }
.topnav a.active::after { content: ""; position: absolute; left: 50%; bottom: 19px; width: 4px; height: 4px; transform: translateX(-50%); border-radius: 50%; background: var(--blue); }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; color: var(--ink); font-size: 11px; font-weight: 600; cursor: pointer; transition: all .2s ease; }
.theme-toggle:hover { border-color: var(--blue); color: var(--blue); }
.topbar-status { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font: 11px "DM Mono", monospace; }
.green-dot, .yellow-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mint-strong); box-shadow: 0 0 0 4px rgba(65, 201, 138, .12); }
.yellow-dot { background: #e8ad3a; box-shadow: 0 0 0 4px rgba(232, 173, 58, .12); }

.hero { min-height: 0; display: grid; grid-template-columns: 1fr 340px; align-items: center; gap: 28px; padding: 26px 36px; overflow: hidden; color: white; background: var(--navy); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow, .section-kicker, .side-kicker { color: #8fa4dc; font: 500 10px "DM Mono", monospace; letter-spacing: .17em; }
.eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: #a9bceb; font-size: 9px; }
.live-ring { width: 8px; height: 8px; border: 2px solid var(--mint-strong); border-radius: 50%; box-shadow: 0 0 0 3px rgba(65, 201, 138, .15); }
.hero h1 { margin: 0; font-size: clamp(24px, 2.5vw, 34px); line-height: 1.18; letter-spacing: -.06em; font-weight: 800; }
.hero h1 em { color: var(--mint); font-style: normal; }
.hero-description { margin: 8px 0 14px; color: #aeb8ca; font-size: 13px; line-height: 1.45; }
.search-box { display: flex; align-items: center; width: min(100%, 480px); height: 50px; padding: 4px 6px 4px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 10px 24px rgba(3, 11, 30, .22); }
.search-icon { color: var(--blue); font-size: 22px; line-height: 1; transform: rotate(-20deg); }
.search-box input { min-width: 0; flex: 1; height: 100%; padding: 0 12px; color: var(--ink); outline: none; border: 0; background: transparent; font-size: 13px; }
.search-box input::placeholder { color: var(--ink-soft); }
.search-box button { height: 42px; padding: 0 18px; color: white; background: var(--blue); border-radius: 10px; font-size: 12px; font-weight: 700; }
.search-box button span { margin-left: 6px; font-size: 13px; }
.quick-searches { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 12px; color: #7f8ca7; font-size: 11px; }
.quick-searches button { padding: 5px 11px; color: #c2ccdf; background: rgba(255,255,255,.07); border-radius: 100px; font-size: 11px; }
.quick-searches button:hover { color: var(--navy); background: var(--mint); }

.hero-visual { position: relative; align-self: center; height: 210px; min-height: 210px; transform: scale(0.72); transform-origin: center center; }
.radar-grid, .radar-orbit { position: absolute; border: 1px solid rgba(151, 179, 236, .18); border-radius: 50%; }
.radar-grid { inset: 10px 18px 20px; opacity: .9; background: linear-gradient(90deg, transparent 49.8%, rgba(151,179,236,.15) 50%, transparent 50.2%), linear-gradient(0deg, transparent 49.8%, rgba(151,179,236,.15) 50%, transparent 50.2%); }
.radar-orbit { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.orbit-one { width: 260px; height: 260px; }
.orbit-two { width: 150px; height: 150px; }
.radar-core { position: absolute; left: 50%; top: 50%; display: grid; width: 75px; height: 75px; place-items: center; transform: translate(-50%, -50%); border: 1px solid rgba(199,246,224,.8); border-radius: 50%; background: radial-gradient(circle at 35% 25%, #75dfb0, #2aa879); box-shadow: 0 0 0 10px rgba(65,201,138,.06), 0 0 40px rgba(65,201,138,.36); }
.radar-core::before { content: ""; position: absolute; inset: -26px; border: 1px solid rgba(65,201,138,.22); border-radius: 50%; }
.radar-core span { color: var(--navy); font-size: 28px; font-weight: 800; }
.radar-ping { position: absolute; display: flex; align-items: center; gap: 6px; color: #c7d4ed; font: 10px "DM Mono", monospace; }
.radar-ping span { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid rgba(199,246,224,.35); border-radius: 50%; background: #1d3159; color: var(--mint); font-weight: 500; font-size: 10px; }
.radar-ping small { color: #94a5c6; font: 9px "Noto Sans KR", sans-serif; }
.ping-one { left: 0%; top: 16%; }
.ping-two { right: -5%; top: 40%; }
.ping-three { left: 10%; bottom: 10%; }
.ping-four { right: 5%; bottom: 12%; }
.radar-ping.ping-four span { border-color: rgba(254, 229, 0, .5); background: #383416; color: #fee500; }
.radar-caption { position: absolute; right: 0; bottom: -5px; display: grid; gap: 3px; color: #a8b9db; font: 9px "DM Mono", monospace; text-align: right; letter-spacing: .05em; }
.radar-caption span { margin-right: 5px; }
.radar-caption strong { color: var(--mint); font-size: 10px; font-weight: 500; }
.radar-caption small { color: #677ea9; font-size: 8px; }

.results-section { padding: 20px 0 60px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 16px; }
.section-kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; color: var(--blue); }
.section-kicker #live-note { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font: 11px "Noto Sans KR", sans-serif; letter-spacing: 0; }
.section-heading h2 { margin: 0; display: flex; align-items: baseline; }
#results-title { color: var(--ink); font-size: 16px; font-weight: 800; letter-spacing: -.03em; line-height: 1.3; }
#results-count { margin-left: 8px; color: var(--ink-soft); font: 500 13px "DM Mono", monospace; vertical-align: baseline; letter-spacing: 0; }
.section-heading p { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; }
.sort-button { padding: 8px 15px; color: var(--ink-soft); background: var(--surface); border: 1px solid var(--line); border-radius: 9px; font-size: 13px; font-weight: 600; }
.sort-button:hover { color: var(--ink); border-color: var(--blue); }
.sort-button span { margin-left: 7px; color: var(--blue); font-size: 14px; }
.source-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.source-tab { padding: 9px 16px; color: var(--ink-soft); background: transparent; border: 1px solid transparent; border-radius: 9px; font-size: 14px; font-weight: 600; }
.source-tab:hover { color: var(--ink); background: var(--surface); }
.source-tab.active { color: var(--blue); background: var(--blue-soft); border-color: var(--blue); font-weight: 700; font-size: 14px; }
.results-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.results-main { display: flex; flex-direction: column; min-width: 0; gap: 16px; }
.results-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.load-more-wrap { display: flex; justify-content: center; align-items: center; margin: 18px 0 10px; width: 100%; }
.load-more-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 260px; padding: 13px 28px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer; transition: all .2s ease; box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.load-more-button:hover { background: var(--surface-alt); border-color: var(--blue); color: var(--blue); transform: translateY(-1px); box-shadow: 0 6px 16px rgba(0,0,0,.15); }
.load-more-count { padding: 2px 9px; border-radius: 100px; background: var(--surface-alt); color: var(--ink-soft); font: 600 12px "DM Mono", monospace; letter-spacing: 0; }
.load-more-button:hover .load-more-count { background: var(--blue-soft); color: var(--blue); }
.load-more-icon { font-size: 14px; transition: transform .2s ease; }
.load-more-button:hover .load-more-icon { transform: translateY(2px); }
.all-loaded-note { padding: 14px 20px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.deal-card { display: grid; grid-template-columns: 120px minmax(0, 1fr); height: 126px; max-height: 126px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; animation: rise .45s both; animation-delay: var(--delay); }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.deal-visual { position: relative; width: 120px; height: 100%; max-height: 126px; display: grid; align-content: center; justify-items: center; color: var(--blue); background: var(--surface-alt); border-right: 1px solid var(--line); overflow: hidden; }
.deal-thumb { width: 100%; height: 100%; max-height: 126px; object-fit: cover; object-position: center top; }
.deal-visual span { display: grid; width: 44px; height: 44px; place-items: center; color: var(--blue); background: var(--surface); border-radius: 13px; font-size: 22px; }
.deal-visual small { color: var(--ink-soft); font: 9px "DM Mono", monospace; }
.visual-식품 { color: #d8aa38; background: rgba(255, 213, 113, .08); }.visual-식품 span { color: #ffd571; }.visual-식품 small { color: #d8aa38; }
.visual-생활 { color: #41c98a; background: rgba(65, 201, 138, .08); }.visual-생활 span { color: #41c98a; }.visual-생활 small { color: #41c98a; }
.deal-content { display: flex; min-width: 0; flex-direction: column; padding: 12px 16px; overflow: hidden; }
.deal-topline { display: none !important; }
.source-badge { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--ink-soft); font-size: 10px; }
.source-hotdeal > span, .source-orb.source-hotdeal { background: var(--blue); }
.source-kakao > span, .source-orb.source-kakao { background: #fee500; color: #191919 !important; font-weight: 800; }
.source-naver > span, .source-orb.source-naver { background: #03c75a; }
.source-toss > span, .source-orb.source-toss { background: #1f9a72; }
.source-danawa > span, .source-orb.source-danawa { background: #ef9b3e; }
.data-state { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font: 9px "DM Mono", monospace; }
.data-state i, .source-status i { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: #556277; }
.data-state.is-live { color: var(--mint-strong); }.data-state.is-live i, .status-live i { background: var(--mint-strong); }
.deal-content h3 { display: -webkit-box; min-height: 0; max-height: 38px; overflow: hidden; margin: 0; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.25; letter-spacing: -.035em; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.deal-title-link { color: inherit; text-decoration: none; transition: color .15s ease; }
.deal-title-link:hover { color: var(--blue); text-decoration: underline; }
.deal-visual-link { display: contents; text-decoration: none; color: inherit; }
.deal-meta { overflow: hidden; margin: 2px 0 auto; color: var(--ink-soft); font: 10px "Noto Sans KR", sans-serif; white-space: nowrap; text-overflow: ellipsis; }
.deal-meta span { margin: 0 3px; color: var(--line); }
.deal-bottom { display: flex; align-items: flex-end; gap: 8px; margin-top: auto; }
.deal-bottom > div { min-width: 0; }.deal-bottom strong { display: block; color: var(--ink); font-size: 18px; letter-spacing: -.06em; }.deal-bottom del { display: block; margin-top: 1px; color: var(--ink-soft); font: 10px "DM Mono", monospace; }
.discount { align-self: start; margin-top: 4px; padding: 3px 5px; color: #ff7056; background: rgba(255, 112, 86, .12); border-radius: 4px; font: 9px "DM Mono", monospace; }
.deal-bottom a { margin-left: auto; color: var(--blue); font-size: 12px; font-weight: 700; white-space: nowrap; }.deal-bottom a span { margin-left: 3px; font-size: 13px; }
.lowest-title-link { color: inherit; text-decoration: none; transition: color .15s ease; }
.lowest-title-link:hover { color: var(--mint); text-decoration: underline; }

.side-column { display: grid; gap: 14px; }
.lowest-card { min-height: 279px; padding: 24px 23px 21px; color: white; background: linear-gradient(145deg, #2b49c7, #182e85); border: 1px solid rgba(255,255,255,.08); border-radius: 16px; box-shadow: 0 16px 32px rgba(10,20,50,.35); }
.lowest-label { display: flex; align-items: center; gap: 8px; color: #c8d3ff; font: 10px "DM Mono", monospace; }.pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(199,246,224,.14); }
.lowest-price { margin: 18px 0 13px; color: var(--mint); font: 700 34px "Manrope", "Noto Sans KR", sans-serif; letter-spacing: -.08em; }.lowest-card p { display: -webkit-box; min-height: 40px; overflow: hidden; margin: 0 0 17px; color: #d7ddf6; font-size: 12px; line-height: 1.65; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lowest-store { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.15); color: #c5cff0; font-size: 10px; }.lowest-store .source-badge { color: #d7def7; }.lowest-store .source-badge > span { background: rgba(255,255,255,.18); }
.lowest-link { display: flex; align-items: center; justify-content: space-between; margin-top: 17px; padding: 10px 12px; color: #0b111e; background: var(--mint); border-radius: 8px; font-size: 10px; font-weight: 800; }.lowest-link span { font-size: 14px; }
.empty-lowest, .loading-lowest { display: grid; align-content: center; min-height: 230px; text-align: center; }.empty-lowest > span { color: var(--mint); font-size: 30px; }.empty-lowest p { min-height: 0; margin: 12px 0 6px; color: white; font-size: 12px; }.empty-lowest small { color: #b8c4ed; font-size: 10px; }.loading-lowest p { min-height: 0; margin: 13px 0 0; color: #d7ddf6; font-size: 11px; }
.source-card { padding: 23px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }.side-card-heading { display: flex; align-items: start; justify-content: space-between; }.side-kicker { display: block; margin-bottom: 8px; color: var(--blue); font-size: 9px; }.side-card-heading h3 { margin: 0; color: var(--ink); font-size: 17px; letter-spacing: -.06em; }.source-count { color: var(--ink-soft); font: 10px "DM Mono", monospace; }
.source-status-list { margin: 21px 0 16px; }.source-row { display: grid; grid-template-columns: 1fr auto 18px; align-items: center; gap: 7px; min-height: 47px; border-bottom: 1px solid var(--line); }.source-row:last-child { border: 0; }.source-row-name { display: flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink); font-size: 11px; }.source-orb { display: grid; width: 21px; height: 21px; place-items: center; flex: 0 0 21px; color: white; border-radius: 7px; font: 10px "DM Mono", monospace; }.source-status { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font: 9px "DM Mono", monospace; }.source-status.status-live { color: var(--mint-strong); }.source-status.status-linked { color: #e2a044; }.source-status.status-linked i { background: #e2a044; }.source-row > a { color: var(--ink-soft); font-size: 14px; text-align: right; }.source-row > a:hover { color: var(--blue); }
.source-footnote { margin: 0; padding: 12px 11px; color: var(--ink-soft); background: var(--surface-alt); border: 1px solid var(--line); border-radius: 8px; font-size: 10px; line-height: 1.6; }.reset-button { color: var(--ink-soft); background: transparent; font-size: 11px; text-align: left; }.reset-button:hover { color: var(--blue); }
.no-results, .loading-state { grid-column: 1 / -1; min-height: 310px; display: grid; place-content: center; justify-items: center; color: var(--ink-soft); background: var(--surface); border: 1px dashed var(--line); border-radius: 16px; text-align: center; }.no-results > span { color: var(--blue); font-size: 30px; }.no-results h3 { margin: 14px 0 7px; color: var(--ink); font-size: 15px; }.no-results p, .loading-state p { margin: 0; font-size: 11px; }.spinner { display: block; width: 26px; height: 26px; border: 2px solid var(--line); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }

.footer { display: flex; align-items: center; justify-content: space-between; min-height: 88px; border-top: 1px solid var(--line); color: var(--ink-soft); font: 10px "DM Mono", monospace; }.footer-brand { color: var(--ink); font: 700 14px "Noto Sans KR", sans-serif; }.footer-brand .brand-mark { width: 24px; height: 24px; font-size: 14px; }.footer p { margin: 0; font: 10px "Noto Sans KR", sans-serif; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr 280px; gap: 16px; padding: 24px 28px; }
  .hero-visual { transform: scale(.65); transform-origin: center right; }
  .results-layout { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr 1fr; }
  .reset-button { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .shell { width: min(100% - 32px, 560px); }
  .topbar { height: 60px; }
  .topnav { display: none; }
  .topbar-status { font-size: 9px; }
  .hero { display: block; min-height: 0; padding: 24px 20px 18px; border-radius: 18px; }
  .hero h1 { font-size: 26px; }
  .hero-description { margin: 8px 0 14px; font-size: 12px; }
  .search-box { height: 48px; padding-left: 12px; }
  .search-box button { height: 38px; padding-inline: 14px; }
  .hero-visual { display: none; }
  .results-section { padding: 24px 0 60px; }
  .section-heading { align-items: start; gap: 15px; }
  .section-heading h2 { font-size: 22px; }
  .section-heading p { max-width: 245px; line-height: 1.5; }
  .sort-button { flex: 0 0 auto; }
  .source-tabs { overflow-x: auto; padding-bottom: 2px; }
  .source-tab { white-space: nowrap; }
  .results-grid { grid-template-columns: 1fr; }
  .side-column { grid-template-columns: 1fr; }
  .footer { display: grid; gap: 8px; padding: 22px 0; }
  .footer span:last-child { display: none; }
}
