/* ==========================================================================
   Apple design layer — 40-guides
   Guides: 108 visual guides (+lightbox), surgery classification search
   ========================================================================== */

/* ==========================================================================
   Shared bits for this area
   ========================================================================== */
:root #section-visual-guides .section-title,
:root #section-surgery-search .section-title,
:root .vg-featured-title,
:root .vg-thumb-title,
:root .surg-card-name,
:root .surg-advisor-title,
:root .tip-card-tag,
:root .guides-cta-bar .analysis-action-info strong {
  word-break: keep-all;
  overflow-wrap: break-word;
}

:root #section-visual-guides .section-subtitle,
:root #section-surgery-search .section-subtitle,
:root .vg-featured-sub,
:root .vg-summary-bullets li,
:root .vg-lb-bullet-list li,
:root .vg-advisor-box,
:root .vg-lb-advisor-box,
:root .surg-card-desc-box,
:root .surg-card-notes-box,
:root .surg-tip-card p,
:root .surg-empty-desc,
:root .guides-cta-bar .analysis-action-info span {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Apple search field (both sections) */
:root .vg-search-input-wrap,
:root .surgery-search-input-wrap {
  position: relative;
  width: 100%;
}

:root .vg-search-icon,
:root .surgery-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  color: var(--ap-text-3);
  opacity: 1;
  font-size: 0;
  line-height: 0;
  pointer-events: none;
}

:root .vg-search-input,
:root .surgery-search-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 44px;
  border: 0;
  border-radius: var(--ap-radius-s);
  background: var(--ap-tile);
  color: var(--ap-text);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.015em;
  text-overflow: ellipsis;
  box-shadow: none;
  transition: box-shadow var(--ap-dur) var(--ap-ease), background-color var(--ap-dur) var(--ap-ease);
  -webkit-appearance: none;
  appearance: none;
}

:root .vg-search-input::placeholder,
:root .surgery-search-input::placeholder {
  color: var(--ap-text-3);
  font-weight: 400;
}

:root .vg-search-input:focus,
:root .surgery-search-input:focus {
  outline: none;
  border: 0;
  box-shadow: var(--ap-focus);
}

/* iOS-style clear button: small filled circle */
:root .vg-search-clear-btn,
:root .surgery-clear-btn {
  right: 14px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ap-text-3);
  color: var(--ap-tile);
  font-size: 0;
  line-height: 0;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .vg-search-clear-btn svg,
:root .surgery-clear-btn svg {
  width: 10px;
  height: 10px;
}

:root .vg-search-clear-btn:hover,
:root .surgery-clear-btn:hover {
  background: var(--ap-text-2);
  color: var(--ap-tile);
}

/* Bottom consultation bars inside this area */
:root .guides-cta-bar.analysis-action-bar {
  margin-top: 40px;
  padding: 28px 32px;
  gap: 20px 32px;
  background: var(--ap-tile);
  border: 0;
  border-radius: var(--ap-radius-m);
  box-shadow: none;
}

:root .guides-cta-bar .analysis-action-left {
  flex: 1 1 420px;
  min-width: 0;
}

:root .guides-cta-bar .analysis-action-info {
  gap: 6px;
}

:root .guides-cta-bar .analysis-action-info strong {
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ap-text);
}

:root .guides-cta-bar .analysis-action-info span {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ap-text-2);
}

:root .guides-cta-bar .analysis-action-right {
  gap: 10px;
  flex-wrap: wrap;
}

:root .guides-cta-bar .btn-analysis-imo,
:root .guides-cta-bar .btn-analysis-kakao {
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  justify-content: center;
  box-shadow: none;
  transform: none;
  transition: background-color var(--ap-dur) var(--ap-ease), filter var(--ap-dur) var(--ap-ease);
}

:root .guides-cta-bar .btn-analysis-imo {
  background: var(--ap-blue);
  color: #fff;
}

:root .guides-cta-bar .btn-analysis-imo:hover {
  background: var(--ap-blue-hover);
  box-shadow: none;
  transform: none;
}

:root .guides-cta-bar .btn-analysis-kakao {
  background: var(--ap-kakao);
  color: var(--ap-kakao-text);
}

:root .guides-cta-bar .btn-analysis-kakao:hover {
  background: var(--ap-kakao);
  filter: brightness(0.96);
  transform: none;
}

/* ==========================================================================
   108 visual guides — category chips
   ========================================================================== */
