/* Design tokens — sampled from the original shop page (plan 260923-2230) */
:root {
  --bg: #ffffff;
  --bg-2: #0B0B0B;
  --cyan: #3FE0FF;
  --meta: #0866FF;
  --red: #B3121B;
  --yellow: #FFE600;
  --faq-bg: #E9E9E9;
  --update-grad-start: #0A3FD6;
  --update-grad-end: #1F5FFF;
  --package-navy: #0B1230;
  --text: #212121;
  --text-muted: #8c8c8c;
  --border: #e5e5e5;
  --purple: #7508ff;
  --purple-hover: #6600e6;
  --badge-purple: #701dee;
  --star: #ec4b28;
  --header-bg: #000000;
  --max-width: 860px;
  --shell-max-width: 1200px;
  --sticky-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* Pretendard CDN sheet ships its own font-display: swap; fallback stack below covers load failure */
  font-family: "Pretendard", system-ui, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.55;
  /* Korean: break at spaces, never mid-word */
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* reserve space for the fixed sticky bar on small screens */
@media (max-width: 768px) {
  body { padding-bottom: calc(var(--sticky-h) + env(safe-area-inset-bottom)); }
}

h1, h2, h3, p, ul, ol, li { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; }
img { max-width: 100%; height: auto; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* shop-shell surfaces (header/breadcrumb/product/tabs) are wider than the 860px detail column */
.container-wide {
  max-width: var(--shell-max-width);
  margin: 0 auto;
  padding: 0 20px;
}

section { padding: 56px 0; }

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

/* primary download CTA — hero / final / sticky */
.btn-download {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  padding: 14px 28px;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.btn-download:hover { background: var(--purple-hover); }
.btn-download:active { transform: scale(.98); }
.btn-download__size {
  font-size: 13px;
  font-weight: 500;
  opacity: .85;
}

/* secondary buttons — share / 더보기 */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }

/* zip password chip — sits beside the download CTA; click copies the password */
.btn-password { gap: 6px; border-style: dashed; white-space: nowrap; }
.btn-password strong { color: var(--purple); font-weight: 800; letter-spacing: .04em; }

.btn-more {
  display: block;
  margin: 24px auto 0;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
}
.btn-more:hover { border-color: var(--purple); color: var(--purple); }

/* sticky action bar — mobile only, always visible (no scroll-based show/hide) */
.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: none;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
@media (max-width: 768px) {
  .sticky-bar { display: flex; }
}
.sticky-bar .btn-outline,
.sticky-bar .btn-download {
  flex: 1;
  width: auto;
}
.sticky-bar .btn-download {
  flex-direction: row;
  gap: 8px;
}
.sticky-bar .btn-download__size { display: none; }

/* copy-link toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  z-index: 60;
  transform: translateX(-50%) translateY(12px);
  background: rgba(20, 20, 20, .95);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast--visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* author display rules (flex / inline-flex) would otherwise beat the hidden attribute */
[hidden] { display: none !important; }

/* in-app browser (KakaoTalk / Instagram / Naver) guidance banner */
.inapp-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--red);
  color: #fff;
  padding: 10px 16px;
  font-size: 13px;
}
.inapp-banner p { flex: 1 1 200px; }
.inapp-banner__btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 14px;
  background: #fff;
  color: var(--red);
  border-radius: 8px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
