/* ============================================================
   KOREA SMA 의약품 제품교육 플랫폼 - 메인 스타일시트
   팔레트: 로고의 블루(#43AFDA) + 그레이(#6E6E6E) 기반
   ============================================================ */

:root {
  --primary: #3FAFDD;
  --primary-dark: #2B8FB8;
  --primary-deep: #1F6E8F;
  --primary-tint: #EAF7FC;
  --primary-tint-2: #DCF1F9;
  --ink: #2B3238;
  --gray: #6E7378;
  --gray-soft: #9CA3AA;
  --border: #E5EAEE;
  --bg: #FFFFFF;
  --bg-soft: #F5F9FB;
  --live: #FF4D5E;
  --accent: #37B893;
  --shadow-sm: 0 2px 10px rgba(31, 71, 92, 0.06);
  --shadow-md: 0 12px 32px rgba(31, 71, 92, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--primary-dark); outline-offset: 2px; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 24px;
  height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 17px; letter-spacing: 0.5px; color: var(--ink); font-weight: 800; }
.brand-text small { font-size: 11px; color: var(--gray-soft); letter-spacing: 1px; }

.main-nav {
  display: flex; align-items: center; flex: 1; min-width: 0;
}
.nav-links-scroll {
  display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
  -ms-overflow-style: none; flex: 1; min-width: 0;
}
.nav-links-scroll::-webkit-scrollbar { display: none; }
.main-nav a {
  padding: 10px 13px; font-weight: 600; font-size: 13.5px; color: var(--gray);
  border-radius: 999px; transition: all .18s ease; position: relative; white-space: nowrap; flex-shrink: 0;
}
.main-nav a:hover, .main-nav a.active { background: var(--primary-tint); color: var(--primary-deep); }
.main-nav a.nav-live { display: inline-flex; align-items: center; gap: 6px; color: var(--primary-deep); font-weight: 700; }
.nav-pinned { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 rgba(255,77,94,.5); animation: pulse 1.6s infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,77,94,.5); }
  70% { box-shadow: 0 0 0 8px rgba(255,77,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,77,94,0); }
}
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* Nav dropdown (제품소개 하위 카테고리) */
.nav-dropdown { position: relative; flex-shrink: 0; white-space: nowrap; }
.nav-dropdown-trigger { display: inline-flex; align-items: center; gap: 4px; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0; background: #fff; border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-md); padding: 8px; min-width: 160px;
  opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .15s ease; z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown:focus-within .nav-dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dropdown-menu a { display: block; padding: 9px 12px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--gray); white-space: nowrap; }
.nav-dropdown-menu a:hover { background: var(--primary-tint); color: var(--primary-deep); }
.nav-lock { font-size: 10px; margin-left: 2px; opacity: .7; }

