/* Restore the handcrafted LIFE RPG header and align all three controls. */
.reference-home .ref-brand{
 left:3.1%!important;top:3.35%!important;width:41.5%!important;height:14.9cqw!important;
 display:block!important;gap:0!important;z-index:8;
 background-image:url('assets/panel-original.png')!important;
 background-size:240.7% 1453.5%!important;background-position:3.2% 4%!important;background-repeat:no-repeat!important;
 mix-blend-mode:screen;
}
.reference-home .ref-brand-mark,.reference-home .ref-brand-copy{opacity:0!important}
.reference-home>.wallet-hud{
 left:55.5%!important;right:auto!important;top:4.65%!important;width:34%!important;height:4.5%!important;
 padding:0 .8cqw!important;border:2px solid transparent!important;border-image:url('assets/frame-reference.svg') 24 36 20 36 stretch!important;
 border-radius:0!important;background:#100b07 url('assets/obsidian.svg') center/150px!important;
 box-shadow:inset 0 0 5px #000!important;font-size:3.4cqw!important;
}
.reference-home .ref-settings{
 left:90.4%!important;right:auto!important;top:4.7%!important;width:7.5%!important;height:4.35%!important;
 min-width:0!important;min-height:0!important;padding:0!important;border:0!important;border-radius:0!important;
 background:transparent url('assets/panel-original.png') 98.5% 5.3%/1151.35% 2197.6% no-repeat!important;
 box-shadow:none!important;color:transparent!important;font-size:0!important;text-indent:-9999px;filter:drop-shadow(0 0 5px #e4a94c66);
}
/* Show the selected hero's current rank and phase above the portrait. */
.reference-home .ref-class-avatar .ref-rank{
 position:absolute;left:4%;top:-9%;z-index:3;display:block;color:#f0c786;
 font:2.75cqw/1.2 Georgia,serif;text-shadow:0 2px 5px #000;
}
/* Frame the daily mission list over the new, continuous ruins background. */
.reference-home .ref-missions-panel{
 position:absolute;left:3.35%;top:48.25%;width:93.3%;height:17.15%;box-sizing:border-box;z-index:4;
 border:1.45cqw solid transparent;border-image:url('assets/frame-reference.svg') 24 36 20 36 stretch;
 background:linear-gradient(110deg,#090704bd,#0c0806cc);box-shadow:inset 0 0 18px #0009;
}
.reference-home .ref-quest-heading{
 position:absolute;left:3.5%;top:1.8%;width:93%;height:18%;box-sizing:border-box;
 display:flex;align-items:center;gap:2.2%;padding:0 2%;border:0;background:transparent;color:#efc381;
 font:3.05cqw/1.15 Georgia;text-align:left;cursor:pointer;
}
.ref-quest-heading .ref-quest-hourglass{font-size:4.1cqw;color:#e7b45d;line-height:1}
.ref-quest-heading strong{margin-left:auto;font:3cqw Georgia;color:#efc381}
.reference-home .ref-missions-panel .ref-quests{
 position:absolute;left:2.6%;top:21%;width:94.8%;height:76%;box-sizing:border-box;
 display:flex;flex-direction:column;justify-content:space-around;padding:0 1%;background:transparent;
}
.reference-home .ref-quest{height:20%;gap:3.4%;border-bottom:1px solid #8a673b4a}
.reference-home .ref-quest .check{width:3.9cqw;height:3.9cqw;font-size:3cqw}
.reference-home .ref-quest .ref-label{font-size:2.7cqw;letter-spacing:0}
.reference-home .ref-quest .reward{font-size:2.7cqw}
/* Rebuild the two lower cards from real controls, not background text. */
.reference-home .ref-objective{
 position:absolute;left:3.35%;top:66.6%;width:49.9%;height:14.7%;box-sizing:border-box;overflow:hidden;
 border:1.45cqw solid transparent;border-image:url('assets/frame-reference.svg') 24 36 20 36 stretch;
 background:linear-gradient(120deg,#090705d9,#100b07df);box-shadow:inset 0 0 16px #0009;
 color:#e8cda1;
}
.ref-objective-heading{position:absolute;left:6%;top:6%;width:88%;height:19%;display:flex;align-items:center;gap:2%;color:#efbf71;font:2.8cqw/1.15 Georgia}
.ref-objective-heading>span{font-size:4cqw;line-height:1;text-shadow:0 0 7px #d28a32}
.ref-objective-art{position:absolute;left:3%;top:28%;width:32%;height:60%;object-fit:contain;object-position:center bottom;mix-blend-mode:screen;filter:drop-shadow(0 0 7px #e0a44842)}
.ref-objective-copy{position:absolute;left:36%;top:30%;width:58%;height:39%;margin:0;color:#e5cfab;font:2.35cqw/1.4 Georgia}
.reference-home .ref-objective .ref-goalbar{position:absolute;left:36%;top:72%;width:43%;height:1.05%;border-radius:6px;background:#090705;border:1px solid #8b5926}
.ref-objective .ref-goalbar span{background:linear-gradient(#ffd276,#e2861b);box-shadow:0 0 7px #ffab3480}
.reference-home .ref-objective .ref-goalcount{position:absolute;left:81%;top:68.5%;background:transparent;color:#e9c995;font:2.15cqw/1.2 Georgia}
.reference-home .ref-objective .ref-goalbutton{position:absolute;left:36%;top:80%;width:55%;height:13%;font-size:2.25cqw;background:linear-gradient(90deg,#291506,#43280d,#271407);border:1px solid #a76b2a;clip-path:polygon(7% 0,93% 0,100% 50%,93% 100%,7% 100%,0 50%)}
.reference-home .ref-calendar.month-calendar{
 position:absolute;left:54.7%;top:66.6%;width:42%;height:14.7%;box-sizing:border-box;z-index:3;
 display:grid;grid-template-columns:minmax(0,1fr);grid-template-columns:minmax(0,1fr);grid-template-rows:18% 9% 1fr;gap:1%;padding:3.2% 3.2% 2.4%;
 border:1.45cqw solid transparent;border-image:url('assets/frame-reference.svg') 24 36 20 36 stretch;
 background:linear-gradient(120deg,#090705d9,#100b07df);box-shadow:inset 0 0 16px #0009;text-align:center;
}
.ref-calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:2%;color:#efbf71;font:2.8cqw/1 Georgia;white-space:nowrap}
.ref-calendar-heading small{color:#d9bc8c;font:clamp(10px,2cqw,16px)/1 Georgia}
.reference-home .ref-calendar .month-caption{position:relative;display:block;width:100%;min-width:0;min-height:0;padding:0;border:0;background:transparent;color:#d8c194;font:clamp(9px,1.95cqw,16px)/1.1 Georgia;white-space:nowrap;cursor:pointer}
.reference-home .ref-calendar .month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(7,minmax(0,1fr));gap:1.4% 1%;min-height:0;align-items:center;justify-items:center}
.reference-home .ref-calendar .month-weekday{display:grid;place-items:center;width:100%;height:100%;color:#e3c99b;font:clamp(10px,2cqw,16px)/1 Georgia}
.reference-home .ref-calendar .month-date{display:grid;place-items:center;width:100%;height:auto;max-width:4.1cqw;aspect-ratio:1;padding:0;border:1px solid #75552f;border-radius:50%;background:#090705aa;color:#b8a17d;font:clamp(10px,1.75cqw,14px)/1 Georgia;min-width:16px;box-sizing:border-box}
.reference-home .ref-calendar .month-date.lit{border-color:#e8a343;background:#4c2a0a;color:#ffd46e;box-shadow:0 0 8px #f8a12580}
.reference-home .ref-calendar .month-date.current{outline:1px solid #ffcd78;outline-offset:1px}
.reference-home .ref-calendar .month-date.blank{visibility:hidden}
/* Both home chests share one equally strong golden halo. */
.home-chest-banner .banner-chest{position:relative;isolation:isolate;filter:none!important}
.home-chest-banner .banner-chest::before{content:"";position:absolute;z-index:-1;inset:6%;border-radius:50%;background:radial-gradient(ellipse at 50% 60%,#ffd787d0 0%,#f2a24498 38%,#a94d1d4a 62%,transparent 76%);filter:blur(9px);animation:homeChestGlow61 2.7s ease-in-out infinite}
.home-chest-banner .banner-chest .treasure-chest{position:relative;z-index:1;filter:saturate(1.2) sepia(.08) drop-shadow(0 0 8px #ffd47ccc) drop-shadow(0 0 19px #df812e99) drop-shadow(0 7px 8px #000d)!important}
.home-chest-banner .banner-chest .chest-aura{opacity:1!important;background:radial-gradient(ellipse at 50% 57%,#ffd986c9 0%,#f1a14488 34%,#ad511f44 57%,transparent 74%)!important}
@keyframes homeChestGlow61{0%,100%{opacity:.72;transform:scale(.94)}50%{opacity:1;transform:scale(1.06)}}
@media(prefers-reduced-motion:reduce){.home-chest-banner .banner-chest::before{animation:none;opacity:.9}}
