/* 결말 장면(js/ending-screen.js)·장면 카드·결말 도감 칸(js/scrap.js)·그 후 칩 */
.end-scene { margin: 0 0 18px; cursor: pointer; }
.end-scene .es-img { margin: 0; border-radius: 18px; overflow: hidden; border: 2px solid var(--ink); aspect-ratio: 16 / 9; background: #17120F; }
.end-scene .es-img img { width: 100%; height: 100%; object-fit: cover; display: block; animation: es-in 1.6s ease-out both; }
@keyframes es-in { from { opacity: 0; transform: scale(1.04); filter: brightness(.6); } to { opacity: 1; transform: none; filter: none; } }
.end-scene .es-head { text-align: center; margin: 14px 0 6px; animation: es-up .6s .5s ease-out both; }
.end-scene .es-head small { font: 800 12px var(--head); letter-spacing: .16em; color: var(--muted); }
.end-scene .es-head h2 { margin: 2px 0 0; font: var(--hw) 26px/1.25 var(--head); word-break: keep-all; text-wrap: balance; }
.end-scene .es-new { display: inline-block; margin-left: 8px; padding: 1px 8px; border: 2px solid var(--stamp); border-radius: 6px; color: var(--stamp); font: 800 12px var(--head); transform: rotate(-4deg); }
.end-scene .es-lines { list-style: none; margin: 0 auto; padding: 0; max-width: 34em; display: grid; gap: 6px; text-align: center; }
.end-scene .es-lines li { font: 600 15.5px/1.6 var(--body); word-break: keep-all; text-wrap: balance; animation: es-up .7s var(--d, 0s) ease-out both; }
.end-scene .es-lines .es-after { margin-top: 8px; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 14.5px; }
.end-scene.all .es-lines li, .end-scene.all .es-head { animation-delay: 0s; animation-duration: .2s; }
@keyframes es-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .end-scene .es-img img, .end-scene .es-head, .end-scene .es-lines li { animation: none; } }
@media (max-width: 520px) { .end-scene .es-head h2 { font-size: 22px; } .end-scene .es-lines li { font-size: 14.5px; } .end-scene .es-img { border-radius: 14px; } }

/* 장면 카드: 화면용(저장 이미지는 js/ending-screen.js가 캔버스로 그린다) */
.lifecard.scene-card { background: #17120F; color: #FFF6E6; padding: 10px 10px 0; }   /* 금테(.lifecard의 안쪽 그림자)가 보이게 안쪽 여백 */
.scene-card .sc-img { aspect-ratio: 16 / 9; background: center / cover no-repeat; position: relative; border-radius: 6px 6px 0 0; }
.scene-card .sc-img::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(transparent, #17120F); }
.scene-card .sc-body { padding: 4px 22px 14px; }
.scene-card .sc-k { font: 800 11px var(--head); letter-spacing: .16em; color: #C9A86A; }
.scene-card .sc-title { margin: 2px 0 12px; font: var(--hw) 24px/1.25 var(--head); color: #FFF6E6; word-break: keep-all; }
.scene-card .sc-name { display: flex; flex-direction: column; gap: 2px; }
.scene-card .sc-name b { font: var(--hw) 19px var(--head); }
.scene-card .sc-name span { font-size: 13px; color: #BFB2A3; }
.scene-card .sc-grade { margin-top: 12px; display: flex; gap: 8px; align-items: baseline; color: #F4C430; font: 800 15px var(--head); }
.scene-card .sc-foot { padding: 8px 22px 12px; font-size: 11px; color: #8C7F72; border-top: 1px solid #2C241E; }

/* 결말 도감 칸: 작은 장면 그림 + 이름. 못 본 칸은 빈 그림 + 힌트 */
.clip.scene { padding: 0 0 7px; overflow: hidden; gap: 2px; }
.clip.scene img, .clip.scene .clip-blank { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.clip.scene .clip-blank { background: repeating-linear-gradient(135deg, var(--soft) 0 6px, var(--line) 6px 7px); opacity: .6; }
.clip.scene small, .clip.scene p { padding: 0 7px; }
.clip.scene.got small { border-bottom: 0; padding-bottom: 0; }
.clip.scene.got, .clip.scene.got:nth-child(3n), .clip.scene.got:nth-child(3n+1) { transform: none; }
.clip.scene.peek img { filter: grayscale(1) blur(1.5px); opacity: .7; }
.scrap-grid:has(.clip.scene) { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.after-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.after-chip { padding: 4px 10px; border-radius: 999px; border: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.after-chip.got { border: 1px solid var(--ink); color: var(--ink); background: var(--card); font-weight: 700; }