:root .vg-category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  max-width: 1000px;
  margin: 0 auto 20px;
}

:root .vg-cat-btn {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-tile);
  color: var(--ap-text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: none;
  transform: none;
  transition: background-color var(--ap-dur) var(--ap-ease), color var(--ap-dur) var(--ap-ease);
}

:root .vg-cat-btn:hover {
  background: var(--ap-fill-2);
  color: var(--ap-text);
  border-color: transparent;
  transform: none;
}

:root .vg-cat-btn.active,
:root .vg-cat-btn.active:hover,
:root .vg-cat-btn.active[data-cat] {
  background: var(--ap-text);
  color: var(--ap-tile);
  border-color: transparent;
  box-shadow: none;
}

:root .vg-cat-count {
  margin-left: 3px;
  color: var(--ap-text-3);
  font-variant-numeric: tabular-nums;
  transition: color var(--ap-dur) var(--ap-ease);
}

:root .vg-cat-btn.active .vg-cat-count {
  color: color-mix(in srgb, var(--ap-tile) 62%, transparent);
}

/* ==========================================================================
   Search + keyword chips
   ========================================================================== */
:root .vg-search-container {
  max-width: 1000px;
  margin: 0 auto 48px;
  gap: 14px;
}

:root .vg-search-container .vg-search-input-wrap {
  max-width: 760px;
  margin: 0 auto;
}

:root .vg-quick-tags {
  justify-content: center;
  gap: 8px;
  padding: 0;
}

:root .vg-tag-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ap-text-2);
  margin-right: 2px;
  white-space: nowrap;
}

:root .vg-tag-btn {
  min-height: 32px;
  padding: 0 13px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-fill-2);
  color: var(--ap-text);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .vg-tag-btn:hover {
  background: var(--ap-hairline);
  border-color: transparent;
  color: var(--ap-text);
}

/* ==========================================================================
   Featured panel: one big white tile
   ========================================================================== */
:root .vg-featured-showcase {
  margin-bottom: 72px;
}

:root .vg-featured-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px;
  padding: 32px;
  background: var(--ap-tile);
  border: 0;
  border-radius: var(--ap-radius-l);
  box-shadow: none;
  overflow: hidden;
  transition: none;
}

:root .vg-featured-img-wrap {
  align-self: start;
  aspect-ratio: 819 / 1024;
  min-height: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-fill);
  overflow: hidden;
  isolation: isolate;
}

:root .vg-featured-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.6s var(--ap-ease);
}

:root .vg-featured-img-wrap:hover .vg-featured-img {
  transform: scale(1.015);
}

:root .vg-featured-img-overlay {
  background: none;
  padding: 16px;
  align-items: flex-end;
  justify-content: flex-end;
}

/* The badge repeats the pill shown next to the title */
:root .vg-featured-img-badge {
  display: none;
}

:root .vg-featured-zoom-hint {
  gap: 6px;
  padding: 7px 13px 7px 11px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  background: color-mix(in srgb, var(--ap-tile) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--ap-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

:root .vg-featured-info-col {
  padding: 8px 8px 4px 0;
  min-width: 0;
  gap: 28px;
}

:root .vg-featured-meta-row {
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 10px;
}

:root .vg-cat-tag {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ap-orange);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

:root .vg-badge-pill {
  padding: 3px 10px;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-fill);
  color: var(--ap-text-2);
  font-size: 12px;
  font-weight: 500;
}

:root .vg-featured-title {
  margin: 0 0 8px;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ap-text);
}

:root .vg-featured-sub {
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ap-text-2);
}

/* 30-second summary — clean list on a fill box */
:root .vg-summary-box {
  margin: 0 0 28px;
  padding: 20px 24px 22px;
  border: 0;
  border-radius: var(--ap-radius-s);
  background: var(--ap-fill);
}

:root .vg-summary-head {
  display: block;
  margin-bottom: 12px;
  color: var(--ap-text-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

:root .vg-summary-bullets,
:root .vg-lb-bullet-list {
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 10px;
}

:root .vg-summary-bullets li,
:root .vg-lb-bullet-list li {
  position: relative;
  padding-left: 16px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ap-text);
}

:root .vg-summary-bullets li::before,
:root .vg-lb-bullet-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 0.66em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ap-text-3);
}

/* Stats: big number + small gray label, no boxes */
:root .vg-stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 0 0 28px;
}

:root .vg-stats-grid .vg-stat-chip {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: left;
}

