@font-face{font-family:Corpid;src:url('../assets/My Collection/CorpidOffice Bold.ttf')}@font-face{font-family:Matisse;src:url('../assets/My Collection/Fonts/MatissePro B.otf')}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden;background:#071a27;font-family:Corpid,Arial,sans-serif}button{font:inherit}.game{--blue:#00a9e9;--deep:#073a5b;--gold:#f6c74d;position:absolute;width:1920px;height:1080px;left:50%;top:50%;transform:translate(-50%,-50%) scale(var(--game-scale,1));overflow:hidden;color:#fff;background:#123b58}.room-bg,.screen-shine{position:absolute;inset:0}.room-bg{background:url('../assets/My Collection/my_room_background_0.webp') center/cover no-repeat;filter:saturate(.94)}.screen-shine{pointer-events:none;background:linear-gradient(115deg,rgba(255,255,255,.16),transparent 32%,transparent 70%,rgba(68,207,255,.1));mix-blend-mode:screen}.hud{position:absolute;z-index:8;left:0;right:0;top:0;height:84px;display:flex;justify-content:space-between;align-items:center;padding:8px 24px 8px 120px;background:linear-gradient(#eef6f8f2,#aac7d1e8 72%,#476f83e8);border-bottom:3px solid #e6c876;box-shadow:0 3px 10px #001b2d}.master-block{display:flex;align-items:center;gap:13px;color:#123b58;text-shadow:0 1px #fff}.master-level{padding:12px 14px;background:#092d49;color:#fff;border:2px solid #d7edf3;clip-path:polygon(10px 0,100% 0,calc(100% - 10px) 100%,0 100%)}.master-block strong,.master-block span{display:block}.master-block strong{font-size:24px;letter-spacing:.04em}.master-block span{font-size:11px;color:#2c607b}.hud-resources{display:flex;gap:12px}.hud-resources>div{height:52px;min-width:150px;display:flex;align-items:center;gap:8px;padding:6px 15px;background:linear-gradient(#fbffff,#c8dce3);border:2px solid #60889d;box-shadow:inset 0 0 0 2px #edf7fa;color:#103a57;clip-path:polygon(10px 0,100% 0,calc(100% - 10px) 100%,0 100%)}.hud-resources img{width:32px;height:32px;object-fit:contain}.hud-resources span{color:#00a5e3}.hud-resources b{font-size:17px}.ap-meter{width:70px;height:8px;background:#12b88b;border:1px solid #fff}.side-menu{position:absolute;z-index:9;left:16px;top:102px;width:112px;display:grid;gap:12px}.fgo-button,.info-side-button{height:92px;border:2px solid #d9edf4;color:#fff;background:linear-gradient(140deg,#13a8da,#0069a8);box-shadow:0 3px 7px #001b2f,inset 0 0 0 2px #066497;clip-path:polygon(12px 0,100% 0,100% calc(100% - 12px),calc(100% - 12px) 100%,0 100%,0 12px);text-shadow:0 2px 2px #003852;cursor:pointer}.fgo-button:hover,.fgo-button.selected{filter:brightness(1.18);box-shadow:0 0 18px #5ae5ff}.fgo-button:nth-child(4){background:linear-gradient(140deg,#ef777c,#b92355);box-shadow:0 3px 7px #3b001c,inset 0 0 0 2px #bd3f64}.menu-icon{display:block;font-size:35px;line-height:40px}.fgo-button b{font-size:15px}.room-stage{position:absolute;z-index:2;left:125px;right:460px;top:84px;bottom:190px;touch-action:none}.servant-aura{position:absolute;width:700px;height:700px;left:50%;top:48%;transform:translate(-50%,-50%);border-radius:50%;background:radial-gradient(circle,rgba(255,248,194,.48),rgba(109,227,255,.14) 44%,transparent 70%);filter:blur(10px);animation:aura 4s ease-in-out infinite}.servant-art{position:absolute;left:50%;bottom:-20px;transform:translateX(-50%);height:100%;width:90%;object-fit:contain;object-position:center bottom;filter:drop-shadow(10px 15px 8px #00172688);user-select:none;-webkit-user-drag:none}.swipe-in-right{animation:swipeRight .45s cubic-bezier(.2,.7,.2,1)}.swipe-in-left{animation:swipeLeft .45s cubic-bezier(.2,.7,.2,1)}.swipe-arrow,.record-swipe{position:absolute;z-index:6;top:46%;width:90px;height:120px;border:0;background:transparent;cursor:pointer;filter:drop-shadow(0 2px 4px #001c32)}.swipe-arrow img,.record-swipe img{max-width:100%;max-height:100%;object-fit:contain}.swipe-arrow.left{left:26px}.swipe-arrow.right{right:26px;transform:scaleX(-1)}.swipe-arrow:hover{filter:drop-shadow(0 0 12px #87efff) brightness(1.2)}.swipe-hint{position:absolute;bottom:24px;left:50%;transform:translateX(-50%);padding:7px 20px;background:#052d47aa;border:1px solid #8fdcf2;color:#d9f7ff;font-size:12px;letter-spacing:.16em;opacity:.75}.swipe-hint span{font-size:20px}.spirit-panel{position:absolute;z-index:7;right:25px;top:112px;width:410px;padding:12px;background:linear-gradient(135deg,#e9f3f5ed,#9cbcc8e8);border:2px solid #d7edf3;box-shadow:0 5px 18px #001b2e;color:#0c3e5c;clip-path:polygon(18px 0,100% 0,100% calc(100% - 18px),calc(100% - 18px) 100%,0 100%,0 18px)}.spirit-title{padding:13px 16px;background:#152d3be8;border:2px solid #d9c47e;color:#fff}.spirit-title>*{display:block}.spirit-title span{font-size:11px;color:#80e7ff;letter-spacing:.18em}.spirit-title strong{margin-top:5px;font-family:Matisse,serif;font-size:26px}.spirit-title small{margin-top:5px;color:#d2e5ec}.origin-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}.origin-tab,.record-tab,.topic-filter button{border:2px solid #bfe8f2;background:linear-gradient(#1fc2eb,#0479bb);color:#fff;padding:12px 8px;box-shadow:0 2px 4px #264f63;font-size:13px;text-shadow:0 2px #075178;cursor:pointer}.origin-tab.active,.record-tab.active,.topic-filter button.active{background:linear-gradient(135deg,#ffd33e,#ff8b16 55%,#e43431);border-color:#fff6a6;box-shadow:0 0 12px #ffdc55}.talk-button{width:100%;margin-top:12px;display:grid;grid-template-columns:54px 1fr;grid-template-rows:1fr 1fr;text-align:left;padding:10px 14px;border:2px solid #f7df95;background:linear-gradient(135deg,#d74679,#8d174e);color:#fff;cursor:pointer}.talk-button span{grid-row:1/3;font-size:34px}.talk-button b{font-size:18px}.talk-button small{opacity:.85}.dialogue-box{position:absolute;z-index:8;left:160px;right:25px;bottom:12px;height:212px;background:url('../assets/My Collection/dialogue_box.webp') center/100% 100% no-repeat;filter:drop-shadow(0 4px 8px #001a2d);cursor:pointer}.speaker-name{position:absolute;left:30px;top:49px;font-size:23px;text-shadow:0 2px #000}.dialogue-box p{position:absolute;left:68px;right:50px;top:78px;margin:0;font-size:26px;line-height:1.35;text-shadow:0 2px 2px #000;max-height:78px;overflow:hidden}.dialogue-controls{position:absolute;left:59px;right:38px;bottom:14px;display:flex;justify-content:space-between;align-items:center}.dialogue-controls button{border:1px solid #9ee7ff;background:#054b73;color:#fff;padding:7px 13px;cursor:pointer}.dialogue-controls span{font-size:11px;letter-spacing:.1em;color:#aeeeff}.bond-badge{position:absolute;z-index:9;right:54px;bottom:224px}.bond-badge img{width:250px;filter:drop-shadow(0 0 8px #fff) drop-shadow(0 0 18px #ffcf37);animation:bondGlow 2s ease-in-out infinite}.dust{position:absolute;z-index:4;inset:0;pointer-events:none;overflow:hidden}.dust i{position:absolute;left:var(--x);top:var(--y);width:var(--s);height:var(--s);border-radius:50%;background:#fff8c2;box-shadow:0 0 8px #ffe36b;animation:dustRise var(--d) linear var(--delay) infinite}.overlay{position:absolute;z-index:30;inset:0}.overlay[hidden]{display:none}.topic-overlay{display:grid;place-items:center;background:#041c2ac7;backdrop-filter:blur(5px)}.modal{width:1050px;max-height:880px;background:url('../assets/My Collection/servant_Info_background.webp') center/cover;border:3px solid #e6cd88;box-shadow:0 15px 60px #00111e}.modal header{height:108px;display:flex;align-items:center;gap:26px;padding:14px 24px;background:linear-gradient(#f8fcfde8,#adc9d2e8);color:#123c58;border-bottom:2px solid #547d91}.modal h2{margin:5px 0;font-size:30px}.modal small{color:#078fc8;letter-spacing:.2em}.back-button{padding:13px 19px;border:2px solid #d7edf3;background:linear-gradient(#f9ffff,#bed1d8);color:#173e59;clip-path:polygon(10px 0,100% 0,calc(100% - 10px) 100%,0 100%);cursor:pointer}.topic-filter{display:flex;gap:8px;padding:15px 20px;background:#22465b99}.topic-list{height:650px;overflow:auto;padding:14px 20px 25px}.topic-choice{width:100%;min-height:70px;display:grid;grid-template-columns:55px 1fr 30px;align-items:center;text-align:left;margin-bottom:8px;border:2px solid #789bac;background:linear-gradient(#fff,#cedee4);color:#153f59;cursor:pointer;clip-path:polygon(10px 0,100% 0,calc(100% - 10px) 100%,0 100%)}.topic-choice:hover{border-color:#00b8ef;transform:translateX(4px)}.topic-choice>span{font-size:26px;text-align:center;color:#00a1dc}.topic-choice strong,.topic-choice small{display:block}.topic-choice strong{font-size:18px}.topic-choice small{margin-top:4px;color:#627f8d}.topic-choice>b{font-size:30px;color:#00a7e3}.info-screen{display:grid;grid-template-columns:115px 610px 1fr;background:url('../assets/My Collection/servant_Info_background.webp') center/cover;color:#142f40;padding:20px 36px 28px 16px}.info-close{position:absolute;z-index:5;left:15px;top:16px;width:100px}.info-side{padding-top:120px;display:grid;align-content:start;gap:22px}.info-side-button{width:100px;height:95px}.info-side-button:first-child{background:linear-gradient(#ffab27,#d33a25)}.info-side-button.favorite{background:linear-gradient(#ef7094,#bd275e)}.info-side-button span{display:block;font-size:30px}.card-column{display:grid;place-items:center;align-content:center;padding:0 18px}.card-shell{width:510px;height:765px;perspective:1400px;cursor:pointer;touch-action:none;filter:drop-shadow(0 7px 9px #0e334c88)}.card-inner{position:relative;width:100%;height:100%;transition:transform .75s cubic-bezier(.2,.7,.2,1);transform-style:preserve-3d}.card-shell.flipped .card-inner{transform:rotateY(180deg)}.card-face{position:absolute;inset:0;backface-visibility:hidden}.card-front{overflow:hidden}.card-art{position:absolute;left:4.5%;top:3.3%;width:91%;height:93.4%;object-fit:cover}.card-border{position:absolute;inset:0;width:100%;height:100%;object-fit:fill}.card-back{transform:rotateY(180deg);display:grid;place-items:center}.card-back img{width:88%;height:98%;object-fit:fill}.flip-label{margin-top:8px;padding:8px 18px;border:1px solid #6f94a7;background:#e8f2f5;color:#16425c}.card-pips{display:flex;gap:9px;margin-top:10px}.card-pips button{width:20px;height:10px;border:1px solid #17628b;background:#aac6d2;cursor:pointer}.card-pips button.active{background:#ffad20;box-shadow:0 0 8px #fff}.record{min-width:0;padding:10px 8px 0}.record-title{height:105px;display:flex;align-items:center;justify-content:space-between;padding:0 18px;color:#173d56;text-align:right;text-shadow:0 2px #fff}.record-title h1{font-family:Matisse,serif;font-size:48px;margin:0}.record-title span{font-size:20px}.record-stars{color:#e0a625;font-size:29px;letter-spacing:.11em}.record-tabs{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:18px}.record-tab{font-size:18px;padding:17px 8px}.record-panel{height:820px;overflow:auto;padding:0 8px 30px}.fgo-panel{margin-bottom:18px;background:#252b2ef0;border:3px solid #dbe5e6;outline:1px solid #2d596b;color:#fff;clip-path:polygon(17px 0,100% 0,100% calc(100% - 17px),calc(100% - 17px) 100%,0 100%,0 17px)}.fgo-panel>h3,.profile-panel h3{margin:0;padding:8px 16px;background:#e8eef0;color:#223a48;font-size:17px}.level-row{height:92px;display:flex;align-items:center;padding:12px 28px;gap:8px}.level-row>b{color:#ffd321;font-size:30px}.level-row strong{font-size:62px;font-weight:400}.level-row span{font-size:28px}.level-row i{flex:1;height:12px;margin-left:30px;background:#ffe000;border:2px solid #9f7300}.status-main{display:grid;grid-template-columns:260px 1fr;align-items:center;padding:0 24px 18px}.status-main>img{width:240px;height:220px;object-fit:contain}.status-main p{font-size:21px;word-spacing:9px}.status-main b,.status-main em{color:#f8d323;font-style:normal}.gold-stars{color:#f9dc3e;font-size:27px}.bond-row{display:flex;align-items:center;gap:24px;border-top:1px dashed #abc1c7;padding:22px 30px}.bond-row img{width:280px;filter:drop-shadow(0 0 9px #ffd838)}.bond-row b,.bond-row span{display:block}.bond-row b{font-size:24px;color:#ffe139}.bond-row span{margin-top:8px;color:#cde2e8}.concept-box{padding-bottom:18px}.command-cards{display:flex;gap:16px;padding:18px}.command{position:relative;width:150px;height:85px;display:grid;place-items:center;overflow:hidden;border:2px solid #e8f5f7;transform:skewX(-7deg);text-shadow:0 2px #000}.command.q{background:url('../assets/atlas/quick_bg.webp') center/cover,#249b51}.command.a{background:linear-gradient(135deg,#62d6ff,#075abc)}.command.b{background:linear-gradient(135deg,#ff795d,#9f0921)}.command span{font-size:40px}.command small{position:absolute;bottom:4px}.skill-panel article{display:grid;grid-template-columns:125px 105px 1fr;gap:18px;align-items:center;min-height:175px;padding:16px;border-bottom:1px solid #71848c}.skill-panel article:last-child{border:0}.skill-panel article>img{width:100px;height:100px}.skill-label{font-size:20px;color:#d8ebf0}.skill-label small{display:block;margin-top:12px;color:#78f1ef}.skill-panel h4{font-size:27px;margin:0}.skill-panel h4 b{color:#ffe13a}.skill-panel p{font-family:Arial,sans-serif;font-size:17px;line-height:1.4;color:#e2e9eb}.profile-panel p{padding:4px 18px;font-family:Arial,sans-serif;font-size:20px;line-height:1.4}.profile-panel p b{display:inline-block;width:140px;font-size:25px}.profile-panel.scroll{max-height:590px;overflow:auto}.voice-record{display:grid;grid-template-columns:1fr 1fr;gap:10px}.voice-record button{min-height:82px;display:grid;grid-template-columns:40px 1fr;grid-template-rows:1fr 1fr;text-align:left;padding:12px;border:2px solid #6b93a5;background:linear-gradient(#f9ffff,#c7dce4);color:#153d55;cursor:pointer}.voice-record button span{grid-row:1/3;font-size:24px;color:#00a1da}.voice-record strong,.voice-record small{display:block}.voice-record small{color:#607f8f}.collection-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.collection-grid button{display:flex;align-items:center;gap:18px;padding:15px;border:3px solid #e4edf0;background:#262d31;color:#fff;text-align:left;cursor:pointer}.collection-grid img{width:180px;height:180px;object-fit:cover}.collection-grid b,.collection-grid small{display:block}.collection-grid b{font-size:23px}.collection-grid small{margin-top:10px;color:#5ed8ff}.record-swipe{z-index:4;top:47%}.record-swipe.left{left:105px}.record-swipe.right{right:5px;transform:scaleX(-1)}.valentine-screen{display:grid;place-items:center;background:linear-gradient(#10253a88,#320e25cc),url('../assets/My Collection/my_room_background_0.webp') center/cover}.valentine-stage{position:relative;width:1450px;height:920px;padding:40px;background:radial-gradient(circle at 50% 38%,#f6d7e4aa,transparent 45%),linear-gradient(#5a183fdd,#180c27ee);border:3px solid #f1c5a1;box-shadow:0 20px 70px #000}.valentine-heading{text-align:center}.valentine-heading small{letter-spacing:.3em;color:#f5c8df}.valentine-heading h1{font-family:Matisse,serif;font-size:48px;margin:10px}.valentine-stage>img{position:absolute;width:440px;height:440px;object-fit:cover;left:505px;top:170px;border:5px solid #f1d09b;box-shadow:0 0 40px #f494c8}.valentine-dialogue{position:absolute;left:260px;right:260px;bottom:65px;min-height:175px;padding:27px 35px;background:linear-gradient(#fffdfa,#ead8df);border:4px solid #b7808e;color:#481c37}.valentine-dialogue strong{font-size:24px}.valentine-dialogue p{font-family:Arial,sans-serif;font-size:25px}.valentine-dialogue button{float:right;padding:10px 25px;border:2px solid #ffebba;background:linear-gradient(#f7759d,#a91955);color:#fff}.valentine-choices{position:absolute;right:30px;top:145px;width:300px;display:grid;gap:12px}.valentine-choices button{display:grid;grid-template-columns:90px 1fr;align-items:center;gap:10px;text-align:left;border:2px solid #b67896;background:#2b1730;color:#fff;padding:8px}.valentine-choices button.selected{border-color:#ffe5a4;box-shadow:0 0 16px #ff9ac6}.valentine-choices img{width:90px;height:90px;object-fit:cover}.toast{position:absolute;z-index:99;left:50%;bottom:30px;transform:translate(-50%,30px);opacity:0;background:#eff7f8;color:#173e58;border:2px solid #ddbd61;padding:13px 24px;transition:.25s}.toast.show{opacity:1;transform:translate(-50%,0)}@keyframes aura{50%{transform:translate(-50%,-50%) scale(1.08);opacity:.7}}@keyframes bondGlow{50%{filter:drop-shadow(0 0 13px #fff) drop-shadow(0 0 28px #ffcf37);transform:scale(1.04)}}@keyframes dustRise{0%{transform:translateY(0) rotate(0);opacity:0}15%{opacity:.75}100%{transform:translateY(-700px) rotate(260deg);opacity:0}}@keyframes swipeRight{from{transform:translateX(calc(-50% + 230px));opacity:0}to{transform:translateX(-50%);opacity:1}}@keyframes swipeLeft{from{transform:translateX(calc(-50% - 230px));opacity:0}to{transform:translateX(-50%);opacity:1}}@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* Second-pass corrections: stable prepared sprites, true card layers, and full CE art. */
.servant-art{bottom:0;width:auto;max-width:none;object-fit:contain}
.swipe-arrow.left{transform:scaleX(-1)}
.swipe-arrow.right{transform:none}
.speaker-name{top:22px}
.card-art{z-index:1;left:6.2%;top:5.2%;width:87.6%;height:89.5%}
.card-border{z-index:2;pointer-events:none}
.command-card{position:relative;width:150px;height:192px;overflow:hidden;filter:drop-shadow(0 3px 3px #0008)}
.command-card img{position:absolute;pointer-events:none}
.command-bg{inset:0;width:100%;height:100%}
.command-portrait{z-index:1;left:-8%;top:8%;width:116%;height:auto}
.command-icon{z-index:2;left:-20%;bottom:3%;width:140%;height:auto}
.command-text{z-index:3;left:0;bottom:0;width:100%;height:auto}
.collection-grid{display:grid;grid-template-columns:1fr;gap:20px}
.ce-entry{display:grid;grid-template-columns:280px 1fr;gap:24px;padding:18px;background:#262d31;color:#fff;border:3px solid #e4edf0}
.ce-entry>img{width:280px;height:auto;aspect-ratio:512/875;object-fit:contain}
.ce-entry small{color:#5ed8ff;letter-spacing:.12em}
.ce-entry h3{margin:7px 0 20px;font-size:28px}
.ce-entry h4{margin:14px 0 5px;color:#f1d459;text-transform:uppercase}
.ce-entry p{margin:0;font-family:Arial,sans-serif;font-size:16px;line-height:1.45;color:#e2edf0}
.ce-entry button{margin-top:18px;padding:12px 16px;border:2px solid #ffdda0;background:linear-gradient(#ed6c98,#9e1e59);color:#fff;cursor:pointer}
.record-swipe.left{transform:scaleX(-1)}
.record-swipe.right{transform:none}
.valentine-stage>#valentine-ce{width:340px;height:581px;left:555px;top:135px;object-fit:contain}
.valentine-choices button{grid-template-columns:90px 1fr}
.valentine-choices img{width:90px;height:150px;object-fit:contain}

/* Layered My Room sprites. Coordinates are measured in each prepared body canvas. */
.servant-stack{position:absolute;left:50%;bottom:0;transform:translateX(-50%);filter:drop-shadow(10px 15px 8px #00172688);user-select:none;pointer-events:none}
.servant-stack .servant-art{position:absolute;z-index:1;bottom:auto;width:100%;max-width:none;transform:none;object-fit:fill;filter:none}
.servant-legs{position:absolute;z-index:0;left:0;width:100%;object-fit:fill;pointer-events:none}
.expression-art{position:absolute;z-index:2;object-fit:fill;pointer-events:none}
.servant-stack.swipe-in-right{animation:swipeRight .45s cubic-bezier(.2,.7,.2,1)}
.servant-stack.swipe-in-left{animation:swipeLeft .45s cubic-bezier(.2,.7,.2,1)}

/* Keep the official card decorations below the portrait's face. */
.command-cards{justify-content:center;gap:13px}
.command-card{width:125px;height:160px}
.command-portrait{left:-5%;top:4%;width:110%}
.command-icon{left:-2%;bottom:0;width:105%}
.command-text{left:10%;bottom:1%;width:80%}

.grail-icon{width:30px;height:24px;object-fit:contain;margin:0 5px}
.support-record{display:flex;align-items:center;gap:22px;margin:0 18px 18px;padding:14px;background:#172329;border:1px solid #78909a}
.support-record>img{width:auto;height:245px;object-fit:contain}
.support-record b,.support-record span{display:block}
.support-record b{font-size:20px;color:#f5d85b}
.support-record span{margin-top:8px;color:#d7e9ed}
.skill-panel>h3{display:flex;align-items:center;gap:10px}
.ex-rank-icon{width:40px;height:26px;object-fit:contain}
.skill-icon-wrap{position:relative;width:100px;height:100px}
.skill-icon-wrap>img:first-child{width:100%;height:100%;object-fit:contain}
.buffed-skill-icon{position:absolute;right:-7px;top:-7px;width:36px;height:28px;object-fit:contain;filter:drop-shadow(0 1px 2px #000)}
.ce-kind{display:flex;align-items:center;gap:10px}
.ce-kind img{width:56px!important;height:56px!important;object-fit:contain!important}
.ce-kind small{margin:0}
.swipe-arrow.left,.record-swipe.left{transform:scaleX(-1)}
.swipe-arrow.right,.record-swipe.right{transform:none}
.record-tabs{grid-template-columns:repeat(7,1fr);gap:8px}
.record-tab{font-size:15px;padding:15px 5px}
.passive-panel article{display:grid;grid-template-columns:76px 1fr;gap:16px;align-items:center;padding:16px 20px;border-bottom:1px solid #71848c}
.passive-panel article:last-child{border-bottom:0}
.passive-panel h4{margin:0 0 7px;font-size:22px;color:#f7dc65}
.passive-panel p{margin:0;font-family:Arial,sans-serif;font-size:16px;line-height:1.4;color:#e2e9eb}
.passive-panel small{display:block;margin-top:8px;color:#91c7d8;font-family:Arial,sans-serif;font-style:italic}
.passive-rank{display:grid;place-items:center;width:58px;height:58px;border:2px solid #f0d876;background:radial-gradient(circle,#146b91,#082f4c);color:#fff6bc;font-size:20px;line-height:1;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}
.passive-icon-wrap{position:relative;width:72px;height:72px;display:grid;place-items:center}
.passive-icon-wrap>img{width:72px;height:72px;object-fit:contain;filter:drop-shadow(0 2px 3px #000)}
.noble-panel article{margin:18px;padding-bottom:18px;border:2px solid #587888;background:#17242be8}
.np-record{display:grid;grid-template-columns:145px 1fr;gap:18px;align-items:center;padding:18px}
.np-command-card{position:relative;width:125px;height:160px;overflow:hidden;filter:drop-shadow(0 4px 5px #000)}
.np-command-card>img{position:absolute;pointer-events:none}
.np-card-bg{inset:0;width:100%;height:100%}
.np-card-portrait{z-index:1;left:-8%;top:5%;width:116%;height:auto}
.np-card-icon{z-index:2;left:-4%;bottom:0;width:108%;height:auto}
.np-card-text{z-index:3;left:0;bottom:0;width:100%;height:auto}
.np-card-title{z-index:3;inset:0;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 2px #000)}
.np-strengthened{z-index:4;right:3px;top:3px;width:40px;height:auto;filter:drop-shadow(0 2px 2px #000)}
.np-banner{display:grid;grid-template-columns:90px 1fr 75px;align-items:center;min-height:86px;background:linear-gradient(115deg,#085c88,#0b9fc6 45%,#274e6e);border-bottom:3px solid #e6cc73;padding:10px 18px}
.np-banner span{letter-spacing:.14em;color:#9deaff}
.np-banner strong{font-family:Matisse,serif;font-size:25px}
.np-banner b{text-align:center;color:#ffe457;font-size:29px}
.np-meta{display:grid;grid-template-columns:auto 1fr auto 1fr;gap:12px;padding:14px 20px;background:#e9eff0;color:#173e55}
.np-meta span{color:#39728f;letter-spacing:.1em}
.noble-panel article>p,.noble-panel article>h4{margin:14px 20px;font-family:Arial,sans-serif;line-height:1.5}
.noble-panel article>h4{color:#ffe15c}
.traits-panel>div{display:flex;flex-wrap:wrap;gap:12px;padding:24px}
.traits-panel span{padding:12px 17px;border:2px solid #79adc0;background:linear-gradient(#174e6b,#0a3048);color:#e8faff;clip-path:polygon(8px 0,100% 0,calc(100% - 8px) 100%,0 100%)}
.origin-tabs .apex-tab{grid-column:1/-1;background:linear-gradient(135deg,#7b238f,#ce3d9e 55%,#371365);border-color:#f1b9ff}
.origin-tabs .apex-tab.active{background:linear-gradient(135deg,#ffd35a,#ef5fca 48%,#8428b5);box-shadow:0 0 17px #ef8cff}

/* Extracted profile chrome. */
.record-tabs{gap:5px}
.record-tabs{grid-template-columns:repeat(8,1fr)}
.record-tab{height:58px;padding:8px 6px;border:0;background:transparent url('../assets/My Collection/button.webp') center/100% 100% no-repeat;box-shadow:none;font-size:15px;line-height:1.05}
.record-tab.active{border:0;background:transparent url('../assets/My Collection/button_active.webp') center/100% 100% no-repeat;box-shadow:none}
.status-box,.noble-panel{background-color:#17242b;background-image:url('../assets/My Collection/content_box_496_235.webp');background-size:100% 100%;background-repeat:no-repeat;border:0;outline:0;clip-path:none}
.concept-box,.traits-panel{background-color:#17242b;background-image:url('../assets/My Collection/content_box_424_194.webp');background-size:100% 100%;background-repeat:no-repeat;border:0;outline:0;clip-path:none}
.skill-panel{background-color:#17242b;background-image:url('../assets/My Collection/content_box_275_360.webp');background-size:100% 100%;background-repeat:no-repeat;border:0;outline:0;clip-path:none}
.profile-panel,.passive-panel{background-color:#17242b;background-image:url('../assets/My Collection/content_box_497_158.webp');background-size:100% 100%;background-repeat:no-repeat;border:0;outline:0;clip-path:none}
.record-stars img{display:block;width:207px;height:90px;object-fit:contain}
.gold-stars img{display:block;width:184px;height:80px;object-fit:contain}

/* Lazy-loaded battle model viewer. */
.battle-viewer{height:790px;overflow:hidden;background:radial-gradient(circle at 50% 43%,#3cb5df38,transparent 48%),linear-gradient(#172c39f2,#071923f2)}
.battle-viewer>h3{margin:0;padding:10px 18px;background:linear-gradient(#eef4f5,#b9ced6);color:#1c3b4c;letter-spacing:.08em}
.battle-stage{height:680px;position:relative;overflow:hidden;background:radial-gradient(ellipse at 50% 82%,#69d8ff38,transparent 54%),linear-gradient(180deg,#123b4f88,#06151fcc);border-bottom:2px solid #aacbd7}
.battle-stage::after{content:"";position:absolute;left:13%;right:13%;bottom:7%;height:4%;border-radius:50%;background:#0008;filter:blur(13px);pointer-events:none}
.battle-stage canvas{position:relative;z-index:1;display:block;width:100%;height:100%;filter:drop-shadow(8px 13px 8px #0008)}
.battle-toolbar{min-height:70px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:10px 16px;background:#102a38}
.battle-controls{display:flex;flex:1;flex-wrap:nowrap;gap:8px;overflow-x:auto;padding-bottom:4px;scrollbar-color:#65cbe8 #071923}
.battle-controls button{flex:0 0 auto;min-width:92px;padding:10px 14px;border:2px solid #9bdced;background:linear-gradient(#158bb9,#07577e);color:#fff;cursor:pointer;clip-path:polygon(8px 0,100% 0,calc(100% - 8px) 100%,0 100%)}
.battle-controls button.active{border-color:#fff2a3;background:linear-gradient(#ffbd35,#dd5b16);box-shadow:0 0 12px #ffd75a}
.battle-status{color:#8fe9ff;font-size:12px;letter-spacing:.12em;text-align:right}
.battle-viewer-error .battle-stage::before{content:"STATIC FALLBACK ACTIVE";position:absolute;z-index:2;inset:0;display:grid;place-items:center;color:#ffd36a;letter-spacing:.14em}

/* Card labels sit above the temporary border until the extracted Grand frame arrives. */
.card-title-overlay{position:absolute;z-index:3;left:7%;right:7%;bottom:2.7%;height:13%;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;font-family:Matisse,serif;text-align:center;text-shadow:-2px -2px 0 #000,2px -2px 0 #000,-2px 2px 0 #000,2px 2px 0 #000,0 3px 4px #000;pointer-events:none}
.card-title-overlay strong{font-size:34px;line-height:.95;font-weight:700}
.card-title-overlay span{margin-top:5px;font-size:22px;line-height:1}

/* NP overlays follow the reduced command-card proportions. */
.np-card-portrait{left:-3%;top:4%;width:106%}
.np-card-icon{left:13%;bottom:2%;width:74%}
.np-card-text{left:14%;bottom:2%;width:72%}
.np-card-title{inset:auto;left:11%;top:46%;width:78%;height:48%;object-fit:contain}
.origin-tabs .apex-tab{grid-column:auto}
.origin-tabs .beast-tab{background:linear-gradient(135deg,#66212b,#bc263e 55%,#3d111a);border-color:#ffc0c8}
.origin-tabs .beast-tab.active{background:linear-gradient(135deg,#ffd55a,#f14d5f 48%,#8e1727);box-shadow:0 0 17px #ff8795}
.origin-tabs .kiara-alter-tab{background:linear-gradient(135deg,#f8f1dc,#e7b8a6 52%,#9f6772);border-color:#fff4d0;color:#3e2730;text-shadow:0 1px #fff}
.origin-tabs .kiara-alter-tab.active{background:linear-gradient(135deg,#fff8d7,#f09c84 48%,#b6536f);color:#fff;box-shadow:0 0 17px #ffd0ba;text-shadow:0 2px #6c293c}
.origin-tabs .kasumi-tab{grid-column:auto}

/* Native-ratio Grand frames and the extracted flip control. */
.card-shell.grand-frame{width:484px}
.grand-frame .card-art{left:2.2%;top:5.5%;width:95.6%;height:80.2%;object-fit:cover}
.grand-frame .card-title-overlay{left:10%;right:10%;bottom:1.1%;height:9.5%}
.grand-frame .card-title-overlay strong{font-size:30px}
.grand-frame .card-title-overlay span{font-size:20px}
.flip-label{width:70px;height:70px;padding:0;border:0;background:transparent;clip-path:none;cursor:pointer}
.flip-label img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 3px #16374c)}
.flip-label:hover img{filter:drop-shadow(0 0 10px #56d9ff) brightness(1.12)}
.side-menu .fgo-button:last-child{background:linear-gradient(140deg,#ef777c,#b92355);box-shadow:0 3px 7px #3b001c,inset 0 0 0 2px #bd3f64}
.card-shell.beast-frame{width:510px}
.beast-frame .card-front{border:7px solid #8f2c54;background:linear-gradient(145deg,#180814,#4e1534);box-shadow:inset 0 0 0 3px #e0ad70}
.beast-frame .card-art{left:3%;top:3%;width:94%;height:84%;object-fit:contain;background:radial-gradient(circle,#6b284d,#130711 72%)}
.beast-frame .card-title-overlay{left:4%;right:4%;bottom:1.5%;height:12%;border-top:2px solid #d6a763;background:linear-gradient(90deg,#2b0c23,#7a244e,#2b0c23)}
.card-border[hidden]{display:none}
