@font-face {
  font-family: 'Gmarket Sans';
  font-weight: 700;
  font-display: swap;
  src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2001@1.1/GmarketSansBold.woff') format('woff');
}

/* 같은 사이트 안에서 페이지를 이동할 때 흰 화면 대신 이전 화면에서 다음 화면으로 자연스럽게 넘어간다 */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

:root {
  color-scheme: light;
  --bg: #ffffff;
  --tile: #f1f3f6;
  --paper: #ffffff;
  /* 색 역할: 노랑은 브랜드색(로고·공지 띠 등 대표 포인트에만, 흰 바탕 위 글자·버튼에는 쓰지 않는다),
     남색은 기본색(글자·버튼·선택 상태), 초록은 '재고 있음'에만 쓴다. 노랑은 public/favicon.svg와 같은 값이다 */
  --brand: #ffd23f;
  --brand-soft: #fff4c7;
  --ink: #1f2430;
  --ink-soft: #5b6273;
  --line: #dfe2e8;
  --in: #0e8a5f;
  --out: #7c8494;
  --display: 'Gmarket Sans', 'Pretendard Variable', sans-serif;
  --body: 'Pretendard Variable', Pretendard, -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }
/* html에도 배경색을 지정해야 모바일에서 끝까지 당겼을 때 바깥 영역이 흰색으로 보인다 */
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--body);
  word-break: keep-all;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #2b6cd4; outline-offset: 2px; }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* 상단 */
.top { padding: 20px 0 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font: 700 18px/1 var(--display); text-decoration: none; letter-spacing: -0.01em; }
/* 이름 왼쪽 로고: 파비콘과 같은 그림(public/favicon.svg, P + 지도 핀). 그림을 바꾸면 각 페이지의 ?v= 값을 올린다(브라우저가 예전 그림을 저장해 둔다) */
.brand-mark { flex: none; }

/* 메인 */
.intro { padding: 40px 0 28px; max-width: 34em; }
.intro h1 { font: 700 clamp(28px, 6vw, 44px)/1.2 var(--display); margin: 0 0 14px; letter-spacing: -0.02em; }
.intro p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* 상품 그리드: 카드팩마다 패키지 색에 맞춘 연한 타일 위에 놓는다 */
.packs { list-style: none; margin: 0; padding: 0; display: grid; gap: 32px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.packs a { display: block; text-decoration: none; border-radius: 16px; }
.tile {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  background: var(--tint, var(--tile));
  overflow: hidden;
}
.tile img {
  position: absolute; inset: 18% 12% 8%;
  height: 74%; width: 76%; object-fit: contain;
  filter: drop-shadow(0 14px 18px rgb(31 36 48 / 0.22));
  transition: transform 0.2s ease-out;
}
.packs a:hover .tile img, .packs a:focus-visible .tile img { transform: translateY(-6px) rotate(-2deg); }
.tile .badge {
  position: absolute; left: 12px; top: 12px; z-index: 1;
  background: var(--paper); border-radius: 999px;
  padding: 2px 10px; font-size: 12px; font-weight: 600;
}
.packs .info { padding: 12px 2px 0; }
.packs .name { display: block; font-weight: 700; font-size: 15px; line-height: 1.4; }
.packs .series { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 2px; }
.packs .won { display: block; margin-top: 8px; font: 700 18px/1 var(--display); font-variant-numeric: tabular-nums; }
.packs .won small { font: 500 13px/1 var(--body); color: var(--ink-soft); margin-left: 4px; }
.packs .cta { display: none; }
/* 카드팩이 하나뿐일 때는 그리드 대신 큰 타일로 보여 준다 */
.packs li:only-child { grid-column: 1 / -1; }
.packs li:only-child .tile { aspect-ratio: 4 / 3; }
.packs li:only-child .name { font: 700 22px/1.3 var(--display); letter-spacing: -0.02em; }
.packs li:only-child .won { font-size: 22px; margin-top: 10px; }
.packs li:only-child .cta {
  display: inline-flex; align-items: center; height: 48px; margin-top: 20px; padding: 0 20px;
  border-radius: 12px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px;
}
@media (min-width: 720px) {
  .packs li:only-child a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 48px; align-items: center; }
  .packs li:only-child .tile { aspect-ratio: 4 / 5; }
  .packs li:only-child .info { padding: 0; }
  .packs li:only-child .name { font-size: 32px; }
  .packs li:only-child .won { font-size: 26px; }
}

