/* Leapinity 인생 체험 화면 모양
   - 색·글꼴·버튼·위아래 막대는 lp-brand.css(Leapinity 공통, _leapinity-style 에서 복사)를 써요.
   - 사이트 고유 색: 초록 #15803d (흰 글자 5.0:1) · 글자 #166534 / 어두운 바탕 글자 #86efac
   - style-src 'self' 라서 HTML 에 style="…" 을 쓰지 않아요 (자바스크립트의 el.style.width 는 괜찮아요) */
:root {
  --lp-accent: #15803d; --lp-accent-ink: #166534; --lp-accent-ink-dark: #86efac; --lp-on-accent: #ffffff;
  --c-accent-soft: #e7f6ec;
  --c-up: #15803d; --c-up-bg: #e7f6ec; --c-down: #b42318; --c-down-bg: #fdecea;
  --c-warn: #8a4b00; --c-warn-bg: #fff4e0; --c-help: #1d4ed8; --c-help-bg: #eef3ff;
  --s-health: #e5484d; --s-happy: #f5a524; --s-know: #3b82f6; --s-fit: #f97316; --s-rel: #a855f7; --s-money: #15803d;
  --track: #e9ecf5;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --c-accent-soft: #11301f;
  --c-up: #86efac; --c-up-bg: #11301f; --c-down: #ffb4ab; --c-down-bg: #3d1515;
  --c-warn: #ffd18a; --c-warn-bg: #3a2a10; --c-help: #a9c4ff; --c-help-bg: #18264f;
  --s-health: #ff6b6f; --s-happy: #ffc53d; --s-know: #60a5fa; --s-fit: #fb923c; --s-rel: #c084fc; --s-money: #4ade80;
  --track: #232b5c;
  color-scheme: dark;
} }
:root[data-theme="dark"] {
  --c-accent-soft: #11301f;
  --c-up: #86efac; --c-up-bg: #11301f; --c-down: #ffb4ab; --c-down-bg: #3d1515;
  --c-warn: #ffd18a; --c-warn-bg: #3a2a10; --c-help: #a9c4ff; --c-help-bg: #18264f;
  --s-health: #ff6b6f; --s-happy: #ffc53d; --s-know: #60a5fa; --s-fit: #fb923c; --s-rel: #c084fc; --s-money: #4ade80;
  --track: #232b5c;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { min-height: 100vh; display: flex; flex-direction: column; font-size: 16px; line-height: 1.65; }
main { flex: 1; padding-bottom: 8px; }
a { color: var(--lp-accent-ink); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--lp-focus); outline-offset: 2px; }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.3; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--lp-card); color: var(--lp-ink); padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }
.muted { color: var(--lp-mute); }
.small { font-size: 14px; }
[hidden] { display: none !important; }
.copy-helper { position: fixed; left: -9999px; top: 0; opacity: 0; }
.bar-link { min-height: 44px; padding: 0 16px; font-size: 14px; }
@media (max-width: 380px) { .bar-link { display: none; } }

/* 머리 · 설명 (스캔과 같은 모양) */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding-top: 14px; font-size: 14px; color: var(--lp-mute); }
.crumbs a { color: var(--lp-soft); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.page-head { padding-top: 6px; padding-bottom: 14px; }
.page-head h1 { font-size: clamp(26px, 6vw, 38px); font-weight: 800; margin: 4px 0 6px; display: flex; align-items: center; gap: 10px; }
.lead { color: var(--lp-soft); margin: 0; font-size: 17px; }
.content { margin-top: 30px; }
.content h2 { font-size: 21px; font-weight: 800; margin: 0 0 10px; }
.content h3 { font-size: 17px; margin: 18px 0 6px; }
.safe-list { padding-left: 0; list-style: none; display: grid; gap: 8px; margin: 0; }
.safe-list li { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 14px; padding: 10px 14px 10px 40px; position: relative; }
.safe-list li::before { content: '✔'; position: absolute; left: 15px; top: 10px; color: var(--lp-accent-ink); font-weight: 800; }
.faq { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 16px; padding: 4px 16px; margin-bottom: 8px; }
.faq p { margin: 0 0 12px; color: var(--lp-soft); }
.faq summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; gap: 8px; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: '▸'; color: var(--lp-accent-ink); transition: transform .2s; flex: none; }
.faq[open] summary::before { transform: rotate(90deg); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 18px; padding: 14px 16px; }
.steps li > span:last-child { display: flex; flex-direction: column; }
.steps b { font-weight: 800; }
.steps li span span { color: var(--lp-soft); font-size: 14px; }
.step-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--lp-accent); color: var(--lp-on-accent); font-weight: 800; }
.more-link a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; color: var(--lp-accent-ink); }
.guide .toc { background: var(--lp-card); border: 1px solid var(--lp-line); border-radius: 18px; padding: 10px 16px; }
.toc-h { margin: 4px 0; font-weight: 800; }
.toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 14px; }
.toc a { display: inline-flex; align-items: center; min-height: 44px; color: var(--lp-accent-ink); font-weight: 700; }
.g-sec { margin-top: 30px; scroll-margin-top: 76px; }
.g-sec > p { margin: 0 0 10px; }
.cta { text-align: center; margin-top: 30px; }
.legal h2 { font-size: 18px; margin-top: 24px; }
.legal a { overflow-wrap: anywhere; }
.nf { text-align: center; padding-top: 40px; }
.nf h1 { justify-content: center; }
.nf-emoji { font-size: 56px; margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--lp-line); border-radius: 16px; background: var(--lp-card); margin: 12px 0 8px; }
.ctable { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 420px; }
.ctable caption { text-align: left; padding: 10px 14px; font-weight: 700; color: var(--lp-soft); }
.ctable th, .ctable td { padding: 8px 12px; border-top: 1px solid var(--lp-line); text-align: left; white-space: nowrap; }
.ctable thead th { font-size: 13.5px; color: var(--lp-soft); }
.ctable tr.hl { background: var(--c-accent-soft); }

