/* ---------- 결과 화면: 옆으로 넘기는 카드 일곱 장 ----------
   카드 틀(바탕 그림, 넘길 때 깊이감, 장마다 들어오는 차례)은 내손내운 결과 화면(content/insaeng/result.css)에서 옮겼습니다.
   밝은 미색 한지 화면입니다: 글은 먹색, 주 단추는 다홍. 색·글꼴·로고·단추·손 그림과 선은 theme.css에 있어 여기서 다시 정하지 않습니다. */

.r-body { overflow: hidden; overscroll-behavior: none; }
.r-body .app {
  --turn: 0.55s;   /* 한 장 넘기는 시간 */
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  font-family: var(--font-ui);
}

/* ---------- 위: 장 막대와 글씨 로고 ---------- */

.r-top {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0;
  padding-top: max(10px, env(safe-area-inset-top));
  pointer-events: none;
}
.bars { display: flex; gap: 5px; padding: 4px 18px 0; }
.bars i { position: relative; flex: 1; height: 3px; border-radius: 2px; overflow: hidden; background: rgba(43, 29, 18, 0.14); }
.bars i::after { content: ""; position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; transition: transform var(--turn) var(--ease-out); }
.bars i.on::after { transform: none; }
/* 로고만 눌려 홈페이지로 갑니다(머리 줄은 카드 넘기기를 막지 않게 눌리지 않음) */
.r-brand { display: flex; width: fit-content; align-items: center; gap: 4px; padding: 11px 20px 0; pointer-events: auto; -webkit-tap-highlight-color: transparent; }
.r-brand .logo { height: 20px; }

/* 카드 글을 서버에서 받지 못했을 때 한 줄 */
.r-fail { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; margin: 0; padding: 0 32px; text-align: center; color: var(--ink-2); font: 700 16px/1.6 var(--font-ui); word-break: keep-all; }
.r-fail > p { margin: 0; }
.r-fail > .cta { width: min(100%, 240px); margin-top: 20px; }   /* 결제를 확인하지 못했을 때 다시 확인 단추 */

/* ---------- 카드 일곱 장을 옆으로 나란히 ---------- */

/* 손가락이나 마우스로 넘기므로 글씨·그림이 잡히거나 길게 눌러 그림 메뉴가 뜨지 않게 합니다 */
.stage { position: absolute; inset: 0; overflow: hidden; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.track { display: flex; height: 100%; transition: transform var(--turn) var(--ease-out); will-change: transform; }
/* 끄는 동안은 손가락을 바로 따라가고, still은 움직이지 않고 건너뜁니다(주소로 바로 열 때) */
.stage.dragging .track, .stage.dragging .card::before, .stage.dragging .card::after,
.stage.still .track, .stage.still .card::before, .stage.still .card::after, .stage.still .bars i::after { transition: none; }

.card {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: calc(max(10px, env(safe-area-inset-top)) + 54px) 0 calc(max(10px, env(safe-area-inset-bottom)) + 40px);
  background: var(--paper);
  overflow: hidden;
  /* 덩어리 사이 간격: 높이 641px 휴대폰에서 16px쯤, 긴 휴대폰에서 22px까지 */
  --gap: clamp(12px, 2.5vh, 22px);
  --gap: clamp(12px, 2.5svh, 22px);
  /* 이 장의 운 색(굵은 글·칸). 글자로 쓸 때는 먹 쪽으로 눌러 읽기 쉽게 합니다 */
  --tone: var(--red);
  --tone-ink: color-mix(in srgb, var(--tone) 72%, var(--ink));
}
.c-love { --tone: var(--c-love); }
.c-work { --tone: var(--c-work); }
.c-money { --tone: var(--c-money); }

/* 바탕 한지와 위아래 옅은 한지 막. --off는 지금 보는 장에서 몇 장 떨어졌는지(result.js): 그림은 카드보다 느리게 움직여 깊이감이 나고,
   보는 동안에는 아주 천천히 다가옵니다 */
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(245, 238, 227, 0.55) 0%, rgba(245, 238, 227, 0) 24%, rgba(245, 238, 227, 0) 72%, rgba(245, 238, 227, 0.45) 100%),
    var(--bg, none) center / cover no-repeat;
  translate: calc(var(--off, 0) * -38%) 0;
  scale: 1.06;
  transition: translate var(--turn) var(--ease-out);
  animation: drift 28s ease-in-out infinite alternate paused;
  pointer-events: none;
}
.card.current::before { animation-play-state: running; }
@keyframes drift { from { scale: 1.06; } to { scale: 1.13; } }
/* 떠나는 장은 한지 색으로 바랩니다(--shade, 보는 장은 0) */
.card::after {
  content: "";
  position: absolute; inset: 0; z-index: 3;
  background: var(--paper);
  opacity: var(--shade, 0);
  transition: opacity var(--turn) var(--ease-out);
  pointer-events: none;
}

.card > * { position: relative; }
/* 긴 휴대폰: 그림이 다 커진 뒤 남는 자리는 맨 위와 맨 아래에 나눕니다(2~4장은 마지막 덩어리 아래, 다음 장 한 줄은 카드 바닥에 떠 있음) */
.card > :first-child { margin-top: auto; }
:is(.c-love, .c-work, .c-money) > :last-child:not(.next),
:is(.c-love, .c-work, .c-money) > :nth-last-child(2):has(+ .next) { margin-bottom: auto; }

