/* 타임머신! 1956 몬드라곤 (mondragon) — 디자인 (바스크 빨강 + 초록 + 흰 회벽) */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Pretendard", "Malgun Gothic", sans-serif; color: #1B1F1C; background: #F1EDE5; background-image: linear-gradient(180deg, #9E1B26 0, #9E1B26 220px, #F1EDE5 220px); word-break: keep-all; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; }
a { color: inherit; }

.md-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; padding: 14px 20px; }
.md-top .home { flex: none; font-size: 14px; font-weight: 700; color: #FFE9E0; text-decoration: none; }
.md-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: #FFFDF5; text-decoration: none; }
.md-top .logo span { color: #F4D9A8; }
/* 🔊 BGM 버튼 (공통 cookie_story.jsp 의 .hcst-tg 를 짙은 헤더에 맞춤) */
.md-bgm { flex: none; display: inline-flex; }
.md-top .hcst-tg { min-height: 32px; padding: 0 11px; border-color: rgba(232, 201, 142, .55); background: rgba(255, 255, 255, .1); color: #FFFDF5; font-size: 12px; white-space: nowrap; }
.md-top .hcst-tg:hover { background: rgba(255, 255, 255, .18); }
.md-top .hcst-tg:focus-visible { outline: 2px solid #F4D9A8; outline-offset: 2px; }
.md-main { max-width: 680px; margin: 0 auto 48px; padding: 0 16px; }
.md-main > section { background: #FFFDF8; border-radius: 28px; padding: 34px 26px; box-shadow: 0 10px 30px rgba(158,27,38,.14); }
.md-foot { text-align: center; padding: 0 16px 36px; font-size: 13px; color: #6E7A62; }
.md-foot b { color: #9E1B26; }

.md-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 #D9CBB0; background: #fff; color: #3A3226; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; transition: transform .12s, background .15s, border-color .15s; }
.md-btn:hover { border-color: #7A6A55; }
.md-btn:active { transform: scale(.98); }
.md-btn:disabled { opacity: .6; cursor: default; }
.md-btn.pri { background: #9E1B26; border-color: #9E1B26; color: #fff; }
.md-btn.pri:hover { background: #7E141D; border-color: #7E141D; }
.md-btn.big { min-height: 56px; padding: 0 30px; font-size: 17px; }
.md-btn.sm { min-height: 36px; padding: 0 14px; font-size: 13px; }
.md-btn.danger { color: #B91C1C; border-color: #FCA5A5; }
.md-btn.danger:hover { background: #FEF2F2; border-color: #DC2626; }
.md-btn:focus-visible, .md-opt:focus-visible, .md-input:focus-visible { outline: 3px solid #D9B77A; outline-offset: 2px; }
.md-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
.md-muted { color: #6B604E; font-size: 14px; line-height: 1.6; }
.md-muted.center { text-align: center; }
.md-toast { min-height: 20px; margin: 10px 0 0; text-align: center; font-size: 14px; font-weight: 700; color: #166534; }
.md-eye { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .1em; color: #7A6A55; }

/* 시리즈 띠 · 역사 배지 */
.md-series { display: inline-block; margin: 0; padding: 7px 16px; border-radius: 999px; background: #F3E6E2; border: 1.5px dashed #7A6A55; color: #3A3226; font-size: 14px; font-weight: 900; letter-spacing: .02em; }
.md-series.sm { margin-bottom: 10px; font-size: 12px; padding: 5px 12px; }
.md-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, #F6F1E7, #FFE9E0); border: 2px solid #A8C97A; box-shadow: 0 6px 16px rgba(43,59,42,.15); text-align: left; }
.md-badge svg { width: 50px; height: 50px; flex: none; }
.md-badge .tx b { display: block; font-size: 16px; font-weight: 900; color: #9E1B26; line-height: 1.3; }
.md-badge .tx small { display: block; font-size: 13px; font-weight: 700; color: #2E6B3F; }
.md-badge.big svg { width: 62px; height: 62px; animation: mdSway 3.2s ease-in-out infinite; }
.md-badge.big .tx b { font-size: 18px; }
.md-badge.sm { margin: 0 auto 12px; padding: 5px 14px 5px 5px; }
.md-badge.sm svg { width: 34px; height: 34px; }
.md-badge.sm .tx b { font-size: 14px; } .md-badge.sm .tx small { font-size: 11px; }
@keyframes mdSway { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(5deg) scale(1.04); } }

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

/* 소개 */
.md-start-ab, .md-about { margin-top: 20px; border-radius: 18px; border: 1.5px solid #E6DAC2; background: #FAF8F3; text-align: left; }
.md-start-ab summary, .md-about summary { list-style: none; position: relative; display: block; padding: 16px 48px 16px 18px; cursor: pointer; font-size: 16px; font-weight: 800; color: #3A3226; }
.md-start-ab summary::-webkit-details-marker, .md-about summary::-webkit-details-marker { display: none; }
.md-start-ab summary span { display: block; margin-top: 4px; font-size: 13px; font-weight: 500; color: #6B604E; }
.md-start-ab summary::after, .md-about summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 10px; height: 10px; border-right: 2.5px solid #7A6A55; border-bottom: 2.5px solid #7A6A55; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.md-start-ab[open] summary::after, .md-about[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.md-start-ab[open] summary, .md-about[open] summary { border-bottom: 1px solid #E6DAC2; }
.md-start-ab > :not(summary), .md-about > :not(summary) { margin-left: 22px !important; margin-right: 22px !important; }
.md-start-ab > :last-child, .md-about > :last-child { margin-bottom: 18px; }
.md-start-ab p, .md-about p { font-size: 15px; line-height: 1.85; color: #374151; margin: 14px 0 0; overflow-wrap: break-word; }
.md-ab-lead { padding: 12px 14px; border-radius: 12px; background: #F1EBE0; font-weight: 800; color: #9E1B26 !important; margin-top: 16px !important; }
.md-start-ab h3, .md-about h3 { margin: 26px 0 12px; font-size: 17px; font-weight: 800; }
.md-ab-sub { font-size: 14px !important; color: #5E6A55 !important; }
.md-how, .md-uses { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.md-how li { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; background: #F6F1E7; border: 1px solid #DDE9C4; }
.md-how i { font-style: normal; font-size: 22px; }
.md-how b { color: #1F4D2C; font-size: 15px; }
.md-how span, .md-uses span { font-size: 14px; line-height: 1.6; }
.md-uses li { padding: 12px; border-radius: 12px; background: #F1EBE0; display: flex; flex-direction: column; gap: 4px; }
.md-uses b { color: #9E1B26; font-size: 15px; }
.md-caution { margin-top: 18px; padding: 14px 16px; border-radius: 14px; background: #F6F1E7; border: 1px solid #DDE9C4; }
.md-caution b { color: #2E6B3F; }
.md-caution ul { margin: 6px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: #1F4D2C; }
.md-start-ab.md-must { margin: 20px 0 0; border: 2px solid #9E1B26; background: #F7F2E8; box-shadow: 0 6px 16px rgba(158,27,38,.12); }
.md-must > summary { text-align: center; padding: 16px 44px; }
.md-must > summary b { display: block; font-size: 19px; font-weight: 900; color: #9E1B26; }
.md-must:not([open]) > summary { animation: mdPulse 2.4s ease-in-out infinite; border-radius: 18px; }
.md-mustnote { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: #F6F1E7; color: #2E6B3F; font-size: 14px; font-weight: 700; line-height: 1.6; text-align: left; }
@keyframes mdPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(158,27,38,0); } 50% { box-shadow: 0 0 0 6px rgba(158,27,38,.15); } }

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

/* 진행 */
.md-play { text-align: left; }
.md-gtag { display: inline-block; margin: 0 0 12px; padding: 4px 12px; border-radius: 999px; background: #EAE6DC; color: #9E1B26; font-size: 13px; font-weight: 800; }
.md-prog { height: 8px; border-radius: 4px; background: #E8F0DA; overflow: hidden; }
.md-prog i { display: block; height: 100%; background: linear-gradient(90deg, #A8C97A, #9E1B26); transition: width .3s; }
.md-meter { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.md-meter span { padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 800; }
.md-meter .r { background: #F6F1E7; color: #2E6B3F; }
.md-meter .c { background: #EAE6DC; color: #9E1B26; }
.md-meter b { font-size: 18px; font-weight: 900; margin-left: 2px; }
.md-qn { margin: 20px 0 0; text-align: center; font-size: 13px; font-weight: 800; color: #7A6A55; }
.md-card { position: relative; margin-top: 22px; padding: 26px 22px 20px; border-radius: 22px; background: linear-gradient(160deg, #F7F2E8, #EAE6DC); border: 1.5px solid #CFC6B5; animation: mdIn .35s ease; }
.md-card.tm { background: linear-gradient(160deg, #FAF8F3, #F3E6E2); border-color: #DCD3C2; }
.md-card.tm .md-card-tag { background: #2E6B3F; }
.md-card-tag, .md-story-tag, .md-hist-tag { position: absolute; top: -12px; left: 18px; padding: 4px 12px; border-radius: 999px; background: #9E1B26; color: #fff; font-size: 12px; font-weight: 800; }
.md-card h2 { margin: 0; font-size: 21px; line-height: 1.45; font-weight: 900; }
.md-card p { margin: 10px 0 0; font-size: 16px; line-height: 1.75; color: #374151; }
.md-legend { margin-top: 14px; padding: 10px 14px; border-radius: 12px; background: #FAF8F3; font-size: 14px; line-height: 1.7; color: #4A4A44; text-align: center; }
.md-legend span { font-weight: 900; }
.md-legend .a { color: #9E1B26; } .md-legend .b { color: #2E6B3F; }

/* 🎬 대화 장면 (공통 cookie_story.jsp 의 .hcvn 위에 세피아·숲 초록 색을 덧입힘): 배경 그림 + 인물 초상 + 아래 대사창 */
.md-vntag { margin: 18px 0 8px; font-size: 13px; font-weight: 900; color: #9E1B26; }
.md-vn { margin: 0; }
.md-vn .hcvn { background: #2A2318; }
.md-vn .hcvn-box { z-index: 3; border-color: #9E1B26; background: rgba(255, 253, 245, .97); }
.md-vn .hcvn-name { background: #9E1B26; color: #FFFDF5; border-color: #F4D9A8; }
.md-vn .hcvn-text.narr { color: #2F4A2A; }
.md-vn .hcvn-who.talk { z-index: 2; }
.md-vn .hcvn-ask button { border-color: #F4D9A8; background: rgba(42, 35, 24, .93); }
.md-vn .hcvn-ask button:hover, .md-vn .hcvn-ask button:focus-visible { background: #5B7F4A; }
/* 인물 셋: 조금 작게, 왼쪽 · 가운데 · 오른쪽 */
.md-vn.n3 .hcvn-who { height: 66%; }
@media (max-width: 640px) { .md-vn.n3 .hcvn-who { height: 64%; } }
/* 실패 엔딩: 어두운 대사창 */
.md-vn.dark .hcvn { background: #140F0B; }
.md-vn.dark .hcvn-box { background: rgba(38, 30, 24, .96); color: #EAF2DC; border-color: #7A2E24; }
.md-vn.dark .hcvn-text.narr { color: #D3E2BC; }
.md-vn.dark .hcvn-name { background: #4A2A22; }
.md-vn.dark .hcvn-next { color: #D3E2BC; }
.md-vn.dark .hcvn-who > svg { filter: grayscale(.45) brightness(.8) drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.md-vnnote { margin: 8px 0 0; font-size: 12.5px; font-weight: 700; color: #2E6B3F; text-align: center; }
/* 공통 엔진이 없을 때 */
.md-vnfb { padding: 18px; border-radius: 18px; background: #FAF8F3; border: 1.5px solid #DCD3C2; }
.md-vnfb p { margin: 0 0 10px; font-size: 15px; line-height: 1.7; } .md-vnfb p b { display: block; font-size: 13px; color: #2E6B3F; }
.md-after { animation: mdIn .3s ease; }

/* 대사 말풍선 */
.md-talk { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.md-say { display: flex; align-items: flex-start; gap: 10px; animation: mdIn .35s ease both; }
.md-say:nth-child(2) { animation-delay: .1s; } .md-say:nth-child(3) { animation-delay: .2s; } .md-say:nth-child(4) { animation-delay: .3s; }
.md-say .av { flex: none; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: #F3E6E2; border: 2px solid #DCD3C2; font-size: 24px; }
.md-say.real .av { background: #EAE6DC; border-color: #9E1B26; }
.md-say .bub { position: relative; min-width: 0; padding: 10px 14px; border-radius: 4px 16px 16px 16px; background: #FAF8F3; border: 1px solid #E6DAC2; }
.md-say .bub b { display: block; font-size: 13px; font-weight: 900; color: #2E6B3F; }
.md-say .bub b em { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: #9E1B26; color: #fff; font-style: normal; font-size: 11px; font-weight: 800; vertical-align: 1px; }
.md-say .bub p { margin: 3px 0 0; font-size: 15px; line-height: 1.65; color: #1F2937; }
.md-say.me { flex-direction: row-reverse; }
.md-say.me .bub { border-radius: 16px 4px 16px 16px; background: #9E1B26; border-color: #9E1B26; }
.md-say.me .bub b { color: #F4D9A8; text-align: right; }
.md-say.me .bub p { color: #FFFDF5; }
.md-askq { margin: 20px 0 0; font-size: 17px; font-weight: 900; color: #1B1F1C; text-align: center; }
.md-opts { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.md-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; }
.md-opt i { flex: none; display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: #EAE6DC; color: #9E1B26; font-style: normal; font-size: 14px; font-weight: 900; }
.md-opt:hover:not(:disabled) { border-color: #9E1B26; background: #F7F2E8; }

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

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

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

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

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

@keyframes mdIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes mdPop { 0% { transform: scale(.92); opacity: 0; } 70% { transform: scale(1.03); opacity: 1; } 100% { transform: none; } }
@keyframes mdShake { 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 mdWiggle { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }
@media (prefers-reduced-motion: reduce) {
	.md-card, .md-story, .md-pickres, .md-say, .md-after, .md-got, .md-failcard, .md-crumb, .md-badge.big svg, .md-must > summary { animation: none !important; }
}

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

/* 📚 출처 · 엔딩의 수익 사용 사례 · 생각 넓히기 (mondragon) */
.md-src { display: block; margin-top: 10px; font-size: 11.5px; line-height: 1.5; color: #6B604E; }
.md-time .md-src { margin-top: 2px; }
.md-uses2 { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.md-uses2 li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #fff; }
.md-uses2 i { font-style: normal; font-size: 24px; flex: none; }
.md-uses2 b { display: block; font-size: 15px; color: #9E1B26; }
.md-uses2 span { display: block; font-size: 14px; line-height: 1.6; color: #374151; }
.md-think { margin-top: 18px; padding: 16px 18px; border-radius: 18px; background: #F6F1E7; border: 1.5px dashed #2E6B3F; }
.md-think b { font-size: 16px; color: #9E1B26; }
.md-think ol { margin: 6px 0 0; padding-left: 22px; font-size: 15px; line-height: 1.8; color: #374151; }

/* 👤 함께하기 닉네임 · 👥 참여자별 결과 (모임을 만든 사람에게만) */
.md-nick { margin: 14px 0 6px; text-align: left; }
.md-nick .md-muted { margin: 2px 0 8px; font-size: 13px; }
.md-nickerr { margin: 6px 0 0; font-size: 13px; font-weight: 800; color: #B4483A; }
.md-nickexp { margin: 10px 0 0; font-size: 12px; }
.md-nickfix { border: 1.5px solid #F4D9A8; }
.md-members { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.md-members li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: #FAF8F3; border: 1px solid #E6DAC2; min-width: 0; }
.md-members .no { flex: none; width: 26px; height: 26px; border-radius: 50%; background: #9E1B26; color: #F6EBD2; font-size: 12px; font-weight: 900; display: inline-flex; align-items: center; justify-content: center; }
.md-members li > div { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.md-members b { font-size: 15px; }
.md-members span { font-size: 13px; font-weight: 700; color: #2E6B3F; }
.md-members small { font-size: 12px; color: #6B604E; }

/* 🇰🇷 우리나라에 주는 교훈 */
.md-root.kr { background: #FAF8F3; border-color: #DCD3C2; }
.md-root.kr b { color: #9E1B26; }

/* 👤 인물 카드 (실존 인물이 처음 나온 장면 뒤) */
.md-persons { position: relative; margin-top: 26px; padding: 24px 16px 16px; border-radius: 20px; background: #F2F7F2; border: 1.5px solid #BFDCC8; animation: mdIn .4s ease; }
.md-person-tag { position: absolute; top: -12px; left: 18px; padding: 4px 12px; border-radius: 999px; background: #2E6B3F; color: #fff; font-size: 12px; font-weight: 800; }
.md-persons > ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.md-person { padding: 14px; border-radius: 14px; background: #fff; border: 1px solid #DCE8DE; min-width: 0; overflow-wrap: anywhere; }
.md-person-hd { display: flex; gap: 12px; align-items: flex-start; }
.md-person-pic { flex: none; width: 72px; height: 96px; margin: 0; border-radius: 12px; overflow: hidden; background: #F6F1E7; border: 1.5px solid #DCD3C2; }
.md-person-pic svg { display: block; width: 100%; height: 100%; }
.md-person-hd > div { min-width: 0; }
.md-person-hd b { display: block; font-size: 17px; font-weight: 900; color: #9E1B26; }
.md-person-hd .orig { display: block; font-size: 12.5px; color: #6B604E; }
.md-person-hd .life { display: inline-block; margin-top: 2px; padding: 1px 8px; border-radius: 999px; background: #F3E6E2; font-size: 12px; font-weight: 800; color: #7E141D; }
.md-person-hd .one { margin: 6px 0 0; font-size: 14.5px; line-height: 1.6; color: #2E2A24; font-weight: 700; }
.md-person-facts { margin: 10px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.7; color: #374151; }
.md-person-coop { margin: 10px 0 0; padding: 8px 10px; border-radius: 10px; background: #EEF5EF; font-size: 14px; line-height: 1.6; color: #1F4D2C; }
.md-person-coop b { color: #1E5233; }
.md-person-q { margin: 8px 0 0; font-size: 13px; color: #5A4E3C; }
.md-person-q i { font-weight: 800; }
.md-person .md-fn { margin: 8px 0 0; }
.md-person .md-src { margin-top: 8px; }

/* 👥 이 이야기의 실존 인물 (엔딩, 접이식) */
.md-plist { margin-top: 18px; padding: 12px 16px; border-radius: 18px; background: #F2F7F2; border: 1.5px solid #BFDCC8; }
.md-plist summary { cursor: pointer; font-size: 16px; font-weight: 900; color: #1E5233; }
.md-plist ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.md-plist li { padding: 10px 12px; border-radius: 12px; background: #fff; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.md-plist li b { color: #9E1B26; }
.md-plist li .life { font-size: 12.5px; color: #6B604E; }
.md-plist li > span:last-child { display: block; color: #374151; }
@media (max-width: 400px) { .md-person-pic { width: 60px; height: 80px; } .md-persons { padding: 22px 12px 12px; } }
