/* ==========================================================================
   AGPTEDU 전용 디자인 (2026-10 개편)
   - 색: 먹색 3단계 + 강조 파랑 하나. 그라데이션·글래스·그림자 없음
   - 구조: 카드 대신 1px 구분선과 여백, 둥근 모서리는 사진에만
   - 모바일 우선: 좌우 여백 20px, 본문 17px
   ========================================================================== */

:root {
  --ink: #16181d;
  --body: #33363d;
  --muted: #6b7079;
  --line: #e6e7ea;
  --soft: #f6f7f8;
  --accent: #0b5fd1;

  /* 공용 테마 변수를 같은 팔레트로 덮어씀 */
  --bg-base: #fff;
  --bg-surface: #fff;
  --bg-surface-glass: #fff;
  --bg-card: #fff;
  --border-color: var(--line);
  --text-main: var(--ink);
  --text-muted: var(--muted);
  --primary-color: var(--accent);
  --primary-hover: #094ca8;
  --primary-glow: transparent;
  --accent-color: var(--accent);
  --accent-glow: transparent;
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --radius-sm: 6px;
  --radius-md: 6px;
  --radius-lg: 6px;
  --header-height: 56px;
  --font-sans: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}

html, body { overflow-x: hidden; overflow-x: clip; max-width: 100vw; }
body { background: #fff; color: var(--body); padding-bottom: 0; word-break: keep-all; overflow-wrap: anywhere; }
a { color: inherit; }
a:hover { color: var(--accent); }
.glass { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.container { max-width: 1120px; padding-left: 20px; padding-right: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 헤더 · 분류 탭 ---------- */
.header { height: var(--header-height); background: #fff; border-bottom: 1px solid var(--line); }
@media (max-width: 1023px) { .header { position: relative; } }
.logo { font-size: 1.15rem; font-weight: 800; letter-spacing: -0.01em; color: var(--ink); }
.search-link { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-right: -9px; color: var(--ink); }
.nav-cats .nav-link { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.nav-cats .nav-link.active, .nav-cats .nav-link:hover { color: var(--ink); }
.nav-cats .nav-link::after { background: var(--ink) !important; }
@media (min-width: 1024px) { .header-container { gap: 28px; } .nav-cats { margin-right: auto; } }

.cat-tabs { display: flex; gap: 18px; overflow-x: auto; padding: 0 20px; border-bottom: 1px solid var(--line); background: #fff; scrollbar-width: none; }
.cat-tabs::-webkit-scrollbar { display: none; }
.cat-tabs a { flex: none; padding: 12px 0 10px; font-size: 15px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.cat-tabs a.on { color: var(--ink); font-weight: 700; border-bottom-color: var(--ink); }

/* ---------- 글 목록 (홈·분류·태그·관련 글) ---------- */
.sec-label { font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; margin: 28px 0 4px; }
.post-list { list-style: none; margin: 0; padding: 0; }
.pl-item { border-bottom: 1px solid var(--line); }
.pl-link { display: flex; gap: 14px; padding: 14px 0; color: inherit; }
.pl-text { flex: 1; min-width: 0; }
.pl-title { font-size: 16px; line-height: 1.45; font-weight: 600; color: var(--ink); margin: 0 0 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-link:hover .pl-title { color: var(--accent); }
.pl-meta { font-size: 13px; color: var(--muted); margin: 0; }
.pl-meta b { color: var(--accent); font-weight: 600; }
.pl-thumb { width: 88px; height: 66px; object-fit: cover; border-radius: 4px; flex: none; background: var(--soft); }
@media (min-width: 768px) {
  .pl-title { font-size: 17px; }
  .pl-thumb { width: 132px; height: 88px; }
}

/* 홈 */
.home-lead { padding: 20px 0 4px; }
.home-lead a { display: block; color: inherit; }
.home-lead-img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 6px; background: var(--soft); }
.home-lead .pl-meta { margin: 12px 0 4px; }
.home-lead-title { font-size: 20px; line-height: 1.4; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 6px; font-weight: 700; }
.home-lead a:hover .home-lead-title { color: var(--accent); }
.home-lead-sum { font-size: 15px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rank-list { list-style: none; margin: 0; padding: 0; counter-reset: r; }
.rank-list li { counter-increment: r; display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.45; }
.rank-list li::before { content: counter(r); font-weight: 800; color: var(--accent); width: 14px; flex: none; }
.rank-list a { color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.home { padding-bottom: 24px; }
@media (min-width: 1024px) {
  .home-lead { display: block; max-width: 760px; padding-top: 32px; }
  .home-lead-title { font-size: 26px; }
  .home-cols { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: start; }
  .home-side { position: sticky; top: calc(var(--header-height) + 20px); }
}

/* 분류·태그 머리 */
.list-head { padding: 24px 0 4px; border-bottom: 1px solid var(--line); }
.list-head h1 { font-size: 22px; line-height: 1.35; letter-spacing: -0.02em; color: var(--ink); margin: 0 0 6px; }
.list-head p { font-size: 14.5px; color: var(--muted); margin: 0 0 14px; }
.list-kicker { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.list-page { max-width: 800px; padding-bottom: 24px; }
.list-empty { padding: 60px 0; color: var(--muted); text-align: center; }

/* 페이지 번호 */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin: 32px 0; }
.pagination .page-btn { min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--body); font-size: 15px; font-weight: 600; box-shadow: none; transform: none; }
.pagination .page-btn:hover { border-color: var(--ink); color: var(--ink); background: #fff; }
.pagination .page-btn.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pagination .page-ellipsis { padding: 0 4px; color: var(--muted); }

/* ---------- 글 페이지 ---------- */
.post-layout { padding: 0 0 40px; gap: 0; }
@media (min-width: 1024px) { .post-layout { grid-template-columns: minmax(0, 720px) 300px; justify-content: space-between; gap: 48px; } }
.post-header { margin: 0; padding: 20px 0 0; }
.post-crumb { font-size: 13px; color: var(--accent); font-weight: 600; }
.post-title { font-size: 24px; line-height: 1.38; letter-spacing: -0.025em; font-weight: 800; color: var(--ink); margin: 8px 0 10px; }
.post-byline { font-size: 13px; color: var(--muted); margin: 0; }
@media (min-width: 768px) { .post-title { font-size: 30px; } .post-byline { font-size: 14px; } }

/* 본문 맨 앞 요약 */
.post-body.post-lead { margin: 18px 0; }
.post-body.post-lead blockquote { margin: 0; padding: 2px 0 2px 14px; border-left: 3px solid var(--ink); background: none; border-radius: 0; font-style: normal; color: var(--ink); }
.post-body.post-lead blockquote p { margin: 0 0 6px; font-size: 16px; line-height: 1.7; }
.post-body.post-lead blockquote p:last-child { margin-bottom: 0; }

.post-featured-wrapper { margin: 6px 0 18px; border: 0; border-radius: 0; box-shadow: none; background: none; }
.post-featured-image { width: 100% !important; height: auto !important; display: block; border-radius: 6px; box-shadow: none; margin: 0; background: var(--soft); }

/* 목차 (접힘) */
.post-toc { margin: 4px 0 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.post-toc summary { padding: 12px 0; font-size: 14px; font-weight: 700; color: var(--ink); cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.post-toc summary::-webkit-details-marker { display: none; }
.post-toc summary span { color: var(--muted); font-weight: 600; margin-right: auto; margin-left: 4px; }
.post-toc summary::after { content: "펼치기"; font-size: 13px; font-weight: 500; color: var(--muted); }
.post-toc[open] summary::after { content: "접기"; }
.post-toc .toc-list { padding: 0 0 12px; gap: 0; }
.post-toc .toc-item { font-size: 14.5px; line-height: 1.5; padding: 5px 0; }
.post-toc .toc-item.level-3 { padding-left: 14px; font-size: 14px; }
.post-toc .toc-link, .toc-desktop .toc-link { color: var(--body); border-left: 0; padding-left: 0; }
@media (min-width: 1024px) { .post-toc { display: none; } }
.toc-box { border: 0; border-radius: 0; padding: 0; background: none; }
.toc-desktop { margin-top: 24px; }
.toc-desktop .toc-title { font-size: 13px; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.toc-desktop .toc-item { font-size: 14px; line-height: 1.5; padding: 4px 0; }
.toc-desktop .toc-link.active { color: var(--accent); }

/* 본문 */
.post-body { font-size: 17px; line-height: 1.78; color: var(--body); }
.post-body p { margin: 0 0 18px; }
.post-body strong { color: var(--ink); }
.post-body a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
.post-body h2 { font-size: 20px; line-height: 1.42; letter-spacing: -0.02em; font-weight: 800; color: var(--ink); margin: 40px 0 12px; padding: 0; border: 0; }
.post-body h3 { font-size: 18px; line-height: 1.45; font-weight: 700; color: var(--ink); margin: 28px 0 8px; }
.post-body h4 { font-size: 17px; font-weight: 700; color: var(--ink); margin: 22px 0 6px; }
@media (min-width: 768px) { .post-body h2 { font-size: 23px; } .post-body h3 { font-size: 19px; } }
.post-body ul, .post-body ol { margin: 0 0 18px 1.25em; }
.post-body ul { list-style: disc; } .post-body ol { list-style: decimal; }
.post-body li { margin: 0 0 6px; }
.post-body li::marker { color: var(--muted); }
.post-body hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
/* 강조 박스는 회색 바탕 한 종류 */
.post-body blockquote { margin: 18px 0; padding: 12px 14px; background: var(--soft); border: 0; border-radius: 0; font-style: normal; color: var(--body); font-size: 15.5px; line-height: 1.7; }
.post-body blockquote p { margin: 0 0 8px; }
.post-body blockquote p:last-child { margin-bottom: 0; }
.post-body img { display: block; max-width: 100%; max-height: 520px; width: auto; height: auto; margin: 20px auto; border: 0; border-radius: 6px; box-shadow: none; object-fit: contain; transform: none !important; }
.post-body img:hover { border-color: transparent; box-shadow: none; }
/* 빌드 때 크기를 아는 이미지(--ar = 가로/세로): 로딩 전에도 자리를 잡아 화면 밀림 방지 */
.post-body img[style*="--ar"] { width: min(100%, calc(520px * var(--ar))); aspect-ratio: var(--ar); }
@media (max-width: 600px) {
  .post-body img { max-height: 360px; margin: 16px auto; }
  .post-body img[style*="--ar"] { width: min(100%, calc(360px * var(--ar))); }
}
.post-body table { font-size: 14.5px; margin: 16px 0 24px; border-top: 2px solid var(--ink); }
.post-body th, .post-body td { border: 0; border-bottom: 1px solid var(--line); padding: 9px 10px; }
.post-body th { background: var(--soft); color: var(--ink); font-weight: 700; }
.post-body tr:nth-child(even) { background: none; }
.post-body code { background: var(--soft); color: var(--ink); border-radius: 3px; }
.post-body pre { background: #1d1f24; border-radius: 4px; }

/* FAQ: 구분선 Q&A */
.faq-section { margin: 40px 0 0; }
.faq-title { font-size: 20px; font-weight: 800; color: var(--ink); margin: 0 0 4px; }
.faq-list { margin: 0; }
.faq-list dt { font-weight: 700; color: var(--ink); font-size: 16px; line-height: 1.5; padding-top: 14px; border-top: 1px solid var(--line); }
.faq-list dd { margin: 6px 0 14px; font-size: 15.5px; line-height: 1.7; color: var(--body); }

.post-cta { margin: 32px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.post-cta-title { font-weight: 700; color: var(--ink); margin: 0 0 4px; }
.post-cta p { margin: 0 0 8px; font-size: 15px; }
.post-cta a { color: var(--accent); font-weight: 600; text-decoration: underline; }

.post-disclose { margin: 32px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--muted); }
.post-tags { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 16px 0 0; font-size: 14px; }
.post-tags a { color: var(--muted); }
.post-tags a:hover { color: var(--accent); }

.share-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 20px 0 0; padding: 14px 0; border: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; background: none; box-shadow: none; }
.share-title { font-size: 13px; font-weight: 700; color: var(--muted); margin: 0; }
.share-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.share-btn { padding: 6px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--body); font-size: 13.5px; font-weight: 600; box-shadow: none; transform: none !important; }
.share-btn:hover, .share-btn.share-btn-naver:hover, .share-btn.share-btn-facebook:hover, .share-btn.share-btn-x:hover { background: #fff; color: var(--ink); border-color: var(--ink); }

.related-posts-section { margin: 16px 0 0; }

/* 구글 선호 출처 박스 */
.preferred-source-box { border-radius: 0 !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-bottom: 1px solid var(--line) !important; padding: 16px 0 !important; margin: 32px 0 8px !important; background: none !important; }
.preferred-source-text strong { font-size: 15.5px !important; }
.preferred-source-btn { border-radius: 4px !important; box-shadow: none !important; }

/* ---------- 광고: "광고" 표기, 채워지지 않으면 숨김 ---------- */
.adsense-slot { margin: 24px 0; border: 0 !important; background: transparent !important; }
.adsense-slot::before { content: "광고"; display: block; font-size: 11px; color: #9aa0a8; margin-bottom: 4px; letter-spacing: 0.04em; }
.adsense-slot:has(ins[data-ad-status="unfilled"]) { display: none; }
.adsense-sidebar::before { text-align: left; }

/* ---------- 푸터 ---------- */
.site-footer { margin-top: 24px; padding: 28px 0 40px; background: var(--soft); font-size: 13px; color: var(--muted); }
.foot-name { font-weight: 800; color: var(--ink); font-size: 15px; margin: 0 0 4px; }
.foot-desc { margin: 0 0 14px; line-height: 1.6; max-width: 640px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; }
.foot-links a { color: var(--muted); }
.foot-links a:hover { color: var(--ink); }
.foot-copy { margin: 14px 0 0; }

/* 검색·안내 페이지 등 공용 카드가 남아 있는 화면도 같은 톤으로 */
.card { border-radius: 6px; box-shadow: none !important; transform: none !important; }
.card-badge { display: none; }
.hero { display: none; }

/* ==========================================================================
   서울로또명당 모바일 개편 (2026-10-31)
   - 숫자는 고정폭(tabular)으로 오른쪽 정렬, 배지·알약 대신 굵은 숫자 하나
   - 표 대신 한 줄 목록: 375px 화면에서 가로 스크롤 없음
   - 누르는 곳은 높이 44px 이상
   ========================================================================== */
.store-rank, .map-links, .gu-index, .tool-links { font-variant-numeric: tabular-nums; }

/* 판매점 순위 (글 본문 · 구 페이지 공용) */
.post-body .store-rank, .store-rank { list-style: none; margin: 8px 0 20px; padding: 0; border-top: 2px solid var(--ink); }
.store-rank li { display: flex; align-items: flex-start; gap: 12px; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); line-height: 1.45; }
.store-rank .sr-no { flex: none; width: 20px; font-size: 15px; font-weight: 800; color: var(--muted); padding-top: 1px; }
.store-rank li:first-child .sr-no { color: var(--accent); }
.store-rank .sr-body { flex: 1; min-width: 0; display: block; }
.store-rank .sr-body strong { display: inline; font-size: 16px; color: var(--ink); font-weight: 700; }
.store-rank .sr-gu { margin-left: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.store-rank .sr-addr { display: block; margin-top: 2px; font-size: 13.5px; color: var(--muted); }
.store-rank .sr-count { flex: none; min-width: 44px; text-align: right; font-size: 20px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; }
.store-rank .sr-count small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 1px; }

/* 로또 공 (글 본문용, 색은 번호대별 공 색) */
.post-body .ball, .ball { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; font-size: 15px; font-weight: 700; color: #fff; flex: none; font-variant-numeric: tabular-nums; line-height: 1; }
.post-body .ball-sm { width: 28px; height: 28px; font-size: 13px; }
.post-body .ball-yellow { background: #f2b51b; }
.post-body .ball-blue { background: #3d7fd6; }
.post-body .ball-red { background: #e4513f; }
.post-body .ball-grey { background: #8a9099; }
.post-body .ball-green { background: #3faa5b; }
.post-body .ball-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 18px; }
.post-body .plus { color: var(--muted); font-size: 14px; margin: 0 2px; align-self: center; }

/* 판매점 1등 기록: 회차·날짜 한 줄, 그 아래 당첨 번호 */
.post-body .draw-hist { list-style: none; margin: 8px 0 22px; padding: 0; border-top: 2px solid var(--ink); }
.post-body .draw-hist li { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.post-body .draw-hist .dh-head { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.post-body .draw-hist .dh-head b { color: var(--ink); font-size: 15px; margin-right: 4px; }
.post-body .draw-hist .dh-balls { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* 근처 1등 판매점: 왼쪽 칸이 거리라 조금 넓게 */
.near-list .sr-no { width: 52px; font-size: 13px; font-weight: 700; color: var(--accent); }
.near-list li:first-child .sr-no { color: var(--accent); }
.post-body .near-list .sr-gu a { color: var(--muted); text-decoration: underline; }

/* 길찾기 링크 */
.post-body .map-links, .map-links { list-style: none; margin: 8px 0 20px; padding: 0; }
.map-links li { display: flex; align-items: center; gap: 0 16px; flex-wrap: wrap; margin: 0; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.map-links li span { flex: 1 1 100%; color: var(--ink); font-weight: 600; padding-top: 8px; }
.post-body .map-links a, .map-links a { display: inline-flex; align-items: center; min-height: 40px; color: var(--accent); font-size: 14.5px; font-weight: 600; text-decoration: none; }
@media (min-width: 640px) { .map-links li span { flex: 1 1 auto; padding-top: 0; } }

/* 페이지 머리 (구·도구 페이지 공용) */
.page-head { padding: 22px 0 18px; border-bottom: 1px solid var(--line); }
.page-head .kicker { display: block; font-size: 13px; font-weight: 600; color: var(--accent); margin-bottom: 4px; }
.page-head h1 { font-size: 23px; line-height: 1.35; letter-spacing: -0.025em; color: var(--ink); margin: 0 0 8px; font-weight: 800; }
.page-head p { font-size: 15px; line-height: 1.65; color: var(--muted); margin: 0; }
.big-figures { display: flex; gap: 28px; margin: 16px 0 0; padding: 0; list-style: none; }
.big-figures li { margin: 0; }
.big-figures b { display: block; font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.big-figures span { font-size: 13px; color: var(--muted); }
@media (min-width: 768px) { .page-head h1 { font-size: 28px; } }

.section-title { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -0.02em; margin: 32px 0 4px; }
.section-note { font-size: 14px; color: var(--muted); margin: 0 0 10px; line-height: 1.6; }

/* 25개 구 목록 (허브) */
.gu-index { list-style: none; margin: 8px 0 0; padding: 0; border-top: 2px solid var(--ink); }
.gu-index li { margin: 0; border-bottom: 1px solid var(--line); }
.gu-index a { display: flex; align-items: center; gap: 12px; padding: 12px 0; color: inherit; text-decoration: none; }
.gu-index .gi-rank { flex: none; width: 20px; font-size: 14px; font-weight: 700; color: var(--muted); }
.gu-index .gi-body { flex: 1; min-width: 0; }
.gu-index .gi-name { display: block; font-size: 16.5px; font-weight: 700; color: var(--ink); }
.gu-index .gi-top { display: block; font-size: 13.5px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gu-index .gi-bar { display: block; height: 3px; margin-top: 7px; background: var(--line); border-radius: 2px; overflow: hidden; }
.gu-index .gi-bar i { display: block; height: 100%; background: var(--accent); }
.gu-index .gi-count { flex: none; min-width: 48px; text-align: right; font-size: 19px; font-weight: 800; color: var(--ink); line-height: 1.2; }
.gu-index .gi-count small { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.gu-index a:hover .gi-name { color: var(--accent); }

/* 구 이동: 격자 (가로 스크롤 칩 대신, 한 화면에 25개가 다 보이게) */
.gu-grid { display: grid; grid-template-columns: repeat(5, 1fr); margin: 8px 0 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.gu-grid a { display: flex; align-items: center; justify-content: center; min-height: 46px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; letter-spacing: -0.02em; color: var(--body); text-decoration: none; }
.gu-grid a.on { background: var(--ink); color: #fff; font-weight: 700; }
.gu-grid a:hover { color: var(--accent); }
.gu-grid a.on:hover { color: #fff; }
@media (min-width: 768px) { .gu-grid a { font-size: 15px; } }

/* 동별 목록 (접힘) */
.dong-list { margin: 8px 0 0; border-top: 2px solid var(--ink); }
.dong-list details { border-bottom: 1px solid var(--line); }
.dong-list summary { display: flex; align-items: center; min-height: 50px; cursor: pointer; list-style: none; font-size: 16px; font-weight: 700; color: var(--ink); }
.dong-list summary::-webkit-details-marker { display: none; }
.dong-list summary small { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--muted); margin-left: 8px; }
.dong-list summary::after { content: "+"; font-size: 22px; font-weight: 300; color: var(--muted); width: 22px; text-align: center; }
.dong-list details[open] summary::after { content: "\2212"; }
.dong-list .store-rank { border-top: 0; margin: 0 0 6px; }
.dong-list .store-rank li { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.dong-list .store-rank li:last-child { border-bottom: 0; }
.dong-list .store-rank .sr-count { font-size: 17px; }

/* 다른 도구로 이동 (페이지 끝) */
.tool-links { list-style: none; margin: 36px 0 0; padding: 0; border-top: 1px solid var(--line); }
.tool-links li { margin: 0; border-bottom: 1px solid var(--line); }
.tool-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; color: var(--ink); text-decoration: none; font-size: 15.5px; font-weight: 600; }
.tool-links a span { font-size: 13.5px; font-weight: 400; color: var(--muted); text-align: right; }
.tool-links a:hover { color: var(--accent); }

/* 홈: 구 바로가기 + 도구 */
.home-tools { display: grid; grid-template-columns: 1fr 1fr; margin: 4px 0 0; border-top: 1px solid var(--line); }
.home-tools a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.home-tools a:nth-child(odd) { padding-right: 12px; border-right: 1px solid var(--line); }
.home-tools a:nth-child(even) { padding-left: 14px; }
.home-tools b { display: block; font-size: 15.5px; color: var(--ink); }
.home-tools span { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.45; }
.home-tools a:hover b { color: var(--accent); }
@media (min-width: 768px) {
  .home-tools { grid-template-columns: repeat(4, 1fr); }
  .home-tools a, .home-tools a:nth-child(odd), .home-tools a:nth-child(even) { padding: 12px 14px; border-right: 1px solid var(--line); }
  .home-tools a:first-child { padding-left: 0; }
  .home-tools a:last-child { border-right: 0; }
}

/* 모바일 상단 탭: 스크롤해도 붙어 있고, 오른쪽이 더 있다는 걸 흐림으로 표시 */
@media (max-width: 1023px) {
  .cat-tabs { position: sticky; top: 0; z-index: 20; gap: 20px; -webkit-mask-image: linear-gradient(90deg, #000 86%, transparent); mask-image: linear-gradient(90deg, #000 86%, transparent); }
  .cat-tabs a:last-child { margin-right: 32px; }
}
