/* 사고 보는 흐름 (/start/, /report/) — src/구매앱.mjs · src/보기앱.mjs */
.구 { min-height: 100dvh; position: relative; }
.구-배경 { position: fixed; inset: 0; background: #0c0c0f var(--구그림, url(/art/poster-saju.jpg)) center top / cover no-repeat; }
.구-배경::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 45%, rgba(8, 8, 12, .92) 82%); }
.구-창 { position: fixed; left: 12px; right: 12px; bottom: max(16px, env(safe-area-inset-bottom)); max-width: 520px; margin: 0 auto;
  background: rgba(250, 246, 236, .96); color: #2a2320; border: 2px solid #c9a96a; border-radius: 18px; padding: 18px 18px 16px; box-shadow: 0 8px 30px rgba(0, 0, 0, .45); }
.구-말 { font-family: 'Song Myung', serif; font-size: 1.12rem; line-height: 1.6; min-height: 3.2em; margin: 0 0 10px; }
.구-줄 { display: flex; gap: 8px; }
.구-줄 input, .구-줄 select { flex: 1; min-width: 0; font-size: 1.05rem; padding: 12px; border: 1px solid #c9b48a; border-radius: 10px; background: #fff; color: #222; }
.구-줄 button, .구-고름 button { padding: 12px 16px; border: 0; border-radius: 10px; background: #2a2320; color: #fff; font-size: 1rem; }
.구-줄 button:disabled { opacity: .4; }
.구-고름 { display: flex; gap: 8px; } .구-고름 button { flex: 1; }
.구-가름 { display: flex; gap: 6px; align-items: center; margin-bottom: 8px; }
.구-가름 button { padding: 6px 12px; border-radius: 999px; border: 1px solid #c9b48a; background: transparent; color: #2a2320; }
.구-가름 button[aria-pressed="true"] { background: #2a2320; color: #fff; }
.구-윤 { font-size: .9rem; margin-left: 4px; }
.구-보조 { margin-top: 10px; background: none; border: 0; color: #7a6a5a; text-decoration: underline; font-size: .95rem; }
.구-틀림 { color: #b3261e; margin: 6px 0 0; font-size: .9rem; }
body.구-맛보기중 .구 { padding-bottom: 96px; }
.구-붙음 { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(8, 8, 12, .95) 70%, transparent); z-index: 20; }
.구-큰단추 { display: block; width: 100%; max-width: 520px; margin: 0 auto; padding: 16px; border: 0; border-radius: 14px; background: #e8c27a; color: #241c12; font-size: 1.08rem; font-weight: 700; text-align: center; text-decoration: none; }
.구-큰단추:disabled { opacity: .6; }
.구-값창 { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.구-값판 { position: relative; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: #fbf8f2; color: #222; border-radius: 20px 20px 0 0; padding: 22px 16px max(18px, env(safe-area-inset-bottom)); }
.구-값판 h2 { margin: 0 0 10px; font-size: 1.2rem; } .구-값판 h3 { margin: 18px 0 8px; font-size: 1rem; }
.구-닫기 { position: absolute; right: 12px; top: 10px; background: none; border: 0; font-size: 1.6rem; color: #555; }
.구-특가 { background: #fff2dc; border-radius: 10px; padding: 10px 12px; font-size: .92rem; margin: 0 0 12px; } .구-특가 span { color: #8a6d3b; font-size: .85rem; }
.구-값줄 { display: flex; align-items: center; gap: 10px; border: 1.5px solid #e2dccf; border-radius: 14px; padding: 14px 12px; margin-bottom: 10px; background: #fff; }
.구-값줄:has(input:checked) { border-color: #e2336b; }
.구-값줄 input { accent-color: #e2336b; }
.구-값이름 { flex: 1; font-weight: 600; } .구-값이름 em { font-style: normal; font-size: .75rem; color: #e2336b; background: #fde6ee; border-radius: 6px; padding: 2px 6px; margin-right: 6px; }
.구-값값 { text-align: right; white-space: nowrap; } .구-값값 s { color: #999; font-size: .85rem; } .구-할인 { color: #e2336b; font-size: .9rem; }
.구-낱개 summary { cursor: pointer; color: #555; margin: 4px 0 10px; }
.구-수단 { display: grid; grid-template-columns: 1fr; gap: 8px; } .구-값판 input[type=radio], .구-값판 input[type=checkbox] { accent-color: #e2336b; width: 18px; height: 18px; }
.구-수단 label { border: 1px solid #e2dccf; border-radius: 10px; padding: 10px; background: #fff; }
#구메일 { background: #fff; color: #222; width: 100%; box-sizing: border-box; font-size: 1rem; padding: 12px; border: 1px solid #d8d0c0; border-radius: 10px; }
.구-동의 { display: block; font-size: .85rem; line-height: 1.5; margin-top: 8px; color: #444; }
.구-환불 { font-size: .8rem; color: #777; margin: 14px 0 10px; }
.보기-링크 { background: #fff2dc; color: #3a2a12; border-radius: 12px; padding: 12px; margin: 12px 0; font-size: .92rem; }
.보기-링크 button { margin-left: 6px; padding: 6px 10px; border-radius: 8px; border: 0; background: #3a2a12; color: #fff; }
.보기-목록 { padding-left: 18px; line-height: 2; }
.구-이전 { margin-top: 10px; margin-right: 12px; background: none; border: 0; color: #7a6a5a; font-size: .92rem; }
.구-고름 button[aria-pressed="true"] { outline: 3px solid #e8c27a; }
.구-확인 { list-style: none; padding: 0; margin: 0 0 12px; }
.구-확인 button { display: flex; width: 100%; align-items: center; gap: 8px; padding: 10px 4px; background: none; border: 0; border-bottom: 1px solid #e6dcc8; color: #2a2320; font-size: 1rem; text-align: left; }
.구-확인 span { width: 84px; color: #7a6a5a; font-size: .9rem; } .구-확인 b { flex: 1; } .구-확인 em { font-style: normal; font-size: .82rem; color: #a0784a; }
/* 결제하기 — 한 화면 전체 (대표 2026-11-22 타이트사주 결제 화면처럼) */
body.구-결제중 { overflow: hidden; }
.구-결제 { position: fixed; inset: 0; z-index: 60; background: #f4f4f5; color: #18181b; overflow-y: auto; padding-bottom: 150px; }
.구-결제머리 { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: center; height: 56px; background: #fff; }
.구-결제머리 h2 { margin: 0; font-size: 1.08rem; font-weight: 700; }
.구-결제머리 button { position: absolute; left: 6px; top: 4px; width: 48px; height: 48px; background: none; border: 0; font-size: 2rem; line-height: 1; color: #18181b; }
.구-결제그림 { height: 150px; background: #2a2320 var(--구그림, url(/art/poster-saju.jpg)) center 22% / cover no-repeat; display: flex; flex-direction: column; justify-content: center; padding: 0 22px; color: #fff; text-shadow: 0 2px 10px rgba(0, 0, 0, .7); }
.구-결제그림 span { font-size: .85rem; opacity: .9; } .구-결제그림 b { font-family: 'Song Myung', serif; font-size: 2.2rem; font-weight: 400; }
.구-결제몸 { background: #fff; padding: 18px 16px 8px; }
.구-결제칸 { margin-top: 10px; padding-bottom: 18px; }
.구-결제 .구-특가 { background: #fff1f5; color: #b0174a; border-radius: 10px; padding: 10px 12px; font-size: .9rem; margin: 0 0 12px; }
.구-결제 .구-값줄 { display: flex; align-items: center; gap: 10px; border: 1.5px solid #e4e4e7; border-radius: 16px; padding: 16px 16px; margin-bottom: 12px; background: #fff; cursor: pointer; }
.구-결제 .구-값줄:has(input:checked) { border-color: #ff2c6d; }
.구-결제 .구-값줄 > input { position: absolute; opacity: 0; pointer-events: none; }
.구-값왼 { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.구-결제 .구-값이름 { font-size: 1.02rem; font-weight: 700; color: #18181b; }
.구-값말 { font-size: .85rem; color: #8a8a93; line-height: 1.35; }
.구-값말 em { font-style: normal; font-size: .75rem; font-weight: 700; color: #ff2c6d; background: #ffe4ec; border-radius: 999px; padding: 2px 8px; margin-right: 6px; }
.구-값오 { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; white-space: nowrap; }
.구-그은 { font-size: .85rem; } .구-그은 b { color: #ff2c6d; font-weight: 700; } .구-그은 s { color: #a1a1aa; }
.구-결제 .구-값값 { font-size: 1.12rem; font-weight: 800; color: #18181b; }
.구-결제 .구-낱개 summary { cursor: pointer; color: #71717a; margin: 2px 0 12px; font-size: .92rem; }
.구-결제 h3 { font-size: 1.1rem; margin: 6px 0 6px; } .구-결제 h3 small { font-size: .8rem; color: #8a8a93; font-weight: 400; }
.구-수단줄 { display: flex; align-items: center; gap: 12px; padding: 16px 2px; border-bottom: 1px solid #ececef; font-size: 1.02rem; cursor: pointer; }
.구-수단줄:last-of-type { border-bottom: 0; }
.구-수단줄 input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 0; border: 2px solid #d4d4d8; border-radius: 50%; background: #fff; }
.구-수단줄 input:checked { border: 7px solid #ff2c6d; }
.구-아이콘 { width: 56px; height: 24px; flex: none; }
.구-결제 #구메일 { background: #fff; color: #222; width: 100%; box-sizing: border-box; font-size: 1rem; padding: 12px; border: 1px solid #d4d4d8; border-radius: 10px; }
.구-결제 .구-동의 { display: block; font-size: .82rem; line-height: 1.5; margin-top: 8px; color: #52525b; }
.구-결제 .구-동의 input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0 4px -4px 0; border: 2px solid #c4c4cc; border-radius: 5px; background: #fff; }
.구-결제 .구-동의 input:checked { background: #ff2c6d url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='white' stroke-width='2.2'/%3E%3C/svg%3E") center/14px no-repeat; border-color: #ff2c6d; }
.구-결제 .구-환불 { font-size: .78rem; color: #8a8a93; margin: 14px 0 0; }
.구-결제아래 { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; background: #fff; box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); padding: 14px 16px max(14px, env(safe-area-inset-bottom)); }
.구-결제아래 p { display: flex; justify-content: space-between; margin: 0 0 10px; font-size: .95rem; color: #3f3f46; }
.구-결제아래 .오류 { display: block; color: #b3261e; font-size: .88rem; }
.구-혜택 { color: #ff2c6d; font-weight: 600; }
.구-결제단추 { display: block; width: 100%; padding: 17px; border: 0; border-radius: 14px; background: #ff2c6d; color: #fff; font-size: 1.12rem; font-weight: 700; }
.구-결제단추:disabled { opacity: .6; }
/* 맛보기 장면 — 그림 + 내리면 떠오르는 말풍선 */
.구-장면 { position: relative; min-height: 92dvh; padding: 72px 18px 40px; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; overflow: hidden; background: #0c0c0f; }
.구-장면그림 { position: absolute; inset: 0; background: center 18% / cover no-repeat; }
.구-장면그림::after { content: ''; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(12, 12, 15, .15) 0%, rgba(12, 12, 15, .1) 40%, rgba(12, 12, 15, .88) 78%, #0c0c0f 100%); }
.구-장면 > * { position: relative; }
.구-장면머리 { font-family: 'Song Myung', serif; font-weight: 400; font-size: 2rem; line-height: 1.3; color: #f6c7c7; text-align: center; margin: 0 0 6px; text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.구-말풍선들 { display: flex; flex-direction: column; gap: 10px; }
.구-말풍선 { align-self: flex-start; max-width: 86%; margin: 0; padding: 14px 16px; border-radius: 18px 18px 18px 4px; background: rgba(250, 246, 240, .94); color: #2b2a28; font-size: 1.02rem; line-height: 1.55; box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.구-말풍선:nth-child(even) { align-self: flex-end; border-radius: 18px 18px 4px 18px; }
.구-흐림 { filter: blur(6px); transition: filter 1.2s ease 1s; } .구-흐림.보임 { filter: blur(0); }
.구-목차 { background: rgba(62, 26, 26, .92); color: #f3e6d8; border-radius: 16px; padding: 16px 18px; }
.구-목차 b { display: block; font-family: 'Song Myung', serif; font-weight: 400; font-size: 1.15rem; margin-bottom: 8px; }
.구-목차 ul { margin: 0; padding-left: 4px; list-style: none; line-height: 1.9; }
.구-장면끝 { min-height: auto; justify-content: flex-start; background: #14110f; text-align: center; }
.구-장면끝 > p { color: #e8c27a; font-size: 1.1rem; margin: 0; }
.구-갈래 { list-style: none; padding: 0; margin: 8px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; text-align: left; color: #e9e2d6; font-size: .95rem; }
.구-떠오름 { opacity: 0; transform: translateY(18px); transition: opacity .7s ease var(--늦게, 0s), transform .7s ease var(--늦게, 0s); }
.구-떠오름.보임 { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .구-떠오름 { transition: none; opacity: 1; transform: none; } .구-흐림 { filter: none; } }
.구-떠오름.구-흐림 { transition: opacity .7s ease var(--늦게, 0s), transform .7s ease var(--늦게, 0s), filter 1.2s ease 1.2s; }
.구-장면 > .구-장면그림 { position: absolute; inset: 0; }
/* PC — 캐릭터 그림이 화면 가득 커지지 않게 폰 너비 한 줄로 가운데 (대표 2026-11-23 「pc에서 화면이 너무 커지는 것 같아」)
   ★ transform 으로 가운데 맞추지 않는다 — .구-결제 에 transform 이 붙으면 안의 fixed(.구-결제아래)가 화면이 아니라 그 상자에 붙어 같이 스크롤된다 */
@media (min-width: 640px) {
  body[data-판="start"], body[data-판="report"] { background: #0c0c0f; }
  .구-배경 { right: 0; width: 480px; margin: 0 auto; box-shadow: 0 0 60px rgba(0, 0, 0, .6); }
  .구-창 { max-width: 432px; }
  .구-붙음, .구-결제아래 { width: 480px; margin: 0 auto; box-sizing: border-box; }
  .구-결제, .구-결제아래 { width: 560px; margin: 0 auto; }
  /* 맛보기(결과) — 장면 그림·말풍선도 한 줄 안에 (대표 2026-11-23 「결과 화면도 pc에서 너무 커」) */
  body.구-맛보기중 .구 { max-width: 560px; margin: 0 auto; box-shadow: 0 0 60px rgba(0, 0, 0, .6); }
  .구-붙음 { width: 560px; }
}
/* 저장한 사람 불러오기 (대표 2026-11-23) */
.구-불러옴 { display: flex; flex-direction: column; gap: 8px; max-height: 40dvh; overflow-y: auto; }
.구-불러옴 button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 12px 14px; border: 1px solid #c9b48a; border-radius: 12px; background: #fff; color: #2a2320; text-align: left; font-size: 1rem; }
.구-불러옴 span { font-size: .85rem; color: #7a6a5a; }
/* 관리자 검수 (대표 2026-11-23) — 관리자에게만 보인다 */
.구-관리자 { display: flex; gap: 6px; align-items: center; max-width: 560px; margin: 0 auto 8px; padding: 8px 10px; border-radius: 12px; background: #2a1f3d; color: #e9dcff; font-size: .85rem; box-sizing: border-box; }
.구-관리자 select { flex: 1; min-width: 0; padding: 6px; border-radius: 8px; }
.구-관리자 button, .구-관리자말 button { padding: 6px 10px; border: 0; border-radius: 8px; background: #e9dcff; color: #2a1f3d; font-weight: 700; }
.구-관리자말 { max-width: 720px; margin: 12px auto; padding: 10px 14px; border-radius: 12px; background: #2a1f3d; color: #e9dcff; font-size: .9rem; }
a.구-보조 { display: block; text-align: center; margin: 14px 0 6px; }
/* 대화 화면 왼쪽 위 — 다른 리포트로 (대표 2026-11-24 「다른 상품을 선택하고 싶을 수도」) */
.구-다른 { position: fixed; top: max(12px, env(safe-area-inset-top)); left: 12px; z-index: 5; padding: 8px 14px; border-radius: 999px; background: rgba(12, 12, 15, .62); color: #f6efe6; font-size: 14px; font-weight: 600; text-decoration: none; backdrop-filter: blur(6px); }
@media (min-width: 640px) { .구-다른 { left: calc(50% - 228px); } }  /* 넓은 화면은 그림이 가운데 480px — 그 안 왼쪽 위 */
button.구-다른 { border: 0; font-family: inherit; cursor: pointer; }  /* 맛보기의 「‹ 정보 고치기」 — 대표 2026-12-04 */
/* 리포트 링크 다시 받기 — /report/ 목록 아래 (대표 2026-11-26) */
.보기-다시받기 h2 { margin: 0 0 6px; font-size: 1.1rem; }
.보기-다시받기 input { display: block; width: 100%; box-sizing: border-box; margin: 10px 0; font-size: 1.05rem; padding: 12px; border: 1px solid #c9b48a; border-radius: 10px; background: #fff; color: #222; }
.보기-다시받기 [data-알림]:empty { display: none; }
/* 후기 — /report/ 리포트 끝 (대표 2026-11-26) */
.보기-후기 h2 { margin: 0 0 8px; font-size: 1.1rem; }
.보기-별 { display: flex; gap: 6px; margin: 4px 0 10px; }
.보기-별 button { font-size: 30px; line-height: 1; background: none; border: 0; color: #5a5a66; cursor: pointer; padding: 0 2px; }
.보기-별 button.켜짐 { color: #e9c98a; }
.보기-후기 textarea { display: block; width: 100%; box-sizing: border-box; margin-bottom: 8px; font: inherit; padding: 10px 12px; border-radius: 10px; border: 1px solid #c9b48a; background: #fff; color: #222; }
.보기-후기 [data-알림]:empty { display: none; }
