/* 핫딜모음 스타일 — 디자인 v5 (2026-11-12 사용자 승인, 시안 design/site-v5/index.html): v4 위에 색·선·머리 띠·사진 칸·홈을 다듬음 (파일 끝 '홈 v5'·'디자인 v5 공통')
   이전: 디자인 v4 (2026-11-11 사용자 결정: 팝가 popga.co.kr 기준, 시안 design/site-v2/index.html)
   팝가에서 잰 값: 글꼴 Pretendard(사이트에 직접 올림, site/fonts/pretendard), 제목 #23282f·구역 제목 20px/600·목록 제목 16px/500,
   회색 단계 #354152 · #677488 · #d9dfe8(테두리) · #f1f5f9(구분선·태그) · #f8fafc(연한 칸), 둥근 칩(고르면 진회색), 사진 칸 테두리 1px·모서리 8px.
   팝가 보라 강조색 자리에 핫딜모음 빨강. 밝은 화면이 기본이고 어두운 화면은 고를 수 있다 */
:root {
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Malgun Gothic", "맑은 고딕", sans-serif;
  --brand: #f0243b;        /* 버튼 배경·강조 */
  --brand-hi: #f0243b;     /* 선·강조 */
  --brand-text: #e11d38;   /* 작은 빨간 글자·할인율 */
  --brand-weak: #fff0f2;
  --good: #0c8a52;
  /* 디자인 v5 (2026-11-12): 글자 회색 단계·선·사진 칸을 시안 design/site-v5 값으로 */
  --text: #191f28;
  --text-2: #4e5968;
  --text-3: #6b7480;
  --text-4: #9aa3ae;
  --line: #eef0f3;         /* 구분선 */
  --line-2: #e3e6ea;       /* 테두리 */
  --bg: #ffffff;
  --bg-2: #f9fafb;         /* 연한 칸 */
  --soft: #f2f4f6;         /* 태그·칸 바탕 */
  --head: #ffffff;         /* 머리 띠 */
  --sub: #4e5968;          /* 보조 버튼 */
  --ph: #f4f5f7;           /* 사진 칸 바탕 (흰 배경 사진은 곱하기로 녹인다) */
  --page: #f2f4f6;         /* 홈 바탕 (흰 판을 올린다) */
  --panel: #ffffff;        /* 홈 판 */
  --hair: rgba(15, 23, 42, .09);    /* 판 테두리·구역 선 */
  --hair-2: rgba(15, 23, 42, .06);  /* 목록 사이 선 */
  --fill: #f2f4f6;         /* 입력칸·아이콘 칸 */
  --fill-2: #e9ecef;       /* 아이콘 칸 마우스 올림 */
  --seg-on: #ffffff;       /* 고른 탭(혜택) */
  --on-bg: #191f28;        /* 고른 칩·진한 버튼 */
  --on-ink: #ffffff;
  --btn: color-mix(in srgb, var(--brand) 88%, #000);   /* 빨간 버튼 바탕: 흰 글자 대비 4.5 이상 */
  --r-p: 20px;             /* 판 모서리 */
  --r: 8px;
  --r-lg: 12px;
  --header-h: 68px;
  --pad: 40px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --brand-hi: #ff3b52;
  --brand-text: #ff5a6e;
  --brand-weak: rgba(255, 59, 82, .14);
  --good: #3ccf86;
  --text: #f1f3f6;
  --text-2: #c3c9d2;
  --text-3: #8a94a3;
  --text-4: #687282;
  --line: #22262c;
  --line-2: #343a43;
  --bg: #0f1114;
  --bg-2: #171a1f;
  --soft: #1f242b;
  --head: #171a1f;
  --sub: #3a4150;
  --ph: #e7e9ec;           /* 상품 사진은 흰 바탕이 많아 어두운 화면에서도 밝은 칸에 담고 밝기만 살짝 낮춘다 */
  --page: #0f1114;
  --panel: #171a1f;
  --hair: rgba(255, 255, 255, .08);
  --hair-2: rgba(255, 255, 255, .055);
  --fill: #1f242b;
  --fill-2: #2a3038;
  --seg-on: #2f3540;
  --on-bg: #f1f3f6;
  --on-ink: #171a1f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; overflow-x: clip; }
body { margin: 0; overflow-x: clip; background: var(--bg); color: var(--text); font: 400 15px/1.5 var(--font); word-break: keep-all; -webkit-font-smoothing: antialiased; }
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.3px; }
b, strong { font-weight: 700; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--brand-hi); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
.muted { color: var(--text-3); font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: var(--r); z-index: 100; }
.skip:focus { left: 8px; }
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.xs { width: 15px; height: 15px; }
.sep { display: inline-block; width: 2px; height: 2px; border-radius: 1px; background: currentColor; opacity: .6; vertical-align: middle; flex: none; }
code { padding: 2px 6px; border-radius: 4px; background: var(--soft); font-size: 13px; }

/* ---------- 머리 (팝가: 연회색 띠·아래 모서리 둥글게·가운데 메뉴). 검색은 돋보기를 누르면 머리 아래로 열린다 ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--head); border-radius: 0 0 24px 24px; padding-top: env(safe-area-inset-top); }
.header-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 68px; padding: 0 40px; }
/* 로고 v5(2026-11-12 사용자 선택 '굵기 대비', 시안 design/site-v5/logo.html 2번): '핫딜' 굵은 빨강 + '모음' 중간 굵기 먹색 */
.logo { display: inline-flex; align-items: center; gap: 6px; justify-self: start; min-height: 44px; font-size: 22px; font-weight: 560; letter-spacing: -0.05em; line-height: 1; color: var(--text); }
.logo b { font-weight: 820; color: var(--brand); margin-right: .02em; }
.logo-ic { width: 28px; height: 28px; }
.main-nav { display: flex; gap: 28px; align-self: stretch; }
.main-nav a { position: relative; display: flex; align-items: center; font-size: 16px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.main-nav a:hover { color: var(--text); }
.main-nav a[aria-current] { color: var(--text); font-weight: 600; }
.main-nav a[aria-current]::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 14px; height: 3px; margin-left: -7px; border-radius: 2px; background: var(--text); }
.search { position: absolute; left: 50%; top: calc(100% + 10px); z-index: 5; display: none; align-items: center; width: min(560px, calc(100vw - 24px)); height: 52px; transform: translateX(-50%); border-radius: 26px; background: var(--bg); border: 1px solid var(--line-2); box-shadow: 0 12px 32px rgba(15, 23, 42, .14); }
.site-header.search-on .search { display: flex; }
.search input { flex: 1; min-width: 0; height: 100%; padding: 0 0 0 22px; border: 0; background: none; outline: none; font-size: 16px; color: var(--text); }
.search input::placeholder { color: var(--text-4); }
.search input::-webkit-search-cancel-button { display: none; }
.search-btn { display: grid; place-items: center; width: 52px; height: 100%; border: 0; background: none; color: var(--text-2); }
.search-btn .ic { width: 20px; height: 20px; }
.search-drop { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 5; display: grid; gap: 12px; padding: 18px 22px 20px; border: 1px solid var(--line-2); border-radius: 16px; background: var(--bg); box-shadow: 0 12px 32px rgba(15, 23, 42, .14); font-size: 14px; }
#searchTags { display: flex; flex-wrap: wrap; gap: 8px; }
#searchTags a { padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--text-2); }
#searchTags a:hover { color: var(--brand-text); }
.header-actions { display: flex; align-items: center; gap: 2px; justify-self: end; }
.install-btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; margin-right: 6px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); font-size: 13px; font-weight: 600; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 20px; background: none; color: var(--text); }
.icon-btn:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.hd-text { margin-left: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.hd-text:hover { color: var(--text); }
.badge { position: absolute; top: 3px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 700; font-style: normal; line-height: 17px; text-align: center; }

main.wrap { padding-top: 32px; padding-bottom: 120px; min-height: 70vh; }
main:focus { outline: none; }

/* ---------- 공통 버튼 · 표시 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 44px; padding: 0 18px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); font-size: 15px; font-weight: 700; letter-spacing: -0.3px; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn.lg { height: 52px; padding: 0 20px; font-size: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.sub { background: var(--sub); border-color: var(--sub); color: #fff; }
.btn.sub:hover { filter: brightness(1.15); }
.btn.disabled { color: var(--text-3); background: var(--soft); border-color: var(--soft); cursor: default; }
.btn.on { border-color: var(--brand-hi); color: var(--brand-text); }
.link-btn { border: 0; background: none; padding: 0; min-height: 32px; color: var(--text-3); font-size: 14px; display: inline-flex; align-items: center; gap: 4px; }
.link-btn:hover { color: var(--text); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 4px; background: var(--soft); font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.tag.hot { background: var(--brand-weak); color: var(--brand-text); }
.tag.good { color: var(--good); }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--r); background: var(--soft); }
.seg > * { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 30px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--text-3); }
.seg > [aria-pressed="true"] { background: var(--bg); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.more { display: inline-flex; align-items: center; gap: 2px; min-height: 32px; padding: 0; border: 0; background: none; font-size: 14px; color: var(--text-3); white-space: nowrap; }
.more:hover { color: var(--text); }
/* 분류 버튼: 테두리 칸, 고르면 빨간 테두리·빨간 글자 (쇼핑라이브 '전체 테크 푸드…') */
.pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pills > * { display: inline-flex; align-items: center; flex: none; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: none; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.pills > :hover { color: var(--text); border-color: var(--text-3); }
.pills > [aria-pressed="true"] { border-color: var(--brand-hi); color: var(--brand-text); font-weight: 700; }
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.list-sort { font-size: 14px; color: var(--text-3); white-space: nowrap; }
.feed-total { font-size: 14px; color: var(--text-2); white-space: nowrap; }
.feed-total b { color: var(--text); }
.note { margin: 10px 0 0; font-size: 13px; color: var(--text-3); line-height: 1.6; }

/* ---------- 상품 사진 (커뮤니티 원본 주소, 못 불러오면 판매처 이름 칸) ---------- */
.ph { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--r); background: var(--soft); }
.ph img { width: 100%; height: 100%; object-fit: cover; }
/* 사진이 있는 칸은 액자처럼: 안쪽 여백 + 1px 연한 선 + 은은한 바탕 (2026-11-11 사용자 요청 "깔끔하고 고급스럽게").
   사진이 여백 밖으로 넘치지 않게 마우스를 올려도 키우지 않고, 대신 선만 조금 진하게 한다 */
.ph:has(img) { padding: 8px; border: 1px solid var(--line); background: #fff; transition: border-color .2s; }
.ph:has(img) img { border-radius: calc(var(--r) - 3px); }
.pcard:hover .ph:has(img) img, .deal:hover .ph:has(img) img { transform: none; }
.pcard:hover .ph:has(img), .deal:hover .ph:has(img) { border-color: var(--line-2); }
/* 세로로 긴 사진은 맨 위(쇼핑앱 캡처의 상품 사진 자리)를 기준으로 자른다 (main.js zzImgFit) */
.ph img.tall { object-position: center top; }
.ph.noimg { display: grid; place-items: center; }
.ph-ic { width: 34%; height: 34%; max-width: 64px; max-height: 64px; color: var(--text-3); stroke-width: 1.4; }
.ph.noimg:has(.ph-ic)::after { content: none; }
.ph.noimg::after { content: attr(data-label); position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; color: var(--text-3); font-size: 13px; font-weight: 700; text-align: center; }

/* ---------- 섹션 ---------- */
.sec { margin-top: 72px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-head h2 { font-size: 22px; }
.sec-head h2 small { margin-left: 10px; font-size: 13px; font-weight: 400; color: var(--text-3); letter-spacing: 0; }
.sec-head + .pills { margin-bottom: 20px; }

/* 상세 정보 칸의 아이콘+글자 묶음 */
.d-card dt, .d-ship { display: inline-flex; align-items: center; gap: 4px; }
/* 상세 사진 위 동그란 버튼(찜·공유) */
.ph-act { display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; }
.ph-act:hover { background: rgba(0, 0, 0, .68); }
.ph-act .ic { width: 17px; height: 17px; }
.ph-act.on { color: var(--brand-hi); }
.ph-act.on .ic { fill: currentColor; }
.ph img { transition: transform .3s; }
/* 인기 페이지 순위 숫자 */
.rn { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -2px; text-align: center; color: transparent; -webkit-text-stroke: 1.3px var(--text-2); }

/* 매일 출석 (혜택 페이지) */
.pbox { display: flex; flex-direction: column; min-width: 0; padding: 20px 22px 12px; border-radius: var(--r-lg); background: var(--soft); }
.pbox-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.pbox-head h3 { font-size: 16px; }
.pbox-head .more { min-height: 24px; font-size: 13px; }
.pbox-head .muted { font-size: 12.5px; }
.bl-tag { display: inline-flex; align-items: center; max-width: 92px; height: 20px; padding: 0 6px; overflow: hidden; border-radius: 4px; background: var(--line); color: var(--text-2); font-size: 11.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.dd { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.dd.ans { color: var(--brand-text); font-weight: 700; }
.attend { gap: 0; padding-bottom: 20px; }
.at-msg { margin: 2px 0 12px; font-size: 13.5px; color: var(--text-2); }
.at-msg b, .at-foot b { color: var(--brand-text); }
.streak { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.streak li { display: grid; place-items: center; height: 28px; border-radius: 6px; background: var(--line); color: var(--text-2); font-size: 12px; font-weight: 700; }
.streak li.on { background: var(--brand); color: #fff; }
.at-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; font-size: 13px; color: var(--text-2); }

/* ---------- 실시간 핫딜 + 맞춤 핫딜 찾기 ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.feed-head { display: flex; align-items: baseline; gap: 8px; }
.feed-head h2 { font-size: 22px; }
.live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); }
.live::before { content: ""; width: 6px; height: 6px; border-radius: 3px; background: var(--brand-hi); box-shadow: 0 0 0 3px var(--brand-weak); }
.cat-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 18px; }
.cat-tab { display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: none; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.cat-tab span { font-size: 12px; color: var(--text-3); }
.cat-tab:hover { border-color: var(--text-3); }
.cat-tab[aria-pressed="true"] { border-color: var(--brand-hi); color: var(--brand-text); font-weight: 700; }
.cat-tab[aria-pressed="true"] span { color: var(--brand-text); }
.feed-tools { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; }
.tools-right { display: flex; align-items: center; gap: 8px; flex: none; }
.sort-sel { position: relative; display: inline-flex; align-items: center; }
.sort-sel select { height: 36px; padding: 0 24px 0 6px; border: 0; background: none; font-size: 14px; color: var(--text-2); appearance: none; -webkit-appearance: none; cursor: pointer; }
.sort-sel select option { background: var(--bg); color: var(--text); }
.sort-sel .ic { position: absolute; right: 4px; color: var(--text-3); pointer-events: none; }
.tool-btn { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); font-size: 14px; font-weight: 700; }
.tool-btn.filter-btn { display: none; }
.tool-btn .count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-top: 12px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px 0 11px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); font-size: 13px; color: var(--text-2); }
.chip.static { background: var(--soft); border-color: var(--soft); color: var(--text); }
.chip.static button { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 0; background: none; padding: 0; color: var(--text-3); }
.new-bar { position: sticky; top: calc(var(--header-h) + 12px); z-index: 15; display: block; margin: 12px auto 0; height: 40px; padding: 0 18px; border: 0; border-radius: var(--r); background: var(--text); color: var(--bg); font-size: 14px; font-weight: 700; box-shadow: 0 4px 14px rgba(0, 0, 0, .2); }

/* 딜 카드 */
.deal-list { display: grid; gap: 10px; padding-top: 14px; }
.deal { position: relative; min-width: 0; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); transition: border-color .15s; }
.deal:hover { border-color: var(--line-2); }
.deal .thumb { display: block; position: relative; }
.deal.is-ended .ph img { filter: grayscale(1) opacity(.5); }
.ended-cover { position: absolute; inset: 0; display: grid; place-items: center; border-radius: var(--r); background: rgba(0, 0, 0, .45); color: #fff; font-size: 13px; font-weight: 700; }
.deal-body { display: grid; gap: 4px; min-width: 0; }
.deal .title { font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding: 1px 0; }
.hit { color: var(--brand-text); }
.source { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; }
.source .com { color: var(--brand-text); font-weight: 700; }
.source > :last-child { overflow: hidden; text-overflow: ellipsis; }
.cb { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; border-radius: 4px; background: var(--line); color: var(--text); font-size: 10.5px; font-weight: 700; }
/* 커뮤니티 아이콘 (COM_ICON): 32px 파일을 16px로 보여 줘 선명하게, 투명 아이콘은 바탕 없이 */
/* 높이는 원본 비율대로(height:auto): 16×15 뽐뿌 아이콘을 16×16 칸에 늘리면 세로로 번져 흐려진다 */
img.cb { width: 16px; height: auto; border-radius: 3px; background: none; }
.t-hot, .t-end { display: inline-flex; align-items: center; height: 18px; padding: 0 5px; margin-right: 6px; border-radius: 3px; font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.t-hot { background: var(--brand); color: #fff; }
.t-end { background: var(--line); color: var(--text-3); }
.deal.is-ended .t-text { color: var(--text-3); text-decoration: line-through; }
.t-new { display: inline-grid; place-items: center; width: 15px; height: 15px; margin-left: 5px; border-radius: 3px; background: var(--brand); color: #fff; font-size: 9.5px; font-weight: 700; vertical-align: 2px; }
.price-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 7px; }
.pct { font-size: 15px; font-weight: 700; color: var(--brand-text); }
.price { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.price.unknown { font-size: 14px; font-weight: 400; color: var(--text-3); }
.avg { font-size: 12.5px; color: var(--text-3); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 2px; font-size: 12.5px; color: var(--text-3); }
.meta > span { display: inline-flex; align-items: center; gap: 3px; }
.meta .ic.xs { width: 14px; height: 14px; }
.meta .free { color: var(--text-2); font-weight: 700; }
.meta .low { color: var(--good); font-weight: 700; }
.meta .also { color: var(--text-2); }
.heart { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: var(--r); background: none; color: var(--text-3); }
.heart:hover { background: var(--soft); color: var(--text); }
.heart .ic { width: 21px; height: 21px; }
.heart.on, .buy-heart.on { color: var(--brand-text); }
.heart.on .ic, .buy-heart.on .ic { fill: currentColor; }
.ph-label { display: none; position: absolute; left: 4px; top: 4px; z-index: 1; height: 22px; padding: 0 7px; align-items: center; border-radius: 4px; background: var(--brand); color: #fff; font-size: 11.5px; font-weight: 700; }

.deal-list.compact .deal { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 12px 16px; }
.deal-list.compact .deal-body { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "src price" "title price" "meta price"; column-gap: 16px; row-gap: 2px; align-items: center; }
.deal-list.compact .source { grid-area: src; }
.deal-list.compact .title { grid-area: title; -webkit-line-clamp: 1; }
.deal-list.compact .meta { grid-area: meta; margin-top: 0; }
.deal-list.compact .price-row { grid-area: price; flex-direction: column; align-items: flex-end; gap: 0; text-align: right; }
.deal-list.compact .heart { width: 32px; height: 32px; }
.deal-list.list .deal { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 20px 22px; }
.deal-list.grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 18px 14px; padding-top: 18px; }
.deal-list.grid .deal { display: grid; align-content: start; overflow: hidden; }
.deal-list.grid .ph { border-radius: 0; }
.deal-list.grid .deal-body { padding: 12px 14px 16px; }
.deal-list.grid .title { min-height: 2.9em; }
.deal-list.grid .heart { position: absolute; top: 4px; right: 4px; background: rgba(255, 255, 255, .92); color: #4e5968; }
.deal-list.grid .heart.on { color: #e5112f; }
.deal-list.grid .ph-label { display: inline-flex; }
.deal-list.grid .source .cb, .deal-list.grid .source .com, .deal-list.grid .source .com + .sep { display: none; }

.feed-more { display: flex; justify-content: center; padding: 28px 0 0; }
.feed-more .btn { width: 100%; max-width: 320px; }
.empty { padding: 64px 24px; text-align: center; display: grid; justify-items: center; gap: 6px; grid-column: 1 / -1; }
.empty strong { font-size: 17px; }
.empty p { margin: 0 0 10px; color: var(--text-3); font-size: 14px; }
.empty-actions { display: flex; gap: 8px; }
.empty.big { padding: 120px 24px; }
/* 서버(seo.mjs)가 미리 그린 본문: 검색엔진과 스크립트가 꺼진 방문자용. 화면 스크립트가 곧 자기 화면으로 바꾼다 */
.seo-pre { padding: 28px 0 40px; line-height: 1.6; }
.seo-pre h1 { font-size: 22px; margin: 0 0 8px; }
.seo-pre h2 { font-size: 17px; margin: 28px 0 8px; }
.seo-pre p { margin: 0 0 12px; color: var(--text-2); }
.seo-pre img { display: block; max-width: 240px; height: auto; border-radius: 8px; margin: 12px 0; }
.seo-cats, .seo-crumbs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 16px; font-size: 13px; color: var(--text-3); }
.seo-cats a, .seo-crumbs a, .seo-list a { color: var(--text); }
.seo-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.seo-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.seo-list span { display: block; font-size: 12.5px; color: var(--text-3); }

/* 오른쪽 영역 (top 값은 main.js fitSide 가 높이에 맞춰 계산) */
.side { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 16px; }
.side-box { padding: 20px 22px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.alert-cta { background: var(--soft); border-color: var(--soft); }
.alert-cta h2 { font-size: 15px; }
.alert-cta p { margin: 6px 0 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.5; }

/* 맞춤 핫딜 찾기 (프리티 요금제 찾기): 데스크톱은 오른쪽 카드, 태블릿·휴대폰은 서랍 */
.filters { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg); }
.drawer-dim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 45; }
.f-head { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 0 22px; border-bottom: 1px solid var(--line); }
.f-head h2 { margin-right: auto; font-size: 16px; }
.f-close { margin-left: 4px; }
.f-close { display: none; margin-right: -10px; }
.f-body { padding: 0 22px; }
.f-group { padding: 18px 0; border-bottom: 1px solid var(--line); }
.f-group:last-child { border-bottom: 0; }
.f-group h3 { margin-bottom: 10px; font-size: 14px; }
.f-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.f-title h3 { margin: 0; }
.f-title span { font-size: 13px; color: var(--text-2); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: var(--r); background: none; color: var(--text-2); font-size: 13.5px; white-space: nowrap; }
.fchip span { font-size: 11.5px; color: var(--text-3); }
.fchip:hover { border-color: var(--text-3); }
/* 고른 조건은 바탕을 칠하지 않고 빨간 테두리·빨간 글자로만 표시 */
.fchip[aria-pressed="true"] { border-color: var(--brand-hi); color: var(--brand-text); font-weight: 700; }
.fchip[aria-pressed="true"] span { color: var(--brand-text); }
.fchip .cb { width: 16px; height: 16px; font-size: 9.5px; }
.fchip img.cb { height: auto; }   /* 아이콘은 원본 비율대로 (img.cb 참고) */
.fchip[aria-pressed="true"] .cb { background: var(--brand); color: #fff; }
.fchip.more { border-color: var(--line); background: none; color: var(--text-3); }
.range { position: relative; height: 28px; margin: 0 2px; }
.range::before, .range::after { content: ""; position: absolute; top: 12px; height: 4px; border-radius: 2px; }
.range::before { left: 0; right: 0; background: var(--line-2); }
.range::after { left: var(--lo); right: calc(100% - var(--hi)); background: var(--brand-hi); }
.range input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 28px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input:focus-visible { outline: none; }
.range input::-webkit-slider-runnable-track { background: none; }
.range input::-moz-range-track { background: none; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 24px; height: 24px; border: 1px solid var(--line-2); border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); cursor: pointer; }
.range input::-moz-range-thumb { pointer-events: auto; width: 22px; height: 22px; border: 1px solid var(--line-2); border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); cursor: pointer; }
.range input:focus-visible::-webkit-slider-thumb { border-color: var(--brand-hi); box-shadow: 0 0 0 4px var(--brand-weak); }
.f-foot { display: flex; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--line); }
/* 초기화: 머리줄 오른쪽 글자 버튼 */
.f-reset { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 4px; border: 0; background: none; color: var(--text-3); font-size: 13px; }
.f-reset:hover { color: var(--text); }
.f-seg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
.f-seg > * { padding: 0 4px; font-size: 13.5px; }
.f-seg > [aria-pressed="true"] { font-weight: 700; }
.f-seg5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.f-foot .btn { flex: 1; height: 46px; }
.f-foot .btn b { margin-left: 4px; }

/* ---------- 페이지 머리 (프리티): 왼쪽 큰 제목, 오른쪽 경로 ---------- */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 8px 0 36px; }
.page-head h1 { font-size: 28px; letter-spacing: -0.5px; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); white-space: nowrap; }
.crumbs a { display: inline-flex; align-items: center; }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text-2); font-weight: 700; }
.page-desc { margin: -14px 0 28px; font-size: 14px; color: var(--text-3); }

/* ---------- 상세: 회색 칸 안에 사진 · 정보 · 오른쪽 가격과 큰 버튼 ---------- */
.detail-band { display: grid; grid-template-columns: 240px minmax(0, 1fr) 320px; gap: 40px; align-items: start; padding: 36px 40px; border-radius: var(--r-lg); background: var(--soft); }
.detail-thumb { position: relative; }
.detail-thumb .ph { border-radius: var(--r); }
.detail-thumb .ph.noimg { background: var(--bg); }   /* 사진 있는 칸은 다른 곳처럼 흰 바탕 액자(.ph:has(img)) */
/* 찜·공유: 사진 오른쪽 위 동그란 버튼 */
.d-acts { position: absolute; top: 4px; right: 4px; z-index: 2; display: flex; gap: 6px; }
.detail-info { display: grid; gap: 12px; align-content: start; min-width: 0; }
.d-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.d-tags .tag { background: var(--bg); }
.detail-info h1 { font-size: 24px; line-height: 1.4; letter-spacing: -0.5px; }
.d-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; font-size: 14px; color: var(--text-3); }
.d-sub a { color: var(--text-2); }
.d-sub a:hover { color: var(--text); }
.d-card { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 10px 0 0; padding: 20px 0; border-radius: var(--r-lg); background: var(--bg); text-align: center; }
.d-card div { display: grid; gap: 4px; padding: 0 12px; }
.d-card div + div { border-left: 1px solid var(--line); }
.d-card dt { justify-content: center; font-size: 13px; color: var(--text-3); }   /* 아이콘+글자 묶음도 숫자처럼 가운데 */
.d-card dd { margin: 0; font-size: 18px; font-weight: 700; }
.detail-buy { display: grid; gap: 10px; justify-items: end; text-align: right; }
.d-price { display: flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; gap: 4px 10px; }
.d-price .pct { font-size: 26px; }
.d-price strong { font-size: 32px; letter-spacing: -0.5px; }
.d-price strong.unknown { font-size: 20px; font-weight: 400; color: var(--text-3); }
.d-ship { margin: 0; font-size: 14px; color: var(--text-2); }
/* 오른쪽 칸(320px)에 버튼 셋을 한 줄로 두면 '판매처에서 구매하기' 글자가 밀린다: 구매 버튼을 위 한 줄 전체로, 아래 줄에 찜·원문 보기 */
.d-btns { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 8px; width: 100%; margin-top: 12px; }
.d-btns .btn { height: 56px; white-space: nowrap; }
.d-btns .btn.primary, .d-btns .btn.disabled { grid-column: 1 / -1; order: -1; }
/* 찜은 사진 위가 아니라 구매 버튼 줄에 (휴대폰은 아래 고정 줄 .buy-bar 의 찜) */
.d-btns .buy-heart { display: grid; place-items: center; height: 56px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--text-2); }
.d-btns .buy-heart .ic { width: 23px; height: 23px; }
.d-aff { margin: 0; max-width: 380px; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.d-rank, .d-old { margin: 0; font-size: 13px; color: var(--text-3); }
.detail-body { margin: 0; }   /* 위 회색 칸(.detail-band)과 좌우 끝선을 맞춘다 */
.notice-box { margin-top: 28px; padding: 24px 28px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.notice-box h2 { margin-bottom: 10px; font-size: 16px; }
.notice-box ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.notice-box li { display: flex; align-items: center; gap: 8px; }
.notice-box li .ic { color: var(--brand-text); }
.summary-box p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--text-2); }
.summary-box + .notice-box { margin-top: 12px; }
.d-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 16px; }
.vote, .target { display: grid; gap: 10px; padding: 20px 24px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.vote-head { font-size: 14px; }
.vote-head b { color: var(--brand-text); font-size: 16px; }
.vote-bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.vote-bar i { display: block; height: 100%; background: var(--brand-hi); }
.vote-btns { display: flex; gap: 6px; }
.target label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.target .ic { color: var(--brand-text); }
.target-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.target-row input { width: 130px; height: 36px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); font-size: 14.5px; }
.target-row input:focus { outline: none; border-color: var(--brand-hi); }
.target.set { display: flex; align-items: center; gap: 8px; font-size: 14px; background: var(--brand-weak); border-color: transparent; }
.target.set span { flex: 1; }
.detail-tabs { position: sticky; top: calc(var(--header-h) + 12px); z-index: 10; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin-top: 44px; padding: 6px; border-radius: var(--r-lg); background: var(--soft); }
.detail-tabs button { height: 46px; border: 0; border-radius: var(--r); background: none; font-size: 15px; font-weight: 700; color: var(--text-2); }
.detail-tabs button:hover { background: var(--bg); color: var(--text); }
.block { padding: 52px 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 80px); }
.block > h2, .block-head h2 { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; font-size: 20px; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.detail-links { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 24px; }
.zup-card { display: grid; grid-template-columns: 160px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.zup-score { display: flex; align-items: baseline; justify-content: center; gap: 4px; padding: 24px 16px; background: var(--soft); align-self: stretch; align-content: center; flex-wrap: wrap; }
.zs-num { font-size: 52px; font-weight: 700; line-height: 1; color: var(--brand-hi); letter-spacing: -1px; }
.zs-max { font-size: 14px; color: var(--text-3); }
.zup-main { display: grid; gap: 12px; padding: 20px 24px; }
.zs-label { font-size: 17px; }
.zup-meter { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.zup-meter i { display: block; height: 100%; border-radius: inherit; background: var(--brand-hi); }
.zup-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.zup-parts li { display: grid; gap: 2px; font-size: 12.5px; color: var(--text-3); }
.zup-parts b { font-size: 16px; color: var(--text); }
.zup-main .note { margin: 0; }
.verdict { padding: 20px 22px; border-radius: var(--r-lg); background: var(--soft); }
.verdict > strong { font-size: 17px; }
.verdict.good > strong { color: var(--good); }
.verdict.bad > strong { color: var(--brand-text); }
.verdict > p { margin: 4px 0 0; color: var(--text-2); font-size: 14px; }
.bars { display: grid; gap: 12px; margin-top: 18px; max-width: 640px; }
.bar-row { display: grid; grid-template-columns: 76px minmax(0, 1fr) 104px; align-items: center; gap: 12px; font-size: 14px; color: var(--text-2); }
.bar-row b { text-align: right; color: var(--text); }
.track { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: inherit; background: var(--text-3); }
.bar-row.low i { background: var(--good); }
.bar-row.now i { background: var(--brand); }
.chart-box { margin-top: 16px; padding: 12px 8px 0; border: 1px solid var(--line); border-radius: var(--r-lg); }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--text-3); font-size: 11px; }
.chart .line { fill: none; stroke: var(--text-2); stroke-width: 2; stroke-linejoin: round; }
.chart .dot { fill: var(--text-2); }
.chart .dot-now { fill: var(--brand); stroke: var(--bg); stroke-width: 3; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th { text-align: left; font-size: 13px; color: var(--text-3); font-weight: 400; padding: 10px 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--soft); }
.compare td { padding: 13px 12px; border-bottom: 1px solid var(--line); }
.compare .r { text-align: right; }
.compare tr.current td { background: var(--brand-weak); }
.compare tr.is-ended td { color: var(--text-3); }
.compare a { font-weight: 700; }   /* 국내 사이트처럼 링크 밑줄 없음 (2026-11-11 사용자) */
.buy-bar { display: none; }

/* ---------- 핫딜모음 혜택 ---------- */
.perk-tabs { display: flex; gap: 6px; margin: 0 0 24px; overflow-x: auto; scrollbar-width: none; }
.perk-tabs::-webkit-scrollbar { display: none; }
.perk-tabs a { display: inline-flex; align-items: center; gap: 5px; flex: none; height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 14.5px; color: var(--text-2); white-space: nowrap; }
.perk-tabs a span { font-size: 12.5px; color: var(--text-3); }
.perk-tabs a:hover { border-color: var(--text-3); }
.perk-tabs a[aria-current] { border-color: var(--brand-hi); color: var(--brand-text); font-weight: 700; }
.perk-tabs a[aria-current] span { color: var(--brand-text); }
.perk-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.perk-card { display: flex; gap: 16px; height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.perk-card:hover { border-color: var(--line-2); }
.pk-ph { width: 84px; flex: none; }
.pk-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pk-tags { display: flex; align-items: center; gap: 8px; }
.pk-title { font-size: 15px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pk-meta { display: flex; align-items: center; gap: 6px; margin-top: auto; font-size: 12.5px; color: var(--text-3); }

/* ---------- 인기 / 알림 ---------- */
.rank-page { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rank-page > li { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; }
.rn.top { color: var(--brand-hi); -webkit-text-stroke: 0; }
.rank-page .deal { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 18px 22px; }
.alert-box { display: grid; gap: 14px; margin-bottom: 32px; padding: 24px 28px; border-radius: var(--r-lg); background: var(--soft); }
.kw-form { display: flex; gap: 8px; }
.kw-form input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); font-size: 15px; }
.kw-form input:focus { outline: none; border-color: var(--text-3); }
.kw-form .btn { height: 48px; padding: 0 22px; }
.alert-box .chips { padding: 0; }
.perm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 13.5px; }
.ab-title { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.target-list { list-style: none; margin: 0; padding: 0; }
.target-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.notes { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.notes a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 14px; }
.notes .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notes .unread a { background: var(--brand-weak); }
.notes .empty-line { padding: 18px 4px; list-style: none; color: var(--text-3); }

/* ---------- 푸터 · 토스트 · 탭바 ---------- */
.site-footer { padding: 32px 0 44px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-3); }
.site-footer p { margin: 0 0 6px; max-width: 900px; }
.site-footer b { color: var(--text-2); }
.site-footer .foot-logo { margin-bottom: 10px; opacity: .8; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 22px; padding-bottom: 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.foot-links a { color: var(--text-2); }
.foot-links a:hover { color: var(--text); }
/* 검색 입구 페이지(상품 키워드·날짜별) */
.hub-sec + .hub-sec { margin-top: 44px; }
.hub-title { margin: 0 0 14px; font-size: 19px; }
.hub-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.hub-links a { padding: 7px 12px; border: 1px solid var(--line-2); border-radius: var(--r); font-size: 13.5px; color: var(--text-2); }
.hub-links a:hover { color: var(--text); border-color: var(--text-3); }
/* 바닥 로고 = 머리 띠와 같은 로고 v5 글자(조금 작게) */
.site-footer .foot-logo .logo { min-height: 0; font-size: 18px; gap: 5px; }
.site-footer .foot-logo .logo-ic { width: 22px; height: 22px; }
.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 16px); background: rgba(30, 30, 34, .95); color: #fff; padding: 12px 18px; border-radius: var(--r); font-size: 14px; font-weight: 700; opacity: 0; pointer-events: none; transition: .2s; z-index: 60; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.tabbar { display: none; }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  :root { --pad: 24px; }
  .main-nav { gap: 22px; }
  .perk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  /* 오른쪽 영역은 숨기고, 맞춤 핫딜 찾기만 '필터' 버튼으로 여는 서랍이 된다 */
  .side { display: contents; }
  .side > :not(.filters) { display: none; }
  .tool-btn.filter-btn { display: inline-flex; }
  .filters { position: fixed; top: 0; right: 0; bottom: 0; z-index: 50; width: min(380px, 100vw); display: flex; flex-direction: column; border: 0; border-radius: 0; box-shadow: -8px 0 28px rgba(0, 0, 0, .35); transform: translateX(100%); visibility: hidden; transition: transform .25s ease, visibility .25s; padding-bottom: env(safe-area-inset-bottom); }
  .filters.open { transform: none; visibility: visible; }
  .f-head { padding-top: env(safe-area-inset-top); }
  .f-close { display: inline-grid; }
  .f-body { flex: 1; overflow-y: auto; }
  .detail-band { grid-template-columns: 200px minmax(0, 1fr); gap: 28px 32px; }
  .detail-buy { grid-column: 1 / -1; justify-items: stretch; text-align: left; }
  .d-price { justify-content: flex-start; }
}
/* 휴대폰 · 설치 앱: 머리 메뉴 대신 하단 탭바, 상품 화면에는 고정 구매 바 */
@media (max-width: 640px) {
  :root { --header-h: 57px; --pad: 16px; }
  .header-row { gap: 10px; height: 56px; }
  .logo img { height: 24px; }
  .main-nav, .hide-m { display: none; }
  .search { max-width: none; height: 36px; }
  .install-btn { margin-right: 0; padding: 0 8px; }
  .header-actions .icon-btn { width: 38px; }
  main.wrap { padding-top: 24px; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .sec { margin-top: 52px; }
  .sec-head h2, .feed-head h2 { font-size: 19px; }
  .sec-head h2 small { display: block; margin: 4px 0 0; font-size: 12.5px; }
  .rn { font-size: 27px; }
  .perk-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .pbox { padding: 18px 18px 10px; }
  .attend { padding-bottom: 18px; }
  .page-head { margin-bottom: 24px; }
  .page-head h1 { font-size: 22px; }
  .page-head .crumbs { display: none; }
  .page-desc { margin-top: -8px; }
  .list-bar { flex-wrap: wrap; }
  .live { display: none; }
  .cat-tabs { flex-wrap: nowrap; margin: 14px calc(-1 * var(--pad)) 0; padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; }
  .cat-tabs::-webkit-scrollbar { display: none; }
  .cat-tab { flex: none; }
  .feed-tools { margin-top: 18px; }
  .tools-right { gap: 4px; }
  .tool-btn .ic { display: none; }
  .deal-list.list .deal, .rank-page .deal { grid-template-columns: 76px minmax(0, 1fr) auto; gap: 12px; padding: 14px; }
  .deal-list.compact .deal { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; padding: 12px; }
  /* 카드 안 폭이 좁으니 가격을 제목 아래로 내려 상품명 폭을 확보한다 */
  .deal-list.compact .deal-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: "src" "title" "price" "meta"; }
  .deal-list.compact .price-row { flex-direction: row; align-items: baseline; gap: 6px; text-align: left; }
  .deal-list.compact .title { -webkit-line-clamp: 2; }
  .deal-list.grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .detail-band { grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 20px; }
  .detail-info h1 { font-size: 19px; }
  .d-card { padding: 14px 0; }
  .d-card dd { font-size: 16px; }
  .detail-buy { position: relative; }
  .d-price strong { font-size: 25px; }
  .d-price .pct { font-size: 21px; }
  .d-btns { display: none; }
  .notice-box { padding: 20px; }
  .detail-tabs { margin-top: 32px; overflow-x: auto; grid-auto-columns: max-content; scrollbar-width: none; }
  .detail-tabs button { padding: 0 14px; font-size: 14px; }
  .block { padding: 40px 0; }
  .zup-card { grid-template-columns: minmax(0, 1fr); }
  .zup-score { justify-content: flex-start; padding: 16px 20px; }
  .zs-num { font-size: 36px; }
  .zup-main { padding: 16px 20px 20px; }
  .zup-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-row { grid-template-columns: 62px minmax(0, 1fr) 90px; }
  .compare th:nth-child(2), .compare td:nth-child(2), .compare th:nth-child(3), .compare td:nth-child(3) { display: none; }
  .notes a { grid-template-columns: auto minmax(0, 1fr) auto; }
  .notes a .muted { display: none; }
  /* 순위 숫자 칸과 사진을 줄여 제목 폭을 넓힌다 */
  .rank-page > li { grid-template-columns: 30px minmax(0, 1fr); }
  .rank-page .rn { font-size: 23px; letter-spacing: -1.5px; }
  .rank-page .deal { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; padding: 12px 10px 12px 12px; }
  .alert-box { padding: 20px; }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }

  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr); height: calc(58px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--bg); border-top: 1px solid var(--line); }
  .tabbar > * { position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; color: var(--text-3); font-size: 11px; font-weight: 700; }
  .tabbar .ic { width: 23px; height: 23px; }
  .tabbar [aria-current] { color: var(--text); }
  .tabbar [aria-current] .ic { stroke-width: 2.2; }
  .tabbar .badge { top: 5px; right: calc(50% - 22px); }
  body[data-route="deal"] .tabbar { display: none; }
  body[data-route="deal"] .buy-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--bg); border-top: 1px solid var(--line); }
  .buy-heart { display: grid; place-items: center; height: 50px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--bg); color: var(--text-2); }
  .buy-heart .ic { width: 23px; height: 23px; }
  .buy-bar .btn { height: 50px; font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

/* ==================== 디자인 v4 공통 (팝가 기준, 2026-11-11) ====================
   위쪽 규칙 위에 덮어쓴다: 제목 굵기·칩·태그·사진 칸·목록 줄·바닥글·탭바 */
body { color: var(--text); }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.2px; }
.sec-head h2 { font-size: 20px; line-height: 28px; }
.page-head h1 { font-size: 24px; font-weight: 700; }
/* 둥근 칩: 테두리 #d9dfe8, 고르면 진회색 바탕 (실시간 분류·인기 기간·혜택 종류·필터 칩 모두) */
.pills > *, .cat-tab, .fchip, .perk-tabs a { height: 36px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg); color: var(--text-2); font-size: 14px; font-weight: 400; }
.pills > :hover, .cat-tab:hover, .fchip:hover, .perk-tabs a:hover { border-color: var(--text-4); color: var(--text); }
.pills > [aria-pressed="true"], .cat-tab[aria-pressed="true"], .fchip[aria-pressed="true"], .perk-tabs a[aria-current] { border-color: transparent; background: var(--text); color: var(--bg); font-weight: 500; }
.cat-tab[aria-pressed="true"] span, .fchip[aria-pressed="true"] span, .perk-tabs a[aria-current] span { color: inherit; opacity: .7; }
.fchip { height: 32px; padding: 0 12px; font-size: 13.5px; }
.chip { border-radius: 999px; }
/* 태그 (팝가: 11px 회색) */
.tag { gap: 3px; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--soft); color: var(--text-3); font-size: 11px; font-weight: 500; letter-spacing: .01em; }
.tag.hot { background: var(--brand-weak); color: var(--brand-text); }
.tag img.cb { width: 12px; }
/* 사진 칸 (팝가: 테두리 1px·모서리 8px, 흰 바탕). 판매처 상품 사진은 잘라내지 않고 담고, 세로로 긴 캡처는 위쪽(상품 사진 자리)을 채운다 */
.ph { border-radius: var(--r); background: var(--ph); }
.ph:has(img) { padding: 0; border: 1px solid var(--line-2); background: var(--ph); }
.ph:has(img) img { border-radius: 0; object-fit: contain; }
.ph img.tall { object-fit: cover; object-position: center top; }
.ph.noimg { border: 1px solid var(--line-2); background: var(--bg-2); }
.ph-3d { width: 46%; height: 46%; object-fit: contain; }
.ph.noimg:has(.ph-3d)::after { content: none; }
:root[data-theme="dark"] .ph:has(img) { border-color: transparent; }
/* 목록 줄 (실시간·찜·인기): 카드 테두리 대신 구분선 */
.deal-list { gap: 0; }
.deal { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
.deal:hover { border-color: var(--line); }
.deal .title { font-size: 16px; font-weight: 500; line-height: 1.5; }
.source .com { color: var(--text-2); font-weight: 600; }
.price { font-weight: 700; }
.deal-list.compact .deal { padding: 14px 0; }
.deal-list.list .deal, .rank-page .deal { padding: 18px 0; }
.deal-list.grid { gap: 26px 14px; }
.deal-list.grid .deal { border: 0; overflow: visible; }
.deal-list.grid .ph { border-radius: var(--r); }
.deal-list.grid .deal-body { padding: 10px 2px 0; }
.rank-page { gap: 0; }
.t-hot { background: var(--brand-weak); color: var(--brand-text); }
/* 혜택 카드·상세 칸 */
.perk-card { border-color: var(--line-2); }
.detail-band { background: var(--bg-2); }
.btn { border-radius: 10px; }
.btn.primary { background: var(--brand); border-color: var(--brand); }
/* 바닥글 */
.site-footer { margin-top: 56px; padding: 36px 0 48px; border-top: 0; background: var(--bg-2); font-size: 12.5px; }
.foot-links { border-bottom-color: var(--line-2); }

/* ==================== 홈 (디자인 v5, 2026-11-12 사용자 승인 · 시안 design/site-v5/index.html) ====================
   연회색 바탕(--page) 위 흰 판(.hpanel)으로 구역을 나눈다. 선은 1px 반투명 두 단계(--hair 판 테두리·구역 선 / --hair-2 목록 사이).
   PC: 본문 + 오른쪽 320px 칸(키워드 알림·방금 올라온). 1100px 아래: 오른쪽 칸 대신 본문 사이 판. 640px 아래: 판은 화면 끝까지, 판 사이 8px 회색 띠 */
body[data-route="home"] { background: var(--page); }
body[data-route="home"] .site-footer { background: none; border-top: 1px solid var(--hair); }
main.wrap.is-home { max-width: 1184px; padding: 24px 24px 120px; }
.home5 { --hp: 28px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.h5-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; min-width: 0; }
.h5-side { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 16px; }
.hpanel { position: relative; padding: var(--hp); border-radius: var(--r-p); background: var(--panel); box-shadow: 0 0 0 1px var(--hair); }
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.hp-head h2 { font-size: 19px; line-height: 26px; font-weight: 700; letter-spacing: -0.03em; }
.hp-head .sub { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--text-3); }
.home5 .more { flex: none; gap: 2px; height: 32px; min-height: 0; padding: 0 8px 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--hair); font-size: 13px; font-weight: 600; color: var(--text-2); }
.home5 .more:hover { background: var(--fill); color: var(--text); }
.home5 .more .ic { color: var(--text-3); }
/* 판 바닥 띠: '6~10위 더 보기'·'모두 보기'는 판 안 마지막 줄로 (선 하나로 구분) */
.p-foot { display: flex; align-items: center; justify-content: center; gap: 4px; width: calc(100% + var(--hp) * 2); height: 54px; margin: 12px calc(var(--hp) * -1) calc(var(--hp) * -1); border: 0; border-top: 1px solid var(--hair); border-radius: 0 0 var(--r-p) var(--r-p); background: none; font-size: 14px; font-weight: 600; color: var(--text-2); }
.p-foot:hover { background: color-mix(in srgb, var(--fill) 60%, transparent); color: var(--text); }
.p-foot .ic { width: 18px; height: 18px; color: var(--text-3); transition: transform .2s; }
.p-foot.open .ic { transform: rotate(180deg); }
/* 정보 한 줄 · 가격 */
.h-meta { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; line-height: 16px; color: var(--text-3); white-space: nowrap; }
.h-meta img.cb { width: 14px; }
.h-src { overflow: hidden; text-overflow: ellipsis; }
.h-hot { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--brand-text); }
.h-hot .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.h-price { font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); }
.h-price em { margin-right: 4px; font-style: normal; color: var(--brand-text); }
.h-price small { margin-left: 6px; font-size: 12px; font-weight: 500; letter-spacing: 0; color: var(--text-3); }
.live-dot { display: inline-block; width: 6px; height: 6px; flex: none; border-radius: 3px; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-weak); }
.home5 .pills > * { height: 34px; border: 0; box-shadow: inset 0 0 0 1px var(--hair); background: none; font-weight: 500; }
.home5 .pills > :hover { background: var(--fill); color: var(--text); }
.home5 .pills > [aria-pressed="true"] { box-shadow: none; background: var(--on-bg); color: var(--on-ink); font-weight: 600; }

