/* ============================================================
   Vetping — Design Tokens & Global Styles
   Imported only on vetping.net (layout: vetping)
   ============================================================ */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  /* Mint primary */
  --mint-50:  #ecfaf2;
  --mint-100: #d3f3e0;
  --mint-200: #a8e7c4;
  --mint-300: #74d6a3;
  --mint-400: #3fc081;
  --mint-500: #1ea968;
  --mint-600: #128953;
  --mint-700: #0d6c42;
  --mint-800: #0a5235;
  --mint-900: #07392a;

  /* Sky secondary */
  --sky-50:   #ecf4fd;
  --sky-100:  #d6e7fb;
  --sky-200:  #a8cdf6;
  --sky-300:  #71afef;
  --sky-400:  #438fe5;
  --sky-500:  #2871d6;
  --sky-600:  #1a59b5;
  --sky-700:  #144690;
  --sky-800:  #103770;
  --sky-900:  #0b2750;

  /* Emergency red */
  --red-50:   #fdecec;
  --red-100:  #fbd2d2;
  --red-300:  #f48282;
  --red-500:  #e63838;
  --red-600:  #c41f1f;
  --red-700:  #971515;

  /* Warm amber */
  --amber-50:  #fef6e6;
  --amber-100: #fce5b8;
  --amber-500: #e89a13;
  --amber-700: #a06808;

  /* Neutrals */
  --ink-50:  #f7f8fa;
  --ink-100: #eef0f4;
  --ink-200: #dee2e9;
  --ink-300: #c3c9d3;
  --ink-400: #9ba2af;
  --ink-500: #707888;
  --ink-600: #4d5563;
  --ink-700: #333a47;
  --ink-800: #1f242e;
  --ink-900: #0f1218;

  --surface:        #ffffff;
  --surface-soft:   #fafbfc;
  --surface-tint:   #f5f8f5;
  --surface-tint-2: #f1f6fb;
  --border:         #e6e9ee;
  --border-strong:  #d4d8e0;

  --p:      var(--mint-500);
  --p-soft: var(--mint-50);
  --p-mid:  var(--mint-100);
  --p-dark: var(--mint-700);
  --acc:    var(--sky-500);

  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
               "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;

  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  --shadow-card: 0 1px 2px rgba(15,18,24,.04), 0 2px 8px rgba(15,18,24,.04);
  --shadow-pop:  0 4px 12px rgba(15,18,24,.06), 0 12px 32px rgba(15,18,24,.08);
  --shadow-lift: 0 1px 0 rgba(15,18,24,.02), 0 8px 24px rgba(15,18,24,.10);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.vp-body {
  font-family: var(--font-sans);
  color: var(--ink-800);
  background: #fff;
  font-feature-settings: "ss10", "tnum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.vp-body button { font-family: inherit; cursor: pointer; border: 0; background: 0; padding: 0; color: inherit; }
body.vp-body img, body.vp-body svg { display: block; max-width: 100%; }
body.vp-body a { color: inherit; text-decoration: none; }
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

@keyframes vp-pulse {
  0%   { box-shadow: 0 0 0 0 currentColor; }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}
.vp-scroll-x { overflow-x: auto; scrollbar-width: none; }
.vp-scroll-x::-webkit-scrollbar { display: none; }
.vp-keep-all { word-break: keep-all; overflow-wrap: anywhere; }
.vp-nowrap   { white-space: nowrap; }

/* ============================================================
   Mobile container — 100% width, max 480px center-aligned
   ============================================================ */
.vp-app {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  background: #fff;
  min-height: 100vh;
  position: relative;
}
.vp-desktop-app {
  width: 100%;
  background: #fff;
}

/* ============================================================
   Status chip (used by cards + detail)
   ============================================================ */
.vp-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.vp-status.open    { background: var(--mint-50); color: var(--mint-700); }
.vp-status.h24     { background: var(--red-50);  color: var(--red-600); }
.vp-status.warn    { background: var(--amber-50); color: var(--amber-700); }
.vp-status.er      { background: var(--red-500); color: #fff; }
.vp-status.closed  { background: var(--ink-100); color: var(--ink-500); }
.vp-status.unknown { background: var(--ink-50);  color: var(--ink-500); }
.vp-status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: inline-block;
}
.vp-status.open .dot   { background: var(--mint-500); animation: vp-pulse 2s infinite; }
.vp-status.h24 .dot    { background: var(--red-500); }
.vp-status.warn .dot   { background: var(--amber-500); }

/* ============================================================
   Common: filter chip row
   ============================================================ */
.vp-chips {
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
  padding: 0 16px;
}
.vp-chips::-webkit-scrollbar { display: none; }
.vp-chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600;
  background: #fff; border: 1px solid var(--border);
  color: var(--ink-700);
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.vp-chip:hover { border-color: var(--mint-300); color: var(--mint-700); }
.vp-chip.on   { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }
.vp-chip.on.er{ background: var(--red-500); border-color: var(--red-500); }
.vp-chip.er   { background: var(--red-50); color: var(--red-600); border-color: var(--red-100); }

/* ============================================================
   AdSense slot wrapper
   ============================================================ */
.vp-ads {
  margin: 16px;
  min-height: 90px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2px;
  color: var(--ink-400); font-size: 11px;
}

/* ============================================================
   Top bar (mobile)
   ============================================================ */
.vp-topbar {
  height: 52px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.vp-topbar .btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-pill);
  color: var(--ink-700);
  background: transparent;
}
.vp-topbar .title {
  font-size: 15px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================
   Sticky bottom CTA (mobile)
   ============================================================ */
.vp-sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 40;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff 30%);
  display: flex; gap: 8px;
  max-width: 480px; margin: 0 auto;
}
.vp-sticky-cta .call {
  flex: 0 0 56px; height: 52px;
  border-radius: var(--r-md);
  background: var(--ink-900); color: #fff;
  display: grid; place-items: center;
}
.vp-sticky-cta .insurance {
  flex: 1; height: 52px;
  border-radius: var(--r-md);
  background: var(--mint-500); color: #fff;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 14px; font-weight: 700;
}

