/* ============================================================
   디자이너 키 — 검정 배경 + 민트 강조, 휴대폰 우선
   색을 바꾸려면 아래 :root 의 값만 고치면 전체에 반영됩니다.
   ============================================================ */
:root {
  --bg: #070908;          /* 배경 검정 */
  --panel: #101413;       /* 카드 */
  --panel-2: #171D1B;     /* 카드 안쪽 */
  --line: rgba(255,255,255,.08); /* 구분선 */
  --text: #F2F7F5;        /* 본문 글자 */
  --muted: #98A39F;       /* 보조 글자 */
  --accent: #10FF98;      /* 강조 민트 */
  --accent-soft: #A8FFD6; /* 옅은 민트(글자용) */
  --accent-deep: #0B2B1F; /* 짙은 민트(바탕용) */
  --on-accent: #03140C;   /* 민트 위 글자 */
  --accent-rgb: 16, 255, 152;

  --f-body: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --f-display: "Archivo", "Pretendard Variable", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: 16px;
  --radius: 18px;
  --tap: 48px;
  --ease: cubic-bezier(.22,1,.36,1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
  word-break: keep-all;          /* 한글을 단어 단위로 줄바꿈 */
  overflow-wrap: anywhere;
}
body.is-locked { overflow: hidden; }
/* 은은한 필름 질감 */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 200;
  opacity: .06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg .fill { fill: currentColor; stroke: none; }

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

/* 상단 민트 빛 번짐 */
.glow {
  position: fixed;
  top: -220px; left: 50%;
  width: 560px; height: 420px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(var(--accent-rgb),.16), rgba(var(--accent-rgb),0));
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 480px;
  margin: 0 auto;
  padding: calc(14px + var(--safe-t)) var(--gutter) calc(120px + var(--safe-b));
  overflow-x: clip;
}

/* ── 프로필 ───────────────────────────── */
.profile { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.profile__id { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 48px; }
.avatar {
  flex: none;
  width: 52px; height: 52px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-deep);
  color: var(--accent);
  font: 900 17px/1 var(--f-display);
  overflow: hidden;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile__text { display: flex; flex-direction: column; min-width: 0; }
.profile__text strong { font-size: 17px; font-weight: 700; line-height: 1.25; }
.profile__handle { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── 버튼 ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap);
  padding: 0 18px;
  border-radius: 999px;
  font: 700 15px/1 var(--f-body);
  border: 0;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .18s var(--ease), background-color .2s, box-shadow .2s, opacity .2s;
}
.btn:active { transform: scale(.96); }
.btn svg { width: 18px; height: 18px; }
.btn--follow {
  min-height: 42px; padding: 0 16px; font-size: 14px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
}
.btn--follow svg { width: 17px; height: 17px; color: var(--accent); }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 24px -10px rgba(var(--accent-rgb),.7); }
.btn--block { width: 100%; min-height: 52px; font-size: 16px; }
.btn[aria-disabled="true"] { background: var(--panel-2); color: var(--muted); box-shadow: none; pointer-events: none; }

/* ── 흐르는 띠 (프로필 바로 아래, 수평) ───── */
.ticker {
  margin: 14px calc(var(--gutter) * -1) 0;
  overflow: hidden;
  background: var(--accent);
  color: var(--on-accent);
}
.ticker__track {
  display: flex; align-items: center; gap: 16px;
  width: max-content;
  padding: 10px 0;
  font: 900 14px/1 var(--f-display);
  font-variation-settings: "wdth" 125;
  letter-spacing: .03em;
}
.ticker__track i { flex: none; width: 7px; height: 7px; background: var(--on-accent); transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
  .ticker__track { animation: ticker 24s linear infinite; }
  @keyframes ticker { to { transform: translateX(-50%); } }
}

/* ── 협업 문의 ─────────────────────────── */
.contact { margin: 12px 2px 0; font-size: 14px; color: var(--muted); }
.contact a { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(var(--accent-rgb),.4); }

/* ── 개별 자료 주소로 들어왔을 때 ─────────── */
.is-focus #free, .is-focus #reels, .is-focus #shop, .is-focus .dock { display: none; }
.focus { padding-top: 28px; }
.focus__card {
  padding: 24px 20px 20px;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: center;
}
.focus__thumb {
  width: 148px; aspect-ratio: 9 / 16;
  margin: 0 auto 18px;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 40px -16px rgba(var(--accent-rgb),.45);
}
.focus__thumb img { width: 100%; height: 100%; object-fit: cover; }
.focus__eyebrow { font: 500 12px/1 var(--f-mono); color: var(--accent); }
.focus__title { margin: 10px 0 20px; font-size: 22px; font-weight: 800; line-height: 1.35; letter-spacing: -.02em; }
.focus__copy {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; margin-top: 8px; width: 100%;
  color: var(--muted); font-size: 14px; font-weight: 600;
}
.focus__copy svg { width: 16px; height: 16px; }
.focus__home {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 52px; margin-top: 12px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  font-size: 15px; font-weight: 700;
}
.focus__home svg { width: 17px; height: 17px; color: var(--accent); }