.nav-member { display: flex; align-items: center; gap: 4px; margin-left: 6px; padding-left: 10px; border-left: 1px solid var(--border); flex-shrink: 0; }
.nav-member a { padding: 9px 14px; font-size: 13.5px; }
.nav-member-name { color: var(--primary-deep) !important; font-weight: 700 !important; }
.nav-register-btn { background: var(--primary); color: #fff !important; border-radius: 999px; font-weight: 700 !important; }
.nav-register-btn:hover { background: var(--primary-dark); color: #fff !important; }

.flash { text-align: center; padding: 12px; font-weight: 600; font-size: 14px; }
.flash-success { background: var(--primary-tint); color: var(--primary-deep); }
.flash-error { background: #FFECEC; color: #C6303E; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--primary-tint) 0%, #FFFFFF 78%);
}
.hero-blob {
  position: absolute; top: -140px; right: -160px; width: 560px; height: 560px;
  opacity: .55; pointer-events: none;
}
.hero-inner {
  max-width: 1160px; margin: 0 auto; padding: 84px 24px 64px;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700;
  color: var(--primary-deep); background: #fff; border: 1px solid var(--primary-tint-2);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.hero-title { font-size: 42px; font-weight: 800; line-height: 1.28; margin: 0 0 18px; letter-spacing: -0.5px; }
.hero-title span { color: var(--primary-dark); }
.hero-desc { font-size: 16.5px; color: var(--gray); margin: 0 0 32px; max-width: 480px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 13px 26px; border-radius: 999px;
  font-weight: 700; font-size: 14.5px; border: none; transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 10px 24px rgba(63,175,221,.35); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: #fff; color: var(--primary-deep); border: 1.5px solid var(--primary-tint-2); }
.btn-outline:hover { border-color: var(--primary); }
.btn-live { background: var(--live); color: #fff; }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; justify-content: center; }
.btn-ghost { background: transparent; color: var(--gray); border: 1px solid var(--border); }
.btn-danger { background: #FFECEC; color: #C6303E; }

/* Hero banner slider (admin-managed) */
.hero-slider { position: relative; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 4/3; background: var(--bg-soft); }
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; }
.hero-slide.active { opacity: 1; }
.hero-slide img, .hero-slide video { width: 100%; height: 100%; object-fit: cover; }
.hero-slide-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 22px; background: linear-gradient(0deg, rgba(20,30,35,.72), transparent); color: #fff; }
.hero-slide-caption strong { display: block; font-size: 15px; }
.hero-dots { position: absolute; bottom: 14px; right: 18px; display: flex; gap: 6px; z-index: 2; }
.hero-dots button { width: 7px; height: 7px; border-radius: 50%; border: none; background: rgba(255,255,255,.55); padding: 0; }
.hero-dots button.active { background: #fff; width: 20px; border-radius: 4px; }

/* ---------------- Sections ---------------- */
.section { padding: 68px 0; }
.section-soft { background: var(--bg-soft); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-eyebrow { font-size: 12.5px; font-weight: 800; color: var(--primary-dark); letter-spacing: 1.5px; text-transform: uppercase; margin: 0 0 8px; }
.section-title { font-size: 28px; font-weight: 800; margin: 0; letter-spacing: -0.4px; }
.section-desc { color: var(--gray); font-size: 14.5px; margin-top: 6px; }
.section-link { font-weight: 700; font-size: 14px; color: var(--primary-deep); white-space: nowrap; }

/* Category grid */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 26px 18px; text-align: center; transition: all .18s ease;
}
.cat-card:hover { border-color: var(--primary); box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.cat-icon {
  width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 14px; background: var(--primary-tint);
  display: flex; align-items: center; justify-content: center; color: var(--primary-dark);
}
.cat-card strong { display: block; font-size: 15px; margin-bottom: 4px; }
.cat-card span { font-size: 12.5px; color: var(--gray-soft); }

/* Material cards */
.material-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.material-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: all .2s ease; display: flex; flex-direction: column;
}
.material-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: transparent; }
.material-thumb { position: relative; aspect-ratio: 16/10; background: var(--product-image-bg, var(--bg-soft)); overflow: hidden; }
/* 제품 이미지 스티커(사내교육용 등) 적용 대상 표시 - 실제 스티커 모양은 관리자 설정에 따라 <head>에서 동적으로 주입됨 */
.is-product-thumb { position: relative; }
.material-thumb img { width: 100%; height: 100%; object-fit: cover; }
.material-badges {
  position: absolute; top: 10px; left: 10px; right: 10px; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 6px; flex-wrap: wrap;
}
.material-type-badge {
  background: rgba(20,30,35,.68); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .3px;
}
.material-badges .stock-badge { cursor: default; }
.material-badges .stock-badge[role="link"] { cursor: pointer; }
.material-badges .stock-badge[role="link"]:hover { filter: brightness(0.96); }
.stock-badge.st-promotion { background: var(--badge-promotion-bg, #EAF7FC); color: var(--badge-promotion-text, var(--primary-deep)); }
.stock-badge.st-new { background: var(--badge-new-bg, #F1EAFB); color: var(--badge-new-text, #7A4FD6); }
.stock-badge.is-blinking {
  animation-name: stockPillBlink;
  animation-duration: var(--badge-blink-seconds, 1.4s);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
@keyframes stockPillBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .55; }
}
@media (prefers-reduced-motion: reduce) {
  .stock-badge.is-blinking { animation: none; }
}
.play-badge {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; z-index: 1;
}
.play-badge span {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
}
.material-body { padding: 16px 18px 20px; flex: 1; display: flex; flex-direction: column; }
.material-cat { font-size: 11.5px; font-weight: 700; color: var(--primary-dark); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .4px; }
.material-title { font-size: 15.5px; font-weight: 700; margin: 0 0 8px; line-height: 1.4; }
.material-desc { font-size: 13px; color: var(--gray); margin: 0 0 12px; flex: 1; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.material-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--gray-soft); border-top: 1px dashed var(--border); padding-top: 10px; }

/* Live section */
.live-banner {
  border-radius: var(--radius); overflow: hidden; position: relative; background: var(--ink);
  color: #fff; display: grid; grid-template-columns: 1fr 1fr; min-height: 260px;
}
.live-banner-info { padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; background: var(--live); padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800; width: fit-content; letter-spacing: .5px; }
.live-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.6s infinite; }
.live-banner h3 { font-size: 24px; margin: 0; font-weight: 800; }
.live-banner p { color: #C9D3D8; margin: 0; font-size: 14px; }
.live-banner-media { position: relative; background: #10161a; }
.live-banner-media img { width: 100%; height: 100%; object-fit: cover; opacity: .85; }
.live-empty { text-align: center; padding: 60px 24px; color: var(--gray-soft); background: #fff; border: 1px dashed var(--border); border-radius: var(--radius); }

/* Live list page */
.live-list { display: grid; gap: 16px; }
.live-row { display: flex; gap: 18px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px; }
.live-row img { width: 140px; height: 88px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: var(--bg-soft); }
.live-row-body { flex: 1; }
.live-status { font-size: 11.5px; font-weight: 800; padding: 3px 10px; border-radius: 999px; letter-spacing: .4px; }
.status-live { background: #FFE7E9; color: var(--live); }
.status-scheduled { background: var(--primary-tint); color: var(--primary-deep); }
.status-ended { background: var(--bg-soft); color: var(--gray-soft); }

/* Video/Image viewer page */
.viewer-wrap { max-width: 900px; margin: 0 auto; }
.viewer-media { border-radius: var(--radius); overflow: hidden; background: var(--product-image-bg, #fff); margin-bottom: 24px; border: 1px solid var(--border); }
.viewer-media video, .viewer-media img, .viewer-media iframe { width: 100%; display: block; aspect-ratio: 16/9; border: none; border-radius: var(--radius); }
.viewer-media img { aspect-ratio: 1/1; object-fit: contain; padding: 32px; box-sizing: border-box; background: var(--product-image-bg, #fff); }

.viewer-doc-preview {
  position: relative; aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center;
  background-color: var(--bg-soft); background-size: cover; background-position: center; background-repeat: no-repeat;
}
.viewer-doc-preview.has-thumb::before {
  content: ''; position: absolute; inset: 0; background: rgba(20, 30, 35, .38);
}
.viewer-doc-preview .btn { position: relative; z-index: 1; }
.breadcrumb { font-size: 13px; color: var(--gray-soft); margin-bottom: 18px; }
.breadcrumb a { color: var(--primary-deep); font-weight: 600; }

/* 제품 상세정보 (제약사/분류/성분·함량/효능·효과/용법·용량/보험코드/포장단위/복약안내/주의사항) */
.product-spec { background: var(--bg-soft); border-radius: var(--radius); padding: 22px 26px; margin: 0 0 28px; display: flex; flex-direction: column; gap: 16px; }
.product-spec-title { font-size: 13px; font-weight: 800; color: var(--primary-deep); letter-spacing: .3px; margin: 0; text-transform: uppercase; }
.product-spec-row { display: grid; grid-template-columns: 110px 1fr; gap: 14px; align-items: start; }
.product-spec-row dt { margin: 0; font-size: 13px; font-weight: 700; color: var(--ink); padding-top: 1px; }
.product-spec-row dd { margin: 0; font-size: 14.5px; color: var(--gray); line-height: 1.75; white-space: pre-line; }
@media (max-width: 640px) {
  .product-spec-row { grid-template-columns: 1fr; gap: 4px; }
  .product-spec-row dt { color: var(--primary-deep); }
}

/* 대조약 정보 (같은 성분 경쟁제품 비교표) */
.comparator-toggle { display: inline-block; }
.comparator-toggle summary { cursor: pointer; list-style: none; }
.comparator-toggle summary::-webkit-details-marker { display: none; }
.comparator-toggle[open] summary { margin-bottom: 12px; }
.comparator-table-wrap {
  width: 100%; overflow-x: auto; background: var(--bg-soft); border-radius: var(--radius);
  padding: 16px; margin-top: 4px; border: 1px solid var(--border);
}
.comparator-table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
.comparator-table th {
  text-align: left; padding: 8px 12px; color: var(--gray-soft); font-weight: 700; font-size: 12px;
  border-bottom: 2px solid var(--border);
}
.comparator-table td { padding: 9px 12px; border-bottom: 1px solid var(--border); color: var(--ink); }
.comparator-table tbody tr:last-child td { border-bottom: none; }
.comparator-table tr.is-original td { background: #FFF8ED; font-weight: 700; }
.comparator-original-tag {
  display: inline-block; font-size: 10.5px; font-weight: 800; color: #B7791F; background: #FFF1D6;
  padding: 2px 7px; border-radius: 999px; margin-left: 6px; vertical-align: middle;
}
@media (max-width: 640px) {
  .comparator-table { font-size: 12px; }
  .comparator-table th, .comparator-table td { padding: 7px 8px; }
}

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: var(--gray-soft); }

/* Footer */
.site-footer { background: var(--ink); color: #C9D3D8; padding: 46px 0 30px; margin-top: 40px; }
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 0 24px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-logo { width: 38px; height: 38px; border-radius: 10px; }
.footer-brand strong { color: #fff; font-size: 15px; }
.footer-brand p { margin: 2px 0 0; font-size: 12.5px; color: #8996A0; }
.footer-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: #8996A0; }
.footer-admin-link { font-size: 12.5px; color: #8996A0; border: 1px solid #3A454C; padding: 6px 14px; border-radius: 999px; }
.footer-admin-link:hover { color: #fff; border-color: #556269; }

/* Floating buttons */
.float-stack { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 12px; z-index: 350; }
.float-btn {
  width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-md); border: none; transition: transform .15s ease;
}
.float-btn:hover { transform: scale(1.06); }
.float-kakao { background: #FEE500; }
.float-chat { background: var(--primary); }

/* 모바일 전용 하단 고정 탭 바 (PC에서는 숨김) */
.mobile-bottom-nav { display: none; }
@media (max-width: 720px) {
  .mobile-bottom-nav {
    display: flex; align-items: flex-end; justify-content: space-between;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 300;
    background: #EAF6FB; border-top: 1px solid #D3EDF6;
    padding: 8px 4px calc(6px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 18px rgba(20,30,35,.07);
    transition: transform .25s ease;
  }
  .mobile-bottom-nav.is-hidden { transform: translateY(100%); }
  .mbn-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    text-decoration: none; color: #7C93A3; font-size: 10.5px; font-weight: 700; padding: 4px 2px;
    min-width: 0;
  }
  .mbn-item span { white-space: nowrap; }
  .mbn-item:active { color: var(--primary); }
  .mbn-home {
    flex-shrink: 0; width: 56px; height: 56px; border-radius: 50%;
    background: var(--ink, #2B3238); display: flex; align-items: center; justify-content: center;
    margin: -30px 6px 0; box-shadow: 0 8px 18px rgba(20,30,35,.3); border: 4px solid #EAF6FB;
  }

  /* 하단 탭 바에 본문/플로팅 버튼/챗봇 패널이 가려지지 않도록 여백을 넉넉하게 확보 */
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .float-stack { bottom: calc(110px + env(safe-area-inset-bottom)); }
  .chat-panel { bottom: calc(168px + env(safe-area-inset-bottom)); }
  @media (prefers-reduced-motion: reduce) {
    .mobile-bottom-nav { transition: none; }
  }
}

/* Chat panel */
.chat-panel {
  position: fixed; right: 22px; bottom: 92px; width: 340px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: 18px; box-shadow: var(--shadow-md); z-index: 200; overflow: hidden;
  border: 1px solid var(--border); display: flex; flex-direction: column; max-height: 68vh;
}
.chat-panel[hidden] { display: none; }
.chat-panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; background: var(--primary-tint); }
.chat-panel-head img { width: 34px; height: 34px; border-radius: 9px; }
.chat-panel-head strong { display: block; font-size: 13.5px; }
.chat-panel-head small { color: var(--gray); font-size: 11.5px; }
.chat-panel-head button { margin-left: auto; background: none; border: none; font-size: 22px; color: var(--gray); line-height: 1; }
.chat-panel-body { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { background: var(--bg-soft); padding: 10px 14px; border-radius: 14px 14px 14px 4px; font-size: 13.5px; max-width: 90%; }
.chat-msg.user { align-self: flex-end; background: var(--primary-tint); border-radius: 14px 14px 4px 14px; }
.chat-quick { display: flex; flex-direction: column; gap: 8px; }
.chat-quick-btn { text-align: left; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--primary-deep); }
.chat-quick-btn:hover { border-color: var(--primary); background: var(--primary-tint); }

/* ---------------- Elegant form pages (회원가입/로그인/샘플신청/브로셔신청) ---------------- */
.elegant-wrap { display: flex; justify-content: center; padding: 20px 0 60px; }
.elegant-card {
  position: relative; background: #fff; border: 1px solid var(--border); border-radius: 26px;
  padding: 48px 44px; box-shadow: 0 24px 64px rgba(31,71,92,.10); overflow: hidden; width: 100%;
}
.elegant-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}
.elegant-head { text-align: center; margin-bottom: 34px; }
.elegant-mark { width: 46px; height: 46px; border-radius: 13px; margin: 0 auto 18px; display: block; }
.elegant-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: var(--primary-dark); }
.elegant-title { font-size: 25px; font-weight: 800; letter-spacing: -0.4px; margin: 8px 0 8px; color: var(--ink); }
.elegant-desc { font-size: 13.5px; color: var(--gray-soft); line-height: 1.6; margin: 0; }

.elegant-card .form-row label {
  font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--gray-soft);
}
.elegant-card input[type=text], .elegant-card input[type=password], .elegant-card input[type=email],
.elegant-card input[type=url], .elegant-card input[type=number], .elegant-card input[type=date],
.elegant-card select, .elegant-card textarea {
  background: var(--bg-soft); border: 1.5px solid transparent; border-radius: 13px; padding: 14px 17px;
  font-size: 14.5px; transition: all .15s ease;
}
.elegant-card input:focus, .elegant-card select:focus, .elegant-card textarea:focus {
  background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint);
}
.elegant-section-label {
  font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; color: var(--primary-deep);
  margin: 10px 0 -2px; padding-top: 22px; border-top: 1px solid var(--border);
}
.elegant-section-label:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.elegant-submit {
  width: 100%; border-radius: 999px; padding: 16px; font-size: 15px; font-weight: 800; letter-spacing: .4px;
  margin-top: 4px;
}
.elegant-foot { text-align: center; margin-top: 22px; font-size: 13px; color: var(--gray-soft); }
.elegant-foot a { color: var(--primary-deep); font-weight: 800; }
.elegant-hint { font-size: 12px; color: var(--gray-soft); font-weight: 400; text-transform: none; letter-spacing: 0; display: block; margin-top: 4px; }

/* Consent modal (샘플신청 동의) */
.consent-overlay {
  position: fixed; inset: 0; background: rgba(20,30,35,.55); display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 20px; opacity: 0; visibility: hidden; transition: opacity .18s ease;
}
.consent-overlay.open { opacity: 1; visibility: visible; }
.consent-box {
  background: #fff; border-radius: 22px; max-width: 440px; width: 100%; padding: 36px 32px; box-shadow: var(--shadow-md);
  transform: translateY(12px); transition: transform .18s ease;
}
.consent-overlay.open .consent-box { transform: translateY(0); }
.consent-box h3 { font-size: 18px; font-weight: 800; margin: 0 0 14px; }
.consent-box p { font-size: 13.8px; color: var(--gray); line-height: 1.8; background: var(--bg-soft); border-radius: 12px; padding: 16px 18px; margin: 0 0 22px; }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn { flex: 1; }

/* ---------------- Application forms (신청서 레이아웃: 폼 + 안내 사이드바) ---------------- */
.apply-shell { display: grid; grid-template-columns: 1fr 320px; gap: 28px; align-items: start; }
.apply-main {
  background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 40px 40px 36px;
  box-shadow: 0 20px 56px rgba(31,71,92,.08); position: relative; overflow: hidden;
}
.apply-main::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}
.apply-head { margin-bottom: 30px; }
.apply-eyebrow { font-size: 11px; font-weight: 800; letter-spacing: 2.5px; text-transform: uppercase; color: var(--primary-dark); }
.apply-title { font-size: 24px; font-weight: 800; letter-spacing: -0.4px; margin: 8px 0 8px; }
.apply-desc { font-size: 13.5px; color: var(--gray-soft); line-height: 1.7; margin: 0; }

.apply-step {
  display: flex; align-items: center; gap: 10px; margin: 28px 0 14px; padding-top: 24px; border-top: 1px solid var(--border);
}
.apply-step:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.apply-step-num {
  width: 26px; height: 26px; border-radius: 50%; background: var(--primary-tint); color: var(--primary-deep);
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.apply-step-label { font-size: 14px; font-weight: 800; color: var(--ink); }

.apply-main .form-row label { font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--gray-soft); }
.apply-main input[type=text], .apply-main input[type=password], .apply-main input[type=email],
.apply-main input[type=url], .apply-main input[type=number], .apply-main input[type=date],
.apply-main select, .apply-main textarea {
  background: var(--bg-soft); border: 1.5px solid transparent; border-radius: 12px; padding: 13px 16px;
  font-size: 14.5px; transition: all .15s ease;
}
.apply-main input:focus, .apply-main select:focus, .apply-main textarea:focus {
  background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-tint);
}
.apply-submit { width: 100%; border-radius: 999px; padding: 16px; font-size: 15px; font-weight: 800; letter-spacing: .4px; margin-top: 10px; }

/* 안내화면 (샘플신청 진입 전 게이트) */
.apply-guide-shell {
  background: #fff; border: 1px solid var(--border); border-radius: 24px; padding: 40px 40px 36px;
  box-shadow: 0 20px 56px rgba(31,71,92,.08); position: relative; overflow: hidden;
}
.apply-guide-shell::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
}
.guide-content {
  background: var(--bg-soft); border-radius: 14px; padding: 22px 24px; margin: 20px 0 22px;
  font-size: 14.5px; line-height: 1.9; color: var(--gray); white-space: pre-line;
}
.guide-confirm-row { margin-bottom: 18px; font-size: 14px; font-weight: 700; color: var(--ink); }

/* 의료인 블록 (의료인 1명 = 이름 + 제품 여러 개) */
#doctorsContainer { display: flex; flex-direction: column; gap: 16px; }
.doctor-block {
  background: var(--bg-soft); border-radius: 16px; padding: 18px 18px 16px; border: 1px solid var(--border);
}
.doctor-block-header { display: flex; align-items: end; gap: 10px; margin-bottom: 12px; }
.doctor-block-header .form-row { flex: 1; gap: 5px; }
.doctor-remove-btn, .product-remove-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: #fff;
  color: var(--gray-soft); font-size: 18px; line-height: 1; cursor: pointer; transition: all .15s ease; flex-shrink: 0;
}
.doctor-remove-btn:hover, .product-remove-btn:hover { background: #FFECEC; color: #C6303E; border-color: #FFECEC; }
.doctor-products { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.product-row {
  display: grid; grid-template-columns: 1fr auto 36px; gap: 10px; align-items: end;
  background: #fff; border-radius: 10px; padding: 10px 12px; border: 1px solid var(--border);
}
.product-row .form-row { gap: 5px; }
.qty-fixed-badge {
  display: inline-flex; align-items: center; height: 46px; padding: 0 12px; border-radius: 10px;
  background: var(--primary-tint); color: var(--primary-deep); font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
@media (max-width: 640px) {
  .product-row { grid-template-columns: 1fr; }
  .qty-fixed-badge { height: auto; padding: 6px 0; }
  .product-remove-btn { width: 100%; }
}

/* 인수증 업로드 (내 샘플신청 내역) */
.receipt-thumb-link { display: inline-block; margin-bottom: 6px; }
.receipt-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); display: block; }
.receipt-upload-form { display: block; }
.receipt-upload-label { cursor: pointer; white-space: nowrap; }

.apply-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }
.aside-card { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 22px 22px; }
.aside-card-dark { background: var(--ink); color: #C9D3D8; border: none; }
.aside-card-title { font-size: 12px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; color: var(--primary-dark); margin: 0 0 14px; }
.aside-card-dark .aside-card-title { color: #7FCBE8; }
.aside-process { display: flex; flex-direction: column; gap: 0; }
.aside-process-item { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.aside-process-item:last-child { padding-bottom: 0; }
.aside-process-item::before {
  content: ''; position: absolute; left: 10px; top: 24px; bottom: 0; width: 1.5px; background: var(--border);
}
.aside-process-item:last-child::before { display: none; }
.aside-process-dot {
  width: 21px; height: 21px; border-radius: 50%; background: var(--primary-tint); color: var(--primary-deep);
  font-size: 10.5px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; z-index: 1;
}
.aside-process-item.done .aside-process-dot { background: var(--primary); color: #fff; }
.aside-process-text strong { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.aside-process-text span { font-size: 12px; color: var(--gray-soft); }
.aside-note { font-size: 12.5px; line-height: 1.8; color: var(--gray); margin: 0; }
.aside-note + .aside-note { margin-top: 10px; }
.aside-contact { font-size: 12.5px; color: #C9D3D8; line-height: 1.8; margin: 0; }
.aside-contact strong { color: #fff; }

@media (max-width: 900px) {
  .apply-shell { grid-template-columns: 1fr; }
  .apply-aside { position: static; }
  .apply-main { padding: 30px 24px 28px; }
}

/* ---------------- 사이트 팝업 (공지/이벤트 등) ---------------- */
.site-popup { position: fixed; z-index: 400; }
.site-popup[hidden] { display: none !important; }
.site-popup.pos-center {
  inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(20, 30, 35, .55);
}
.site-popup.pos-top { top: 0; left: 0; right: 0; }
.site-popup.pos-bottom { bottom: 0; left: 0; right: 0; }
.site-popup.pos-top-left { top: 20px; left: 20px; }
.site-popup.pos-top-right { top: 20px; right: 20px; }
.site-popup.pos-bottom-left { bottom: 20px; left: 20px; }
.site-popup.pos-bottom-right { bottom: 20px; right: 20px; }

.site-popup-box {
  position: relative; background: #fff; border-radius: 20px; box-shadow: 0 24px 64px rgba(20,30,35,.28);
  overflow: hidden; animation: popupIn .22s ease;
}
@keyframes popupIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.site-popup.pos-center .site-popup-box { max-height: 86vh; overflow-y: auto; }
.site-popup.pos-top .site-popup-box, .site-popup.pos-bottom .site-popup-box {
  border-radius: 0; width: 100%; box-shadow: 0 4px 20px rgba(20,30,35,.12);
}
.site-popup.pos-top .site-popup-box { border-bottom: 1px solid var(--border); }
.site-popup.pos-bottom .site-popup-box { border-top: 1px solid var(--border); }
.site-popup.pos-top-left .site-popup-box, .site-popup.pos-top-right .site-popup-box,
.site-popup.pos-bottom-left .site-popup-box, .site-popup.pos-bottom-right .site-popup-box { border-radius: 16px; }

/* 너비 */
.site-popup.pos-center.popup-w-small .site-popup-box,
.site-popup:not(.pos-center):not(.pos-top):not(.pos-bottom).popup-w-small .site-popup-box { width: 400px; max-width: 92vw; }
.site-popup.pos-center.popup-w-medium .site-popup-box,
.site-popup:not(.pos-center):not(.pos-top):not(.pos-bottom).popup-w-medium .site-popup-box { width: 560px; max-width: 92vw; }
.site-popup.pos-center.popup-w-large .site-popup-box,
.site-popup:not(.pos-center):not(.pos-top):not(.pos-bottom).popup-w-large .site-popup-box { width: 760px; max-width: 94vw; }

/* 테마 */
.popup-theme-light .site-popup-box { background: #fff; color: var(--ink); }
.popup-theme-primary .site-popup-box { background: var(--primary); color: #fff; }
.popup-theme-primary .site-popup-desc { color: rgba(255,255,255,.9); }
.popup-theme-dark .site-popup-box { background: var(--ink); color: #fff; }
.popup-theme-dark .site-popup-desc { color: #C9D3D8; }

/* 글자 크기 */
.popup-font-small .site-popup-title { font-size: 15px; }
.popup-font-small .site-popup-desc { font-size: 12.5px; }
.popup-font-medium .site-popup-title { font-size: 17px; }
.popup-font-medium .site-popup-desc { font-size: 13.5px; }
.popup-font-large .site-popup-title { font-size: 20px; }
.popup-font-large .site-popup-desc { font-size: 15px; }

.site-popup-close {
  position: absolute; top: 12px; right: 14px; background: rgba(0,0,0,.06); border: none; width: 30px; height: 30px;
  border-radius: 50%; font-size: 19px; line-height: 1; color: inherit; cursor: pointer; z-index: 2;
}
.popup-theme-primary .site-popup-close, .popup-theme-dark .site-popup-close { background: rgba(255,255,255,.18); }
.site-popup-badge-row { padding: 14px 46px 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.site-popup-badge-row.site-popup-badge-size-basic .stock-badge { font-size: 10.5px; padding: 2px 8px; }
.site-popup-badge-row.site-popup-badge-size-normal .stock-badge { font-size: 12.5px; padding: 4px 11px; }
.site-popup-badge-row.site-popup-badge-size-large .stock-badge { font-size: 15px; padding: 6px 15px; font-weight: 800; }
.site-popup-media { width: 100%; background: #000; }
.site-popup-media img, .site-popup-media video { width: 100%; display: block; max-height: 420px; object-fit: cover; }
.site-popup-media iframe { width: 100%; aspect-ratio: 16/9; border: none; display: block; }
.site-popup-text { padding: 22px 24px; }
.site-popup-title { display: block; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.2px; }
.site-popup-desc { margin: 0 0 4px; line-height: 1.7; white-space: pre-line; }
.site-popup-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--border); }
.popup-theme-primary .site-popup-foot, .popup-theme-dark .site-popup-foot { border-top-color: rgba(255,255,255,.16); }
.site-popup-foot button { background: none; border: none; font-size: 12.5px; font-weight: 700; color: inherit; opacity: .75; cursor: pointer; padding: 6px 10px; }
.site-popup-foot button:hover { opacity: 1; }

/* 상/하단 바 형태 */
.site-popup-body.bar { display: flex; align-items: center; gap: 16px; padding: 14px 20px; max-width: 1160px; margin: 0 auto; }
.site-popup-body.bar .site-popup-text { padding: 0; flex: 1; }
.site-popup-body.bar .site-popup-title { display: inline; margin-right: 10px; }
.site-popup-body.bar .site-popup-desc { display: inline; margin: 0; }
.site-popup-close.bar { position: static; flex-shrink: 0; }

/* 모바일에서 팝업창이 화면을 너무 많이 가리지 않도록 관리자 설정값으로 최대 폭/높이 제한
   ([관리자 → 재고 상태 관리 → 모바일 팝업 크기] 패널, PC 화면에는 영향 없음) */
@media (max-width: 720px) {
  .site-popup.pos-center .site-popup-box,
  .site-popup.pos-top-left .site-popup-box, .site-popup.pos-top-right .site-popup-box,
  .site-popup.pos-bottom-left .site-popup-box, .site-popup.pos-bottom-right .site-popup-box {
    max-width: var(--popup-mobile-max-width, 90vw) !important;
    max-height: var(--popup-mobile-max-height, 70vh) !important;
    width: auto !important;
  }
  .site-popup.pos-center .site-popup-box { overflow-y: auto; }
  .site-popup-media img, .site-popup-media video { max-height: 220px; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .material-grid { grid-template-columns: repeat(2, 1fr); }
  .live-banner { grid-template-columns: 1fr; }
  .live-banner-media { min-height: 200px; }
}
@media (max-width: 720px) {
  .main-nav {
    position: fixed; top: 76px; left: 0; right: 0; background: #fff; flex-direction: column;
    align-items: stretch; padding: 12px; border-bottom: 1px solid var(--border); box-shadow: var(--shadow-sm);
    transform: translateY(-140%); transition: transform .2s ease; z-index: 99;
    max-height: calc(100vh - 76px); overflow-y: auto; overflow-x: visible;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav a { padding: 13px 16px; }
  .nav-links-scroll { flex-direction: column; align-items: stretch; overflow-x: visible; width: 100%; gap: 0; }
  .nav-pinned { flex-direction: column; align-items: stretch; width: 100%; gap: 0; }
  .nav-toggle { display: flex; }
  .nav-dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none;
    border: none; padding-left: 14px; margin-top: 2px; display: none;
  }
  .nav-dropdown:hover .nav-dropdown-menu, .nav-dropdown.open .nav-dropdown-menu { display: block; }
  .nav-member { border-left: none; border-top: 1px solid var(--border); margin-left: 0; padding: 10px 0 0; flex-direction: column; align-items: stretch; width: 100%; }
  .nav-member a { padding: 12px 16px; }
  .hero-title { font-size: 30px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .material-grid { grid-template-columns: 1fr 1fr; }
  .hero-inner { padding: 48px 20px 40px; }
  .section { padding: 48px 0; }
}
@media (max-width: 480px) {
  .material-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .live-row { flex-direction: column; align-items: flex-start; }
  .live-row img { width: 100%; height: 160px; }
}

/* 교육자료 카테고리 / 최신 교육자료 섹션 - 모바일에서만 접었다 펼 수 있음 (재고 상태 배너와 동일한 토글 방식) */
@media (max-width: 720px) {
  .cat-grid-collapsible {
    max-height: 3000px; opacity: 1; overflow: hidden;
    transition: max-height .3s ease, opacity .2s ease, margin-top .2s ease;
  }
  #catGridToggle:not(:checked) ~ .cat-section .cat-grid-collapsible,
  #latestGridToggle:not(:checked) ~ .latest-section .cat-grid-collapsible {
    max-height: 0; opacity: 0; margin-top: 0;
  }
  #catGridToggle:not(:checked) ~ .cat-section .stock-home-toggle-icon,
  #latestGridToggle:not(:checked) ~ .latest-section .stock-home-toggle-icon {
    transform: rotate(-180deg);
  }
  #catGridToggle:focus-visible ~ .cat-section .stock-home-toggle-btn,
  #latestGridToggle:focus-visible ~ .latest-section .stock-home-toggle-btn {
    outline: 2px solid var(--primary); outline-offset: 2px;
  }
  @media (prefers-reduced-motion: reduce) {
    .cat-grid-collapsible { transition: none; }
  }
}

/* ------------------------------------------------------------
   의약품 재고 상태표
------------------------------------------------------------ */
.stock-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.stock-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
.stock-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 720px; }
.stock-table th, .stock-table td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.stock-table th { background: var(--bg-soft); color: var(--gray-soft); font-weight: 700; font-size: 12.5px; }
.stock-table tbody tr:last-child td { border-bottom: none; }
.stock-table td.stock-note { white-space: normal; color: var(--gray-soft); font-size: 12.5px; }

.stock-badge {
  display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; font-weight: 700;
  padding: var(--badge-pad-y, 4px) var(--badge-pad-x, 11px);
  font-size: var(--badge-font-size, 12px);
}
.stock-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.stock-badge.st-normal { background: var(--badge-normal-bg, #E7F6EC); color: var(--badge-normal-text, #1A8A4A); }
.stock-badge.st-shortage { background: var(--badge-shortage-bg, #FFF1D6); color: var(--badge-shortage-text, #B7791F); }
.stock-badge.st-soldout { background: var(--badge-soldout-bg, #FFE7E9); color: var(--badge-soldout-text, var(--live)); }
.stock-badge.st-discontinued { background: var(--badge-discontinued-bg, var(--bg-soft)); color: var(--badge-discontinued-text, var(--gray-soft)); }

/* 재고 안내 팝업 내부 목록 */
.stock-popup-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.stock-popup-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: var(--bg-soft); border-radius: 10px; }
.popup-theme-primary .stock-popup-list li, .popup-theme-dark .stock-popup-list li { background: rgba(255,255,255,.12); }
.stock-popup-list .spn-name { font-weight: 700; font-size: 13.5px; }
.stock-popup-list .spn-note { font-size: 12px; color: var(--gray-soft); }
.popup-theme-primary .stock-popup-list .spn-note, .popup-theme-dark .stock-popup-list .spn-note { color: rgba(255,255,255,.75); }

/* ------------------------------------------------------------
   메인화면 - 의약품 재고 상태 강조배너
------------------------------------------------------------ */
.stock-home-wrap { padding-top: 0; padding-bottom: 0; }
.stock-home-toggle-checkbox {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.stock-home-banner {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  border-radius: 18px; padding: 30px 32px 30px 34px;
  background: linear-gradient(135deg, #EAF6FB 0%, #F5FBFD 100%);
  border: 1px solid #D3EDF6;
}
.stock-home-banner::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--primary);
}
.stock-home-banner.has-issue { background: linear-gradient(135deg, #FFF3E9 0%, #FFF8F1 100%); border-color: #FBDDBB; }
.stock-home-banner.has-issue::before { background: linear-gradient(180deg, #F2994A, var(--live)); }

.stock-home-banner-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.stock-home-banner-eyebrow { display: inline-block; font-size: 12px; font-weight: 800; color: var(--primary-deep); letter-spacing: .3px; margin-bottom: 6px; }
.stock-home-banner.has-issue .stock-home-banner-eyebrow { color: #B7791F; }
.stock-home-banner-header-text h3 { font-size: 21px; font-weight: 800; margin: 0 0 6px; color: var(--ink); }
.stock-home-banner-header-text p { font-size: 13.5px; color: var(--gray-soft); margin: 0; }

/* 모바일 접기/펼치기 버튼 - 데스크톱에서는 항상 숨김(항상 펼쳐진 상태) */
.stock-home-toggle-btn { display: none; }

.stock-home-collapsible { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px; margin-top: 20px; }
.stock-home-banner-main { flex: 1 1 280px; min-width: 240px; }

.stock-home-counts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }

/* 우측: 재고 이슈 제품 이미지 (제품소개 > 제품 카드와 같은 16:10 비율/스타일, 1.5배 확대) */
.stock-home-images { flex: 0 1 auto; max-width: 100%; }
.stock-home-items-hint { font-size: 12px; color: var(--gray-soft); margin: 0 0 10px; text-align: right; }
.stock-home-images-grid { display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.stock-home-image-link { display: flex; flex-direction: column; align-items: center; width: 144px; text-decoration: none; }
.stock-home-image-thumb-wrap {
  display: block; width: 144px; aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--product-image-bg, var(--bg-soft)); border: 1px solid var(--border);
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.stock-home-image-link:hover .stock-home-image-thumb-wrap { box-shadow: var(--shadow-sm); transform: translateY(-2px); border-color: transparent; }
.stock-home-image-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.stock-home-image-name {
  margin-top: 6px; font-size: 11.5px; font-weight: 700; color: var(--ink); text-align: center;
  max-width: 144px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stock-home-image-status { font-size: 11px; color: var(--gray-soft); }

/* PC 화면: 우측 제품 이미지를 좌측 전체(제목+본문) 높이 기준으로 세로 중앙에 배치 */
@media (min-width: 721px) {
  .stock-home-banner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "header images" "main images";
    align-items: center;
    column-gap: 28px;
  }
  .stock-home-banner-header { grid-area: header; }
  .stock-home-collapsible { display: contents; }
  .stock-home-banner-main { grid-area: main; margin-top: 20px; }
  .stock-home-images { grid-area: images; }
}

@media (max-width: 720px) {
  .stock-home-items-hint { text-align: left; }
  .stock-home-images-grid { justify-content: flex-start; }
}

@media (max-width: 720px) {
  .stock-home-banner { padding: 24px 20px 24px 24px; }
  .stock-home-banner-header-text h3 { font-size: 18px; }

  /* 모바일에서만: 접기/펼치기 버튼 노출 + 콘텐츠 높이 트랜지션 */
  .stock-home-toggle-btn {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 34px; height: 34px; border-radius: 50%; margin-top: 2px;
    background: rgba(255,255,255,.7); border: 1px solid var(--border);
    cursor: pointer; transition: background .15s ease;
  }
  .stock-home-toggle-btn:active { background: rgba(255,255,255,.95); }
  #stockToggle_top:focus-visible ~ #stockBanner_top .stock-home-toggle-btn,
  #stockToggle_middle:focus-visible ~ #stockBanner_middle .stock-home-toggle-btn,
  #productCarouselToggle:focus-visible ~ #productCarouselBanner .stock-home-toggle-btn {
    outline: 2px solid var(--primary); outline-offset: 2px;
  }
  .stock-home-toggle-icon { transition: transform .25s ease; }

  .stock-home-collapsible {
    max-height: 3000px; opacity: 1; overflow: hidden;
    transition: max-height .3s ease, opacity .2s ease, margin-top .2s ease;
  }
  #stockToggle_top:not(:checked) ~ #stockBanner_top .stock-home-collapsible,
  #stockToggle_middle:not(:checked) ~ #stockBanner_middle .stock-home-collapsible {
    max-height: 0; opacity: 0; margin-top: 0;
  }
  #stockToggle_top:not(:checked) ~ #stockBanner_top .stock-home-toggle-icon,
  #stockToggle_middle:not(:checked) ~ #stockBanner_middle .stock-home-toggle-icon {
    transform: rotate(-180deg);
  }
  @media (prefers-reduced-motion: reduce) {
    .stock-home-collapsible, .stock-home-toggle-icon { transition: none; }
  }
}

/* 상단(카테고리 위) 배너는 히어로 바로 아래라 위 여백을 살짝 줄임 */
.stock-home-wrap-top { padding-top: 26px; }

/* 깜박임(주의 환기) 효과 - 배경/테두리 밝기가 은은하게 맥동하듯 반복 (완전히 사라지지 않아 눈부심/발작 위험 최소화) */
.stock-home-banner.is-blinking {
  --stock-blink-duration: 1.5s; /* PHP에서 인라인 style로 실제 값이 주입됨 (관리자 설정값) */
  animation: stockBannerBlink var(--stock-blink-duration) ease-in-out infinite;
}
@keyframes stockBannerBlink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(63,175,221,.35); border-color: #D3EDF6; }
  50% { box-shadow: 0 0 0 8px rgba(63,175,221,0); border-color: var(--primary); }
}
.stock-home-banner.is-blinking.has-issue {
  animation-name: stockBannerBlinkIssue;
}
@keyframes stockBannerBlinkIssue {
  0%, 100% { box-shadow: 0 0 0 0 rgba(242,153,74,.4); border-color: #FBDDBB; }
  50% { box-shadow: 0 0 0 9px rgba(242,153,74,0); border-color: var(--live); }
}
@media (prefers-reduced-motion: reduce) {
  .stock-home-banner.is-blinking { animation: none; }
}

/* ------------------------------------------------------------
   메인화면 - 제품소개 캐러셀 배너 (상단 · 교육자료 카테고리 위)
------------------------------------------------------------ */
.product-carousel-banner {
  position: relative; overflow: hidden;
  border-radius: 18px; padding: 30px 32px;
  background: linear-gradient(135deg, #EAF6FB 0%, #F5FBFD 100%);
  border: 1px solid #D3EDF6;
}
.product-carousel-banner::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px;
  background: var(--primary);
}
.product-carousel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 22px; }
.product-carousel-eyebrow { display: inline-block; font-size: 12px; font-weight: 800; color: var(--primary-deep); letter-spacing: .3px; margin-bottom: 6px; }
.product-carousel-header-text h3 { font-size: 21px; font-weight: 800; margin: 0 0 6px; color: var(--ink); }
.product-carousel-header-text p { font-size: 13.5px; color: var(--gray-soft); margin: 0; }

.product-carousel-collapsible { display: block; }
.product-carousel-viewport { position: relative; display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; }
.product-carousel-group { display: none; }
.product-carousel-group.is-active-group { display: contents; }
.product-carousel-group.is-active-group .product-carousel-item { animation: productCarouselFadeIn .4s ease; }
@keyframes productCarouselFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.product-carousel-item {
  flex: 0 1 auto; width: var(--product-carousel-image-width, 300px); max-width: 100%; text-decoration: none;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px; display: flex; flex-direction: column; align-items: center; text-align: center;
  transition: box-shadow .15s ease, transform .15s ease, border-color .15s ease;
}
.product-carousel-item:hover { box-shadow: var(--shadow-sm); transform: translateY(-2px); border-color: transparent; }
.product-carousel-item.is-pinned-item { border-color: var(--badge-new-bg, #F1EAFB); box-shadow: 0 0 0 2px var(--badge-new-bg, #F1EAFB); }
.product-carousel-item.is-blinking-card {
  animation-name: productCarouselCardBlink;
  animation-duration: var(--badge-blink-seconds, 1.4s);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
@keyframes productCarouselCardBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
@media (prefers-reduced-motion: reduce) {
  .product-carousel-item.is-blinking-card { animation: none; }
}
.product-carousel-item-thumb-wrap {
  position: relative; display: block; width: 100%; aspect-ratio: 16/10; border-radius: var(--radius-sm); overflow: hidden;
  background: var(--product-image-bg, var(--bg-soft)); margin-bottom: 10px;
}
.product-carousel-item-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-carousel-item-badge { position: absolute; top: 6px; left: 6px; }
.product-carousel-item-cat { font-size: 11px; font-weight: 700; color: var(--primary-deep); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 4px; }
.product-carousel-item-name { font-size: 13.5px; font-weight: 700; color: var(--ink); line-height: 1.4; }

.product-carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
.product-carousel-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); transition: background .2s ease, transform .2s ease; display: inline-block; }
.product-carousel-dot.is-active { background: var(--primary); transform: scale(1.3); }
.product-carousel-cta { display: inline-flex; margin-top: 22px; }

@media (max-width: 720px) {
  .product-carousel-banner { padding: 24px 20px; }
  .product-carousel-header { margin-bottom: 18px; }
  .product-carousel-header-text h3 { font-size: 18px; }

  /* 모바일: 3개씩 묶은 그룹 구분을 없애고(투명화), 제품을 1개씩만 보여줍니다 */
  .product-carousel-group,
  .product-carousel-group.is-active-group {
    display: contents;
  }
  .product-carousel-item {
    display: none; width: 100%; max-width: 320px; margin: 0 auto;
  }
  .product-carousel-item.is-active-item {
    display: flex; animation: productCarouselFadeIn .4s ease;
  }
  /* 신제품 고정 아이템은 모바일에서도 항상 보입니다 (순환 대상이 아님) */
  .product-carousel-item.is-pinned-item {
    display: flex;
  }
  /* 그룹 단위 위치를 나타내는 점(dots)은 모바일의 1개씩 순환 방식과 맞지 않아 숨깁니다 */
  .product-carousel-dots { display: none; }

  /* 모바일에서만: 접기/펼치기 버튼 노출 + 콘텐츠 높이 트랜지션 (재고 상태 배너와 동일한 토글 방식) */
  .product-carousel-collapsible {
    max-height: 3000px; opacity: 1; overflow: hidden;
    transition: max-height .3s ease, opacity .2s ease, margin-top .2s ease;
  }
  #productCarouselToggle:not(:checked) ~ #productCarouselBanner .product-carousel-collapsible {
    max-height: 0; opacity: 0; margin-top: 0;
  }
  #productCarouselToggle:not(:checked) ~ #productCarouselBanner .stock-home-toggle-icon {
    transform: rotate(-180deg);
  }
  @media (prefers-reduced-motion: reduce) {
    .product-carousel-collapsible { transition: none; }
    .product-carousel-item.is-active-item { animation: none; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .product-carousel-group { animation: none; }
}

/* ------------------------------------------------------------
   마이페이지
------------------------------------------------------------ */
.mypage-hero {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: 22px;
  padding: 28px 30px; box-shadow: 0 14px 40px rgba(31,71,92,.06); margin-bottom: 24px;
}
.mypage-avatar {
  width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 800;
}
.mypage-hero-info { flex: 1; min-width: 200px; }
.mypage-hero-info h2 { margin: 0 0 5px; font-size: 20px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mypage-hero-info p { margin: 0; font-size: 13px; color: var(--gray-soft); }
.mypage-hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.mypage-chip { font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--gray); }

.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.status-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-pill.st-wait { background: #FFF1D6; color: #B7791F; }
.status-pill.st-done { background: #E7F6EC; color: #1A8A4A; }
.status-pill.st-reject { background: #FFE7E9; color: var(--live); }
.status-pill.st-active { background: #E7F6EC; color: #1A8A4A; }
.status-pill.st-pending { background: #FFF1D6; color: #B7791F; }
.status-pill.st-blocked { background: var(--bg-soft); color: var(--gray-soft); }

.mypage-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 24px; }
.mypage-stat { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 20px; text-align: center; }
.mypage-stat strong { display: block; font-size: 25px; font-weight: 800; color: var(--primary-deep); line-height: 1.3; }
.mypage-stat span { font-size: 12.5px; color: var(--gray-soft); font-weight: 600; }

.mypage-section { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 26px 26px 24px; margin-bottom: 20px; }
.mypage-section-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.mypage-section-head h3 { margin: 0; font-size: 16px; font-weight: 800; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.mypage-section-head-icon {
  width: 30px; height: 30px; border-radius: 9px; background: var(--primary-tint); color: var(--primary-deep);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}

.data-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 14px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 480px; }
.data-table th, .data-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table th { background: var(--bg-soft); color: var(--gray-soft); font-weight: 700; font-size: 12px; }
.data-table tbody tr:last-child td { border-bottom: none; }

.mypage-empty { text-align: center; padding: 34px 20px; color: var(--gray-soft); font-size: 13.5px; background: var(--bg-soft); border-radius: 14px; }

@media (max-width: 640px) {
  .mypage-stats { grid-template-columns: 1fr 1fr; }
  .mypage-hero { padding: 22px 20px; }
}

/* ------------------------------------------------------------
   공용: admin-panel / admin-table 클래스가 실수로 일반 사용자 화면에
   쓰인 곳들(지출보고서/샘플신청/브로셔신청 등)도 스타일 없이 깨져 보이지
   않도록, 관리자 화면과 유사한 톤으로 공개 사이트에도 정의해둡니다.
------------------------------------------------------------ */
.admin-panel { background: #fff; border: 1px solid var(--border); border-radius: 18px; padding: 26px; }
.admin-panel-title { margin: 0 0 6px; font-size: 16px; font-weight: 800; color: var(--ink); }
.admin-panel-desc { margin: 0 0 16px; font-size: 13px; color: var(--gray-soft); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.admin-table th, .admin-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg-soft); color: var(--gray-soft); font-weight: 700; font-size: 12px; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.badge { display: inline-flex; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 700; }
.badge-on { background: #E7F6EC; color: #1A8A4A; }
.badge-off { background: var(--bg-soft); color: var(--gray-soft); }
.badge-live { background: #FFE7E9; color: var(--live); }
.badge-warn { background: #FFF1D6; color: #B7791F; }

/* ------------------------------------------------------------
   메인화면 좌측 상단 고정 프로모션 팝업
------------------------------------------------------------ */
.promo-fixed-wrap {
  position: fixed; top: 96px; left: 20px; z-index: 90;
  display: flex; flex-direction: column; gap: 12px; width: var(--promo-popup-width, 280px);
}
.promo-fixed-card {
  position: relative; background: var(--promo-popup-bg-color, linear-gradient(135deg, #FFF8ED 0%, #FFFDF9 100%));
  border: 1.5px solid #FBE3B8; border-radius: 18px; padding: 18px 18px 16px;
  box-shadow: 0 16px 40px rgba(214,158,46,.18);
  animation: promoPopIn .45s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes promoPopIn { from { opacity: 0; transform: translateX(-16px) scale(.96); } to { opacity: 1; transform: none; } }
.promo-fixed-close {
  position: absolute; top: 10px; right: 10px; width: 22px; height: 22px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.06); color: #8a6d1f; font-size: 15px; line-height: 1; cursor: pointer;
}
.promo-fixed-tag {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .4px; color: var(--promo-popup-accent-color, #B7791F);
  background: #FFF1D6; padding: 3px 9px; border-radius: 999px; margin-bottom: 8px;
}
.promo-fixed-title { display: block; font-size: 15px; font-weight: 800; color: var(--promo-popup-title-color, var(--ink)); margin-bottom: 3px; line-height: 1.35; padding-right: 20px; }
.promo-fixed-sub { display: block; font-size: 12px; color: var(--promo-popup-sub-color, #8a6d1f); margin-bottom: 8px; }
.promo-fixed-desc { font-size: 12.5px; color: var(--promo-popup-desc-color, var(--gray-soft)); margin: 0 0 12px; line-height: 1.5; }
.promo-fixed-cta {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 800; color: #fff !important;
  background: var(--promo-popup-accent-color, #F2994A); padding: 8px 14px; border-radius: 999px; transition: filter .15s ease;
}
.promo-fixed-cta:hover { filter: brightness(1.06); }

@media (max-width: 720px) {
  .promo-fixed-wrap { left: 12px; right: 12px; top: 84px; width: auto; }
}

/* ------------------------------------------------------------
   프로모션 목록 / 상세 페이지
------------------------------------------------------------ */
.promo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.promo-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: all .2s ease; }
.promo-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: transparent; }
.promo-card-thumb { width: 100%; height: 140px; background: #000; }
.promo-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 6px; }
.promo-card-tag { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .4px; color: #B7791F; background: #FFF1D6; padding: 3px 9px; border-radius: 999px; width: fit-content; }
.promo-card-body strong { font-size: 15.5px; font-weight: 800; color: var(--ink); }
.promo-card-sub { font-size: 12.5px; color: var(--gray-soft); }
.promo-card-fee { font-size: 13px; font-weight: 700; color: var(--primary-deep); display: flex; gap: 8px; align-items: center; }
.promo-card-fee s { color: var(--gray-soft); font-weight: 500; }
.promo-card-period { font-size: 11.5px; color: var(--gray-soft); }

.promo-detail { background: #fff; border: 1px solid var(--border); border-radius: 22px; padding: 36px 40px; box-shadow: 0 20px 50px rgba(31,71,92,.08); }
.promo-detail-title { font-size: 24px; font-weight: 800; margin: 10px 0 6px; color: var(--ink); }
.promo-detail-sub { font-size: 14px; color: var(--gray-soft); margin: 0 0 20px; }
.promo-detail-media { margin-bottom: 22px; border-radius: 14px; overflow: hidden; }
.promo-detail-media img, .promo-detail-media video { width: 100%; display: block; max-height: 420px; object-fit: cover; }
.promo-detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 26px; }
.promo-detail-item { background: var(--bg-soft); border-radius: 12px; padding: 14px 16px; }
.promo-detail-item span { display: block; font-size: 11.5px; color: var(--gray-soft); font-weight: 700; margin-bottom: 4px; }
.promo-detail-item strong { font-size: 15px; color: var(--ink); }
.promo-detail-item-highlight { background: linear-gradient(135deg, #FFF1D6, #FFF8ED); }
.promo-detail-item-highlight strong { color: #B7791F; }
.promo-detail-condition { background: var(--bg-soft); border-radius: 14px; padding: 20px 22px; }
.promo-detail-condition h3 { margin: 0 0 8px; font-size: 14.5px; font-weight: 800; }
.promo-detail-condition p { margin: 0; font-size: 13.5px; color: var(--gray); line-height: 1.7; }

@media (max-width: 640px) {
  .promo-detail { padding: 26px 22px; }
}

/* ============================================================
   PWA / 모바일 최적화
   ============================================================ */

/* iOS 노치·다이나믹 아일랜드 및 하단 홈 인디케이터 안전영역 대응
   (viewport-fit=cover 로 화면 전체를 사용하는 대신, 실제 콘텐츠는 밀려나지 않도록 여백 확보) */
.site-header { padding-top: env(safe-area-inset-top); }
.site-footer { padding-bottom: calc(env(safe-area-inset-bottom) + 8px); }
.float-stack {
  right: calc(22px + env(safe-area-inset-right));
  bottom: calc(22px + env(safe-area-inset-bottom));
}
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }

/* 위 safe-area 규칙이 이 파일 뒤쪽에 있어서(같은 우선순위일 때 나중 선언이 이김), 앞서 지정한
   모바일 하단 탭 바 여백(챗봇 버튼이 가려지지 않도록 한 값)을 덮어써 버리는 문제가 있었습니다.
   그래서 모바일 화면에서는 여기서 다시 한번 명시적으로 확실하게 재적용합니다. */
@media (max-width: 720px) {
  .float-stack { bottom: calc(110px + env(safe-area-inset-bottom)); }
  .chat-panel { bottom: calc(168px + env(safe-area-inset-bottom)); }
}

/* 모바일에서 입력창 포커스 시 iOS Safari가 자동으로 확대되는 것을 방지 (16px 미만이면 확대됨) */
@media (max-width: 640px) {
  input, select, textarea, button { font-size: max(16px, 1em); }
  .elegant-card input, .elegant-card select, .elegant-card textarea,
  .apply-main input, .apply-main select, .apply-main textarea { font-size: 16px; }
}

/* 터치 타겟 최소 44px 확보 (Apple/Google 접근성 권장 기준) */
@media (max-width: 720px) {
  .float-btn { width: 52px; height: 52px; }
  .nav-toggle { padding: 12px; }
  .chat-quick-btn, .btn, button { min-height: 40px; }
}

/* 상단 PWA 설치 안내 배너 */
.pwa-install-banner {
  position: sticky; top: 0; z-index: 150;
  display: flex; align-items: center; gap: 12px;
  background: linear-gradient(90deg, var(--primary-deep), var(--primary));
  color: #fff; padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
}
.pwa-install-banner[hidden] { display: none; }
.pwa-install-icon { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; background: #fff; }
.pwa-install-text { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.35; }
.pwa-install-text strong { font-size: 13px; font-weight: 800; }
.pwa-install-text span { font-size: 11.5px; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwa-install-btn {
  flex-shrink: 0; background: #fff; color: var(--primary-deep); border: none; border-radius: 999px;
  font-weight: 800; font-size: 12.5px; padding: 8px 16px;
}
.pwa-install-dismiss {
  flex-shrink: 0; background: none; border: none; color: #fff; font-size: 20px; line-height: 1; opacity: .85; padding: 4px 6px;
}
.pwa-install-dismiss:hover { opacity: 1; }

/* 알림 켜기 플로팅 버튼 (float-stack 안에 위치) */
.float-push { background: var(--accent); }
.float-push.is-subscribed { background: var(--gray-soft); }

@media (prefers-reduced-motion: reduce) {
  .pwa-install-banner, .float-btn { transition: none !important; }
}