/* ============================================================
   Footer (mobile)
   ============================================================ */
.vp-footer {
  background: var(--ink-900);
  color: rgba(255,255,255,0.6);
  padding: 28px 20px 24px;
  margin-top: 12px;
}
.vp-footer .brand {
  color: #fff;
  font-size: 18px; font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.vp-footer .desc { font-size: 11px; line-height: 1.6; }
.vp-footer .links {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin-top: 20px; font-size: 11px;
}
.vp-footer .links h5 {
  color: #fff;
  font-size: 11px; font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.vp-footer .links ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 4px;
  color: rgba(255,255,255,0.55);
}
.vp-footer .links a { color: inherit; }
.vp-footer .links a:hover { color: #fff; }
.vp-footer .legal {
  margin-top: 20px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 12px; line-height: 1.7; color: rgba(255,255,255,0.7);
}

/* ============================================================
   Desktop nav
   ============================================================ */
.vp-dnav {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.vp-dnav-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 16px 32px;
  display: grid; grid-template-columns: 140px 1fr auto;
  gap: 32px; align-items: center;
}
.vp-dnav .nav-btn {
  padding: 9px 16px;
  border-radius: 11px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-700);
  white-space: nowrap;
  background: transparent;
}
.vp-dnav .nav-btn:hover { background: var(--ink-50); }
.vp-dnav .nav-actions { display: flex; gap: 4px; align-items: center; }

/* ============================================================
   Defensive patches (from design package patches.css)
   ============================================================ */
.vp-app .vp-chip,
.vp-app .vp-status,
.vp-desktop-app .vp-chip,
.vp-desktop-app .vp-status { white-space: nowrap; }

.vp-keep-all h1, .vp-keep-all h2, .vp-keep-all h3 { word-break: keep-all; }
.vp-h1 { word-break: keep-all; overflow-wrap: anywhere; }

/* ============================================================
   Viewport toggle — mobile (≤1023px) vs desktop (≥1024px)
   ============================================================ */
.vp-desktop-only { display: none; }
.vp-mobile-only  { display: block; }

@media (min-width: 1024px) {
  .vp-mobile-only  { display: none !important; }
  .vp-desktop-only { display: block; }
}

/* Desktop app container */
.vp-desktop-app {
  width: 100%;
  background: var(--surface-soft);
  min-height: 100vh;
  font-family: var(--font-sans);
  color: var(--ink-800);
}
.vp-desktop-app a { color: inherit; text-decoration: none; }
.vp-desktop-app button { font-family: inherit; cursor: pointer; border: 0; background: 0; padding: 0; color: inherit; }

/* ============================================================
   Desktop — Top nav (shared)
   ============================================================ */
.vpD-top {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}
.vpD-top-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 16px 32px;
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 28px; align-items: center;
}
.vpD-top .pri-menu { display: flex; gap: 2px; }
.vpD-top .pri-menu a {
  padding: 8px 14px; border-radius: 9px;
  font-size: 13px; font-weight: 600;
  color: var(--ink-600); white-space: nowrap;
}
.vpD-top .pri-menu a:hover,
.vpD-top .pri-menu a.on { background: var(--ink-50); color: var(--ink-900); }
.vpD-top .right {
  display: flex; gap: 6px; align-items: center;
}
.vpD-top .loc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  background: var(--mint-50); border: 1px solid var(--mint-200);
  border-radius: var(--r-pill);
  font-size: 12px; font-weight: 700; color: var(--mint-700);
}
.vpD-top .loc-chip .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--mint-500); animation: vp-pulse 1.5s infinite;
}

