/* 공통 조각 */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
  padding: 0 20px;
}
.page-title {
  padding: 0;
  font-size: 22px;
}
body.locked {
  overflow: hidden;
}

/* 로그인 버튼(첫 화면 /) */
.login-providers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  border-radius: 999px;
  font-size: 15.5px;
  font-weight: 700;
}
.provider img {
  width: 18px;
  height: 18px;
  flex: none;
  object-fit: contain;
}
.provider.apple img {
  width: 20px;
  height: 20px;
}
.provider.kakao {
  background: #fee500;
  color: rgba(0, 0, 0, 0.85);
}
.provider.apple {
  background: #000;
  color: #fff;
}
.provider.email {
  background: #fff;
  box-shadow: inset 0 0 0 1px #dcdcdc;
}
.provider:disabled {
  opacity: 0.6;
}
.provider[data-loading] {
  opacity: 1;
}
.login-mail {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.login-link {
  align-self: center;
  padding: 6px 10px;
  font-size: 13.5px;
  color: var(--sub);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 이메일 로그인 · 회원가입 */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 16px 20px 0;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  border: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #444;
}
.auth-field legend {
  margin-bottom: 6px;
}
/* 개인정보 칸(성별·생년월일·전화번호)이 선택이 아니라는 표시 — 칸 이름보다 한 단계 약하게 */
.auth-opt {
  font-weight: 400;
  color: var(--sub);
}
.auth-field input[type="email"],
.auth-field input[type="password"],
.auth-split input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 400;
  color: var(--ink);
}
.auth-field input:focus {
  outline: none;
  border-color: var(--ink);
}
.auth-field input::placeholder {
  color: #767676;
}
.auth-field[data-invalid] input:not(:focus),
.auth-field[data-invalid] .auth-choice span {
  border-color: #e0899c;
}
.auth-split {
  display: grid;
  grid-template-columns: 1fr auto 1.3fr auto 1.3fr;
  align-items: center;
  gap: 6px;
}
.auth-split[data-split="birth"] {
  grid-template-columns: 1.5fr auto 1fr auto 1fr;
}
.auth-split input {
  padding: 0 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.auth-split span {
  color: #767676;
}
.auth-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.auth-choice label {
  position: relative;
}
.auth-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.auth-choice span {
  display: grid;
  place-items: center;
  min-height: 50px;
  border: 1px solid #dcdcdc;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
}
.auth-choice input:checked + span {
  border-color: var(--ink);
  font-weight: 700;
}
.auth-choice input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.15);
}
.auth-hint,
.auth-error {
  font-size: 12.5px;
  font-weight: 400;
  line-height: 18px;
  color: var(--faint);
}
.auth-hint:empty {
  display: none;
}
.auth-hint[data-tone="error"],
.auth-error {
  color: #c62845;
}
.auth-hint[data-tone="ok"] {
  color: #2f7a53;
}
.auth-terms {
  font-size: 12.5px;
  color: var(--faint);
}
.cta.danger {
  background: rgba(198, 40, 69, 0.95);
}

/* 업로드 */
.drop {
  margin: 12px 16px 0;
  width: calc(100% - 32px);
  min-height: 260px;
  border: 1.5px dashed #d0d0d0;
  border-radius: 20px;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.drop-plus {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pt);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}
.drop b {
  font-size: 17px;
  font-weight: 800;
}
.drop > span:not(.drop-plus) {
  font-size: 13px;
  color: var(--sub);
}
/* 필요한 사진 안내 — 사진 위 체크 목록, 제목 오른쪽에 올린 장수 */
.needs {
  margin: 20px 16px 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--soft);
}
.needs-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 15px;
  /* 사진을 올려 장수가 나타나도 박스 높이가 그대로이게 */
  line-height: 20px;
  min-height: 20px;
}
.needs-head > b {
  font-size: 14px;
  font-weight: 700;
}
.needs ul {
  list-style: none;
  margin-top: 10px;
  display: grid;
  gap: 8px;
}
.needs li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #444;
}
/* 안내 항목 앞 체크 — 체크박스로 읽히지 않게 동그라미 없이 표시만 */
.needs li i {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
}
.needs li i svg {
  width: 14px;
  height: 14px;
  stroke: var(--ink);
  stroke-width: 3;
}
.needs .count {
  font-size: 14px;
  color: var(--faint);
}
.needs .count b {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}
.shots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 12px 16px 0;
}
.shot {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: #f3f3f3;
}
.shot .rm {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* 보이는 원은 26px 그대로, 누르는 영역만 44px 로 */
.shot .rm::before {
  content: "";
  position: absolute;
  inset: -9px;
}
.shot.add {
  border: 1.5px dashed #d0d0d0;
  background: #fafafa;
  color: var(--sub);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
}
.shot.add svg {
  width: 26px;
  height: 26px;
  color: var(--pt);
}
.analyzing {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.analyzing b {
  font-size: 18px;
  font-weight: 800;
  margin-top: 14px;
}
.analyzing span {
  font-size: 13.5px;
  color: var(--faint);
}
.spin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #eee;
  border-top-color: var(--ink);
  animation: spin 0.9s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 추구미 찾기 */
.tile img {
  object-position: 50% 22%;
}
.board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 20px 16px 0;
}
.tile {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f0f0;
}
.tile.picked::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid var(--pt);
  box-shadow: inset 0 0 0 1.5px #fff;
  border-radius: 10px;
}
.tile .ck {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.22);
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: 0.2s;
}
.tile .ck svg {
  opacity: 0;
}
.tile.picked .ck {
  background: var(--pt);
}
.tile.picked .ck svg {
  opacity: 1;
}
.tile.pop {
  animation: pop 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes pop {
  45% { transform: scale(1.05); }
}
.more {
  text-align: center;
  font-size: 13px;
  color: var(--faint);
  padding: 24px 0 8px;
}

/* 결과 — 추구미 대표 사진 콜라주 → 추구미 → 끌린 정도 막대 → 평소 비교(+코멘트) → 분석 → 다음 행동 */
/* 결과 화면(밝은 화면) — 면은 세 단계: 바탕 → 섹션 카드 → 카드 안 요소. 애플 그룹 목록처럼 회색 바탕 위 흰 카드 */
html:has([data-page="result"]),
body:has([data-page="result"]),
html:has([data-page="my"]),
body:has([data-page="my"]) {
  background: var(--rs-bg, #f2f2f7);
}
[data-page="result"],
[data-page="my"] {
  --rs-bg: #f2f2f7;
  --rs-card: #fff;
  --rs-tile: #f2f2f7;
  --rs-tile-pt: rgba(255, 61, 154, 0.08);
  --rs-track: #e5e5ea;
  --rs-bar: #c7c7cc;
  --rs-mute: #6e6e73;
  --rs-old: #6e6e73;
  --rs-text: rgba(0, 0, 0, 0.8);
  --rs-sk: 0, 0, 0;
  --faint: #6e6e73;
  --line: #e5e5ea;
  --soft: #f2f2f7;
  padding-bottom: 112px;
  background: var(--rs-bg);
  color: var(--ink);
}
[data-page="result"] .top.pinned,
[data-page="my"] .top.pinned {
  background: var(--rs-bg);
}
[data-page="result"] .top.pinned::after,
[data-page="my"] .top.pinned::after {
  background: linear-gradient(var(--rs-bg), transparent);
}
.rs-top {
  padding-left: 16px;
  padding-right: 16px;
}
.rs-hero {
  padding: 0 16px 20px;
}
.rs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-top: 8px;
  border-radius: 16px;
  overflow: hidden;
}
/* 정사각 2×2 — 첫 화면에 사진·추구미·막대까지 들어오게 */
.rs-grid figure {
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--soft);
}
.rs-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
}
/* "내 추구미"와 키워드는 사진 끝선(16)에서 8px 들여 — 끝선에 붙으면 답답해 보인다 */
.rs-cap,
.rs-kw {
  margin-left: 8px;
}
.rs-cap {
  margin-top: 24px;
  font-size: 14px;
  font-weight: 700;
  color: var(--faint);
}
.rs-kw {
  margin-top: 6px;
  padding: 0;
  font-size: 28px;
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.04em;
  white-space: nowrap;
  color: var(--pt-title);
}
.rs-kw i {
  font-style: normal;
  font-weight: 400;
  color: var(--faint);
}
/* 섹션은 한 단계 밝은 카드 */
.rs-sec,
.rs-brief {
  margin: 12px 16px 0;
  padding: 20px;
  border-radius: 20px;
  background: var(--rs-card);
}
/* 글자 위계: 추구미 28 → 섹션 제목 18 → 내용 14~17 → 보조 12~13. 제목과 내용 사이는 모든 카드 16px */
.rs-sec h2 {
  font-size: 18px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.rs-bars {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.rs-bar {
  display: grid;
  grid-template-columns: 82px 1fr 40px;
  align-items: center;
  gap: 10px;
  font-size: 15px;
}
.rs-bar b {
  font-size: 14px;
  font-weight: 500;
  color: var(--faint);
}
.rs-bar:has(i.on) b {
  font-weight: 600;
  color: var(--ink);
}
/* 내 추구미 막대만 핑크로 튀게 — 나머지 막대는 보이되 핑크와 밝기가 겹치지 않게 */
.rs-bar span {
  height: 8px;
  border-radius: 4px;
  background: var(--rs-track);
  overflow: hidden;
}
.rs-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--rs-bar);
  transition: width 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}