:root .vg-stats-grid .vg-stat-chip-val {
  font-family: var(--ap-font-num);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ap-text);
  word-break: keep-all;
}

:root .vg-stats-grid .vg-stat-chip-label {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--ap-text-2);
}

/* Advisor tip — fill callout */
:root .vg-advisor-box,
:root .vg-lb-advisor-box {
  margin: 0;
  padding: 16px 20px 18px;
  border: 0;
  border-radius: var(--ap-radius-s);
  background: var(--ap-fill);
  color: var(--ap-text);
  font-size: 15px;
  line-height: 1.55;
}

:root .vg-advisor-label {
  display: block;
  margin-bottom: 4px;
  color: var(--ap-text-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

/* CTAs as pills */
:root .vg-featured-actions {
  gap: 10px;
}

:root .vg-featured-actions .btn-vg-expand,
:root .vg-featured-actions .btn-vg-chat {
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--ap-radius-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: none;
  transform: none;
  filter: none;
  transition: background-color var(--ap-dur) var(--ap-ease), color var(--ap-dur) var(--ap-ease), border-color var(--ap-dur) var(--ap-ease), filter var(--ap-dur) var(--ap-ease);
}

:root .vg-featured-actions .btn-vg-expand {
  background: var(--ap-blue);
  color: #fff;
}

:root .vg-featured-actions .btn-vg-expand:hover {
  background: var(--ap-blue-hover);
  box-shadow: none;
  transform: none;
}

:root .vg-featured-actions .btn-vg-chat {
  background: var(--ap-kakao);
  color: var(--ap-kakao-text);
}

:root .vg-featured-actions .btn-vg-chat:hover {
  filter: brightness(0.96);
  transform: none;
}

:root .vg-featured-actions .btn-vg-expand.btn-vg-sign {
  background: transparent;
  border-color: currentColor;
  color: var(--ap-link);
}

:root .vg-featured-actions .btn-vg-expand.btn-vg-sign:hover {
  background: var(--ap-link);
  border-color: var(--ap-link);
  color: #fff;
}

/* ==========================================================================
   Gallery — Apple Store product tiles
   ========================================================================== */
:root .vg-gallery-header {
  margin: 0 0 20px;
  padding: 0 4px;
}

:root .vg-gallery-count-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
}

:root .vg-gallery-count-badge {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ap-text);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

:root .vg-gallery-count-sub {
  margin: 0;
  color: var(--ap-text-2);
  font-size: 14px;
}

:root .vg-gallery-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 20px;
}

:root .vg-thumb-card {
  position: relative;
  background: var(--ap-tile);
  border: 0;
  border-radius: var(--ap-radius-m);
  box-shadow: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--ap-dur) var(--ap-ease), box-shadow var(--ap-dur) var(--ap-ease);
}

:root .vg-thumb-card:hover {
  transform: scale(1.01);
  border-color: transparent;
  box-shadow: var(--ap-shadow-tile-hover);
}

:root .vg-thumb-card.active {
  border: 0;
  box-shadow: 0 0 0 2px var(--ap-accent);
}

:root .vg-thumb-card.active:hover {
  box-shadow: 0 0 0 2px var(--ap-accent), var(--ap-shadow-tile-hover);
}

:root .vg-thumb-img-wrap {
  height: auto;
  aspect-ratio: 4 / 3;
  background: var(--ap-fill);
}

:root .vg-thumb-img {
  display: block;
  object-fit: cover;
  object-position: center top;
  transition: none;
}

:root .vg-thumb-card:hover .vg-thumb-img {
  transform: none;
}

:root .vg-thumb-badge {
  top: auto;
  bottom: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 4px 10px;
  border-radius: var(--ap-radius-pill);
  background: color-mix(in srgb, var(--ap-tile) 78%, transparent);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--ap-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.005em;
}

:root .vg-thumb-body {
  padding: 18px 20px 22px;
  gap: 6px;
}

:root .vg-thumb-cat {
  color: var(--ap-orange);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

:root .vg-thumb-title {
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ap-text);
}

:root .vg-thumb-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ap-text-2);
}

/* Empty state (shared by both searches) */
:root .surg-empty-state {
  padding: 64px 24px;
  border: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-tile);
  text-align: center;
}

:root .surg-empty-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--ap-text-3);
  font-size: 0;
  line-height: 0;
}

