/* These pages inherit the existing lobby typography and button skin. */
.end-unlocks{margin:20px 0;text-align:left}
.end-unlock-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:14px}
.end-unlock-card{padding:14px;background:#192c22;border:1px solid #708b75;border-radius:8px;text-align:center;animation:reward-reveal 1.1s ease-out both}
.end-unlock-card canvas{width:100%;height:150px;object-fit:contain}
.end-unlock-card h4{font-size:19px;margin:8px 0}
@media(prefers-reduced-motion:reduce){.end-unlock-card{animation:none}}
.market-reward-dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;overflow:auto;padding:24px;background:#14221b;color:#dce8de;border:1px solid #718778;border-radius:12px;text-align:center}
.market-reward-dialog::backdrop{background:#030a08c9}
.market-reward-reveal{animation:reward-reveal 1.2s ease-out both}
.market-reward-reveal canvas{display:block;width:100%;height:220px;object-fit:contain}
.market-reward-reveal h2{margin:8px 0;font-size:25px}
.market-reward-description{font-size:14px;line-height:1.6;color:#b9cdbd}
.market-reward-actions{display:flex;justify-content:center;gap:12px;margin-top:20px}
@keyframes reward-reveal{from{opacity:0;transform:translateY(16px) scale(.95)}to{opacity:1;transform:translateY(0) scale(1)}}
@media(prefers-reduced-motion:reduce){.market-reward-reveal{animation:none}}
body .panel.nightfall-lobby.lobby-scroll-layout{min-width:0;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
.nightfall-lobby .page-top-navigation{margin:0 0 18px;padding:0;border:0;display:flex;justify-content:flex-start}
.nightfall-lobby .page-top-navigation>.lobby-sprite-button{max-width:210px}
body .panel.nightfall-lobby.market-page-shell{min-width:0;box-sizing:border-box;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-gutter:stable}
.market-page{width:100%;text-align:left;color:inherit}
body .panel.nightfall-lobby.challenge-page-shell { height: min(900px, calc(100dvh - 80px)); display: flex; flex-direction: column; overflow: hidden !important; }
.challenge-page { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.challenge-page > :not(.market-content) { flex-shrink: 0; }
.challenge-page > .market-content { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.challenge-page .challenge-layout { flex: 1; min-height: 0; }
.challenge-page .chronicle-categories, .challenge-content { min-height: 0; overflow-y: auto; }
.challenge-content { padding-right: 6px; }
.challenge-page .market-challenge-grid { grid-template-columns: 1fr; }
.challenge-page .market-objective { background: #171d1a; border: 1px solid #38433d; border-radius: 7px; box-shadow: none; }
.challenge-page .market-mastery-intro { background: transparent; padding: 0; border: 0; }
.challenge-page .market-mastery-intro h3 { display: none; }
.challenge-page .market-mastery-intro p { font-size: 11px; }
.challenge-page .market-progress-line progress { accent-color: #a5915c; }
.challenge-page .chronicle-summary { width: 100%; margin-bottom: 18px; }
.challenge-page .lobby-heading { justify-content: center; text-align: center; height: 100px; box-sizing: border-box; }
.challenge-page .market-heading-actions:empty { display: none; }
.challenge-notice { display: inline-block; margin-left: 8px; border-radius: 9px; padding: 3px 7px; background: #d8bc76; color: #17231c; font-size: 10px; }
.challenge-new-dot { color: #e3c576; font-size: 10px; }
.challenge-help { margin: 0 0 14px; color: #adbbb1; font-size: 11px; }
.challenge-help summary { cursor: pointer; }
.challenge-help h3 { display: none; }
.challenge-page .market-challenge-card h3 { font-size: 13px; text-transform: none; letter-spacing: 0; color: #dbe2da; }
.challenge-page .market-challenge-card p { font-size: 11px; }
.challenge-page .market-toolbar { margin: 0 0 14px; }
.challenge-page .market-toolbar h3 { margin: 0; color: #ddc990; }
@media(max-width:600px){ .challenge-page .challenge-layout { grid-template-columns: 108px minmax(0,1fr); gap: 10px; } .challenge-page .market-challenge-card { grid-template-columns: 1fr; } .challenge-page .market-toolbar { flex-wrap: wrap; } .challenge-page .market-character { display: none; } }
.market-page .lobby-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.market-heading-actions{display:flex;gap:12px;align-items:center}
.market-wallet{color:#d8ddbf;white-space:nowrap;font-weight:600}
.market-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:20px 0}
.market-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.market-tabs button[aria-pressed=true]{border-color:#a1b9a4;background:#2e4337}
.market-character,.market-pose{display:flex;align-items:center;gap:10px;font-size:13px;color:#c5d0c4}
.market-page select{font:inherit;color:inherit;background:#1c2b23;border:1px solid #57675a;border-radius:5px;padding:9px 12px;max-width:100%}
.market-shop-layout{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(260px,1fr);gap:24px;align-items:start}
.market-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.market-tile{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;padding:10px;background:#17211b;border:1px solid #435248;border-radius:6px;color:#d8e0d3;font:inherit;cursor:pointer}
.market-tile:hover,.market-tile.selected{background:#23372b;border-color:#9ab3a0}
.market-tile:focus-visible{outline:2px solid #c5d6bd;outline-offset:3px}
.market-tile canvas{display:block;width:100%;height:125px;object-fit:contain}
.market-tile b{font-size:13px}.market-tile small{font-size:11px;color:#aebba9}
.market-detail{border-left:1px solid #435248;padding-left:24px;min-width:0;text-align:center;position:sticky;top:0}
.market-detail h3{font-size:19px;margin:4px 0;color:inherit}
.market-preview-canvas{width:100%;height:220px;object-fit:contain;display:block}
.market-pose{justify-content:center;margin-bottom:16px}
.market-source{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#aabda9;margin:9px 0}
.market-requirement{font-size:13px;line-height:1.5;min-height:22px;color:#cdd7c8}
.market-detail-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.market-page button:disabled{opacity:.5;cursor:default}
.market-detail>.market-text-button{width:100%;margin-top:8px!important}
.market-text-button:disabled{opacity:.35}
.market-page-back{border-top:1px solid #3c4b40;padding-top:18px;margin-top:24px;display:flex;justify-content:flex-start}
.market-page-back .lobby-sprite-button{max-width:210px;flex:1}
.market-page-back.market-top-back{border-top:0;padding-top:0;margin:0 0 18px}
.market-status{color:#ccdeb7;font-size:13px;padding:8px 0;margin:0}
.market-subtitle,.market-muted,.market-footnote{color:#adbdac;font-size:13px;line-height:1.6}
.market-footnote{margin:16px 0 0;font-size:12px}
.market-objectives{display:grid;gap:10px;margin-top:18px}
.market-objective{display:grid;grid-template-columns:minmax(0,1fr) 135px;gap:24px;align-items:center;border:1px solid #435248;border-radius:6px;background:#17211b;padding:18px}
.market-objective h3{margin:0 0 7px;font-size:16px}.market-objective p{margin:0 0 10px;font-size:13px;color:#b5c3af}
.market-progress-line{display:flex;gap:12px;align-items:center;font-size:12px;color:#b6c5ae}
.market-progress-line progress{flex:1;width:100%;height:7px;accent-color:#8aa886;max-width:380px}
.market-objective-actions{display:grid;gap:4px}.market-unlock-status{font-size:12px;color:#b6c9ad;text-align:right}
.market-weekly-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:36px;margin:24px 0;align-items:center}
.market-weekly-hero canvas{width:100%;height:190px;object-fit:contain}.market-weekly-hero .market-character{justify-content:center;flex-wrap:wrap}
.market-weekly-copy h3{font-size:28px;margin:10px 0}.market-weekly-copy p{font-size:14px;line-height:1.6;color:#bdcbb8;max-width:440px}
.market-kicker{font-size:11px;letter-spacing:.1em;color:#aebfa6}.market-weekly-reward{display:flex;align-items:center;gap:14px;margin:24px 0}.market-weekly-reward strong{font-size:32px;color:#e1d6a0}.market-weekly-reward span{font-size:14px}.market-weekly-reward small{color:#abb9a4;font-size:12px}
.market-build{text-align:center;max-width:660px;margin:24px auto}.market-build>canvas{width:100px;height:90px;object-fit:contain}.market-build h3{font-size:25px;margin:8px 0}.market-build p{font-size:14px;line-height:1.6;color:#bbcbb6}
.market-build-ingredients{display:grid;grid-template-columns:1fr 32px 1fr;gap:12px;align-items:center;margin-top:24px}.market-build-ingredients>div{display:flex;flex-direction:column;align-items:center;gap:9px;border:1px solid #435248;padding:18px;background:#17211b;border-radius:6px}.market-build-ingredients img{width:48px;height:48px;object-fit:contain}.market-build-ingredients b{font-size:14px}.market-build-ingredients small{font-size:12px;color:#b8c8af}
.nightfall-lobby .lobby-progression-actions{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.nightfall-lobby>.lobby-secondary:empty{display:none}
.market-goal{color:#b3c5aa;font-size:12px;margin:12px 0 0}.market-recap{border-top:1px solid #4a5f4e;padding:16px 0;margin-top:16px}.market-recap strong{color:#d6dfbd}.market-recap p{font-size:13px}
.hero-card-shell{position:relative;min-width:0;display:flex}.nightfall-lobby .hero-card-shell>.hero-card{width:100%;height:100%;margin:0}
.skin-toggle{position:absolute;right:5px;top:8px;z-index:2;width:27px;min-width:27px;height:32px;padding:5px;display:flex;align-items:center;justify-content:center;opacity:0;pointer-events:none;transition:opacity .12s}
.skin-toggle svg{width:10px;height:18px;fill:none;stroke:currentColor;stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}.skin-toggle[aria-expanded=true] svg{transform:scaleX(-1)}
.hero-card-shell:hover .skin-toggle,.hero-card-shell:focus-within .skin-toggle,.hero-card-shell:has(.hero-card[aria-pressed=true]) .skin-toggle{opacity:1;pointer-events:auto}
.lobby-skin-list{position:fixed;z-index:90;padding:12px;box-sizing:border-box;background:#142018;border:1px solid #778f76;border-radius:7px;box-shadow:0 10px 30px #0007;color:#d8e0d3;overflow:auto}.lobby-skin-list[hidden]{display:none}.lobby-skin-list h3{margin:0 0 7px;font-size:15px;color:inherit}
.lobby-skin-row{display:grid;grid-template-columns:72px 1fr;align-items:center;border-top:1px solid #3b4d3f;padding:8px 0;gap:8px}.lobby-skin-row canvas{width:72px;height:72px}.lobby-skin-row b{display:block;font-size:13px}.lobby-skin-row small{display:block;font-size:11px;line-height:1.4;color:#b0c1a9;margin:5px 0}.lobby-skin-list .lobby-skin-row .lobby-sprite-button{font-size:12px;min-height:30px;padding:6px 10px}
.night-event-hud{position:absolute;z-index:5;left:50%;bottom:45px;transform:translateX(-50%);background:#112019ed;border:1px solid #819579;border-radius:7px;padding:10px 14px;max-width:min(420px,80%);text-align:center;color:#d9e4cf;font-size:12px}.night-event-hud[hidden]{display:none}.night-event-hud p{font-size:12px;line-height:1.4;margin:7px 0}.night-event-hud button{display:block;margin:6px auto 0;min-height:36px}
@media(max-width:700px){.market-shop-layout{grid-template-columns:1fr;gap:18px}.market-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.market-tile canvas{height:95px}.market-detail{border-left:0;border-top:1px solid #435248;padding:18px 0 0}.market-preview-canvas{height:180px}.market-toolbar{gap:12px}.market-tabs{width:100%}.market-weekly-layout{grid-template-columns:1fr;gap:18px}.market-weekly-hero canvas{height:130px}.market-weekly-copy h3{font-size:24px}.market-objective{gap:12px;grid-template-columns:minmax(0,1fr) 105px;padding:12px}.market-objective h3{font-size:14px}.market-progress-line{flex-wrap:wrap;gap:5px}.nightfall-lobby .lobby-progression-actions,.nightfall-lobby>.lobby-secondary{grid-template-columns:repeat(2,minmax(0,1fr))}.market-heading-actions{justify-content:flex-end}.market-wallet{font-size:12px}.night-event-hud{bottom:65px}.market-build-ingredients{gap:5px;grid-template-columns:1fr 18px 1fr}.market-build-ingredients>div{padding:12px 8px}}
@media(prefers-reduced-motion:reduce){.skin-toggle{transition:none}}

.market-mastery-intro{margin:12px 0 20px}.market-mastery-intro h3{font-size:18px;margin:0 0 8px}.market-mastery-intro p{font-size:13px;line-height:1.6;color:#b9cbbf;margin:8px 0;max-width:850px}
.market-xp-sources{display:flex;flex-wrap:wrap;gap:8px 24px;margin:14px 0;font-size:12px;color:#b9cbbf}.market-xp-sources b{color:#d8dedb}
.market-mastery-reward{grid-template-columns:110px minmax(0,1fr) 140px;gap:18px}.market-mastery-reward>canvas{width:110px;height:100px;object-fit:contain}.market-mastery-reward h3{margin-top:4px}.market-mastery-reward .market-objective-actions{gap:10px}.market-mastery-reward .market-unlock-status{text-align:center}.market-mastery-reward .market-mastery-conditions{margin:10px 0 0;line-height:1.7}
.market-title-preview{text-align:center}.market-title-preview small{font-size:10px;color:#d7c58f;display:block}.market-title-preview canvas{width:100px;height:80px;object-fit:contain}
.market-shared-mastery{margin-top:20px;border-top:1px solid #435248;padding-top:16px}.market-shared-mastery summary{cursor:pointer;font-size:13px;color:#cbd6ce}
@media(max-width:700px){.market-mastery-reward{grid-template-columns:72px minmax(0,1fr);gap:12px}.market-mastery-reward>canvas{width:72px;height:85px}.market-mastery-reward .market-objective-actions,.market-mastery-reward>.market-unlock-status{grid-column:2}.market-mastery-reward .market-unlock-status{text-align:left}.market-title-preview canvas{width:72px}.market-xp-sources{gap:8px 16px}}
.nightfall-lobby .lobby-progression-actions{grid-template-columns:repeat(3,minmax(0,1fr))}
.market-challenge-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.market-challenge-card{grid-template-columns:76px minmax(0,1fr);gap:12px;align-items:start}.market-challenge-art canvas{width:76px;height:90px;object-fit:contain}.market-challenge-card .market-challenge-reward{margin:12px 0 6px;color:#d4dfc7}.market-challenge-card button{width:100%;margin-top:10px!important}.market-challenge-card .market-unlock-status{display:block;text-align:left}
.account-panel .account-close{margin-left:auto!important}.account-panel .account-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media(max-width:800px){.nightfall-lobby .lobby-progression-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.market-challenge-grid{grid-template-columns:1fr}}

.challenges-hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.challenges-hub-card{padding:16px;border:1px solid #465747;border-radius:5px;background:#14231bbb}.challenges-hub-card button{width:100%}.challenges-hub-card p{margin:12px 0 0;color:#afbfaf;line-height:1.5;font-size:13px}@media(max-width:650px){.challenges-hub-grid{grid-template-columns:1fr;gap:10px}}

/* Keep the second-row market below Leaderboard; leave Achievements clear. */
.nightfall-lobby .lobby-progression-actions>.market-entry{grid-column:3}
@media(max-width:800px){.nightfall-lobby .lobby-progression-actions>.market-entry{grid-column:1}}

@media(max-width:800px){.nightfall-lobby .lobby-progression-actions:has(.continue-cloud)>.market-entry{grid-column:auto}}
/* Keep the shop frame and its navigation stationary while browsing cosmetics. */
body .panel.nightfall-lobby.shop-page-shell { height:min(900px,calc(100dvh - 80px)); display:flex; flex-direction:column; overflow:hidden!important; }
.market-shop-page { flex:1; min-height:0; display:flex; flex-direction:column; }
.market-shop-page > :not(.market-content) { flex-shrink:0; }
.market-shop-page > .market-content { flex:1; min-height:0; display:flex; flex-direction:column; }
.market-shop-page .lobby-heading { height:120px; box-sizing:border-box; flex-direction:column; justify-content:center; gap:8px; text-align:center; }
.market-shop-page .lobby-heading h2 { margin:0 0 7px; }
.market-shop-page .lobby-heading p { margin:0; }
.market-shop-page .market-status { position:absolute; bottom:8px; left:26px; right:26px; padding:5px 8px; border-radius:5px; background:#17231cf2; z-index:3; font-size:11px; text-align:center; pointer-events:none; }
.market-shop-page .shop-layout { flex:1; min-height:0; grid-template-columns:150px minmax(0,1fr); }
.market-shop-page .market-tabs { display:flex; flex-direction:column; gap:5px; align-self:stretch; min-height:0; overflow:auto; width:auto; }
.market-shop-page .market-tabs button { flex:none; border-radius:6px; padding:10px; }
.market-shop-page .shop-content { min-width:0; min-height:0; overflow:auto; padding-right:6px; scrollbar-gutter:stable; }
.market-shop-page .market-toolbar { margin:0 0 16px; min-height:42px; }
.market-shop-page .market-shop-layout { grid-template-columns:minmax(0,1fr) minmax(220px,.85fr); gap:18px; }
.market-shop-page .market-detail { padding-left:18px; border-color:#39433e; }
.market-shop-page .market-tile { background:#171d1a; border-color:#38433d; box-shadow:none; }
.market-shop-page .market-tile.selected { background:#2b3527; border-color:#8b7c52; }
.market-shop-page .market-tile canvas { height:100px; }
.market-shop-page .market-tile b { font-size:11px; }
.market-shop-page .market-detail h3 { text-transform:none; letter-spacing:0; }
@media(max-width:800px){
 .market-shop-page .shop-layout { grid-template-columns:108px minmax(0,1fr); gap:10px; }
 .market-shop-page .market-shop-layout { grid-template-columns:1fr; }
 .market-shop-page .market-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .market-shop-page .market-detail { position:static; padding:16px 0 0; border-left:0; border-top:1px solid #39433e; }
 .market-shop-page .market-character { flex-wrap:wrap; gap:5px; }
 .market-shop-page .market-preview-canvas { height:150px; }
 .market-shop-page .market-detail-actions { grid-template-columns:1fr; }
}
.market-shop-page .market-tabs .chronicle-category { background:transparent; border-color:transparent; box-shadow:none; color:#aab9ae; }
.market-shop-page .market-tabs .chronicle-category.active { background:#2b3527; border-color:#8b7c52; color:#e5cf95; }

/* Sprite-framed event speech bubbles track their world object. */
.night-event-hud{left:50%;top:50%;bottom:auto;transform:translate(-50%,-100%);width:max-content;max-width:min(260px,calc(100% - 24px));box-sizing:border-box;padding:3px 6px 5px;border:16px solid transparent;border-image:url("assets/sprites/ui/event-bubble-frame.png") 64 fill / 16px / 0 stretch;background:none;border-radius:0;color:#272b26;font:600 12px/1.4 system-ui;text-align:center;pointer-events:none;filter:drop-shadow(0 3px 4px #0005)}
.night-event-hud::after{content:"";position:absolute;left:var(--bubble-tail-x,50%);top:calc(100% + 3px);transform:translateX(-50%);width:28px;height:26px;background:url("assets/sprites/ui/event-bubble-tail.png") center/100% 100% no-repeat}
.night-event-hud strong,.night-event-hud span,.night-event-hud small{display:block;overflow-wrap:anywhere;white-space:normal}
.night-event-hud strong{font-size:13px;margin-bottom:3px}.night-event-hud small{font-size:11px;margin-top:4px;color:#64563d}.night-event-hud small[hidden]{display:none}
.night-event-hud{border:0;border-image:none;padding:12px 18px;background:url("assets/sprites/ui/event-bubble-frame.png") center/100% 100% no-repeat}
.night-event-hud::after{top:calc(100% - 8px)}
/* Shared sprite bubble for talent, equipment and native-title tooltips. */
body #partyUpgradeTooltip{border:0;border-radius:0;padding:16px 20px;background:url('assets/sprites/ui/event-bubble-frame.png') center/100% 100% no-repeat;box-shadow:none;color:#302d25;max-width:min(310px,calc(100vw - 16px));font:13px/1.45 system-ui;overflow-wrap:anywhere}
body #partyUpgradeTooltip small,body #partyUpgradeTooltip p{color:#514b3d}body #partyUpgradeTooltip p:empty,body #partyUpgradeTooltip small:empty{display:none}
body dialog.bubble-confirmation{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(430px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;border:0;border-radius:0;padding:30px 28px 24px;background:url('assets/sprites/ui/event-bubble-frame.png') center/100% 100% no-repeat;color:#302d25;box-shadow:none;text-align:center;font:600 17px/1.5 system-ui}
body dialog.bubble-confirmation::backdrop{background:#020810b8}body .bubble-confirmation p{margin:0 0 20px;color:#302d25}
body .bubble-confirmation-actions{display:flex;justify-content:center;gap:36px}body .bubble-choice{display:grid;justify-items:center;gap:3px;border:0;background:none;padding:4px;color:#302d25;cursor:pointer;font:700 14px system-ui;transition:transform .12s}body .bubble-choice img{width:64px;height:64px}body .bubble-choice:hover{transform:translateY(-2px)}body .bubble-choice:active{transform:scale(.92)}body .bubble-choice:focus-visible{outline:3px solid #826333;outline-offset:3px;border-radius:12px}
body dialog.bubble-confirmation:is(:focus,:focus-visible),body #partyUpgradeTooltip:is(:focus,:focus-visible),body .night-event-hud:is(:focus,:focus-visible){outline:none}
body .bubble-choice:is(:focus,:focus-visible){outline:none;box-shadow:none}
body .bubble-choice:focus-visible img{filter:brightness(1.13) drop-shadow(0 0 3px #82633388)}

/* Shared solo and party skin panel. */
body .lobby-skin-list{margin:0;inset:auto;background:#0a1a2af5;border-color:#496980;color:#d9e5ef}
body .lobby-skin-row{border-color:#304c63}
body .lobby-skin-row small{color:#a9bdce}
body .lobby-skin-list .lobby-sprite-button{background:#132c40;border:1px solid #496980;color:#d9e5ef}
body .lobby-skin-list .lobby-sprite-button:hover{background:#1d3850;border-color:#8eabc0}