@media (min-width: 720px) {
  .packs { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
}
@media (min-width: 960px) {
  .packs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 카드팩 화면: 목록보다 좁게 두어 매장 목록이 한눈에 들어오게 한다 */
/* 모바일에서는 카드팩 정보를 작게 두어 첫 화면에 재고 매장이 보이게 한다 */
.pack-head { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 8px 0 12px; }
/* 카드팩 정보는 JS가 채운다. 채워지기 전에도 자리를 잡아 두어 아래 내용이 밀리지 않게 한다 */
.pack-head:empty { min-height: 90px; }
.pack-head .tile { border-radius: 12px; }
.pack-head .tile img { filter: drop-shadow(0 6px 8px rgb(31 36 48 / 0.2)); }
/* 메인 상품 타일과 같은 움직임: 마우스를 올리면 카드팩이 살짝 떠오르며 기울어진다 */
.pack-head .tile:hover img { transform: translateY(-6px) rotate(-2deg); }
.pack-head h1 { font: 700 18px/1.3 var(--display); margin: 0 0 4px; letter-spacing: -0.02em; }
/* 카드팩 이름을 누르면 카드팩을 고른다: 보이지 않는 선택 상자를 이름 위에 겹친다 */
.pack-pick { position: relative; }
.pack-pick select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.pack-pick .pick-icon { display: inline-block; margin-left: 6px; vertical-align: 0.12em; color: var(--ink-soft); }
.pack-pick:hover .pick-icon { color: var(--ink); }
.pack-pick .nowrap { white-space: nowrap; }
.pack-pick:has(select:focus-visible) h1 { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
.pack-head .series { display: none; }
.pack-head p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.pack-head .price { margin-top: 2px; }
.pack-head .price strong { font: 700 17px/1 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 2px; }
.pack-head .barcode { display: none; font-size: 13px; font-variant-numeric: tabular-nums; }

/* 지역: 화면 위에 고정한다 */
.where {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.where select {
  height: 44px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; font-size: 15px;
}
.where select:hover:not(:disabled) { border-color: var(--ink-soft); }
.where select {
  appearance: none; -webkit-appearance: none;
  width: 100%; min-width: 0; padding-right: 38px;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%235b6273' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  text-overflow: ellipsis; cursor: pointer;
}
.where select:disabled { color: var(--out); background-color: var(--tile); cursor: default; }
.where .selects { display: grid; grid-template-columns: 1fr 1fr 44px; gap: 8px; }
/* 내 위치로 찾기: 내 위치가 속한 시/군/구를 조회한다(지도 안의 내 위치 버튼은 지도만 옮긴다) */
.locate-region { display: grid; place-items: center; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); cursor: pointer; }
.locate-region:hover { border-color: var(--ink-soft); }

/* 요약은 항상 같은 패널로 표시하고, 재고가 있을 때만 카드팩 색으로 바꾼다. 화면에서 강조는 이 한 곳에만 둔다 */
.summary { background: var(--tile); border-radius: 16px; padding: 18px 16px 14px; margin: 16px 0 14px; }
.summary.found { background: var(--tint, var(--tile)); }
/* 조회 시각 바로 뒤에 다시 조회 아이콘을 배치한다('2분 전 ↻'). 무엇을 새로 받는지 바로 읽힌다 */
.summary .when { display: flex; align-items: center; gap: 2px; margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
.summary h2 { font: 700 21px/1.35 var(--display); margin: 0; letter-spacing: -0.01em; }
.summary p { margin: 6px 0 0; color: var(--ink-soft); font-size: 14px; }
/* 다시 조회: 테두리 없는 아이콘 버튼. 누르는 영역은 36px로 넓게 두고, 눈에 보이는 hover 바탕은 아이콘을 감싸는 28px 원으로만 그린다 */
.summary .refresh {
  position: relative; flex: none; display: grid; place-items: center; width: 36px; height: 36px; margin: -6px 0 -6px -4px;
  border: 0; border-radius: 50%; background: none; color: var(--ink-soft); cursor: pointer;
}
.summary .refresh::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; transition: background-color 0.15s; }
.summary .refresh svg { position: relative; transition: transform 0.3s ease; }
.summary .refresh:hover { color: var(--ink); }
.summary .refresh:hover::before { background: rgb(31 36 48 / 0.07); }
/* 마우스를 올리면 화살표 방향으로 살짝 회전하고, 다시 조회하는 동안에는 계속 회전한다 */
.summary .refresh:hover svg { transform: rotate(60deg); }
.summary .refresh.spin svg { animation: spin 0.8s linear infinite; }
.summary .ago-skel { display: inline-block; width: 150px; height: 12px; margin-right: 8px; border-radius: 6px; background: rgb(31 36 48 / 0.08); }
/* 다시 조회했는데 새 정보가 없으면 ↻ 오른쪽에 ✓가 1.2초 동안 떴다가 사라진다(애니메이션이 끝나면 보이지 않는다) */
.summary .checked { display: grid; place-items: center; color: var(--in); animation: checked 1.2s ease-out forwards; }
@keyframes checked { 0%, 60% { opacity: 1; } 100% { opacity: 0; } }
/* 새 조회 시각이 들어오면 잠깐 진하게 보였다가 원래 색으로 돌아온다 */
.summary #ago.updated { animation: ago-updated 1.2s ease-out; }
@keyframes ago-updated { from { color: var(--ink); } to { color: var(--ink-soft); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* 편의점별 필터. 누르면 그 편의점만 표시한다 */
/* 편의점 칩은 상태 글자가 길어져도 줄이 바뀌지 않도록 한 줄로 두고, 넘치면 가로로 스크롤한다 */
.chains {
  display: flex; flex-wrap: nowrap; gap: 6px; padding: 4px 16px 14px; margin: 0 -16px;
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.chains::-webkit-scrollbar { display: none; }
.chain { flex: none; }
/* position: relative — 칩 안의 화면 낭독기용 글자(.visually-hidden, absolute)가 칩 줄의 가로 스크롤 밖으로 빠져나가
   휴대폰에서 페이지 폭이 넓어지지 않게 칩 안에 가둔다 */
.chain {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 36px; padding: 4px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.chain:hover { border-color: var(--ink-soft); }
.chain .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chain .state { color: var(--ink-soft); font-weight: 500; font-variant-numeric: tabular-nums; }
.chain.has .state { color: var(--in); font-weight: 700; }
.chain.failed .state, .chain.pending .state { color: var(--out); }
.chain[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chain[aria-pressed='true'] .state { color: #fff; }
/* 조회 중인 편의점: 다시 조회 아이콘과 같은 속도로 회전하는 원 */
.chain .spinner {
  display: block; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid rgb(31 36 48 / 0.15); border-top-color: var(--ink-soft);
  animation: spin 0.8s linear infinite;
}
.chain[aria-pressed='true'] .spinner { border-color: rgb(255 255 255 / 0.3); border-top-color: #fff; }


/* 매장 목록 */
.stores { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.store { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.store p { margin: 0; grid-column: 1; }
.store .meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.store .meta .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.store .name { font-weight: 700; font-size: 17px; line-height: 1.4; margin-top: 6px; }
/* 지도에 위치가 있는 매장은 누르면 지도에서 보여 준다. 매장 이름은 키보드로도 누를 수 있는 버튼이다. */
.store.on-map { cursor: pointer; }
.store .to-map { all: unset; cursor: pointer; }
.store .to-map:focus-visible { outline: 3px solid #2b6cd4; outline-offset: 2px; border-radius: 4px; }
@media (hover: hover) { .store.on-map:hover .to-map { text-decoration: underline; text-underline-offset: 3px; } }
.store .addr { font-size: 14px; color: var(--ink-soft); }
.store .links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.store .links a {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.store .links a:hover { border-color: var(--ink-soft); }
/* 길찾기: 재고 있는 매장에서는 주요 버튼, 누르면 카카오맵·네이버지도 중 고른다 */
.route { position: relative; }
.route > summary {
  list-style: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px;
  border-radius: 8px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.route > summary::-webkit-details-marker { display: none; }
.more .route > summary { background: var(--paper); color: var(--ink); border: 1px solid var(--line); }
.route-menu {
  position: absolute; left: 0; top: calc(100% + 6px); z-index: 10; min-width: 176px;
  display: grid; padding: 6px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--paper); box-shadow: 0 8px 24px rgb(31 36 48 / 0.12);
}
.store .links .route-menu a { border: 0; border-radius: 8px; min-height: 40px; }
.store .links .route-menu a:hover { background: var(--tile); }

/* 재고 수량: 버튼과 헷갈리지 않도록 상자 없이 숫자만 크게 표시한다 */
.qty {
  grid-row: 1 / span 3; grid-column: 2; align-self: start;
  min-width: 68px; text-align: center;
  padding: 6px 10px 8px;
  font: 700 26px/1 var(--display); font-variant-numeric: tabular-nums;
}
/* 가격 '3,500원'처럼 숫자 옆에 작은 단위를 표시한다 */
.qty small { font: 600 15px/1 var(--body); margin-left: 2px; }
.qty.in { color: var(--ink); font-size: 30px; padding: 2px 0 0; white-space: nowrap; }
.qty.out { color: var(--out); font: 600 14px/1.4 var(--body); padding: 4px 0; }
.qty.stale, .pin.stale, .pop-qty.stale { opacity: 0.4; } /* 다시 조회 중 아직 새 결과가 오지 않은 편의점의 이전 수량 */
.qty.unknown { color: var(--ink-soft); font: 600 14px/1.4 var(--body); padding: 4px 0; }

.group > summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 15px; color: var(--ink-soft); }
.group > summary:hover { color: var(--ink); }
.group .stores { margin-top: 4px; }
.group .none { margin: 0; padding: 16px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-soft); }
.more { margin-top: 8px; }
.more .store .name { font-size: 16px; }




/* 하단 */
.foot { margin-top: 32px; padding: 24px 0 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-soft);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.foot p { margin: 0; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 16px; }
/* 바닥글 링크는 메뉴처럼 나란히 있어 밑줄 없이 표시하고, 마우스를 올리면 진하게 바꾼다 */
.foot nav a { text-decoration: none; }
.foot nav a:hover { color: var(--ink); }

/* 화면 아래 토스트(위치 확인 실패 안내 등): 흰 화면에서 눈에 띄게 선택된 편의점 칩과 같은 진한 알약 모양, 후원 버튼과 말풍선 위에 띄운다 */
.toast {
  position: fixed; left: 50%; bottom: calc(104px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30;
  width: max-content; max-width: min(420px, calc(100% - 32px)); margin: 0; padding: 12px 20px;
  border-radius: 999px; background: var(--ink); color: #fff;
  font-size: 14px; font-weight: 600; line-height: 1.5; box-shadow: 0 8px 24px rgb(31 36 48 / 0.24); cursor: pointer;
  animation: toast-in 0.2s ease-out;
}
.toast[hidden] { display: none; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* 후원 공지: 화면 맨 위 전체 폭 띠. 누르면 서버비 설명 창이 열린다(support.js) */
.notice { background: var(--brand-soft); }
.notice-open { display: block; width: 100%; min-height: 36px; padding: 8px 16px; border: 0; background: none; text-align: center; font-size: 13px; font-weight: 600; cursor: pointer; }
.notice-open:hover { text-decoration: underline; text-underline-offset: 3px; }
/* 서버비 설명 창. 화면이 낮으면 창 안에서 스크롤하고, 그 스크롤이 뒤 페이지로 넘어가지 않게 한다 */
.sheet { width: min(420px, calc(100% - 32px)); max-height: calc(100% - 32px); overflow-y: auto; overscroll-behavior: contain; padding: 22px 20px 20px; border: 0; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 16px 48px rgb(31 36 48 / 0.24); }
.sheet::backdrop { background: rgb(31 36 48 / 0.45); }
/* 창이 열려 있는 동안 뒤 페이지 스크롤을 잠근다(dialog는 열려 있어도 뒤 페이지 스크롤을 막지 않는다).
   스크롤 막대가 자리를 차지하는 PC에서 막대가 사라지며 화면이 밀리지 않게 그 자리를 남긴다 */
html:has(.sheet[open]) { overflow: hidden; scrollbar-gutter: stable; }
.sheet-close { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); cursor: pointer; }
.sheet-close:hover { color: var(--ink); }
.sheet h2 { margin: 0 40px 6px 0; font: 700 20px/1.3 var(--display); letter-spacing: -0.01em; }
.sheet h3 { margin: 16px 0 4px; font-size: 15px; font-weight: 700; }
.sheet p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--ink-soft); }
.sheet .sheet-lead { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.sheet .sheet-goal { margin-top: 6px; font-size: 13px; font-variant-numeric: tabular-nums; }
.sheet .sheet-goal[hidden] { display: none; }
.sheet-qr { display: none; }
@media (hover: hover) and (pointer: fine) { .sheet-qr { display: block; margin: 14px auto 0; } } /* PC는 휴대폰으로 찍을 QR을 함께 보여 준다 */
.sheet-donate { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none; }

/* 개발자 후원 버튼: 모든 페이지 왼쪽 아래에 고정한다. PC에서는 누르면 위쪽에 QR 코드가 열린다 */
.support-wrap { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 20; }
/* 최근 후원자 말풍선: 버튼 바로 위, 버튼과 같은 흰 알약 모양을 작게 */
.support-feed {
  position: absolute; left: 0; bottom: calc(100% + 6px); margin: 0; white-space: nowrap;
  padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-size: 11px; font-weight: 600; color: var(--ink-soft); box-shadow: 0 2px 8px rgb(31 36 48 / 0.12); cursor: pointer;
}
.support-feed:hover { border-color: var(--ink-soft); }
/* 말풍선을 누르면 그 위에 여는 이번 달 후원자 목록(QR 창과 같은 모양) */
.support-list {
  position: absolute; left: 0; bottom: calc(100% + 38px); width: 216px; max-height: 50vh; overflow-y: auto;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper); box-shadow: 0 8px 24px rgb(31 36 48 / 0.14); font-size: 13px;
}
.support-list[hidden] { display: none; }
/* 목록을 스크롤해도 제목(후원자 수)과 닫기 버튼이 위에 남는다 */
.support-list-title { position: sticky; top: -14px; display: flex; align-items: center; justify-content: space-between; margin: -14px 0 4px; padding: 14px 0 6px; background: var(--paper); font-weight: 700; }
.support-list-close { display: grid; place-items: center; width: 32px; height: 32px; margin: -8px -10px -8px 0; border: 0; border-radius: 50%; background: none; color: var(--ink-soft); cursor: pointer; }
.support-list-close:hover { color: var(--ink); }
.support-day { margin: 10px 0 2px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.support-list-title + .support-day { margin-top: 0; padding-top: 0; border-top: 0; }
.support-list ul { list-style: none; margin: 0; padding: 0; }
.support-list li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; font-variant-numeric: tabular-nums; }
.support-list li small { flex: none; width: 34px; font-size: 11px; color: var(--ink-soft); }
.support-list li .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.support-list li .amount { font-weight: 600; }
.support-qr {
  position: absolute; left: 0; bottom: 52px; width: 216px;
  padding: 16px; border: 1px solid var(--line); border-radius: 16px;
  background: var(--paper); box-shadow: 0 8px 24px rgb(31 36 48 / 0.14);
  text-align: center; font-size: 13px; color: var(--ink-soft);
}
.support-qr[hidden] { display: none; }
.support-qr img { margin: 0 auto 10px; width: 160px; height: 160px; }
.support-qr p { margin: 0 0 8px; line-height: 1.5; }
.support-qr a { color: var(--ink); font-weight: 600; }
.support {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 7px 18px 7px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-size: 14px; font-weight: 600; text-decoration: none;
  box-shadow: 0 2px 10px rgb(31 36 48 / 0.08);
}
.support:hover { border-color: var(--ink-soft); }
.support-text { display: flex; flex-direction: column; line-height: 1.25; }
.support-text strong { font-size: 14px; font-weight: 700; }
.support-text .support-goal { margin-top: 1px; font-size: 11px; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.support-text .support-goal[hidden] { display: none; }
/* 버튼이 페이지 맨 아래 내용(바닥글·안내 문서)을 가리지 않도록 여백을 확보한다.
   아이폰 사파리·크롬은 맨 아래에서 브라우저 막대가 화면을 차지해 버튼과 겹칠 수 있어 버튼 높이보다 넉넉하게 둔다 */
body { padding-bottom: 140px; }

/* 안내 페이지 */
.doc { max-width: 40em; padding: 24px 0; }
.doc h1 { font: 700 28px/1.3 var(--display); margin: 0 0 16px; }
.doc h2 { font: 700 18px/1.4 var(--display); margin: 32px 0 8px; }
.status-list { margin: 0; }
.status-list dt { font-weight: 700; margin-top: 12px; }
.status-list dd { margin: 2px 0 0; }

/* 매장 지도: 요약과 같은 둥근 모서리, 바탕은 지도가 뜨기 전 회색 */
.map { position: relative; height: 280px; margin: 16px 0 14px; border-radius: 16px; overflow: hidden; background: var(--tile); }
.map[hidden] { display: none; }
/* 재고 있는 매장 표식: 남은 수량을 적은 말풍선, 왼쪽 점은 편의점 색 */
.pin {
  display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 10px 0 8px;
  border: 0; border-radius: 999px; background: var(--ink); color: #fff; cursor: pointer;
  font: 700 14px/1 var(--display); font-variant-numeric: tabular-nums;
  box-shadow: 0 2px 8px rgb(31 36 48 / 0.25); margin-bottom: 6px;
}
.pin::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--ink); border-bottom: 0;
}
.pin .pin-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px #fff; }
/* 지도를 다른 지역으로 옮겼을 때 지도 위쪽 가운데에 띄우는 그 지역 조회 버튼(편의점 칩과 같은 모양) */
.area-search {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%); z-index: 2;
  min-height: 36px; padding: 4px 14px; white-space: nowrap; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; background: var(--paper);
  font-weight: 700; font-size: 14px; box-shadow: 0 2px 8px rgb(31 36 48 / 0.18);
}
.area-search[hidden] { display: none; }
/* 지도 위 내 위치 버튼(확대·축소 버튼 아래) */
.map .maplibregl-ctrl-group button.locate { display: grid; place-items: center; color: var(--ink); }
/* 내 위치 */
.me { width: 14px; height: 14px; border-radius: 50%; background: #2b6cd4; border: 2.5px solid #fff; box-shadow: 0 0 0 6px rgb(43 108 212 / 0.18); }
/* 지도 말풍선: 목록의 매장 행과 같은 글자 체계 */
.store-pop .maplibregl-popup-content { padding: 14px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgb(31 36 48 / 0.16); font: 14px/1.5 var(--body); color: var(--ink); }
.store-pop .maplibregl-popup-close-button {
  top: 6px; right: 6px; width: 32px; height: 32px; border-radius: 8px; font-size: 20px; line-height: 1; color: var(--ink-soft);
}
.store-pop .maplibregl-popup-close-button:hover { background: var(--tile); color: var(--ink); }
.store-pop p { margin: 0; }
.store-pop .pop-meta { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); padding-right: 28px; }
.store-pop .pop-meta .dot { width: 8px; height: 8px; border-radius: 50%; }
.store-pop .pop-name { font-weight: 700; font-size: 16px; margin-top: 4px; }
.store-pop .pop-qty { color: var(--out); }
.store-pop .pop-qty strong { color: var(--ink); }
.store-pop .pop-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.store-pop .pop-links a {
  display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none;
}

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (min-width: 720px) {
  .pack-head { grid-template-columns: 112px 1fr; gap: 24px; padding: 24px 0 28px; }
  .pack-head h1 { font-size: 26px; }
  .pack-head .series { display: block; }
  .pack-head .barcode { display: block; margin-top: 4px; }
}

/* 데스크톱 상세: 왼쪽에 카드팩·지역을 고정하고 오른쪽에 매장 목록을 둔다. 메인과 같은 960px 틀을 쓴다. */
@media (min-width: 900px) {
  .detail { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 16px; }
  .detail .side { position: sticky; top: 24px; }
  .pack-head { grid-template-columns: 1fr; gap: 16px; padding: 8px 0 24px; }
  /* 데스크톱도 칩은 한 줄로 둔다. 넘치면 가로로 스크롤하고, 열 폭 안에서만 움직인다 */
  .chains { margin: 0; padding: 4px 0 14px; }
  .pack-head:empty { min-height: 480px; }
  .pack-head .tile { aspect-ratio: 4 / 3; }
  .pack-head h1 { font-size: 26px; }
  .where { position: static; padding: 16px 0 0; border-bottom: 0; border-top: 1px solid var(--line); }
  /* 오른쪽 첫 요소의 윗선을 왼쪽 카드팩 이미지 타일과 맞춘다(둘 다 열 시작에서 8px) */
  .summary { margin-top: 8px; }
  .map { height: 320px; margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