/* 아래쪽 */
.lp-foot-links a { min-width: 44px; justify-content: center; }
.foot-cats { display: flex; flex-wrap: wrap; gap: 0 18px; width: 100%; }
.foot-cats a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; }
.foot-cats a:hover { color: var(--lp-foot-hi); }
.ad-slot { margin-top: 20px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--lp-ink); color: var(--lp-bg); padding: 12px 20px; border-radius: 999px; font-weight: 700; font-size: 15px;
  transition: opacity .25s, transform .25s; pointer-events: none; z-index: 90; max-width: calc(100vw - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 0; }
.btn-row.center { justify-content: center; }
.big-btn { min-height: 52px; padding: 0 24px; font-size: 16.5px; }
.hint { font-size: 13.5px; color: var(--lp-mute); margin: 8px 0 0; }
.warn { background: var(--c-warn-bg); color: var(--c-warn); padding: 10px 14px; border-radius: 12px; }

/* Leapinity의 다른 도구 */
.lp-more { margin-top: 40px; margin-bottom: 8px; }
.lp-more-h { margin: 0 0 12px; font-size: 15px; font-weight: 700; letter-spacing: .01em; color: var(--lp-soft); }
.lp-more-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lp-more-card { display: flex; align-items: center; gap: 12px; min-height: 64px; height: 100%; padding: 12px 14px; border-radius: 18px;
  background: var(--lp-card); border: 1px solid var(--lp-line); color: var(--lp-ink); text-decoration: none; transition: transform .25s ease, border-color .25s; }