/* ---------- 큰 제목 ---------- */

.title { flex: none; margin: 0 20px; text-align: center; font: 700 25px/1.3 var(--font-title); color: var(--ink); letter-spacing: -0.5px; word-break: keep-all; text-wrap: balance; }
.card > .title { align-self: center; max-width: 300px; }
/* 2~4장 큰 제목은 그 운의 색 */
.c-love .title, .c-work .title, .c-money .title { color: var(--tone-ink); }

.type-head { flex: none; position: relative; text-align: center; }
.kick { margin: 0 20px; font-size: 13px; font-weight: 800; letter-spacing: 0.3px; color: var(--ink-2); }
.type-head .title { margin-top: 4px; }

/* ---------- 손 그림(모양과 선 색은 theme.css) ---------- */

.card > .art { margin-top: var(--gap); }
/* 1장 손 그림은 남는 높이만큼 커집니다(카드 폭에 드는 3:4까지) */
.c-type > .art { max-height: calc((min(100vw, 480px) - 36px) * 4 / 3); }
/* 2~4장 이 장의 선을 가까이 보여 주는 창: 카드 폭을 다 쓰고 남는 높이만큼 커집니다(정사각형까지).
   짧은 화면에서는 더 납작해지고, 창 속 손은 실제 창 비율로 다시 맞춥니다(common.js handArt) */
.card > .art.lens { align-self: stretch; aspect-ratio: auto; margin-left: 18px; margin-right: 18px; max-height: calc(min(100vw, 480px) - 36px); }

/* ---------- 1장: 올해의 유형 공개 ---------- */

.type-head .nowrap { white-space: nowrap; }
.c-type .type-head .title { font-size: 28px; }
.stamp { display: inline-block; width: auto; height: 32px; margin-left: 6px; vertical-align: -4px; transform: rotate(-12deg); opacity: 0.92; }
.keys { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 20px 0; padding: 0; list-style: none; }
.keys li { padding: 4px 11px; border-radius: 999px; background: var(--red-soft); border: 1px solid rgba(179, 38, 46, 0.3); color: var(--red-2); font-size: 13px; font-weight: 800; }

/* 1장 넘김 안내(손 그림 아래): 장식 없는 글씨가 한 글자씩 뒤집힙니다(세 번 뒤 멈춤). 긴 휴대폰에서는 남는 자리
   가운데 쪽으로 올립니다 */
.reveal { padding-bottom: calc(max(10px, env(safe-area-inset-bottom)) + 16px); }
.reveal > .swipe-cta { margin-top: auto; top: calc(-1 * clamp(0px, (100vh - 700px) / 3, 40px)); }
.swipe-cta {
  flex: none; align-self: center;
  margin: 0; padding: 8px 18px; border: 0; background: none; cursor: pointer;
  font: 700 17px/1.2 var(--font-title); letter-spacing: -0.3px; color: var(--ink-2);
  -webkit-tap-highlight-color: transparent;
}
.swipe-cta .flip { display: inline-flex; perspective: 300px; }
.swipe-cta .flip span { display: inline-block; }
.swipe-cta .flip .sp { width: 0.28em; }

/* ---------- 2~4장: 작은 머리말과 큰 제목, 선 창, 기회·조심 두 칸, 올해 해 볼 것(세 장 같은 틀) ---------- */

.c-love .type-head .title, .c-work .type-head .title, .c-money .type-head .title { font-size: 25px; }
/* 기회(흰 칸)와 조심(그 운 색 칸). 칸 글은 짧은 문장이라 본문 글꼴로 두 줄까지 들어가게 하고, 글은 칸 가운데라
   한 줄 글과 두 줄 글이 나란히 놓여도 같아 보입니다 */