/* ① 오늘의 핫딜 TOP 5: 큰 사진 + 정보 + 판 바닥의 다섯 칸 고르기 (흐림·자동 넘김 없이) */
.top-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.top-head h2 { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 700; letter-spacing: -0.03em; }
.top-head h2 img { width: 22px; height: 22px; }
.stamp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.top5 { display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 28px; }
.top-pic { position: relative; }
.rank-badge { position: absolute; left: 10px; top: 10px; z-index: 3; display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: rgba(25, 31, 40, .88); color: #fff; font-size: 12px; font-weight: 700; }
.top-info { display: flex; flex-direction: column; min-width: 0; padding-top: 2px; }
.top-info h3 { margin-top: 8px; font-size: 21px; line-height: 29px; font-weight: 700; letter-spacing: -0.03em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.top-info h3 a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--text-4); }
.top-info .h-price { margin-top: 10px; font-size: 26px; line-height: 32px; font-weight: 800; }
.top-info .h-price small { font-size: 13px; }
.top-stats { display: flex; margin: 14px 0 0; }
.top-stats div { padding: 0 16px; border-left: 1px solid var(--hair); }
.top-stats div:first-child { padding-left: 0; border-left: 0; }
.top-stats dt { font-size: 12px; color: var(--text-3); }
.top-stats dd { margin: 1px 0 0; font-size: 14px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.top-act { display: flex; gap: 8px; margin-top: auto; padding-top: 18px; }
.top-act .btn.primary { flex: 1; height: 48px; border: 0; border-radius: 12px; background: var(--btn); }
.top-act .btn.primary:hover { filter: brightness(1.06); }
.top-heart { width: 48px; height: 48px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--hair); background: var(--panel); }
.top-heart:hover { background: var(--fill); }
.picker { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 24px calc(var(--hp) * -1) calc(var(--hp) * -1); padding: 14px calc(var(--hp) - 8px); border-top: 1px solid var(--hair); border-radius: 0 0 var(--r-p) var(--r-p); background: color-mix(in srgb, var(--fill) 45%, var(--panel)); }
.pick { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 12px; background: none; text-align: left; transition: background .15s, box-shadow .15s; }
.pick:hover { background: var(--panel); }
.pick .ph { border-radius: 8px; }
.pick b { display: block; font-size: 12px; line-height: 16px; font-weight: 700; color: var(--text-3); }
.pick > span:last-child > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pick.on { background: var(--panel); box-shadow: 0 0 0 1px var(--hair), 0 2px 8px rgba(15, 23, 42, .06); }
.pick.on b { color: var(--brand-text); }
.pick.on > span:last-child > span { color: var(--text); }