:root .surg-empty-title {
  margin-bottom: 8px;
  color: var(--ap-text);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

:root .surg-empty-desc {
  max-width: 560px;
  margin: 0 auto;
  color: var(--ap-text-2);
  font-size: 15px;
  line-height: 1.55;
}

:root .surg-empty-desc strong {
  color: var(--ap-text);
  font-weight: 600;
}

:root .surg-empty-cta {
  margin-top: 22px;
}

/* ==========================================================================
   Lightbox — photo-viewer sheet
   ========================================================================== */
:root #vg-lightbox-modal.modal-backdrop {
  /* legacy .modal-backdrop is opacity:0 unless .active; JS only toggles display */
  opacity: 1;
  pointer-events: auto;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  z-index: 10500;
}

:root .vg-lightbox-window {
  width: 100%;
  max-width: 1200px;
  height: min(880px, calc(100vh - 48px));
  max-height: none;
  border: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-tile);
  box-shadow: var(--ap-shadow-modal);
  overflow: hidden;
}

:root .vg-lightbox-modal-header {
  flex: none;
  gap: 16px;
  padding: 14px 16px 14px 24px;
  border-bottom: 1px solid var(--ap-hairline-soft);
  background: var(--ap-tile);
}

:root .vg-lb-header-left {
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

:root .vg-lb-badge {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ap-orange);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

:root .vg-lb-title {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ap-text);
  font-size: 19px;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.02em;
}

:root .vg-lb-header-actions {
  flex: none;
  gap: 8px;
}

:root .btn-vg-lb-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px 0 11px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-fill);
  color: var(--ap-text);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .btn-vg-lb-tool:hover {
  background: var(--ap-fill-2);
  color: var(--ap-text);
}

:root .btn-vg-lb-tool::before {
  content: '';
  flex: none;
  width: 16px;
  height: 16px;
  background: currentColor;
  -webkit-mask: var(--vg-tool-icon) center / contain no-repeat;
  mask: var(--vg-tool-icon) center / contain no-repeat;
}

:root .vg-lb-tool-zoom {
  --vg-tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5L20 20M10.5 8v5M8 10.5h5'/%3E%3C/svg%3E");
}

:root .vg-lb-tool-save {
  --vg-tool-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7.5 10.5L12 15l4.5-4.5M5 19.5h14'/%3E%3C/svg%3E");
}

:root .vg-lightbox-body-layout {
  grid-template-columns: minmax(0, 1fr) 380px;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

:root .vg-lb-image-pane {
  position: relative;
  min-height: 0;
  padding: 0;
  background: var(--ap-fill);
  overflow: auto;
}

:root .vg-lb-image {
  position: absolute;
  inset: 24px;
  width: calc(100% - 48px);
  height: calc(100% - 48px);
  max-width: none;
  max-height: none;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  transition: none;
}

/* "원본" toggle: show the file at its natural size and let the pane scroll */
:root .vg-lb-image-pane:has(.vg-lb-image.zoomed) {
  display: block;
  padding: 24px;
}

:root .vg-lb-image.zoomed {
  position: static;
  display: block;
  width: auto;
  height: auto;
  margin: 0 auto;
  transform: none;
  cursor: zoom-out;
}

:root .vg-lb-sidebar-pane {
  gap: 28px;
  padding: 28px 28px 24px;
  background: var(--ap-tile);
}

:root .vg-lb-sidebar-section {
  min-width: 0;
}

:root .vg-lb-section-title {
  margin: 0 0 12px;
  color: var(--ap-text);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Stats as a spec list: label left, value right, hairlines */
:root .vg-lb-stats-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

:root .vg-lb-stats-wrap .vg-stat-chip {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border: 0;
  border-top: 1px solid var(--ap-hairline-soft);
  border-radius: 0;
  background: none;
  text-align: left;
}

:root .vg-lb-stats-wrap .vg-stat-chip:last-child {
  border-bottom: 1px solid var(--ap-hairline-soft);
}

:root .vg-lb-stats-wrap .vg-stat-chip-label {
  display: block;
  flex: 0 1 auto;
  margin: 0;
  color: var(--ap-text-2);
  font-size: 14px;
  font-weight: 400;
}

:root .vg-lb-stats-wrap .vg-stat-chip-val {
  flex: 0 1 auto;
  color: var(--ap-text);
  font-size: 15px;
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}

:root .vg-lb-cta-group {
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
  border-top: 0;
}

:root .btn-vg-lb-sign,
:root .btn-vg-lb-kakao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 1 1 0;
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color var(--ap-dur) var(--ap-ease), filter var(--ap-dur) var(--ap-ease);
}

:root .btn-vg-lb-sign {
  background: var(--ap-blue);
  color: #fff;
}

:root .btn-vg-lb-sign:hover {
  background: var(--ap-blue-hover);
}

:root .btn-vg-lb-kakao {
  background: var(--ap-kakao);
  color: var(--ap-kakao-text);
}

:root .btn-vg-lb-kakao:hover {
  filter: brightness(0.96);
}

/* ==========================================================================
   Surgery classification search
   ========================================================================== */
:root .surgery-standard-pill {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 14px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-fill-2);
  color: var(--ap-text-2);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  word-break: keep-all;
}

