@font-face {
  font-family: Pretendard;
  src: url("/static/fonts/PretendardVariable.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
:root {
  /* 서비스 열의 최대 폭 — 휴대폰은 화면 폭 그대로, 넓은 화면(펼친 폴더블·태블릿)에서도 이보다 넓어지지 않는다.
     뷰어·시트·탭 바도 이 폭을 따른다. 나눈 화면(screens.css html.split)의 왼쪽 칸도 이 폭이 기준 */
  --col: 600px;
  --pt: #ff3d9a;
  /* 분홍 글자는 배경보다 한 단계 진하게 — 큰 제목은 회색 바탕에서도 3:1, 작은 글자는 연분홍 바탕에서도 4.5:1 이상.
     막대·점·테두리 같은 면은 --pt 그대로 */
  --pt-title: #e0247f;
  --pt-ink: #cc106a;
  --ink: #111;
  /* 보조 글자는 흰 바탕·회색(#f2f2f7) 바탕 모두 4.5:1 이상 — 위계는 색 대신 크기·굵기로 */
  --sub: #6e6e73;
  --faint: #6e6e73;
  --line: #eaeaea;
  --soft: #f5f5f5;
  --glass: rgba(255, 255, 255, 0.58);
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
/* 서비스 열 바깥(넓은 화면의 양옆)도 열과 같은 흰색 — 회색 띠 없이 한 화면처럼 */
html,
body {
  background: #fff;
  /* 맨 위·맨 아래에서 더 끌어도 화면 전체가 튕기지 않게 — 고정 헤더가 함께 끌려 내려오지 않는다(탐색의 당겨서 새로고침과 같다) */
  overscroll-behavior-y: none;
}
/* 사진·영상을 꾹 눌러도 저장·복사 메뉴나 미리보기 확대가 뜨지 않게, 끌어서 옮기지도 못하게(iOS·안드로이드 공통).
   페이지 확대(두 번 탭·손가락 벌리기)도 막는다 — 고정 헤더·탭 바·뷰어가 밀려나 화면이 깨져 보인다.
   스크롤만 허용하고(pan-x pan-y), 화면 설정(viewport user-scalable=no)과 아이폰 제스처 막기(api.mjs)가 함께 막는다 */
html {
  touch-action: pan-x pan-y;
}
/* 스크롤 막대는 서비스 어디서도 보이지 않게(스크롤은 그대로) — 앱처럼 보이게 */
* {
  scrollbar-width: none;
}
*::-webkit-scrollbar {
  display: none;
}
img,
video {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
body {
  font-family: Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.02em;
  word-break: keep-all;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
[hidden] {
  display: none !important;
}
.app {
  position: relative;
  max-width: var(--col);
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: #fff;
  padding-bottom: 140px;
}

/* 상단 */
/* 앱이 웹 화면을 상태 표시줄 밑까지 깔면(화면 끝까지) 헤더는 그 높이(위 안전 영역)만큼 내려와 시계·카메라와 겹치지 않는다.
   브라우저와 안전 영역 안에 까는 앱에서는 이 값이 0 이라 그대로다 */
.top {
  display: flex;
  align-items: center;
  height: calc(56px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) 16px 0;
  gap: 10px;
}
/* 앱 안에서 위 안전 영역이 0 일 때(아이폰 듀오를 펼쳐 상태 표시줄이 오른쪽 세로 기둥에 있을 때)는 헤더가 둥근 화면 모서리에
   붙지 않게 위를 조금 띄운다. 상태 표시줄이 위에 있는 아이폰은 안전 영역이 더 커서 그대로다 */
html.in-app .top {
  height: calc(56px + max(env(safe-area-inset-top, 0px), 10px));
  padding-top: max(env(safe-area-inset-top, 0px), 10px);
}
.top .sp {
  flex: 1;
}
/* 단계 화면(업로드·추구미 찾기): 스크롤해도 진행 막대가 보이게 위에 붙는다 */
.top.pinned {
  position: sticky;
  top: 0;
  z-index: 25;
  background: #fff;
}
/* 내용이 헤더 밑으로 들어가면 경계에만 얇게 블러·흰 페이드 — 사진이 칼로 자른 듯 끊기지 않게.
   헤더 자체는 흰색 그대로 둔다 */
.top.pinned::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 16px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0));
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}
.top.pinned.scrolled::after {
  opacity: 1;
}
.logo {
  font-weight: 900;
  font-size: 24px;
  letter-spacing: -0.06em;
  transform: skewX(-8deg);
  display: inline-flex;
  align-items: flex-end;
}
.logo::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pt);
  margin: 0 0 5px 2px;
}
.back {
  width: 40px;
  height: 40px;
  margin-left: -10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 단계 표시 — 스토리처럼 끊긴 바, 지난 단계와 지금 단계를 채운다 */
.steps {
  flex: 1;
  display: flex;
  gap: 4px;
}
.steps i {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: #e6e6e6;
}
.steps i.on {
  background: var(--ink);
}
/* 단계 화면 헤더: 가운데 로고(뒤로가기는 왼쪽), 그 아래 단계 바 */
.top.stepped {
  flex-direction: column;
  align-items: stretch;
  height: auto;
  gap: 0;
  padding-bottom: 8px;
}
.top.stepped .bar {
  position: relative;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.top.stepped .bar .back {
  position: absolute;
  left: 0;
}
.top.stepped .logo {
  font-size: 21px;
}
h1 {
  font-size: 24px;
  line-height: 1.35;
  font-weight: 800;
  letter-spacing: -0.04em;
  padding: 18px 20px 0;
}
/* 제목에서 짚어 줄 말 하나만 포인트 색으로 */
h1 em {
  font-style: normal;
  color: var(--pt-title);
}
.lead {
  font-size: 14px;
  color: var(--sub);
  padding: 8px 20px 0;
  line-height: 1.5;
}

/* 하단 유리 알약 버튼 */
.bottom {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--col);
  /* 아래 홈 막대가 있으면 그 높이만큼만 띄우고(그 위에 바로), 없으면 14px — 둘을 더하면 알약이 너무 떠 보인다 */
  padding: 0 24px max(env(safe-area-inset-bottom, 0px), 14px);
  z-index: 20;
  pointer-events: none;
}
.bottom > * {
  pointer-events: auto;
}
/* 버튼 뒤로 콘텐츠가 비치지 않게 아래쪽을 흰색으로 흐리게 */
.bottom:not(.tabbar)::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 110px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff 65%);
  pointer-events: none;
  z-index: -1;
}
.cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 58px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  background: rgba(17, 17, 17, 0.92);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 10px 28px rgba(0, 0, 0, 0.22);
}
.cta:disabled {
  background: rgba(255, 255, 255, 0.88);
  color: #5c5c5c;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.1);
  cursor: default;
}
/* 단계 화면(업로드·추구미 찾기)과 회원가입: 리퀴드 글래스 — 버튼 뒤에 흰 그라데이션을 깔지 않고 사진·입력칸이 유리 너머로 비친다.
   그림자는 옅게, 대신 가장자리에 얇은 빛 테두리 */
