:root {
  --orange: #E0592B;
  --orange-ink: #C24A1F;
  --cream: #F5F3EC;
  --sand: #EBE6DA;
  --ink: #1E1E1E;
  --muted: #5E5A52;
  --line: #E6E1D6;
  --line-strong: #D9D3C6;
  --white: #FFFFFF;
  --placeholder: #EDE7DB;
  --font: 'Noto Sans KR', system-ui, -apple-system, 'Apple SD Gothic Neo', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--orange-ink); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; text-align: center; }

.page { max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }

/* profile */
.profile { padding: 32px 16px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.profile h1 { margin: 6px 0 0; font-size: 20px; font-weight: 700; }
.profile .handle { font-size: 13px; color: var(--muted); }
.profile .bio { margin: 0; font-size: 14px; line-height: 1.6; white-space: pre-line; }
.logo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; }
.sns { margin-top: 6px; display: flex; gap: 10px; }
.round-btn { width: 44px; height: 44px; border-radius: 22px; border: 1px solid var(--line-strong); background: var(--white); display: flex; align-items: center; justify-content: center; }

.disclosure { margin: 0 16px; padding: 10px 14px; background: var(--sand); border-radius: 8px; font-size: 12px; line-height: 1.6; color: #4A463F; }

.search-link { margin: 16px 16px 8px; height: 48px; padding: 0 16px; border-radius: 24px; border: 1px solid var(--line-strong); background: var(--white); display: flex; align-items: center; gap: 10px; font-size: 14px; color: #6B665C; }

.section { padding: 16px 16px 0; display: flex; flex-direction: column; gap: 12px; }
.section + .section { padding-top: 28px; }
.section-head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.section h2 { margin: 0; font-size: 17px; font-weight: 700; }
.more { height: 44px; display: flex; align-items: center; font-size: 13px; color: var(--muted); }

/* category icons */
.cat-grid { display: grid; row-gap: 16px; column-gap: 8px; }
.cat-tile { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.cat-circle { width: 56px; height: 56px; border-radius: 28px; background: var(--white); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--orange-ink); overflow: hidden; }
.cat-circle.accent { background: var(--orange); border-color: var(--orange); color: var(--cream); }
.cat-circle img { width: 100%; height: 100%; object-fit: cover; }
.cat-label { font-size: 13px; font-weight: 500; text-align: center; word-break: keep-all; }

/* chips */
.chips { display: flex; gap: 8px; align-items: center; }
/* Category chips wrap onto more lines instead of scrolling, so no name is ever cut off. */
.chips.scroll { flex-wrap: wrap; padding: 14px 16px 2px; }
.chip { flex-shrink: 0; height: 36px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 18px; border: 1px solid var(--line-strong); background: var(--white); font-size: 14px; font-weight: 500; white-space: nowrap; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); font-weight: 700; }
.chips.scroll .chip[aria-pressed="true"] { background: var(--orange-ink); border-color: var(--orange-ink); }
.chips .count { margin-left: auto; font-size: 13px; color: var(--muted); }

/* product cards */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.card-img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--placeholder); }
/* Partner banners: logo on top, photo in the middle, name and button below. Show the photo part. */
img.banner { object-fit: cover; object-position: 50% 26%; background: var(--white); }
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 3px; }
.card-meta { font-size: 12px; color: #6B665C; }
.card-meta b { color: var(--orange-ink); }
.card-name { font-size: 14px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-price { font-size: 15px; font-weight: 700; }
.card-price .disc { color: var(--orange-ink); }

.wide-btn { height: 48px; border-radius: 24px; border: 1px solid #C9C3B5; background: var(--white); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 500; }
.empty { padding: 28px 16px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; font-size: 14px; color: #4A463F; }
.empty button { height: 40px; padding: 0 16px; border-radius: 20px; border: 1px solid var(--ink); background: var(--white); font-size: 14px; font-weight: 500; }

.footer { padding: 28px 16px 32px; display: flex; flex-direction: column; gap: 4px; text-align: center; font-size: 12px; line-height: 1.6; color: var(--muted); }

/* sub page header */
.topbar { height: 56px; padding: 0 6px; display: flex; align-items: center; justify-content: space-between; }
.topbar h1 { margin: 0; font-size: 18px; font-weight: 700; }
.icon-btn { width: 44px; height: 44px; border: 0; background: transparent; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.meta-line { padding: 14px 16px 12px; font-size: 13px; color: var(--muted); }
.list-wrap { padding: 0 16px; }

/* search */
.searchbar { padding: 8px 16px 8px 6px; display: flex; align-items: center; gap: 4px; }
.search-field { flex: 1; height: 48px; padding: 0 6px 0 16px; border-radius: 24px; border: 2px solid var(--orange-ink); background: var(--white); display: flex; align-items: center; gap: 8px; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; font: inherit; font-size: 16px; color: var(--ink); }
.search-field input::-webkit-search-cancel-button { display: none; }
.clear-btn { width: 36px; height: 36px; border: 0; border-radius: 18px; background: #EFEBE2; display: flex; align-items: center; justify-content: center; color: #4A463F; }
.results { display: flex; flex-direction: column; gap: 10px; }
.row-card { min-height: 104px; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--white); display: flex; align-items: center; gap: 14px; }
.row-card .thumb { width: 84px; height: 84px; flex-shrink: 0; border-radius: 8px; object-fit: cover; background: var(--placeholder); }
.row-card .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-card .no { font-size: 12px; font-weight: 700; color: var(--orange-ink); }
.row-card .name { font-size: 15px; font-weight: 500; }
.hint { margin: 24px 16px 0; padding: 16px; border-radius: 12px; background: var(--sand); display: flex; flex-direction: column; gap: 6px; }
.hint strong { font-size: 14px; }
.hint p { margin: 0; font-size: 13px; line-height: 1.6; color: #4A463F; }
.loading { padding: 80px 16px; text-align: center; color: var(--muted); }
