/* ====================================================
   윤슬스토어 디자인 시스템 (styles.css 위에 덧입히는 레이어)
   ==================================================== */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --ink: #0e1726;
  --ink-soft: #4b5869;
  --ink-mute: #8892a0;
  --paper: #f5f6f8;
  --paper-deep: #e9ecf0;
  --surface: #ffffff;
  --navy: #0b1a2c;
  --navy-2: #12283f;
  --accent: #0f766e;
  --accent-deep: #0b5a54;
  --accent-soft: #e0f2ef;
  --gold: #e3b04b;
  --gold-soft: #fbf3df;
  --rose: #d6336c;
  --line: rgba(14, 23, 38, 0.1);
  --line-strong: rgba(14, 23, 38, 0.18);
  --danger: #c0362c;
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, 0.06), 0 2px 8px rgba(14, 23, 38, 0.04);
  --shadow: 0 12px 32px rgba(14, 23, 38, 0.1);
  --shadow-lg: 0 24px 60px rgba(14, 23, 38, 0.18);
  --radius: 16px;
  --radius-sm: 10px;
  --font-display: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-body: var(--font-display);
  --max: 1200px;
}

body {
  background: var(--paper);
  font-family: var(--font-body);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

main {
  padding-top: 0;
}

h1, h2, h3, h4 {
  letter-spacing: -0.03em;
  text-wrap: balance;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- 헤더 ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  min-height: 4rem;
  gap: 1.5rem;
}

.brand {
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  flex: none;
}

.brand::before {
  content: "";
  width: 2.3rem;
  height: 2.3rem;
  flex: none;
  background: url("/images/logo-mark.svg") center / contain no-repeat;
  filter: drop-shadow(0 2px 5px rgba(16, 41, 74, 0.22));
  transition: transform 0.2s ease;
}

.brand:hover::before {
  transform: rotate(-4deg) scale(1.05);
}

.brand__name {
  letter-spacing: -0.03em;
}

.brand__name {
  font-size: 1.25rem;
  font-weight: 800;
}

.brand__sub {
  color: var(--accent) !important;
  font-weight: 600;
  font-size: inherit !important;
  margin-left: 0.15em;
}

[hidden] {
  display: none !important;
}

.brand__tag {
  display: none;
}

.nav {
  flex: 1;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: nowrap;
  min-width: 0;
}

.nav__main,
.nav__side {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav a {
  font-size: 0.94rem;
  font-weight: 550;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.nav a.is-active {
  color: var(--accent-deep);
  background: var(--accent-soft);
}

.nav__divider {
  width: 1px;
  height: 1.1rem;
  background: var(--line-strong);
  margin: 0 0.5rem;
}

.nav a.cart-badge {
  background: transparent;
  color: var(--ink-soft);
  padding: 0.5rem 0.7rem;
}

.nav a.cart-badge:hover {
  background: rgba(14, 23, 38, 0.06);
  color: var(--ink);
  transform: none;
}

.cart-badge__count {
  background: var(--ink);
  color: #fff;
  min-width: 1.2rem;
  height: 1.2rem;
  font-size: 0.7rem;
}

.cart-badge__count[data-empty="true"] {
  display: none;
}

.nav-auth {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-user-greeting {
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 0 0.5rem;
  white-space: nowrap;
}

.nav a.btn-signup-pill {
  background: var(--ink);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 999px;
}

.nav a.btn-signup-pill:hover {
  background: #000;
  color: #fff;
}

.btn-text {
  font-size: 0.88rem;
  color: var(--ink-mute);
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .site-header__inner {
    flex-wrap: wrap;
    padding: 0.6rem 0;
    gap: 0.4rem;
  }
  .nav {
    flex: 1 1 100%;
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -1rem;
    padding: 0 1rem;
  }
  .nav::-webkit-scrollbar {
    display: none;
  }
  .nav-user-greeting {
    display: none;
  }
}

/* ---------- 버튼 ---------- */
.btn {
  min-height: 2.75rem;
  padding: 0.65rem 1.2rem;
  border-radius: 12px;
  font-weight: 650;
  font-size: 0.95rem;
  white-space: nowrap;
}

.btn--primary {
  box-shadow: none;
}

.btn--primary:hover {
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.25);
}

.btn--ghost {
  background: var(--surface);
  border: 1px solid var(--line-strong);
}

.btn--ghost:hover {
  border-color: var(--ink);
}

.btn--gold {
  background: var(--gold);
  color: #1d1503;
}

.btn--gold:hover {
  background: #edbe5f;
}

.btn--light {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn--light:hover {
  background: rgba(255, 255, 255, 0.18);
}

.btn--danger {
  background: #fff;
  color: var(--danger);
  border: 1px solid rgba(192, 54, 44, 0.35);
}

.btn--sm {
  min-height: 2.1rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.84rem;
  border-radius: 9px;
}

.btn--icon {
  width: 2.75rem;
  padding: 0;
}

/* ---------- 뱃지 / 칩 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 650;
  background: var(--paper-deep);
  color: var(--ink-soft);
  white-space: nowrap;
}

.badge--book { background: #e8eefc; color: #2947a9; }
.badge--sw { background: #efe9fd; color: #5b33b6; }
.badge--owned { background: var(--accent-soft); color: var(--accent-deep); }
.badge--sale { background: #fde8ef; color: var(--rose); }
.badge--ok { background: #dcf5e6; color: #14713d; }
.badge--warn { background: #fdf0d5; color: #8a5a00; }
.badge--bad { background: #fde4e1; color: #a8271d; }
.badge--live { background: #dcf5e6; color: #14713d; }
.badge--live::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #1faa59;
  animation: pulse 1.6s infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.chip {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 550;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chip:hover { border-color: var(--ink); color: var(--ink); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------- 히어로 ---------- */
.home-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(227, 176, 75, 0.28), transparent 60%),
    radial-gradient(700px 500px at 0% 110%, rgba(15, 118, 110, 0.55), transparent 60%),
    linear-gradient(160deg, #0b1a2c 0%, #10283f 60%, #0d3a40 100%);
}

/* 윤슬: 잔물결 위에서 햇빛이 조용히 반짝이는 느낌. 낱낱의 빛이 제각각 천천히 밝아졌다 사라진다 */
.glints { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.glints::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 236, 196, 0.07) 48%, transparent 66%);
  background-size: 220% 100%;
  animation: glint-sweep 16s ease-in-out infinite alternate;
}
.glint {
  position: absolute;
  width: var(--s, 5px);
  height: calc(var(--s, 5px) * 0.42);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 246, 222, 0.95) 0%, rgba(255, 226, 170, 0.5) 38%, transparent 72%);
  opacity: 0;
  animation: glint var(--d, 6s) ease-in-out var(--delay, 0s) infinite;
  will-change: opacity, transform;
}
@keyframes glint {
  0%, 100% { opacity: 0; transform: scaleX(0.6); }
  45% { opacity: var(--o, 0.55); transform: scaleX(1.25); }
  60% { opacity: calc(var(--o, 0.55) * 0.5); transform: scaleX(1); }
}
@keyframes glint-sweep {
  from { background-position: 100% 0; }
  to { background-position: 0% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .glints::before { animation: none; }
  .glint { animation: none; opacity: calc(var(--o, 0.55) * 0.45); }
}

.home-hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}

