/* 타임머신! 1960 부산, 가별 수녀의 저금통 — 디자인 (작은 돈, 큰 신뢰 디자인을 바탕으로 함, 항구 남청색 + 세피아 사진 결) */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Pretendard", "Malgun Gothic", sans-serif; color: #1B1F1C; background: #E7E1D5; background-image: linear-gradient(180deg, #1F3A5F 0, #1F3A5F 220px, #E7E1D5 220px); word-break: keep-all; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; }
a { color: inherit; }

.sg-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; padding: 14px 20px; }
.sg-top .home { flex: none; font-size: 14px; font-weight: 700; color: #E8DBC2; text-decoration: none; }
.sg-top .logo { flex: 1 1 auto; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 900; color: #FBF6EC; text-decoration: none; }
.sg-top .logo span { color: #E8C98E; }
/* 🔊 BGM 버튼 (공통 cookie_story.jsp 의 .hcst-tg 를 짙은 헤더에 맞춤) */
.sg-bgm { flex: none; display: inline-flex; }
.sg-top .hcst-tg { min-height: 32px; padding: 0 11px; border-color: rgba(232, 201, 142, .55); background: rgba(255, 255, 255, .1); color: #FBF6EC; font-size: 12px; white-space: nowrap; }
.sg-top .hcst-tg:hover { background: rgba(255, 255, 255, .18); }
.sg-top .hcst-tg:focus-visible { outline: 2px solid #E8C98E; outline-offset: 2px; }
.sg-main { max-width: 680px; margin: 0 auto 48px; padding: 0 16px; }
.sg-main > section { background: #FFFDF8; border-radius: 28px; padding: 34px 26px; box-shadow: 0 10px 30px rgba(31,58,95,.14); }
.sg-foot { text-align: center; padding: 0 16px 36px; font-size: 13px; color: #8C7E6A; }
.sg-foot b { color: #1F3A5F; }

.sg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1.5px solid #D8CDB8; background: #fff; color: #2B3B52; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, border-color .15s; }
.sg-btn:hover { border-color: #8C7356; }
.sg-btn:active { transform: scale(.98); }
.sg-btn:disabled { opacity: .6; cursor: default; }
.sg-btn.pri { background: #1F3A5F; border-color: #1F3A5F; color: #fff; }
.sg-btn.pri:hover { background: #162B47; border-color: #162B47; }
.sg-btn.big { min-height: 56px; padding: 0 30px; font-size: 17px; }
.sg-btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.sg-btn.danger { color: #B91C1C; border-color: #FCA5A5; }
.sg-btn.danger:hover { background: #FEF2F2; border-color: #DC2626; }
.sg-btn:focus-visible, .sg-opt:focus-visible, .sg-input:focus-visible { outline: 3px solid #D9B77A; outline-offset: 2px; }
.sg-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.sg-muted { color: #7D6F5C; font-size: 14px; line-height: 1.6; }
.sg-muted.center { text-align: center; }
.sg-toast { min-height: 20px; margin: 10px 0 0; text-align: center; font-size: 14px; font-weight: 700; color: #166534; }
.sg-eye { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .1em; color: #8C7356; }

/* 시리즈 띠 · 역사 배지 */
.sg-series { display: inline-block; margin: 0; padding: 7px 16px; border-radius: 999px; background: #EFE6D3; border: 1.5px dashed #8C7356; color: #3E3022; font-size: 14px; font-weight: 900; letter-spacing: .02em; }
.sg-series.sm { margin-bottom: 10px; font-size: 12px; padding: 5px 12px; }
.sg-badge { display: flex; width: max-content; max-width: 100%; align-items: center; gap: 10px; margin: 14px auto 0; padding: 8px 18px 8px 8px; border-radius: 999px; background: linear-gradient(135deg, #F6EEDD, #E8DBC2); border: 2px solid #B9A27F; box-shadow: 0 6px 16px rgba(62,48,34,.15); text-align: left; }
.sg-badge svg { width: 50px; height: 50px; flex: none; }
.sg-badge .tx b { display: block; font-size: 16px; font-weight: 900; color: #1F3A5F; line-height: 1.3; }
.sg-badge .tx small { display: block; font-size: 13px; font-weight: 700; color: #6E5638; }
.sg-badge.big svg { width: 62px; height: 62px; animation: sgSway 3.2s ease-in-out infinite; }
.sg-badge.big .tx b { font-size: 18px; }
.sg-badge.sm { margin: 0 auto 12px; padding: 5px 14px 5px 5px; }
.sg-badge.sm svg { width: 34px; height: 34px; }
.sg-badge.sm .tx b { font-size: 14px; } .sg-badge.sm .tx small { font-size: 11px; }
@keyframes sgSway { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg) scale(1.04); } }

/* 시작 */
.sg-start { text-align: center; }
.sg-logo { margin: 14px 0 0; font-size: 34px; font-weight: 900; line-height: 1.25; letter-spacing: -.02em; color: #1B1F1C; }
.sg-logo span { color: #1F3A5F; font-size: 40px; }
.sg-logo small { display: block; margin-top: 10px; font-size: 11px; font-weight: 800; letter-spacing: .14em; color: #8C7356; }
.sg-ask { margin: 18px 0 0; font-size: 18px; line-height: 1.6; color: #4A3D2E; }
.sg-ask b { font-size: 21px; color: #1B1F1C; }
.sg-claim { margin: 14px auto 0; max-width: 480px; padding: 10px 14px; border-radius: 14px; background: #F6EEDD; border: 1px dashed #8C7356; font-size: 14px; font-weight: 700; line-height: 1.6; color: #4A3D2E; }
.sg-theory { margin: 18px 0 0; padding: 14px 16px; border-radius: 18px; background: linear-gradient(135deg, #EEF2F7, #F6EEDD); border: 1.5px solid #B8C4D4; }
.sg-theory b { display: block; font-size: 15px; font-weight: 800; line-height: 1.55; color: #2B3B52; }
.sg-theory b i { font-style: normal; margin-right: 4px; }
.sg-theory b span { color: #1F3A5F; }
.sg-theory small { display: block; margin-top: 6px; font-size: 13px; color: #7D6F5C; }
.sg-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; text-align: left; }
.sg-mode { display: flex; flex-direction: column; gap: 10px; padding: 20px 18px; border-radius: 20px; border: 1.5px solid #E6DCCB; background: #FBF7EF; }
.sg-mode.tog { background: #EEF2F7; border-color: #B8C4D4; }
.sg-mode .t { font-size: 18px; font-weight: 900; }
.sg-mode p { margin: 0; font-size: 14px; line-height: 1.6; color: #4A4A44; }
.sg-mode .sg-btn { margin-top: auto; width: 100%; }
.sg-price { display: inline-block; margin: 0; padding: 6px 10px; border-radius: 10px; background: #F6EEDD; color: #6E5638 !important; font-size: 12px !important; font-weight: 700; line-height: 1.5; }
.sg-price.big { display: block; margin: 12px 0 0; font-size: 14px !important; text-align: center; }
.sg-gbanner { margin-top: 22px; padding: 20px; border-radius: 20px; background: #EEF2F7; border: 1.5px solid #B8C4D4; font-size: 16px; line-height: 1.6; }
.sg-gbanner span { display: block; font-size: 13px; font-weight: 800; color: #1F3A5F; margin-bottom: 4px; }
.sg-gbanner p { margin: 6px 0 14px; font-size: 14px; color: #4A4A44; }
.sg-gbanner.closed { background: #F1F5F9; border-color: #CBD5E1; }
.sg-note { margin: 18px 0 0; font-size: 12px; line-height: 1.6; color: #9C9384; }

/* 소개 */
.sg-start-ab, .sg-about { margin-top: 20px; border-radius: 18px; border: 1.5px solid #E6DCCB; background: #FBF7EF; text-align: left; }
.sg-start-ab summary, .sg-about summary { list-style: none; position: relative; display: block; padding: 16px 48px 16px 18px; cursor: pointer; font-size: 16px; font-weight: 800; color: #2B3B52; }
.sg-start-ab summary::-webkit-details-marker, .sg-about summary::-webkit-details-marker { display: none; }
.sg-start-ab summary span { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; color: #7D6F5C; }
.sg-start-ab summary::after, .sg-about summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid #8C7356; border-bottom: 2.5px solid #8C7356; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.sg-start-ab[open] summary::after, .sg-about[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.sg-start-ab[open] summary, .sg-about[open] summary { border-bottom: 1px solid #E6DCCB; }
.sg-start-ab > :not(summary), .sg-about > :not(summary) { margin-left: 22px !important; margin-right: 22px !important; }
.sg-start-ab > :last-child, .sg-about > :last-child { margin-bottom: 18px; }
.sg-start-ab p, .sg-about p { font-size: 15px; line-height: 1.85; color: #374151; margin: 14px 0 0; overflow-wrap: break-word; }
.sg-ab-lead { padding: 12px 14px; border-radius: 12px; background: #EEF2F7; font-weight: 800; color: #1F3A5F !important; margin-top: 16px !important; }
.sg-start-ab h3, .sg-about h3 { margin: 26px 0 12px; font-size: 17px; font-weight: 800; }
.sg-ab-sub { font-size: 14px !important; color: #6B6258 !important; }
.sg-how, .sg-uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sg-how li { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: #F6EEDD; border: 1px solid #E2D2B4; }
.sg-how i { font-style: normal; font-size: 22px; }
.sg-how b { color: #4A3D2E; font-size: 15px; }
.sg-how span, .sg-uses span { font-size: 14px; line-height: 1.6; }
.sg-uses li { padding: 12px; border-radius: 12px; background: #EEF2F7; display: flex; flex-direction: column; gap: 4px; }
.sg-uses b { color: #1F3A5F; font-size: 15px; }
.sg-caution { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: #F6EEDD; border: 1px solid #E2D2B4; }
.sg-caution b { color: #6E5638; }
.sg-caution ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: #4A3D2E; }
.sg-start-ab.sg-must { margin: 20px 0 0; border: 2px solid #1F3A5F; background: #F4F6FA; box-shadow: 0 6px 16px rgba(31,58,95,.12); }
.sg-must > summary { text-align: center; padding: 16px 44px; }
.sg-must > summary b { display: block; font-size: 19px; font-weight: 900; color: #1F3A5F; }
.sg-must:not([open]) > summary { animation: sgPulse 2.4s ease-in-out infinite; border-radius: 18px; }
.sg-mustnote { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #F6EEDD; color: #6E5638; font-size: 14px; font-weight: 700; line-height: 1.6; text-align: left; }
@keyframes sgPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(31,58,95,0); } 50% { box-shadow: 0 0 0 6px rgba(31,58,95,.15); } }

/* 장면 그림 (세피아 사진 결) */
.sg-art { margin: 16px 0 0; border-radius: 16px; overflow: hidden; background: #DECBA8; box-shadow: 0 8px 20px rgba(62,48,34,.18); line-height: 0; }
.sg-art svg { display: block; width: 100%; height: auto; }
.sg-art.hero { margin-top: 18px; transform: rotate(-1deg); }

/* 진행 */
.sg-play { text-align: left; }
.sg-gtag { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: #E3E9F1; color: #1F3A5F; font-size: 13px; font-weight: 800; }
.sg-prog { height: 8px; border-radius: 4px; background: #ECE4D4; overflow: hidden; }
.sg-prog i { display: block; height: 100%; background: linear-gradient(90deg, #B9A27F, #1F3A5F); transition: width .3s; }
.sg-meter { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.sg-meter span { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 800; }
.sg-meter .r { background: #F6EEDD; color: #6E5638; }
.sg-meter .c { background: #E3E9F1; color: #1F3A5F; }
.sg-meter b { font-size: 18px; font-weight: 900; margin-left: 2px; }
.sg-qn { margin: 20px 0 0; text-align: center; font-size: 13px; font-weight: 800; color: #8C7356; }
.sg-card { position: relative; margin-top: 22px; padding: 26px 22px 20px; border-radius: 22px; background: linear-gradient(160deg, #F4F6FA, #E3E9F1); border: 1.5px solid #B8C4D4; animation: sgIn .35s ease; }
.sg-card.tm { background: linear-gradient(160deg, #FBF7EF, #EFE6D3); border-color: #D2BF9C; }
.sg-card.tm .sg-card-tag { background: #6E5638; }
.sg-card-tag, .sg-story-tag, .sg-hist-tag { position: absolute; top: -12px; left: 18px; padding: 4px 12px; border-radius: 999px; background: #1F3A5F; color: #fff; font-size: 12px; font-weight: 800; }
.sg-card h2 { margin: 0; font-size: 21px; line-height: 1.45; font-weight: 900; }
.sg-card p { margin: 10px 0 0; font-size: 16px; line-height: 1.75; color: #374151; }
.sg-legend { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: #FBF7EF; font-size: 14px; line-height: 1.7; color: #4A4A44; text-align: center; }
.sg-legend span { font-weight: 900; }
.sg-legend .a { color: #1F3A5F; } .sg-legend .b { color: #6E5638; }

/* 🎬 대화 장면 (공통 cookie_story.jsp 의 .hcvn 위에 성가신협 색을 덧입힘): 배경 그림 + 인물 초상 + 아래 대사창 */
.sg-vntag { margin: 18px 0 8px; font-size: 13px; font-weight: 900; color: #1F3A5F; }
.sg-vn { margin: 0; }
.sg-vn .hcvn { background: #1F2B3D; }
.sg-vn .hcvn-box { z-index: 3; border-color: #1F3A5F; background: rgba(251, 247, 239, .97); }
.sg-vn .hcvn-name { background: #1F3A5F; color: #FBF6EC; border-color: #E8C98E; }
.sg-vn .hcvn-text.narr { color: #4A3B2A; }
.sg-vn .hcvn-who.talk { z-index: 2; }
.sg-vn .hcvn-ask button { border-color: #E8C98E; background: rgba(31, 43, 61, .93); }
.sg-vn .hcvn-ask button:hover, .sg-vn .hcvn-ask button:focus-visible { background: #2E5A7A; }
/* 인물 셋: 조금 작게, 왼쪽 · 가운데 · 오른쪽 */
.sg-vn.n3 .hcvn-who { height: 66%; }
@media (max-width: 640px) { .sg-vn.n3 .hcvn-who { height: 64%; } }
/* 실패 엔딩: 어두운 대사창 */
.sg-vn.dark .hcvn { background: #140F0B; }
.sg-vn.dark .hcvn-box { background: rgba(38, 30, 24, .96); color: #EDE3D3; border-color: #7A2E24; }
.sg-vn.dark .hcvn-text.narr { color: #D9CBB4; }
.sg-vn.dark .hcvn-name { background: #4A2A22; }
.sg-vn.dark .hcvn-next { color: #D9CBB4; }
.sg-vn.dark .hcvn-who > svg { filter: grayscale(.45) brightness(.8) drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.sg-vnnote { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: #6E5638; text-align: center; }
/* 공통 엔진이 없을 때 */
.sg-vnfb { padding: 18px; border-radius: 18px; background: #FBF7EF; border: 1.5px solid #D2BF9C; }
.sg-vnfb p { margin: 0 0 10px; font-size: 15px; line-height: 1.7; } .sg-vnfb p b { display: block; font-size: 13px; color: #6E5638; }
.sg-after { animation: sgIn .3s ease; }

/* 대사 말풍선 */
.sg-talk { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sg-say { display: flex; align-items: flex-start; gap: 10px; animation: sgIn .35s ease both; }
.sg-say:nth-child(2) { animation-delay: .1s; } .sg-say:nth-child(3) { animation-delay: .2s; } .sg-say:nth-child(4) { animation-delay: .3s; }
.sg-say .av { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #EFE6D3; border: 2px solid #D2BF9C; font-size: 24px; }
.sg-say.real .av { background: #E3E9F1; border-color: #1F3A5F; }
.sg-say .bub { position: relative; min-width: 0; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: #FBF7EF; border: 1px solid #E6DCCB; }
.sg-say .bub b { display: block; font-size: 13px; font-weight: 900; color: #6E5638; }
.sg-say .bub b em { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #1F3A5F; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; vertical-align: 1px; }
.sg-say .bub p { margin: 3px 0 0; font-size: 15px; line-height: 1.65; color: #1F2937; }
.sg-say.me { flex-direction: row-reverse; }
.sg-say.me .bub { border-radius: 16px 4px 16px 16px; background: #1F3A5F; border-color: #1F3A5F; }
.sg-say.me .bub b { color: #E8C98E; text-align: right; }
.sg-say.me .bub p { color: #FBF6EC; }
.sg-askq { margin: 20px 0 0; font-size: 17px; font-weight: 900; color: #1B1F1C; text-align: center; }
.sg-opts { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sg-opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 14px 18px; border-radius: 16px; border: 1.5px solid #DCD2C0; background: #FFFDF8; text-align: left; font-size: 16px; font-weight: 600; line-height: 1.5; color: #1B1F1C; cursor: pointer; transition: border-color .15s, background .15s; }
.sg-opt i { flex: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #E3E9F1; color: #1F3A5F; font-style: normal; font-size: 14px; font-weight: 900; }
.sg-opt:hover:not(:disabled) { border-color: #1F3A5F; background: #F4F6FA; }

/* 통과 · 실패 */
.sg-pickres { margin-top: 14px; padding: 16px 18px; border-radius: 20px; background: #F0F7F2; border: 1.5px solid #BFDCC8; animation: sgIn .3s ease; }
.sg-ok { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #DCFCE7; color: #166534; font-size: 13px; font-weight: 900; }
.sg-pickres p { margin: 8px 0 0; font-size: 15px; line-height: 1.75; color: #374151; }
.sg-got { margin-top: 14px; padding: 14px 16px; border-radius: 18px; background: #E3E9F1; border: 1.5px solid #B8C4D4; animation: sgPop .45s ease; }
.sg-got > b { font-size: 15px; color: #1F3A5F; }
.sg-got ul, .sg-cards, .sg-lesson { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sg-got li, .sg-cards li, .sg-lesson li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; }
.sg-got i, .sg-cards i, .sg-lesson i { font-style: normal; font-size: 24px; flex: none; }
.sg-got li b, .sg-cards b, .sg-lesson b { display: block; font-size: 15px; color: #1F3A5F; }
.sg-got li span, .sg-cards span, .sg-lesson span { display: block; font-size: 14px; line-height: 1.6; color: #374151; }
.sg-cards small { display: block; margin-top: 4px; font-size: 13px; line-height: 1.55; color: #6E5638; font-weight: 700; }
.sg-cards li { border: 1px solid #E6DCCB; }
.sg-story { position: relative; margin-top: 26px; padding: 26px 20px 20px; border-radius: 20px; background: #F6EEDD; border: 1.5px solid #D2BF9C; animation: sgIn .4s ease; }
.sg-story-tag { background: #6E5638; }
.sg-story h3 { margin: 0; font-size: 18px; font-weight: 900; color: #3E3022; }
.sg-story p { margin: 8px 0 0; font-size: 15px; line-height: 1.8; color: #2E2A24; }
.sg-story p.sg-fn, .sg-fn { margin-top: 8px; font-size: 12px !important; line-height: 1.5 !important; color: #7D6F5C !important; }
.sg-hist { position: relative; margin: 26px 0 0; padding: 22px 14px 14px; border-radius: 18px; background: #3E3022; }
.sg-hist-tag { background: #B9A27F; color: #2E2A24; }
.sg-hist img { display: block; width: 100%; height: auto; border-radius: 8px; filter: sepia(.25); }
.sg-hist figcaption { margin-top: 10px; font-size: 14px; line-height: 1.6; color: #F4EBD8; }
.sg-hist figcaption small { display: block; margin-top: 4px; font-size: 12px; color: #C9B994; }
.sg-hist figcaption a { color: #E8C98E; }
/* 📷 사진 2장: 넓은 화면에서는 나란히, 640px 이하에서는 위아래 */
.sg-hists { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; margin-top: 26px; }
.sg-hists .sg-hist { margin: 0; min-width: 0; }
.sg-hist[hidden] { display: none; }
.sg-hist figcaption { overflow-wrap: anywhere; word-break: keep-all; }
@media (max-width: 640px) { .sg-hists { grid-template-columns: 1fr; gap: 26px; } }
.sg-failcard { margin-top: 18px; padding: 24px 22px; border-radius: 22px; background: linear-gradient(160deg, #3E3022, #2A2119); color: #F4EBD8; text-align: center; animation: sgShake .5s ease; }
.sg-failcard .tag { display: inline-block; padding: 4px 12px; border-radius: 999px; background: #9A4B3A; color: #fff; font-size: 12px; font-weight: 900; }
.sg-failcard .e { display: block; margin-top: 12px; font-size: 54px; line-height: 1.1; }
.sg-failcard h2 { margin: 8px 0 0; font-size: 23px; font-weight: 900; color: #F8E7C4; }
.sg-failcard p { margin: 10px 0 0; font-size: 15px; line-height: 1.75; text-align: left; color: #EDE3CF; }
.sg-failcard p.me { padding: 8px 12px; border-radius: 10px; background: rgba(255,255,255,.08); font-size: 14px; font-weight: 700; color: #E8C98E; }
.sg-failcard p.warn { font-size: 13px; color: #C9B994; text-align: center; }
.sg-why { margin-top: 14px; padding: 16px 18px; border-radius: 18px; background: #EEF2F7; border: 1.5px solid #B8C4D4; }
.sg-why b { font-size: 16px; color: #1F3A5F; }
.sg-why p { margin: 6px 0 0; font-size: 15px; line-height: 1.75; color: #374151; }

/* 엔딩 */
.sg-time { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.sg-time li { position: relative; display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 10px 0 10px; border-bottom: 1px dashed #D2BF9C; }
.sg-time li:last-child { border-bottom: 0; }
.sg-time .y { align-self: start; padding: 3px 8px; border-radius: 8px; background: #1F3A5F; color: #FBF6EC; font-size: 13px; font-weight: 900; text-align: center; }
.sg-time b { display: block; font-size: 15px; color: #3E3022; }
.sg-time p { margin: 2px 0 0 !important; font-size: 14px !important; line-height: 1.6 !important; }
.sg-root { margin-top: 18px; padding: 16px 18px; border-radius: 18px; background: #EEF5EF; border: 1.5px solid #BFDCC8; }
.sg-root b { font-size: 16px; color: #1E5233; }
.sg-root p { margin: 6px 0 0; font-size: 15px; line-height: 1.7; color: #374151; }

.sg-busy { text-align: center; padding: 70px 20px !important; }
.sg-busy p { margin: 16px 0 0; font-size: 18px; font-weight: 700; color: #2B3B52; }
.sg-crumb { font-size: 64px; animation: sgWiggle .6s ease-in-out infinite; }

/* 결과 */
.sg-res { text-align: center; }
.sg-shared { display: inline-block; margin: 0 0 10px; padding: 4px 12px; border-radius: 999px; background: #F6EEDD; color: #6E5638; font-size: 13px; font-weight: 700; }
.sg-type .e { display: block; font-size: 56px; line-height: 1.15; margin-top: 8px; }
.sg-type h1 { margin: 8px 0 0; font-size: 30px; font-weight: 900; color: var(--tc); }
.sg-type p { margin: 6px 0 0; font-size: 16px; font-weight: 700; color: #6B6258; }
.sg-kpi { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 8px; margin-top: 16px; }
.sg-kpi div { padding: 14px 6px; border-radius: 18px; background: #EFE6D3; text-align: center; }
.sg-kpi span { display: block; font-size: 13px; font-weight: 800; color: #6E5638; }
.sg-kpi b { display: block; font-size: 28px; font-weight: 900; color: #1B1F1C; }
.sg-kpi b em { font-style: normal; font-size: 16px; color: #7D6F5C; }
.sg-kpi small { font-size: 12px; color: #7D6F5C; }
.sg-desc { margin: 16px 0 0; font-size: 16px; line-height: 1.75; color: #374151; text-align: left; }
.sg-cardbox { margin-top: 20px; padding: 20px 18px; border-radius: 20px; border: 1px solid #E6DCCB; text-align: left; }
.sg-cardbox.center { text-align: center; }
.sg-cardbox h2 { margin: 0 0 10px; font-size: 17px; font-weight: 800; }
.sg-cardbox p { margin: 8px 0 0; font-size: 15px; line-height: 1.7; color: #374151; }
.sg-cardbox.gift { background: #F6EEDD; border-color: #D2BF9C; }
.sg-journey { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sg-journey li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; padding: 10px 12px; border-radius: 12px; background: #F0F7F2; }
.sg-journey li.no { background: #F8EDE6; }
.sg-journey small { grid-column: 1 / -1; font-size: 12px; font-weight: 800; color: #8C7356; }
.sg-journey b { font-size: 15px; line-height: 1.5; }
.sg-journey span { font-size: 13px; font-weight: 800; color: #166534; white-space: nowrap; }
.sg-journey li.no span { color: #9A4B3A; }
.sg-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.sg-links span { font-size: 13px; font-weight: 800; color: #6E5638; margin-right: 4px; }
.sg-links a { padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid #D2BF9C; color: #1F3A5F; font-size: 14px; font-weight: 700; text-decoration: none; }
.sg-refnote { margin: 18px 0 0; padding: 10px 14px; border-radius: 12px; background: #F6EEDD; font-size: 14px; font-weight: 700; color: #6E5638; }

/* 함께하기 · 모임 결과 */
.sg-title { margin: 6px 0 0; font-size: 26px; font-weight: 900; line-height: 1.35; }
.sg-howto { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 10px; }
.sg-howto li { counter-increment: s; position: relative; padding: 12px 14px 12px 48px; border-radius: 14px; background: #FBF7EF; font-size: 14px; line-height: 1.6; color: #4A4A44; }
.sg-howto li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 24px; height: 24px; border-radius: 50%; background: #1F3A5F; color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.sg-howto b { display: block; color: #1B1F1C; font-size: 15px; }
.sg-label { display: block; margin: 4px 0 6px; font-size: 14px; font-weight: 700; color: #4A4A44; }
.sg-input { width: 100%; min-height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid #D8CDB8; background: #FBF7EF; font-size: 16px; }
.sg-glist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sg-glist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #FBF7EF; border: 1px solid #E6DCCB; }
.sg-glist b { display: block; font-size: 15px; }
.sg-glist small { font-size: 13px; color: #7D6F5C; }
.sg-glist em { font-style: normal; color: #B91C1C; }
.sg-glist .act { display: flex; gap: 6px; }
.sg-gmeta { margin: 8px 0 0; font-size: 15px; color: #6B6258; }
.sg-gmeta b { color: #1F3A5F; font-size: 18px; }
.sg-wait { font-size: 40px; margin: 0 !important; }
.sg-big { font-size: 64px !important; font-weight: 900; color: #1F3A5F !important; margin: 4px 0 0 !important; line-height: 1.1 !important; }
.sg-big small { font-size: 26px; }
.sg-tdist { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sg-tdist li { display: grid; grid-template-columns: 180px 1fr 44px; align-items: center; gap: 10px; font-size: 14px; }
.sg-tdist .n { font-weight: 700; color: #4A4A44; }
.sg-tdist li.me .n { color: #9A4B3A; font-weight: 900; }
.sg-tdist .b { height: 12px; border-radius: 6px; background: #ECE4D4; overflow: hidden; }
.sg-tdist .b i { display: block; height: 100%; border-radius: 6px; }
.sg-tdist b { text-align: right; font-weight: 800; }
.sg-tdist b small { display: block; font-size: 11px; font-weight: 700; color: #7D6F5C; }
.sg-tdist.q li { grid-template-columns: 1fr 100px 52px; }
.sg-tdist.q .n { font-size: 13px; line-height: 1.45; }
.sg-worst { margin-top: 14px; padding: 12px 14px; border-radius: 14px; background: #F8EDE6; border: 1px solid #E5C3B3; }
.sg-worst b { font-size: 15px; color: #9A4B3A; }
.sg-worst p { font-size: 14px !important; }
.sg-talkq { margin: 6px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.8; color: #374151; }

@keyframes sgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes sgPop { 0% { transform: scale(.92); opacity: 0; } 70% { transform: scale(1.03); opacity: 1; } 100% { transform: none; } }
@keyframes sgShake { 0%,100% { transform: none; } 20% { transform: translateX(-6px) rotate(-1deg); } 40% { transform: translateX(6px) rotate(1deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes sgWiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) {
	.sg-card, .sg-story, .sg-pickres, .sg-say, .sg-after, .sg-got, .sg-failcard, .sg-crumb, .sg-badge.big svg, .sg-must > summary { animation: none !important; }
}

@media (max-width: 520px) {
	body { background-image: linear-gradient(180deg, #1F3A5F 0, #1F3A5F 160px, #E7E1D5 160px); }
	.sg-top { padding: 12px 14px; }
	.sg-top { gap: 8px; }
	.sg-top .logo { font-size: 13px; }
	.sg-top .home { font-size: 13px; }
	.sg-top .hcst-tg { padding: 0 9px; }
	.sg-top .hcst-tg .eq { display: none; }
	.sg-main { padding: 0 10px; }
	.sg-main > section { padding: 26px 16px; border-radius: 22px; }
	.sg-logo { font-size: 26px; }
	.sg-logo span { font-size: 31px; }
	.sg-series { font-size: 12px; padding: 6px 12px; }
	.sg-badge .tx b { font-size: 14px; } .sg-badge.big .tx b { font-size: 15px; } .sg-badge .tx small { font-size: 12px; }
	.sg-badge.big svg { width: 50px; height: 50px; }
	.sg-modes, .sg-uses, .sg-how { grid-template-columns: 1fr; }
	.sg-card { padding: 24px 16px 18px; }
	.sg-card h2 { font-size: 18px; }
	.sg-card p { font-size: 15px; }
	.sg-say .av { width: 38px; height: 38px; font-size: 20px; }
	.sg-say .bub p { font-size: 14px; }
	.sg-opt { font-size: 15px; padding: 12px 14px; }
	.sg-time li { grid-template-columns: 74px 1fr; gap: 10px; }
	.sg-time .y { font-size: 12px; padding: 3px 4px; }
	.sg-type h1 { font-size: 24px; }
	.sg-kpi b { font-size: 22px; }
	.sg-kpi span { font-size: 12px; }
	.sg-tdist li { grid-template-columns: 124px 1fr 38px; font-size: 13px; }
	.sg-tdist.q li { grid-template-columns: 1fr 60px 48px; }
	.sg-row .sg-btn { flex: 1 1 100%; }
	.sg-start-ab > :not(summary), .sg-about > :not(summary) { margin-left: 16px !important; margin-right: 16px !important; }
}

/* 함께하기 닉네임 · 참여자별 결과 · 90일 자동 삭제 안내 */
.sg-nick { margin: 4px 0 12px; text-align: left; }
.sg-nick .sg-input { margin-top: 6px; }
.sg-nickhelp { display: block; font-size: 13px; color: #7D6F5C; line-height: 1.5; }
.sg-nickerr { display: block; margin-top: 6px; font-size: 13px; font-weight: 800; color: #B42318; }
.sg-nickerr[hidden] { display: none; }
.sg-nickkeep { margin: 10px 0 0 !important; font-size: 12px !important; color: #7D6F5C !important; }
.sg-nickfix { margin: 12px 0; padding: 14px 16px; border-radius: 16px; background: #FFF4E5; border: 1.5px solid #F2C3A8; text-align: left; }
.sg-nickfix p { margin: 0 0 8px; font-size: 14px; line-height: 1.6; }
.sg-nickfix p b { display: block; color: #B42318; }
.sg-made { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: #F0FDF4; border: 1px solid #BBF7D0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.sg-made b, .sg-made span { display: block; }
.sg-expire { margin: 8px 0 0; font-size: 14px; font-weight: 700; color: #7D6F5C; overflow-wrap: anywhere; }
.sg-mtab { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 14px; }
.sg-mtab th, .sg-mtab td { padding: 8px 6px; border-bottom: 1px solid #E6DCCB; text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.sg-mtab th { font-size: 12px; font-weight: 800; color: #7D6F5C; white-space: nowrap; }
.sg-mtab .no { width: 2.4em; color: #7D6F5C; }
.sg-mtab .nn { font-weight: 800; }
.sg-mtab .nn em { font-style: normal; font-weight: 600; color: #7D6F5C; }
.sg-mtab .at { white-space: nowrap; color: #7D6F5C; font-size: 13px; }
@media (max-width: 640px) {
	.sg-mtab thead { display: none; }
	.sg-mtab, .sg-mtab tbody, .sg-mtab tr, .sg-mtab td { display: block; width: auto; }
	.sg-mtab tr { margin-bottom: 8px; padding: 10px 12px; border: 1px solid #E6DCCB; border-radius: 14px; background: #FBF7EF; }
	.sg-mtab td { padding: 2px 0; border: 0; font-size: 13px; }
	.sg-mtab td.no, .sg-mtab td.nn { display: inline; }
	.sg-mtab td.no::after { content: '.'; }
	.sg-mtab td.nn { margin-left: 4px; font-size: 15px; }
	.sg-mtab td[data-l]::before { content: attr(data-l) ' · '; font-weight: 700; color: #7D6F5C; }
	.sg-mtab .at { white-space: normal; }
}

/* 👤 인물 카드 (실존 인물 학습 정보): 통과 화면의 📜 진짜 역사·사진 다음, 성공 엔딩 연표 화면의 접이식 목록 */
.sg-people { position: relative; margin-top: 26px; padding: 26px 16px 16px; border-radius: 20px; background: #FBF7EF; border: 1.5px solid #D2BF9C; animation: sgIn .4s ease; }
.sg-people > .sg-story-tag { background: #1F3A5F; color: #fff; }
.sg-person { min-width: 0; }
.sg-person + .sg-person { margin-top: 16px; padding-top: 16px; border-top: 1px dashed #D2BF9C; }
.sg-person-hd { display: flex; gap: 12px; align-items: flex-start; }
.sg-person-pic { flex: none; width: 66px; height: 88px; border-radius: 14px; overflow: hidden; background: #F6EEDD; border: 1.5px solid #D2BF9C; }
.sg-person-pic svg { display: block; width: 100%; height: 100%; }
.sg-person-ini { flex: none; display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background: #1F3A5F; color: #fff; font: 900 20px/1 Georgia, "Pretendard", serif; letter-spacing: 1px; border: 3px solid #F6EEDD; box-shadow: 0 0 0 1.5px #1F3A5F; }
.sg-person-nm { flex: 1; min-width: 0; }
.sg-person-nm b { display: block; font-size: 17px; font-weight: 900; color: #1F3A5F; }
.sg-person-nm small { display: block; margin-top: 2px; font-size: 13px; color: #7D6F5C; overflow-wrap: anywhere; }
.sg-people .sg-person-nm p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.6; font-weight: 700; color: #374151; }
.sg-person-facts { margin: 10px 0 0; padding: 0 0 0 18px; list-style: disc; font-size: 14.5px; line-height: 1.7; color: #374151; }
.sg-person-facts li { margin-top: 3px; overflow-wrap: break-word; }
.sg-people .sg-person-coop { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: #EEF2F7; font-size: 14px; line-height: 1.65; color: #374151; }
.sg-person-coop b { display: block; margin-bottom: 2px; font-size: 13.5px; font-weight: 800; color: #1F3A5F; }
.sg-people .sg-person-quote { margin: 8px 0 0; font-size: 13px; line-height: 1.6; font-style: italic; color: #7D6F5C; }
.sg-person-quote span { display: block; font-style: normal; }
.sg-people .sg-person-src { margin: 8px 0 0; font-size: 12px; line-height: 1.5; color: #7D6F5C; }
.sg-plist ul { list-style: none; margin-top: 12px; padding: 0; }
.sg-plist li { padding: 8px 0; border-bottom: 1px dashed #D2BF9C; font-size: 14px; line-height: 1.6; color: #374151; }
.sg-plist li:last-child { border-bottom: 0; }
.sg-plist li b { font-weight: 900; color: #1F3A5F; }
.sg-plist li small { margin-left: 6px; font-size: 12.5px; color: #7D6F5C; }
.sg-plist li span { display: block; }
@media (max-width: 420px) { .sg-people { padding: 24px 14px 14px; } .sg-person-pic { width: 56px; height: 75px; } .sg-person-ini { width: 52px; height: 52px; font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { .sg-people { animation: none !important; } }