/* 처음 열 때 등장(result.mjs intro) — 아래서 살짝 올라오며 나타난다 */
.rs-pop {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.rs-pop.on {
  opacity: 1;
  transform: none;
}
/* 맨 위 사진 — 칸은 제자리, 사진만 살짝 크게 흐리게 들어와 자리 잡는다 */
.rs-reveal img {
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 0.8s ease, transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1);
  transition-delay: inherit;
}
.rs-reveal.on img {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .rs-bar i,
  .rs-pop,
  .rs-reveal img {
    transition: none;
  }
}
.rs-bar i.on {
  background: var(--pt);
}
.rs-bar em {
  font-style: normal;
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  color: var(--faint);
}
.rs-bar:has(i.on) em {
  font-weight: 600;
  color: var(--ink);
}
/* 비교 칸 — 평소·추구미 두 칸, 가운데 틈에 작은 회색 화살표. 카드 안 핑크는 추구미 칸의 옅은 바탕·라벨·키워드뿐 */
.rs-rel {
  display: grid;
  grid-template-columns: 1fr 22px 1fr;
  align-items: stretch;
  margin-top: 16px;
}
.rs-rel > div {
  padding: 16px;
  border-radius: 14px;
  background: var(--rs-tile);
}
.rs-rel > div:last-child {
  background: var(--rs-tile-pt);
}
.rs-rel span {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--rs-mute);
}
.rs-rel > div:last-child span {
  color: var(--pt-ink);
}
.rs-rel p {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  font-size: 17px;
  line-height: 1.4;
  letter-spacing: -0.03em;
}
/* 평소 쪽은 500, 추구미 쪽은 700 — 색 말고 굵기로도 위계를 나눈다 */
.rs-rel em {
  font-style: normal;
  font-weight: 500;
}
.rs-rel > div:last-child em {
  font-weight: 700;
}
/* 평소에만 있는 건 한 단계 뒤로 — 잘 읽히되 흰 글자·핑크보다는 확실히 어둡게 */
.rs-rel em.old {
  color: var(--rs-old);
}
.rs-rel em.new {
  color: var(--pt-ink);
}
.rs-rel > i {
  align-self: center;
  font-style: normal;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  color: var(--rs-mute);
}
/* 비교 코멘트 — 비교 칸 아래 같은 카드 안에서 이어진다. 소제목이 구분 역할을 해서 선·배경은 두지 않는다 */
.rs-comment {
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.6;
  letter-spacing: -0.02em;
  color: var(--rs-text);
}
/* 코멘트를 쓰는 동안 — 글 줄 모양의 스켈레톤이 빛을 받으며 지나간다 */
.rs-comment .sk {
  display: block;
  height: 13px;
  margin: 8px 0;
  border-radius: 7px;
  background: linear-gradient(90deg, rgba(var(--rs-sk), 0.06) 25%, rgba(var(--rs-sk), 0.13) 50%, rgba(var(--rs-sk), 0.06) 75%);
  background-size: 200% 100%;
  animation: rs-shimmer 1.4s ease-in-out infinite;
}
.rs-comment .sk:last-child {
  width: 62%;
}
@keyframes rs-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rs-comment .sk {
    animation: none;
  }
}
/* 코멘트 소제목 — 아래 글이 무엇인지 알려 주는 작은 회색 라벨 */
.rs-comment span {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rs-mute);
}
.rs-brief-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2px;
}
.rs-brief-head button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* 설명은 제목 묶음(제목에서 4px), 그 아래 내용까지는 다른 카드와 같은 16px */
.rs-desc {
  margin: -8px 0 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
}
/* 분석 카드의 내 평소 사진 — 한 줄 4칸, 더 있으면 마지막 칸 위에 +N */
.rs-mine {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 16px;
}
.rs-mine figure {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 12px;
  background: var(--rs-tile);
}
.rs-mine img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
}
.rs-mine b {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: rgba(0, 0, 0, 0.45);
}
.rs-brief dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 24px;
  font-size: 13px;
}
.rs-brief dl div {
  display: flex;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.rs-brief dt {
  font-weight: 500;
  color: var(--faint);
}
.rs-brief dd {
  font-weight: 700;
}
/* 못 뽑은 특성 — 낮은 위계의 글자 버튼, 누르면 변경하기 시트 */
.rs-fill {
  font-size: 13px;
  font-weight: 500;
  color: var(--faint);
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* 아래 버튼은 서비스 공통 .bottom 처럼 화면 아래에 붙는다. 피드 보기는 알약, 공유는 왼쪽의 동그란 유리 버튼.
   색은 서비스 공통(진한 알약 + 밝은 유리) */
.rs-next {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
}
[data-page="result"] .bottom.rs-next {
  padding-left: 16px;
  padding-right: 16px;
}
[data-page="result"] .bottom.rs-next::before {
  background: linear-gradient(transparent, var(--rs-bg) 65%);
}
[data-page="result"] .rs-next .cta {
  font-weight: 700;
}
/* 공유는 피드 보기 왼쪽의 아이콘만 있는 동그란 유리 버튼 */
.rs-share {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #111;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) 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);
}
/* 내 특징 변경하기 시트 — 추구미 변경하기와 같은 유리 시트(.liquid). 칩 목록만 스크롤되고 적용하기는 아래에 고정 */
.sheet.traits-sheet {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.traits-sheet .sheet-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin: 0 -20px;
  padding: 0 20px 20px;
}
.traits-sheet .sheet-foot {
  padding-top: 4px;
}
.trait {
  margin-top: 22px;
}
.trait b {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #555;
  margin-bottom: 10px;
}

/* 홈 */
.mine-kw {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  font-size: 14px;
}
.mine-kw span {
  color: var(--faint);
  font-weight: 500;
  margin-right: 4px;
}
.mine-kw b {
  font-weight: 800;
  color: var(--pt-ink);
}
.mine-kw svg {
  color: #bbb;
  flex: none;
}

/* 리퀴드 글라스 시트: 화면 가장자리에서 떠 있는 흰 유리. 꽉 찬 면은 적용 버튼 하나만 */
/* 앱이 화면 끝까지 그려지므로 시트는 화면 아래에서 8px 만 띄우고, 홈 표시줄은 시트 안쪽 여백으로 비킨다 */
.sheet.liquid {
  bottom: 8px;
  width: calc(100% - 16px);
  max-width: calc(var(--col) - 16px);
  padding: 12px 20px max(20px, env(safe-area-inset-bottom, 0px));
  border-radius: 34px;
  /* 뒤 사진 색이 은은하게 비치되 탁해 보이지 않을 만큼 흰빛을 둔다 (93%는 거의 흰 판이라 85%로) */
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(30px) saturate(140%) brightness(1.06);
  backdrop-filter: blur(30px) saturate(140%) brightness(1.06);
  border: 0.5px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translate(-50%, calc(100% + 24px));
}
.sheet.liquid.on {
  transform: translate(-50%, 0);
}
/* 유리 시트 뒤는 살짝만 어둡게 해서 비치는 느낌을 살린다 */
.dim:has(+ .sheet.liquid) {
  background: rgba(0, 0, 0, 0.16);
}
.sheet.liquid .grip {
  background: rgba(0, 0, 0, 0.18);
}
.kw-chips {
  margin: 18px 0 24px;
}
/* 안 고른 칩은 테두리만, 고른 칩은 연핑크 (두 칩은 같은 모양이라 위계가 없다) */
.sheet.liquid .chip {
  height: 34px;
  padding: 0 14px;
  font-size: 14.5px;
  background: none;
  border: 1px solid rgba(0, 0, 0, 0.12);
  color: #333;
}
.sheet.liquid .chip.on {
  background: rgba(255, 61, 154, 0.1);
  border-color: var(--pt);
  color: var(--pt-ink);
  font-weight: 700;
}
/* 순위 번호 — 고른 칩 왼쪽 위 모서리에 걸친 작은 핑크 원(1·2). 칩 밖으로 띄워서 고르고 빼도 칩 너비·줄바꿈이 그대로다 */
.kw-chips .chip {
  position: relative;
}
/* 2차 추구미는 1차를 고르기 전까지 흐리다(disabled) — 고르면 부드럽게 선명해진다 */
.kw-chips .chip {
  transition: opacity 0.2s ease;
}
.kw-rank {
  display: none;
}
.chip.on .kw-rank {
  position: absolute;
  top: -6px;
  left: -4px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  font-style: normal;
  font-size: 10.5px;
  font-weight: 800;
  color: #fff;
  background: var(--pt);
  box-shadow: 0 0 0 2px #fff;
}
.sheet.liquid .chip:disabled {
  opacity: 0.35;
}
.sheet.liquid .cta {
  height: 50px;
  font-size: 16px;
  font-weight: 600;
}

.sec {
  margin-top: 40px;
}
/* 홈 끝 — 탐색으로 가는 알약 버튼(흰 바탕 + 얇은 테두리, 그림자 없음 — 떠 있는 탭바와 겹쳐 보이지 않게), 그 아래 작은 새로고침 */
.feed-end {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 34px;
}
.feed-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 52px;
  padding: 0 16px 0 20px;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #dcdcdc;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}
.feed-more svg {
  width: 16px;
  height: 16px;
  color: #8e8e93;
}
/* 굴러가는 내 추구미 — 한 줄 높이 창 안에서 낱말 띠가 위로 올라간다(home.mjs startRoll) */
/* 글줄 높이를 창과 같게 맞춰 굴러가는 낱말과 앞뒤 글자의 기준선을 맞춘다 */
.feed-more > span {
  line-height: 22px;
}
.feed-more .roll,
.feed-more .roll-one {
  margin: 0 2px;
}
.feed-more .roll {
  display: inline-block;
  height: 22px;
  overflow: hidden;
  vertical-align: top;
}
.feed-more .roll.rolling .roll-track {
  transition: transform 0.4s cubic-bezier(0.3, 0.7, 0.2, 1);
}
/* 창 폭은 가장 긴 추구미에 고정 — 짧은 낱말은 가운데 */
.feed-more .roll-track {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.feed-more .roll b,
.feed-more .roll-one {
  height: 22px;
  line-height: 22px;
  font-weight: 800;
  color: var(--pt-ink);
  white-space: nowrap;
}
/* 홈 맨 아래 새로고침: 테두리 없는 회색 글자 버튼으로 사진보다 낮은 위계 */
.feed-refresh {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}
/* 이동이 아니라 이 자리에서 하는 일이라 버튼 대신 밑줄 글자 */
.feed-refresh span {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* 내비 바로 위까지만 비운다 (기본 .app 140px 은 버튼 아래가 너무 빈다) */
[data-page="home"] {
  padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px));
}
.feed-refresh button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--faint);
}
.sec:first-of-type {
  margin-top: 18px;
}
.sec-head {
  display: flex;
  align-items: center;
  padding: 0 20px 12px;
}
.sec-head h2 {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.sec-head h2 em {
  font-style: normal;
  color: var(--pt-ink);
}

/* 카드: 출처 왼쪽 위, 형식 오른쪽 위, 정보형 대표 태그 아래 */
.glass {
  background: rgba(0, 0, 0, 0.26);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  color: #fff;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.1);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.pc {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 10px;
  overflow: hidden;
  background: #eee;
}
.pc img {
  object-position: 50% 25%;
  opacity: 0;
  transition: opacity 0.2s;
}
.pc img.ok {
  opacity: 1;
}
/* 사진을 받는 동안: 카드 자리가 숨 쉬듯 옅어졌다 짙어진다(홈 피드 빈 칸과 같은 박자) */
.pc:has(> img:not(.ok)) {
  animation: sk-tone 1.4s ease-in-out infinite alternate;
}
@keyframes sk-tone {
  to { background-color: #f6f6f6; }
}
.pc .src {
  position: absolute;
  left: 8px;
  top: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 9px 0 7px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  max-width: 62%;
  white-space: nowrap;
}
.pc .src span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.pc .src svg,
.pc .mark svg {
  width: 13px;
  height: 13px;
  flex: none;
}
.pc .mark {
  width: 26px;
  height: 26px;
  padding: 0;
  justify-content: center;
}
.pc .fmt {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pc .fmt svg {
  width: 13px;
  height: 13px;
}
.pc .tag {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 34px 10px 9px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.45));
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  text-align: left;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 레이아웃 */
.l-feature {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  height: 330px;
  padding: 0 16px;
}
.l-feature .pc {
  aspect-ratio: auto;
  height: 100%;
}
.l-feature .feat-lead {
  position: relative;
  grid-row: 1 / 3;
  border-radius: 14px;
  overflow: hidden;
}
.l-feature .fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 60%;
  /* 밝은 사진에서도 큰 제목이 읽히게 아래로 갈수록 진하게 */
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.38) 40%, rgba(0, 0, 0, 0.78));
  /* 카드가 자체 쌓임 맥락을 가져서, 위에 얹으려면 순서를 정해 줘야 한다 */
  z-index: 1;
  border-radius: 0 0 10px 10px;
  pointer-events: none;
}
.hero-title {
  position: absolute;
  z-index: 2;
  left: 14px;
  right: 14px;
  bottom: 14px;
  color: #fff;
  font-size: 27px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.04em;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
  /* 사진 위에 얹힌 제목을 눌러도 아래 사진이 열리게 */
  pointer-events: none;
}
.hero-title small {
  display: block;
  font-size: 13px;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.l-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 16px;
}
.l-stagger {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0 16px;
  align-items: start;
}
.l-stagger > div {
  display: grid;
  gap: 6px;
}
/* 엇갈림: 긴 카드(2:3)와 정사각 카드가 좌우로 엇갈려야 2×2 와 다르게 읽힌다. 두 열 높이는 같다 */
.l-stagger .pc {
  aspect-ratio: 1;
}
.l-stagger .pc.tall {
  aspect-ratio: 2 / 3;
}
.l-row {
  display: flex;
  gap: 8px;
  padding: 0 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.l-row::-webkit-scrollbar {
  display: none;
}
.l-row .pc {
  flex: none;
  width: 150px;
  scroll-snap-align: start;
  scroll-margin-left: 16px;
}
/* 탐색 상단: 그림자로 떠 있는 흰 검색창 + 추구미 추천 칩 줄 (당근·네이버 방식) */
.find-top {
  position: sticky;
  top: 0;
  z-index: 30;
  /* 뒤에 옅은 블러가 늘 깔리고 아래로 갈수록 사라진다. 처음 화면에서도 첫 줄 사진이 칩 아래 여백만큼
     블러 밑으로 들어가 흰 바탕과 선으로 끊기지 않는다 (칩에는 닿지 않게 12px) */
  padding: calc(10px + env(safe-area-inset-top, 0px)) 0 12px;
}
.find-top::before {
  content: "";
  position: absolute;
  inset: 0 0 -18px;
  z-index: -1;
  background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.2) 70%, rgba(255, 255, 255, 0));
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
  -webkit-mask-image: linear-gradient(#000 60%, transparent);
  mask-image: linear-gradient(#000 60%, transparent);
  transition: opacity 0.25s;
  pointer-events: none;
}
.result-note[hidden] + .l-explore {
  margin-top: -12px;
}
.find-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
}
.find-row .back {
  flex: none;
}
.find-field {
  flex: 1;
  min-width: 0;
  height: 46px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px 0 16px;
  color: var(--sub);
}
.find-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.find-field input::placeholder {
  color: #767676;
}
.find-field input::-webkit-search-cancel-button {
  display: none;
}
.find-field .go .find-spinner {
  width: 18px;
  height: 18px;
  animation: spin 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) {
  .find-field .go .find-spinner { animation: none; }
}
.find-field .clear {
  display: flex;
  color: #666;
}
.find-field.typed > svg {
  display: none;
}
.find-field.typed {
  padding-left: 18px;
}
.find-field .go {
  flex: none;
  width: 34px;
  height: 34px;
  margin-right: -8px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.find-field .go:disabled {
  cursor: wait;
  opacity: 1;
}
.find-chips {
  display: flex;
  gap: 6px;
  padding: 10px 14px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.find-chips::-webkit-scrollbar {
  display: none;
}
.fchip {
  flex: none;
  height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
  font-size: 13.5px;
  font-weight: 600;
  color: #333;
}
.fchip.on {
  background: var(--ink);
  color: #fff;
  box-shadow: none;
}
/* 누르면: 흐린 유리 판이 화면 절반쯤 내려오고, 나머지는 옅게 어두워진다 */
.searching .find-top {
  z-index: 96;
  background: none;
  /* 숨은 칩 자리까지 헤더가 판 위를 덮으므로, 검색창 줄만 눌리게 한다 */
  pointer-events: none;
}
.searching .find-row {
  pointer-events: auto;
}
.searching .find-top::before {
  opacity: 0;
}
.searching .find-chips {
  visibility: hidden;
}
.find-dim {
  position: fixed;
  inset: 0;
  z-index: 94;
  background: rgba(0, 0, 0, 0.18);
  opacity: 0;
  transition: opacity 0.3s;
}
.find-dim.on {
  opacity: 1;
}
.find-sheet {
  position: fixed;
  left: 50%;
  top: 0;
  width: 100%;
  max-width: var(--col);
  max-height: 58vh;
  z-index: 95;
  transform: translate(-50%, -100%);
  overflow-y: auto;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 20px 22px;
  border-radius: 0 0 26px 26px;
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(40px) saturate(190%);
  backdrop-filter: blur(40px) saturate(190%);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14), inset 0 -0.5px 0 rgba(255, 255, 255, 0.8);
  transition: transform 0.42s cubic-bezier(0.3, 0.7, 0.2, 1);
}
.find-sheet.open {
  transform: translate(-50%, 0);
}
.find-sheet > * {
  opacity: 0;
  transition: opacity 0.2s;
}
.find-sheet.open > * {
  opacity: 1;
  transition-delay: 0.12s;
}
.find-sheet .fchip {
  background: rgba(255, 255, 255, 0.85);
}
.find-sheet .recent .rx,
.find-sheet .sheet-head button {
  color: var(--sub);
}
.find-sheet .recent li {
  border-bottom-color: rgba(0, 0, 0, 0.07);
}
@media (prefers-reduced-motion: reduce) {
  .find-sheet,
  .find-sheet > *,
  .find-dim {
    transition: none;
  }
}
.sheet-head {
  display: flex;
  align-items: center;
  margin: 16px 0 10px;
}
.sheet-head b {
  font-size: 15px;
  font-weight: 800;
}
.sheet-head button {
  margin: -10px 0 -10px auto;
  padding: 10px 0 10px 16px;
  font-size: 13px;
  color: var(--faint);
}
.recent {
  list-style: none;
}
.recent li {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.recent .rq {
  flex: 1;
  text-align: left;
  padding: 13px 0;
  font-size: 15px;
}
.recent .rx {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
}
.sheet-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
/* 검색어에 걸린 계정 — 세로로 한 줄씩, 처음엔 3개까지. 누르면 그 계정의 게시물만 보인다 */
.find-accounts {
  display: flex;
  flex-direction: column;
  margin: 0 16px 12px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
}
.find-accounts[hidden] {
  display: none;
}
.acct {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  text-align: left;
}
.acct-av {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
}
.acct-av img,
.acct-blank {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #ececee;
  overflow: hidden;
}
/* 사진이 없으면 사람 모양 */
.acct-blank {
  color: #c4c4c9;
}
.acct-blank svg {
  display: block;
  width: 100%;
  height: 100%;
}
/* 어디 계정인지 — 사진 오른쪽 아래의 작은 표시 */
.acct-src {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06);
  display: grid;
  place-items: center;
  color: var(--ink);
}
.acct-src svg {
  width: 11px;
  height: 11px;
}
.acct-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.acct-text b,
.acct-text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-text b {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
}
.acct-text small {
  font-size: 12px;
  color: var(--faint);
}
.find-accounts:not(.all) .acct:nth-child(n + 4),
.find-accounts.all .acct-more {
  display: none;
}
.acct-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 36px;
  font-size: 13px;
  color: var(--faint);
}
/* 그 계정의 게시물만 보는 중 — 옅은 바탕의 한 줄, 오른쪽 ✕ 로 푼다 */
.acct.on {
  margin: 2px 0;
  padding: 8px 6px 8px 10px;
  border-radius: 16px;
  background: var(--soft);
}
.acct-go {
  flex: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--sub);
}
.result-note {
  padding: 0 16px 10px;
  font-size: 13px;
  color: var(--faint);
}
.result-note.empty {
  padding: 18px 16px 28px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
}