/* ② 분류 바로가기 */
.home5 .quick { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 18px 0; padding: 22px 12px; }
.q { display: flex; flex-direction: column; align-items: center; gap: 8px; border-radius: 12px; }
.q-ic { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: var(--fill); transition: transform .2s, background .15s; }
.q-ic img { width: 32px; height: 32px; object-fit: contain; }
.q:hover .q-ic { transform: translateY(-2px); background: var(--fill-2); }
.q > span:last-child { font-size: 12px; line-height: 16px; font-weight: 500; color: var(--text-2); white-space: nowrap; }

/* ③ 실시간 랭킹: 목록 선은 번호 칸 뒤에서 시작 */
.rank3 { margin: 6px 0 0; padding: 0; list-style: none; }
.rank3 li { position: relative; }
.rank3 li + li::before { content: ""; position: absolute; left: 36px; right: 0; top: 0; height: 1px; background: var(--hair-2); }
.rank3 li.extra { display: none; }
.rank3.open li.extra { display: block; }
.rrow { display: flex; align-items: center; gap: 4px; }
.rrow > a { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; padding: 14px 0; }
.rrow .no { width: 22px; flex: none; text-align: center; font-size: 17px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.rrow .no.top3 { color: var(--brand-text); }
.rrow .ph { width: 72px; flex: none; border-radius: 8px; }
.rrow .txt { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.rrow .t { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rrow .p { font-size: 16px; line-height: 22px; }
.rrow .heart { width: 40px; height: 40px; color: var(--text-4); }

/* 키워드 알림 판: 그 자리에서 등록 */
.kw5-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kw5 h2 { font-size: 17px; line-height: 25px; font-weight: 700; letter-spacing: -0.03em; }
.kw5 p { margin: 4px 0 0; font-size: 13px; line-height: 19px; color: var(--text-3); }
.kw5-top img { width: 44px; height: 44px; flex: none; }
.kw5-form { display: flex; gap: 6px; margin-top: 16px; }
.kw5-form input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--fill); font-size: 14px; color: var(--text); outline: 0; transition: box-shadow .15s, background .15s; }
.kw5-form input:focus { background: var(--panel); box-shadow: inset 0 0 0 1.5px var(--text); }
.kw5-form input::placeholder { color: var(--text-3); }
.kw5-form button { flex: none; height: 44px; padding: 0 16px; border: 0; border-radius: 8px; background: var(--btn); color: #fff; font-size: 14px; font-weight: 700; }
.kw5-form button:hover { filter: brightness(1.06); }
.kw5-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hair-2); }
.kw5-tags:empty { display: none; }
.kw5-tags > span { margin-right: 2px; font-size: 12px; color: var(--text-3); }
.kw5-tags button, .kw5-tags a { display: inline-flex; align-items: center; gap: 3px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: none; box-shadow: inset 0 0 0 1px var(--hair); font-size: 13px; color: var(--text-2); }
.kw5-tags button:hover { background: var(--fill); }
.kw5-tags .ic { width: 13px; height: 13px; stroke-width: 2.2; }
.kw5-tags .mine { background: var(--brand-weak); box-shadow: none; color: var(--brand-text); font-weight: 600; }
.kw-main { display: none; }

