@font-face { font-family: 'Kanit'; src: url('../assets/fonts/Kanit-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('../assets/fonts/Kanit-Medium.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('../assets/fonts/Kanit-SemiBold.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Kanit'; src: url('../assets/fonts/Kanit-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }
:root { --bg: #140f24; --panel: #211936; --panel2: #2b2147; --line: #5b4a86; --gold: #f3c75f; --gold2: #b7862c; --text: #f4ecdc; --muted: #b8acd0; --green: #6ddc6a; --red: #ff6464; --blue: #5aa8ff; --nav-h: 62px; --top-h: 54px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0b0816; color: var(--text); font-family: 'Kanit', 'Noto Sans Thai', sans-serif; overflow: hidden; }
body { background: radial-gradient(ellipse at 50% 0%, #3b2a66 0%, #120c22 55%, #07050d 100%); }
button { font-family: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }
#app { position: relative; margin: 0 auto; width: 100vw; height: 100vh; height: 100dvh; max-width: 480px; display: flex; flex-direction: column; background: var(--bg); overflow: hidden; }
@media (min-width: 700px) { #app { width: min(440px, calc(100vh * 9 / 19.5 + 20px)); height: min(100vh, 960px); top: 50%; transform: translateY(-50%); border-radius: 26px; box-shadow: 0 0 0 6px #2a2045, 0 0 0 8px #6b5aa0, 0 30px 80px rgba(0,0,0,.6); } }
.icon { display: inline-block; width: 22px; height: 22px; background-image: url('../assets/ui/icons.png'); background-repeat: no-repeat; image-rendering: pixelated; vertical-align: middle; flex: none; }
canvas { image-rendering: pixelated; image-rendering: crisp-edges; }
/* top bar */
#topbar { height: var(--top-h); flex: none; display: flex; align-items: center; gap: 6px; padding: 4px 8px; background: linear-gradient(#2e2250, #1d1534); border-bottom: 2px solid var(--gold2); z-index: 5; }
.tb-hero { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1 1 auto; cursor: pointer; }
.avatar { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gold); background-color: #4b3b7a; background-repeat: no-repeat; image-rendering: pixelated; flex: none; overflow: hidden; }
.tb-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.tb-name b { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 84px; }
.tb-name span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.tb-lv { font-size: 11px; color: var(--gold); background: #0007; border-radius: 8px; padding: 1px 6px; white-space: nowrap; }
.tb-lv b { font-size: 13px; }
.tb-cur { display: flex; flex-direction: column; gap: 2px; flex: none; }
.tb-cur { display: grid; grid-template-columns: auto auto; gap: 2px 6px; }
.cur { display: flex; align-items: center; gap: 3px; background: #0008; border: 1px solid #ffffff1a; border-radius: 10px; padding: 0 7px 0 2px; height: 22px; font-size: 12px; min-width: 70px; }
.cur b { font-weight: 600; margin-left: auto; }
.cur.cp { grid-column: 1 / span 2; justify-content: center; background: linear-gradient(90deg, #5a2a10cc, #a8521acc); border-color: #ffb45a77; }
.cur.cp b { margin-left: 4px; color: #ffe2a0; }
.ic-cp { font-style: normal; font-weight: 700; font-size: 11px; color: #ffcf6b; padding: 0 3px; }
.tb-btn { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: #0006; font-size: 18px; flex: none; }
/* stage */
#stage { position: relative; flex: 0 0 auto; height: calc((100% - var(--top-h) - var(--nav-h)) * 0.47); min-height: 250px; overflow: hidden; background: #000; }
#phaser, #phaser canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
#stageInfo { position: absolute; top: 6px; left: 142px; right: 58px; display: flex; flex-direction: column; align-items: center; gap: 3px; pointer-events: none; }
.si-title { display: flex; gap: 6px; align-items: center; background: #0009; border: 1px solid #ffffff24; border-radius: 12px; padding: 1px 10px; font-size: 12px; max-width: 100%; }
.si-title span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.si-label { color: var(--gold); font-weight: 600; white-space: nowrap; }
.si-prog { display: flex; gap: 3px; align-items: center; }
.si-prog i { width: 26px; height: 6px; border-radius: 3px; background: #0009; border: 1px solid #ffffff40; }
.si-prog i.done { background: var(--gold); }
.si-prog i.cur { background: #fff; animation: pulse 1s infinite; }
.si-prog i.boss { width: 14px; height: 14px; border-radius: 50%; background: #7a1010; border-color: #ff8a8a; display: grid; place-items: center; font-style: normal; font-size: 9px; font-weight: 700; }
.si-timer { font-size: 11px; background: #a01818cc; padding: 0 8px; border-radius: 8px; }
@keyframes pulse { 50% { opacity: .45; } }
#bossbar { position: absolute; top: 62px; left: 8px; right: 84px; pointer-events: none; padding: 4px 8px 6px 40px; background: linear-gradient(90deg, #2a0508ee, #4a0a10cc 60%, #2a050800); border: 1px solid #ff5a4a66; border-radius: 10px; box-shadow: 0 0 14px #ff2a2a55; z-index: 3; }
#bossbar::before { content: 'BOSS'; position: absolute; left: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(#ff5a4a, #8a0a10); border: 2px solid #ffd23f; font: 700 9px/28px Kanit, sans-serif; text-align: center; color: #fff; text-shadow: 0 1px 0 #000; }
.bb-name { display: flex; justify-content: center; gap: 6px; font-size: 12px; font-weight: 600; color: #ffd0d0; text-shadow: 0 1px 2px #000; }
.bb-track { position: relative; height: 12px; background: #200; border: 2px solid #ffb84a; border-radius: 6px; overflow: hidden; }
#bbFill { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: linear-gradient(#ff7a5a, #d41818 55%, #8a0a0a); transition: width .15s; z-index: 1; }
#bbGhost { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: #ffe0a0; transition: width .6s .25s; }
#bbText { position: absolute; inset: 0; z-index: 2; font-size: 10px; line-height: 14px; text-align: center; font-weight: 700; text-shadow: 0 1px 1px #000, 0 0 2px #000; }
#banner { position: absolute; top: 34%; left: 0; right: 0; text-align: center; pointer-events: none; font-weight: 700; font-size: 34px; letter-spacing: 2px; text-shadow: 0 3px 0 #000, 0 0 18px currentColor; animation: banner 1.6s ease-out forwards; }
#banner small { display: block; font-size: 15px; letter-spacing: 0; font-weight: 600; color: #fff; }
#banner.boss { color: #ff4a4a; } #banner.clear { color: #ffe066; } #banner.fail { color: #c7c7c7; } #banner.info { color: #9fe8ff; font-size: 24px; }
@keyframes banner { 0% { transform: scale(2.2); opacity: 0; } 15% { transform: scale(1); opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }
#heroHud { position: absolute; left: 6px; top: 6px; width: 132px; background: #000a; border: 1px solid #ffffff22; border-radius: 8px; padding: 3px 5px; pointer-events: none; }
.hh-row { display: flex; align-items: center; gap: 4px; font-size: 9px; line-height: 11px; }
.hh-row span { width: 20px; color: var(--muted); font-weight: 600; }
.hh-row em { font-style: normal; width: 42px; text-align: right; white-space: nowrap; overflow: hidden; }
.hh-bar { flex: 1; height: 6px; background: #222; border-radius: 3px; overflow: hidden; }
.hh-bar i { display: block; height: 100%; width: 50%; transition: width .2s; }
.hh-bar.hp i { background: linear-gradient(#7af27a, #2fa83a); } .hh-bar.sp i { background: linear-gradient(#7ac0ff, #2f6ad8); } .hh-bar.ex i { background: linear-gradient(#ffe27a, #d89a1a); }
#stageCtrls { position: absolute; right: 6px; top: 6px; display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.sc-btn { min-width: 44px; height: 26px; border-radius: 13px; border: 1px solid #ffffff40; background: #000a; font-size: 12px; font-weight: 700; padding: 0 8px; display: flex; align-items: center; gap: 3px; }
.sc-btn.on { border-color: var(--gold); color: var(--gold); }
.sc-btn.chest.ready { border-color: #ffe066; box-shadow: 0 0 10px #ffd04a; animation: pulse 1.2s infinite; }
.sc-btn.chest span { font-size: 11px; font-weight: 600; }
#chatTicker { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; display: flex; align-items: center; gap: 4px; padding: 0 8px; background: linear-gradient(90deg, #000c, #0006); font-size: 12px; cursor: pointer; overflow: hidden; }
#chatTicker span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-ch { color: #ffd36b; flex: none; }
#buffBar { position: absolute; left: 6px; top: 58px; display: flex; gap: 3px; pointer-events: none; }
#buffBar .bf { position: relative; width: 22px; height: 22px; border: 1px solid #ffffff55; border-radius: 4px; background: #000a; }
#buffBar .bf .icon { width: 20px; height: 20px; }
#buffBar .bf em { position: absolute; bottom: -2px; right: 0; font-size: 8px; font-style: normal; text-shadow: 0 0 2px #000; }
/* panel */
#panel { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; background: linear-gradient(#251c3e, #1a1330); border-top: 2px solid var(--gold2); }
#panelBody { padding: 8px 10px 16px; }
#nav { flex: none; height: var(--nav-h); display: grid; grid-template-columns: repeat(6, 1fr); background: linear-gradient(#2d2350, #150f28); border-top: 2px solid var(--gold2); padding-bottom: env(safe-area-inset-bottom); }
#nav button { position: relative; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; font-size: 11px; color: var(--muted); padding: 2px 0; min-width: 0; }
#nav button .icon { width: 28px; height: 28px; filter: grayscale(.5) brightness(.8); }
#nav button span { white-space: nowrap; }
#nav button.on { color: var(--gold); background: radial-gradient(ellipse at 50% 100%, #f3c75f33, transparent 70%); }
#nav button.on .icon { filter: none; transform: translateY(-2px); }
.badge { position: absolute; top: 3px; right: calc(50% - 22px); background: #e43; color: #fff; font-size: 10px; min-width: 15px; height: 15px; border-radius: 8px; line-height: 15px; text-align: center; font-weight: 700; }
/* generic UI */
h3.sec { margin: 10px 0 6px; font-size: 14px; font-weight: 600; color: var(--gold); display: flex; align-items: center; gap: 6px; }
h3.sec:first-child { margin-top: 2px; }
h3.sec small { color: var(--muted); font-weight: 400; font-size: 11px; margin-left: auto; }
.card { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px; margin-bottom: 8px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); } .gold { color: var(--gold); } .good { color: var(--green); } .bad { color: var(--red); }
.small { font-size: 11px; } .tiny { font-size: 10px; }
.btn { border: 1px solid #c99a3a; background: linear-gradient(#f6d27a, #c48a2a); color: #2a1600; font-weight: 600; border-radius: 9px; padding: 5px 12px; font-size: 13px; white-space: nowrap; }
.btn.alt { background: linear-gradient(#4b3c78, #33285a); color: var(--text); border-color: var(--line); }
.btn.red { background: linear-gradient(#ff7a6a, #c03030); color: #fff; border-color: #ff9a8a; }
.btn.green { background: linear-gradient(#8ef08a, #3a9a3a); color: #072a07; border-color: #9af59a; }
.btn.sm { padding: 2px 8px; font-size: 12px; border-radius: 7px; }
.btn:disabled { filter: grayscale(1) brightness(.7); cursor: default; }
.chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.chip { border: 1px solid var(--line); background: #0004; border-radius: 12px; padding: 2px 10px; font-size: 12px; }
.chip.on { background: var(--gold); color: #2a1600; border-color: var(--gold); font-weight: 600; }
.bar { height: 7px; border-radius: 4px; background: #0008; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, #ffd34d, #ff9a1a); }
.bar.job i { background: linear-gradient(90deg, #7ad0ff, #3a7ae8); }
/* hero tab */
.hero-card { display: flex; gap: 10px; align-items: center; }
.portrait { width: 84px; height: 84px; border-radius: 12px; border: 2px solid var(--gold2); background: radial-gradient(#5a4a96, #2a2048); background-repeat: no-repeat; image-rendering: pixelated; flex: none; }
.hero-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hero-meta .nm { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lvrow { display: grid; grid-template-columns: 64px 1fr 76px; gap: 6px; align-items: center; font-size: 11px; }
.lvrow em { font-style: normal; text-align: right; color: var(--muted); white-space: nowrap; overflow: hidden; }
.eq-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.slot { position: relative; aspect-ratio: 1; border-radius: 9px; border: 2px solid #ffffff2a; background: #0005; display: grid; place-items: center; cursor: pointer; }
.slot .icon { width: 40px; height: 40px; }
.slot .ref { position: absolute; top: 1px; left: 3px; font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.slot .lbl { position: absolute; bottom: -1px; left: 0; right: 0; text-align: center; font-size: 9px; color: var(--muted); }
.slot.empty .lbl { bottom: auto; }
.slot.glow7 { box-shadow: 0 0 8px #5ff0ff; } .slot.glow9 { box-shadow: 0 0 10px #ffd24a; } .slot.glow10 { animation: rainbow 2s linear infinite; }
@keyframes rainbow { 0% { box-shadow: 0 0 10px #ff4d4d; } 33% { box-shadow: 0 0 10px #4dff7a; } 66% { box-shadow: 0 0 10px #4da6ff; } 100% { box-shadow: 0 0 10px #ff4d4d; } }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 10px; }
.stat { display: flex; align-items: center; gap: 6px; background: #0004; border-radius: 8px; padding: 3px 6px; font-size: 13px; }
.stat b { width: 34px; color: var(--gold); font-weight: 600; }
.stat .v { flex: 1; } .stat .v small { color: var(--green); font-size: 11px; }
.stat button { width: 24px; height: 22px; border-radius: 6px; border: 1px solid var(--gold2); background: #f3c75f22; color: var(--gold); font-weight: 700; padding: 0; }
.derived { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: 12px; }
.derived div { background: #0004; border-radius: 6px; padding: 2px 6px; display: flex; justify-content: space-between; gap: 4px; white-space: nowrap; }
.derived span { color: var(--muted); }
/* items */
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.it { position: relative; aspect-ratio: 1; border-radius: 8px; border: 2px solid #777; background: #0006; display: grid; place-items: center; cursor: pointer; }
.it .icon { width: 38px; height: 38px; }
.it .q { position: absolute; right: 3px; bottom: 0; font-size: 11px; font-weight: 600; text-shadow: 0 0 3px #000, 0 0 2px #000; }
.it .ref { position: absolute; left: 3px; top: 0; font-size: 11px; font-weight: 700; text-shadow: 0 0 3px #000; }
.it .eqd { position: absolute; right: 2px; top: 1px; font-size: 9px; background: var(--gold); color: #2a1600; border-radius: 4px; padding: 0 3px; font-weight: 700; }
.r-common { border-color: #9a9aa6; } .r-uncommon { border-color: #5fd35f; } .r-rare { border-color: #4aa3ff; } .r-epic { border-color: #b35cff; } .r-legendary { border-color: #ffb22e; box-shadow: inset 0 0 8px #ffb22e66; }
.t-common { color: #fff; } .t-uncommon { color: #7ae87a; } .t-rare { color: #6ab8ff; } .t-epic { color: #c98aff; } .t-legendary { color: #ffc45a; }
.empty-note { text-align: center; color: var(--muted); padding: 18px 0; font-size: 13px; }
/* list rows */
.li { display: flex; align-items: center; gap: 8px; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px; margin-bottom: 6px; }
.li .icon { width: 36px; height: 36px; }
.li .t { font-weight: 600; font-size: 13px; display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.li .d { font-size: 11px; color: var(--muted); line-height: 1.35; }
.li.locked { opacity: .55; }
.toggle { width: 38px; height: 22px; border-radius: 11px; border: 1px solid var(--line); background: #0006; position: relative; flex: none; padding: 0; }
.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #888; transition: .15s; }
.toggle.on { background: #3a8a3a; border-color: #6ddc6a; } .toggle.on::after { left: 18px; background: #fff; }
.lvpill { font-size: 11px; background: #0006; border-radius: 6px; padding: 0 6px; color: var(--gold); white-space: nowrap; }
/* stages */
.chapter { margin-bottom: 8px; }
.chapter .ch-h { display: flex; justify-content: space-between; align-items: center; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.stage-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.stg { border: 1px solid var(--line); border-radius: 8px; background: #0005; padding: 3px 0; text-align: center; font-size: 12px; font-weight: 600; line-height: 1.2; }
.stg small { display: block; font-size: 9px; font-weight: 400; }
.stg.cleared { border-color: #6ddc6a88; } .stg.here { border-color: var(--gold); background: #f3c75f22; } .stg.locked { opacity: .4; } .stg.boss { color: #ff9a8a; }
/* modal */
#modalRoot { position: absolute; inset: 0; z-index: 50; pointer-events: none; }
.modal-bg { position: absolute; inset: 0; background: #000a; display: flex; align-items: center; justify-content: center; padding: 14px; pointer-events: auto; animation: fade .15s; }
.modal { width: 100%; max-height: 88%; overflow-y: auto; background: linear-gradient(#2e2352, #1e1638); border: 2px solid var(--gold2); border-radius: 14px; padding: 12px; box-shadow: 0 10px 40px #000; animation: pop .18s ease-out; }
.modal h2 { margin: 0 0 8px; font-size: 17px; font-weight: 600; color: var(--gold); text-align: center; }
.modal .acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.modal .x { float: right; border: 0; background: none; font-size: 20px; color: var(--muted); margin: -6px -4px 0 0; }
@keyframes pop { from { transform: scale(.85); opacity: 0; } } @keyframes fade { from { opacity: 0; } }
.rw-grid { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.rw { display: flex; flex-direction: column; align-items: center; width: 74px; flex: 0 0 74px; font-size: 11px; text-align: center; }
.rw .it { width: 46px; height: 46px; aspect-ratio: auto; }
.rw span { line-height: 1.45; margin-top: 2px; max-width: 74px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: 1px; }
.thw { word-break: normal; overflow-wrap: normal; line-break: strict; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; font-size: 13px; }
.kv span { color: var(--muted); }
.refine-box { text-align: center; }
.refine-box .big { font-size: 30px; font-weight: 700; color: var(--gold); }
.refine-box .anim-ok { animation: rok .6s; } .refine-box .anim-fail { animation: rfail .4s; }
@keyframes rok { 0% { transform: scale(1); } 40% { transform: scale(1.5); text-shadow: 0 0 20px #fff27a; } }
@keyframes rfail { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }
textarea { width: 100%; min-height: 90px; background: #0007; color: var(--text); border: 1px solid var(--line); border-radius: 8px; font-family: monospace; font-size: 11px; padding: 6px; word-break: break-all; }
/* chat */
.chat-log { height: 300px; overflow-y: auto; background: #0005; border-radius: 8px; padding: 6px; font-size: 12px; display: flex; flex-direction: column; gap: 3px; }
.chat-log .m b { font-weight: 600; } .chat-log .m .ch { color: #ffd36b; } .chat-log .m.party .ch { color: #7ae8ff; } .chat-log .m.guild .ch { color: #9aff7a; } .chat-log .m.me b { color: var(--gold); } .chat-log .m.sys { color: #ffb0f0; }
.chat-in { display: flex; gap: 6px; margin-top: 6px; } .chat-in input { flex: 1; min-width: 0; border-radius: 8px; border: 1px solid var(--line); background: #0007; color: var(--text); padding: 6px; font-family: inherit; }
/* toasts */
#toasts { position: absolute; left: 0; right: 0; top: calc(var(--top-h) + 4px); z-index: 60; display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none; }
.toast { background: #000d; border: 1px solid var(--gold2); border-radius: 10px; padding: 4px 12px; font-size: 12px; animation: toast 2.6s forwards; max-width: 90%; display: flex; align-items: center; gap: 6px; }
.toast.act { pointer-events: auto; animation: none; }
@keyframes toast { 0% { transform: translateY(-10px); opacity: 0; } 10% { transform: none; opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
/* loading */
#loading { position: absolute; inset: 0; z-index: 100; background: radial-gradient(#3b2a66, #120c22); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; transition: opacity .4s; }
.ld-logo { font-size: 34px; font-weight: 700; color: #fff; text-shadow: 0 3px 0 #5a2a9a, 0 0 18px #b07aff; }
.ld-logo b { color: var(--gold); }
.ld-sub { color: var(--muted); letter-spacing: 3px; }
.ld-bar { width: 60%; height: 8px; border-radius: 4px; background: #0008; overflow: hidden; } .ld-bar i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
#ldText { font-size: 12px; color: var(--muted); }
.rank { width: 100%; border-collapse: collapse; font-size: 12px; } .rank td { padding: 2px 4px; border-bottom: 1px solid #ffffff12; white-space: nowrap; } .rank td:last-child { text-align: right; } .rank tr.me td { color: var(--gold); font-weight: 600; }
.party-m { display: flex; align-items: center; gap: 6px; background: #0004; border-radius: 8px; padding: 4px 6px; font-size: 12px; margin-bottom: 4px; }
.party-m .avatar { width: 30px; height: 30px; }

#bossbar .bb-name { display: flex; gap: 6px; align-items: baseline; font-weight: 700; font-size: 14px; color: #ffe6d0; text-shadow: 0 1px 0 #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bossbar .bb-name #bbLv { font-size: 11px; color: #ffd23f; }
#bossbar .bb-track { position: relative; height: 14px; margin-top: 2px; background: #1a0306; border: 1px solid #000; border-radius: 4px; overflow: hidden; box-shadow: inset 0 0 0 1px #ff8a7a44; }
#banner.boss { top: 30%; color: #fff; font-size: 44px; letter-spacing: 6px; padding: 10px 0 8px; background: linear-gradient(90deg, transparent, #b00a14ee 15%, #d0101cee 50%, #b00a14ee 85%, transparent); text-shadow: 0 3px 0 #4a0006, 0 0 16px #ff4a4a; animation: bossban 2.2s ease-out forwards; }
#banner.boss::before, #banner.boss::after { content: ''; position: absolute; left: 0; right: 0; height: 6px; background: repeating-linear-gradient(-45deg, #ffd23f 0 10px, #1a1a1a 10px 20px); opacity: .95; }
#banner.boss::before { top: -6px; } #banner.boss::after { bottom: -6px; }
#banner.boss small { color: #ffe6a0; font-size: 18px; letter-spacing: 1px; }
@keyframes bossban { 0% { transform: scaleY(0); opacity: 0; } 10% { transform: scaleY(1.15); opacity: 1; } 18% { transform: scaleY(1); } 85% { opacity: 1; } 100% { opacity: 0; transform: scaleX(1.3); } }
#stage.warn::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 60px 20px #ff1a1a88; animation: warn .5s ease-in-out 4 alternate; }
@keyframes warn { from { opacity: .2; } to { opacity: 1; } }
/* desktop: phone frame floats over a blurred, living version of the current stage scene (QA r2 #8) */
#deskbg { display: none; }
@media (min-width: 700px) {
  body { background: #0b0816; }
  #deskbg { display: block; position: fixed; inset: -40px; z-index: 0; pointer-events: none; overflow: hidden; }
  #deskbg i { position: absolute; inset: 0; background-repeat: repeat-x; background-position: center bottom; background-size: auto 100%; image-rendering: pixelated; filter: blur(9px) saturate(1.15) brightness(.62); transition: opacity .8s; }
  #deskbg i.l2 { background-size: auto 78%; animation: deskpan 90s linear infinite; }
  #deskbg i.l3 { background-size: auto 46%; filter: blur(5px) saturate(1.1) brightness(.55); animation: deskpan 45s linear infinite; }
  #deskbg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 34% 70% at 50% 50%, rgba(10,6,20,.15) 0%, rgba(10,6,20,.55) 70%, rgba(6,4,12,.85) 100%); }
  #deskbg .lights { position: absolute; inset: 0; background: radial-gradient(circle at 18% 30%, rgba(255,220,140,.16) 0 6%, transparent 7%), radial-gradient(circle at 82% 22%, rgba(160,200,255,.14) 0 5%, transparent 6%), radial-gradient(circle at 75% 78%, rgba(255,160,220,.12) 0 4%, transparent 5%); filter: blur(14px); animation: desklights 8s ease-in-out infinite alternate; }
  #app { z-index: 1; }
}
@keyframes deskpan { from { background-position-x: 0; } to { background-position-x: -1200px; } }
@keyframes desklights { from { opacity: .5; transform: translateY(0); } to { opacity: 1; transform: translateY(-14px); } }

#bossbar #bbTime { margin-left: auto; font-size: 12px; color: #ffd23f; font-weight: 600; }
#stage.has-boss #siTimer { display: none; }
.cos-grid { grid-template-columns: repeat(4, 1fr); }
.cos-grid .slot .lbl { font-size: 10px; line-height: 1.5; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; padding: 0 3px; }
/* ---- refine forge scene (feature 3) ---- */
.forge { position: relative; height: 192px; margin: 4px auto 6px; width: 100%; max-width: 320px; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 85%, #6a3a1a 0%, #2a1630 60%, #140c1e 100%); box-shadow: inset 0 0 0 2px #5b4a86; }
.forge img { position: absolute; image-rendering: pixelated; }
.forge .anvil { width: 144px; left: calc(50% - 72px); bottom: 6px; }
.forge .fitem { position: absolute; width: 50px; height: 50px; left: calc(50% - 25px); bottom: 74px; aspect-ratio: auto; transition: filter .3s; }
.forge .hammer { width: 72px; left: calc(50% + 4px); bottom: 70px; transform-origin: 74% 82%; transform: rotate(32deg); }
.forge.hit .hammer { animation: hammer .36s cubic-bezier(.5,0,.7,1); }
@keyframes hammer { 0% { transform: rotate(32deg); } 40% { transform: rotate(58deg); } 72% { transform: rotate(-14deg); } 100% { transform: rotate(32deg); } }
.forge .sparks { position: absolute; left: calc(50% - 40px); bottom: 100px; width: 80px; height: 40px; pointer-events: none; }
.forge.hit .sparks { background: radial-gradient(circle at 20% 70%, #ffe14a 0 2px, transparent 3px), radial-gradient(circle at 75% 50%, #ffb22e 0 2px, transparent 3px), radial-gradient(circle at 50% 20%, #fff 0 2px, transparent 3px), radial-gradient(circle at 35% 35%, #ffd24a 0 1.5px, transparent 2.5px), radial-gradient(circle at 62% 80%, #ff9f1c 0 1.5px, transparent 2.5px); animation: sparks .36s ease-out; }
@keyframes sparks { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.6) translateY(-10px); opacity: 0; } }
.forge.suspense .fitem { animation: suspense .9s ease-in-out; } .forge.suspense { animation: forgedark .9s ease-in-out forwards; }
@keyframes suspense { 0%,100% { transform: scale(1); } 20% { transform: scale(1.08) translateX(-1px); } 40% { transform: scale(1.04) translateX(1px); } 60% { transform: scale(1.12) translateX(-1px); } 80% { transform: scale(1.06) translateX(1px); } }
@keyframes forgedark { to { box-shadow: inset 0 0 0 2px #5b4a86, inset 0 0 60px #000; } }
.forge .rays { position: absolute; inset: -60%; opacity: 0; pointer-events: none; }
.forge.res-ok .rays { opacity: 1; background: repeating-conic-gradient(from 0deg, #ffd24a55 0 10deg, transparent 10deg 22deg); animation: rays 4s linear infinite; mask-image: radial-gradient(circle, #000 25%, transparent 60%); -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 60%); }
.forge.res-ok { background: radial-gradient(ellipse at 50% 55%, #fff2b3 0%, #ffd24a 18%, #8a4a12 50%, #2a1630 100%); }
.forge.res-ok .fitem { filter: drop-shadow(0 0 10px #ffd24a) brightness(1.25); animation: pop .5s ease-out; }
@keyframes rays { to { transform: rotate(360deg); } } @keyframes pop { 0% { transform: scale(.6); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.forge .smoke { position: absolute; width: 96px; height: 96px; left: calc(50% - 48px); bottom: 54px; background: url(../assets/ui/gen/smoke.png) 0 0 / 576px 96px no-repeat; image-rendering: pixelated; opacity: 0; }
.forge.res-fail .smoke { opacity: 1; animation: smoke .9s steps(6) forwards; } .forge.res-fail .fitem { filter: grayscale(.85) brightness(.7); }
.forge.res-fail { background: radial-gradient(ellipse at 50% 85%, #3a3a46 0%, #1e1a28 60%, #0e0a14 100%); }
@keyframes smoke { to { background-position: -576px 0; } }
.forge .fres { position: absolute; left: 0; right: 0; top: 8px; text-align: center; text-shadow: 0 2px 0 #000; }
.forge .fres b { display: block; font-size: 26px; font-weight: 700; } .forge .fres span { font-size: 13px; }
.forge.res-ok .fres b { color: #fff6c8; } .forge.res-fail .fres b { color: #c9c9d6; }
.pity { margin: 4px auto; max-width: 280px; } .pbar { height: 8px; background: #0008; border-radius: 4px; overflow: hidden; border: 1px solid #000; } .pbar i { display: block; height: 100%; background: linear-gradient(90deg, #3fa34d, #7be0a5); }
.stone { display: flex; align-items: center; justify-content: space-between; gap: 8px; max-width: 300px; margin: 4px auto; font-size: 12px; } .stepper { display: flex; align-items: center; gap: 6px; flex: none; } .stepper .chip { min-width: 28px; }
/* announcements */
.chat-log .m.ann { color: var(--ann, #ffd36b); font-weight: 600; } #chatTicker.ann #ctText { color: var(--ann, #ffd36b); font-weight: 600; }
#banner.gold { color: #ffd24a; font-size: 20px; padding: 8px 6px; background: linear-gradient(90deg, transparent, #4a2a08dd 15%, #6a3a0add 50%, #4a2a08dd 85%, transparent); }
#banner.legend { color: #fff; font-size: 20px; padding: 8px 6px; background: linear-gradient(90deg, transparent, #ff66ffcc 15%, #5ff0ffcc 50%, #ffd24acc 85%, transparent); }
#flash { position: absolute; inset: 0; pointer-events: none; z-index: 80; opacity: 0; }
.forge .fres { top: 6px; } .forge .fres b { display: inline; font-size: 24px; } .forge .fres span { display: block; font-size: 12px; margin-top: -2px; }
.forge.res-ok .hammer, .forge.res-fail .hammer { opacity: 0; transition: opacity .2s; } .forge.res-ok .fitem, .forge.res-fail .fitem { bottom: 80px; }
.forge.res-ok .fitem, .forge.res-fail .fitem { bottom: 78px; } .forge[class*="res-"] .anvil { bottom: 2px; }
/* ---- daily quests + battle pass (feature 4) ---- */
.tb-btn.quest { position: relative; display: grid; place-items: center; } .tb-btn.quest .icon { transform: scale(1.1); } .tb-btn.quest.dim { opacity: .55; }
.tb-btn .badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #e23b3b; color: #fff; font-size: 11px; font-weight: 700; line-height: 17px; border: 1px solid #fff8; box-shadow: 0 0 0 1px #000; animation: badgepulse 1.6s ease-in-out infinite; }
@keyframes badgepulse { 50% { transform: scale(1.15); } }
.qtabs { justify-content: center; margin-bottom: 6px; }
.qlist { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.qrow { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; background: #0005; border: 1px solid var(--line); }
.qrow.ready { border-color: #ffd24a; box-shadow: 0 0 10px #ffd24a44 inset; } .qrow.claimed { opacity: .55; }
.qcat { flex: none; width: 52px; font-size: 10px; text-align: center; padding: 3px 0; border-radius: 6px; background: #5b4a86; white-space: nowrap; }
.qcat.c-combat { background: #8a2a2a; } .qcat.c-idle { background: #2a5a8a; } .qcat.c-growth { background: #7a5a12; } .qcat.c-dungeon { background: #4a2a7a; } .qcat.c-pet { background: #2a7a4a; } .qcat.c-economy { background: #6a6a2a; }
.qmain { flex: 1; min-width: 0; } .qname { font-size: 13px; font-weight: 600; line-height: 1.45; } .qmain .small { line-height: 1.45; margin-top: 2px; }
.qmain .pbar { margin-top: 3px; } .qact { flex: none; min-width: 58px; text-align: right; font-size: 12px; }
.qbonus { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: linear-gradient(90deg, #4a2a08aa, #2a1630aa); border: 1px solid #ffd24a88; } .qbonus.claimed { opacity: .6; }
.bphead { text-align: center; display: flex; flex-direction: column; gap: 3px; align-items: center; } .bphead .pbar { width: 90%; height: 10px; } .bpxp i { background: linear-gradient(90deg, #ffb22e, #ffe14a); }
.bptrack { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 10px 2px 8px; margin: 8px -4px 4px; -webkit-overflow-scrolling: touch; }
.bpt { flex: none; width: 84px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border-radius: 10px; background: #0006; border: 1px solid var(--line); position: relative; }
.bpt .it { width: 44px; } .bpt.big { background: linear-gradient(#5a3a9a88, #0006); border-color: #c58bff; } .bpt.lock { opacity: .62; } .bpt.got { opacity: .5; }
.bpt.can { border-color: #ffd24a; box-shadow: 0 0 12px #ffd24a66; } .bpn { font-weight: 700; font-size: 12px; color: #ffd36b; }
.bpl { font-size: 10px; text-align: center; line-height: 1.4; height: 2.8em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } .bps { font-size: 13px; height: 24px; line-height: 24px; } .bpt .btn.sm { padding: 3px 10px; }
.box-open { animation: pop .5s ease-out; }
/* ---- pet panel + evolution (feature 5) ---- */
.petpanel { background: linear-gradient(#2e2250cc, #1d1534cc); border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin-bottom: 8px; } .petpanel.evo { border-color: #ffd24a; box-shadow: 0 0 14px #ffd24a44 inset; }
.pp-top { display: flex; gap: 8px; align-items: center; } .pp-spr { width: 96px; height: 96px; flex: none; border-radius: 10px; background-color: #0005; animation: ppbob 1.6s ease-in-out infinite; image-rendering: pixelated; }
@keyframes ppbob { 50% { transform: translateY(-3px); } }
.pp-bar { display: flex; justify-content: space-between; font-size: 12px; margin-top: 4px; } .pbar.intim, .pbar.hunger { position: relative; height: 9px; }
.pbar.intim i:not(.seg) { background: linear-gradient(90deg, #ff7eb6, #ff4f7a); } .pbar.hunger i { background: linear-gradient(90deg, #ffb22e, #ffe14a); }
.pbar .seg { position: absolute; top: 0; bottom: 0; width: 1px !important; background: #fff6 !important; z-index: 2; }
.tier-awkward { color: #aaa; } .tier-shy { color: #ffb3d1; } .tier-neutral { color: #fff; } .tier-cordial { color: #7be0a5; } .tier-loyal { color: #ffd24a; }
.pp-food { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 8px; }
.foodbtn { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 5px 3px; border-radius: 9px; border: 1px solid var(--line); background: #0005; font-size: 11px; line-height: 1.35; min-width: 0; }
.foodbtn span { max-width: 100%; text-align: center; } .foodbtn.fav { border-color: #ff7eb6; background: #ff4f7a22; } .foodbtn:disabled { opacity: .45; } .foodbtn small { color: #ffd6e6; }
.pp-skills { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; } .pskill { display: flex; align-items: center; gap: 6px; font-size: 12px; } .pskill.off { opacity: .55; } .pskill b { flex: 1; min-width: 0; font-weight: 600; }
.ptype { flex: none; font-size: 10px; padding: 1px 6px; border-radius: 6px; background: #5b4a86; } .ptype.t-heal { background: #2a7a4a; } .ptype.t-loot { background: #7a5a12; } .ptype.t-buff { background: #2a5a8a; } .ptype.t-attack { background: #8a2a2a; }
.pp-evo { margin-top: 8px; padding: 6px; border-radius: 9px; background: #0005; display: flex; flex-direction: column; gap: 4px; align-items: center; } .evo-req { display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; font-size: 11px; }
.lvpill.gold { background: #6a4a0a; color: #ffd24a; }
.fheart { position: absolute; width: 18px; image-rendering: pixelated; pointer-events: none; z-index: 90; animation: fheart 1.4s ease-out forwards; opacity: 0; }
@keyframes fheart { 0% { opacity: 0; transform: translateY(0) scale(.6); } 15% { opacity: 1; transform: translateY(-8px) scale(1.1); } 100% { opacity: 0; transform: translateY(-60px) scale(1); } }
.evo-scene { position: relative; height: 260px; border-radius: 12px; overflow: hidden; background: radial-gradient(circle at 50% 55%, #3a2a6a, #120c22 70%); }
.evo-spr { position: absolute; width: 160px; height: 160px; left: calc(50% - 80px); top: 40px; image-rendering: pixelated; }
.evo-spr.to { opacity: 0; } .evo-scene.charging .evo-spr.from { animation: evocharge 2.3s ease-in forwards; }
@keyframes evocharge { 0% { filter: brightness(1); } 20% { filter: brightness(2.2); } 30% { filter: brightness(1); } 45% { filter: brightness(3); } 55% { filter: brightness(1.2); } 65% { filter: brightness(4); } 72% { filter: brightness(1.5); } 80% { filter: brightness(6); } 85% { filter: brightness(2); } 90%, 100% { filter: brightness(10) saturate(0); transform: scale(1.08); } }
.evo-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; } .evo-scene.burst .evo-flash { animation: evoflash .7s ease-out forwards; }
@keyframes evoflash { 0% { opacity: 0; } 25% { opacity: 1; } 100% { opacity: 0; } }
.evo-scene.burst .evo-spr.from { opacity: 0; } .evo-scene.burst .evo-spr.to { opacity: 1; animation: pop .6s ease-out; }
.evo-rays { position: absolute; inset: -50%; opacity: 0; background: repeating-conic-gradient(#ffd24a44 0 8deg, transparent 8deg 20deg); mask-image: radial-gradient(circle, #000 20%, transparent 60%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 60%); }
.evo-scene.burst .evo-rays { opacity: 1; animation: rays 6s linear infinite; }
.evo-txt { position: absolute; left: 0; right: 0; top: 8px; text-align: center; text-shadow: 0 2px 0 #000; display: flex; flex-direction: column; gap: 2px; } .evo-txt b { font-size: 20px; color: #fff6c8; } .evo-txt span { color: #ffd24a; font-weight: 600; } .evo-txt small { font-size: 11px; color: #ddd; }
.evo-scene.done .evo-txt { top: auto; bottom: 8px; }
/* ---- golden monster + events (feature 6) ---- */
#banner.golden { color: #fff3b0; font-size: 26px; padding: 8px 4px; background: linear-gradient(90deg, transparent, #8a5a08ee 12%, #d89a1aee 50%, #8a5a08ee 88%, transparent); text-shadow: 0 2px 0 #5a3a00, 0 0 14px #ffd24a; }
#banner.golden small { color: #fff; } #banner.wbwarn { color: #ffb36a; font-size: 26px; background: linear-gradient(90deg, transparent, #3a1a0aee 15%, #6a2a0aee 50%, #3a1a0aee 85%, transparent); padding: 8px 0; }
.evt-btn { position: absolute; left: 8px; top: 102px; z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 0; padding: 3px 5px 2px; border-radius: 10px; border: 1px solid var(--line); background: #0009; font-size: 10px; color: #ffe6a0; }
.evt-btn img { width: 32px; height: 24px; object-fit: none; object-position: 0 0; image-rendering: pixelated; } .evt-btn.live { border-color: #ffd24a; box-shadow: 0 0 10px #ffd24a66; animation: badgepulse 2.2s ease-in-out infinite; }
.evt-hero { position: relative; height: 150px; border-radius: 12px; overflow: hidden; background: linear-gradient(#0b1030, #1a2a6a 62%, #173a86 62%, #0e2560); margin-bottom: 6px; }
.evt-hero .moon, .wish-scene .moon { position: absolute; right: 26px; top: 14px; width: 40px; height: 40px; border-radius: 50%; background: #fff3c0; box-shadow: 0 0 24px 8px #fff3c066; }
.evt-hero .river, .wish-scene .river { position: absolute; left: 0; right: 0; bottom: 0; height: 38%; background: repeating-linear-gradient(0deg, transparent 0 9px, #8ab8ff22 9px 10px); }
.evt-hero .kt { position: absolute; width: 64px; height: 48px; object-fit: none; object-position: 0 0; image-rendering: pixelated; transform: scale(1); filter: drop-shadow(0 0 6px #ffd23f); animation: ktfloat 9s linear infinite; bottom: 10px; }
.evt-hero .kt { width: 32px; height: 24px; scale: 2; } .evt-hero .k0 { animation-delay: 0s; bottom: 18px; } .evt-hero .k1 { animation-delay: -2.3s; bottom: 6px; } .evt-hero .k2 { animation-delay: -4.6s; bottom: 22px; } .evt-hero .k3 { animation-delay: -6.9s; bottom: 9px; }
@keyframes ktfloat { from { left: 105%; } to { left: -20%; } }
.evt-title { position: absolute; left: 10px; top: 10px; right: 76px; display: flex; flex-direction: column; gap: 2px; text-shadow: 0 2px 0 #000; } .evt-title b { font-size: 18px; color: #ffe6a0; line-height: 1.4; } .evt-title span { font-size: 11px; color: #cfd8ff; }
.evt-title em { font-style: normal; font-size: 11px; padding: 1px 6px; border-radius: 6px; width: max-content; } .evt-title .prev { background: #5b4a86; color: #fff; } .evt-title .peak { background: #d89a1a; color: #2a1600; }
.evt-tok { display: flex; align-items: center; gap: 6px; justify-content: center; margin: 4px 0; } .evt-flav { text-align: center; line-height: 1.5; margin: 4px 0; }
.evt-mons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; } .emon { display: flex; flex-direction: column; align-items: center; font-size: 10px; text-align: center; line-height: 1.35; background: #0005; border-radius: 9px; padding: 4px 2px; border: 1px solid var(--line); } .emon.boss { border-color: #ff5a5a; } .emon .avatar { background-color: transparent; border: 0; }
.evt-stage { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px; border-radius: 10px; background: linear-gradient(90deg, #173a86aa, #2a1630aa); border: 1px solid #8ab8ff66; } .evt-stage .small { line-height: 1.5; }
.eshop { display: flex; flex-direction: column; gap: 5px; margin-top: 6px; } .erow { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 9px; background: #0005; border: 1px solid var(--line); } .erow .t { font-size: 13px; line-height: 1.45; } .erow .btn { flex: none; min-width: 74px; }
.wish-scene { position: relative; height: 190px; border-radius: 12px; overflow: hidden; background: linear-gradient(#0b1030, #1a2a6a 55%, #173a86 55%, #0e2560); }
.wish-scene .wkt { position: absolute; width: 32px; height: 24px; object-fit: none; object-position: 0 0; image-rendering: pixelated; scale: 3; left: calc(50% - 16px); bottom: 26px; filter: drop-shadow(0 0 5px #ffd23f); }
.wish-scene .wkt.go { animation: wishgo 2.4s ease-in forwards; } @keyframes wishgo { 0% { transform: translate(0, 0); } 30% { transform: translate(0, -4px); } 100% { transform: translate(-60px, -26px); scale: 1.2; opacity: .2; } }
.wish-txt { position: absolute; left: 10px; right: 10px; top: 14px; text-align: center; color: #ffe6a0; text-shadow: 0 2px 0 #000; font-size: 14px; line-height: 1.5; padding-right: 50px; }
/* ---- card codex (feature 2) ---- */
.codex-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; margin: 2px 0 6px; border-radius: 10px; border: 1px solid var(--line); background: linear-gradient(90deg, #4a2a7a, #2a1630); text-align: left; }
.codex-btn span { display: flex; flex-direction: column; } .codex-btn small { color: #cbbfe8; font-size: 11px; } .codex-btn.new { border-color: #ffd24a; box-shadow: 0 0 10px #ffd24a55; }
.cx-pts { text-align: center; } .cxbar { position: relative; height: 9px; margin: 4px 0; } .cxbar i:not(.seg) { background: linear-gradient(90deg, #9a5ad0, #ffd24a); }
.cx-ms { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; } .cx-ms .chip { font-size: 10px; padding: 2px 7px; } .cx-ms .chip:disabled { opacity: .6; }
.cx-types { justify-content: center; flex-wrap: wrap; margin: 6px 0; }
.album { background: linear-gradient(#3a2a18, #2a1e12); border: 2px solid #8a6a3a; border-radius: 12px; padding: 8px; box-shadow: inset 0 0 20px #0008; }
.album-head { display: flex; align-items: center; gap: 6px; text-align: center; margin-bottom: 6px; } .album-head b { color: #ffe6a0; font-size: 14px; line-height: 1.45; }
.album-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.ccard { position: relative; height: 104px; border-radius: 8px; padding: 3px; display: flex; flex-direction: column; align-items: center; background: linear-gradient(160deg, #f4e6c0, #c8a870); border: 2px solid #6a4a2a; box-shadow: 0 2px 0 #0006; overflow: hidden; }
.ccard.r-rare { background: linear-gradient(160deg, #cfe6ff, #6a9ad8); } .ccard.r-epic { background: linear-gradient(160deg, #ecd8ff, #9a6ad8); } .ccard.r-legendary, .ccard.bossc { background: linear-gradient(160deg, #fff3c0, #e0a030); border-color: #8a5a10; }
.cc-art { width: 60px; height: 60px; flex: none; image-rendering: pixelated; background-color: #0002; border-radius: 6px; margin-top: 2px; }
.cc-name { font-size: 10px; line-height: 1.35; color: #2a1a10; text-align: center; font-weight: 600; margin-top: 2px; max-height: 2.7em; overflow: hidden; }
.ccard.none { background: #1a1424; border-color: #3a3050; } .ccard.none .cc-art { filter: brightness(0) opacity(.55); } .ccard.none .cc-name { color: #8a80a0; }
.ccard.own { box-shadow: 0 0 0 2px #ffd24a, 0 0 12px #ffd24a; animation: ownglow 1.4s ease-in-out infinite; } @keyframes ownglow { 50% { box-shadow: 0 0 0 2px #fff3b0, 0 0 20px #ffd24a; } } .cc-new { position: absolute; bottom: 2px; left: 2px; right: 2px; font-size: 9px; text-align: center; background: #d03a3a; color: #fff; border-radius: 4px; }
.cc-ok { position: absolute; top: 2px; right: 4px; color: #2a8a3a; font-weight: 700; font-size: 13px; } .ccard.just { animation: pop .5s ease-out; }
.cx-tiers { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; } .cx-tier { display: flex; gap: 8px; font-size: 11px; color: #a89878; line-height: 1.45; } .cx-tier b { flex: none; width: 46px; } .cx-tier.on { color: #ffe6a0; } .cx-tier.on b::before { content: '✓ '; color: #7be0a5; }
#cardPop { position: absolute; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; background: radial-gradient(circle, #0008 0%, transparent 70%); animation: fadein .3s; }
#cardPop .ccard { width: 112px; height: 140px; animation: cardflip 1s cubic-bezier(.2,.8,.3,1.2); box-shadow: 0 0 24px #ffd24a; } 
@keyframes cardflip { 0% { transform: perspective(400px) rotateY(540deg) scale(.2); } 100% { transform: perspective(400px) rotateY(0) scale(1); } }
#cardPop .cp-rays { position: absolute; width: 300px; height: 300px; background: repeating-conic-gradient(#ffd24a55 0 9deg, transparent 9deg 22deg); border-radius: 50%; mask-image: radial-gradient(circle, #000 20%, transparent 65%); -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 65%); animation: rays 5s linear infinite; }
#cardPop .cp-txt { position: relative; margin-top: 8px; font-size: 22px; font-weight: 700; color: #ffe14a; text-shadow: 0 2px 0 #000; text-align: center; display: flex; flex-direction: column; } #cardPop .cp-txt small { font-size: 13px; color: #fff; }
#cardPop.out { opacity: 0; transition: opacity .5s; } @keyframes fadein { from { opacity: 0; } }

.evt-soon { background: linear-gradient(90deg,#1d2350,#2a1d50); border: 1px solid #5a63b8; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; color: #ffe9a8; }
/* QA r3: boss fights — event button shrinks to an icon under the boss HP bar; boss banner sits in the top band, above the boss */
#bossbar:not(.hidden) ~ .evt-btn { top: 116px; padding: 2px 3px; animation: none; }
#bossbar:not(.hidden) ~ .evt-btn span { display: none; }
#banner.boss { top: 58px; font-size: 32px; letter-spacing: 5px; padding: 4px 0 4px; line-height: 1.1; z-index: 6; }
#banner.boss small { font-size: 15px; }
.forge .fitem .flv { position: absolute; right: -6px; bottom: -6px; font-style: normal; font-weight: 800; font-size: 13px; color: #ffe066; background: #1a1030; border: 1px solid #ffd24a; border-radius: 6px; padding: 0 4px; line-height: 16px; }
.refine-box .big.good { color: #8dff9a; } .refine-box .big.bad { color: #ff8a8a; }
.cx-rule { font-size: 11px; color: #ffe6a0; margin: 2px 0 4px; } .cx-tier.past { opacity: .55; }
.cx-tier .cx-use { font-style: normal; font-size: 10px; font-weight: 700; color: #1a1030; background: #8dff9a; border-radius: 6px; padding: 0 5px; margin-left: auto; white-space: nowrap; }