.face { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: calc(var(--gap) - 4px) 18px 0; }
.face .side { display: flex; flex-direction: column; justify-content: center; padding: 9px 10px 10px; border-radius: 14px; text-align: center; }
.face small { display: block; font-size: 11.5px; font-weight: 800; opacity: 0.9; }
.face b { display: block; margin-top: 3px; font: 800 14px/1.4 var(--font-ui); letter-spacing: -0.3px; word-break: keep-all; text-wrap: balance; color: var(--ink); }
.face .out { background: var(--card); border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); }
.face .out small { color: var(--ink-2); }
.face .in { background: color-mix(in srgb, var(--card) 86%, var(--tone)); border: 1px solid color-mix(in srgb, var(--tone) 45%, transparent); }
.face .in small { color: var(--tone-ink); }
/* 올해 해 볼 것 두 줄: 작은 머리 아래 하나씩 체크 */
.ticks { flex: none; align-self: center; display: grid; gap: 8px; margin: var(--gap) 16px auto; padding: 13px 20px 14px; border-radius: 18px; background: rgba(255, 250, 243, 0.92); box-shadow: var(--shadow-sm); border: 1px solid var(--rule); }
.ticks-h { margin: 0; font-size: 12px; font-weight: 800; color: var(--tone-ink); }
.ticks ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.ticks li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; line-height: 1.4; color: var(--ink); word-break: keep-all; }
.ticks .box { flex: none; width: 21px; height: 21px; border-radius: 6px; background: var(--tone); display: grid; place-items: center; }
.ticks .box svg { width: 14px; height: 14px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 1; }
/* 흰 칸(1장 올해의 날 상자) */
.work { flex: none; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin: calc(var(--gap) - 4px) 18px 0; }
.work.one { grid-auto-columns: minmax(0, 220px); justify-content: center; }
.panel { display: flex; flex-direction: column; align-items: center; padding: 9px 10px 10px; border-radius: 14px; background: var(--card); border: 1px solid color-mix(in srgb, var(--tone) 30%, transparent); box-shadow: var(--shadow-sm); text-align: center; }
.panel-h { flex: none; margin: 0 0 6px; font-size: 11.5px; font-weight: 800; color: var(--tone-ink); }
.panel-v { margin: auto 0; font: 700 17px/1.3 var(--font-title); letter-spacing: -0.3px; color: var(--ink); word-break: keep-all; }
/* 1장 올해의 날 상자: 흰 칸 하나에 작은 머리와 큰 날짜, 그 옆 D-day(해시태그와 같은 알약) */
.c-type > .day { margin-top: calc(var(--gap) - 2px); grid-auto-columns: auto; }
.day .panel { padding: 9px 16px 10px; }
.day-v { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 0; }
.day-v .panel-v { margin: 0; white-space: nowrap; }
.day-dd { flex: none; padding: 3px 9px; border-radius: 999px; background: var(--red-soft); border: 1px solid rgba(179, 38, 46, 0.3); color: var(--red-2); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
/* 결제 전 흐리게 가린 날(result.js dayBox): 상자와 알약은 그대로 두고 글자만 흐립니다. 흐린 글자는 진짜 날이 아닙니다 */
.blind { display: inline-block; filter: blur(4.5px); user-select: none; -webkit-user-select: none; }
/* 칸 안 조각은 칸이 들어온 뒤 하나씩 */
.live .face .out { animation: rise 0.55s var(--ease-out) var(--t) both; }
.live .face .in { animation: rise 0.55s var(--ease-out) calc(var(--t) + 260ms) both; }
.live .ticks-h { animation: rise 0.45s var(--ease-out) var(--t) both; }
.live .ticks li { animation: rise 0.45s var(--ease-out) calc(var(--t) + 140ms + var(--i) * 0.26s) both; }
.live .ticks .box { animation: pop 0.3s calc(var(--t) + 240ms + var(--i) * 0.26s) both; }
.live .ticks .box path { animation: draw 0.25s calc(var(--t) + 390ms + var(--i) * 0.26s) both; }

/* ---------- 각 장 아래 다음 장으로 이끄는 한 줄 ---------- */

.next {
  position: absolute; left: 0; right: 0;
  bottom: calc(max(10px, env(safe-area-inset-bottom)) + 10px);
  margin: 0;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 700;
}
.next .nudge { display: inline-block; font-style: normal; }
.next .blind { filter: blur(3px); }   /* 5장 아래 줄의 흐린 올해의 날: 작은 글씨라 6장 날 숫자(.ans .veil)만큼만 흐림 */
.current .next .nudge { animation: nudge 1.3s var(--ease-in-out) calc(var(--t, 0ms) + 1200ms) 3; }
@keyframes nudge { 0%, 100% { transform: none; } 50% { transform: translateX(5px); } }

/* ---------- 5장: 신년 손금 감정서 ---------- */

/* 화면에도 공유 그림(감정서 1080 × 1920) 한 장을 그대로 보여 줍니다 */
.card-thumb { position: relative; flex: none; aspect-ratio: 1080 / 1920; }
.card-thumb img { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 8px; opacity: 0; transition: opacity 0.4s ease; -webkit-touch-callout: default; }
.card-thumb.ready img { opacity: 1; }
/* 감정서 칸은 남는 자리만큼 커지되 그림이 다 커진 크기(폭 411px)까지만. 긴 휴대폰에서 남는 자리는 제목 위와 단추 아래로 나눕니다 */
.cert { flex: 1 1 0; min-height: 0; max-height: calc(min(100vw - 36px, 411px) * 1920 / 1080); display: flex; align-items: center; justify-content: center; margin: var(--gap) 18px 0; }
.cert .card-thumb { height: 100%; max-height: 560px; max-width: 100%; }
.btns { display: grid; gap: 6px; }
.btns button { height: 40px; border-radius: 10px; border: 0; font-size: 13.5px; font-weight: 800; cursor: pointer; transition: transform 0.18s var(--ease-out), filter 0.18s ease; }
.btns button:active { transform: scale(0.97); filter: brightness(0.94); }
.btns .a { background: var(--red); color: #fff; box-shadow: 0 6px 14px rgba(179, 38, 46, 0.24); }
.btns .b { background: var(--card); border: 1px solid rgba(43, 29, 18, 0.22); color: var(--ink); }
.c-cert > .btns { flex: none; align-self: center; grid-template-columns: 1.5fr 1fr; gap: 8px; width: calc(100% - 36px); max-width: 330px; margin-top: var(--gap); margin-bottom: auto; }
.c-cert > .btns button { height: 48px; border-radius: 12px; font-size: 15px; }
.c-cert > .btns > :only-child { grid-column: 1 / -1; }   /* 인스타 앱 안에서는 저장 단추 하나만 있어 줄 전체를 씁니다. */
/* 저장 단추 줄 아래 카톡으로 공유하기(site/kakao-share.js, 2026-10-26): 저장 단추 줄과 같은 너비로 붙이고, 그 아래 빈칸은 이 단추가 맡습니다. */
.c-cert > .btns:has(+ .kshare) { margin-bottom: 0; }
.c-cert > .kshare { max-width: 330px; margin: 8px 0 auto; }

/* 5장 감정서는 칸에 드는 가장 큰 크기로(폭 411px까지). 처음 볼 때 떠오르며 인장이 쾅 찍히는 움직임은 site/cert-frame.js가 붙입니다. */
@supports (width: 1cqw) {
  .cert { container-type: size; }
  .cert .card-thumb { width: min(100cqw, 100cqh * 1080 / 1920, 411px); height: auto; max-height: none; }
}

/* ---------- 6장: 결제(내손내운 결과 6장과 같은 틀) ----------
   질문 여섯을 두 칸씩 세 줄에 두고(고른 칸은 다홍) 그 아래 작은 대화: 고른 질문과 흐리게 가린 캐릭터 답 위 자물쇠. 맨 아래 흰 결제 판에
   값 비교·값 단추·환불 안내·사업자 정보 */
.c-pay { padding-bottom: calc(max(10px, env(safe-area-inset-bottom)) + 4px); }
.c-pay > .title { font-size: 28px; max-width: none; }
/* 제목은 두 단: 윗줄 작게, 아랫줄 크게. 이름은 강조색, **…** 낱말에는 3,900원과 같은 노란 형광펜(result.js payTitle, 인생손금 결과 6장과 같음) */
.c-pay > .title { line-height: 1.25; }
.c-pay > .title .tl1 { display: block; font-size: 0.8em; }
.c-pay > .title .tl2 { display: block; margin-top: 2px; font-size: 1.2em; }
.c-pay > .title .nm { color: var(--red); }
.c-pay > .title .hl { position: relative; z-index: 0; }
.c-pay > .title .hl::before { content: ''; position: absolute; z-index: -1; left: -4px; right: -4px; bottom: 0.15em; height: 42%; border-radius: 6px 3px 7px 4px; background: var(--me, #fde68a); transform: rotate(-2deg) skewX(-14deg); }
.qs { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: var(--gap) 18px 0; }
.qs button { min-height: 50px; padding: 10px; border-radius: 14px; border: 1px solid var(--rule); background: var(--card); color: var(--ink); font: 800 13px/1.35 var(--font-ui); text-align: left; word-break: keep-all; cursor: pointer; box-shadow: 0 2px 6px rgba(74, 46, 24, 0.06); -webkit-tap-highlight-color: transparent; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.18s var(--ease-out); }
.qs button::before { content: "Q"; margin-right: 5px; font: 700 14px var(--font-title); color: var(--red); }
.qs button[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.qs button[aria-pressed="true"]::before { color: #ffd6cf; }
.qs button:active { transform: scale(0.97); }
.live .qs button { animation: rise 0.5s var(--ease-out) calc(var(--t, 0ms) + var(--i) * 70ms) both; }
.ans { flex: none; display: flex; flex-direction: column; gap: 9px; margin: 14px 18px 0; padding: 14px 12px 12px; border-radius: 18px; background: rgba(255, 250, 243, 0.62); border: 1px solid var(--rule); }
.ans .q { align-self: flex-end; max-width: 80%; margin: 0; padding: 9px 13px; border-radius: 16px 16px 4px 16px; background: var(--red); color: #fff; font: 800 14px/1.35 var(--font-ui); word-break: keep-all; animation: msg-in 0.35s var(--ease-out) both; }
.ans .a { align-self: flex-start; display: flex; align-items: flex-end; gap: 7px; max-width: 94%; animation: msg-in 0.35s var(--ease-out) 0.1s both; }
/* 프로필: 대화 화면의 캐릭터 얼굴(talk.css .chat .t-face)과 같은 자르기 */
.ans .av { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--paper-2) 50% 6% / auto 240% no-repeat; border: 1.5px solid var(--gold); }
.ans .b { display: grid; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--card); border: 1px solid var(--rule); color: var(--ink); font: 700 13.5px/1.5 var(--font-ui); word-break: keep-all; overflow: hidden; transform-origin: 0 100%; }
.ans .tx, .ans .lkw { grid-area: 1 / 1; }   /* 자물쇠가 흐린 답 위에 얹히고 말풍선은 둘 가운데 넓은 쪽에 맞춥니다 */
.ans .tx { filter: blur(4.5px); }
.ans .lkw { display: grid; place-items: center; color: var(--red-2); }
.ans .lkw span { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 250, 243, 0.96); box-shadow: 0 2px 8px rgba(74, 46, 24, 0.18); font-size: 12px; font-weight: 800; white-space: nowrap; }
.ans .lkw svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ans .dots { display: inline-flex; gap: 4px; padding: 6px 2px; }
.ans .dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); animation: hop 1.1s ease-in-out infinite; }
.ans .dots i:nth-child(2) { animation-delay: 0.15s; }
.ans .dots i:nth-child(3) { animation-delay: 0.3s; }
.ans .cnt { align-self: center; margin: 2px 0 0; font-size: 12px; font-weight: 800; color: var(--ink-2); }
/* 답이 오면 쓰는 중 말풍선이 꼬리에서부터 답 크기로 커지고(result.js pickQuestion) 흐린 답이 더 흐린 데서 나온 뒤 자물쇠가 뜹니다 */
.ans .b.grown .tx { animation: unblur 0.35s var(--ease-out) both; }
.ans .b.grown .lkw span { animation: lock-in 0.3s var(--ease-out) 0.12s both; }
/* 결제 전 날 답(result.js datedAnswer): 자물쇠 줄이 말풍선 맨 위, 그 아래 답은 가리지 않고 가린 날 숫자 자리만 흐리게.
   가린 자리가 든 낱말은 그 안에서 줄이 바뀌지 않습니다 */
.ans .b.dated { display: flex; flex-direction: column; gap: 6px; }
.ans .b.dated .lkw { grid-area: auto; }
.ans .dated .tx { filter: none; }
.ans .veil { display: inline-block; filter: blur(3px); }
.ans .nw { white-space: nowrap; }
.ans .b.grown.dated .tx { animation: fade-in 0.35s ease both; }
/* 흐름 질문의 2027년 달력: 머리 한 줄, 열두 달 칸(여섯 칸씩 두 줄)에 운 색 점과 흐린 날 숫자(올해의 날만 또렷), 맨 아래 범례.
   조심할 날은 대화 그래프의 조심할 달과 같은 빈 다홍 점입니다 */
.ans .a:has(.cal) { width: 94%; }
.ans .a:has(.cal) .b { flex: 1 1 auto; min-width: 0; padding: 10px 11px 9px; }
.cal { --num: "Paperlogy", var(--font-ui); }
.cal-h { margin: 0 0 5px; font-size: 12.5px; font-weight: 800; line-height: 1.3; color: var(--red); text-align: center; }
.cal-g { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: 4px; }
.cal-m { min-width: 0; padding: 3px 1px 4px; border-radius: 8px; background: var(--paper); text-align: center; }
.cal-mn { display: block; font-family: var(--num); font-weight: 600; font-size: 11px; line-height: 1.2; color: var(--ink-3); white-space: nowrap; }
.cal-m.has .cal-mn { color: var(--ink-2); font-weight: 700; }
.cal-m ul { display: grid; justify-items: center; gap: 0; margin: 2px 0 0; padding: 0; list-style: none; }
.cal-d { display: flex; align-items: center; gap: 3px; font-family: var(--num); font-weight: 700; font-size: 11px; line-height: 1.15; color: var(--ink); }
.cal-d span { display: inline-block; min-width: 1.2em; text-align: left; filter: blur(3px); }
.cal i, .cal-lg i { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.cal .f-love { --c: var(--c-love); }
.cal .f-work { --c: var(--c-work); }
.cal .f-money { --c: var(--c-money); }
.cal .f-avoid { --c: var(--red); }
.cal .f-avoid i { background: var(--card); box-shadow: inset 0 0 0 1.6px currentColor; color: var(--red); }
.cal-lg { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; margin-top: 6px; }
.cal-lg span { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; line-height: 1.3; color: var(--c); white-space: nowrap; }
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes hop { 0%, 60%, 100% { transform: none; opacity: 0.45; } 30% { transform: translateY(-5px); opacity: 1; } }
@keyframes unblur { from { opacity: 0; filter: blur(12px); } }
@keyframes lock-in { from { opacity: 0; transform: scale(0.94); } }
/* 장 아래 흰 결제 판(result.js paySheet): 값 비교·결제 단추·환불 안내·사업자 줄을 한 판에 모아 위의 질문·대화와 나눕니다(인생손금 결과 6장과
   같음, 사용자 2026-10-31). 판은 장 바닥(아래 여백 자리)까지 내려가 닿고, 남는 높이는 제목 위와 판 위에 반씩 둡니다. */
.c-pay > .ans { margin-bottom: 10px; }
.c-pay > .pay-sheet { flex: none; display: flex; flex-direction: column; margin-top: auto; margin-bottom: calc(-1 * (max(10px, env(safe-area-inset-bottom)) + 4px)); padding: 16px 18px calc(max(10px, env(safe-area-inset-bottom)) + 4px); border-radius: 24px 24px 0 0; background: #fff; box-shadow: 0 -10px 24px -16px rgba(60, 40, 20, 0.3); }
@media (max-height: 720px) { .c-pay > .ans { margin-bottom: 4px; } .c-pay > .pay-sheet { padding-top: 8px; } }
@media (max-height: 680px) { .c-pay > .pay-sheet { padding-top: 6px; } }
@media (max-height: 600px) { .c-pay > .pay-sheet { padding-top: 5px; } }
/* 결제 전 값 비교: 오프라인 칸(연한 회색, 값에 강조색 줄)과 내손내운 칸(흰 바탕·강조색 테두리, 3,900원에 노란 형광펜) 사이에 강조색 붓 화살표 */
.c-pay .pay-sheet > .price-compare { --pv: 7px; --fs: 12.5px; --p1: 16px; --p2: 25px; position: relative; flex: none; display: flex; align-items: center; gap: 26px; font: 400 var(--fs)/1.3 var(--font-ui); word-break: keep-all; }
.c-pay .price-row { position: relative; flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 0; padding: var(--pv) 6px; border-radius: 14px; color: var(--ink); text-align: center; }
.c-pay .price-row span { white-space: nowrap; }
.c-pay .price-row span:first-child { font-weight: 700; }
.c-pay .price-row span:last-child { position: relative; font-size: var(--p1); font-weight: 800; line-height: 1.2; }
.c-pay .price-row.own span:first-child { font-weight: 800; }
.c-pay .price-row.own span:last-child { font-size: var(--p2); font-weight: 900; line-height: 1.05; letter-spacing: -0.02em; }
.c-pay .pay-sheet > .price-compare + .cta { margin-top: 12px; }
.c-pay .price-row:not(.own) { background: color-mix(in srgb, var(--ink) 8%, var(--paper)); }
.c-pay .price-row:not(.own) span:last-child { color: color-mix(in srgb, var(--ink) 75%, var(--paper)); text-decoration-line: line-through; text-decoration-color: var(--red); text-decoration-thickness: 2.5px; }
.c-pay .price-row.own { z-index: 1; border: 2.5px solid var(--red); background: #fff; }
.c-pay .price-row.own span:last-child { color: var(--red); font-family: var(--font-title); font-weight: 700; }
.c-pay .price-row.own span:last-child::before { content: ''; position: absolute; z-index: -1; left: -7px; right: -7px; bottom: 1px; height: 52%; border-radius: 6px 3px 7px 4px; background: var(--me, #fde68a); transform: rotate(-2deg) skewX(-14deg); }
.c-pay .price-row.own::before { content: ''; position: absolute; top: 50%; left: -28px; width: 26px; height: 19px; margin-top: -10px; background: var(--red); -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2028%2020%27%3E%3Cpath%20d%3D%27M1%2010.8C7%209.6%2012%208.9%2017.5%208.6L15.8%203.2%2027%2010.2%2015.8%2017%2017.5%2012C12%2012.2%207%2012.6%201%2012.8z%27%20fill%3D%27black%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20viewBox%3D%270%200%2028%2020%27%3E%3Cpath%20d%3D%27M1%2010.8C7%209.6%2012%208.9%2017.5%208.6L15.8%203.2%2027%2010.2%2015.8%2017%2017.5%2012C12%2012.2%207%2012.6%201%2012.8z%27%20fill%3D%27black%27%2F%3E%3C%2Fsvg%3E") center / contain no-repeat; }
@media (max-height: 720px) { .c-pay .pay-sheet > .price-compare { --pv: 6px; --fs: 12px; --p1: 15px; --p2: 22px; } .c-pay .pay-sheet > .price-compare + .cta { margin-top: 7px; } }
@media (max-height: 600px) { .c-pay .pay-sheet > .price-compare { --pv: 4px; --p2: 19px; } .c-pay .pay-sheet > .price-compare + .cta { margin-top: 6px; } }
@media (max-width: 359px) { .c-pay .pay-sheet > .price-compare { --fs: 12px; --p1: 14px; } }
.c-pay .pay-sheet > .cta { flex: none; margin-top: 0; }
.c-pay .pay-sheet > .cta:disabled { opacity: 0.7; }
.c-pay .cta.shine::after { animation-play-state: paused; }
.c-pay.current .cta.shine::after { animation-play-state: running; }
/* 결제 단추 움직임: 숨 쉬듯 커졌다 작아지고 붉은 빛 고리가 퍼지며 빛이 자주 지나갑니다(지인 피드백 '결제 단추가 잘 안 보임', 사용자 2026-10-24 G안).
   보고 있는 장에서만 움직이고, 결제창을 여는 동안은 멈춥니다. */
.c-pay .pay-sheet > .cta[data-act="pay"] { animation: pay-pulse 1.6s ease-in-out infinite, pay-ring 1.6s ease-out infinite; }
.c-pay .pay-sheet > .cta[data-act="pay"]::after { background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.45) 50%, transparent 65%); animation: pay-sheen 3.2s ease-in-out 0.4s infinite; }
.c-pay:not(.current) .pay-sheet > .cta[data-act="pay"], .c-pay:not(.current) .pay-sheet > .cta[data-act="pay"]::after, .c-pay .pay-sheet > .cta[data-act="pay"]:disabled, .c-pay .pay-sheet > .cta[data-act="pay"]:disabled::after { animation-play-state: paused; }
@keyframes pay-pulse { 50% { scale: 1.04; } }
@keyframes pay-ring { from { box-shadow: 0 6px 16px rgba(179, 38, 46, 0.28), 0 0 0 0 rgba(179, 38, 46, 0.55); } to { box-shadow: 0 6px 16px rgba(179, 38, 46, 0.28), 0 0 0 14px rgba(179, 38, 46, 0); } }
@keyframes pay-sheen { 0% { translate: -120% 0; } 30%, 100% { translate: 120% 0; } }
/* 값 단추 아래: 환불 안내 한 줄(환불 규정 링크) */
.pay-note { flex: none; margin: 8px 0 0; text-align: center; color: var(--ink-2); font-size: 12px; word-break: keep-all; }
.pay-note a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* 맨 아래 사업자 정보(작은 글씨) */
.c-pay .pay-sheet > .biz { flex: none; margin: 8px 0 0; text-align: center; color: var(--ink-3); font-size: 9.5px; line-height: 1.4; word-break: keep-all; }
.c-pay .pay-sheet > .biz span { white-space: nowrap; }   /* 항목 하나는 중간에서 줄이 바뀌지 않음(070-8098-/8971) */

/* 알림 한 줄(결제를 확인하지 못했을 때 등). 결제 단추 바로 위에 뜹니다(result.js toast) */
.r-toast {
  position: absolute; z-index: 9; left: 50%; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 64px);
  transform: translate(-50%, 12px); max-width: calc(100% - 40px); padding: 10px 16px; border-radius: 999px;
  background: rgba(43, 29, 18, 0.92); color: #fff;
  font-size: 14px; font-weight: 700; text-align: center; word-break: keep-all;
  box-shadow: var(--shadow-sm);
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.r-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 결제 장 안내 줄 ---------- */

.end-sub { flex: none; margin: 8px 24px 0; text-align: center; font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--ink-2); word-break: keep-all; }

/* ---------- 감정서 크게 보기(길게 눌러 저장) ---------- */

.viewer {
  position: absolute; z-index: 8; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: calc(max(10px, env(safe-area-inset-top)) + 50px) 20px calc(max(10px, env(safe-area-inset-bottom)) + 14px);
  background: rgba(245, 238, 227, 0.97);
  opacity: 0; transition: opacity 0.26s ease;
}
.viewer.open { opacity: 1; }
.viewer:not(.open) { pointer-events: none; }
.viewer img { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100% - 50px); border-radius: 6px; box-shadow: var(--shadow); transform: translateY(18px) scale(0.94); transition: transform 0.5s var(--ease-out); -webkit-user-select: none; user-select: none; -webkit-touch-callout: default; }
.viewer.open img { transform: none; }
.viewer-note { flex: none; margin: 0; font: 700 14px var(--font-ui); color: var(--ink); text-align: center; }
.viewer-x { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 2px); right: 12px; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: rgba(43, 29, 18, 0.08); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.viewer-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 장마다 처음 볼 때 한 번 들어오는 움직임(.live) ----------
   1장은 따로(손바닥에 빛이 지나가며 선이 그려진 뒤 올해의 유형이 도장처럼 찍힘). 다른 장은 읽는 차례대로 들어옵니다
   (result.js가 덩어리마다 시작 시각 --t를 줌): 큰 제목이 흐림에서 떠오르고, 창이 이 장의 선 쪽으로 다가가며 선이 그려지고,
   칸이 들어옵니다. 선 그리기(draw)와 창 다가가기(push-in)는 theme.css에 있습니다. */
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { 0% { opacity: 0; transform: scale(0.6); } 70% { transform: scale(1.08); } 100% { opacity: 1; transform: scale(1); } }
@keyframes title-in { from { opacity: 0; transform: translateY(12px); filter: blur(6px); } }
@keyframes pic-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes stamp-title { 0% { opacity: 0; transform: scale(1.6); filter: blur(6px); } 60% { opacity: 1; transform: scale(0.96); filter: blur(0); } 100% { transform: scale(1); } }
@keyframes scan { 0% { opacity: 0; background-position: 0 100%; } 15%, 80% { opacity: 1; } 100% { opacity: 0; background-position: 0 0; } }
@keyframes flip-letter {
  0% { transform: rotateY(0); color: var(--ink-2); animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  12% { color: var(--red); }
  24%, 100% { transform: rotateY(-360deg); color: var(--ink-2); }
}
@keyframes stamp-seal { 0% { opacity: 0; transform: rotate(-12deg) scale(2.4); } 70% { opacity: 1; transform: rotate(-12deg) scale(0.92); } 100% { opacity: 0.92; transform: rotate(-12deg) scale(1); } }

/* 아직 안 본 장은 들어올 차례를 기다립니다(끌 때 가장자리에서만 보임) */
.card:not(.live) .rv { opacity: 0; }
.live .rv-title { animation: title-in 0.75s var(--ease-out) var(--t) both; }
.live .rv-pic { animation: pic-in 0.85s var(--ease-out) var(--t) both; }
.live .rv-box { animation: rise 0.6s var(--ease-out) var(--t) both; }
.live .rv-group { animation: fade-in 1ms var(--t) both; }
.live .rv-fade { animation: fade-in 0.6s ease var(--t) both; }

/* 창이 손 전체에서 이 장의 선 쪽으로 다가가고, 자리 잡으면 이 장의 선이 그려집니다 */
.live .art.lens .art-z { animation: push-in 1.3s var(--ease-out) calc(var(--t, 0ms) + 80ms) both; }
.live:not(.reveal) .art.draw .l-gold path, .live:not(.reveal) .art.draw .l-pink path { animation: draw 1s var(--ease-in-out) calc(var(--t, 0ms) + 360ms) both; }

/* 1장: 손바닥에 빛 띠가 지나가는 동안(손이 있는 곳만) 읽은 선이 그려지고, 유형 이름이 도장처럼 찍힙니다 */
.reveal .art.draw .art-in::after {
  content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 40%, rgba(255, 232, 170, 0.6) 50%, transparent 60%) 0 100% / 100% 250% no-repeat;
  -webkit-mask: url(assets/hand-art.webp) center / 100% 100% no-repeat; mask: url(assets/hand-art.webp) center / 100% 100% no-repeat;
}
.reveal .art.draw .art-in.mirror::after { -webkit-mask-image: url(assets/hand-art-r.webp); mask-image: url(assets/hand-art-r.webp); }
.reveal.live .art.draw .art-in::after { animation: scan 0.8s ease-in-out both; }
.reveal.live .art.draw .art-in path { animation: draw 0.7s 0.25s var(--ease-in-out) both; }
.reveal.live .type-head .kick { animation: fade-in 0.35s 0.95s both; }
.reveal.live .type-head .title { animation: stamp-title 0.45s 1.05s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.reveal.live .type-head .stamp { animation: stamp-seal 0.35s 1.35s ease-out both; }
.reveal.live .type-head .keys li { animation: pop 0.3s calc(1.45s + var(--i) * 0.08s) both; }
.reveal.live > .day { animation: rise 0.4s 1.6s both; }
.reveal.live > .swipe-cta { animation: fade-in 0.5s 1.85s both; }
.reveal.live .swipe-cta .flip span { animation: flip-letter 2.6s calc(2.5s + var(--i) * 0.055s) 3 both; }

/* 짧은 휴대폰(예: 아이폰 SE): 글씨와 칸을 줄여 손 그림 자리를 남깁니다 */
@media (max-height: 720px) {
  .title { font-size: 22px; }
  .c-type .type-head .title { font-size: 25px; }
  .keys { margin-top: 8px; }
  .swipe-cta { padding: 6px 16px; font-size: 16px; }
  .c-love .type-head .title, .c-work .type-head .title, .c-money .type-head .title { font-size: 22px; }
  .face b { font-size: 13px; }
  .ticks { padding: 11px 16px 12px; }
  .ticks ul { gap: 7px; }
  .ticks li { font-size: 13.5px; }
  .panel-v { font-size: 15.5px; }
}
/* 아주 짧은 화면(예: 사파리 안의 아이폰 SE): 간격을 더 줄여 모든 장이 들어가게 합니다 */
@media (max-height: 600px) {
  .card { --gap: 9px; }
  .face .side { padding: 7px 8px 8px; }
}

/* 6장(결제)이 짧은 휴대폰에서도 맨 아래 사업자 줄까지 들어가게 제목·질문 칸·대화 칸을 줄입니다(내손내운 결과 6장과 같음) */
@media (max-height: 720px) {
  .c-pay > .title { font-size: 24px; }
  .c-pay .ans .cnt { display: none; }
  .c-pay .pay-sheet > .biz { margin-top: 6px; font-size: 9px; }
}
@media (max-height: 680px) {
  .qs { gap: 6px; }
  .qs button { min-height: 40px; padding: 7px 8px; font-size: 12.5px; }
  .ans { gap: 6px; margin-top: 10px; padding: 10px; }
  .ans .q { padding: 8px 12px; font-size: 13px; }
  .ans .b { padding: 8px 12px; font-size: 12.5px; }
}
@media (max-height: 600px) {
  .c-pay > .title { font-size: 22px; }
  .c-pay .end-sub { margin-top: 4px; font-size: 13px; }
  .c-pay .pay-sheet > .cta { height: 44px; }
  .pay-note { margin-top: 6px; }
}
/* 그래도 결제 전 6장이 넘치면(날 답·두 줄 질문) result.js fitPay가 덜 아까운 것부터 한 단계씩 줄입니다(뒤 단계는 앞 단계와 함께 붙음).
   1 짧은 휴대폰 크기(위 720·680과 같은 값), 2 대화 칸의 내 질문 말풍선(위 질문 칸에 이미 다홍으로 보임), 3 제목 아래 안내,
   4 달력 칸의 흐린 날 숫자(달마다 점만 한 줄, 올해의 날 숫자는 그대로), 5 글씨·간격 더 작게,
   6 캐릭터 얼굴(말풍선을 넓혀 줄 수를 줄임)과 제목 조금 더 작게 */
.c-pay.fit1 > .title { font-size: 24px; }
.c-pay.fit1 .ans .cnt { display: none; }
.c-pay.fit1 .pay-sheet > .biz { margin-top: 6px; font-size: 9px; }
.c-pay.fit1 .qs { gap: 6px; }
.c-pay.fit1 .qs button { min-height: 40px; padding: 7px 8px; font-size: 12.5px; }
.c-pay.fit1 .ans { gap: 6px; margin-top: 10px; padding: 10px; }
.c-pay.fit1 .ans .q { padding: 8px 12px; font-size: 13px; }
.c-pay.fit1 .ans .b { padding: 8px 12px; font-size: 12.5px; }
.c-pay.fit2 .ans .q { display: none; }
.c-pay.fit3 .end-sub { display: none; }
.c-pay.fit4 .cal-g { grid-auto-rows: auto; }
.c-pay.fit4 .cal-m ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 1px 3px; }
.c-pay.fit4 .cal-d { gap: 2px; }
.c-pay.fit4 .cal-d span { display: none; }
.c-pay.fit5 > .title { font-size: 21px; }
.c-pay.fit5 .qs { gap: 5px; }
.c-pay.fit5 .qs button { min-height: 36px; padding: 6px 8px; font-size: 12px; }
.c-pay.fit5 .ans { gap: 5px; margin-top: 8px; padding: 8px; }
.c-pay.fit5 .ans .b { padding: 7px 10px; }
.c-pay.fit5 .ans .b.dated { gap: 4px; }
.c-pay.fit5 .cal-h { margin-bottom: 3px; }
.c-pay.fit5 .cal-lg { margin-top: 4px; }
.c-pay.fit5 .pay-sheet > .cta { height: 44px; }
.c-pay.fit5 .pay-note { margin-top: 5px; }
.c-pay.fit5 .pay-sheet > .biz { margin-top: 4px; }
.c-pay.fit6 > .title { font-size: 20px; }
.c-pay.fit6 .ans .av { display: none; }
.c-pay.fit6 .ans .a, .c-pay.fit6 .ans .a:has(.cal) { width: 100%; max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
  .track, .bars i::after, .card::before, .card::after, .viewer, .viewer img, .r-toast { transition: none !important; }
  .card::before { animation: none !important; }
  .live, .live *, .live *::after, .current *, .current *::after { animation: none !important; }
}