/* ④ 지금 뜨는 핫딜: 3열 카드, 하트는 사진 위 흰 동그라미 */
.hgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 16px; margin-top: 18px; }
.hcard { position: relative; min-width: 0; }
.hcard > a { display: flex; flex-direction: column; gap: 4px; }
.hcard .ph { margin-bottom: 8px; }
.hcard .t { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hcard .p { margin-top: 2px; font-size: 17px; line-height: 24px; }
.heart.over { position: absolute; top: 8px; right: 8px; z-index: 2; width: 34px; height: 34px; border-radius: 17px; background: rgba(255, 255, 255, .94); box-shadow: 0 1px 3px rgba(15, 23, 42, .12); color: #8b95a1; }
.heart.over .ic { width: 18px; height: 18px; }
.heart.over:hover { background: #fff; color: #4e5968; }
.heart.over.on { color: var(--brand); }

/* ⑤ 방금 올라온 핫딜: PC 는 오른쪽 칸 목록, 좁은 화면은 옆으로 넘기는 카드 */
.feed5 .hp-head { margin-bottom: 4px; }
.feed5 .hp-head h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.feed5 ol { margin: 0; padding: 0; list-style: none; }
.feed5 li a { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; padding: 11px 0; }
.feed5 li + li a { border-top: 1px solid var(--hair-2); }
.feed5 time { padding-top: 1px; font-size: 12px; font-weight: 600; color: var(--text-3); font-variant-numeric: tabular-nums; }
.feed5 .fi { min-width: 0; }
.feed5 .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); }
.feed5 a:hover .t { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--text-4); }
.feed5 .p { display: block; margin-top: 2px; font-size: 13px; }
.feed5 .p small { font-size: 12px; }
.feed5 .p-foot { margin-top: 8px; height: 50px; font-size: 13px; }
.recent-main { display: none; }
.hscroll { display: grid; grid-auto-flow: column; grid-auto-columns: 140px; gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.hscroll::-webkit-scrollbar { display: none; }
.mini { display: flex; flex-direction: column; gap: 3px; min-width: 0; scroll-snap-align: start; }
.mini .ph { margin-bottom: 6px; }
.mini .t { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mini .p { font-size: 15px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.mini .new { margin-left: 2px; color: var(--brand-text); font-size: 12px; font-weight: 700; }

/* ⑥ 혜택: 회색 바탕 탭 + 아이콘 목록 */
.seg5 { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--fill); }
.seg5 button { height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: none; font-size: 13px; font-weight: 600; color: var(--text-2); }
.seg5 button:hover { color: var(--text); }
.seg5 button[aria-pressed="true"] { background: var(--seg-on); color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.perk5 { margin: 8px 0 0; padding: 0; list-style: none; }
.perk5 li a, .perk5 .empty-line { display: flex; align-items: center; gap: 14px; padding: 13px 0; }
.perk5 li + li a { border-top: 1px solid var(--hair-2); }
.perk5 .empty-line { font-size: 14px; color: var(--text-3); }
.perk5 .pk-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--fill); }
.perk5 .pk-ic img { width: 28px; height: 28px; }
.perk5 .txt { flex: 1; min-width: 0; }
.perk5 .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--text); }
.perk5 .h-meta { margin-top: 2px; }
.perk5 .go { flex: none; display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px; box-shadow: inset 0 0 0 1px var(--hair); font-size: 13px; font-weight: 600; color: var(--text-2); }
.perk5 a:hover .go { background: var(--fill); }