/* 탐색: 섹션 없이 3열, 작은 카드 */
.l-explore {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}
.l-explore .pc {
  border-radius: 0;
}
/* 개발 환경에서만(서버가 post.debug 를 줄 때) — 섞기 칸과 보정 좋아요. 왼쪽 위 계정 표시 바로 아래 */
.pc .dbg {
  position: absolute;
  left: 8px;
  top: 38px;
  padding: 3px 6px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.35;
  text-align: left;
  white-space: nowrap;
  pointer-events: none;
}
.pc.s .dbg {
  top: 6px;
  left: 6px;
}
.slide .vdbg {
  position: absolute;
  left: 14px;
  top: calc(56px + env(safe-area-inset-top, 0px));
  z-index: 3;
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.62);
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  max-width: calc(100% - 28px);
  pointer-events: none;
}
/* 탐색 타일: 출처 표시는 뷰어에 맡기고, 형식 표시만 유리 없이 (인스타 둘러보기 방식) */
.pc.s .mark {
  display: none;
}
.pc.s .fmt {
  top: 6px;
  right: 6px;
  width: 16px;
  height: 16px;
  background: none;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}
.pc.s .fmt svg {
  width: 14px;
  height: 14px;
}
.pc.s .tag {
  padding: 24px 7px 6px;
  font-size: 11px;
}
.more-sentinel {
  height: 1px;
}

