/* 다음 인생 카드·결말 접기·로비 목표 줄·판 중 목표 칩(js/next-run.js · end-fold.js · lobby-goal.js, docs/dev/45-next-run.md ①) */

/* ── 결말: 다음 인생 카드 3장(장면 바로 아래) ── */
.next-run { margin: 14px 0 10px; }
.nr-h { margin: 0 0 8px; font: var(--hw, 800) 17px var(--head); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.nr-h small { font: 700 12px var(--body); color: var(--muted); }
.nr-last { margin: 0 0 8px; padding: 6px 10px; border-radius: 8px; font-size: 13px; font-weight: 700; line-height: 1.45; color: var(--muted); background: rgba(0, 0, 0, .04); word-break: keep-all; }
.nr-last.ok { color: #7A4E00; background: rgba(242, 199, 68, .22); }
.nr-last .ui-i { width: 15px; height: 15px; vertical-align: -2px; }
.nr-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.nr-card { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) 18px; align-items: center; gap: 10px; margin: 0; padding: 10px 10px 10px 12px; text-align: left; cursor: pointer;
  border: 0; border-radius: 10px; background: #FFF9EC; color: inherit; font: inherit; box-shadow: inset 0 0 0 2px #E2C98C, 0 3px 0 rgba(176, 120, 32, .28); }
@media (hover: hover) { .nr-card:hover { box-shadow: inset 0 0 0 2px #D9A62E, 0 3px 0 rgba(176, 120, 32, .34); } }
.nr-card:active { transform: translateY(2px); box-shadow: inset 0 0 0 2px #D9A62E, 0 1px 0 rgba(176, 120, 32, .3); }
.nr-card:focus-visible { outline: 3px solid #2A211E; outline-offset: 2px; }
.nr-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #F2E3BC; color: #8A5A10; }
.nr-ic .ui-i { width: 19px; height: 19px; }
.nr-end .nr-ic { background: #E8E2F8; color: #5B47B0; }
.nr-chal .nr-ic { background: #FBE3DC; color: #B23A22; }
.nr-fam .nr-ic { background: #FBE0E8; color: #B0325C; }
.nr-hint .nr-ic { background: #DDEFE3; color: #22764A; }
.nr-body { display: grid; gap: 2px; min-width: 0; }
.nr-kick { font-size: 11.5px; font-weight: 800; color: var(--muted); letter-spacing: .01em; }
.nr-title { font-size: 15px; font-weight: 800; line-height: 1.35; word-break: keep-all; overflow-wrap: anywhere; }
.nr-sub { font-size: 12.5px; line-height: 1.4; color: var(--muted); word-break: keep-all; overflow-wrap: anywhere; }   /* 자르지 않는다: 누르면 바로 새 인생이라 글을 끝까지 읽을 곳이 여기뿐(Codex 검토 11/5) */
.nr-go { display: grid; place-items: center; color: #B07820; }
.nr-go .ui-i { width: 18px; height: 18px; }

/* ── 결말: 이번 인생 자세히(접기) ── */
.end-fold { margin: 14px 0; border-radius: 12px; background: rgba(0, 0, 0, .035); box-shadow: inset 0 0 0 2px #E2C98C; }
.end-fold > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 12px 40px 12px 14px; position: relative; font: var(--hw, 800) 16px var(--head); }
.end-fold > summary::-webkit-details-marker { display: none; }
.end-fold > summary::after { content: ''; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); transition: transform .15s; }
.end-fold[open] > summary::after { transform: rotate(-135deg); margin-top: -2px; }
.end-fold > summary:focus-visible { outline: 3px solid #2A211E; outline-offset: 2px; border-radius: 12px; }
.ef-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.ef-chips i { font: 700 12px/1.3 var(--body); font-style: normal; padding: 2px 8px; border-radius: 999px; background: #FFF6DC; box-shadow: inset 0 0 0 1px #D9A62E; color: #6A4A10; white-space: nowrap; }
.ef-body { padding: 0 10px 6px; }
.ef-body > :first-child { margin-top: 2px; }
.ef-body .store-btns { grid-template-columns: repeat(2, minmax(0, 1fr)); }   /* 접기 안은 여백만큼 좁아 '1fr 1fr'(글자 안 줄임)이 넘쳤다: 칸이 줄어들게 */
.ef-body .store-btn { min-width: 0; padding-inline: 8px; }
@media (max-width: 400px) { .ef-body { padding: 0 4px 6px; } .ef-body .store-btn { font-size: 14.5px; gap: 5px; } }
@media (prefers-reduced-motion: reduce) { .end-fold > summary::after { transition: none; } }

/* ── 판 중: 프로필 아래 목표 칩 ── */
.nr-chip { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; padding: 4px 8px; border-radius: 8px; font-size: 12px; line-height: 1.35; background: rgba(242, 199, 68, .18); box-shadow: inset 0 0 0 1px rgba(217, 166, 46, .6); }
.nr-chip .ui-i { flex: none; width: 14px; height: 14px; color: #B07820; }
.nr-chip span { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }

/* ── 로비: 목표 줄(시작 버튼 위) · 독 숫자 딱지 ── */
.lb-goal { align-self: stretch; display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; margin: 0; padding: 6px 12px 5px; border: 0; border-radius: 12px; cursor: pointer;
  background: rgba(26, 18, 14, .78); box-shadow: inset 0 0 0 1px rgba(217, 166, 46, .7); color: #FFF3D6; font: 700 13px/1.3 var(--body); }
.lb-goal .ui-i { flex: none; width: 15px; height: 15px; color: #F2C744; }
.lb-goal span { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; text-align: left; word-break: keep-all; overflow-wrap: anywhere; }   /* 긴 번역은 두 줄까지(누르면 도감·도전 탭에서 전문) */
.lb-goal b { color: #F2C744; margin-right: 2px; }
.lb-goal:active { transform: translateY(1px); }
@media (max-width: 380px) { .lb-goal { font-size: 12px; padding: 5px 10px 4px; } }
.lb-cnt { position: absolute; top: -6px; left: 50%; margin-left: 4px; padding: 1px 5px; border-radius: 999px; font: 800 10px/1.3 var(--body); font-style: normal; letter-spacing: -.02em; white-space: nowrap;
  background: #2A211E; color: #FFF3D6; box-shadow: 0 0 0 1.5px #E8D7B0; pointer-events: none; }

/* ── 어두운 화면 ── */
:root[data-theme="dark"] .nr-card { background: var(--hd-cell); color: var(--hd-ink); box-shadow: inset 0 0 0 2px #5A4A2E, 0 3px 0 rgba(0, 0, 0, .4); }
@media (hover: hover) { :root[data-theme="dark"] .nr-card:hover { box-shadow: inset 0 0 0 2px #B08A2E, 0 3px 0 rgba(0, 0, 0, .4); } }
:root[data-theme="dark"] .nr-card:focus-visible, :root[data-theme="dark"] .end-fold > summary:focus-visible { outline-color: #F2C744; }
:root[data-theme="dark"] :is(.nr-kick, .nr-sub, .nr-h small, .nr-last) { color: var(--hd-muted); }
:root[data-theme="dark"] .nr-ic { background: #4A3D26; color: #F2C744; }
:root[data-theme="dark"] .nr-end .nr-ic { background: #37305A; color: #C2B4FF; }
:root[data-theme="dark"] .nr-chal .nr-ic { background: #5A2E24; color: #FFAE98; }
:root[data-theme="dark"] .nr-fam .nr-ic { background: #57283A; color: #FFA6C4; }
:root[data-theme="dark"] .nr-hint .nr-ic { background: #23463A; color: #8EE0AE; }
:root[data-theme="dark"] .nr-go { color: #F2C744; }
:root[data-theme="dark"] .nr-last { background: rgba(255, 255, 255, .05); }
:root[data-theme="dark"] .nr-last.ok { color: #F2C744; background: rgba(242, 199, 68, .14); }
:root[data-theme="dark"] .end-fold { background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 2px #5A4A2E; color: var(--hd-ink); }
:root[data-theme="dark"] .ef-chips i { background: #3A3020; color: #F5DFA8; box-shadow: inset 0 0 0 1px #8A6A2C; }
:root[data-theme="dark"] .nr-chip { background: rgba(242, 199, 68, .1); box-shadow: inset 0 0 0 1px #8A6A2C; color: var(--hd-ink); }
:root[data-theme="dark"] .nr-chip .ui-i { color: #F2C744; }
:root[data-theme="dark"] .lb-cnt { background: #F5EBD6; color: #2A211E; box-shadow: 0 0 0 1.5px #4A3D2C; }