/* 데이터를 받기 전 화면 틀 (main.js 처음 그리기): 반짝이는 회색 칸 */
.skel { max-width: 750px; margin: 0 auto; }
.sk { display: block; border-radius: var(--r); background: linear-gradient(90deg, var(--soft) 25%, var(--bg-2) 50%, var(--soft) 75%); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.sk-hero { width: min(390px, 100%); aspect-ratio: 1; margin: 5px auto 0; }
.sk-quick { display: grid; grid-template-columns: repeat(7, 1fr); justify-items: center; margin: 30px 0 44px; }
.sk-quick .sk { width: 52px; height: 52px; border-radius: 18px; }
.sk-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.sk-ph { width: 92px; height: 92px; flex: none; }
.sk-row span { display: grid; gap: 8px; flex: 1; }
.sk-t { width: 80%; height: 18px; }
.sk-s { width: 40%; height: 14px; }
.sk-h1 { width: 200px; height: 30px; margin: 8px 0 36px; }

/* 혜택 페이지 매일 출석 */
.perk-attend { max-width: 420px; margin: 0 0 24px; }
.pbox { background: var(--bg-2); border: 1px solid var(--line); }

/* ==================== 디자인 v5 공통 (2026-11-12): 머리 띠 · 사진 칸 — 모든 화면 ==================== */
/* 머리: 흰 띠 + 아래 가는 선(반투명 흐림), 로고 옆 메뉴, 검색칸 모양 버튼(누르면 머리 아래 검색창), 진한 '알림 설정' 버튼 */
.site-header { background: color-mix(in srgb, var(--panel) 94%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-radius: 0; border-bottom: 1px solid var(--hair); }
.header-row { display: flex; gap: 28px; max-width: 1184px; height: 64px; margin: 0 auto; padding: 0 24px; }
.main-nav { gap: 22px; }
.main-nav a { justify-content: center; min-width: 32px; font-size: 15px; font-weight: 600; }
.main-nav a[aria-current]::after { left: 0; right: 0; bottom: -1px; width: auto; height: 2px; margin: 0; border-radius: 2px 2px 0 0; }
.header-actions { flex: 1; justify-content: flex-end; min-width: 0; }
.search-pill { display: flex; align-items: center; gap: 8px; flex: 0 1 300px; min-width: 0; height: 40px; margin-right: 8px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--fill); color: var(--text-3); font-size: 14px; text-align: left; }
.search-pill .ic { width: 18px; height: 18px; }
.search-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-pill:hover, .search-pill[aria-expanded="true"] { background: var(--fill-2); color: var(--text-2); }
.icon-btn { border-radius: 10px; color: var(--text-2); }
.icon-btn:hover { background: var(--fill); }
.hd-text { display: inline-flex; align-items: center; height: 36px; margin-left: 8px; padding: 0 14px; border-radius: 999px; background: var(--on-bg); color: var(--on-ink); font-size: 13px; font-weight: 600; }
.hd-text:hover { color: var(--on-ink); opacity: .88; }
/* 사진 칸: 연회색 바탕에 흰 배경 사진을 곱하기로 녹이고, 안쪽 가는 테두리로 가장자리를 잡는다 */
.ph { isolation: isolate; }
.ph:has(img) { border: 0; outline: 1px solid rgba(15, 23, 42, .05); outline-offset: -1px; }
.ph:has(img) img { mix-blend-mode: multiply; }
.ph .ph-3d { mix-blend-mode: normal; }
.ph.noimg { border: 0; outline: 0; background: var(--fill); }
:root[data-theme="dark"] .ph:has(img) img { filter: brightness(.94); }

@media (max-width: 1099px) {
  .home5 { grid-template-columns: minmax(0, 1fr); max-width: 820px; margin: 0 auto; }
  .h5-side { display: none; }
  .kw-main, .recent-main { display: block; }
}
/* 휴대폰: 판은 화면 끝까지, 판 사이는 8px 회색 띠 */
@media (max-width: 640px) {
  .header-row { gap: 10px; height: 56px; padding: 0 8px 0 16px; }
  .logo { font-size: 20px; gap: 5px; }
  .logo-ic { width: 26px; height: 26px; }
  .search { height: 48px; }
  .search-pill { flex: 1 1 auto; height: 38px; margin-right: 2px; padding: 0 12px; }
  .header-actions .hd-text { display: none; }
  main.wrap.is-home { padding: 0 0 calc(96px + env(safe-area-inset-bottom)); }
  .home5 { --hp: 16px; gap: 0; }
  .h5-main { gap: 8px; }
  .hpanel { padding: 24px 16px; border-radius: 0; box-shadow: none; }
  .h5-main > .hpanel:first-child { padding-top: 16px; }
  .p-foot, .picker { border-radius: 0; }
  .top-head { margin-bottom: 14px; }
  .top5 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .top-pic .ph { aspect-ratio: 4 / 3; }
  .top-info { margin-top: 16px; }
  .top-info h3 { font-size: 19px; line-height: 27px; }
  .top-info .h-price { font-size: 23px; line-height: 30px; }
  .picker { gap: 4px; margin-top: 20px; padding: 10px 12px; }
  .pick { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 6px; text-align: center; }
  .pick > span:last-child > span { display: none; }
  .home5 .quick { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 68px; gap: 18px 4px; padding: 22px 16px; overflow-x: auto; scrollbar-width: none; }
  .home5 .quick::-webkit-scrollbar { display: none; }
  .hp-head h2 { font-size: 18px; }
  .rank3 li + li::before { left: 34px; }
  .rrow > a { gap: 12px; }
  .rrow .ph { width: 64px; }
  .rrow .t, .hcard .t { font-size: 14.5px; }
  .hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 10px; }
  .home5 .pills, .hscroll { margin: 0 -16px; padding: 0 16px; scroll-padding: 0 16px; }
  .perk5 .go { display: none; }
  .kw5-form input { font-size: 16px; }   /* 아이폰은 16px 보다 작은 입력칸을 누르면 화면을 확대한다 */
  .sk-hero { width: calc(100% + 32px); margin: -24px -16px 0; border-radius: 0; }
  .sk-quick { grid-template-columns: repeat(5, 1fr); }
  .sk-quick .sk:nth-child(n+6) { display: none; }
  .sk-ph { width: 76px; height: 76px; }
  .tabbar { background: color-mix(in srgb, var(--panel) 94%, transparent); -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px); border-top-color: var(--hair); }
  .tabbar > * { font-weight: 500; color: var(--text-3); }
  .tabbar [aria-current] { color: var(--text); font-weight: 600; }
}