/* 전체 화면 뷰어: 원본 비율 + 흐린 배경, 아래에 원작자·Instagram에서 보기·저장 */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: #000;
  display: flex;
  justify-content: center;
  color: #fff;
}
.vlist {
  width: 100%;
  max-width: var(--col);
  height: 100%;
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  /* 위에 슬라이드를 붙일 때 위치 보정은 스크립트가 한다 (브라우저 자동 보정과 겹치면 두 칸 밀림) */
  overflow-anchor: none;
  scrollbar-width: none;
}
.vlist::-webkit-scrollbar,
.track::-webkit-scrollbar {
  display: none;
}
.slide {
  position: relative;
  height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
/* 인스타 임베드 슬라이드(viewer.mjs embedHtml): 위 닫기 줄과 아래 추구미 줄·저장 버튼 사이 가운데에 인스타 화면을 둔다.
   인스타 화면이 그 사이보다 길면 안에서 스크롤하지 않고 줄여서 맞춘다(fitEmbed) — 위아래로 밀면 다음 게시물로 */
.slide.embed {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: calc(64px + env(safe-area-inset-top, 0px)) 12px calc(128px + max(env(safe-area-inset-bottom, 0px), 16px));
}
/* 뒤는 그 게시물을 흐리게 깔고 흰 막을 씌워 밝게 — 흰 인스타 카드가 검은 바탕에서 튀지 않게 */
.slide.embed {
  background: #ececee;
}
.slide.embed .vbg {
  filter: blur(12px) saturate(70%) brightness(1.1);
}
.slide.embed::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(246, 246, 248, 0.55);
  pointer-events: none;
}
.slide.embed .dock,
.ig-embed {
  z-index: 1;
}
.ig-embed {
  position: relative;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  width: 100%;
  max-width: 480px;
  flex: none;
  transform-origin: top center;
  border-radius: 12px;
}
/* 인스타 화면은 처음에 높이 0으로 생겼다가, 안에서 제 높이를 재서 알려 줘야 커진다. 거의 안 보이는 크기면 브라우저가 그 안의
   일을 미뤄 높이를 영영 못 알려 오니 처음부터 자리를 잡아 둔다(알려 오면 그 높이로) */