/* Control panel tile */
:root .surgery-search-card {
  gap: 24px;
  margin-bottom: 48px;
  padding: 32px;
  border: 0;
  border-radius: var(--ap-radius-l);
  background: var(--ap-tile);
  box-shadow: none;
}

:root .surgery-search-input {
  height: 52px;
  padding: 0 48px 0 48px;
  background: var(--ap-fill);
}

:root .surgery-search-icon {
  left: 17px;
}

:root .surgery-grade-filter-row {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

:root .grade-filter-label,
:root .sheet-select-label,
:root .chips-label {
  color: var(--ap-text-2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

:root .surgery-grade-pills {
  gap: 8px;
}

:root .surgery-grade-pills .surg-grade-pill {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-fill);
  color: var(--ap-text);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow: none;
  transform: none;
  transition: background-color var(--ap-dur) var(--ap-ease), color var(--ap-dur) var(--ap-ease);
}

:root .surgery-grade-pills .surg-grade-pill:hover {
  background: var(--ap-fill-2);
  color: var(--ap-text);
  border-color: transparent;
  transform: none;
}

:root .surgery-grade-pills .surg-grade-pill.active,
:root .surgery-grade-pills .surg-grade-pill.active:hover {
  background: var(--ap-text);
  color: var(--ap-tile);
  box-shadow: none;
}

:root .surgery-subfilter-row {
  gap: 16px 32px;
  padding-top: 22px;
  border-top: 1px solid var(--ap-hairline-soft);
  align-items: flex-start;
  justify-content: flex-start;
}

:root .surgery-sheet-select-wrap {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: 0 0 300px;
}

:root .surgery-sheet-select-wrap .surgery-sheet-select {
  width: 100%;
}

:root .surgery-sheet-select {
  min-height: 40px;
  padding: 0 38px 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--ap-fill) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 12px center / 16px 16px;
  color: var(--ap-text);
  font-size: 14px;
  font-weight: 500;
  -webkit-appearance: none;
  appearance: none;
  transition: box-shadow var(--ap-dur) var(--ap-ease);
}

:root .surgery-sheet-select:focus {
  border: 0;
  box-shadow: var(--ap-focus);
}

:root .surgery-popular-chips-wrap {
  flex: 1 1 480px;
  min-width: 0;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 10px;
}

:root .surgery-chips {
  gap: 6px;
}

:root .surg-chip {
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-fill);
  color: var(--ap-text);
  font-size: 13px;
  font-weight: 400;
  white-space: nowrap;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .surg-chip:hover {
  background: var(--ap-fill-2);
  border-color: transparent;
  color: var(--ap-text);
}

/* Results header: count + legend */
:root .surgery-results-stats-bar {
  align-items: baseline;
  gap: 12px 24px;
  margin-bottom: 16px;
  padding: 0 4px;
}

:root .surg-count-text {
  color: var(--ap-text-2);
  font-size: 15px;
}

:root .surg-count-num {
  color: var(--ap-text);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}

:root .surg-filter-summary {
  margin-left: 6px;
  color: var(--ap-text-3);
  font-size: 13px;
}

/* Single-hue grade scale: accent at increasing strength */
:root {
  --surg-g1: color-mix(in srgb, var(--ap-accent) 12%, transparent);
  --surg-g2: color-mix(in srgb, var(--ap-accent) 24%, transparent);
  --surg-g3: color-mix(in srgb, var(--ap-accent) 42%, transparent);
  --surg-g4: color-mix(in srgb, var(--ap-accent) 72%, transparent);
  --surg-g5: var(--ap-accent);
  --surg-ink: color-mix(in srgb, var(--ap-accent) 58%, var(--ap-text));
}

:root .surg-legend-tags {
  gap: 6px 16px;
}

:root .surg-legend-item,
:root .surg-legend-item[class*="l-"] {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ap-text-2);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

:root .surg-legend-item::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--ap-fill-2);
}