/* ============================================================
   Desktop — Intent chip bar
   ============================================================ */
.vpD-intent {
  max-width: 1280px; margin: 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.vpD-intent-inner {
  padding: 14px 36px;
  display: flex; gap: 6px; align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
.vpD-intent-inner::-webkit-scrollbar { display: none; }
.vpD-intent .chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  font-size: 13px; font-weight: 600;
  background: #fff; border: 1px solid var(--border); color: var(--ink-700);
  white-space: nowrap; text-decoration: none;
  transition: all 0.12s;
}
.vpD-intent .chip:hover { border-color: var(--ink-400); }
.vpD-intent .chip.on { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }
.vpD-intent .chip.er { background: var(--red-500); color: #fff; border-color: var(--red-500); }
.vpD-intent .chip.er .pulse {
  width: 5px; height: 5px; border-radius: 50%; background: #fff;
  animation: vp-pulse 1.5s infinite;
}
.vpD-intent .sep {
  width: 1px; height: 22px; background: var(--border); margin: 0 8px; flex-shrink: 0;
}

/* ============================================================
   Desktop — Footer (compact)
   ============================================================ */
.vpD-footer {
  background: var(--ink-900);
  color: rgba(255,255,255,0.55);
  padding: 32px 0 24px;
  margin-top: 0;
}
.vpD-footer-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 0 32px;
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 36px; align-items: center;
}
.vpD-footer .links { display: flex; gap: 18px; }
.vpD-footer .links a { font-size: 12px; color: rgba(255,255,255,0.6); }
.vpD-footer .links a:hover { color: #fff; }
.vpD-footer .right {
  font-size: 11px; color: rgba(255,255,255,0.4);
  text-align: right;
}

/* ============================================================
   Naver gallery / facts (모바일 + 데스크톱)
   ============================================================ */
.vp-gallery { padding: 12px 16px 0; }
.vp-gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
}
.vp-gallery-cell {
  display: block; aspect-ratio: 1 / 1; overflow: hidden;
  border-radius: 8px; background: var(--ink-50);
}
.vp-gallery-cell img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform 0.2s;
}
.vp-gallery-cell:hover img { transform: scale(1.03); }
.vp-gallery-more {
  display: block; text-align: center; padding: 10px 0;
  font-size: 13px; font-weight: 600; color: var(--mint-700);
  text-decoration: none;
}