/* 제목·설명 왼쪽 시작을 단계 바·안내 박스·사진과 같은 16px 에 */
[data-page="upload"] h1,
[data-page="find"] h1 {
  padding-left: 16px;
  padding-right: 16px;
}
[data-page="upload"] .lead,
[data-page="find"] .lead {
  padding-left: 16px;
  padding-right: 16px;
}
[data-page="upload"] .bottom::before,
[data-page="find"] .bottom::before,
[data-page="signup"] .bottom::before {
  display: none;
}
[data-page="upload"] .cta,
[data-page="find"] .cta,
[data-page="signup"] .cta {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 4px 14px rgba(0, 0, 0, 0.14);
}
[data-page="upload"] .cta:disabled,
[data-page="find"] .cta:disabled,
[data-page="signup"] .cta:disabled {
  background: rgba(255, 255, 255, 0.72);
  color: #444;
  /* 사진 색이 번져 들지 않게 채도는 덜 올린다 */
  -webkit-backdrop-filter: blur(24px) saturate(130%);
  backdrop-filter: blur(24px) saturate(130%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), inset 0 1px 0 #fff, 0 0 0 0.5px rgba(0, 0, 0, 0.08),
    0 4px 14px rgba(0, 0, 0, 0.1);
}
.nudge {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 16px);
  display: flex;
  align-items: center;
  gap: 4px;
  height: 32px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  transform: translateX(-50%);
  animation: hop 1.3s cubic-bezier(0.3, 0, 0.3, 1) infinite;
  transition: opacity 0.2s;
}
.nudge.gone {
  opacity: 0;
  pointer-events: none;
}
/* 위로 크게 튀었다가 아래로 살짝 내려앉고 한 번 더 튄다 — 아래로 내려 보라는 신호 */
@keyframes hop {
  0%, 62%, 100% { transform: translate(-50%, 0); }
  16% { transform: translate(-50%, -10px); }
  30% { transform: translate(-50%, 3px); }
  42% { transform: translate(-50%, -4px); }
  52% { transform: translate(-50%, 1px); }
}
/* 화살표는 따로 아래로 찍어 내린다 */
.nudge svg {
  animation: nudge-down 1.3s ease-in-out infinite;
}
@keyframes nudge-down {
  0%, 20%, 100% { transform: translateY(0); }
  32% { transform: translateY(4px); }
  44% { transform: translateY(0); }
}