:root .surg-legend-item.l-1::before { background: var(--surg-g1); }
:root .surg-legend-item.l-2::before { background: var(--surg-g2); }
:root .surg-legend-item.l-3::before { background: var(--surg-g3); }
:root .surg-legend-item.l-4::before { background: var(--surg-g4); }
:root .surg-legend-item.l-5::before { background: var(--surg-g5); }
:root .surg-legend-item.l-n::before { background: var(--ap-fill-2); }

/* Results: one white tile, rows separated by hairlines */
:root .surgery-results-list {
  gap: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-tile);
  overflow: hidden;
}

:root .surgery-results-list .surg-empty-state {
  background: transparent;
  border-radius: 0;
}

:root .surgery-item-card {
  gap: 12px;
  padding: 26px 32px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transition: none;
}

:root .surgery-item-card + .surgery-item-card {
  border-top: 1px solid var(--ap-hairline-soft);
}

:root .surgery-item-card:hover {
  border-color: var(--ap-hairline-soft);
  box-shadow: none;
}

:root .surg-card-header {
  align-items: flex-start;
  gap: 16px;
}

:root .surg-card-title-wrap {
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px 12px;
}

:root .surg-grade-badge {
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-fill-2);
  color: var(--ap-text);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

:root .surg-grade-badge.g-1 { background: var(--surg-g1); color: var(--surg-ink); }
:root .surg-grade-badge.g-2 { background: var(--surg-g2); color: var(--surg-ink); }
:root .surg-grade-badge.g-3 { background: var(--surg-g3); color: var(--surg-ink); }
:root .surg-grade-badge.g-4 { background: var(--surg-g4); color: #fff; }
:root .surg-grade-badge.g-5 { background: var(--surg-g5); color: #fff; }
:root .surg-grade-badge.g-N,
:root .surg-grade-badge.g-n { background: var(--ap-fill-2); color: var(--ap-text-2); }
:root .surg-grade-badge.g-품의 { background: var(--ap-fill-2); color: var(--ap-text); }

:root .surg-card-name {
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ap-text);
  min-width: 0;
}

:root .surg-card-system-badge {
  padding: 3px 9px;
  border: 0;
  border-radius: 6px;
  background: var(--ap-fill);
  color: var(--ap-text-2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

:root .btn-surg-ask {
  flex: none;
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-fill);
  color: var(--ap-link);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .btn-surg-ask:hover {
  background: var(--ap-fill-2);
  color: var(--ap-link);
}

:root .surg-card-section-clause {
  margin: 0;
  color: var(--ap-text-2);
  font-size: 13px;
  line-height: 1.5;
}

:root .surg-card-section-clause strong {
  color: var(--ap-text-2);
  font-weight: 600;
}

:root .surg-card-desc-box {
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ap-text);
  font-size: 15px;
  line-height: 1.6;
}

:root .surg-card-desc-box strong {
  color: var(--ap-text);
  font-weight: 600;
}

:root .surg-card-notes-box {
  gap: 10px;
  padding: 12px 16px;
  border: 0;
  border-radius: var(--ap-radius-s);
  background: var(--ap-orange-soft);
  color: var(--ap-text);
  font-size: 14px;
  line-height: 1.55;
}

:root .surg-card-notes-box strong {
  color: var(--ap-orange);
  font-weight: 600;
}

:root .surg-card-notes-icon {
  display: flex;
  margin-top: 2px;
  color: var(--ap-orange);
  font-size: 0;
  line-height: 0;
}

:root .surg-card-footer {
  gap: 4px 16px;
  padding-top: 2px;
  border-top: 0;
}

:root .surg-card-footer-tip,
:root .surg-card-footer-src {
  color: var(--ap-text-3);
  font-size: 12px;
  line-height: 1.4;
}

/* Load more */
:root .surgery-pagination-row {
  margin-top: 28px;
}

:root .btn-surgery-load-more {
  gap: 8px;
  min-height: 44px;
  padding: 0 24px;
  border: 1px solid currentColor;
  border-radius: var(--ap-radius-pill);
  background: transparent;
  color: var(--ap-link);
  font-size: 15px;
  font-weight: 500;
  box-shadow: none;
  transform: none;
  transition: background-color var(--ap-dur) var(--ap-ease), color var(--ap-dur) var(--ap-ease);
}

:root .btn-surgery-load-more:hover {
  background: var(--ap-link);
  border-color: var(--ap-link);
  color: #fff;
  box-shadow: none;
  transform: none;
}

:root .load-more-counter {
  font-size: 14px;
  opacity: 0.72;
}

/* Advisor tips */
:root .surgery-advisor-box {
  margin-top: 64px;
  padding: 40px;
  border: 0;
  border-radius: var(--ap-radius-l);
  background: var(--ap-tile);
  box-shadow: none;
}

:root .surg-advisor-header {
  margin-bottom: 28px;
}

:root .surg-advisor-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ap-text);
}

