/* ============================================================
   아이랑 어디가? — styles
   Mobile first. Tablet ≥640px: 2 columns. Desktop ≥1024px: 3 columns.
   ============================================================ */

:root {
  --bg: #FFF9F2;
  --surface: #FFFFFF;
  --text: #2B2D42;
  --muted: #6B7084;
  --coral: #FF6B5E;          /* decorative fills, accents */
  --coral-ink: #C8372B;      /* coral text / solid buttons on white (≥4.5:1) */
  --coral-tint: #FFEDEA;
  --mint: #4DB6A4;
  --mint-ink: #1F7A6B;
  --mint-tint: #E3F5F1;
  --sunny: #FFC94D;
  --sunny-tint: #FFF3D1;
  --line: #F0E6DA;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(43, 45, 66, .04), 0 6px 20px rgba(43, 45, 66, .06);
  --shadow-lg: 0 10px 40px rgba(43, 45, 66, .18);
  --font: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--nav-h) + var(--safe-b));
}

html.is-locked, html.is-locked body { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--coral-ink); }
p { margin: 0; }
h1, h2, h3 { margin: 0; line-height: 1.3; }

:focus-visible {
  outline: 3px solid var(--coral-ink);
  outline-offset: 2px;
  border-radius: 8px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--text); color: #fff; padding: 10px 16px;
  border-radius: 999px; text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: calc(var(--gutter) + env(safe-area-inset-left, 0px));
  padding-right: calc(var(--gutter) + env(safe-area-inset-right, 0px));
}

/* ---------- Notice strip ---------- */
.notice {
  background: var(--sunny-tint);
  color: var(--text);
  font-size: 13px;
  text-align: center;
  padding: 6px var(--gutter);
  border-bottom: 1px solid #F5E2B0;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 249, 242, .94);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: "brand fav" "search search";
  gap: 8px 12px;
  align-items: center;
  padding-top: 10px; padding-bottom: 10px;
}
.brand {
  grid-area: brand;
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  min-height: 44px; min-width: 0;
}
.brand-mark { flex: none; border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; white-space: nowrap; }
.brand-tagline { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.search { grid-area: search; position: relative; margin: 0; }
.search-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 44px;
  padding: 0 16px 0 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 16px; /* prevents iOS zoom */
}
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { outline-offset: 0; border-color: transparent; border-radius: 999px; }