.ig-embed iframe.instagram-media {
  min-height: 480px;
}
.ig-embed .instagram-media {
  margin: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
}
/* 흐린 배경 — 슬라이드의 1/4 크기로 그려 흐림을 걸고 4배로 키운다. 흐림(filter)은 그 요소 크기만 한 그래픽 층을 따로
   만들어서, 화면 크기 그대로 걸면 슬라이드마다 수십 MB를 쓴다(오래된 폰에서 뷰어를 오래 넘기면 하얗게 멈췄다).
   작게 그려 키우면 층은 1/16, 흐린 배경이라 보기엔 같다. 4배로 키운 뒤 슬라이드보다 사방 15% 넓게 덮는다 */
.vbg {
  position: absolute;
  left: -15%;
  top: -15%;
  width: 32.5%;
  height: 32.5%;
  overflow: hidden;
  filter: blur(12px) saturate(80%) brightness(0.62);
  transform: scale(4);
  transform-origin: 0 0;
  will-change: transform;
}
.vbg img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* 멀어진 슬라이드(viewer.mjs sleepFar) — 칸 높이만 남기고 안쪽(흐린 배경·사진·정보 줄)을 아예 그리지 않는다.
   그래픽 층과 그리기 비용이 지금 보는 것 앞뒤 몇 개 몫으로 묶인다 */