.lp-more-card:hover { transform: translateY(-2px); border-color: var(--lp-accent); }
.lp-more-ic { flex: none; width: 40px; height: 40px; }
.lp-more-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lp-more-txt b { font-size: 15.5px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.lp-more-txt span { font-size: 13.5px; color: var(--lp-soft); line-height: 1.4; }
.lp-more-go { flex: none; font-size: 22px; line-height: 1; color: var(--lp-mute); }
@media (max-width: 720px) { .lp-more-list { grid-template-columns: 1fr; gap: 8px; } }

/* ---------- 시작 화면 ---------- */
.hero { padding-top: 30px; text-align: center; }
.hero h1 { font-size: clamp(28px, 7vw, 48px); font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 12px; }
.hero .lead { max-width: 640px; margin: 0 auto; }
.age-badge { display: inline-flex; align-items: center; gap: 6px; margin: 14px 0 0; padding: 6px 14px; border-radius: 999px; background: var(--c-warn-bg); color: var(--c-warn); font-weight: 800; font-size: 14.5px; }
.notice { text-align: left; max-width: 720px; margin: 16px auto 0; padding: 14px 18px; }
.notice p { margin: 0 0 10px; font-size: 15px; color: var(--lp-soft); }
.notice p b { color: var(--lp-ink); }
.switch { display: flex; align-items: center; gap: 12px; min-height: 48px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { flex: none; width: 50px; height: 30px; border-radius: 999px; background: var(--track); position: relative; transition: background .2s; border: 1px solid var(--lp-line); }
.switch-ui::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.switch input:checked + .switch-ui { background: var(--lp-accent); }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch input:focus-visible + .switch-ui { outline: 3px solid var(--lp-focus); outline-offset: 2px; }
.switch .sub { display: block; font-size: 13.5px; color: var(--lp-mute); }
.setup { text-align: left; max-width: 720px; margin: 14px auto 0; padding: 18px; }
.setup-h { font-size: 19px; margin: 0 0 12px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg-b { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-height: 60px; padding: 10px 14px; border-radius: 16px; border: 2px solid var(--lp-line);
  background: var(--lp-card); color: var(--lp-ink); font: inherit; text-align: left; cursor: pointer; }
.seg-b span { font-size: 13.5px; color: var(--lp-soft); }
.seg-b[aria-checked="true"] { border-color: var(--lp-accent); background: var(--c-accent-soft); }
.careers { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-top: 12px; }
.career { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border-radius: 16px; border: 2px solid var(--lp-line); background: var(--lp-card);
  color: var(--lp-ink); font: inherit; text-align: left; cursor: pointer; }
.career-e { font-size: 30px; flex: none; }
.career-t { display: flex; flex-direction: column; min-width: 0; }
.career-t span { font-size: 13px; color: var(--lp-soft); line-height: 1.4; }
.career[aria-pressed="true"] { border-color: var(--lp-accent); background: var(--c-accent-soft); }
.career.soon { cursor: default; opacity: .7; border-style: dashed; }
.career.soon .career-t span { color: var(--lp-mute); }
.fate-note { margin: 12px 0 0; color: var(--lp-soft); font-size: 15px; background: var(--c-accent-soft); border-radius: 14px; padding: 10px 14px; }
.more-set { margin-top: 14px; border-top: 1px solid var(--lp-line); padding-top: 4px; }
.more-set summary { cursor: pointer; font-weight: 700; min-height: 44px; display: flex; align-items: center; }
.set-in { padding-bottom: 6px; }
.set-label { display: flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 14.5px; margin: 12px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-chip:disabled { opacity: .55; cursor: not-allowed; }
.set-in .lp-input { width: 100%; max-width: 320px; }
.start-btn { width: 100%; margin-top: 16px; font-size: 18px; min-height: 56px; }

/* ---------- 태어나기 ---------- */
.birth { padding-top: 24px; }
.birth-card { max-width: 560px; margin: 0 auto; padding: 24px 18px; text-align: center; }
.globe-wrap { width: 200px; height: 200px; margin: 0 auto; transition: transform .6s var(--lp-ease); }
.globe { width: 100%; height: 100%; display: block; filter: drop-shadow(0 12px 24px rgba(2, 132, 199, .3)); }
.globe-land { animation: spin 1.1s linear infinite; }
.globe-wrap.stop .globe-land { animation-duration: 9s; }
.globe-wrap.stop { transform: scale(.7); }
@keyframes spin { from { transform: translateX(0); } to { transform: translateX(-200px); } }
.spin-t { font-weight: 700; color: var(--lp-soft); margin: 12px 0 0; }
.reveal { animation: pop .5s var(--lp-ease); }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.flag { font-size: 64px; line-height: 1; margin: 0; }
.reveal h2 { font-size: 26px; margin: 8px 0 4px; }
.odds { display: inline-block; margin: 0 0 10px; padding: 6px 14px; border-radius: 999px; background: var(--c-accent-soft); color: var(--lp-accent-ink); font-weight: 800; }
.facts { list-style: none; padding: 0; margin: 6px 0 16px; text-align: left; display: grid; gap: 6px; }
.facts li { background: var(--lp-bg-soft); border-radius: 12px; padding: 8px 12px; font-size: 15px; }

/* ---------- 인생 화면 ---------- */
.play { padding-top: 14px; max-width: 760px; }
.hud { padding: 14px 16px; position: sticky; top: 64px; z-index: 5; }
.hud-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.who { display: flex; gap: 10px; align-items: center; margin: 0; min-width: 0; }
.who-flag { font-size: 30px; line-height: 1; flex: none; }
.who b { font-size: 18px; }
.who-sub { color: var(--lp-soft); font-size: 13.5px; }
.age { margin: 0; flex: none; text-align: right; line-height: 1; }
.age b { font-size: 36px; font-weight: 800; letter-spacing: -.03em; color: var(--lp-accent-ink); }
.age span { font-weight: 700; margin-left: 2px; }
.dream-line { margin: 8px 0 6px; font-weight: 700; font-size: 15px; }
.year-bar { height: 4px; border-radius: 99px; background: var(--track); overflow: hidden; }
.year-bar span { display: block; height: 100%; width: 0; background: var(--lp-accent); transition: width .1s linear; }
.stats { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 12px; }
.st { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 6px; font-size: 13.5px; }
.st-n { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-v { font-variant-numeric: tabular-nums; }
.st-bar { grid-column: 1 / -1; height: 6px; background: var(--track); border-radius: 99px; overflow: hidden; }
.st-fill { display: block; height: 100%; width: 50%; border-radius: inherit; transition: width .4s var(--lp-ease); }
.st-health { background: var(--s-health); } .st-happy { background: var(--s-happy); } .st-know { background: var(--s-know); }
.st-fit { background: var(--s-fit); } .st-rel { background: var(--s-rel); } .st-money { background: var(--s-money); }
.st.low .st-v { color: var(--c-down); }
.st-amt { grid-column: 1 / -1; font-size: 12.5px; color: var(--lp-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
li.st-m .st-amt { display: block; }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .hud { position: static; } }
.speed { display: flex; gap: 6px; margin-top: 10px; }
.sp { flex: 1; min-height: 44px; border-radius: 999px; border: 1px solid var(--lp-ghost-line); background: var(--lp-ghost-bg); color: var(--lp-ink); font: 800 15px/1 var(--lp-font); cursor: pointer; }
.sp[aria-pressed="true"] { background: var(--lp-accent); color: var(--lp-on-accent); border-color: var(--lp-accent); }
.event-slot { margin-top: 12px; scroll-margin-top: 80px; }
.ev { padding: 16px; border: 2px solid var(--lp-accent); animation: pop .35s var(--lp-ease); }
.ev.heavy { border-color: var(--lp-line); }
.ev-t { font-size: 17.5px; font-weight: 700; margin: 0 0 12px; }
.ev-age { display: inline-block; margin-right: 8px; padding: 2px 10px; border-radius: 999px; background: var(--c-accent-soft); color: var(--lp-accent-ink); font-size: 14px; font-weight: 800; vertical-align: 2px; }
.ev-choices { display: grid; gap: 8px; }
.ch { justify-content: flex-start; text-align: left; min-height: 50px; white-space: normal; line-height: 1.4; padding: 8px 18px; }
.ev-res p { margin: 6px 0; }
.roll { font-weight: 800; }
.roll.ok { color: var(--c-up); } .roll.no { color: var(--c-down); }
.fx-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-fx { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 13.5px; font-weight: 700; }
.chip-fx.up { background: var(--c-up-bg); color: var(--c-up); }
.chip-fx.down { background: var(--c-down-bg); color: var(--c-down); }
.help { background: var(--c-help-bg); color: var(--lp-ink); border-radius: 16px; padding: 12px 14px; margin: 0 0 12px; }
.help-h { margin: 0 0 6px; font-weight: 800; color: var(--c-help); }
.help-list { margin: 0 0 6px; padding-left: 18px; }
.help-list b { font-size: 17px; }
.help-p { margin: 4px 0 0; font-size: 14px; }
.feed { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 6px; }
.f { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; border-radius: 14px; background: var(--lp-card); border: 1px solid var(--lp-line); font-size: 15px; animation: pop .3s var(--lp-ease); }
.f-age { flex: none; font-size: 13px; font-weight: 800; color: var(--lp-mute); min-width: 38px; }
.f.ev { border-color: color-mix(in srgb, var(--lp-accent) 40%, var(--lp-line)); }
.f.sys { background: var(--c-accent-soft); font-weight: 700; }
.f.big { background: var(--c-accent-soft); font-weight: 800; }
.quit-row { text-align: center; margin-top: 16px; }
.lp-btn.small { min-height: 44px; font-size: 14px; }

/* ---------- 마지막 날 ---------- */
.end { padding-top: 20px; }
.end-card { max-width: 640px; margin: 0 auto; padding: 22px 18px; text-align: center; }
.end-flag { font-size: 54px; margin: 0; line-height: 1; }
.end-card h2 { font-size: clamp(21px, 5.4vw, 28px); margin: 10px 0 6px; }
.end-ending { display: inline-block; margin: 4px 0; padding: 6px 16px; border-radius: 999px; background: var(--c-accent-soft); color: var(--lp-accent-ink); font-weight: 800; }
.end-dream { font-weight: 700; margin: 8px 0 12px; }
.end-dream.d2 { color: var(--c-up); }
.sum { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; text-align: left; margin: 0 0 12px; background: var(--lp-bg-soft); border-radius: 16px; padding: 12px 14px; }
.sum dt { font-weight: 700; color: var(--lp-soft); }
.sum dd { margin: 0; }
.top-h { font-size: 16px; margin: 14px 0 6px; }
.tops { text-align: left; margin: 0 auto 8px; padding-left: 22px; max-width: 420px; }

@media (prefers-reduced-motion: reduce) {
  .toast, .faq summary::before, .lp-more-card, .switch-ui, .switch-ui::after, .st-fill, .year-bar span, .globe-wrap { transition: none; }
  .globe-land, .reveal, .ev, .f { animation: none; }
}
@media print { .lp-bar, .lp-foot, .ad-slot, .crumbs, .speed { display: none; } }

.f-t { min-width: 0; }
.f-fx { margin-top: 4px; }