/* 하단 내비 */
.tabbar {
  display: flex;
  justify-content: center;
}
.tabbar nav {
  display: flex;
  gap: 4px;
  height: 54px;
  padding: 0 6px;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(6px) saturate(180%);
  backdrop-filter: blur(6px) saturate(180%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 22px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
/* 당근·위버스와 같은 방식: 기본은 진한 외곽선, 선택은 채운 아이콘 + 반투명 알약 */
.tabbar a {
  width: 62px;
  height: 42px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.tabbar a .fill,
.tabbar a.on .off {
  display: none;
}
.tabbar a.on .fill {
  display: block;
}
.tabbar a.on {
  color: var(--ink);
}
/* 선택 표시는 따로 떠 있는 알약: 탭을 옮기면 이 요소만 옆으로 미끄러진다 */
.tabbar nav {
  position: relative;
  view-transition-name: tabbar;
}
.tabbar a {
  position: relative;
  z-index: 1;
  /* 길게 눌러도 iOS가 링크를 끌기·미리보기용으로 들어 올리지(흰 네모) 않게 */
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
/* 전환 중에도 아이콘이 미끄러지는 알약 위에 보이게 각자 따로 그린다 */
.tabbar a[href$="home"] {
  view-transition-name: tab-home;
}
.tabbar a[href$="explore"] {
  view-transition-name: tab-explore;
}
.tabbar a[href$="saved"] {
  view-transition-name: tab-saved;
}
.tabbar a[href$="my"] {
  view-transition-name: tab-my;
}
.tab-ind {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 62px;
  height: 42px;
  border-radius: 999px;
  /* 선택이 잘 보이는 회색에 위쪽 빛 반사·테두리·옅은 그림자를 더해 유리처럼 */
  background: rgba(0, 0, 0, 0.09);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.75),
    inset 0 0 0 0.5px rgba(255, 255, 255, 0.5),
    0 1px 4px rgba(0, 0, 0, 0.08);
  view-transition-name: tab-ind;
  transition: transform 0.18s cubic-bezier(0.3, 1.25, 0.5, 1);
}
/* 누르는 동안 바 전체와 알약이 살짝 커지고, 놓으면 튕기며 돌아온다 */
.tabbar nav {
  transition: transform 0.18s cubic-bezier(0.3, 1.25, 0.5, 1);
}
.tabbar nav:has(a:active) {
  transform: scale(1.02);
  transition-duration: 0.08s;
}
.tabbar nav:has(a:active) .tab-ind {
  transform: scale(1.03);
  transition-duration: 0.08s;
}
.tab-ind.at-1 {
  left: 72px;
}
.tab-ind.at-2 {
  left: 138px;
}
.tab-ind.at-3 {
  left: 204px;
}
/* 임베드 시험 중(html.embed, early.js EMBED_MODE)엔 탐색(돋보기) 탭을 가린다. 뒤 탭들의 선택 표시도 한 칸씩 당긴다 */
html.embed .tabbar a[href$="explore"] {
  display: none;
}
html.embed .tab-ind.at-2 {
  left: 72px;
}
html.embed .tab-ind.at-3 {
  left: 138px;
}

/* 같은 사이트 안 페이지 이동은 화면 전환으로 (지원 안 하는 브라우저는 그냥 바로 바뀜) */
@view-transition {
  navigation: auto;
}
::view-transition-group(root) {
  animation-duration: 0.2s;
}
/* 유리 효과가 전환 중 네모로 찍히지 않게 알약 모양으로 자른다 */
/* 자르면 내비의 테두리·그림자도 함께 잘리므로, 전환 동안은 이 틀에 같은 값을 준다 (자기 그림자는 안 잘린다) */
::view-transition-group(tabbar) {
  border-radius: 999px;
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}
::view-transition-group(tab-ind) {
  animation-duration: 0.38s;
  animation-timing-function: cubic-bezier(0.3, 0.7, 0.2, 1);
}
/* 옆 칸으로 미끄러지는 동안 알약이 잠깐 늘어난다 */
::view-transition-image-pair(tab-ind) {
  animation: tab-ind-stretch 0.38s ease-out;
}
@keyframes tab-ind-stretch {
  40% {
    transform: scaleX(1.16) scaleY(0.94);
  }
}
@media (prefers-reduced-motion: reduce) {
  @view-transition {
    navigation: none;
  }
  .tabbar nav,
  .tab-ind {
    transition: none;
  }
  .tabbar nav:has(a:active),
  .tabbar nav:has(a:active) .tab-ind {
    transform: none;
  }
}

/* 토스트·시트 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 8px);
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: 0.25s;
  z-index: 100;
  white-space: nowrap;
  pointer-events: none;
}
.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}
.toast i {
  font-style: normal;
  color: var(--pt);
}
.dim {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 70;
}
/* 가운데 뜨는 확인 창(api.mjs dialog) — 시트보다 가벼운 한 번 묻기 */
.dialog {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 71;
  width: calc(100% - 64px);
  max-width: 320px;
  padding: 26px 20px 16px;
  border-radius: 20px;
  background: #fff;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity 0.2s, transform 0.2s;
}
.dialog.on {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.dialog-title {
  margin: 0 0 22px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.03em;
}
/* 질문 아래 한 줄 안내 — 있으면 제목과 버튼 사이에 */
.dialog-title:has(+ .dialog-text) {
  margin-bottom: 8px;
}
.dialog-text {
  margin: 0 0 22px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--sub);
}
.dialog-actions {
  display: flex;
  gap: 8px;
}
.dialog-actions button {
  flex: 1;
  height: 48px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
}
.dialog-cancel {
  background: #f2f2f7;
  color: #333;
}
.dialog-ok {
  background: var(--ink);
  color: #fff;
}
.dialog-ok.danger {
  background: rgba(198, 40, 69, 0.95);
}
.dialog-ok:disabled {
  opacity: 0.6;
}
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translate(-50%, 100%);
  width: 100%;
  max-width: var(--col);
  background: #fff;
  border-radius: 20px 20px 0 0;
  z-index: 71;
  padding: 14px 20px calc(110px + env(safe-area-inset-bottom, 0px));
  transition: transform 0.3s;
  max-height: 86vh;
  overflow: auto;
}
.sheet.on {
  transform: translate(-50%, 0);
}
.sheet .grip {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #ddd;
  margin: 0 auto 16px;
  position: relative;
  touch-action: none;
  cursor: grab;
}
/* 손잡이는 4px 라 잡기 어렵다 — 누르는 자리만 위아래·양옆으로 넓힌다 */
.sheet .grip::before {
  content: "";
  position: absolute;
  inset: -14px -80px -12px;
}
.sheet h3 {
  font-size: 18px;
  font-weight: 800;
}
.sheet .meta {
  font-size: 13px;
  color: var(--faint);
  margin-top: 4px;
  line-height: 1.5;
}
.sheet .bottom {
  z-index: 72;
}

/* 칩 */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  border: 1px solid #e1e1e1;
  font-size: 14.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
}
.chip.on {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  font-weight: 700;
}

.state {
  padding: 120px 24px 0;
  text-align: center;
  color: var(--faint);
  font-size: 14px;
  line-height: 1.6;
}

/* 업로드 화면 '사진 없이 계속하기' — 다음 버튼 위의 한 단계 낮은 버튼. 사진 위에 떠도 읽히게 옅은 유리 알약으로 */
.bottom .skip {
  display: block;
  margin: 0 auto 10px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sub);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: rgba(255, 255, 255, 0.62);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  backdrop-filter: blur(18px) saturate(180%);
}
