/* ================= Chronicle, leader mastery, card choices, scene albums (js/screens-progress.js) ================= */

/* ---------- Mastered leader frame (apply .mastered to any .lc) ---------- */
.lc.mastered { box-shadow: 0 0 0 3px #ffe08a, 0 0 0 7px rgba(122,74,0,.9), 0 0 34px rgba(255,210,110,.7), 0 10px 30px rgba(0,0,0,.55); }
.lc.mastered::before { content: "✦ MASTERED"; position: absolute; top: 3%; right: 4%; z-index: 3; font: 900 5.4cqw var(--font-title); letter-spacing: .12em; color: #2a1600; padding: 1.5% 4%; border-radius: 99px; background: linear-gradient(180deg, #ffe9a8, #d9a63a); box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.chron-av.mastered, .mav.mastered, .mrow.mastered .mav { box-shadow: 0 0 0 3px #ffe08a, 0 0 16px rgba(255,210,110,.8); }

/* Chronicle map + story modal: see css/screens-meta.css */

/* ---------- Mastery (Profile tab) ---------- */
.mast { display: grid; grid-template-columns: 290px 1fr; gap: 24px; max-width: 1480px; margin: 0 auto; }
.mast-list { display: flex; flex-direction: column; gap: 8px; }
.mrow { appearance: none; position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--ink); text-align: left; cursor: pointer; transition: transform .15s, border-color .15s; }
.mrow:hover { transform: translateX(3px); }
.mrow.on { border-color: var(--c); background: linear-gradient(90deg, color-mix(in srgb, var(--c) 22%, transparent), rgba(255,255,255,.03)); }
.mav { width: 56px; height: 56px; border-radius: 50%; background: #222 center 18% / cover; border: 2px solid var(--c); }
.mtxt b { font-family: var(--font-title); font-size: 16px; } .mtxt span { display: block; font-size: 12px; color: var(--muted); }
.mtxt .qbar { margin: 6px 0 0; } .mrow.mastered .mtxt span { color: #ffe08a; font-weight: 800; }
.mbadge { position: absolute; top: 6px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 99px; background: #ff4a3a; color: #fff; font: 800 12px var(--font-ui); display: grid; place-items: center; box-shadow: 0 0 10px #ff4a3a; }
.mast-detail { display: grid; grid-template-columns: 230px 1fr; gap: 26px; padding: 18px 22px; border-radius: 18px; background: linear-gradient(160deg, color-mix(in srgb, var(--d) 60%, transparent), rgba(12,6,28,.8)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.mast-art .lc { width: 230px; height: 340px; }
.mast-main h2 { font-family: var(--font-title); font-size: 34px; margin: 2px 0 4px; }
.mtitle { color: #d8ccef; font-size: 14px; margin-bottom: 12px; } .mtitle b { color: #ffe08a; }
.tiers { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; margin-bottom: 12px; }
.tierpip { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 10px; background: rgba(255,255,255,.04); border: 1px solid var(--line); text-align: center; }
.tierpip b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 900 14px var(--font-title); background: rgba(255,255,255,.08); }
.tierpip span { font-size: 10.5px; color: var(--muted); line-height: 1.15; }
.tierpip.ready { border-color: var(--gold); box-shadow: 0 0 14px rgba(242,193,78,.35); } .tierpip.ready b { background: rgba(242,193,78,.35); color: #fff; }
.tierpip.got { border-color: var(--c); } .tierpip.got b { background: var(--c); color: #120a20; }
.mdone { font: 900 20px var(--font-title); color: #ffe08a; letter-spacing: .12em; margin: 4px 0 12px; text-shadow: 0 0 18px rgba(255,210,110,.6); }
.mnext { color: var(--muted); font-size: 14px; margin: 2px 0 12px; }
.mast-main #mClaim { margin-bottom: 12px; }
.mchal { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.mchal .quest { grid-template-columns: 1fr 28px; padding: 10px 12px; margin-bottom: 8px; }
.mchal .quest b { font-size: 13.5px; }
.mtitles { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.mtitles .chip { appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink); border-radius: 99px; padding: 6px 12px; font: 700 13px var(--font-ui); cursor: pointer; }
.mtitles .chip.on { border-color: var(--gold); background: rgba(242,193,78,.2); color: #ffe08a; }
.mnote { font-size: 12.5px; margin: 10px 0 0; }

/* ---------- Scene albums ---------- */
.shardbar .albumsbtn { margin-left: auto; }
#albums .top h1 { flex: none; }
.albsum { color: var(--muted); font-weight: 700; font-size: 14px; white-space: nowrap; }
.fragpill .fr { font-size: 18px; }
.albums-lead { text-align: center; max-width: 1100px; margin: 0 auto 16px; color: var(--muted); font-size: 14.5px; line-height: 1.5; }
.albums-lead b { color: #ffe08a; }
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(560px, 1fr)); gap: 18px; max-width: 1560px; margin: 0 auto; }
.album { border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, color-mix(in srgb, var(--d) 55%, #0e0820), rgba(12,6,28,.9)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); display: flex; flex-direction: column; }
.album.ready { border-color: var(--gold); box-shadow: 0 0 26px rgba(242,193,78,.35); }
.album.done { border-color: var(--c); box-shadow: 0 0 30px color-mix(in srgb, var(--c) 40%, transparent); }
.ahead { position: relative; height: 86px; display: flex; align-items: flex-end; justify-content: space-between; padding: 12px 16px; background: #1a0f33 50% 34% / 175% auto no-repeat; }
.ahead::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,5,24,.92) 0%, rgba(10,5,24,.55) 60%, rgba(10,5,24,.3)); }
.album:not(.done) .ahead { filter: saturate(.55); }
.ahead > * { position: relative; }
.ahead span { display: block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--c); font-weight: 800; }
.ahead b { font-family: var(--font-title); font-size: 22px; }
.ahead em { font-style: normal; font: 900 20px var(--font-title); color: #ffe08a; }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 14px 16px 6px; }
.aslot { position: relative; aspect-ratio: 5 / 7; border-radius: 10px; }
.aslot .card { position: relative; width: 100%; height: 100%; }
.aslot.own .card:hover { transform: translateY(-6px) scale(1.04); z-index: 3; }
.aslot.miss { cursor: pointer; border: 2px dashed color-mix(in srgb, var(--c) 45%, transparent); overflow: hidden; background: rgba(0,0,0,.3); }
.aslot .ghost { position: absolute; inset: 0; background: center / cover; filter: grayscale(1) brightness(.28) blur(1px); }
.aslot .need { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; text-align: center; }
.aslot .need b { font: 700 12px/1.2 var(--font-card); color: #d8ccef; }
.aslot .need span { font: 800 12px var(--font-ui); padding: 3px 8px; border-radius: 99px; background: rgba(12,6,28,.9); border: 1px solid var(--line); color: var(--muted); }
.aslot .need span.can { color: #ffe08a; border-color: rgba(242,193,78,.6); }
.aslot.miss:hover { border-color: var(--gold); }
.album.done .slots { padding-top: 18px; }
.album.done .aslot { transform: rotate(calc((var(--i) - 2) * 4deg)) translateY(calc(max(var(--i) - 2, 2 - var(--i)) * 5px)); }
.afoot { padding: 6px 16px 14px; min-height: 58px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.alore { margin: 0; font: 15px/1.5 var(--font-card); color: #eee2ff; }
.ateaser { margin: 0; font: italic 14px var(--font-card); color: #d8ccef; } .arew { font-size: 12.5px; color: var(--muted); }
.fillbox { display: grid; grid-template-columns: 170px 1fr; gap: 24px; align-items: center; text-align: left; }
.fillbox .fc { position: relative; width: 170px; height: 238px; } .fillbox .fc .card { position: relative; width: 170px; height: 238px; }
.fillbox .lead { text-align: left; margin: 6px 0; }

/* ---------- Choice modal ---------- */
#choiceModal { z-index: 995; }
#choiceModal .box { max-width: 1000px; }
#choiceModal h2 { margin-bottom: 4px; }
.chsub { color: var(--muted); margin: 0 0 14px; }
.chopts { display: flex; gap: 26px; justify-content: center; margin: 6px 0 20px; }
.chopt { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 220px; padding: 10px; border-radius: 16px; border: 2px solid transparent; cursor: pointer; transition: transform .2s cubic-bezier(.2,.8,.2,1.3), border-color .2s, background .2s; }
.chopt:hover { transform: translateY(-6px); }
.chopt .cf { position: relative; width: 200px; height: 280px; } .chopt .cf .card { position: relative; width: 200px; height: 280px; }
.chopt b { font-family: var(--font-card); font-size: 15px; line-height: 1.2; } .chopt em { font-style: normal; font-size: 12px; color: var(--muted); }
.chopt.sel { border-color: var(--gold); background: rgba(242,193,78,.12); box-shadow: 0 0 30px rgba(242,193,78,.35); transform: translateY(-8px); }
.chmore { margin-top: 10px; font-size: 13px; color: #ffe08a; }

.story-reward .rar, .chopt .rar { display: inline-block; padding: 3px 10px; border-radius: 99px; font: 800 11px var(--font-ui); letter-spacing: .1em; text-transform: uppercase; color: #120a20; }

/* ---------- post-match pills ---------- */
.pill.progpill { font: 700 14px var(--font-ui); color: #ffe7b0; border-color: rgba(242,193,78,.45); }
.pill.progpill.k-mastery { color: #d9c2ff; } .pill.progpill.k-choice { color: #7dffb0; }

/* ---------- phones (stage is scaled down ~0.43x, so everything reads bigger here) ---------- */
body.mobile .mast { grid-template-columns: 330px 1fr; } body.mobile .mtxt b { font-size: 21px; } body.mobile .mtxt span { font-size: 16px; }
body.mobile .mast-main h2 { font-size: 40px; } body.mobile .mtitle, body.mobile .mnext { font-size: 19px; } body.mobile .tierpip span { font-size: 14px; }
body.mobile .mchal .quest b { font-size: 18px; } body.mobile .mchal .quest span { font-size: 15px; } body.mobile .mnote { font-size: 16px; }
body.mobile .albums { grid-template-columns: repeat(auto-fill, minmax(620px, 1fr)); }
body.mobile .albums-lead { font-size: 19px; } body.mobile .ahead b { font-size: 28px; } body.mobile .ahead span { font-size: 14px; }
body.mobile .aslot .need b { font-size: 15px; } body.mobile .aslot .need span { font-size: 16px; } body.mobile .alore, body.mobile .ateaser { font-size: 19px; } body.mobile .arew { font-size: 16px; }
body.mobile .chopt b { font-size: 19px; } body.mobile .chopt em, body.mobile .chsub { font-size: 17px; } body.mobile .chmore { font-size: 18px; }
body.mobile .pill.progpill { font-size: 20px; }

body.mobile #sheet .box.wide { width: 1300px; max-width: 1300px; }
