/* ============================================================
   노리유머 / 노리핫딜 리뉴얼 공통 스타일 (renewal2.css)
   - 모바일 우선, 900px 이상에서 데스크톱 테이블형 레이아웃
   ============================================================ */

:root{
  --bg:#f5f6fa;
  --card:#ffffff;
  --line:#e8eaf0;
  --text:#1b1d23;
  --muted:#7b8194;
  --accent:#6c5ce7;          /* humor 기본 */
  --accent-soft:#efedff;
  --price:#e5484d;
  --radius:16px;
  --shadow:0 1px 2px rgba(16,24,40,.04), 0 8px 24px rgba(16,24,40,.06);
  --max:1120px;
}

body.accent-hotdeal{ --accent:#ff6b35; --accent-soft:#fff0e8; }

*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; background:var(--bg); color:var(--text); overflow-x:hidden;
  font-family:"Pretendard","Apple SD Gothic Neo","Malgun Gothic",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;
  font-size:16px; line-height:1.55;
}
a{ color:inherit; text-decoration:none; }
img{ max-width:100%; display:block; }
button{ font:inherit; cursor:pointer; }
.wrap{ width:100%; max-width:var(--max); margin:0 auto; padding:0 20px; }

/* ---------------- header ---------------- */
.hd{
  position:sticky; top:0; z-index:40;
  background:rgba(255,255,255,.86);
  backdrop-filter:saturate(180%) blur(14px);
  border-bottom:1px solid var(--line);
}
.hd-in{ display:flex; align-items:center; justify-content:space-between; height:64px; gap:12px; }
.brand{ display:flex; align-items:center; gap:10px; font-weight:800; font-size:20px; letter-spacing:-.02em; white-space:nowrap; }
.brand .mark{
  width:32px; height:32px; border-radius:10px;
  background:linear-gradient(135deg,var(--accent),#9d8bff);
  display:grid; place-items:center; color:#fff; font-size:15px; font-weight:900;
  box-shadow:0 6px 16px rgba(108,92,231,.35);
}
body.accent-hotdeal .brand .mark{ background:linear-gradient(135deg,#ff6b35,#ffa06b); box-shadow:0 6px 16px rgba(255,107,53,.35); }
.hd-links{ display:flex; align-items:center; gap:18px; font-size:14px; color:var(--muted); }
.hd-links a:hover{ color:var(--accent); }

/* ---------------- page head ---------------- */
.page-head{ padding:28px 0 6px; }
.page-head h1{ margin:0 0 6px; font-size:28px; letter-spacing:-.03em; }
.page-head .lede{ margin:0; color:var(--muted); font-size:13.5px; line-height:1.7; max-width:760px; }

/* ---------------- toolbar ---------------- */
.toolbar{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin:18px 0 0; }
.search{ display:flex; flex:1 1 320px; min-width:0; background:var(--card); border:1px solid var(--line);
  border-radius:12px; overflow:hidden; box-shadow:var(--shadow); }
.search input{ flex:1; min-width:0; border:0; outline:0; padding:12px 14px; font-size:15px; background:transparent; }
.search button{ border:0; background:var(--accent); color:#fff; padding:0 20px; font-weight:700; font-size:14px; }
.search button:hover{ filter:brightness(1.05); }
.tool-right{ display:flex; align-items:center; gap:8px; }
.select-wrap{ display:flex; align-items:center; gap:6px; background:var(--card); border:1px solid var(--line);
  border-radius:12px; padding:0 10px; height:44px; box-shadow:var(--shadow); }
.select-wrap select{ border:0; background:transparent; outline:0; font-size:14px; color:var(--text); }
.btn-ghost{ display:inline-flex; align-items:center; gap:6px; height:44px; padding:0 14px; border-radius:12px;
  background:var(--card); border:1px solid var(--line); color:var(--muted); font-size:14px; box-shadow:var(--shadow); }
.btn-ghost:hover{ color:var(--accent); border-color:var(--accent); }
.btn-ghost svg{ width:16px; height:16px; }

/* ---------------- category chips ---------------- */
.chips{ display:flex; gap:8px; overflow-x:auto; padding:14px 0 2px; scrollbar-width:none; }
.chips::-webkit-scrollbar{ display:none; }
.chip{ flex:0 0 auto; padding:9px 16px; border-radius:999px; background:var(--card); border:1px solid var(--line);
  font-size:14px; font-weight:600; color:var(--muted); white-space:nowrap; }
.chip:hover{ border-color:var(--accent); color:var(--accent); }
.chip.active{ background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:0 6px 16px rgba(108,92,231,.25); }
body.accent-hotdeal .chip.active{ box-shadow:0 6px 16px rgba(255,107,53,.25); }

/* ---------------- list meta ---------------- */
.list-meta{ display:flex; align-items:center; justify-content:space-between; margin:18px 0 10px; font-size:13.5px; color:var(--muted); }
.list-meta b{ color:var(--text); font-size:15px; }

/* ---------------- list ---------------- */
.list{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); }
.list-head{ display:none; }

.item{ display:grid; grid-template-columns:92px 1fr; gap:14px; padding:14px 16px; border-bottom:1px solid var(--line);
  position:relative; transition:background .15s ease; }
.item:last-child{ border-bottom:0; }
.item:hover{ background:#fafbff; }
body.accent-hotdeal .item:hover{ background:#fffaf6; }

.item .thumb{ position:relative; width:92px; height:92px; border-radius:12px; overflow:hidden; background:#f0f2f7;
  display:grid; place-items:center; }
.item .thumb img{ width:100%; height:100%; object-fit:cover; }
.item .thumb .ph{ color:#b8bdcb; font-size:11px; letter-spacing:.08em; }
.item .no-badge{ position:absolute; top:6px; left:6px; z-index:2; min-width:22px; height:22px; padding:0 6px;
  border-radius:999px; background:rgba(17,19,24,.62); color:#fff; font-size:11px; font-weight:700;
  display:grid; place-items:center; }

.item .body{ min-width:0; display:flex; flex-direction:column; gap:8px; }
.item .title{ font-size:15.5px; font-weight:600; letter-spacing:-.01em; line-height:1.42;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  overflow-wrap:anywhere; word-break:break-word; }
.item .title:hover{ color:var(--accent); }
.item .sub{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; font-size:12.5px; color:var(--muted); }
.item .shop{ display:inline-flex; align-items:center; gap:6px; }
.item .shop img{ height:18px; width:auto; border-radius:4px; object-fit:contain; background:#fff; }
.item .shop .shop-name{ font-size:12px; color:var(--muted); }
.item .price{ font-weight:800; font-size:15px; color:var(--price); letter-spacing:-.01em; }
.item .date{ font-variant-numeric:tabular-nums; }

/* ---------------- paging ---------------- */
.pager{ display:flex; align-items:center; justify-content:center; gap:10px; margin:22px 0 8px; flex-wrap:wrap; }
.paging{ display:flex; align-items:center; gap:6px; list-style:none; margin:0; padding:0; }
.paging li{ list-style:none; }
.paging a{ display:grid; place-items:center; min-width:36px; height:36px; padding:0 8px; border-radius:10px;
  background:var(--card); border:1px solid var(--line); font-size:13px; font-weight:600; color:var(--muted); cursor:pointer; }
.paging a:hover{ border-color:var(--accent); color:var(--accent); }
.paging a.active{ background:var(--accent); border-color:var(--accent); color:#fff; }
.paging i{ font-size:12px; }
.total-box{ font-size:13px; color:var(--muted); }
.total-box b{ color:var(--text); }

/* ---------------- empty ---------------- */
.empty{ padding:56px 16px; text-align:center; color:var(--muted); font-size:14px; }

/* ---------------- footer ---------------- */
footer{ margin-top:56px; background:#fff; border-top:1px solid var(--line); }
.ft-in{ display:grid; grid-template-columns:1fr; gap:18px; padding:34px 0 40px; font-size:12.5px; color:var(--muted); }
.ft-brand{ display:flex; align-items:center; gap:10px; }
.ft-brand img{ height:24px; width:auto; }
.ft-brand b{ color:var(--text); font-size:14px; }
.ft-links{ display:flex; flex-wrap:wrap; gap:14px; }
.ft-links a:hover{ color:var(--accent); }
.ft-info{ display:flex; flex-wrap:wrap; gap:6px 18px; line-height:1.7; }

/* ---------------- view page ---------------- */
.view-wrap{ padding:26px 0 10px; }
.crumbs{ display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); margin-bottom:14px; }
.crumbs a:hover{ color:var(--accent); }

.post{ background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
.post-head{ padding:22px 22px 18px; border-bottom:1px solid var(--line); }
.post-head h2{ margin:0 0 10px; font-size:22px; line-height:1.35; letter-spacing:-.02em; word-break:keep-all; }
.post-meta{ display:flex; flex-wrap:wrap; gap:8px; align-items:center; font-size:12.5px; color:var(--muted); }
.pill{ display:inline-flex; align-items:center; gap:6px; padding:5px 10px; border-radius:999px; background:var(--accent-soft);
  color:var(--accent); font-size:12px; font-weight:600; }
.pill.gray{ background:#f1f3f8; color:var(--muted); }
.post-price{ font-size:26px; font-weight:800; color:var(--price); letter-spacing:-.02em; margin-top:14px; }

.hero{ padding:0; background:#0f1115; }
.hero img{ width:100%; height:auto; max-height:640px; object-fit:contain; margin:0 auto; background:#0f1115; }

.section{ padding:22px; border-top:1px solid var(--line); }
.section h3{ margin:0 0 14px; font-size:15px; letter-spacing:-.01em; }
.section .desc{ font-size:14.5px; line-height:1.8; color:#3a3f4d; word-break:keep-all; }
.section .desc img{ border-radius:10px; margin:8px 0; }

.gallery{ display:grid; grid-template-columns:repeat(auto-fill,minmax(140px,1fr)); gap:10px; }
.gallery a{ display:block; border-radius:10px; overflow:hidden; background:#f0f2f7; }
.gallery img{ width:100%; height:140px; object-fit:cover; }

.chart-box{ position:relative; width:100%; }
.chart-box canvas{ width:100% !important; height:220px !important; }

.post-actions{ display:flex; justify-content:space-between; align-items:center; gap:10px; padding:18px 22px; border-top:1px solid var(--line); }
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:8px; height:44px; padding:0 20px; border-radius:12px;
  font-size:14px; font-weight:700; border:1px solid var(--line); background:#fff; color:var(--text); }
.btn.primary{ background:var(--accent); border-color:var(--accent); color:#fff; }
.btn.primary:hover{ filter:brightness(1.05); }
.btn:hover{ border-color:var(--accent); color:var(--accent); }
.btn.primary:hover{ color:#fff; }

.related{ margin-top:34px; }
.related h3{ font-size:17px; margin:0 0 14px; letter-spacing:-.02em; }

/* ---------------- mobile header ---------------- */
@media (max-width:899px){
  .hd-links{ display:none; }
  .hd-in{ height:56px; }
  .brand{ font-size:18px; }
  .brand .mark{ width:28px; height:28px; border-radius:9px; font-size:13px; }
}

/* ---------------- desktop ---------------- */
@media (min-width:900px){
  .page-head{ padding:40px 0 8px; }
  .page-head h1{ font-size:34px; }
  .page-head .lede{ font-size:14px; }

  .list{ border-radius:18px; }
  .list-head{
    display:grid; grid-template-columns:64px 96px 110px 1fr 130px 90px;
    align-items:center; gap:16px; padding:14px 20px; background:#fafbfe;
    border-bottom:1px solid var(--line); font-size:12.5px; font-weight:700; color:var(--muted);
    letter-spacing:.02em;
  }
  .list-head.humor{ grid-template-columns:64px 96px 1fr 90px; }
  .list-head > div:nth-child(5){ text-align:right; }
  .list-head > div:nth-child(6){ text-align:center; }

  .item{
    grid-template-columns:64px 96px 110px 1fr 130px 90px;
    align-items:center; gap:16px; padding:16px 20px;
  }
  .item.humor{ grid-template-columns:64px 96px 1fr 90px; }

  .item .thumb{ width:88px; height:88px; }
  .item .body{ display:contents; }        /* 데스크톱: 셀을 각각 배치 */
  .item .no-badge{ position:static; background:transparent; color:var(--muted); font-weight:600; font-size:13px; }
  .item .title{ grid-column:4; font-size:15px; }
  .item.humor .title{ grid-column:3; }
  .item .shop{ grid-column:3; }
  .item .price{ grid-column:5; text-align:right; }
  .item .date{ grid-column:6; text-align:center; }
  .item.humor .date{ grid-column:4; }
  .item .sub{ display:contents; }
  .item .thumb{ grid-column:2; grid-row:1; }
  .item .no-badge{ grid-column:1; grid-row:1; }

  .post-head{ padding:28px 30px 22px; }
  .post-head h2{ font-size:26px; }
  .section{ padding:26px 30px; }
  .post-actions{ padding:20px 30px; }
  .ft-in{ grid-template-columns:1fr 1fr; }
  .gallery img{ height:170px; }
}

@media (min-width:1100px){
  .ft-in{ grid-template-columns:1.2fr 1fr 1fr; }
}