/* ── 섹션 공통 ─────────────────────────── */
.block { padding-top: 40px; scroll-margin-top: 16px; }
.block__title { margin-bottom: 14px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }

/* ── 무료 자료: 가로 한 줄 칸 (모두 같은 크기) ── */
.files { display: grid; gap: 8px; }
.file {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  height: 70px;
  padding: 0 12px 0 14px;
  border-radius: var(--radius);
  background: var(--panel);
  border: 1px solid var(--line);
  text-align: left;
  transition: transform .18s var(--ease), border-color .2s;
}
.file:active { transform: scale(.98); }
.file__thumb {
  flex: none;
  align-self: stretch;
  aspect-ratio: 9 / 16;
  margin: 6px 0 6px -8px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel-2);
}
.file__thumb img { width: 100%; height: 100%; object-fit: cover; }
.file__fmt {
  flex: none;
  min-width: 44px;
  padding: 7px 8px; border-radius: 8px;
  background: var(--accent-deep); color: var(--accent);
  font: 500 12px/1 var(--f-mono);
  text-align: center;
}
.file__title {
  flex: 1; min-width: 0;
  font-size: 15px; font-weight: 700; line-height: 1.35; letter-spacing: -.01em;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.file__go {
  flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
}
.file__go svg { width: 18px; height: 18px; stroke-width: 2.2; }
.file__state { flex: none; font-size: 13px; color: var(--muted); padding-right: 4px; }
.file__lock { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; font-weight: 700; }
.file__lock svg { width: 13px; height: 13px; }

/* ── 릴스: 옆으로 넘기는 카드 ───────────── */
.rail {
  display: flex; gap: 8px;
  margin: 0 calc(var(--gutter) * -1);
  padding: 0 var(--gutter) 6px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.rail::-webkit-scrollbar { display: none; }
.rail > li { flex: none; width: calc((min(100vw, 480px) - var(--gutter) - 16px) / 2.5); scroll-snap-align: start; }  /* 화면에 2개 반 보이게 */
.reel {
  position: relative;
  display: block;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  transition: transform .2s var(--ease);
}
.reel:active { transform: scale(.98); }
.reel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel__title {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 40px 14px 14px;
  font-size: 16px; font-weight: 700; line-height: 1.3;
  background: linear-gradient(to top, rgba(7,9,8,.95), rgba(7,9,8,0));
}
.reel__play {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(7,9,8,.55);
}
.reel__play svg { width: 9px; height: 9px; margin-left: 2px; }
.reel.is-pending { opacity: .6; }

/* 사진이 없을 때 나오는 기본 썸네일 */
.ph {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background:
    radial-gradient(90% 60% at 50% 30%, rgba(var(--accent-rgb),.16), transparent 70%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
}
.ph__mark {
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border: 1px solid rgba(var(--accent-rgb),.6);
  border-radius: 14px;
  color: var(--accent);
  font: 900 22px/1 var(--f-display);
  font-variation-settings: "wdth" 125;
}

/* ── 판매 에셋 ─────────────────────────── */
.assets { display: grid; gap: 16px; }
.asset { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; overflow: hidden; }
.asset__img { position: relative; aspect-ratio: 4 / 3; background: var(--panel-2); }
.asset__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.asset__price {
  position: absolute; left: 12px; top: 12px;
  padding: 8px 12px; border-radius: 999px;
  background: rgba(7,9,8,.65);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.12);
  font-size: 15px; font-weight: 800; color: var(--text);
}
.asset__body { padding: 16px; }
.asset__title { font-size: 19px; font-weight: 800; line-height: 1.3; letter-spacing: -.02em; }
.asset__desc { margin-top: 6px; color: var(--muted); font-size: 15px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.tag { padding: 6px 9px; border-radius: 7px; background: var(--panel-2); color: var(--accent-soft); font: 500 12px/1 var(--f-mono); }
.asset .btn svg { width: 18px; height: 18px; stroke-width: 2.2; }

.soon {
  padding: 36px 16px;
  text-align: center;
  border-radius: 20px;
  border: 1px dashed rgba(var(--accent-rgb),.35);
  background: rgba(var(--accent-rgb),.04);
  color: var(--accent);
  font-size: 17px; font-weight: 700;
}

/* ── 바닥 ─────────────────────────────── */
.foot {
  margin-top: 56px; padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px;
  color: var(--muted); font-size: 13px;
}
.foot a { min-height: 44px; display: inline-flex; align-items: center; color: var(--accent); font-weight: 600; }
.foot__copy { width: 100%; }
.foot a[hidden] { display: none; }

/* ── 아래 떠 있는 메뉴 ──────────────────── */
.dock {
  position: fixed;
  left: 50%; bottom: calc(14px + var(--safe-b));
  transform: translateX(-50%);
  z-index: 40;
  display: flex; gap: 4px;
  width: min(calc(100% - 32px), 360px);
  padding: 6px;
  border-radius: 999px;
  background: rgba(16,20,19,.78);
  -webkit-backdrop-filter: blur(18px) saturate(1.4); backdrop-filter: blur(18px) saturate(1.4);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 16px 40px -12px rgba(0,0,0,.8);
}
.dock__item {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px; font-weight: 700;
  transition: background-color .25s var(--ease), color .25s;
}
.dock__item svg { width: 19px; height: 19px; flex: none; }
.dock__item.is-active { background: var(--accent); color: var(--on-accent); }

/* ── 릴스 재생 창 (인스타 앱 안에서만) ───── */
.watch { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: #000; padding: var(--safe-t) 0 var(--safe-b); }
.watch[hidden] { display: none; }
.watch__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 8px 8px 16px; }
.watch__title { font-size: 15px; font-weight: 700; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.1); }
.icon-btn svg { width: 20px; height: 20px; }
.watch__frame { flex: 1; min-height: 0; display: flex; justify-content: center; overflow: auto; }
.watch__frame iframe { width: 100%; max-width: 480px; height: 100%; border: 0; background: #fff; }
.watch__bar { width: 100%; max-width: 480px; margin: 0 auto; padding: 12px 16px 14px; }
.meter { height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .25s linear; }
.watch__hint { margin-top: 10px; text-align: center; font-size: 14px; color: var(--muted); }
.watch__hint b { color: var(--accent); font-weight: 800; }
.wait { width: 100%; max-width: 420px; margin: auto; padding: 8px 20px; text-align: center; }
.wait__thumb { width: 120px; aspect-ratio: 9 / 16; margin: 0 auto 18px; border-radius: 14px; overflow: hidden; box-shadow: 0 18px 40px -16px rgba(var(--accent-rgb),.45); }
.wait__thumb img { width: 100%; height: 100%; object-fit: cover; }
.wait__title { font-size: 20px; font-weight: 800; line-height: 1.4; letter-spacing: -.02em; }
.wait__sub { margin: 8px 0 22px; color: var(--muted); font-size: 15px; }
.wait__alt { margin-top: 10px; min-height: 44px; width: 100%; color: var(--muted); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* ── ⋯ 메뉴 안내 화살표 ─────────────────── */
.menu-hint {
  position: fixed; top: calc(10px + var(--safe-t)); right: 12px; z-index: 120;
  display: flex; align-items: flex-start; gap: 6px;
  color: var(--accent); font-size: 14px; font-weight: 800;
  pointer-events: none;
}
.menu-hint[hidden] { display: none; }
.menu-hint span { margin-top: 18px; padding: 8px 12px; border-radius: 12px; background: var(--accent); color: var(--on-accent); }
.menu-hint svg { width: 34px; height: 34px; stroke-width: 2.6; }
@media (prefers-reduced-motion: no-preference) {
  .menu-hint svg { animation: nudge 1s ease-in-out infinite; }
  @keyframes nudge { 50% { transform: translate(3px, -3px); } }
}
.sheet__note { display: inline-block; margin-top: 6px; font-size: 13px; color: var(--muted); }

/* ── 자료 열림 화면 ─────────────────────── */
.sheet { position: fixed; inset: 0; z-index: 110; display: flex; align-items: flex-end; justify-content: center; }
.sheet[hidden] { display: none; }
.sheet__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.sheet__panel {
  position: relative;
  width: 100%; max-width: 480px;
  padding: 28px 20px calc(20px + var(--safe-b));
  border-radius: 28px 28px 0 0;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  text-align: center;
}
.sheet__badge {
  width: 64px; height: 64px; margin: 0 auto 14px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 8px rgba(var(--accent-rgb),.14);
}
.sheet__badge svg { width: 30px; height: 30px; stroke-width: 2.6; }
.sheet__eyebrow { font: 500 12px/1 var(--f-mono); color: var(--accent); }
.sheet__title { margin: 8px 0 20px; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.sheet__text { margin: -10px 0 20px; color: var(--muted); font-size: 15px; }
.sheet__text b { color: var(--accent); }
.sheet__badge.is-wait { background: var(--accent-deep); color: var(--accent); box-shadow: 0 0 0 8px rgba(var(--accent-rgb),.06); }
.sheet__close { margin-top: 8px; min-height: 48px; width: 100%; color: var(--muted); font-size: 15px; font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .sheet:not([hidden]) .sheet__panel { animation: up .4s var(--ease) both; }
  .sheet:not([hidden]) .sheet__badge { animation: pop .45s cubic-bezier(.3,1.6,.5,1) both .15s; }
  @keyframes up { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
}

@media (min-width: 560px) {
  .page { padding-top: 36px; }
}