:root .surg-advisor-sub {
  margin: 8px 0 0;
  color: var(--ap-text-2);
  font-size: 17px;
  line-height: 1.5;
}

:root .surg-tips-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

:root .surg-tip-card {
  padding: 24px 24px 26px;
  border: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-fill);
}

:root .tip-card-tag {
  margin-bottom: 10px;
  color: var(--ap-text);
  font-size: 17px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.02em;
}

:root .tip-card-num {
  display: block;
  margin-bottom: 6px;
  color: var(--ap-orange);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
}

:root .surg-tip-card p {
  color: var(--ap-text-2);
  font-size: 15px;
  line-height: 1.6;
}

:root .surg-tip-card p strong {
  color: var(--ap-text);
  font-weight: 600;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1068px) {
  :root .vg-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  :root .vg-featured-card {
    gap: 36px;
    padding: 28px;
  }

  :root .vg-featured-title { font-size: 26px; }

  :root .surg-tips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  :root .vg-featured-card {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  :root .vg-featured-img-wrap {
    width: 100%;
    max-width: 520px;
    justify-self: center;
  }

  :root .vg-featured-info-col {
    padding: 0;
  }
}

@media (max-width: 860px) {
  :root .vg-lightbox-body-layout {
    grid-template-columns: 1fr;
    overflow-x: hidden;
    overflow-y: auto;
  }

  :root .vg-lb-image-pane,
  :root .vg-lb-image-pane:has(.vg-lb-image.zoomed) {
    display: block;
    padding: 16px;
    overflow: auto;
  }

  :root .vg-lb-image {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    max-width: 560px;
    margin: 0 auto;
  }

  :root .vg-lb-image.zoomed {
    width: auto;
    max-width: none;
  }

  :root .vg-lb-sidebar-pane {
    overflow: visible;
  }
}

@media (max-width: 734px) {
  /* Chip rows become horizontal scrollers */
  :root .vg-category-filter,
  :root .vg-quick-tags,
  :root .surgery-grade-pills,
  :root .surgery-chips {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
  }

  :root .vg-category-filter::-webkit-scrollbar,
  :root .vg-quick-tags::-webkit-scrollbar,
  :root .surgery-grade-pills::-webkit-scrollbar,
  :root .surgery-chips::-webkit-scrollbar {
    display: none;
  }

  :root .vg-category-filter > *,
  :root .vg-quick-tags > *,
  :root .surgery-grade-pills > *,
  :root .surgery-chips > * {
    flex: none;
    scroll-snap-align: start;
  }

  :root .vg-category-filter,
  :root .vg-quick-tags {
    margin-left: calc(var(--ap-gutter) * -1);
    margin-right: calc(var(--ap-gutter) * -1);
    padding: 0 var(--ap-gutter);
    scroll-padding: 0 var(--ap-gutter);
  }

  :root .vg-category-filter {
    max-width: none;
    margin-bottom: 16px;
  }

  :root .vg-search-container {
    margin-bottom: 36px;
  }

  :root .vg-search-input,
  :root .surgery-search-input {
    font-size: 16px;
  }

  :root .vg-featured-showcase {
    margin-bottom: 48px;
  }

  :root .vg-featured-card {
    gap: 24px;
    padding: 16px 16px 24px;
    border-radius: var(--ap-radius-m);
  }

  :root .vg-featured-img-wrap {
    border-radius: 12px;
  }

  :root .vg-featured-info-col {
    padding: 0 4px;
    gap: 24px;
  }

  :root .vg-featured-title {
    font-size: 24px;
  }

  :root .vg-featured-sub {
    font-size: 16px;
    margin-bottom: 20px;
  }

  :root .vg-summary-box {
    padding: 18px 18px 20px;
    margin-bottom: 24px;
  }

  /* Stats as a spec list on phones */
  :root .vg-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 24px;
  }

  :root .vg-stats-grid .vg-stat-chip {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-top: 1px solid var(--ap-hairline-soft);
  }

  :root .vg-stats-grid .vg-stat-chip:last-child {
    border-bottom: 1px solid var(--ap-hairline-soft);
  }

  :root .vg-stats-grid .vg-stat-chip-val {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.02em;
    text-align: right;
  }

  :root .vg-stats-grid .vg-stat-chip-label {
    font-size: 14px;
  }

  :root .vg-featured-actions {
    flex-direction: column;
    align-items: stretch;
  }

  :root .vg-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  :root .vg-thumb-body {
    padding: 14px 14px 18px;
  }

  :root .vg-thumb-title {
    font-size: 16px;
  }

  /* Lightbox becomes a full-screen sheet */
  :root #vg-lightbox-modal.modal-backdrop {
    padding: 0;
    align-items: stretch;
  }

  :root .vg-lightbox-window {
    height: 100%;
    max-width: none;
    border-radius: 0;
  }

  :root .vg-lightbox-modal-header {
    gap: 10px;
    padding: 12px 12px 12px 16px;
  }

  :root .vg-lb-title {
    font-size: 17px;
  }

  :root .btn-vg-lb-tool {
    width: 36px;
    padding: 0;
    justify-content: center;
    gap: 0;
    font-size: 0;
  }

  :root .btn-vg-lb-tool::before {
    width: 17px;
    height: 17px;
  }

  :root .vg-lb-sidebar-pane {
    padding: 24px 20px 28px;
    gap: 24px;
  }

  /* Surgery */
  :root .surgery-standard-pill {
    font-size: 12px;
  }

  :root .surgery-search-card {
    gap: 20px;
    margin-bottom: 36px;
    padding: 20px;
    border-radius: var(--ap-radius-m);
  }

  :root .surgery-grade-filter-row,
  :root .surgery-sheet-select-wrap,
  :root .surgery-popular-chips-wrap {
    width: 100%;
  }

  :root .surgery-grade-pills,
  :root .surgery-chips {
    width: calc(100% + 40px);
    margin: 0 -20px;
    padding: 0 20px;
    scroll-padding: 0 20px;
  }

  :root .surgery-subfilter-row {
    flex-direction: column;
    padding-top: 18px;
  }

  :root .surgery-sheet-select-wrap {
    flex: none;
  }

  :root .surgery-sheet-select {
    width: 100%;
    font-size: 16px;
  }

  :root .surgery-popular-chips-wrap {
    flex: none;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
  }

  :root .surgery-results-stats-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  :root .surgery-item-card {
    padding: 22px 20px 20px;
  }

  :root .surg-card-header {
    flex-direction: column;
    gap: 12px;
  }

  :root .surg-card-name {
    font-size: 17px;
    flex-basis: 100%;
  }

  :root .surgery-advisor-box {
    margin-top: 48px;
    padding: 28px 20px;
    border-radius: var(--ap-radius-m);
  }

  :root .surg-advisor-title {
    font-size: 24px;
  }

  :root .surg-advisor-sub {
    font-size: 16px;
  }

  :root .surg-tip-card {
    padding: 20px;
  }

  :root .guides-cta-bar.analysis-action-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 24px 20px;
  }

  :root .guides-cta-bar .analysis-action-left {
    flex: none;
  }

  :root .guides-cta-bar .analysis-action-info strong {
    font-size: 17px;
  }

  :root .guides-cta-bar .analysis-action-right {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 560px) {
  /* Compact product rows: thumbnail left, text right */
  :root .vg-gallery-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  :root .vg-thumb-card {
    flex-direction: row;
    align-items: stretch;
  }

  :root .vg-thumb-card:hover {
    transform: none;
  }

  :root .vg-thumb-img-wrap {
    flex: none;
    width: 104px;
    aspect-ratio: auto;
    min-height: 124px;
  }

  :root .vg-thumb-img {
    position: absolute;
    inset: 0;
  }

  :root .vg-thumb-badge {
    display: none;
  }

  :root .vg-thumb-body {
    justify-content: center;
    min-width: 0;
    padding: 14px 16px;
    gap: 4px;
  }
}