.fav-btn {
  grid-area: fav;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--coral-ink);
  font-weight: 700; font-size: 15px;
}
.fav-btn[aria-pressed="true"] { background: var(--coral-ink); border-color: var(--coral-ink); color: #fff; }
.fav-count {
  min-width: 22px; height: 22px; padding: 0 6px;
  display: inline-grid; place-items: center;
  border-radius: 999px; background: var(--coral-tint); color: var(--coral-ink);
  font-size: 13px; font-weight: 700;
}
.fav-btn[aria-pressed="true"] .fav-count { background: #fff; }

/* ---------- Hero ---------- */
.hero { padding-top: 22px; padding-bottom: 8px; }
.hero-date { color: var(--muted); font-size: 14px; font-weight: 500; }
.hero-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.quick {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px; margin-top: 16px;
}
.quick-btn {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  min-height: 88px; padding: 12px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  text-align: left;
  transition: border-color .15s, background-color .15s, transform .15s;
}
.quick-btn:active { transform: scale(.98); }
.quick-emoji { font-size: 24px; line-height: 1.1; }
.quick-label { font-weight: 700; font-size: 15px; line-height: 1.3; }
.quick-sub { font-size: 13px; color: var(--muted); line-height: 1.3; }
.quick-btn[aria-pressed="true"] {
  border-color: var(--coral-ink);
  background: var(--coral-tint);
}
.quick-btn[aria-pressed="true"] .quick-label { color: var(--coral-ink); }

/* ---------- Ads ---------- */
.ad-slot { margin: 16px 0 4px; }
.ad-slot--top { min-height: 96px; }
.ad-slot[hidden] { display: none; }
.ad-label {
  display: inline-block;
  font-size: 13px; font-weight: 700; line-height: 1;
  padding: 4px 8px; border-radius: 6px;
  background: #EFEAE3; color: var(--muted);
}
.ad {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  min-height: 96px; padding: 14px 16px;
  border: 1px dashed #E2D4C2; border-radius: var(--radius);
  background: var(--surface);
  color: var(--text); text-decoration: none;
}
.ad-img { width: 64px; height: 64px; flex: none; border-radius: 12px; object-fit: cover; background: var(--bg); }
.ad-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ad-title { font-weight: 700; font-size: 15px; line-height: 1.35; }
.ad-desc { font-size: 13px; color: var(--muted); }
.ad-cta {
  flex: none; align-self: center;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  border-radius: 999px; background: var(--sunny-tint); color: var(--text);
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.ad:hover .ad-cta { background: var(--sunny); }
.ad--raw { display: block; min-height: 96px; }
.ad--raw .ad-label { margin-bottom: 8px; }

/* feed ad card */
.ad-card {
  display: flex; flex-direction: column; gap: 10px;
  min-height: 100%; padding: 18px;
  border: 1px dashed #E2D4C2; border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, #FFFDF9 0 12px, #FFF8EE 12px 24px);
  color: var(--text); text-decoration: none;
}
.ad-card .ad-title { font-size: 17px; }
.ad-card .ad-cta { align-self: flex-start; margin-top: auto; }
.ad-card.ad--raw { min-height: 260px; }

/* detail affiliate box */
.ad-detail { display: grid; gap: 10px; margin-top: 20px; }
.ad-detail .ad { background: var(--bg); }

/* ---------- Filters ---------- */
.filters { padding-top: 12px; }
.chip-row {
  display: flex; gap: 8px;
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
  padding: 4px var(--gutter);
  scroll-padding: 0 var(--gutter);
}
.chip-row::-webkit-scrollbar { display: none; }
.chip-row > * { scroll-snap-align: start; flex: none; }
.gu-row { scroll-margin-top: 130px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 16px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--text);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: #E2D4C2; }
.chip-count { font-size: 13px; font-weight: 600; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.chip[aria-pressed="true"] .chip-count { color: #E6E7EE; }
.chip.is-zero:not([aria-pressed="true"]) { color: var(--muted); }

.cat-tabs { margin-top: 6px; }
.cat-tab {
  min-height: 44px; padding: 0 14px;
  border: 0; border-radius: 999px; background: transparent;
  font-size: 15px; font-weight: 600; color: var(--muted); white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.cat-tab[aria-pressed="true"] { background: var(--coral-tint); color: var(--coral-ink); font-weight: 700; }

.filter-bar { margin-top: 6px; }
.flag-chip {
  min-height: 44px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface);
  font-size: 14px; font-weight: 600; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.flag-chip[aria-pressed="true"] { background: var(--mint-tint); border-color: var(--mint); color: var(--mint-ink); }
.flag-chip[aria-pressed="true"]::before { content: "✓"; font-weight: 800; }
.flag-sep { width: 1px; align-self: stretch; margin: 8px 2px; background: var(--line); }

.sort { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.sort label { font-size: 14px; color: var(--muted); font-weight: 600; }
.sort select {
  min-height: 44px; padding: 0 38px 0 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%236B7084' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center / 18px;
  font-size: 15px; font-weight: 600;
  -webkit-appearance: none; appearance: none;
}

.result-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  min-height: 56px;
}
.result-text { font-weight: 700; font-size: 16px; }
.result-text .count { color: var(--coral-ink); }
.link-btn {
  min-height: 44px; padding: 0 4px;
  border: 0; background: none;
  color: var(--coral-ink); font-weight: 700; font-size: 14px;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ---------- Results ---------- */
.results { padding-top: 8px; padding-bottom: 32px; outline: none; }
.grid {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px;
  list-style: none; margin: 0; padding: 0;
}
.group + .group { margin-top: 32px; }
.group-title {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 20px; font-weight: 800; margin: 8px 0 12px;
}
.group-title .count { font-size: 14px; font-weight: 600; color: var(--muted); }

.fav-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0 16px;
}
.fav-header h2 { font-size: 20px; font-weight: 800; }
.fav-header[hidden] { display: none; }

/* ---------- Card ---------- */
.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(43,45,66,.05), 0 12px 28px rgba(43,45,66,.1); }
.card:focus-within { box-shadow: 0 0 0 3px var(--coral-ink), var(--shadow); }

.card-visual {
  position: relative;
  aspect-ratio: 2 / 1;
  display: grid; place-items: center;
  background: var(--cat-bg, #F4EEE6);
  overflow: hidden;
}
.card-emoji { font-size: 56px; line-height: 1; filter: drop-shadow(0 4px 8px rgba(43,45,66,.12)); }
/* 휴대폰에서는 카드 그림을 낮춰 한 화면에 더 많은 행사가 보이게 */
@media (max-width: 599px) {
  .card-visual { aspect-ratio: 5 / 2; }
  .card-emoji { font-size: 48px; }
}
.card-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-cat, .badge {
  position: absolute; z-index: 1;
  display: inline-flex; align-items: center;
  height: 28px; padding: 0 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700;
}
.card-cat { left: 12px; top: 12px; background: rgba(255,255,255,.92); color: var(--text); }
.badge { left: 12px; bottom: 12px; background: var(--text); color: #fff; }
.badge--live { background: #fff; color: var(--mint-ink); }
.badge--soon { background: #fff; color: var(--text); }
.badge--dday { background: var(--sunny); color: var(--text); }
.badge--today { background: var(--coral-ink); color: #fff; }

.fav-toggle {
  position: absolute; right: 8px; top: 8px; z-index: 3;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 0; border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: var(--muted);
  box-shadow: 0 2px 8px rgba(43,45,66,.12);
  transition: transform .15s;
}
.fav-toggle:active { transform: scale(.9); }
.fav-toggle svg path { fill: none; stroke: currentColor; stroke-width: 2; }
.fav-toggle[aria-pressed="true"] { color: var(--coral); }
.fav-toggle[aria-pressed="true"] svg path { fill: currentColor; stroke: currentColor; }

.card-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.card-title { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.card-open {
  all: unset;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden;
  cursor: pointer;
}
.card-open::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: var(--radius); }
.card-open:focus-visible { outline: none; }
.card-date { font-size: 14px; font-weight: 600; color: var(--text); margin-top: 2px; }
.card-place { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.price { font-size: 14px; font-weight: 600; color: var(--text); margin-right: 2px; }
.price-free {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; background: var(--mint-tint); color: var(--mint-ink);
  font-size: 13px; font-weight: 800;
}
.price-muted { color: var(--muted); font-weight: 500; }
.price-text { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 9px;
  border-radius: 999px; background: var(--bg); border: 1px solid var(--line);
  font-size: 13px; color: var(--muted); font-weight: 500;
}

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 48px 16px 56px; }
.empty[hidden] { display: none; }
.empty-emoji { font-size: 56px; }
.empty-title { font-size: 18px; font-weight: 800; margin-top: 8px; }
.empty-desc { color: var(--muted); margin: 6px 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text);
  font-weight: 700; font-size: 15px; text-decoration: none;
}
.btn-primary { background: var(--coral-ink); border-color: var(--coral-ink); color: #fff; }
.btn-primary:hover { background: #B32F24; }
.btn[aria-pressed="true"] { background: var(--coral-tint); border-color: var(--coral-ink); color: var(--coral-ink); }
.btn svg { flex: none; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 32px;
  color: var(--muted); font-size: 13px; line-height: 1.6;
}
.site-footer p + p { margin-top: 8px; }
.footer-name { color: var(--text); font-weight: 800; font-size: 15px; }
.footer-tagline { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 4px; }

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(3, 1fr);
  height: calc(var(--nav-h) + var(--safe-b));
  padding: 0 env(safe-area-inset-right, 0px) var(--safe-b) env(safe-area-inset-left, 0px);
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 20px rgba(43,45,66,.05);
}
.bottom-nav button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 44px; border: 0; background: none;
  color: var(--muted); font-size: 13px; font-weight: 600;
}
.bottom-nav button[aria-current="page"] { color: var(--coral-ink); }
.bottom-nav button:focus-visible { outline-offset: -4px; }
.nav-count {
  display: inline-block; margin-left: 3px;
  min-width: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--coral-ink); color: #fff; font-size: 13px; line-height: 18px;
}
.nav-count[hidden] { display: none; }

/* ---------- Detail sheet ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(43,45,66,.45); animation: fade .2s ease; }
.sheet-panel {
  position: relative;
  width: 100%; max-height: 92vh; max-height: 92dvh;
  overflow-y: auto; overscroll-behavior: contain;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: var(--shadow-lg);
  padding-bottom: calc(24px + var(--safe-b));
  animation: slide-up .26s cubic-bezier(.2,.8,.2,1);
  outline: none;
}
.sheet-panel::before {
  content: ""; display: block; width: 40px; height: 5px; border-radius: 999px;
  background: #E6DCCF; margin: 10px auto 0;
}
.sheet-close {
  position: absolute; right: 12px; top: 12px; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center;
  border: 0; border-radius: 999px; background: rgba(255,255,255,.92); color: var(--text);
  box-shadow: 0 2px 8px rgba(43,45,66,.12);
}
.sheet-visual {
  position: relative;
  height: 140px; margin: 12px 16px 0; border-radius: var(--radius);
  display: grid; place-items: center; overflow: hidden;
  background: var(--cat-bg, #F4EEE6);
}
.sheet-visual .card-emoji { font-size: 64px; }
.sheet-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet-content { padding: 18px 20px 0; }
.sheet-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pill {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: 999px; font-size: 13px; font-weight: 700;
  background: var(--bg); color: var(--text); border: 1px solid var(--line);
}
.pill--sample { background: var(--sunny-tint); border-color: #F5E2B0; }
.sheet-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; padding-right: 8px; }
.sheet-summary { margin-top: 10px; color: var(--text); }
.info { margin: 18px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.info-row { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.info dt { color: var(--muted); font-size: 14px; font-weight: 600; }
.info dd { margin: 0; font-size: 15px; }
.info .sub { display: block; color: var(--muted); font-size: 14px; }
.amen { display: flex; flex-wrap: wrap; gap: 6px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 20px; }
.actions .btn-wide { grid-column: 1 / -1; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; z-index: 80;
  bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 999px;
  background: var(--text); color: #fff; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.noscript { padding: 16px; text-align: center; }

@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pop-in { from { transform: translateY(16px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Tablet ---------- */
@media (min-width: 640px) {
  :root { --gutter: 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .hero-title { font-size: 26px; }
  .quick-btn { flex-direction: row; align-items: center; gap: 10px; min-height: 72px; padding: 12px 16px; }
  .quick-btn .quick-sub { display: none; }
  .quick-emoji { font-size: 28px; }
  .quick-label { font-size: 16px; }
}

@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .bottom-nav { display: none; }
  .toast { bottom: 24px; }
  .header-inner { grid-template-columns: auto 1fr auto; grid-template-areas: "brand search fav"; gap: 16px; }
  .search { max-width: 460px; justify-self: end; width: 100%; }
  .filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .filter-bar .flag-row { flex: 1; min-width: 0; }
  .sort { margin-top: 0; flex: none; }
  .gu-row { scroll-margin-top: 90px; }

  .sheet { align-items: center; padding: 24px; }
  .sheet-panel {
    max-width: 600px; max-height: 88vh;
    border-radius: 24px;
    padding-bottom: 24px;
    animation: pop-in .2s ease;
  }
  .sheet-panel::before { display: none; }
  .sheet-visual { margin-top: 16px; height: 170px; }
  .sheet-content { padding: 20px 28px 0; }
  .ad-detail { padding: 0; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
  .chip-row { flex-wrap: wrap; overflow: visible; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
  .hero { padding-top: 32px; }
  .quick { max-width: 720px; }
}

@media (hover: none) {
  .card:hover { transform: none; }
}

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

/* 목록 '더 보기' */
.more-wrap { display: flex; justify-content: center; margin: 20px 0 8px; }
.more-btn {
  min-height: 48px; padding: 0 28px; border-radius: 999px;
  border: 1.5px solid var(--line, #F0E6DA); background: #fff; color: var(--text);
  font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 2px 8px rgba(43,45,66,.06);
}
.more-btn:hover { border-color: #C8372B; color: #C8372B; }
.more-count { margin-left: 6px; font-weight: 500; color: var(--muted, #6B7084); }

/* 쿠팡 파트너스 배너 카드 */
.ad--coupang { gap: 8px; }
.ad--coupang[hidden] { display: none; }
.coupang-box { width: 100%; min-height: 100px; display: flex; justify-content: center; overflow: hidden; border-radius: var(--radius-sm); background: #fff; }
.coupang-box iframe { max-width: 100%; }
.coupang-notice { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }

/* 맨 위·상세 칸의 쿠팡 배너는 세로로 쌓기 */
.ad.ad--coupang { flex-direction: column; align-items: stretch; gap: 8px; }
.ad.ad--coupang .ad-label { align-self: flex-start; }