.slide.asleep > * {
  display: none;
}
/* 흐린 배경은 지금 것과 바로 앞뒤만(viewer.mjs BG_KEEP) */
.slide.bg-off .vbg {
  display: none;
}
.track {
  position: relative;
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
/* 터치로 넘기는 건 viewer.mjs swipe 가 맡는다 — 좌우 기본 스크롤을 막고, 끄는 동안엔 스냅도 끈다 */
.track:not(.single) {
  touch-action: pan-y;
}
.track.dragging {
  scroll-snap-type: none;
}
.track.single {
  overflow: hidden;
}
.frame {
  flex: none;
  width: 100%;
  height: 100%;
  scroll-snap-align: center;
  /* 세게 밀어도 한 장씩만 넘어간다 */
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  /* 사진·영상은 화면 전체의 가운데 — 위아래 검은 몫이 같다. 크기(max-height)만 위 버튼 줄·아래 정보 줄 몫을 빼고 정한다 */
  justify-content: center;
  -webkit-touch-callout: none;
  user-select: none;
}
.media {
  position: relative;
  width: 100%;
}
/* 릴스(9:16 근처): 인스타 앱처럼 화면을 꽉 채운다(넘치는 쪽이 조금 잘림). 15% 넘게 잘릴 화면(브라우저 막대가 큰 짧은
   화면 등)에선 자르지 않고 담고 남는 자리는 흐린 배경(.fit, viewer.mjs fitReel) */
.frame.fill .media {
  height: 100%;
}
.slide .frame.fill .media video,
.slide:has(.why) .frame.video.fill .media video {
  height: 100%;
  max-height: none;
  object-fit: cover;
}
.media img,
.media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 210px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  object-fit: contain;
}
.slide.has-video .media img,
.slide.has-video .media video {
  max-height: calc(100dvh - 150px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}
.slide.has-video:has(.why) .media img,
.slide.has-video:has(.why) .media video {
  max-height: calc(100dvh - 197px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}
.slide .frame.fill.fit .media video,
.slide:has(.why) .frame.video.fill.fit .media video {
  object-fit: contain;
}
/* 세로로 긴 사진(viewer.mjs fitTall): 위 뒤로 가기 줄부터 아래 정보 줄 밑까지 화면 전체를 써서 폭을 채운다(릴스처럼 버튼·글씨가
   사진 위에 얹힌다). 그래도 조금만 길면 위아래를 살짝 자른다(.crop).
   다른 사진처럼 화면 전체의 가운데에 둔다 */
.slide .frame.tall .media img,
.slide .frame.tall .media video,
.slide.has-video:has(.why) .frame.tall .media img,
.slide.has-video:has(.why) .frame.tall .media video {
  max-height: 100dvh;
}
.slide .frame.tall.crop .media img,
.slide .frame.tall.crop .media video {
  object-fit: cover;
}
/* 장 번호: 캐러셀 밖에 두고 지금 장 사진의 오른쪽 위 안쪽에 맞춘다(위 버튼 줄보다는 아래). 영상 장에선 소리 버튼 옆으로 비킨다 */
.pcount {
  position: absolute;
  right: 12px;
  top: max(calc(15px + env(safe-area-inset-top, 0px)), calc(var(--media-top, 0px) + 12px));
  z-index: 3;
  transition: right 0.18s, top 0.2s, opacity 0.2s;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
}
/* 장 수 점: 캐러셀 밖에 두고 지금 장 사진 바로 아래에 맞춘다. 넘기면 켜진 점만 바뀐다 */
.pdots {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--dots-top, 50%);
  z-index: 2;
  display: flex;
  justify-content: center;
  height: 6px;
  pointer-events: none;
  transition: top 0.2s, opacity 0.2s;
}
/* 지금 장의 사진·영상 크기를 알기 전엔 장 번호·점을 감춘다 */
.slide:not(.placed) .pcount,
.slide:not(.placed) .pdots {
  opacity: 0;
  transition: none;
}
.pdots-win {
  overflow: hidden;
}
.pdots-strip {
  display: flex;
  gap: 5px;
  transition: transform 0.25s ease;
}
.pdots i {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transition: transform 0.25s ease, background-color 0.2s;
}
.pdots i.on {
  background: #fff;
}
.pdots i.sm {
  transform: scale(0.67);
}
.pdots i.out {
  transform: scale(0.4);
}
.vplay {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 68px;
  height: 68px;
  margin: -34px 0 0 -34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.18s, transform 0.18s;
  pointer-events: none;
}
.vplay svg {
  width: 26px;
  height: 26px;
}
.frame.paused .vplay {
  opacity: 1;
  transform: none;
}
/* 영상이 오는 중 — 흰 고리가 돈다. 금방 오는 영상에선 깜빡이지 않게 0.3초 늦게 나타난다 */
.vload {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  margin: -18px 0 0 -18px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  animation: spin 0.9s linear infinite;
}
.frame.buffering .vload {
  opacity: 1;
  transition-delay: 0.3s;
}

/* 불러오는 동안의 빈 칸(홈 피드·결과) — 실제 화면과 같은 자리에 회색 칸, 천천히 숨 쉬듯 옅어졌다 짙어진다 */
.sk-box {
  display: block;
  border-radius: 10px;
  background: #eee;
  animation: sk-breathe 1.4s ease-in-out infinite alternate;
}
.sk-feed .l-feature .sk-box:first-child {
  grid-row: 1 / 3;
  border-radius: 14px;
}
.sk-feed {
  padding-top: 8px;
}
/* 당겨서 새로고침 — 화면 전체가 튕기지 않게 막고, 헤더 아래에 도는 표시만 보여 준다 */
.no-bounce,
.no-bounce body {
  overscroll-behavior-y: none;
}
.ptr {
  position: fixed;
  left: 50%;
  z-index: 20;
  width: 24px;
  height: 24px;
  margin-left: -12px;
  opacity: 0;
  color: var(--pt);
  pointer-events: none;
}
.ptr svg {
  display: block;
}
/* 홈 맨 아래에서 위로 끌 때(home.mjs showPush) — 꺾쇠가 왼쪽에서 오른쪽으로 살짝 가며 앞이 먼저, 뒤가 늦게 붙는다 */
.push-next svg {
  overflow: visible;
}
.ptr.turning svg {
  animation: ptr-spin 0.8s linear infinite;
}
@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}
/* 탐색 첫 화면 — 실제 검색창·칩·3열 카드와 같은 자리 */
.sk-explore {
  margin-top: -12px;
}
.l-explore > .sk-box {
  aspect-ratio: 3 / 4;
  border-radius: 0;
}
.sk-find-text {
  font-size: 15px;
  color: #767676;
}
/* 실제 칩(추구미 2개 + 조합 2개)과 비슷한 너비 */
.sk-find-chips .sk-box {
  flex: none;
  width: 88px;
  height: 34px;
  border-radius: 999px;
}
.sk-find-chips .sk-box:first-child {
  width: 62px;
}
.sk-line {
  display: block;
  width: 44%;
  height: 18px;
  margin: 30px 20px 12px;
  border-radius: 9px;
  background: #eee;
  animation: sk-breathe 1.4s ease-in-out infinite alternate;
}
.sk-result .rs-grid .sk-box {
  aspect-ratio: 1;
  border-radius: 0;
}
.sk-result .sk-line {
  margin: 18px 0 0;
  width: 60%;
  height: 28px;
}
.sk-result .sk-line.short {
  width: 22%;
  height: 14px;
}
/* 마이 — 내 정보를 받는 동안 추구미·결과·계정 자리 */
.my-sk-kw {
  width: 52%;
  height: 30px;
  margin: 8px 0 0;
}
.my-sk-card {
  height: 150px;
}
.my-sk-login {
  height: 40px;
}
@keyframes sk-breathe {
  to { opacity: 0.45; }
}
@media (prefers-reduced-motion: reduce) {
  .pc,
  .sk-box,
  .sk-line,
  .vload {
    animation: none;
  }
}
.scrim {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 240px;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.55) 55%, rgba(0, 0, 0, 0.7));
  pointer-events: none;
}
.vtop {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--col);
  z-index: 91;
  padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 0;
  pointer-events: none;
}
.vtop .back {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  margin: 0;
  border-radius: 50%;
  color: #fff;
}
/* 글자 줄 여백 없이 원 정중앙에 — 꺾쇠는 뾰족한 쪽이 가벼워 보여 그쪽으로 살짝 옮긴다 */
.vtop .i-back svg {
  display: block;
  transform: translateX(-0.5px);
}
.sound {
  position: absolute;
  right: 14px;
  top: calc(10px + env(safe-area-inset-top, 0px));
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.speed {
  position: absolute;
  left: 50%;
  top: calc(16px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  z-index: 3;
}
/* 재생 막대: 아이디·저장 줄 바로 위 고정 자리. 누르거나 끌어서 이동, 터치 영역은 넓게 */
.vbar {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(58px + max(env(safe-area-inset-bottom, 0px), 16px));
  height: 24px;
  display: flex;
  align-items: center;
  touch-action: none;
  cursor: pointer;
  z-index: 2;
}
.vbar > i {
  position: relative;
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.3);
  transition: height 0.15s;
}
.vbar > i > i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: #fff;
}
.vbar.drag > i {
  height: 6px;
}
.slide.at-video.pc-high .pcount {
  right: 58px;
}
/* 여러 장 중 사진을 보는 동안엔 소리 버튼·재생 막대를 감춘다 */
.slide:not(.at-video) .sound,
.slide:not(.at-video) .vbar {
  opacity: 0;
  pointer-events: none;
}
.sound,
.vbar {
  transition: opacity 0.18s;
}
/* 영상이면 추천 이유를 막대 위로 올린다 */
.has-video .why {
  margin-bottom: 34px;
}
/* 아래 홈 막대가 있으면 그 높이만큼만 띄우고, 없으면 16px — 하단 탭 알약(app.css .bottom)과 같다. 재생 막대(.vbar)는 이 줄 위 58px */
.dock {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: max(env(safe-area-inset-bottom, 0px), 16px);
}
.why {
  display: flex;
  width: fit-content;
  border: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  max-width: 100%;
  height: 27px;
  margin-bottom: 14px;
  padding: 0 11px;
  border-radius: 999px;
  font-size: 13.5px;
  line-height: 27px;
  color: #fff;
  /* 추천 이유는 알약 하나 — 뷰어 위 버튼들(.glass)과 같은 어두운 유리라 밝은 영상에서도 경계가 남는다 */
  background: rgba(0, 0, 0, 0.26);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.28), 0 2px 8px rgba(0, 0, 0, 0.1);
}
/* FOR YOU 는 알약 안 왼쪽, 글자 높이만 한 짧은 선으로 값과 나눈다 (알약을 칸으로 가르지 않게) */
.why-head {
  flex: none;
  margin-right: 8px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #ff7ab8;
}
.why-head::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 11px;
  margin-left: 8px;
  vertical-align: -1px;
  background: rgba(255, 255, 255, 0.3);
}
.why-list {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.why-list .k {
  font-weight: 700;
}
/* 분석된 내 특징은 한 단계 낮게 — 80% 아래로 내리면 밝은 영상에서 사라진다 */
.why-list .t {
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
}
.why-list span + span::before {
  content: "·";
  margin: 0 5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}
/* 추천 이유 시트 (리퀴드) — 뷰어 위에 뜬다 */
/* 뷰어를 처음 열 때의 안내 — 터치를 안내가 받는다(누르든 밀든 안내만 닫히고 아래 게시물은 그대로) */
.vcoach {
  position: fixed;
  inset: 0;
  z-index: 91;
  touch-action: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgba(0, 0, 0, 0.5);
  animation: vcoach-in 0.25s ease both;
  transition: opacity 0.2s ease;
}
.vcoach.out {
  opacity: 0;
}
.vcoach p {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}
.vcoach-swipe {
  position: relative;
  width: 56px;
  height: 132px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.28);
}
/* 위쪽 꺾쇠 세 개 — 아래에서 위로 차례로 밝아진다 */
.vcoach-swipe i {
  position: absolute;
  left: 50%;
  width: 12px;
  height: 12px;
  margin-left: -6px;
  border-left: 2.5px solid #fff;
  border-top: 2.5px solid #fff;
  border-radius: 2px;
  transform: rotate(45deg);
  opacity: 0.25;
  animation: vcoach-chev 2s linear infinite;
}
.vcoach-swipe i:nth-child(1) {
  top: 20px;
  animation-delay: 0.16s;
}
.vcoach-swipe i:nth-child(2) {
  top: 36px;
  animation-delay: 0.08s;
}
.vcoach-swipe i:nth-child(3) {
  top: 52px;
}
/* 손가락 자리 — 아래에서 위로 밀고 올라가 사라진다(슬라이드가 들리는 박자와 같다) */
.vcoach-swipe b {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: vcoach-dot 2s cubic-bezier(0.22, 0.9, 0.3, 1) infinite;
}
@keyframes vcoach-in {
  from {
    opacity: 0;
  }
}
@keyframes vcoach-dot {
  0% {
    transform: translateY(0) scale(0.9);
    opacity: 0;
  }
  6% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
  30% {
    transform: translateY(-64px) scale(1);
    opacity: 1;
  }
  42%,
  100% {
    transform: translateY(-64px) scale(0.9);
    opacity: 0;
  }
}
@keyframes vcoach-chev {
  0%,
  8% {
    opacity: 0.25;
  }
  18%,
  30% {
    opacity: 1;
  }
  45%,
  100% {
    opacity: 0.25;
  }
}
.viewer ~ .dim {
  z-index: 91;
}
.viewer ~ .sheet {
  z-index: 92;
}
.why-sheet h3 {
  margin: 2px 0 14px;
  font-size: 20px;
  font-weight: 800;
  color: var(--pt-title);
}
.why-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}
.why-label {
  flex: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.why-label b {
  font-size: 14px;
  font-weight: 600;
  color: #555;
}
/* 변경은 라벨에 딸린 보조 행동 — 연한 회색 + 옅은 밑줄 */
.why-edit {
  padding: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--faint);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(0, 0, 0, 0.15);
}
.why-sheet .chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
/* 줄 라벨이 종류를 말해 주니 칩은 모두 연핑크 */
.sheet.liquid.why-sheet .chip {
  height: 30px;
  padding: 0 12px;
  font-size: 13.5px;
  font-weight: 700;
  background: rgba(255, 61, 154, 0.1);
  border: 1px solid var(--pt);
  color: var(--pt-ink);
}
.dock-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.owner {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.owner .av {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.16);
}
.owner .av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.owner .av svg {
  width: 22px;
  height: 22px;
}
.owner b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}
.iglink {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 44px;
  margin: -10px 0 -12px;
  padding: 0 12px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
}
.iglink svg:first-child {
  width: 13px;
  height: 13px;
}
.vsave {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.vsave.on {
  background: var(--pt);
  color: #fff;
}
.vsave.pop {
  animation: pop 0.32s cubic-bezier(0.2, 0.8, 0.3, 1);
}
/* 저장하면 뷰어 아래에서 잠깐 올라오는 하단 탭 알약(페이지의 것을 복제) — 움직임은 viewer.mjs(flyToSaved) */
.vdrop-bar,
.vdrop-bar * {
  pointer-events: none;
}
.vdrop-bar {
  z-index: 95;
}
/* 저장 아이콘이 담긴 저장 칸 — 아이콘 뒤에 핑크 동그라미, 아이콘은 흰색 (뷰어 저장 버튼과 같은 짝) */
.tabbar a.caught {
  color: #fff;
}
.tabbar a.caught::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 50%;
  background: var(--pt);
  z-index: -1;
}
/* 던져지는 저장 아이콘 — 저장 단추 가운데에 0 크기로 두고 아이콘을 그 둘레에 그린다 */
.vfly {
  position: fixed;
  z-index: 96;
  width: 0;
  height: 0;
  pointer-events: none;
}
/* 저장 버튼(.vsave.on)과 같은 크기의 핑크 동그라미 + 흰 아이콘 — 밝은 사진·흰 탭 알약 위에서도 눈에 띄게 */
.vfly i {
  position: absolute;
  left: -26px;
  top: -26px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--pt);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}
