/* Last Ten — 에필로그 / 엔딩 메뉴 */

/* 떠오르는 빛 알갱이 */
.motes { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 2s ease; pointer-events: none; }
.motes.in { opacity: 1; }

/* 주마등 — 명언 두 개 */
.lantern { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.lantern.in { opacity: 1; }
.lantern > * { opacity: 0; animation: lnIn 1.6s ease forwards; }
.lantern h2 { margin: 0; font: 600 34px var(--serif); color: #ff2b37; letter-spacing: .12em; }
.lantern h2 small { margin-left: 12px; font-size: 19px; font-weight: 400; letter-spacing: .3em; color: rgba(255, 43, 55, .7); }
.ln-def { margin: 14px 0 0; font-size: 14.5px; color: #aaa5b8; letter-spacing: .02em; }
.ln-rule { display: block; width: 120px; height: 1px; margin: 34px 0 32px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); }
.ln-quote { margin: 0; font: 400 25px/1.75 'Nanum Myeongjo', var(--serif); color: #f3eee4; text-shadow: 0 0 24px rgba(255, 214, 160, .18); }
.ln-quote span { display: block; }
.ln-quote span:first-child::before { content: "“"; margin-right: 2px; color: rgba(255, 217, 138, .7); }
.ln-quote span:last-child::after { content: "”"; margin-left: 2px; color: rgba(255, 217, 138, .7); }
.ln-by { margin: 10px 0 30px; font: italic 300 18px 'Cormorant Garamond', var(--serif); color: #a8a2b8; letter-spacing: .08em; }
.lantern > .ln-by:last-child { margin-bottom: 0; }
@keyframes lnIn { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

/* Last Ten → The Late */
.tl { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; pointer-events: none; }
.tl.in { opacity: 1; }
.tl-line { position: absolute; left: 50%; height: 1.2em; font-family: 'Cormorant Garamond', var(--serif); font-weight: 300; line-height: 1; }
.tl-ch { position: absolute; left: 0; top: 0; white-space: pre; color: #ebe5da; opacity: 0; filter: blur(12px); translate: 0 18px; transition: transform 1.6s cubic-bezier(.65, 0, .35, 1), translate 1.4s cubic-bezier(.2, .7, .2, 1), opacity 1.3s ease, filter 1.3s ease, scale 1.4s ease, color 1s ease, text-shadow 1s ease; }
.tl-ch.on { opacity: 1; filter: blur(0); translate: 0 0; }
.tl-ch.on.lit { color: #fff6e6; text-shadow: 0 0 18px rgba(255, 214, 160, .55), 0 0 46px rgba(255, 190, 120, .25); }
.tl-ch.on.dim { opacity: .2; }
.tl-ch.gone, .tl-ch.on.gone { opacity: 0; filter: blur(10px); translate: 0 -26px; scale: .9; }
.tl-rule { position: absolute; left: 50%; top: 392px; width: 280px; height: 1px; margin-left: -140px; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: scaleX(0); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.tl-sub { position: absolute; left: 0; right: 0; top: 410px; text-align: center; font-size: 17px; color: #9d98ad; letter-spacing: .6em; opacity: 0; transition: opacity 1.6s ease .4s, letter-spacing 2.4s ease .4s; }
.tl.named .tl-rule { transform: scaleX(1); }
.tl.named .tl-sub { opacity: 1; letter-spacing: .3em; }

.the-end { position: absolute; left: 0; right: 0; top: 89%; text-align: center; font-size: 24px; font-weight: 700; color: #ff2b37; letter-spacing: .1em; opacity: 0; transition: opacity 1.2s; pointer-events: none; }
.the-end.in { opacity: 1; }

.screen.ending-menu { background: radial-gradient(ellipse at 50% 30%, #17142a 0%, #050508 70%); display: flex; flex-direction: column; align-items: center; padding-top: 26px; }
.em-head { text-align: center; }
.em-logo { width: 300px; mix-blend-mode: screen; }
.em-sub { margin-top: 2px; font-size: 13px; color: var(--muted); letter-spacing: .2em; }
.em-sync { margin-top: 6px; font-size: 12px; color: #5ef0d4; letter-spacing: .12em; opacity: .85; animation: em-sync-in .8s ease both; }
@keyframes em-sync-in { from { opacity: 0; transform: translateY(-3px); } }
.em-cards { display: flex; gap: 26px; margin-top: 22px; }
.em-card { width: 180px; height: 270px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 34px 0 30px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .75); box-shadow: inset 0 0 0 5px #050508, inset 0 0 0 6px rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .02); transition: transform .2s, border-color .3s, box-shadow .3s; }
.em-card:hover { transform: translateY(-6px); }
.em-card b { font-size: 24px; line-height: 1.35; white-space: pre-line; word-break: keep-all; max-width: 120px; }
.em-icon { font-size: 34px; filter: grayscale(.3); }
.em-play { font-size: 40px; }
.em-card.seen { border-color: #5ef0d4; box-shadow: inset 0 0 0 5px #050508, inset 0 0 0 6px rgba(94, 240, 212, .45), 0 0 24px rgba(94, 240, 212, .2); }
.screen.ending-menu.all .em-card:last-child .em-icon { filter: drop-shadow(0 0 8px #ffd98a); }
.em-stats { display: flex; gap: 28px; margin-top: 26px; font-size: 13px; color: var(--muted); }
.em-stats b { color: var(--accent-2); font-family: var(--mono); font-weight: 400; margin-left: 4px; }
.em-care { margin-top: 22px; max-width: 700px; padding: 12px 18px; border-radius: 10px; background: rgba(125, 240, 176, .06); border: 1px solid rgba(125, 240, 176, .2); text-align: center; font-size: 12.5px; line-height: 1.7; color: #cfe9dc; }
.em-care b { display: block; color: #9ff2c4; margin-bottom: 2px; }
.em-actions { display: flex; gap: 10px; margin-top: 18px; }

.modal-box.em-pager { padding: 0; border: 0; background: transparent; box-shadow: none; }
.em-frame { position: relative; width: 640px; min-height: 360px; padding: 34px 60px 70px; border-radius: 6px; background: #050508; border: 2px solid #fff; box-shadow: inset 0 0 0 5px #050508, inset 0 0 0 6px rgba(255, 255, 255, .45); }
.em-frame h2 { margin: 0 0 22px; text-align: center; font-size: 24px; }
.em-text { font-size: 15px; line-height: 1.9; color: #e9e6f2; white-space: pre-line; word-break: keep-all; user-select: text; -webkit-user-select: text; }
.em-back { position: absolute; left: 18px; top: 20px; }
.em-nav { position: absolute; left: 22px; right: 22px; bottom: 18px; display: flex; align-items: center; justify-content: space-between; }
.em-count { font: 12px var(--mono); color: var(--muted); letter-spacing: .1em; }
.em-text.turn, .em-rich.turn { animation: emTurn .5s ease; }
@keyframes emTurn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.em-frame.wide { width: 880px; padding: 28px 46px 62px; }
.em-rich { display: grid; grid-template-columns: 300px 1fr; gap: 36px; align-items: center; min-height: 300px; }
.egg-visual { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.egg-body p { margin: 0 0 12px; font-size: 15px; line-height: 1.85; color: #e3dfec; word-break: keep-all; }
.egg-body p:last-child { margin-bottom: 0; }
.egg-body b { color: #ffd98a; font-weight: 600; }
.egg-body .nw { white-space: nowrap; }
.egg-w { font: 300 46px/1.15 'Cormorant Garamond', var(--serif); color: #ece7dd; white-space: pre; }
.egg-w .hl { color: #ffd98a; text-shadow: 0 0 16px rgba(255, 214, 160, .45); }
.egg-w .dim { color: rgba(255, 255, 255, .2); }
.egg-w.final { font-size: 52px; color: #fff; }
.egg-down { display: block; width: 1px; height: 24px; margin: 8px 0; background: linear-gradient(rgba(255, 255, 255, .45), transparent); }
.egg-gloss { margin-top: 6px; font-size: 13px; color: var(--muted); letter-spacing: .2em; }
.egg-day { font: 400 28px var(--mono); letter-spacing: .14em; color: #ece7dd; }
.egg-tiles { display: flex; gap: 10px; margin: 20px 0 22px; }
.egg-tiles span { width: 58px; padding: 8px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 8px; background: rgba(255, 255, 255, .03); }
.egg-tiles small { font: 12px var(--mono); color: var(--muted); }
.egg-tiles b { font: 500 28px/1 'Cormorant Garamond', var(--serif); color: #ffd98a; }
.egg-next { display: flex; align-items: center; gap: 14px; font: 400 32px 'Cormorant Garamond', var(--serif); letter-spacing: .14em; }
.egg-next s { text-decoration: none; color: rgba(255, 255, 255, .38); }
.egg-next i { font: 20px var(--font); font-style: normal; color: var(--muted); }
.egg-next b { color: #fff; }
.em-rich:has(.egg-phone) { grid-template-columns: 240px 1fr; gap: 30px; }
.egg-phone { width: 226px; height: 437px; }
.egg-phone .phone.still { transform: scale(.78); transform-origin: 0 0; pointer-events: none; }
.egg-list { margin: 2px 0 14px; padding: 0; list-style: none; }
.egg-list li { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); font-size: 14px; }
.egg-n { width: 16px; font: 13px var(--mono); color: var(--accent-2); }
.egg-who { width: 34px; color: #d6d2e2; }
.egg-msg { color: #a7a2b6; }
.egg-msg mark { padding: 0 1px; background: none; color: #ffd98a; font-weight: 700; border-bottom: 1px solid rgba(255, 217, 138, .8); }
.egg-body .egg-answer { margin: 4px 0 10px; font-size: 17px; letter-spacing: .12em; color: #fff; }
.egg-answer b { margin-left: 14px; font: 500 26px 'Cormorant Garamond', var(--serif); color: #ff2b37 !important; letter-spacing: .24em; }
.modal-box.em-pager .modal-x { display: none; }

/* 클리어 기록 포스터 */
.modal-box.poster-modal { width: 420px; padding: 20px 24px 18px; text-align: center; }
.poster-img { display: block; width: 304px; height: 380px; margin: 0 auto; border-radius: 8px; box-shadow: 0 14px 40px rgba(0, 0, 0, .6); -webkit-user-select: auto; user-select: auto; -webkit-touch-callout: default; }
.poster-share { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 0; }
.poster-share[hidden] { display: none; }
.poster-share p { width: 100%; margin: 4px 0 0; font-size: 12px; line-height: 1.6; color: var(--muted); word-break: keep-all; }
.poster-tip[hidden] { display: none; }
.poster-tip { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); word-break: keep-all; }
.em-stats { flex-wrap: wrap; justify-content: center; }