/* ---------- 게시판 (2026-11-12): 공지사항·개선 요청 /board ---------- */
.foot-blog { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.foot-blog a { color: var(--text-2); }
.foot-blog a:hover { color: var(--text); }
.bd-form { display: grid; gap: 14px; margin: 0 0 28px; padding: 24px; border: 1px solid var(--hair); border-radius: var(--r-p); background: var(--panel); }
.bd-form h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.bd-fields { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.bd-form label { display: grid; gap: 6px; }
.bd-form label > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.bd-form input, .bd-form textarea { width: 100%; min-width: 0; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: var(--fill); color: var(--text); font: inherit; font-size: 15px; line-height: 1.5; }
.bd-form input { height: 46px; }
.bd-form textarea { resize: vertical; min-height: 120px; }
.bd-form input::placeholder, .bd-form textarea::placeholder { color: var(--text-3); }
.bd-form input:focus, .bd-form textarea:focus { outline: none; border-color: var(--text-3); background: var(--panel); }
.bd-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bd-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bd-count { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bd-form .btn.primary { height: 46px; padding: 0 22px; background: var(--btn); border-color: var(--btn); }
.bd-form .btn[disabled] { opacity: .55; cursor: default; }
.board-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hair); border-radius: var(--r-p); background: var(--panel); overflow: hidden; }
.board-list > li + li { border-top: 1px solid var(--hair-2); }
.board-list summary { display: grid; grid-template-columns: auto minmax(0, 1fr) auto 16px; align-items: center; gap: 12px; min-height: 60px; padding: 14px 22px; cursor: pointer; list-style: none; }
.board-list summary::-webkit-details-marker { display: none; }
.board-list summary:hover { background: color-mix(in srgb, var(--fill) 55%, var(--panel)); }
.board-list summary:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.board-list summary strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15.5px; font-weight: 600; letter-spacing: -0.02em; }
.bd-date { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bd-chev { width: 16px; height: 16px; color: var(--text-3); transition: transform .2s; }
.board-list details[open] .bd-chev { transform: rotate(180deg); }
.bd-badge { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 7px; background: var(--fill); font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; }
.bd-badge.pin { background: var(--brand-weak); color: var(--brand-text, var(--brand)); }
.bd-badge.st-ing { background: #eaf2ff; color: #1b64da; }
.bd-badge.st-done { background: #e8f7ee; color: #0f7a3d; }
.bd-badge.st-hold { color: var(--text-3); }
:root[data-theme="dark"] .bd-badge.st-ing { background: rgba(80, 140, 255, .16); color: #8db6ff; }
:root[data-theme="dark"] .bd-badge.st-done { background: rgba(40, 180, 100, .16); color: #6fd99b; }
.bd-body { padding: 4px 22px 22px; font-size: 15px; line-height: 1.75; color: var(--text-2); overflow-wrap: anywhere; }
.bd-reply { margin-top: 16px; padding: 14px 16px; border-radius: 12px; background: var(--fill); }
.bd-reply b { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.bd-reply b time { font-weight: 500; color: var(--text-3); }
.bd-reply p { margin: 6px 0 0; font-size: 14.5px; }
@media (max-width: 640px) {
  .bd-form { padding: 18px; border-radius: 16px; }
  .bd-fields { grid-template-columns: 1fr; }
  .board-list { border-radius: 16px; }
  .board-list summary { grid-template-columns: auto minmax(0, 1fr) 16px; gap: 6px 10px; padding: 14px 16px; }
  .board-list summary .bd-date { grid-column: 2; grid-row: 2; }
  .board-list summary .bd-chev { grid-column: 3; grid-row: 1 / span 2; }
  .bd-body { padding: 2px 16px 18px; }
}

/* ---------- 구글 로그인·내 정보·개인정보처리방침 (2026-11-12) ---------- */
.acct-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; margin-left: 8px; padding: 0 14px; border-radius: 999px; background: var(--on-bg); color: var(--on-ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.acct-btn:hover { opacity: .88; }
.acct-btn .ic { display: none; }
.acct-btn.in { width: 36px; padding: 0; background: none; }
.acct-av { display: block; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--hair); }
.acct-av.av-text { display: grid; place-items: center; background: var(--brand-weak); color: var(--brand-text); font-size: 14px; font-weight: 700; }
.acct-av.lg { width: 56px; height: 56px; font-size: 22px; }
@media (max-width: 640px) {
  .acct-btn { width: 40px; height: 40px; margin-left: 0; padding: 0; border-radius: 10px; background: none; color: var(--text-2); }
  .acct-btn .ic { display: block; }
  .acct-btn span { display: none; }
  .acct-btn.in { width: 40px; }
  .acct-btn .acct-av { width: 28px; height: 28px; }
  .has-acct #themeBtn { display: none; }
}
.acct-card { margin: 0 0 16px; padding: 28px; border: 1px solid var(--hair); border-radius: var(--r-p); background: var(--panel); }
.acct-login { max-width: 520px; margin: 8px auto 24px; padding: 40px 36px 32px; text-align: center; }
.acct-hero { display: block; width: 56px; height: 56px; margin: 0 auto 14px; }
.acct-login h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.acct-sub { margin: 6px 0 0; font-size: 14.5px; color: var(--text-3); }
.acct-perks { display: grid; gap: 4px; margin: 28px 0; padding: 0; list-style: none; text-align: left; }
.acct-perks li { display: flex; gap: 14px; padding: 14px 4px; }
.acct-perks li + li { border-top: 1px solid var(--hair-2); }
.ap-ic { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; background: var(--fill); color: var(--text-2); }
.ap-ic .ic { width: 20px; height: 20px; }
.acct-perks b { display: block; font-size: 15px; font-weight: 600; letter-spacing: -0.02em; }
.acct-perks p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-3); }
.g-btn { display: flex; justify-content: center; min-height: 44px; }
.acct-wait { margin: 0; padding: 12px; border-radius: 12px; background: var(--fill); font-size: 14px; color: var(--text-3); }
.acct-fine { margin: 18px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--text-3); }
.acct-fine a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.acct-prof { display: flex; align-items: center; gap: 16px; }
.acct-id { display: grid; gap: 3px; min-width: 0; }
.acct-id b { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.acct-id span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; color: var(--text-3); }
.acct-sync { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.acct-sync i { width: 6px; height: 6px; border-radius: 3px; background: #22a55b; box-shadow: 0 0 0 3px rgba(34, 165, 91, .16); }
.acct-stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 24px; border-top: 1px solid var(--hair-2); }
.acct-stats a { display: grid; gap: 4px; padding: 18px 4px 0; text-align: center; }
.acct-stats a + a { border-left: 1px solid var(--hair-2); }
.acct-stats span { font-size: 12.5px; color: var(--text-3); }
.acct-stats b { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.acct-stats a:hover b { color: var(--brand-text); }
.acct-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 28px; }
.acct-h { font-size: 15px; font-weight: 600; }
.acct-actions { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 0; }
.policy { max-width: 760px; font-size: 15px; line-height: 1.75; color: var(--text-2); }
.policy-lead { margin: 0 0 8px; color: var(--text); }
.policy section { padding: 22px 0; border-bottom: 1px solid var(--hair-2); }
.policy h2 { margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--text); }
.policy ul { margin: 0; padding-left: 18px; }
.policy p { margin: 0 0 6px; }
.policy b { color: var(--text); font-weight: 600; }
.policy a { color: var(--text); text-decoration: underline; text-underline-offset: 2px; }
.policy-date { margin-top: 20px; font-size: 13px; color: var(--text-3); }
@media (max-width: 640px) {
  .acct-card { padding: 20px; border-radius: 16px; }
  .acct-login { padding: 32px 20px 24px; }
  .acct-prof { flex-wrap: wrap; }
  .acct-sync { margin-left: 72px; }
  .acct-stats { grid-template-columns: repeat(2, 1fr); }
  .acct-stats a:nth-child(3) { border-left: 0; }
  .acct-stats a:nth-child(n+3) { padding-top: 16px; }
  .acct-row { flex-direction: column; align-items: flex-start; padding: 18px 20px; }
}

/* 구글 버튼(iframe)은 밝은 화면용이라, 다크 화면에서 흰 바탕 네모가 생기지 않게 */
.g-btn iframe { color-scheme: normal; }

/* ---------- 핫딜 포인트 쓰기 (2026-11-12, 혜택 화면 출석 옆) ---------- */
.perk-attend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 880px; }
.pshop { padding-bottom: 14px; }
.pshop .pbox-head b { color: var(--brand-text); font-weight: 700; }
.pshop ul { list-style: none; margin: 4px 0 0; padding: 0; }
.pshop li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.pshop li + li { border-top: 1px solid var(--hair-2); }
.ps-ic { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--fill); color: var(--text-2); }
.ps-ic .ic { width: 18px; height: 18px; }
.ps-t { display: grid; gap: 2px; flex: 1; min-width: 0; }
.ps-t b { font-size: 14px; font-weight: 600; }
.ps-t span { font-size: 12.5px; color: var(--text-3); }
.pshop .btn { flex: none; min-width: 64px; font-variant-numeric: tabular-nums; }
.pshop .btn.primary { background: var(--btn); border-color: var(--btn); }
.pshop .btn[disabled] { opacity: .5; cursor: default; }
@media (max-width: 760px) { .perk-attend { grid-template-columns: 1fr; } }
