/* =====================================================================
   싸게사 · SSAGAESA — deal site styles (mobile first)
   ===================================================================== */

:root {
  --bg: #ffffff;
  --soft: #f5f6f8;
  --soft-2: #eff1f5;
  --line: #e8eaef;
  --ink: #0f1115;
  --ink-2: #474d57;
  --muted: #8b919d;
  --brand: #ff3b1f;
  --brand-ink: #c92c12;
  --brand-soft: #fff1ed;
  --ok: #0e9f6e;
  --ok-soft: #e7f7f0;
  --warn: #d92d20;
  --warn-soft: #fdeceb;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(15, 17, 21, .05);
  --shadow-md: 0 2px 6px rgba(15, 17, 21, .05), 0 12px 32px rgba(15, 17, 21, .07);
  --max: 1200px;
  --header-h: 60px;
  --font: "Pretendard Variable", Pretendard, "Noto Sans KR", "Noto Sans CJK KR",
          -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; color: inherit; }
img { max-width: 100%; }
.sprite { display: none; }
.icon { width: 1em; height: 1em; display: inline-block; vertical-align: -0.12em; flex: none; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ------------------------------- header ------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 9px; flex: none; }
@media (max-width: 559px) {
  .header-inner { height: auto; padding-top: 9px; padding-bottom: 9px; row-gap: 8px; }
  .search { order: 3; flex: 1 0 100%; max-width: none; height: 38px; }
  .header-actions { margin-left: auto; }
}
.brand-mark {
  width: 36px; height: 36px; flex: none;
  display: block; object-fit: contain;
  border-radius: 22%;
  box-shadow: 0 4px 10px rgba(255, 59, 31, .22);
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-ko {
  font-size: 21px; font-weight: 800; letter-spacing: -.045em; color: var(--ink);
}
.brand-en {
  margin-top: 4px;
  font-size: 8.5px; font-weight: 600; letter-spacing: .06em;
  color: var(--muted); white-space: nowrap; text-transform: none;
}

.search {
  display: flex; align-items: center; gap: 7px;
  flex: 1 1 auto; min-width: 0; max-width: 430px;
  height: 40px; padding: 0 12px;
  background: var(--soft); border: 1px solid transparent; border-radius: 999px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.search:focus-within {
  background: #fff; border-color: #ffc3b5;
  box-shadow: 0 0 0 4px rgba(255, 59, 31, .1);
}
.search-icon { color: var(--muted); font-size: 17px; }
.search input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; font-size: 14px; color: var(--ink);
}
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { display: none; }
.search-clear {
  border: 0; background: none; padding: 2px; color: var(--muted);
  cursor: pointer; font-size: 15px; display: grid; place-items: center;
}
.search-clear[hidden] { display: none; }

.header-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.saved-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  height: 36px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: background .15s, border-color .15s, color .15s;
}
.saved-toggle .icon { font-size: 15px; }
.saved-toggle em {
  font-style: normal; font-size: 11px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; background: var(--soft-2); color: var(--ink-2);
}
.saved-toggle[aria-pressed="true"] { background: var(--brand-soft); border-color: #ffcdc2; color: var(--brand-ink); }
.saved-toggle[aria-pressed="true"] .icon path { fill: currentColor; }
.saved-toggle[aria-pressed="true"] em { background: #fff; color: var(--brand-ink); }
.saved-toggle span { display: none; }
.tg-join {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 36px; padding: 0 11px; border-radius: 999px;
  background: #229ED9; color: #fff; text-decoration: none;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.tg-join:hover { background: #1b8bc0; }
.tg-join span { display: none; }
.seller-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; flex: none;
  height: 36px; padding: 0 12px 0 10px; border-radius: 999px;
  background: #fff; color: #1d1d1f; text-decoration: none;
  border: 1.5px solid #ff9900;  /* Amazon yellow rim */
  font-size: 12.5px; font-weight: 800; white-space: nowrap;
}
.seller-link svg { color: #ff9900; }
.seller-link:hover { background: #fff7ea; }
.seller-link .s-long { display: none; }
@media (max-width: 399px) {
  .header-actions { gap: 4px; }
  .seller-link { padding: 0 9px 0 8px; font-size: 11.5px; gap: 4px; }
  .seller-link svg { width: 15px; height: 15px; }
  .saved-toggle { padding-left: 8px; padding-right: 8px; }
  .tg-join { padding: 0 9px; }
}
@media (max-width: 374px) {
  .seller-link { padding: 0 9px; }
  .seller-link svg { display: none; }
}
@media (min-width: 560px) {
  .seller-link { padding: 0 14px 0 12px; font-size: 13px; }
  .seller-link .s-short { display: none; }
  .seller-link .s-long { display: inline; }
}
.lang-toggle {
  width: 36px; height: 36px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; color: var(--ink-2);
}

/* -------------------------------- hero ------------------------------- */
.hero { background: linear-gradient(180deg, #fffdfc 0%, #fff 62%); }
.hero-inner {
  display: grid; grid-template-columns: 1fr; gap: 24px;
  padding-top: 20px; padding-bottom: 18px;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: -.01em;
  color: var(--brand-ink); background: var(--brand-soft);
  padding: 5px 11px; border-radius: 999px;
}
.eyebrow .icon { font-size: 13px; }
.hero h1 {
  margin-top: 10px;
  font-size: 27px; line-height: 1.24; font-weight: 800; letter-spacing: -.05em;
}
.hero h1 .accent { color: var(--brand); position: relative; }
.hero h1 .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 7px;
  background: rgba(255, 59, 31, .16); border-radius: 3px; z-index: -1;
}
.lede {
  margin-top: 10px; max-width: 30em; white-space: pre-line;
  font-size: 13.5px; line-height: 1.6; color: var(--ink-2);
}
.hero-stats {
  margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center;
}
.stat { display: flex; align-items: baseline; gap: 5px; font-size: 12px; color: var(--muted); }
.stat strong { font-size: 15px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.stat + .stat { position: relative; }
.stat + .stat::before {
  content: ""; position: absolute; left: -11px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 3px; border-radius: 50%; background: #d6d9df;
}
.hero-art { display: none; }

/* --------------------------- email signup ---------------------------- */
.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;
}
.subscribe { padding: 10px 0 6px; }
/* compact strip: one title line, one input row, one line of small print */
.subscribe-card {
  display: grid; gap: 6px;
  padding: 9px 12px;
  border: 1px solid #f3e2dc;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff6f2 0%, #ffffff 62%);
  box-shadow: var(--shadow-sm);
}
.subscribe-eyebrow, .subscribe-sub { display: none; }
.subscribe-copy h2 {
  font-size: 13.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; color: var(--ink);
}
.subscribe-form { min-width: 0; }
.subscribe-row { display: flex; gap: 6px; }
.subscribe-row input[type="email"] {
  flex: 1 1 auto; min-width: 0; height: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
  font-size: 16px; color: var(--ink); font-family: inherit; /* 16px: no zoom-on-focus on iPhone */
}
.subscribe-row input[type="email"]::placeholder { font-size: 13px; }
.subscribe-row input[type="email"]:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.subscribe-row .btn { flex: none; height: 36px; min-height: 0; padding: 0 13px; font-size: 13px; border-radius: 10px; white-space: nowrap; }
.subscribe-row .btn[disabled] { opacity: .7; cursor: progress; }
.subscribe-form .hp {
  position: absolute; left: -9999px; width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}
.subscribe-msg { margin-top: 5px; font-size: 12px; font-weight: 700; line-height: 1.4; color: var(--ink-2); }
.subscribe-msg[data-state="done"] { color: var(--ok); }
.subscribe-msg[data-state="error"] { color: var(--warn); }
.subscribe-reset { display: none; margin-top: 4px; font-size: 12px; }
.subscribe-form.is-done .subscribe-row,
.subscribe-form.is-done .subscribe-hint { display: none; }
.subscribe-form.is-done .subscribe-msg { margin-top: 0; font-size: 13px; }
.subscribe-form.is-done .subscribe-reset { display: inline-flex; }
/* the consent line appears as soon as the visitor taps the email field */
.subscribe-hint { display: none; margin-top: 4px; font-size: 10px; line-height: 1.35; color: var(--muted); }
.subscribe-form:focus-within .subscribe-hint { display: block; }
.subscribe-form.is-done:focus-within .subscribe-hint { display: none; }
@media (min-width: 760px) {
  .subscribe-hint { display: block; }
  .subscribe { padding: 12px 0 0; }
  .subscribe-card { grid-template-columns: auto minmax(0, 440px); justify-content: space-between; align-items: center; gap: 20px; padding: 10px 16px; }
  .subscribe-copy h2 { font-size: 15px; }
}

/* ----------------------------- filter bar ---------------------------- */
.filterbar {
  position: sticky; top: var(--header-h); z-index: 40;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.filterbar-inner {
  display: flex; align-items: center; gap: 10px;
  padding-top: 9px; padding-bottom: 9px;
}
.chips {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  -webkit-overflow-scrolling: touch; padding: 1px;
  mask-image: linear-gradient(90deg, #000 92%, transparent);
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 32px; padding: 0 13px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { background: var(--soft); }
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.filter-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.code-only {
  display: none; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
  white-space: nowrap;
}
.code-only input { accent-color: var(--brand); width: 15px; height: 15px; margin: 0; }

/* ------------------------------ deal tabs ---------------------------- */
.deal-tabs {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(#fbfbfc, #fff);
}
.tabs-inner {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-top: 12px; padding-bottom: 12px;
}
.tabs-inner::-webkit-scrollbar { display: none; }
.tab {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  height: 38px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 13px; font-weight: 800; letter-spacing: -.02em; color: var(--ink-2);
  white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
}
.tab:hover { background: var(--soft); }
.tab em {
  font-style: normal; font-size: 11px; font-weight: 800; color: var(--muted);
  background: var(--soft); border-radius: 999px; padding: 1px 7px;
}
.tab[aria-selected="true"] {
  background: var(--ink); border-color: var(--ink); color: #fff;
  box-shadow: 0 6px 16px rgba(15, 17, 21, .14);
}
.tab[aria-selected="true"] em { background: rgba(255, 255, 255, .18); color: #fff; }
.select-wrap { position: relative; display: flex; align-items: center; }
.select-wrap::after {
  content: ""; position: absolute; right: 11px; top: 50%; width: 6px; height: 6px;
  border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}
select#sort {
  appearance: none; -webkit-appearance: none;
  height: 32px; padding: 0 28px 0 11px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
}

/* ------------------------------- results ----------------------------- */
.results { padding-top: 14px; padding-bottom: 56px; }
.results-head { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.result-count { font-size: 12.5px; color: var(--muted); }
.result-count b { color: var(--ink); font-weight: 800; }
.link-btn {
  border: 0; background: none; padding: 0; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #d2d5dc;
}

.grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px; margin-top: 10px;
}

/* -------------------------------- card ------------------------------- */
.card {
  position: relative; display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: #dfe2e8; }
}
.card-media {
  position: relative; aspect-ratio: 4 / 3; background: #fff; overflow: hidden;
  border-bottom: 1px solid #f2f3f6;
}
.card-media img {
  position: absolute; inset: 10px; width: calc(100% - 20px); height: calc(100% - 20px);
  object-fit: contain;
}
.card-media .ph {
  position: absolute; inset: 10px; border-radius: 10px;
  display: grid; place-items: center; font-size: 26px;
  background: linear-gradient(140deg, #f7f8fa, #eef0f4);
  color: #b6bcc7;
}
.badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  display: inline-flex; align-items: center;
  padding: 2px 7px; border-radius: 8px;
  background: var(--brand); color: #fff;
  font-size: 11.5px; font-weight: 800; letter-spacing: -.02em;
  box-shadow: 0 2px 6px rgba(255, 59, 31, .3);
}
.badge.soft { background: #fff; color: var(--brand-ink); border: 1px solid #ffd3c9; box-shadow: none; }
.card-save {
  position: absolute; top: 7px; right: 7px; z-index: 2;
  width: 27px; height: 27px; border-radius: 999px; border: 1px solid rgba(15,17,21,.06);
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(4px);
  display: grid; place-items: center; cursor: pointer; color: #9aa0ab;
  transition: color .15s, transform .15s;
}
.card-save .icon { font-size: 14px; }
.card-save:hover { color: var(--brand); transform: scale(1.06); }
.card-save[aria-pressed="true"] { color: var(--brand); }
.card-save[aria-pressed="true"] .icon path { fill: currentColor; }

.card-body { padding: 9px 10px 0; display: flex; flex-direction: column; flex: 1; }
.card-cat {
  font-size: 10.5px; font-weight: 700; color: var(--muted);
  letter-spacing: -.01em; display: flex; align-items: center; gap: 4px;
}
.card-cat .dot { width: 3px; height: 3px; border-radius: 50%; background: #d3d7de; }
.card-title {
  margin-top: 3px; font-size: 13px; line-height: 1.38; font-weight: 600;
  color: var(--ink); letter-spacing: -.015em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.76em;
}
.card-summary {
  display: none;
  margin-top: 5px; font-size: 12px; line-height: 1.5; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card-price { margin-top: 6px; display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.card-price .now { font-size: 17px; font-weight: 800; letter-spacing: -.03em; }
.card-price .was { font-size: 11.5px; color: var(--muted); text-decoration: line-through; }
.card-price .pct { font-size: 11.5px; font-weight: 800; color: var(--brand); }

/* why a code-less card is here: the price drop it can prove */
.card-why {
  margin-top: 5px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
  font-size: 10.5px; color: var(--muted);
}
.why-chip {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 6px; border-radius: 6px;
  background: var(--ok-soft); color: #0b7a56;
  font-size: 10px; font-weight: 800; letter-spacing: -.01em;
}
.why-prices { font-weight: 600; }

/* direct Amazon CTA on every card — one tap straight to the listing */
.card-buy {
  margin-top: 8px; width: 100%; height: 36px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 0 9px; border-radius: 9px; text-decoration: none;
  background: var(--ink); border: 1px solid var(--ink); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: -.01em;
  transition: background .15s, transform .1s, box-shadow .15s;
}
.card-buy:hover { background: #000; box-shadow: 0 6px 16px rgba(15, 17, 21, .18); }
.card-buy:active { transform: scale(.985); }
.card-buy:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.card-buy .icon { font-size: 13px; flex: none; }
.card-buy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-buy[data-kind="search"] { background: #fff; color: var(--ink); border-color: var(--line); }
.card-buy[data-kind="search"]:hover { background: var(--soft); box-shadow: none; }

/* 1-tap promo code on every code card — the primary action of the site */
.card-code {
  margin-top: 8px; width: 100%; height: 38px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 0 6px 0 11px; border-radius: 10px; cursor: pointer;
  background: var(--brand); border: 1px solid var(--brand);
  font-size: 12px; font-weight: 800; color: #fff;
  box-shadow: 0 4px 12px rgba(255, 59, 31, .22);
  transition: background .15s, transform .1s, box-shadow .15s;
}
.card-code:hover { background: #f03213; box-shadow: 0 6px 16px rgba(255, 59, 31, .3); }
.card-code:active { transform: scale(.995); }
.card-code .code-cta { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.card-code .code-cta .icon { font-size: 14px; }
.card-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  background: rgba(255, 255, 255, .18); padding: 3px 7px; border-radius: 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 56%;
}
.card-code.copied { background: var(--ok); border-color: var(--ok); box-shadow: none; }
.card-code.copied::after { content: "✓"; font-size: 14px; font-weight: 800; }

.card-foot {
  margin-top: auto; padding: 9px 10px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.votes { display: flex; gap: 4px; }
.vote {
  display: inline-flex; align-items: center; gap: 4px;
  height: 26px; padding: 0 8px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  font-size: 11px; font-weight: 700; color: #6f7683;
  transition: background .15s, color .15s, border-color .15s;
}
.vote .icon { font-size: 14px; vertical-align: 0; }
.vote b { font-weight: 800; font-variant-numeric: tabular-nums; }
.vote .vote-label { display: none; }
@media (min-width: 420px) { .vote .vote-label { display: inline; } }
.vote { white-space: nowrap; }
.vote:hover { background: var(--soft); color: var(--ink-2); }
.vote:active { transform: translateY(.5px); }
/* ✓ 됐어요 — 초록 계열 */
.vote[data-vote="works"]:hover { background: var(--ok-soft); border-color: #b6ead4; color: #0b7a56; }
.vote[data-vote="works"]:active { background: #d5f1e4; border-color: #9adfc4; }
.vote[data-vote="works"][aria-pressed="true"] { background: var(--ok-soft); border-color: #b6ead4; color: #0b7a56; }
/* ✕ 안 돼요 — 빨강 계열 */
.vote[data-vote="expired"]:hover { background: var(--warn-soft); border-color: #f7c9c6; color: var(--warn); }
.vote[data-vote="expired"]:active { background: #fbd6d2; border-color: #eea7a1; }
.vote[data-vote="expired"][aria-pressed="true"] { background: var(--warn-soft); border-color: #f7c9c6; color: var(--warn); }
.vote[aria-pressed="true"] { font-weight: 800; }
.posted { font-size: 11px; color: #a6abb5; white-space: nowrap; }

/* ------------------------------ skeletons ---------------------------- */
.sk { pointer-events: none; }
.sk-media, .sk-line { background: linear-gradient(100deg, #f2f3f6 30%, #e9ebf0 50%, #f2f3f6 70%); background-size: 300% 100%; animation: shimmer 1.4s infinite linear; }
.sk-media { aspect-ratio: 4 / 3; border-bottom: 1px solid #f2f3f6; }
.sk-body { padding: 10px; display: grid; gap: 8px; }
.sk-line { height: 11px; border-radius: 6px; }
.sk-line.w60 { width: 60%; }
.sk-line.w40 { width: 40%; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

/* -------------------------------- empty ------------------------------ */
.empty { text-align: center; padding: 56px 16px 64px; }
.empty-emoji { font-size: 34px; }
.empty-title { margin-top: 10px; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.empty-sub { margin-top: 6px; font-size: 13px; color: var(--muted); }
.empty .btn { margin-top: 16px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 44px; padding: 0 18px; border-radius: 12px;
  font-size: 14px; font-weight: 700; letter-spacing: -.01em;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, transform .1s;
}
.btn:active { transform: scale(.99); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(255, 59, 31, .24); }
.btn-primary:hover { background: var(--brand-ink); }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-block { width: 100%; }

/* ------------------------------- modal ------------------------------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; }
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute; inset: 0; background: rgba(12, 14, 18, .48);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade .18s ease-out;
}
.modal-panel {
  position: relative; z-index: 1; align-self: end;
  width: 100%; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(10, 12, 16, .2);
  animation: sheet .26s cubic-bezier(.22, .8, .3, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes sheet { from { transform: translateY(22px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 3;
  width: 34px; height: 34px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .92); cursor: pointer; color: var(--ink-2);
  display: grid; place-items: center; font-size: 16px;
}
.modal-body { display: grid; grid-template-columns: 1fr; }
.m-left { background: #fbfbfc; padding: 18px; border-bottom: 1px solid var(--line); }
.m-left-inner { display: flex; flex-direction: column; justify-content: center; height: 100%; }
.m-media {
  position: relative; aspect-ratio: 16 / 10; max-height: 34vh; overflow: hidden;
  background: var(--soft); border-radius: 14px;
}
.m-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  mix-blend-mode: multiply; padding: 14px;
}
.m-media .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 40px; color: #b6bcc7;
}
.m-right { padding: 18px 18px 26px; }
.m-cat { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--brand-ink); }
.m-cat .pill { background: var(--brand-soft); padding: 3px 9px; border-radius: 999px; }
.m-cat .store { color: var(--muted); font-weight: 600; }
.m-title {
  margin-top: 8px; font-size: 19px; line-height: 1.32; font-weight: 800; letter-spacing: -.03em;
}
.m-summary { margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--ink-2); }
.m-price { margin-top: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.m-price .now { font-size: 30px; font-weight: 800; letter-spacing: -.04em; }
.m-price .was { font-size: 14px; color: var(--muted); text-decoration: line-through; }
.m-price .save {
  font-size: 12px; font-weight: 800; color: var(--brand);
  background: var(--brand-soft); padding: 3px 8px; border-radius: 8px;
}

.code-panel {
  margin-top: 16px; border: 1px solid #ffd3c9; background: var(--brand-soft);
  border-radius: 14px; padding: 12px;
}
.code-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 11.5px; font-weight: 700; color: var(--brand-ink);
}
.code-panel-row { margin-top: 8px; display: flex; gap: 8px; }
.code-value {
  flex: 1; min-width: 0; height: 44px; display: flex; align-items: center;
  padding: 0 12px; border-radius: 10px; background: #fff; border: 1px solid #ffc9bd;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: .06em; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.code-copy {
  flex: none; height: 44px; padding: 0 14px; border-radius: 10px; border: 0;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
}
.code-copy:hover { background: var(--brand-ink); }
.code-panel.nocode { border-color: var(--line); background: var(--soft); }
.code-panel.nocode .code-panel-head { color: var(--ink-2); }

/* price-history panel for a code-less card */
.code-panel.drop { border-color: #cfe9dd; background: var(--ok-soft); }
.code-panel.drop .code-panel-head { color: #0b7a56; }
.drop-row {
  margin-top: 8px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 18px; font-weight: 800; letter-spacing: -.03em;
}
.drop-row s { font-size: 13px; font-weight: 600; color: var(--muted); }
.drop-row .arrow { font-size: 14px; color: var(--muted); }
.drop-row em {
  font-style: normal; font-size: 12px; font-weight: 800; color: var(--brand);
  background: #fff; border-radius: 6px; padding: 2px 7px;
}
.drop-why {
  margin-top: 6px; font-size: 11.5px; font-weight: 800; color: #0b7a56;
}

.m-actions { margin-top: 14px; display: grid; gap: 8px; grid-template-columns: 1fr; }
.m-actions .btn { width: 100%; }
.m-actions .btn-dark { background: var(--ink); }

.m-sec { margin-top: 20px; }
.m-sec-title {
  font-size: 11.5px; font-weight: 800; color: var(--muted); letter-spacing: .04em;
  text-transform: uppercase;
}
.m-desc { margin-top: 6px; font-size: 13px; line-height: 1.65; color: var(--ink-2); }
.threads-box {
  margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft);
  padding: 12px;
}
.threads-box pre {
  margin: 0; font-family: inherit; font-size: 12.5px; line-height: 1.6;
  color: var(--ink); white-space: pre-wrap; word-break: keep-all;
}
.threads-box .btn { margin-top: 10px; height: 38px; font-size: 13px; }

.m-meta {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted);
}
.m-meta .vote { height: 30px; font-size: 12px; padding: 0 10px; }
.m-meta .vote .icon { font-size: 14px; }
.m-meta-label { align-self: center; font-weight: 700; color: var(--ink-2); }

/* -------------------------------- toast ------------------------------ */
.toast {
  position: fixed; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom));
  transform: translate(-50%, 14px); z-index: 200;
  max-width: calc(100% - 32px);
  padding: 11px 16px; border-radius: 999px;
  background: #12141a; color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(10, 12, 16, .3);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  display: flex; align-items: center; gap: 7px;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { color: #5ee0a8; font-size: 15px; }

/* ------------------------------- footer ------------------------------ */
.site-footer { border-top: 1px solid var(--line); background: #fbfbfc; padding: 26px 0 34px; }
.footer-inner { display: grid; gap: 14px; }
.footer-brand .brand-ko-sm { font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.footer-brand .brand-en { display: block; margin-top: 3px; }
.footer-brand p { margin-top: 8px; font-size: 12.5px; color: var(--muted); max-width: 40ch; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--ink-2); }
.footer-links a:hover { color: var(--brand-ink); }
.disclosure { font-size: 11.5px; color: #a5aab4; }

/* ---------------------------- static pages --------------------------- */
.page { max-width: 760px; padding-top: 40px; padding-bottom: 72px; }
.page h1 { font-size: 28px; font-weight: 800; letter-spacing: -.04em; }
.page h2 { margin-top: 28px; font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.page p { margin-top: 8px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.page-lede { margin-top: 12px; font-size: 15px !important; color: var(--ink) !important; }
.page em { font-style: normal; background: var(--soft); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.page-note {
  margin-top: 32px; padding: 14px 16px; border-radius: 12px;
  background: var(--soft); font-size: 13px !important; color: var(--muted) !important;
}
/* seller partner page: one language at a time, chosen with the flags */
.partner-langs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.partner-lang {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2);
}
.partner-lang svg { display: block; border-radius: 2px; flex: none; }
.partner-lang:hover { border-color: #cfd3db; }
.partner-lang[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.page ol.partner-list { margin: 8px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: var(--ink-2); }
.partner-list li { margin-top: 8px; }
.partner-form { margin-top: 12px; display: grid; gap: 12px; }
.partner-form label { display: grid; gap: 5px; font-size: 13px; font-weight: 700; color: var(--ink); }
.partner-form label > .partner-label { font-size: 13px; font-weight: 700; color: var(--ink); }
.partner-form input:not([type="checkbox"]), .partner-form textarea {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  font: inherit; font-size: 16px; font-weight: 500; color: var(--ink);
}
.partner-form textarea { height: auto; padding: 10px 12px; resize: vertical; }
.partner-form input:focus, .partner-form textarea:focus { outline: 2px solid var(--brand); outline-offset: 1px; border-color: transparent; }
.partner-form .is-bad { border-color: var(--warn) !important; background: #fffaf5 !important; }
.partner-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.partner-grid { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.partner-form label.partner-check { grid-template-columns: auto 1fr; align-items: start; gap: 10px; font-weight: 500; }
.partner-check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); }
.partner-check > span { font-size: 13px !important; line-height: 1.55; color: var(--ink-2) !important; }
.partner-form .btn { height: 46px; justify-content: center; }
.partner-form .btn[disabled] { opacity: .7; cursor: progress; }
.partner-msg { margin: 0 !important; font-size: 13px !important; font-weight: 700; line-height: 1.5; }
.partner-msg[data-state="done"] { color: var(--ok) !important; }
.partner-msg[data-state="error"] { color: var(--warn) !important; }
.page ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.8; color: var(--ink-2); }
@media (min-width: 700px) {
  .page h1 { font-size: 34px; }
}

/* -------------------------- promo code guide -------------------------- */
.guide { max-width: 720px; }
.guide h1 { line-height: 1.24; }
.guide h1 .accent { color: var(--brand); }
.guide-eyebrow {
  display: inline-block; margin-top: 2px; padding: 4px 11px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand-ink);
  font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
}
.guide-key {
  margin-top: 22px; padding: 15px 17px; border-radius: 14px;
  background: var(--brand-soft); border: 1px solid #ffd9d0;
}
.guide-key p { margin: 0 !important; font-size: 13.5px !important; line-height: 1.7; color: #7a2a17 !important; }
.guide-key strong { color: var(--brand-ink); }
.guide-steps { list-style: none; margin: 0; padding: 0; }
.guide-step { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line); }
.guide-step:first-child { margin-top: 36px; }
.guide-head { display: flex; align-items: center; gap: 10px; }
.guide-num {
  flex: none; width: 26px; height: 26px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 800;
  display: grid; place-content: center; box-shadow: 0 4px 10px rgba(255, 59, 31, .26);
}
.guide-step h2 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.guide-step h2 b { color: var(--brand-ink); }
.guide-sub { margin: 26px 0 0; font-size: 14px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.guide-step p { font-size: 14.5px; }
.guide-figure { margin: 16px 0 0; }
.guide-figure a { display: block; }
.guide-figure img {
  display: block; width: 100%; height: auto; max-width: 460px; margin: 0 auto;
  border-radius: 18px; box-shadow: 0 2px 6px rgba(15, 17, 21, .04);
}
.guide-figure figcaption {
  max-width: 460px; margin: 10px auto 0; font-size: 12.5px; line-height: 1.65;
  color: var(--muted); text-align: center; word-break: keep-all;
}
.guide-figure figcaption b { color: var(--ink-2); font-weight: 700; }
.guide-step code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
  background: var(--soft); padding: 1px 5px; border-radius: 5px;
}
.guide-tip {
  margin-top: 14px !important; padding: 12px 14px; border-left: 3px solid var(--brand);
  border-radius: 0 12px 12px 0; background: var(--soft);
  font-size: 13.5px !important; line-height: 1.7;
}
.guide-tip b { color: var(--brand-ink); }
.guide-trouble { margin-top: 40px; padding-top: 30px; border-top: 1px solid var(--line); }
.guide-trouble h2 { margin-top: 0; font-size: 17px; }
.guide-trouble li { margin-top: 10px; }
.guide-back {
  margin-top: 18px !important; padding: 14px 16px; border-radius: 12px;
  background: var(--soft); font-size: 13.5px !important;
}
.guide-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 34px; }
.guide-cta .btn { flex: 1 1 190px; height: 48px; }

/* link to the guide, shown while the promo-code tab is open */
.code-guide-hint {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin: 0 auto; max-width: 520px; padding: 9px 14px;
  border-radius: 999px; background: var(--brand-soft); border: 1px solid #ffd9d0;
  font-size: 12.5px; font-weight: 700; color: var(--brand-ink);
}
.code-guide-hint:hover { background: #ffe7e0; }
.code-guide-hint .arrow { font-weight: 800; }
.code-guide-wrap { padding: 12px 16px 2px; }
.code-guide-wrap[hidden] { display: none; }
.code-guide-link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 9px;
  font-size: 12px; font-weight: 700; color: var(--brand-ink);
  border-bottom: 1px solid transparent;
}
.code-guide-link:hover { border-bottom-color: currentColor; }
@media (min-width: 700px) {
  .guide-step h2 { font-size: 19px; }
  .guide-trouble h2 { font-size: 19px; }
  .code-guide-wrap { padding: 14px 24px 2px; }
}

/* ---------------------------- breakpoints ---------------------------- */
@media (min-width: 480px) {
  .saved-toggle span { display: inline; }
  .tg-join span { display: inline; }
  .grid { gap: 14px; }
  .card-title { font-size: 13.5px; }
}

@media (min-width: 700px) {
  :root { --header-h: 68px; }
  .wrap { padding: 0 24px; }
  .hero-inner { padding-top: 40px; padding-bottom: 30px; }
  .hero h1 { font-size: 42px; }
  .lede { font-size: 15px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .card-body { padding: 11px 12px 0; }
  .card-title { font-size: 14px; }
  .card-price .now { font-size: 18px; }
  .card-foot { padding: 10px 12px 12px; }
  .code-only { display: inline-flex; }
  .results { padding-top: 18px; }
}

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) 340px; align-items: center; gap: 40px; padding-top: 52px; padding-bottom: 40px; }
  .hero h1 { font-size: 52px; line-height: 1.14; }
  .hero-art { display: block; position: relative; height: 210px; }
  .hero-card {
    position: absolute; right: 0; top: 64px; width: 252px;
    background: #fff; border: 1px solid var(--line); border-radius: 18px;
    padding: 16px 18px; box-shadow: var(--shadow-md); transform: rotate(-2deg);
  }
  .hero-card-top {
    display: flex; align-items: center; gap: 6px;
    font-size: 10px; font-weight: 800; letter-spacing: .12em; color: var(--muted);
  }
  .hero-card-top .icon { font-size: 13px; color: var(--brand); }
  .hero-card code {
    display: block; margin-top: 10px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 19px; font-weight: 700; letter-spacing: .04em;
  }
  .hero-card-row { margin-top: 8px; display: flex; align-items: baseline; gap: 8px; }
  .hero-card-row span { font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
  .hero-card-row s { font-size: 13px; color: var(--muted); }
  .stamp {
    position: absolute; left: -14px; top: -2px; z-index: 2;
    width: 78px; height: 78px; border-radius: 999px;
    background: var(--brand); color: #fff;
    display: grid; place-content: center; text-align: center;
    box-shadow: 0 10px 24px rgba(255, 59, 31, .32);
    transform: rotate(6deg);
  }
  .stamp-pct { font-size: 21px; font-weight: 800; letter-spacing: -.04em; line-height: 1; }
  .stamp-label { font-size: 9.5px; font-weight: 700; margin-top: 4px; opacity: .92; }

  .card-summary { display: -webkit-box; }
  .modal { align-items: center; justify-items: center; padding: 32px; }
  .modal-panel {
    align-self: auto; width: min(920px, 100%); max-height: 88vh;
    border-radius: var(--radius-lg);
    animation: pop .2s ease-out;
  }
  @keyframes pop { from { transform: translateY(10px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
  .modal-body { grid-template-columns: 400px minmax(0, 1fr); }
  .m-left { border-bottom: 0; border-right: 1px solid var(--line); padding: 22px; position: sticky; top: 0; align-self: stretch; }
  .m-media { max-height: none; aspect-ratio: 1 / 1; }
  .m-right { padding: 26px 26px 30px; }
  .m-title { font-size: 22px; }
  .m-actions { grid-template-columns: 1.4fr 1fr; }
  .footer-inner { grid-template-columns: 1.4fr 1fr; align-items: start; }
  .disclosure { grid-column: 1 / -1; }
}

@media (min-width: 1120px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 899px) {
  .filterbar-inner { flex-wrap: wrap; row-gap: 8px; }
  .chips { flex: 1 0 100%; mask-image: linear-gradient(90deg, #000 90%, transparent); }
  .filter-right { width: 100%; justify-content: flex-end; }
  .code-only { display: inline-flex; margin-right: auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* private admin mode badge — only shown for a browser opened with ?admin=<token> */
.admin-badge {
  position: fixed; left: 14px; bottom: 14px; z-index: 60;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px; border-radius: 999px;
  border: 1px solid var(--line, #e6e6e6); background: rgba(255, 255, 255, .94);
  color: #555; font-size: 11.5px; font-weight: 700; line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .08);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  cursor: pointer;
}
.admin-badge[hidden] { display: none; }
.admin-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand, #ff3b1f); }
.admin-badge-exit { color: #999; font-weight: 600; }
.admin-badge:hover { color: #111; }
.admin-badge:hover .admin-badge-exit { color: var(--brand, #ff3b1f); }

/* hero stamp + code card are real: they open the deal they show */
.hero-art .is-link { cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.hero-art .is-link:hover { filter: brightness(1.03); box-shadow: 0 18px 40px rgba(15, 17, 21, .16); }
.hero-art .is-link:focus-visible { outline: 2px solid var(--brand); outline-offset: 4px; }