.vfly svg {
  display: block;
}

/* 마이 — 결과 화면(rs-*)과 같은 회색 바탕 + 흰 카드. ① 나의 추구미 ② 추구미 찾기 결과 ③ 약관·계정 */
[data-page="my"] {
  padding-bottom: 120px;
}
.my-hero {
  padding: 0 16px 20px;
}
.my-hero-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.my-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.my-hero-head .my-link {
  margin-bottom: -12px;
}
.my-found .my-pair {
  grid-template-columns: 1fr;
  gap: 0;
  margin: 8px 0 0;
  font-size: 14px;
}
.my-found .my-pair div {
  align-items: center;
  min-height: 44px;
  padding: 0;
}
.my-found .my-pair div:last-child {
  border-bottom: none;
}
.my-pair dd {
  display: flex;
  align-items: center;
  gap: 8px;
}
.my-pair .my-link {
  min-height: 32px;
  font-size: 12px;
}
.my-none {
  font-weight: 500;
  color: var(--faint);
}
.my-pair dd.pt {
  color: var(--pt-ink);
}
.my-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}
.my-actions a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  background: var(--rs-tile);
}
/* 사진을 건너뛴 사람 — 다시 찾기 대신 사진 올려 분석받는 검정 버튼 */
.my-actions a.my-go {
  color: #fff;
  background: var(--ink);
}
.my-login {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.my-login div {
  min-width: 0;
}
.my-login span {
  display: block;
  font-size: 12px;
  color: var(--faint);
}
.my-login b {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.my-login .my-link {
  flex: none;
}
/* 계정 카드 — 로그인 계정 줄 아래에 목록 줄(내가 본 콘텐츠)이 이어진다 */
.my-acct .my-login {
  padding-top: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.my-acct .my-sk-login {
  flex: 1;
}
.my-list {
  padding-top: 4px;
  padding-bottom: 4px;
}
.my-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  font-size: 15px;
  border-bottom: 1px solid var(--line);
}
.my-list a:last-child {
  border-bottom: none;
}
.my-list svg {
  color: var(--rs-mute);
}
.my-account {
  display: flex;
  gap: 20px;
  padding: 16px 28px 0;
}
.my-account button {
  min-height: 44px;
  font-size: 13px;
  color: var(--faint);
}

/* 이용약관 · 개인정보처리방침 — 읽기 쉬운 글 한 편 */
.legal {
  padding: 0 20px 56px;
}
.legal .top {
  padding-left: 0;
  padding-right: 0;
}
.legal h1 {
  padding: 0;
  margin-top: 8px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.4;
}
.legal-meta {
  margin: 6px 0 24px;
  font-size: 13px;
  color: var(--faint);
}
.legal h2 {
  margin: 26px 0 8px;
  font-size: 16px;
  font-weight: 700;
}
.legal p,
.legal li {
  font-size: 14.5px;
  line-height: 24px;
  color: #444;
}
.legal p + p,
.legal ol + p {
  margin-top: 8px;
}
.legal ol {
  margin: 6px 0 0;
  padding-left: 22px;
  list-style: decimal;
}
.legal li + li {
  margin-top: 4px;
}
.legal p a,
.legal li a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}
.legal-foot {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.legal-foot a,
.legal-terms a,
.auth-terms a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-terms {
  align-self: center;
  text-align: center;
  font-size: 12px;
  line-height: 18px;
  color: var(--faint);
}

/* 공유 페이지(/r/<token>) — 결과 화면(rs-*)을 그대로 쓰고 다른 점만 */
.sh-how {
  margin: 8px 0 0 8px;
  font-size: 13px;
  color: var(--faint);
}
.sh-invite p {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--faint);
}
/* 보는 사람은 고칠 수 없어서 제목 줄에 버튼이 없다 — 높이를 결과 화면(버튼 44px)과 맞춘다 */
.sh-head {
  min-height: 44px;
}
.sh-none {
  font-weight: 500;
  color: var(--faint);
}
.sh-gone {
  padding: 120px 24px 0;
  text-align: center;
  font-size: 15px;
  color: var(--faint);
}
[data-page="result"] .bottom.sh-next {
  padding-left: 16px;
  padding-right: 16px;
}
[data-page="result"] .bottom.sh-next::before {
  background: linear-gradient(transparent, var(--rs-bg) 65%);
}

/* 저장: 제목 없이 로고 헤더 아래 바로 그리드(하단 탭이 위치를 알려 준다) */
.saved-grid {
  margin-top: 8px;
}

/* 외부 AI 전송 동의 창(iOS 앱) — 유리 시트. 무엇을·어디로 보내는지 두 줄, 버튼은 동의 안 함 / 동의하고 계속하기 */
.consent-sheet h3 {
  margin-top: 4px;
}
.consent-list {
  margin: 18px 0 14px;
  display: grid;
  gap: 12px;
}
.consent-list div {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px;
  font-size: 14px;
  line-height: 1.5;
}
.consent-list dt {
  color: var(--faint);
}
.consent-list b {
  font-weight: 700;
  margin-right: 4px;
}
.consent-error {
  min-height: 0;
  margin-top: 8px;
  font-size: 13px;
  color: #e5484d;
}
.consent-error:empty {
  display: none;
}
.consent-actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.consent-actions .consent-no {
  flex: 0 0 auto;
  height: 58px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: #555;
}
.consent-actions .cta {
  flex: 1;
}

/* 넓은 화면(860px 이상)에서 뷰어를 열면 화면을 둘로 나눈다(html.split, viewer.mjs·early.js) — 왼쪽은 보던 페이지 그대로
   (계속 스크롤하고 다른 카드를 누를 수 있다), 오른쪽 반은 뷰어. 휴대폰 폭에서는 지금처럼 뷰어가 화면을 덮는다.
   왼쪽 칸의 가운데(--cx)에 페이지 열·탭 바·페이지 시트를 두고, 뷰어에서 연 시트·알림은 오른쪽 칸 가운데에 둔다 */
@media (min-width: 860px) {
  /* auto 로는 미끄러지지 않아서, 가운데 자리를 값으로 둔다(열이 화면보다 좁을 때) */
  .app {
    margin-left: max(0px, calc(50% - var(--col) / 2));
    transition: margin-left 0.3s ease;
  }
}
/* 왼쪽 칸은 화면의 반 — 서비스 열이 그보다 넓으면 반에 맞춰 줄인다 */
html.split {
  --cx: 25%;
}
html.split .app,
html.split .bottom,
html.split .sheet,
html.split .find-sheet {
  max-width: min(var(--col), 50%);
}
html.split .app {
  margin-left: max(0px, calc(25% - var(--col) / 2));
}
html.split .bottom,
html.split .sheet,
html.split .find-sheet {
  left: var(--cx);
}
html.split .viewer {
  left: 50%;
  box-shadow: -1px 0 0 rgba(0, 0, 0, 0.08);
}
html.split .vlist {
  max-width: none;
}
html.split .vtop {
  left: 50%;
  width: 50%;
  max-width: none;
  transform: none;
}
html.split .viewer ~ .sheet,
html.split .toast {
  left: 75%;
}
/* 닫기 단추: 덮는 뷰어는 뒤로(‹), 나눈 칸의 뷰어는 닫기(×) */
.vtop .i-x {
  display: none;
}
html.split .vtop .i-back {
  display: none;
}
html.split .vtop .i-x {
  display: contents;
}
.vtop .i-x svg {
  width: 18px;
  height: 18px;
}

/* 결과·마이는 회색 바탕 + 흰 카드 — 넓은 화면의 바깥도 같은 회색으로 둬 열의 경계가 보이지 않게 */
body:has(> [data-page="result"], > [data-page="my"]) {
  background: #f2f2f7;
}

/* 앱 설치 권유 시트(app-install.mjs) — 앱 아이콘, 한 줄 제목·설명, 설치 버튼 */
.install-sheet {
  text-align: center;
}
.install-icon {
  display: block;
  width: 72px;
  height: 72px;
  margin: 6px auto 14px;
  border-radius: 17px;
  border: 1px solid var(--line);
}
.install-sheet h3 {
  word-break: keep-all;
}
.install-sheet .meta {
  margin-top: 6px;
  word-break: keep-all;
}
.install-sheet .install-go {
  margin-top: 22px;
}

/* 메인 임베드(시험): 섹션마다 두 게시물을 반 폭으로 나란히 — 인스타 화면은 원래 폭으로 그리고 줄인다(home.mjs fitHome) */
.ig-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 4px 16px 12px;
  align-items: start;
}
.ig-home {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: #f3f3f5;
  /* 사진 비율과 상관없이 모든 칸을 같은 높이로 — 원래 폭 326px 에서 프로필 줄 + 4:5 사진 + 아래 줄이 다 들어가는 높이.
     가로 사진처럼 짧은 글은 위아래 여백이 같게 가운데에 둔다 (viewer.mjs fitGridEmbed) */
  aspect-ratio: 326 / 650;
}
.ig-inner {
  position: relative;
  width: 326px;
  transform-origin: top left;
}
.ig-home .instagram-media {
  margin: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
}
.ig-home:has(iframe) {
  background: #fff;
}
/* 임베드가 높이 0 으로 시작해 영영 안 뜨지 않게. 가장 짧은 글보다 낮아야 진짜 높이가 그대로 반영된다 */
.ig-home iframe.instagram-media {
  min-height: 400px;
}
.ig-cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
/* 테스트 계정의 개발 모드 토글 — 약관 목록 위, 아래 목록 한 줄과 같은 크기 */
/* 개발 모드 스위치 — 계정 카드(로그인·내가 본 콘텐츠) 맨 아래 줄 */
.my-dev {
  padding: 0;
}
.my-dev label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  font-size: 15px;
}
.my-dev input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 51px;
  height: 31px;
  margin: 0;
  border-radius: 999px;
  background: var(--line);
  transition: background 0.2s ease;
  cursor: pointer;
}
.my-dev input::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease;
}
.my-dev input:checked {
  background: var(--pt);
}
.my-dev input:checked::after {
  transform: translateX(20px);
}

/* 내가 본 콘텐츠 — 마이에서 들어오는 하위 화면: 왼쪽 뒤로, 가운데 제목 */
.top.sub-top {
  position: sticky;
  justify-content: center;
}
.top.sub-top .back {
  position: absolute;
  left: 16px;
  bottom: 8px;
  margin-left: -10px;
}
/* 하위 화면 우측 상단 글자 버튼(내가 본 콘텐츠의 전체 삭제) */
.top.sub-top .sub-act {
  position: absolute;
  right: 8px;
  bottom: 8px;
  min-height: 40px;
  padding: 0 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sub);
}
.top.sub-top h1 {
  padding: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