.home-hero h1 {
  margin: 1rem 0 1.1rem;
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  font-weight: 800;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.home-hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #f6d48a, #e3b04b 60%, #8fe3d5);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.home-hero__lede {
  margin: 0 0 2rem;
  max-width: 34rem;
  font-size: 1.08rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
}

.home-hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.home-hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.25rem;
  margin: 2.75rem 0 0;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.home-hero__stats div { margin: 0; }
.home-hero__stats dt { font-size: 0.82rem; color: rgba(255, 255, 255, 0.6); }
.home-hero__stats dd {
  margin: 0.2rem 0 0;
  font-size: 1.5rem;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.hero-picks {
  display: grid;
  gap: 1rem;
}

.hero-pick {
  display: grid;
  grid-template-columns: 104px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.1rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(8px);
  transition: transform 0.25s ease, background 0.25s ease;
}

.hero-pick:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.11);
}

.hero-pick__cover {
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4);
}

.hero-pick__cover img { width: 100%; height: 100%; object-fit: cover; }
.hero-pick__label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.1em; color: var(--gold); }
.hero-pick__title { margin: 0.3rem 0; font-size: 1.15rem; font-weight: 700; line-height: 1.35; }
.hero-pick__desc {
  margin: 0 0 0.7rem;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.68);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-pick__price { display: flex; align-items: baseline; gap: 0.5rem; font-weight: 750; font-size: 1.1rem; }
.hero-pick__price s { font-size: 0.82rem; font-weight: 400; color: rgba(255, 255, 255, 0.5); }
.hero-pick__price b { color: #ff8fb0; font-size: 0.9rem; }

@media (max-width: 900px) {
  .home-hero__inner { grid-template-columns: 1fr; }
}

/* ---------- 가치 제안 ---------- */
.value-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: -2.25rem;
  position: relative;
  z-index: 2;
}

.value-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  padding: 1.25rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.value-item__icon {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 1.15rem;
}

.value-item h3 { margin: 0 0 0.2rem; font-size: 1rem; font-weight: 700; }
.value-item p { margin: 0; font-size: 0.87rem; color: var(--ink-soft); line-height: 1.55; }

@media (max-width: 800px) {
  .value-strip { grid-template-columns: 1fr; }
}

/* ---------- 섹션 ---------- */
.block { margin-top: clamp(3rem, 6vw, 4.5rem); }

.block__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}

.block__head h2 { margin: 0; font-size: clamp(1.4rem, 2.4vw, 1.75rem); font-weight: 800; }
.block__head p { margin: 0.35rem 0 0; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- 랭킹 ---------- */
.rank-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.rank-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 1.1rem;
  align-items: center;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.rank-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.rank-card__cover { aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; box-shadow: 0 8px 18px rgba(14, 23, 38, 0.2); }
.rank-card__cover img { width: 100%; height: 100%; object-fit: cover; }
.rank-card__label { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; font-weight: 700; color: var(--accent-deep); }
.rank-card__title { margin: 0.3rem 0 0.2rem; font-size: 1.02rem; font-weight: 700; line-height: 1.35; }
.rank-card__meta { font-size: 0.82rem; color: var(--ink-mute); }
.rank-card__price { margin-top: 0.5rem; font-weight: 750; }
.rank-card__no {
  position: absolute;
  top: 0.6rem;
  right: 1rem;
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(14, 23, 38, 0.07);
}

@media (max-width: 900px) {
  .rank-grid { grid-template-columns: 1fr; }
}

/* ---------- 카탈로그 ---------- */
.catalog-bar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }

.seg { display: inline-flex; padding: 0.25rem; background: var(--paper-deep); border-radius: 12px; }
.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 0.5rem 1.1rem;
  border-radius: 9px;
  cursor: pointer;
}
.seg button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.catalog-tools { display: flex; gap: 0.5rem; flex: 1; justify-content: flex-end; min-width: 240px; }

.input,
.select {
  font: inherit;
  font-size: 0.92rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.58rem 0.85rem;
  min-height: 2.6rem;
  width: 100%;
}

.input:focus,
.select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.catalog-tools .input { max-width: 280px; }
.catalog-tools .select { width: auto; }

.chip-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.4rem; }

.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 1.6rem 1.15rem; }

.pcard { display: flex; flex-direction: column; min-width: 0; }

.pcard__cover {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-deep);
  box-shadow: 0 6px 16px rgba(14, 23, 38, 0.14);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.pcard:hover .pcard__cover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(14, 23, 38, 0.24); }
.pcard__cover img { width: 100%; height: 100%; object-fit: cover; }
.pcard__flags { position: absolute; top: 0.55rem; left: 0.55rem; display: flex; gap: 0.3rem; flex-wrap: wrap; }

.pcard__cart {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
  opacity: 0;
  transform: translateY(6px);
  transition: all 0.2s ease;
}