.vp-section { padding: 14px 16px 6px; }
.vp-section-h {
  font-size: 14px; font-weight: 800;
  color: var(--ink-900); margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.vp-menu-list {
  margin: 0; padding: 0; list-style: none;
  display: flex; flex-direction: column; gap: 4px;
}
.vp-menu-list li {
  font-size: 13px; color: var(--ink-700); padding: 2px 0;
}
.vp-conv-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.vp-conv-chip {
  display: inline-flex; align-items: center;
  padding: 5px 10px; border-radius: var(--r-pill);
  background: var(--mint-50); color: var(--mint-700);
  font-size: 12px; font-weight: 600;
}
.vp-notice-text {
  margin: 0 0 6px; font-size: 13px; color: var(--ink-700); line-height: 1.5;
}
.vp-notice-irr { margin: 0; font-size: 12px; color: var(--red-600); font-weight: 600; }

/* Desktop photo grid (4+1 mosaic) */
.dA-photo-grid {
  display: grid; gap: 4px;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  height: 100%;
}
.dA-photo-cell {
  overflow: hidden; border-radius: 0; background: var(--ink-50);
}
.dA-photo-cell.big { grid-row: span 2; }
.dA-photo-cell img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* 폐업 안내 배너 */
.vp-closed-banner {
  margin: 12px 16px; padding: 14px 16px;
  background: #fef2f2; border: 1px solid var(--red-100);
  border-radius: 12px;
  display: flex; gap: 12px; align-items: flex-start;
}
.vp-closed-icon { flex: 0 0 auto; padding-top: 2px; }
.vp-closed-body { min-width: 0; flex: 1; }
.vp-closed-title { font-size: 14px; font-weight: 800; color: var(--red-600); margin-bottom: 4px; }
.vp-closed-sub { font-size: 12px; color: var(--ink-600); margin-bottom: 8px; }
.vp-closed-nearby { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--red-100); }
.vp-closed-nearby-h { font-size: 12px; font-weight: 700; color: var(--ink-700); margin-bottom: 6px; }
.vp-closed-nearby ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.vp-closed-nearby a { font-size: 13px; color: var(--mint-700); font-weight: 600; text-decoration: none; }
.dA-closed-wrap { background: #fff; }
.dA-closed-wrap .dA-container { max-width: 1280px; margin: 0 auto; padding: 16px 32px 0; }
.dA-closed-wrap .vp-closed-banner { margin: 0; }

/* Desktop dA-card 내부에 partial render 시 padding 정리 */
.vp-desktop-app .dA-naver-card .vp-section { padding: 0; }
.vp-desktop-app .dA-naver-card .vp-section + .vp-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ink-100); }
.vp-desktop-app .dA-naver-card .vp-gallery { padding: 0; }
.vp-desktop-app .dA-naver-card .vp-section-h { font-size: 15px; margin-bottom: 10px; }

/* 결제 chip — conv chip 변형 */
.vp-conv-chip.pay { background: var(--sky-50); color: var(--sky-700); }

/* 우수업소 trust chip */
.trust-row .trust-chip.good-store { background: var(--amber-50); color: var(--amber-700); }

/* 병원 소개 + 블로그 링크 */
.vp-naver-intro { padding: 14px 16px 6px; }
.vp-intro-text { font-size: 13px; color: var(--ink-700); line-height: 1.6; margin: 0 0 10px; white-space: pre-wrap; }
.vp-intro-blog {
  display: inline-block; font-size: 13px; font-weight: 700;
  color: var(--mint-700); text-decoration: none;
  padding: 8px 14px; border-radius: var(--r-pill);
  background: var(--mint-50);
}
.vp-intro-blog.standalone { margin-top: 4px; }

/* 찾아오는 길 / 대중교통 */
.vp-loc-road { font-size: 13px; color: var(--ink-700); line-height: 1.55; margin: 0 0 12px; white-space: pre-wrap; }
.vp-loc-transit { margin-top: 10px; }
.vp-loc-transit-h { margin-bottom: 6px; }
.vp-loc-transit-badge {
  display: inline-block; padding: 2px 8px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.vp-loc-transit-badge.subway { background: var(--mint-50); color: var(--mint-700); }
.vp-loc-transit-badge.bus    { background: var(--sky-50); color: var(--sky-700); }
.vp-loc-list { margin: 0; padding: 0; list-style: none; }
.vp-loc-list li {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 0; font-size: 13px; color: var(--ink-800);
}
.vp-loc-list .dist { color: var(--ink-500); font-size: 12px; font-variant-numeric: tabular-nums; }

@media (min-width: 1024px) {
  .vp-app { display: none !important; }
}
@media (max-width: 1023px) {
  .vp-desktop-app { display: none !important; }
}