.pcard:hover .pcard__cart,
.pcard__cart:focus-visible { opacity: 1; transform: none; }
.pcard__cart:hover { background: var(--accent); color: #fff; }

@media (hover: none) {
  .pcard__cart { opacity: 1; transform: none; }
}

.pcard__body { padding-top: 0.8rem; display: flex; flex-direction: column; gap: 0.2rem; }
.pcard__genre { font-size: 0.76rem; font-weight: 600; color: var(--accent-deep); }
.pcard__title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard__title a:hover { text-decoration: underline; }
.pcard__author { font-size: 0.82rem; color: var(--ink-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard__rating { font-size: 0.8rem; color: var(--ink-soft); display: flex; align-items: center; gap: 0.25rem; }
.pcard__rating svg { width: 0.9em; height: 0.9em; fill: var(--gold); stroke: none; }
.pcard__price { margin-top: 0.25rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.4rem; font-weight: 750; font-size: 1.02rem; font-variant-numeric: tabular-nums; }
.pcard__price b { color: var(--rose); }
.pcard__price s { font-size: 0.8rem; font-weight: 400; color: var(--ink-mute); }

/* ---------- 이용 방법 ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; counter-reset: step; }
.step { padding: 1.6rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); counter-increment: step; }
.step::before {
  content: "0" counter(step);
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--gold);
  margin-bottom: 0.6rem;
}
.step h3 { margin: 0 0 0.4rem; font-size: 1.08rem; }
.step p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.65; }

@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- 페이지 헤더 (서재/프로그램) ---------- */
.page-hero { background: var(--navy); color: #fff; padding: 2.5rem 0 2.25rem; }
.page-hero h1 { margin: 0.5rem 0 0.4rem; font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; }
.page-hero p { margin: 0; color: rgba(255, 255, 255, 0.7); }
.page-body { padding: 2rem 0 4rem; }
.page-title { font-family: var(--font-display); font-weight: 800; }

/* ---------- 서재 ---------- */
.resume {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  margin-top: -3.25rem;
  position: relative;
}

.resume__cover { aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 22px rgba(14, 23, 38, 0.25); }
.resume__cover img { width: 100%; height: 100%; object-fit: cover; }
.resume h2 { margin: 0.3rem 0; font-size: 1.3rem; }
.resume p { margin: 0; color: var(--ink-soft); font-size: 0.92rem; }

.progress { height: 6px; background: var(--paper-deep); border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #3bb6a7); border-radius: inherit; }

@media (max-width: 700px) {
  .resume { grid-template-columns: 84px 1fr; }
  .resume > .btn { grid-column: 1 / -1; }
}

.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1.75rem 1.2rem; }
.shelf-book { display: flex; flex-direction: column; gap: 0.6rem; min-width: 0; }
.shelf-book__meta { display: flex; justify-content: space-between; font-size: 0.78rem; color: var(--ink-mute); }

/* ---------- 내 프로그램 ---------- */
.prog-list { display: grid; gap: 1rem; }

.prog {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 1.4rem;
  align-items: center;
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.prog.is-running { border-color: rgba(31, 170, 89, 0.5); box-shadow: 0 0 0 4px rgba(31, 170, 89, 0.08); }
.prog__cover { aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; }
.prog__cover img { width: 100%; height: 100%; object-fit: cover; }
.prog h3 { margin: 0.35rem 0 0.25rem; font-size: 1.15rem; }
.prog__meta { display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.84rem; color: var(--ink-soft); }
.prog__actions { display: flex; flex-direction: column; gap: 0.5rem; min-width: 168px; }

.license {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.7rem;
  padding: 0.35rem 0.4rem 0.35rem 0.75rem;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.82rem;
  background: var(--paper);
}

.license button { appearance: none; border: 0; background: var(--surface); border-radius: 6px; padding: 0.25rem 0.5rem; font: inherit; font-family: var(--font-body); font-size: 0.76rem; cursor: pointer; box-shadow: var(--shadow-sm); }

@media (max-width: 760px) {
  .prog { grid-template-columns: 72px 1fr; }
  .prog__actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
  .prog__actions .btn { flex: 1; }
}

.runner { margin-bottom: 1.5rem; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-strong); background: #fff; box-shadow: var(--shadow-lg); }
.runner__bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.75rem 0.6rem 1.1rem; background: var(--navy); color: #fff; font-size: 0.92rem; font-weight: 600; }
.runner__bar div { display: flex; gap: 0.4rem; }
.runner iframe { display: block; width: 100%; height: min(72vh, 760px); border: 0; background: #fff; }
.runner:fullscreen iframe { height: calc(100vh - 3.2rem); }

.callout { display: flex; gap: 0.85rem; padding: 1rem 1.2rem; border-radius: 14px; background: var(--gold-soft); border: 1px solid rgba(227, 176, 75, 0.45); font-size: 0.9rem; color: #5a4310; line-height: 1.6; }
.callout code { background: rgba(0, 0, 0, 0.07); padding: 0.1rem 0.35rem; border-radius: 4px; }

/* ---------- 빈 상태 / 스켈레톤 ---------- */
.empty-state { text-align: center; padding: 4rem 1rem; background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 20px; }
.empty-state h3 { margin: 0 0 0.5rem; font-size: 1.2rem; }
.empty-state p { margin: 0 0 1.5rem; color: var(--ink-soft); }

.skeleton { background: linear-gradient(90deg, var(--paper-deep) 25%, #f3f5f7 50%, var(--paper-deep) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- 토스트 / 푸터 ---------- */
.toast { border-radius: 12px; font-weight: 600; }

.site-footer { margin-top: 0; padding: 1.5rem 0 1.4rem; background: var(--navy); color: rgba(255, 255, 255, 0.62); border-top: 0; font-size: 0.88rem; }
.site-footer strong { color: #fff; }
.site-footer a { color: rgba(255, 255, 255, 0.75); }
.site-footer a:hover { color: #fff; }
.site-footer small { color: rgba(255, 255, 255, 0.5) !important; }

.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.footer-grid h4 { margin: 0 0 0.8rem; font-size: 0.82rem; letter-spacing: 0.06em; color: #fff; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.footer-brand { font-size: 1.2rem; font-weight: 800; color: #fff; }
.footer-legal { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.8rem; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 모달 ---------- */
dialog.modal { border: 0; border-radius: 20px; padding: 0; width: min(760px, calc(100% - 2rem)); max-height: calc(100vh - 3rem); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog.modal::backdrop { background: rgba(11, 26, 44, 0.55); backdrop-filter: blur(3px); }
.modal__head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; padding: 1.2rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--line); }
.modal__head h3 { margin: 0; font-size: 1.15rem; }
.modal__body { padding: 1.5rem; }
.modal__foot { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 0.5rem; padding: 1rem 1.5rem; background: var(--surface); border-top: 1px solid var(--line); }
.modal__close { appearance: none; border: 0; background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--ink-mute); }

.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.fgrid .full { grid-column: 1 / -1; }
.f label { display: block; font-size: 0.82rem; font-weight: 650; color: var(--ink-soft); margin-bottom: 0.35rem; }
.f textarea.input { min-height: 5.5rem; resize: vertical; line-height: 1.55; }
.f small { display: block; margin-top: 0.3rem; color: var(--ink-mute); font-size: 0.78rem; }

@media (max-width: 640px) {
  .fgrid { grid-template-columns: 1fr; }
}

/* ---------- 관리자 콘솔 ---------- */
.admin { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; background: var(--paper); }
.admin__side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 1.25rem 0.9rem; background: var(--navy); color: #fff; }
.admin__brand { display: flex; align-items: center; gap: 0.6rem; padding: 0.25rem 0.6rem 1.25rem; font-weight: 800; font-size: 1.1rem; }
.admin__brand small { display: block; font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; color: var(--gold); }
.admin__nav { display: grid; gap: 0.15rem; }
.admin__nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.68);
  font: inherit;
  font-size: 0.93rem;
  font-weight: 550;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  cursor: pointer;
}
.admin__nav button:hover { background: rgba(255, 255, 255, 0.07); color: #fff; }
.admin__nav button.is-active { background: rgba(255, 255, 255, 0.13); color: #fff; }
.admin__nav .count { margin-left: auto; font-size: 0.72rem; background: var(--gold); color: #1d1503; border-radius: 999px; padding: 0.05rem 0.45rem; font-weight: 700; }
.admin__foot { margin-top: auto; display: grid; gap: 0.4rem; font-size: 0.85rem; padding: 0.6rem; color: rgba(255, 255, 255, 0.6); }
.admin__foot a { color: rgba(255, 255, 255, 0.8); }
.admin__main { padding: 1.75rem clamp(1rem, 3vw, 2.25rem) 4rem; min-width: 0; }
.admin__head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.admin__head h1 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.admin__head p { margin: 0.25rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }

@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .admin__side { position: static; height: auto; padding: 0.75rem; }
  .admin__nav { grid-auto-flow: column; overflow-x: auto; }
  .admin__nav button { white-space: nowrap; }
  .admin__foot { display: none; }
}

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.kpi { padding: 1.2rem 1.3rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.kpi__label { font-size: 0.82rem; color: var(--ink-soft); font-weight: 600; }
.kpi__value { margin-top: 0.35rem; font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi__sub { margin-top: 0.2rem; font-size: 0.8rem; color: var(--ink-mute); }

@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.card h2 { margin: 0 0 1rem; font-size: 1.02rem; font-weight: 750; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }

@media (max-width: 1100px) {
  .cols { grid-template-columns: 1fr; }
}

.chart { display: flex; align-items: flex-end; gap: 6px; height: 190px; }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.chart__bar { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, #2aa598, var(--accent)); min-height: 3px; transition: opacity 0.15s; }
.chart__col:hover .chart__bar { opacity: 0.75; }
.chart__bar.is-zero { background: var(--paper-deep); }
.chart__x { font-size: 0.68rem; color: var(--ink-mute); white-space: nowrap; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.toolbar .input { max-width: 300px; }
.toolbar .select { width: auto; }
.toolbar .spacer { flex: 1; }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.dt { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
table.dt th { text-align: left; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.03em; color: var(--ink-mute); padding: 0.75rem 1rem; background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.dt td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.dt tr:last-child td { border-bottom: 0; }
table.dt tbody tr:hover { background: #fafbfc; }
table.dt .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.dt .actions { display: flex; gap: 0.35rem; justify-content: flex-end; flex-wrap: wrap; }
table.dt .muted { color: var(--ink-mute); font-size: 0.8rem; }
table.dt code { font-size: 0.8rem; background: var(--paper); padding: 0.1rem 0.35rem; border-radius: 4px; }

.prod-cell { display: flex; align-items: center; gap: 0.75rem; min-width: 220px; }
.prod-cell img { width: 34px; height: 45px; object-fit: cover; border-radius: 4px; flex: none; }
.prod-cell strong { display: block; line-height: 1.3; }

.upload-box { border: 1px dashed var(--line-strong); border-radius: 14px; padding: 1.1rem; background: var(--paper); }
.upload-box h4 { margin: 0 0 0.3rem; font-size: 0.95rem; }
.upload-box p { margin: 0 0 0.8rem; font-size: 0.84rem; color: var(--ink-soft); line-height: 1.55; }
.upload-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.upload-status { margin-top: 0.7rem; font-size: 0.84rem; color: var(--ink-soft); }

.list-plain { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.list-plain li { display: flex; justify-content: space-between; gap: 1rem; align-items: center; font-size: 0.9rem; }

/* ---------- 푸터 사업자 정보 ---------- */
.footer-biz { display: flex; flex-wrap: wrap; gap: 0.35rem 1.4rem; margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.82rem; line-height: 1.6; }
.footer-biz b { font-weight: 500; color: rgba(255, 255, 255, 0.85); margin-left: 0.25rem; }
.footer-biz a { text-decoration: underline; margin-left: 0.3rem; }
.footer-biz + .footer-legal { margin-top: 1.1rem; border-top: 0; padding-top: 0; line-height: 1.7; }

/* ---------- 약관 · 정책 ---------- */
.policy-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.policy-tabs a { padding: 0.55rem 1.1rem; border-radius: 999px; border: 1px solid var(--line, #e3e8ef); color: var(--ink-soft, #5b6675); font-weight: 600; font-size: 0.92rem; background: #fff; }
.policy-tabs a.is-active { background: var(--navy, #10243a); border-color: var(--navy, #10243a); color: #fff; }
.policy { background: #fff; border: 1px solid var(--line, #e3e8ef); border-radius: 18px; padding: clamp(1.25rem, 4vw, 3rem); line-height: 1.85; color: var(--ink, #1c2430); max-width: 60rem; }
.policy h1 { margin: 0 0 0.3rem; font-size: 1.7rem; }
.policy h2 { margin: 2.2rem 0 0.6rem; font-size: 1.1rem; }
.policy p, .policy li { font-size: 0.96rem; }
.policy ol, .policy ul { padding-left: 1.3rem; display: grid; gap: 0.35rem; }
.policy a { color: var(--teal, #0d7f7a); text-decoration: underline; }
.policy table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-size: 0.92rem; display: block; overflow-x: auto; }
.policy th, .policy td { border: 1px solid var(--line, #e3e8ef); padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
.policy th { background: #f6f8fb; white-space: nowrap; }
.policy-date { color: var(--ink-mute, #7a8594); font-size: 0.88rem !important; }
.policy-note { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line, #e3e8ef); color: var(--ink-mute, #7a8594); font-size: 0.88rem !important; }

/* ---------- 상품정보 제공 고시 ---------- */
.notice-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.notice-table th, .notice-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--line, #e3e8ef); text-align: left; vertical-align: top; line-height: 1.6; }
.notice-table th { width: 11rem; background: #f6f8fb; font-weight: 600; color: var(--ink-soft, #5b6675); white-space: nowrap; }
.notice-table tr:last-child th, .notice-table tr:last-child td { border-bottom: 0; }
@media (max-width: 640px) {
  .notice-table th { width: 6.5rem; white-space: normal; padding: 0.7rem; }
  .notice-table td { padding: 0.7rem; }
}

/* ---------- 관리자: 유출 추적 · 사이트 정보 ---------- */
.dropzone { border: 2px dashed var(--line, #cdd5df); border-radius: 16px; padding: 2.2rem 1rem; text-align: center; color: var(--ink-soft, #5b6675); cursor: pointer; transition: border-color 0.15s, background 0.15s; }
.dropzone.is-over, .dropzone:hover { border-color: var(--teal, #0d7f7a); background: rgba(13, 127, 122, 0.05); }
.dropzone strong { display: block; color: var(--ink, #1c2430); font-size: 1.02rem; margin-bottom: 0.3rem; }
.trace-result { margin-top: 1.2rem; border-radius: 14px; padding: 1.2rem 1.3rem; border: 1px solid var(--line, #e3e8ef); line-height: 1.7; }
.trace-result.is-hit { border-color: #1f9d6b; background: #f0faf5; }
.trace-result.is-miss { border-color: #e3b341; background: #fffaf0; }
.trace-result h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.trace-preview { max-width: 100%; max-height: 260px; border-radius: 10px; border: 1px solid var(--line, #e3e8ef); margin-top: 1rem; }
.html-editor { width: 100%; min-height: 420px; font-family: Consolas, 'Courier New', monospace; font-size: 0.85rem; line-height: 1.55; white-space: pre; tab-size: 2; }
.html-preview { border: 1px solid var(--line, #e3e8ef); border-radius: 14px; overflow: hidden; }
.html-preview .site-footer { margin: 0; }
.html-preview .policy { border: 0; border-radius: 0; }

/* ---------- 콤팩트 푸터 ---------- */
.footer-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.3rem; font-size: 0.86rem; }
.footer-links a { color: rgba(255, 255, 255, 0.82); }
.footer-links a:hover { color: #fff; text-decoration: underline; }
.site-footer .footer-biz { margin-top: 0.9rem; padding-top: 0.9rem; gap: 0.15rem 1.1rem; font-size: 0.76rem; line-height: 1.55; color: rgba(255, 255, 255, 0.5); }
.site-footer .footer-biz b { color: rgba(255, 255, 255, 0.72); }
.site-footer .footer-biz + .footer-legal { margin-top: 0.6rem; font-size: 0.74rem; line-height: 1.6; color: rgba(255, 255, 255, 0.42); }

/* ---------- 게시판 (질문과 답변 · 상담접수) ---------- */
.board { width: 100%; border-collapse: collapse; background: var(--surface); }
.board th { padding: 0.75rem 1rem; font-size: 0.8rem; font-weight: 650; color: var(--ink-mute); text-align: left; border-bottom: 1px solid var(--line); background: #f8fafc; white-space: nowrap; }
.board td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.93rem; vertical-align: middle; }
.board tr:last-child td { border-bottom: 0; }
.board .col-no, .board .col-date, .board .col-author, .board .col-state { white-space: nowrap; color: var(--ink-mute); font-size: 0.85rem; }
.board .col-no { width: 4.5rem; }
.board .col-state { width: 6.5rem; }
.board__title { display: flex; align-items: center; gap: 0.45rem; min-width: 0; color: var(--ink); font-weight: 550; background: none; border: 0; padding: 0; font: inherit; text-align: left; cursor: pointer; width: 100%; }
.board__title span.t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board__title:hover span.t { text-decoration: underline; }
.board__title .lock { color: var(--ink-mute); flex: none; }
.board__title .lock svg { width: 0.95rem; height: 0.95rem; }
.board tr.is-mine td { background: #fbfdf9; }
.state { display: inline-block; padding: 0.22rem 0.6rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.state--done { background: #dcf5e6; color: #14713d; }
.state--wait { background: #eef1f5; color: #5b6675; }
.board-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1rem; }
.pager { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.pager button { min-width: 2.2rem; height: 2.2rem; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); font: inherit; font-size: 0.88rem; cursor: pointer; }
.pager button.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.post { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.post__head { padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--line); }
.post__head h2 { margin: 0.5rem 0 0.3rem; font-size: 1.25rem; line-height: 1.4; }
.post__meta { color: var(--ink-mute); font-size: 0.85rem; }
.post__body { padding: 1.4rem 1.5rem; white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }
.post__answer { padding: 1.4rem 1.5rem; background: #f4f9f8; border-top: 1px solid var(--line); }
.post__answer h3 { margin: 0 0 0.6rem; font-size: 0.95rem; color: var(--accent-deep, #0d7f7a); }
.post__answer div { white-space: pre-wrap; line-height: 1.8; overflow-wrap: anywhere; }
.post__answer.is-waiting { background: #fafbfc; color: var(--ink-mute); }
.write-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; display: grid; gap: 1rem; max-width: 46rem; }
.write-form textarea.input { min-height: 12rem; resize: vertical; line-height: 1.6; }
.write-form .count { font-size: 0.78rem; color: var(--ink-mute); text-align: right; margin-top: 0.25rem; }
.notice-box { display: flex; gap: 0.7rem; padding: 0.85rem 1rem; border-radius: 12px; background: #fff7e6; border: 1px solid #f3dca6; color: #6b4e09; font-size: 0.87rem; line-height: 1.6; }
.notice-box svg { flex: none; width: 1.15rem; height: 1.15rem; margin-top: 0.15rem; }
.form-error { color: #a8271d; font-size: 0.88rem; min-height: 1.2rem; }
@media (max-width: 640px) {
  .board .col-no, .board .col-author { display: none; }
  .board th, .board td { padding: 0.7rem 0.7rem; }
  .board .col-date { font-size: 0.78rem; }
}

/* ---------- FAQ ---------- */
.faq-search { position: relative; max-width: 34rem; margin-top: 1.2rem; }
.faq-search input { width: 100%; padding: 0.85rem 1rem 0.85rem 2.8rem; border-radius: 14px; border: 0; font: inherit; font-size: 1rem; background: #fff; color: var(--ink); }
.faq-search svg { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); width: 1.2rem; height: 1.2rem; color: var(--ink-mute); }
.faq-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.faq-cats { position: sticky; top: 5.5rem; display: grid; gap: 0.3rem; }
.faq-cats button { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; padding: 0.65rem 0.9rem; border-radius: 11px; border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--ink-soft); cursor: pointer; text-align: left; }
.faq-cats button:hover { background: rgba(16, 36, 58, 0.06); }
.faq-cats button.is-active { background: var(--navy); color: #fff; }
.faq-cats button span { font-size: 0.78rem; font-weight: 500; opacity: 0.65; }
.faq-group h2 { margin: 0 0 0.7rem; font-size: 1.05rem; }
.faq-group + .faq-group { margin-top: 2rem; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 0.55rem; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.faq-item[open] { border-color: rgba(13, 127, 122, 0.45); box-shadow: 0 6px 20px rgba(16, 36, 58, 0.06); }
.faq-item summary { list-style: none; display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.2rem; cursor: pointer; font-weight: 650; line-height: 1.5; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "Q"; flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft, #e0f3f1); color: var(--accent-deep, #0d7f7a); font-size: 0.82rem; font-weight: 800; }
.faq-item summary::after { content: ""; margin-left: auto; flex: none; width: 0.55rem; height: 0.55rem; border-right: 2px solid var(--ink-mute); border-bottom: 2px solid var(--ink-mute); transform: rotate(45deg); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(-135deg); }
.faq-item__a { padding: 0 1.2rem 1.15rem 3.7rem; color: var(--ink-soft); line-height: 1.8; white-space: pre-wrap; }
.faq-item mark { background: #fff1c2; color: inherit; border-radius: 3px; padding: 0 0.1rem; }
.faq-more { margin-top: 2.5rem; padding: 1.4rem 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.faq-more p { margin: 0.2rem 0 0; color: var(--ink-soft); font-size: 0.9rem; }
@media (max-width: 760px) {
  .faq-layout { grid-template-columns: 1fr; gap: 1rem; }
  .faq-cats { position: static; display: flex; overflow-x: auto; padding-bottom: 0.3rem; }
  .faq-cats button { white-space: nowrap; flex: none; border: 1px solid var(--line); background: var(--surface); }
  .faq-item__a { padding-left: 1.2rem; }
}

/* ---------- 마이페이지 ---------- */
.my-layout { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 2rem; align-items: start; }
.my-menu { display: grid; gap: 0.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem; position: sticky; top: 5.5rem; }
.my-menu a, .my-menu button { display: flex; align-items: center; gap: 0.55rem; padding: 0.65rem 0.8rem; border-radius: 10px; border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--ink-soft); cursor: pointer; text-align: left; text-decoration: none; }
.my-menu a:hover, .my-menu button:hover { background: rgba(16, 36, 58, 0.06); }
.my-menu .is-active { background: var(--navy); color: #fff; }
.my-menu hr { border: 0; border-top: 1px solid var(--line); margin: 0.35rem 0.4rem; }
.my-menu .icon { width: 1.05rem; height: 1.05rem; }
.info-list { display: grid; grid-template-columns: 8rem 1fr; gap: 0.8rem 1rem; margin: 0; }
.info-list dt { color: var(--ink-mute); font-size: 0.88rem; }
.info-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .my-layout { grid-template-columns: 1fr; gap: 1rem; }
  .my-menu { position: static; display: flex; overflow-x: auto; }
  .my-menu a, .my-menu button { white-space: nowrap; flex: none; }
  .my-menu hr { display: none; }
}

/* ---------- 로그인 · 가입 ---------- */
.auth-card { max-width: 26rem; margin: 3.5rem auto 4rem; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 2.2rem 2rem; box-shadow: 0 18px 50px rgba(16, 36, 58, 0.08); text-align: center; }
.auth-card h1 { margin: 0 0 0.5rem; font-size: 1.6rem; font-weight: 800; }
.auth-card > p { margin: 0 0 1.6rem; color: var(--ink-soft); font-size: 0.93rem; line-height: 1.65; }
.auth-google { display: flex; justify-content: center; min-height: 44px; }
.auth-card .auth-note { margin: 1.4rem 0 0; font-size: 0.82rem; color: var(--ink-mute); line-height: 1.65; }
.auth-card .auth-note a { text-decoration: underline; }
.auth-points { list-style: none; margin: 0 0 1.6rem; padding: 0; display: grid; gap: 0.5rem; text-align: left; font-size: 0.9rem; color: var(--ink-soft); }
.auth-points li { display: flex; gap: 0.55rem; }
.auth-points li::before { content: "✓"; color: var(--accent-deep, #0d7f7a); font-weight: 800; }
.auth-msg { margin-top: 1rem; min-height: 1.3rem; font-size: 0.88rem; color: #a8271d; }
.auth-msg.is-info { color: var(--ink-soft); }

/* ---------- 관리자: 연동 설정 ---------- */
.status-row { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.kv { font-size: 0.86rem; color: var(--ink-soft); line-height: 1.7; }
.kv code { background: rgba(0, 0, 0, 0.06); padding: 0.1rem 0.4rem; border-radius: 5px; user-select: all; }

/* 관리자 콘솔 로고 */
.admin__brand::before { content: ""; width: 2.1rem; height: 2.1rem; flex: none; background: url("/images/logo-mark.svg") center / contain no-repeat; }

/* ---------- 별 평점 (점수만큼 채워지는 별 5개) ---------- */
.stars { display: inline-flex; align-items: center; gap: 0.35rem; line-height: 1; white-space: nowrap; }
.stars__row { display: inline-flex; gap: 1px; }
.star {
  width: 0.95em;
  height: 0.95em;
  flex: none;
  background: linear-gradient(90deg, #f2b01e var(--fill, 0%), #d9dee6 var(--fill, 0%));
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.600 1.200 6.500L12 17.400 6.100 20.500l1.200-6.500L2.500 9.400l6.600-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.600 1.200 6.500L12 17.400 6.100 20.500l1.200-6.500L2.500 9.400l6.600-.9z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.stars b { font-weight: 700; color: var(--ink); }
.stars__count { color: var(--ink-mute); }
.stars__none { color: var(--ink-mute); }

/* ---------- 레이어 팝업 (장바구니 담기 안내) ---------- */
.layer { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 1rem; background: rgba(11, 26, 44, 0.5); backdrop-filter: blur(3px); animation: layer-in 0.18s ease; }
.layer__box { width: min(100%, 23rem); background: var(--surface, #fff); border-radius: 20px; padding: 1.8rem 1.6rem 1.4rem; text-align: center; box-shadow: 0 30px 80px rgba(11, 26, 44, 0.35); animation: layer-pop 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.layer__icon { width: 3.4rem; height: 3.4rem; margin: 0 auto 0.9rem; border-radius: 50%; display: grid; place-items: center; }
.layer__icon .icon { width: 1.6rem; height: 1.6rem; }
.layer__icon--ok { background: #dcf5e6; color: #14713d; }
.layer__icon--info { background: #fdf0d5; color: #8a5a00; }
.layer__icon--bad { background: #fde4e1; color: #a8271d; }
.layer__box h3 { margin: 0 0 0.4rem; font-size: 1.15rem; }
.layer__box p { margin: 0 0 1.3rem; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.6; }
.layer__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.layer__actions > :only-child { grid-column: 1 / -1; }
@keyframes layer-in { from { opacity: 0; } }
@keyframes layer-pop { from { opacity: 0; transform: translateY(12px) scale(0.96); } }

/* ---------- 장바구니 줄 ---------- */
.cart-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; gap: 1rem; align-items: center; background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 14px; padding: 1.1rem; margin-bottom: 0.75rem; }
.cart-row__cover { display: block; width: 84px; aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: #1e293b; }
.cart-row__cover img { width: 100%; height: 100%; object-fit: cover; }
.cart-row__body h3 { margin: 0.35rem 0 0.2rem; font-size: 1.05rem; line-height: 1.4; }
.cart-row__body p { margin: 0 0 0.6rem; font-size: 0.86rem; color: var(--ink-soft); }
.cart-row__side { text-align: right; display: grid; gap: 0.6rem; justify-items: end; }
.cart-row__price { font-weight: 750; font-size: 1.12rem; white-space: nowrap; }
.cart-row .qty button:disabled { opacity: 0.35; cursor: not-allowed; }
.cart-row.is-owned { background: #f6f7f9; border-style: dashed; }
.cart-row.is-owned .cart-row__cover img { filter: grayscale(1); opacity: 0.6; }
.cart-row.is-owned h3 a, .cart-row.is-owned .cart-row__price { color: var(--ink-mute); }
.cart-row__blocked { display: inline-block; padding: 0.45rem 0.7rem; border-radius: 10px; background: #fde4e1; color: #8f2219; font-size: 0.84rem; line-height: 1.5; }
.cart-row__blocked strong { margin-right: 0.35rem; }
.cart-row__blocked a { text-decoration: underline; margin-left: 0.3rem; color: inherit; font-weight: 600; }
.btn.is-disabled { opacity: 0.5; pointer-events: none; }
@media (max-width: 560px) {
  .cart-row { grid-template-columns: 64px minmax(0, 1fr); }
  .cart-row__cover { width: 64px; }
  .cart-row__side { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
}

/* ---------- 제목 뒤 윤슬 ---------- */
.hero-title { position: relative; isolation: isolate; }
.title-glints { position: absolute; inset: -0.35em -0.5em -0.3em -0.4em; z-index: -1; pointer-events: none; }
.title-glints::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 70% at 45% 50%, rgba(255, 233, 176, 0.13), transparent 70%); }
.sparkle {
  position: absolute;
  width: var(--s, 12px);
  height: var(--s, 12px);
  margin: calc(var(--s, 12px) / -2);
  background: #fff;
  clip-path: polygon(50% 0, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0 50%, 42% 42%);
  opacity: 0;
  filter: drop-shadow(0 0 4px rgba(255, 244, 214, 0.9));
  animation: sparkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}
.sparkle--gold { background: #ffd98a; }
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
  40% { opacity: var(--o, 0.8); transform: scale(1) rotate(18deg); }
  55% { opacity: calc(var(--o, 0.8) * 0.6); transform: scale(0.8) rotate(24deg); }
  75% { opacity: 0; transform: scale(0.3) rotate(30deg); }
}
.hero-title em { background: linear-gradient(100deg, #f0b84a 0%, #fff3cf 45%, #f0b84a 60%, #ffe2a0 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent !important; animation: title-sheen 7s ease-in-out infinite alternate; }
@keyframes title-sheen { from { background-position: 100% 0; } to { background-position: 0% 0; } }
.glint { --o: 0.75; }
@media (prefers-reduced-motion: reduce) {
  /* 움직임 줄이기 설정에서도 반짝임 자체는 보이도록 고정된 빛으로 남긴다 */
  .sparkle { animation: none; opacity: calc(var(--o, 0.8) * 0.75); transform: scale(0.8); }
  .hero-title em { animation: none; }
  .glint { opacity: 0.5; }
}

/* ---------- 상품 순환 창 ---------- */
.ticker { position: relative; }
.ticker .pgrid { grid-template-columns: repeat(5, minmax(0, 1fr)); will-change: transform; }
.ticker.is-rolling { overflow: hidden; }
.ticker.is-rolling::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 26px; background: linear-gradient(to bottom, transparent, var(--bg, #f5f7fa)); pointer-events: none; }
@media (max-width: 1100px) { .ticker .pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 820px) { .ticker .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.3rem 0.9rem; } }
@media (max-width: 540px) { .ticker .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem 0.8rem; } }

/* ---------- 구매자 한마디 ---------- */
.spot { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr); gap: 1.5rem; padding: 1.5rem; border-radius: 22px; background: linear-gradient(135deg, #eef4f6 0%, #f7f3e9 100%); border: 1px solid var(--line); }
.spot__product { display: flex; gap: 1.1rem; align-items: center; min-width: 0; color: inherit; opacity: 0; transform: translateY(8px); transition: opacity 0.4s ease, transform 0.4s ease; }
.spot__product.is-in { opacity: 1; transform: none; }
.spot__cover { flex: none; width: 118px; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; box-shadow: 0 12px 26px rgba(16, 41, 74, 0.2); background: #1e293b; }
.spot__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.spot__info { min-width: 0; display: grid; gap: 0.35rem; justify-items: start; }
.spot__info h3 { margin: 0.2rem 0 0; font-size: 1.15rem; line-height: 1.35; }
.spot__author { color: var(--ink-soft); font-size: 0.88rem; }
.spot__stars { font-size: 1.05rem; margin-top: 0.3rem; }
.spot__chat { height: 268px; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.6rem; padding: 0.2rem 0.2rem 0.2rem 0; }
.bubble { display: flex; gap: 0.6rem; align-items: flex-start; animation: bubble-up 0.45s cubic-bezier(0.2, 0.8, 0.3, 1.1) both; }
.bubble__avatar { flex: none; width: 2.1rem; height: 2.1rem; border-radius: 42%; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; color: #fff; background: linear-gradient(135deg, #10294a, #0f8a80); }
.bubble__body { position: relative; min-width: 0; max-width: 34rem; background: #fff; border-radius: 4px 16px 16px 16px; padding: 0.6rem 0.9rem 0.7rem; box-shadow: 0 3px 10px rgba(16, 41, 74, 0.08); }
.bubble__head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; font-size: 0.8rem; margin-bottom: 0.25rem; }
.bubble__head b { color: var(--ink-soft); font-weight: 650; }
.bubble__body p { margin: 0; font-size: 0.92rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
@keyframes bubble-up { from { opacity: 0; transform: translateY(18px) scale(0.97); } }
@media (max-width: 820px) {
  .spot { grid-template-columns: 1fr; gap: 1.1rem; padding: 1.1rem; }
  .spot__cover { width: 84px; }
  .spot__chat { height: 256px; }
}

/* ---------- 휴대폰 · 태블릿 헤더: 1줄(로고 + 장바구니 · 로그인) / 2줄(메뉴, 좌우로 밀어서 보기) ---------- */
@media (max-width: 900px) {
  .site-header__inner { flex-wrap: wrap; align-items: center; padding: 0.5rem 0 0; gap: 0; min-height: 0; }
  .site-header .nav { display: contents; }
  .site-header .nav a:not(.cart-badge) { display: inline-flex; } /* 예전 "휴대폰에서 메뉴 숨김" 규칙 무효화 */
  .site-header .brand { order: 1; min-height: 2.6rem; }
  .site-header .nav__side { order: 2; margin-left: auto; gap: 0; min-width: 0; }
  .site-header .nav__main {
    order: 3;
    flex: 0 0 calc(100% + 2rem);
    margin: 0.35rem -1rem 0;
    padding: 0.3rem 1rem 0.5rem;
    gap: 0.25rem;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--line);
    -webkit-overflow-scrolling: touch;
    mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .site-header .nav__main::-webkit-scrollbar { display: none; }
  .site-header .nav__main a { flex: none; font-size: 0.9rem; padding: 0.45rem 0.7rem; }
  .site-header .nav__divider { flex: none; margin: 0 0.25rem; }
  .site-header .nav-auth a, .site-header .nav-auth .btn-text { font-size: 0.86rem; padding: 0.4rem 0.5rem; }
  .site-header .nav a.btn-signup-pill { padding: 0.4rem 0.8rem; }
  .site-header .nav-user-greeting { display: none; }
}
@media (max-width: 480px) {
  .site-header .brand::before { width: 1.9rem; height: 1.9rem; }
  .site-header .brand__name { font-size: 1.08rem; }
  .site-header .brand { gap: 0.4rem; }
  /* 좁은 화면에서는 주문내역을 숨긴다 (마이페이지와 하단 메뉴에 있음) */
  .site-header .nav-auth a[href="/orders"] { display: none; }
  .site-header .nav a.cart-badge { padding: 0.4rem 0.45rem; }
}

/* ---------- 관리자: 상품 이미지 후보 ---------- */
.img-gallery { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 0.8rem; }
.img-tile { position: relative; width: 104px; aspect-ratio: 3 / 4; padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: #e9edf2; cursor: pointer; }
div.img-tile { cursor: default; }
.img-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-tile__tag { position: absolute; left: 4px; bottom: 4px; padding: 0.1rem 0.4rem; border-radius: 6px; font-size: 0.68rem; font-weight: 700; background: rgba(11, 26, 44, 0.75); color: #fff; }
.img-tile.is-current { border-color: #1f9d6b; }
.img-tile.is-current .img-tile__tag { background: #1f9d6b; }
.img-tile.is-selected { border-color: var(--navy, #10294a); box-shadow: 0 0 0 3px rgba(16, 41, 74, 0.25); }

/* ---------- 구매 후 이용 안내 ---------- */
.buy-guide { margin-top: 0.8rem; padding: 0.8rem 1rem; border-radius: 12px; background: var(--accent-soft, #e0f3f1); color: #0c4f4b; font-size: 0.9rem; line-height: 1.65; }
.buy-guide strong { color: #093f3c; }
.buy-guide a { text-decoration: underline; font-weight: 600; color: inherit; }
.buy-guide--box { margin: 0 0 1rem; border: 1px solid rgba(13, 127, 122, 0.3); }
.runner__note { padding: 0.5rem 1rem; font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); background: var(--navy, #10294a); }

/* ---------- 구매자 한마디: 리뷰 2개 기준의 낮은 상자 (1개면 세로 가운데) ---------- */
.spot { padding: 0.9rem 1.2rem; gap: 1.2rem; align-items: center; border-radius: 18px; }
.spot__cover { width: 96px; border-radius: 8px; }
.spot__info h3 { font-size: 1.05rem; }
.spot__stars { font-size: 0.98rem; margin-top: 0.15rem; }
.spot__chat { height: 160px; justify-content: center; gap: 0.5rem; padding: 0; }
.bubble__avatar { width: 1.9rem; height: 1.9rem; font-size: 0.82rem; }
.bubble__body { padding: 0.45rem 0.8rem 0.5rem; }
.bubble__head { margin-bottom: 0.1rem; font-size: 0.78rem; }
.bubble__body p { font-size: 0.88rem; line-height: 1.45; }
@media (max-width: 820px) {
  .spot { padding: 0.9rem; gap: 0.8rem; }
  .spot__cover { width: 68px; }
  .spot__chat { height: 164px; }
}

/* ---------- 상품명은 항상 한 줄 (넘치면 … 표시), 가격도 한 줄 ---------- */
.pcard__body { min-width: 0; }
.pcard__title { display: block; -webkit-line-clamp: unset; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 0; }
.pcard__title a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-card > div:last-child, .hero-pick > div:last-child, .spot__info { min-width: 0; }
.rank-card__title, .hero-pick__title, .spot__info h3, .related-card h4 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pcard__price { flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.pcard__price s { overflow: hidden; text-overflow: clip; flex: 0 1 auto; min-width: 0; }
/* 좁은 화면: 할인율 + 판매가만 보이고 원래 가격은 숨긴다 */
@media (max-width: 820px) {
  .pcard__price s, .hero-pick__price s { display: none; }
}
